~ubuntu-branches/ubuntu/utopic/gcc-4.7/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/svn-updates-linaro.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-10-21 18:07:14 UTC
  • mfrom: (15.1.33 sid)
  • Revision ID: package-import@ubuntu.com-20131021180714-6fe3g87f10pbhlkf
Tags: 4.7.3-8ubuntu1
* Merge with Debian; remaining changes:
  - Build from upstream source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# DP: updates from the 4.7 branch upto 20130821 (r201895).
 
1
# DP: updates from the 4.7 branch upto 20131020 (r203880).
2
2
 
3
3
last_updated()
4
4
{
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)
8
8
EOF
9
9
}
10
10
 
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'
14
14
 
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
19
 
@@ -518,14 +518,21 @@
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],
24
 
-      (void *) _ZTSe };
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
 
19
@@ -2311,7 +2311,7 @@
 
20
                                _RandomAccessIterator __last)
 
21
     {
 
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);
 
26
     }
45
27
 
46
 
 #ifdef _GLIBCXX_SYMVER_DARWIN
 
28
@@ -2323,7 +2323,7 @@
 
29
                                _RandomAccessIterator __last, _Compare __comp)
 
30
     {
 
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,
 
34
                                  __comp);
 
35
       return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
 
36
     }
47
37
Index: libstdc++-v3/ChangeLog
48
38
===================================================================
49
39
--- a/src/libstdc++-v3/ChangeLog        (revision
50
40
+++ b/src/libstdc++-v3/ChangeLog        (revision
51
 
@@ -1,3 +1,10 @@
52
 
+2013-08-17  Uros Bizjak  <ubizjak@gmail.com>
53
 
+
54
 
+       * src/c++98/compatibility.cc (_ZTIe): Use
55
 
+       reinterpret_cast<const cast *> to avoid -Wcast-qual warnings.
56
 
+       (_ZTIPe): Ditto.
57
 
+       (ZTIPKe): Ditto.
58
 
+
59
 
 2013-05-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
41
@@ -1,3 +1,11 @@
 
42
+2013-10-20  Chris Jefferson  <chris@bubblescope.net>
 
43
+           Paolo Carlini  <paolo.carlini@oracle.com>
 
44
+
 
45
+       PR libstdc++/58800
 
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
 
49
+
 
50
 2013-09-30  Chris Jefferson  <chris@bubblescope.net>
60
51
 
61
 
        * include/bits/basic_string.h (getline): Fix doxygen comments.
 
52
        PR libstdc++/58437
 
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
 
57
@@ -0,0 +1,52 @@
 
58
+// Copyright (C) 2013 Free Software Foundation, Inc.
 
59
+//
 
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.
 
65
+
 
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.
 
70
+
 
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/>.
 
74
+
 
75
+// 25.3.2 [lib.alg.nth.element]
 
76
+
 
77
+// { dg-options "-std=gnu++11" }
 
78
+
 
79
+#include <algorithm>
 
80
+#include <testsuite_hooks.h>
 
81
+#include <testsuite_iterators.h>
 
82
+
 
83
+using __gnu_test::test_container;
 
84
+using __gnu_test::random_access_iterator_wrapper;
 
85
+
 
86
+typedef test_container<int, random_access_iterator_wrapper> Container;
 
87
+
 
88
+void test01()
 
89
+{
 
90
+  std::vector<int> v = {
 
91
+    207089,
 
92
+    202585,
 
93
+    180067,
 
94
+    157549,
 
95
+    211592,
 
96
+    216096,
 
97
+    207089
 
98
+  };
 
99
+
 
100
+  Container con(v.data(), v.data() + 7);
 
101
+
 
102
+  std::nth_element(con.begin(), con.begin() + 3, con.end());
 
103
+}
 
104
+
 
105
+int main()
 
106
+{
 
107
+  test01();
 
108
+  return 0;
 
109
+}
62
110
Index: gcc/DATESTAMP
63
111
===================================================================
64
112
--- a/src/gcc/DATESTAMP (revision
65
113
+++ b/src/gcc/DATESTAMP (revision
66
114
@@ -1 +1 @@
67
 
-20130812
68
 
+20130821
69
 
Index: gcc/tree-tailcall.c
70
 
===================================================================
71
 
--- a/src/gcc/tree-tailcall.c   (revision
72
 
+++ b/src/gcc/tree-tailcall.c   (revision
73
 
@@ -329,8 +329,10 @@
74
 
     case NEGATE_EXPR:
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);
79
 
       else
80
 
-        *m = build_int_cst (TREE_TYPE (op0), -1);
81
 
+        return false;
82
 
 
83
 
       *ass_var = dest;
84
 
       return true;
85
 
@@ -342,8 +344,10 @@
86
 
         {
87
 
           if (FLOAT_TYPE_P (TREE_TYPE (non_ass_var)))
88
 
             *m = build_real (TREE_TYPE (non_ass_var), dconstm1);
89
 
-          else
90
 
+          else if (INTEGRAL_TYPE_P (TREE_TYPE (non_ass_var)))
91
 
             *m = build_int_cst (TREE_TYPE (non_ass_var), -1);
92
 
+         else
93
 
+           return false;
94
 
 
95
 
           *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var);
96
 
         }
97
 
Index: gcc/ChangeLog
98
 
===================================================================
99
 
--- a/src/gcc/ChangeLog (revision
100
 
+++ b/src/gcc/ChangeLog (revision
101
 
@@ -1,3 +1,30 @@
102
 
+2013-08-17  Uros Bizjak  <ubizjak@gmail.com>
103
 
+
104
 
+       Backport from mainline
105
 
+       2013-08-12  Perez Read  <netfirewall@gmail.com>
106
 
+
107
 
+       PR target/58132
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.
111
 
+
112
 
+2013-08-13  Marek Polacek  <polacek@redhat.com>
113
 
+
114
 
+       Backport from 4.8:
115
 
+       2013-0813  Marek Polacek  <polacek@redhat.com>
116
 
+                  Jakub Jelinek  <jakub@redhat.com>
117
 
+
118
 
+       PR tree-optimization/57980
119
 
+       * tree-tailcall.c (process_assignment): Return false
120
 
+       when not dealing with integers or floats.
121
 
+
122
 
+2013-08-12  David Edelsohn  <dje.gcc@gmail.com>
123
 
+
124
 
+       Backport from mainline
125
 
+       2013-02-14  Steven Bosscher  <steven@gcc.gnu.org>
126
 
+
127
 
+       * collect2-aix.h: Define F_LOADONLY.
128
 
+
129
 
 2013-08-02  Eric Botcazou  <ebotcazou@adacore.com>
130
 
 
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
136
 
@@ -0,0 +1,8 @@
137
 
+package body Loop_Optimization16_Pkg is
138
 
+
139
 
+  function F return Natural is
140
 
+  begin
141
 
+    return Natural (Index_Base'Last);
142
 
+  end;
143
 
+
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
149
 
@@ -0,0 +1,7 @@
150
 
+package Loop_Optimization16_Pkg is
151
 
+
152
 
+  type Index_Base is range 0 .. 127;
153
 
+
154
 
+  function F return Natural;
155
 
+
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
161
 
@@ -0,0 +1,24 @@
162
 
+-- { dg-do run }
163
 
+
164
 
+with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg;
165
 
+
166
 
+procedure Loop_Optimization16 is
167
 
+
168
 
+   Counter : Natural := 0;
169
 
+
170
 
+   C : constant Natural := F;
171
 
+
172
 
+   subtype Index_T is Index_Base range 1 .. Index_Base (C);
173
 
+
174
 
+begin
175
 
+
176
 
+   for I in Index_T'First .. Index_T'Last loop
177
 
+      Counter := Counter + 1;
178
 
+      exit when Counter > 200;
179
 
+   end loop;
180
 
+
181
 
+   if Counter > 200 then
182
 
+      raise Program_Error;
183
 
+   end if;
184
 
+
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
190
 
@@ -0,0 +1,19 @@
191
 
+/* PR tree-optimization/57980 */
192
 
+/* { dg-do compile } */
193
 
+/* { dg-options "-O -foptimize-sibling-calls -w" } */
194
 
+
195
 
+typedef int V __attribute__ ((vector_size (2 * sizeof (int))));
196
 
+extern V f (void);
197
 
+
198
 
+V
199
 
+bar (void)
200
 
+{
201
 
+  return -f ();
202
 
+}
203
 
+
204
 
+V
205
 
+foo (void)
206
 
+{
207
 
+  V v = { };
208
 
+  return v - f ();
209
 
+}
 
115
-20131014
 
116
+20131020
210
117
Index: gcc/testsuite/ChangeLog
211
118
===================================================================
212
119
--- a/src/gcc/testsuite/ChangeLog       (revision
213
120
+++ b/src/gcc/testsuite/ChangeLog       (revision
214
 
@@ -1,3 +1,16 @@
215
 
+2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>
216
 
+
217
 
+       * gnat.dg/loop_optimization16.adb: New test.
218
 
+       * gnat.dg/loop_optimization16_pkg.ad[sb]: New helper.
219
 
+
220
 
+2013-08-13  Marek Polacek  <polacek@redhat.com>
221
 
+
222
 
+       Backport from 4.8:
223
 
+       2013-08-13  Marek Polacek  <polacek@redhat.com>
224
 
+
225
 
+       PR tree-optimization/57980
226
 
+       * gcc.dg/pr57980.c: New test.
227
 
+
228
 
 2013-08-11  Janus Weil  <janus@gcc.gnu.org>
 
121
@@ -1,3 +1,9 @@
 
122
+2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
 
123
+
 
124
+       PR c++/58633
 
125
+       * g++.dg/cpp0x/decltype57.C: New.
 
126
+       * g++.dg/cpp0x/enum18.C: Revert r174385 changes.
 
127
+
 
128
 2013-09-23  Eric Botcazou  <ebotcazou@adacore.com>
229
129
 
230
 
        Backport from trunk:
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
235
 
@@ -0,0 +1,26 @@
236
 
+// PR c++/58119
237
 
+
238
 
+template <class T>
239
 
+struct A
240
 
+{
241
 
+  operator T*();
242
 
+  template <class U>
243
 
+  operator A<U>();
244
 
+};
245
 
+
246
 
+template <class T>
247
 
+struct B
248
 
+{
249
 
+  operator T*();
250
 
+  template <class U>
251
 
+  operator A<U>*();
252
 
+};
253
 
+
254
 
+int main()
255
 
+{
256
 
+  A<int> a;
257
 
+  delete a;
258
 
+
259
 
+  B<int> b;
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
 
135
@@ -4,5 +4,5 @@
 
136
 int main(void) {
 
137
   enum e {};
 
138
   e ev;
 
139
-  ev.e::~e_u();        // { dg-error "e_u. has not been declared" }
 
140
+  ev.e::~e_u();        // { dg-error "" }
 
141
 }
 
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
 
146
@@ -0,0 +1,8 @@
 
147
+// PR c++/58633
 
148
+// { dg-do compile { target c++11 } }
 
149
+
 
150
+void foo(int i)
 
151
+{
 
152
+  typedef int I;
 
153
+  decltype(i.I::~I())* p;
261
154
+}
262
155
Index: gcc/cp/ChangeLog
263
156
===================================================================
264
157
--- a/src/gcc/cp/ChangeLog      (revision
265
158
+++ b/src/gcc/cp/ChangeLog      (revision
266
 
@@ -1,3 +1,11 @@
267
 
+2013-08-20  Jason Merrill  <jason@redhat.com>
268
 
+
269
 
+       PR c++/58119
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.
274
 
+
275
 
 2012-12-03  Paolo Carlini  <paolo.carlini@oracle.com>
 
159
@@ -1,3 +1,8 @@
 
160
+2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
 
161
+
 
162
+       PR c++/58633
 
163
+       * parser.c (cp_parser_pseudo_destructor_name): Revert r174385 changes.
 
164
+
 
165
 2013-09-13  Jason Merrill  <jason@redhat.com>
276
166
 
277
 
        PR c++/54170
278
 
Index: gcc/cp/cvt.c
 
167
        PR c++/58273
 
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))
284
 
        continue;
 
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);
285
175
 
286
 
-      if (TREE_CODE (cand) == TEMPLATE_DECL)
287
 
-       {
288
 
-         if (complain)
289
 
-           {
290
 
-             error ("ambiguous default type conversion from %qT",
291
 
-                    basetype);
292
 
-             error ("  candidate conversions include %qD", cand);
293
 
-           }
294
 
-         return error_mark_node;
295
 
-       }
 
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);
296
179
-
297
 
       candidate = non_reference (TREE_TYPE (TREE_TYPE (cand)));
298
 
 
299
 
       switch (TREE_CODE (candidate))
300
 
@@ -1583,11 +1572,23 @@
301
 
          break;
302
 
 
303
 
        default:
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))
307
 
+           win = true;
308
 
          break;
309
 
        }
310
 
 
311
 
       if (win)
312
 
        {
313
 
+         if (TREE_CODE (cand) == TEMPLATE_DECL)
314
 
+           {
315
 
+             if (complain)
316
 
+               error ("default type conversion can't deduce template"
317
 
+                      " argument for %qD", cand);
318
 
+             return error_mark_node;
319
 
+           }
320
 
+
321
 
          if (winner)
322
 
            {
323
 
              if (complain)
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)))
331
 
 
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
335
 
-   order.  */
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)
347
 
 
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
351
 
+   order.  */
352
 
+#define MAYBE_CLASS_TYPE_P(T) (WILDCARD_TYPE_P (T) || CLASS_TYPE_P (T))
353
 
+
354
 
 /* Set CLASS_TYPE_P for T to VAL.  T must be a class, struct, or
355
 
    union type.  */
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
361
187
@@ -1,3 +1,8 @@
362
 
+2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>
363
 
+
364
 
+       * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
365
 
+       values outside of the range of the type.
366
 
+
367
 
 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
368
 
 
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)
376
 
     return true;
377
 
 
378
 
-  return tree_int_cst_equal (val, min_or_max_val) == 1;
379
 
+  if (max)
380
 
+    return tree_int_cst_lt (val, min_or_max_val) == 0;
381
 
+  else
382
 
+    return tree_int_cst_lt (min_or_max_val, val) == 0;
383
 
 }
384
 
 
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
390
 
@@ -1,5 +1,5 @@
391
 
 /* AIX cross support for collect2.
392
 
-   Copyright (C) 2009 Free Software Foundation, Inc.
393
 
+   Copyright (C) 2009-2013 Free Software Foundation, Inc.
394
 
 
395
 
 This file is part of GCC.
396
 
 
397
 
@@ -29,7 +29,7 @@
398
 
    Definitions adapted from bfd.  (Fairly heavily adapted in some cases.)
399
 
    ------------------------------------------------------------------------- */
400
 
 
401
 
-/* Compatiblity types for bfd.  */
402
 
+/* Compatibility types for bfd.  */
403
 
 typedef unsigned HOST_WIDE_INT bfd_vma;
404
 
 
405
 
 /* The size of an archive's fl_magic field.  */
406
 
@@ -135,7 +135,7 @@
407
 
   /* The number of entries in the symbol table.  */
408
 
   char f_nsyms[4];
409
 
 
410
 
-  /* The size of the auxillary header.  */
411
 
+  /* The size of the auxiliary header.  */
412
 
   char f_opthdr[2];
413
 
 
414
 
   /* Flags.  */
415
 
@@ -157,7 +157,7 @@
416
 
   /* The offset of the symbol table from the start of the file.  */
417
 
   char f_symptr[8];
418
 
 
419
 
-  /* The size of the auxillary header.  */
420
 
+  /* The size of the auxiliary header.  */
421
 
   char f_opthdr[2];
422
 
 
423
 
   /* Flags.  */
424
 
@@ -222,14 +222,15 @@
425
 
   /* The class of symbol (a C_* value).  */
426
 
   char n_sclass[1];
427
 
 
428
 
-  /* The number of auxillary symbols attached to this entry.  */
429
 
+  /* The number of auxiliary symbols attached to this entry.  */
430
 
   char n_numaux[1];
431
 
 };
