1
# DP: updates from the 4.7 branch upto 20130821 (r201895).
1
# DP: updates from the 4.7 branch upto 20131020 (r203880).
5
5
cat > ${dir}LAST_UPDATED <<EOF
6
Wed Aug 21 11:15:52 CEST 2013
7
Wed Aug 21 09:15:52 UTC 2013 (revision 201895)
6
Sun Oct 20 22:56:37 CEST 2013
7
Sun Oct 20 20:56:37 UTC 2013 (revision 203880)
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@201655 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@203509 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \
12
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: libstdc++-v3/src/c++98/compatibility.cc
15
Index: libstdc++-v3/include/bits/stl_algo.h
16
16
===================================================================
17
--- a/src/libstdc++-v3/src/c++98/compatibility.cc (revision
18
+++ b/src/libstdc++-v3/src/c++98/compatibility.cc (revision
20
extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe";
21
extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe";
22
extern __attribute__((used, weak)) const void * const _ZTIe[2]
23
- = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2],
25
+ = { reinterpret_cast<const void *>
26
+ (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]),
27
+ reinterpret_cast<const void *>(_ZTSe) };
28
extern __attribute__((used, weak)) const void * const _ZTIPe[4]
29
- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
30
- (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe };
31
+ = { reinterpret_cast<const void *>
32
+ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
33
+ reinterpret_cast<const void *>(_ZTSPe),
34
+ reinterpret_cast<const void *>(0L),
35
+ reinterpret_cast<const void *>(_ZTIe) };
36
extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
37
- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
38
- (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
39
+ = { reinterpret_cast<const void *>
40
+ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
41
+ reinterpret_cast<const void *>(_ZTSPKe),
42
+ reinterpret_cast<const void *>(1L),
43
+ reinterpret_cast<const void *>(_ZTIe) };
44
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
17
--- a/src/libstdc++-v3/include/bits/stl_algo.h (revision
18
+++ b/src/libstdc++-v3/include/bits/stl_algo.h (revision
20
_RandomAccessIterator __last)
22
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
23
- std::__move_median_to_first(__first, __first + 1, __mid, (__last - 2));
24
+ std::__move_median_to_first(__first, __first + 1, __mid, __last - 1);
25
return std::__unguarded_partition(__first + 1, __last, *__first);
46
#ifdef _GLIBCXX_SYMVER_DARWIN
29
_RandomAccessIterator __last, _Compare __comp)
31
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
32
- std::__move_median_to_first(__first, __first + 1, __mid, (__last - 2),
33
+ std::__move_median_to_first(__first, __first + 1, __mid, __last - 1,
35
return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
47
37
Index: libstdc++-v3/ChangeLog
48
38
===================================================================
49
39
--- a/src/libstdc++-v3/ChangeLog (revision
50
40
+++ b/src/libstdc++-v3/ChangeLog (revision
52
+2013-08-17 Uros Bizjak <ubizjak@gmail.com>
54
+ * src/c++98/compatibility.cc (_ZTIe): Use
55
+ reinterpret_cast<const cast *> to avoid -Wcast-qual warnings.
59
2013-05-15 Jonathan Wakely <jwakely.gcc@gmail.com>
42
+2013-10-20 Chris Jefferson <chris@bubblescope.net>
43
+ Paolo Carlini <paolo.carlini@oracle.com>
46
+ * include/bits/stl_algo.h (__unguarded_partition_pivot): Change
47
+ __last - 2 to __last - 1.
48
+ * testsuite/25_algorithms/nth_element/58800.cc: New
50
2013-09-30 Chris Jefferson <chris@bubblescope.net>
61
* include/bits/basic_string.h (getline): Fix doxygen comments.
53
Index: libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc
54
===================================================================
55
--- a/src/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc (revision
56
+++ b/src/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc (revision
58
+// Copyright (C) 2013 Free Software Foundation, Inc.
60
+// This file is part of the GNU ISO C++ Library. This library is free
61
+// software; you can redistribute it and/or modify it under the
62
+// terms of the GNU General Public License as published by the
63
+// Free Software Foundation; either version 3, or (at your option)
64
+// any later version.
66
+// This library is distributed in the hope that it will be useful,
67
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
68
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69
+// GNU General Public License for more details.
71
+// You should have received a copy of the GNU General Public License along
72
+// with this library; see the file COPYING3. If not see
73
+// <http://www.gnu.org/licenses/>.
75
+// 25.3.2 [lib.alg.nth.element]
77
+// { dg-options "-std=gnu++11" }
80
+#include <testsuite_hooks.h>
81
+#include <testsuite_iterators.h>
83
+using __gnu_test::test_container;
84
+using __gnu_test::random_access_iterator_wrapper;
86
+typedef test_container<int, random_access_iterator_wrapper> Container;
90
+ std::vector<int> v = {
100
+ Container con(v.data(), v.data() + 7);
102
+ std::nth_element(con.begin(), con.begin() + 3, con.end());
62
110
Index: gcc/DATESTAMP
63
111
===================================================================
64
112
--- a/src/gcc/DATESTAMP (revision
65
113
+++ b/src/gcc/DATESTAMP (revision
69
Index: gcc/tree-tailcall.c
70
===================================================================
71
--- a/src/gcc/tree-tailcall.c (revision
72
+++ b/src/gcc/tree-tailcall.c (revision
75
if (FLOAT_TYPE_P (TREE_TYPE (op0)))
76
*m = build_real (TREE_TYPE (op0), dconstm1);
77
+ else if (INTEGRAL_TYPE_P (TREE_TYPE (op0)))
78
+ *m = build_int_cst (TREE_TYPE (op0), -1);
80
- *m = build_int_cst (TREE_TYPE (op0), -1);
87
if (FLOAT_TYPE_P (TREE_TYPE (non_ass_var)))
88
*m = build_real (TREE_TYPE (non_ass_var), dconstm1);
90
+ else if (INTEGRAL_TYPE_P (TREE_TYPE (non_ass_var)))
91
*m = build_int_cst (TREE_TYPE (non_ass_var), -1);
95
*a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var);
98
===================================================================
99
--- a/src/gcc/ChangeLog (revision
100
+++ b/src/gcc/ChangeLog (revision
102
+2013-08-17 Uros Bizjak <ubizjak@gmail.com>
104
+ Backport from mainline
105
+ 2013-08-12 Perez Read <netfirewall@gmail.com>
108
+ * config/i386/i386.md (*movabs<mode>_1): Add <ptrsize> PTR before
109
+ operand 0 for intel asm alternative.
110
+ (*movabs<mode>_2): Ditto for operand 1.
112
+2013-08-13 Marek Polacek <polacek@redhat.com>
115
+ 2013-0813 Marek Polacek <polacek@redhat.com>
116
+ Jakub Jelinek <jakub@redhat.com>
118
+ PR tree-optimization/57980
119
+ * tree-tailcall.c (process_assignment): Return false
120
+ when not dealing with integers or floats.
122
+2013-08-12 David Edelsohn <dje.gcc@gmail.com>
124
+ Backport from mainline
125
+ 2013-02-14 Steven Bosscher <steven@gcc.gnu.org>
127
+ * collect2-aix.h: Define F_LOADONLY.
129
2013-08-02 Eric Botcazou <ebotcazou@adacore.com>
131
* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
132
Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb
133
===================================================================
134
--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (revision
135
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (revision
137
+package body Loop_Optimization16_Pkg is
139
+ function F return Natural is
141
+ return Natural (Index_Base'Last);
144
+end Loop_Optimization16_Pkg;
145
Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads
146
===================================================================
147
--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (revision
148
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (revision
150
+package Loop_Optimization16_Pkg is
152
+ type Index_Base is range 0 .. 127;
154
+ function F return Natural;
156
+end Loop_Optimization16_Pkg;
157
Index: gcc/testsuite/gnat.dg/loop_optimization16.adb
158
===================================================================
159
--- a/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (revision
160
+++ b/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (revision
164
+with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg;
166
+procedure Loop_Optimization16 is
168
+ Counter : Natural := 0;
170
+ C : constant Natural := F;
172
+ subtype Index_T is Index_Base range 1 .. Index_Base (C);
176
+ for I in Index_T'First .. Index_T'Last loop
177
+ Counter := Counter + 1;
178
+ exit when Counter > 200;
181
+ if Counter > 200 then
182
+ raise Program_Error;
185
+end Loop_Optimization16;
186
Index: gcc/testsuite/gcc.dg/pr57980.c
187
===================================================================
188
--- a/src/gcc/testsuite/gcc.dg/pr57980.c (revision
189
+++ b/src/gcc/testsuite/gcc.dg/pr57980.c (revision
191
+/* PR tree-optimization/57980 */
192
+/* { dg-do compile } */
193
+/* { dg-options "-O -foptimize-sibling-calls -w" } */
195
+typedef int V __attribute__ ((vector_size (2 * sizeof (int))));
210
117
Index: gcc/testsuite/ChangeLog
211
118
===================================================================
212
119
--- a/src/gcc/testsuite/ChangeLog (revision
213
120
+++ b/src/gcc/testsuite/ChangeLog (revision
215
+2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
217
+ * gnat.dg/loop_optimization16.adb: New test.
218
+ * gnat.dg/loop_optimization16_pkg.ad[sb]: New helper.
220
+2013-08-13 Marek Polacek <polacek@redhat.com>
223
+ 2013-08-13 Marek Polacek <polacek@redhat.com>
225
+ PR tree-optimization/57980
226
+ * gcc.dg/pr57980.c: New test.
228
2013-08-11 Janus Weil <janus@gcc.gnu.org>
122
+2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
125
+ * g++.dg/cpp0x/decltype57.C: New.
126
+ * g++.dg/cpp0x/enum18.C: Revert r174385 changes.
128
2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
231
Index: gcc/testsuite/g++.dg/template/delete2.C
232
===================================================================
233
--- a/src/gcc/testsuite/g++.dg/template/delete2.C (revision
234
+++ b/src/gcc/testsuite/g++.dg/template/delete2.C (revision
260
+ delete b; // { dg-error "template|delete" }
130
* gnat.dg/opt28.ad[sb]: New test.
131
Index: gcc/testsuite/g++.dg/cpp0x/enum18.C
132
===================================================================
133
--- a/src/gcc/testsuite/g++.dg/cpp0x/enum18.C (revision
134
+++ b/src/gcc/testsuite/g++.dg/cpp0x/enum18.C (revision
139
- ev.e::~e_u(); // { dg-error "e_u. has not been declared" }
140
+ ev.e::~e_u(); // { dg-error "" }
142
Index: gcc/testsuite/g++.dg/cpp0x/decltype57.C
143
===================================================================
144
--- a/src/gcc/testsuite/g++.dg/cpp0x/decltype57.C (revision
145
+++ b/src/gcc/testsuite/g++.dg/cpp0x/decltype57.C (revision
148
+// { dg-do compile { target c++11 } }
153
+ decltype(i.I::~I())* p;
262
155
Index: gcc/cp/ChangeLog
263
156
===================================================================
264
157
--- a/src/gcc/cp/ChangeLog (revision
265
158
+++ b/src/gcc/cp/ChangeLog (revision
267
+2013-08-20 Jason Merrill <jason@redhat.com>
270
+ * cp-tree.h (WILDCARD_TYPE_P): Split out from...
271
+ (MAYBE_CLASS_TYPE_P): ...here.
272
+ * cvt.c (build_expr_type_conversion): Don't complain about a
273
+ template that can't match the desired type category.
275
2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
160
+2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
163
+ * parser.c (cp_parser_pseudo_destructor_name): Revert r174385 changes.
165
2013-09-13 Jason Merrill <jason@redhat.com>
168
Index: gcc/cp/parser.c
279
169
===================================================================
280
--- a/src/gcc/cp/cvt.c (revision
281
+++ b/src/gcc/cp/cvt.c (revision
282
@@ -1539,17 +1539,6 @@
283
if (DECL_NONCONVERTING_P (cand))
170
--- a/src/gcc/cp/parser.c (revision
171
+++ b/src/gcc/cp/parser.c (revision
172
@@ -6317,10 +6317,6 @@
173
/* Look for the `~'. */
174
cp_parser_require (parser, CPP_COMPL, RT_COMPL);
286
- if (TREE_CODE (cand) == TEMPLATE_DECL)
290
- error ("ambiguous default type conversion from %qT",
292
- error (" candidate conversions include %qD", cand);
294
- return error_mark_node;
176
- /* Once we see the ~, this has to be a pseudo-destructor. */
177
- if (!processing_template_decl && !cp_parser_error_occurred (parser))
178
- cp_parser_commit_to_tentative_parse (parser);
297
candidate = non_reference (TREE_TYPE (TREE_TYPE (cand)));
299
switch (TREE_CODE (candidate))
300
@@ -1583,11 +1572,23 @@
304
+ /* A wildcard could be instantiated to match any desired
305
+ type, but we can't deduce the template argument. */
306
+ if (WILDCARD_TYPE_P (candidate))
313
+ if (TREE_CODE (cand) == TEMPLATE_DECL)
316
+ error ("default type conversion can't deduce template"
317
+ " argument for %qD", cand);
318
+ return error_mark_node;
324
Index: gcc/cp/cp-tree.h
325
===================================================================
326
--- a/src/gcc/cp/cp-tree.h (revision
327
+++ b/src/gcc/cp/cp-tree.h (revision
328
@@ -1191,18 +1191,21 @@
329
/* The _DECL for this _TYPE. */
330
#define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE)))
332
-/* Nonzero if T is a class (or struct or union) type. Also nonzero
333
- for template type parameters, typename types, and instantiated
334
- template template parameters. Keep these checks in ascending code
336
-#define MAYBE_CLASS_TYPE_P(T) \
337
+/* Nonzero if T is a type that could resolve to any kind of concrete type
338
+ at instantiation time. */
339
+#define WILDCARD_TYPE_P(T) \
340
(TREE_CODE (T) == TEMPLATE_TYPE_PARM \
341
|| TREE_CODE (T) == TYPENAME_TYPE \
342
|| TREE_CODE (T) == TYPEOF_TYPE \
343
|| TREE_CODE (T) == BOUND_TEMPLATE_TEMPLATE_PARM \
344
- || TREE_CODE (T) == DECLTYPE_TYPE \
345
- || CLASS_TYPE_P (T))
346
+ || TREE_CODE (T) == DECLTYPE_TYPE)
348
+/* Nonzero if T is a class (or struct or union) type. Also nonzero
349
+ for template type parameters, typename types, and instantiated
350
+ template template parameters. Keep these checks in ascending code
352
+#define MAYBE_CLASS_TYPE_P(T) (WILDCARD_TYPE_P (T) || CLASS_TYPE_P (T))
354
/* Set CLASS_TYPE_P for T to VAL. T must be a class, struct, or
356
#define SET_CLASS_TYPE_P(T, VAL) \
180
/* Look for the type-name again. We are not responsible for
181
checking that it matches the first type-name. */
182
*type = cp_parser_nonclass_name (parser);
357
183
Index: gcc/ada/ChangeLog
358
184
===================================================================
359
185
--- a/src/gcc/ada/ChangeLog (revision
360
186
+++ b/src/gcc/ada/ChangeLog (revision
362
+2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
364
+ * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
365
+ values outside of the range of the type.
367
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
369
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
370
Index: gcc/ada/gcc-interface/trans.c
371
===================================================================
372
--- a/src/gcc/ada/gcc-interface/trans.c (revision
373
+++ b/src/gcc/ada/gcc-interface/trans.c (revision
374
@@ -2232,7 +2232,10 @@
375
if (TREE_CODE (val) != INTEGER_CST)
378
- return tree_int_cst_equal (val, min_or_max_val) == 1;
380
+ return tree_int_cst_lt (val, min_or_max_val) == 0;
382
+ return tree_int_cst_lt (min_or_max_val, val) == 0;
385
/* Return true if VAL (of type TYPE) can equal the minimum value of TYPE.
386
Index: gcc/collect2-aix.h
387
===================================================================
388
--- a/src/gcc/collect2-aix.h (revision
389
+++ b/src/gcc/collect2-aix.h (revision
391
/* AIX cross support for collect2.
392
- Copyright (C) 2009 Free Software Foundation, Inc.
393
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
395
This file is part of GCC.
398
Definitions adapted from bfd. (Fairly heavily adapted in some cases.)
399
------------------------------------------------------------------------- */
401
-/* Compatiblity types for bfd. */
402
+/* Compatibility types for bfd. */
403
typedef unsigned HOST_WIDE_INT bfd_vma;
405
/* The size of an archive's fl_magic field. */
407
/* The number of entries in the symbol table. */
410
- /* The size of the auxillary header. */
411
+ /* The size of the auxiliary header. */
416
/* The offset of the symbol table from the start of the file. */
419
- /* The size of the auxillary header. */
420
+ /* The size of the auxiliary header. */
424
@@ -222,14 +222,15 @@
425
/* The class of symbol (a C_* value). */
428
- /* The number of auxillary symbols attached to this entry. */
429
+ /* The number of auxiliary symbols attached to this entry. */
433
/* Definitions required by collect2. */
436
-#define F_SHROBJ 0x2000
437
+#define F_SHROBJ 0x2000
438
+#define F_LOADONLY 0x4000
440
#define N_UNDEF ((short) 0)
442
Index: gcc/config/i386/i386.md
443
===================================================================
444
--- a/src/gcc/config/i386/i386.md (revision
445
+++ b/src/gcc/config/i386/i386.md (revision
446
@@ -2327,7 +2327,7 @@
447
"TARGET_LP64 && ix86_check_movabs (insn, 0)"
449
movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1}
450
- mov{<imodesuffix>}\t{%1, %a0|%a0, %1}"
451
+ mov{<imodesuffix>}\t{%1, %a0|<iptrsize> PTR %a0, %1}"
452
[(set_attr "type" "imov")
453
(set_attr "modrm" "0,*")
454
(set_attr "length_address" "8,0")
455
@@ -2341,7 +2341,7 @@
456
"TARGET_LP64 && ix86_check_movabs (insn, 1)"
458
movabs{<imodesuffix>}\t{%P1, %0|%0, [%P1]}
459
- mov{<imodesuffix>}\t{%a1, %0|%0, %a1}"
460
+ mov{<imodesuffix>}\t{%a1, %0|%0, <iptrsize> PTR %a1}"
461
[(set_attr "type" "imov")
462
(set_attr "modrm" "0,*")
463
(set_attr "length_address" "8,0")
188
+2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
190
+ * gcc-interface/utils.c (gnat_set_type_context): New function.
191
+ (gnat_pushdecl): Use it to set the context of the type.
193
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
195
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
196
Index: gcc/ada/gcc-interface/utils.c
197
===================================================================
198
--- a/src/gcc/ada/gcc-interface/utils.c (revision
199
+++ b/src/gcc/ada/gcc-interface/utils.c (revision
201
free_binding_level = level;
204
+/* Set the context of TYPE and its parallel types (if any) to CONTEXT. */
207
+gnat_set_type_context (tree type, tree context)
209
+ tree decl = TYPE_STUB_DECL (type);
211
+ TYPE_CONTEXT (type) = context;
213
+ while (decl && DECL_PARALLEL_TYPE (decl))
215
+ TYPE_CONTEXT (DECL_PARALLEL_TYPE (decl)) = context;
216
+ decl = TYPE_STUB_DECL (DECL_PARALLEL_TYPE (decl));
220
/* Record DECL as belonging to the current lexical scope and use GNAT_NODE
221
for location information and flag propagation. */
224
if (TREE_CODE (t) == POINTER_TYPE)
225
TYPE_NEXT_PTR_TO (t) = tt;
226
TYPE_NAME (tt) = DECL_NAME (decl);
227
- TYPE_CONTEXT (tt) = DECL_CONTEXT (decl);
228
+ gnat_set_type_context (tt, DECL_CONTEXT (decl));
229
TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (t);
230
DECL_ORIGINAL_TYPE (decl) = tt;
233
/* We need a variant for the placeholder machinery to work. */
234
tree tt = build_variant_type_copy (t);
235
TYPE_NAME (tt) = decl;
236
- TYPE_CONTEXT (tt) = DECL_CONTEXT (decl);
237
+ gnat_set_type_context (tt, DECL_CONTEXT (decl));
238
TREE_USED (tt) = TREE_USED (t);
239
TREE_TYPE (decl) = tt;
240
if (DECL_ORIGINAL_TYPE (TYPE_NAME (t)))
242
if (!(TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL))
244
TYPE_NAME (t) = decl;
245
- TYPE_CONTEXT (t) = DECL_CONTEXT (decl);
246
+ gnat_set_type_context (t, DECL_CONTEXT (decl));