432
 
 
433
 
 /* Definitions required by collect2.  */
434
 
 #define C_EXT 2
435
 
 
436
 
-#define F_SHROBJ 0x2000
437
 
+#define F_SHROBJ    0x2000
438
 
+#define F_LOADONLY  0x4000
439
 
 
440
 
 #define N_UNDEF ((short) 0)
441
 
 #define N_TMASK 060
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)"
448
 
   "@
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)"
457
 
   "@
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>
 
189
+
 
190
+       * gcc-interface/utils.c (gnat_set_type_context): New function.
 
191
+       (gnat_pushdecl): Use it to set the context of the type.
 
192
+
 
193
 2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>
 
194
 
 
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
 
200
@@ -500,6 +500,22 @@
 
201
   free_binding_level = level;
 
202
 }
 
203
 
 
204
+/* Set the context of TYPE and its parallel types (if any) to CONTEXT.  */
 
205
+
 
206
+static void
 
207
+gnat_set_type_context (tree type, tree context)
 
208
+{
 
209
+  tree decl = TYPE_STUB_DECL (type);
 
210
+
 
211
+  TYPE_CONTEXT (type) = context;
 
212
+
 
213
+  while (decl && DECL_PARALLEL_TYPE (decl))
 
214
+    {
 
215
+      TYPE_CONTEXT (DECL_PARALLEL_TYPE (decl)) = context;
 
216
+      decl = TYPE_STUB_DECL (DECL_PARALLEL_TYPE (decl));
 
217
+    }
 
218
+}
 
219
+
 
220
 /* Record DECL as belonging to the current lexical scope and use GNAT_NODE
 
221
    for location information and flag propagation.  */
 
222
 
 
223
@@ -581,7 +597,7 @@
 
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;
 
231
            }
 
232
@@ -591,7 +607,7 @@
 
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)))
 
241
@@ -613,7 +629,7 @@
 
242
          if (!(TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL))
 
243
            {
 
244
              TYPE_NAME (t) = decl;
 
245
-             TYPE_CONTEXT (t) = DECL_CONTEXT (decl);
 
246
+             gnat_set_type_context (t, DECL_CONTEXT (decl));
 
247
            }
 
248
     }
 
249
 }