~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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: libitm/configure.tgt
16
 
===================================================================
17
 
--- a/src/libitm/configure.tgt  (.../tags/gcc_4_8_3_release)
18
 
+++ b/src/libitm/configure.tgt  (.../branches/gcc-4_8-branch)
19
 
@@ -101,7 +101,7 @@
20
 
   x86_64)
21
 
        case " ${CC} ${CFLAGS} " in
22
 
          *" -m32 "*)
23
 
-           XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
24
 
+           XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
25
 
            XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
26
 
            ;;
27
 
        esac
28
 
Index: libitm/ChangeLog
29
 
===================================================================
30
 
--- a/src/libitm/ChangeLog      (.../tags/gcc_4_8_3_release)
31
 
+++ b/src/libitm/ChangeLog      (.../branches/gcc-4_8-branch)
32
 
@@ -1,3 +1,7 @@
33
 
+2014-12-05  Uros Bizjak  <ubizjak@gmail.com>
34
 
+
35
 
+       * configure.tgt (x86_64): Tune -m32 multilib to generic.
36
 
+
37
 
 2014-05-22  Release Manager
38
 
 
39
 
        * GCC 4.8.3 released.
40
 
Index: Makefile.in
41
 
===================================================================
42
 
--- a/src/Makefile.in   (.../tags/gcc_4_8_3_release)
43
 
+++ b/src/Makefile.in   (.../branches/gcc-4_8-branch)
44
 
@@ -45483,6 +45483,38 @@
45
 
 configure-stage4-gcc: maybe-all-stage4-gmp
46
 
 configure-stageprofile-gcc: maybe-all-stageprofile-gmp
47
 
 configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
48
 
+configure-gcc: maybe-all-mpfr
49
 
+
50
 
+configure-stage1-gcc: maybe-all-stage1-mpfr
51
 
+configure-stage2-gcc: maybe-all-stage2-mpfr
52
 
+configure-stage3-gcc: maybe-all-stage3-mpfr
53
 
+configure-stage4-gcc: maybe-all-stage4-mpfr
54
 
+configure-stageprofile-gcc: maybe-all-stageprofile-mpfr
55
 
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
56
 
+configure-gcc: maybe-all-mpc
57
 
+
58
 
+configure-stage1-gcc: maybe-all-stage1-mpc
59
 
+configure-stage2-gcc: maybe-all-stage2-mpc
60
 
+configure-stage3-gcc: maybe-all-stage3-mpc
61
 
+configure-stage4-gcc: maybe-all-stage4-mpc
62
 
+configure-stageprofile-gcc: maybe-all-stageprofile-mpc
63
 
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
64
 
+configure-gcc: maybe-all-isl
65
 
+
66
 
+configure-stage1-gcc: maybe-all-stage1-isl
67
 
+configure-stage2-gcc: maybe-all-stage2-isl
68
 
+configure-stage3-gcc: maybe-all-stage3-isl
69
 
+configure-stage4-gcc: maybe-all-stage4-isl
70
 
+configure-stageprofile-gcc: maybe-all-stageprofile-isl
71
 
+configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
72
 
+configure-gcc: maybe-all-cloog
73
 
+
74
 
+configure-stage1-gcc: maybe-all-stage1-cloog
75
 
+configure-stage2-gcc: maybe-all-stage2-cloog
76
 
+configure-stage3-gcc: maybe-all-stage3-cloog
77
 
+configure-stage4-gcc: maybe-all-stage4-cloog
78
 
+configure-stageprofile-gcc: maybe-all-stageprofile-cloog
79
 
+configure-stagefeedback-gcc: maybe-all-stagefeedback-cloog
80
 
 configure-gcc: maybe-all-lto-plugin
81
 
 
82
 
 configure-stage1-gcc: maybe-all-stage1-lto-plugin
83
 
Index: libgomp/configure.tgt
84
 
===================================================================
85
 
--- a/src/libgomp/configure.tgt (.../tags/gcc_4_8_3_release)
86
 
+++ b/src/libgomp/configure.tgt (.../branches/gcc-4_8-branch)
87
 
@@ -79,7 +79,7 @@
88
 
        config_path="linux/x86 linux posix"
89
 
        case " ${CC} ${CFLAGS} " in
90
 
          *" -m32 "*)
91
 
-           XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
92
 
+           XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
93
 
            ;;
94
 
        esac
95
 
        ;;
96
 
Index: libgomp/ChangeLog
97
 
===================================================================
98
 
--- a/src/libgomp/ChangeLog     (.../tags/gcc_4_8_3_release)
99
 
+++ b/src/libgomp/ChangeLog     (.../branches/gcc-4_8-branch)
100
 
@@ -1,3 +1,21 @@
101
 
+2014-12-05  Uros Bizjak  <ubizjak@gmail.com>
102
 
+
103
 
+       * configure.tgt (x86_64): Tune -m32 multilib to generic.
104
 
+
105
 
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
106
 
+
107
 
+       Backported from mainline
108
 
+       2014-11-24  Jakub Jelinek  <jakub@redhat.com>
109
 
+
110
 
+       PR fortran/63938
111
 
+       * libgomp.fortran/pr63938-1.f90: New test.
112
 
+       * libgomp.fortran/pr63938-2.f90: New test.
113
 
+
114
 
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
115
 
+
116
 
+       PR libgomp/61200
117
 
+       * testsuite/libgomp.c/pr61200.c: New test.
118
 
+
119
 
 2014-05-22  Release Manager
120
 
 
121
 
        * GCC 4.8.3 released.
122
 
Index: libgomp/testsuite/libgomp.fortran/pr63938-1.f90
123
 
===================================================================
124
 
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90       (.../tags/gcc_4_8_3_release)
125
 
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90       (.../branches/gcc-4_8-branch)
126
 
@@ -0,0 +1,14 @@
127
 
+! PR fortran/63938
128
 
+! { dg-do run }
129
 
+
130
 
+program pr63938_1
131
 
+  integer :: i, x(1)
132
 
+  x(1) = 0
133
 
+!$omp parallel do
134
 
+  do i = 1, 1000
135
 
+    !$omp atomic
136
 
+    x(1) = x(1) + 1
137
 
+  end do
138
 
+!$omp end parallel do
139
 
+  if (x(1) .ne. 1000) call abort
140
 
+end program pr63938_1
141
 
Index: libgomp/testsuite/libgomp.fortran/pr63938-2.f90
142
 
===================================================================
143
 
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90       (.../tags/gcc_4_8_3_release)
144
 
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90       (.../branches/gcc-4_8-branch)
145
 
@@ -0,0 +1,18 @@
146
 
+! PR fortran/63938
147
 
+! { dg-do run }
148
 
+
149
 
+program pr63938_2
150
 
+  type t
151
 
+    integer :: x
152
 
+  end type
153
 
+  integer :: i
154
 
+  type(t) :: x
155
 
+  x%x = 0
156
 
+!$omp parallel do
157
 
+  do i = 1, 1000
158
 
+    !$omp atomic
159
 
+    x%x = x%x + 1
160
 
+  end do
161
 
+!$omp end parallel do
162
 
+  if (x%x .ne. 1000) call abort
163
 
+end program pr63938_2
164
 
Index: libgomp/testsuite/libgomp.c/pr61200.c
165
 
===================================================================
166
 
--- a/src/libgomp/testsuite/libgomp.c/pr61200.c (.../tags/gcc_4_8_3_release)
167
 
+++ b/src/libgomp/testsuite/libgomp.c/pr61200.c (.../branches/gcc-4_8-branch)
168
 
@@ -0,0 +1,87 @@
169
 
+/* PR libgomp/61200 */
170
 
+/* { dg-do run } */
171
 
+
172
 
+#include <omp.h>
173
 
+#include <stdlib.h>
174
 
+#include <unistd.h>
175
 
+
176
 
+volatile int x;
177
 
+
178
 
+void
179
 
+foo ()
180
 
+{
181
 
+  int var = 1;
182
 
+  int i;
183
 
+
184
 
+  for (i = 0; i < 2; i++)
185
 
+    {
186
 
+      if (i == 1)
187
 
+       {
188
 
+         #pragma omp parallel num_threads(2)
189
 
+           if (x)
190
 
+             var++;
191
 
+           else
192
 
+             {
193
 
+               #pragma omp single
194
 
+                 sleep (2);
195
 
+             }
196
 
+       }
197
 
+      else
198
 
+       {
199
 
+         #pragma omp task shared(var)
200
 
+         {
201
 
+           sleep (1);
202
 
+           var = 2;
203
 
+         }
204
 
+       }
205
 
+    }
206
 
+  #pragma omp taskwait
207
 
+  if (var != 2)
208
 
+    abort ();
209
 
+}
210
 
+
211
 
+void
212
 
+bar ()
213
 
+{
214
 
+  int var = 1;
215
 
+  int i;
216
 
+
217
 
+  for (i = 0; i < 2; i++)
218
 
+    {
219
 
+      if (i == 0)
220
 
+       {
221
 
+         #pragma omp task shared(var)
222
 
+         {
223
 
+           sleep (1);
224
 
+           var = 2;
225
 
+         }
226
 
+       }
227
 
+      else
228
 
+       {
229
 
+         #pragma omp parallel num_threads(2)
230
 
+           if (x)
231
 
+             var++;
232
 
+           else
233
 
+             {
234
 
+               #pragma omp single
235
 
+                 sleep (2);
236
 
+             }
237
 
+       }
238
 
+    }
239
 
+  #pragma omp taskwait
240
 
+  if (var != 2)
241
 
+    abort ();
242
 
+}
243
 
+
244
 
+int
245
 
+main ()
246
 
+{
247
 
+  omp_set_nested (1);
248
 
+  #pragma omp parallel num_threads(2)
249
 
+    #pragma omp single
250
 
+      foo ();
251
 
+  #pragma omp parallel num_threads(2)
252
 
+    #pragma omp single
253
 
+      bar ();
254
 
+  return 0;
255
 
+}
256
 
Index: libstdc++-v3/python/libstdcxx/v6/printers.py
257
 
===================================================================
258
 
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../tags/gcc_4_8_3_release)
259
 
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../branches/gcc-4_8-branch)
260
 
@@ -1,4 +1,4 @@
261
 
-# Pretty-printers for libstc++.
262
 
+# Pretty-printers for libstdc++.
263
 
 
264
 
 # Copyright (C) 2008-2013 Free Software Foundation, Inc.
265
 
 
266
 
@@ -18,7 +18,51 @@
267
 
 import gdb
268
 
 import itertools
269
 
 import re
270
 
+import sys
271
 
 
272
 
+### Python 2 + Python 3 compatibility code
273
 
+
274
 
+# Resources about compatibility:
275
 
+#
276
 
+#  * <http://pythonhosted.org/six/>: Documentation of the "six" module
277
 
+
278
 
+# FIXME: The handling of e.g. std::basic_string (at least on char)
279
 
+# probably needs updating to work with Python 3's new string rules.
280
 
+#
281
 
+# In particular, Python 3 has a separate type (called byte) for
282
 
+# bytestrings, and a special b"" syntax for the byte literals; the old
283
 
+# str() type has been redefined to always store Unicode text.
284
 
+#
285
 
+# We probably can't do much about this until this GDB PR is addressed:
286
 
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
287
 
+
288
 
+if sys.version_info[0] > 2:
289
 
+    ### Python 3 stuff
290
 
+    Iterator = object
291
 
+    # Python 3 folds these into the normal functions.
292
 
+    imap = map
293
 
+    izip = zip
294
 
+    # Also, int subsumes long
295
 
+    long = int
296
 
+else:
297
 
+    ### Python 2 stuff
298
 
+    class Iterator:
299
 
+        """Compatibility mixin for iterators
300
 
+
301
 
+        Instead of writing next() methods for iterators, write
302
 
+        __next__() methods and use this mixin to make them work in
303
 
+        Python 2 as well as Python 3.
304
 
+
305
 
+        Idea stolen from the "six" documentation:
306
 
+        <http://pythonhosted.org/six/#six.Iterator>
307
 
+        """
308
 
+
309
 
+        def next(self):
310
 
+            return self.__next__()
311
 
+
312
 
+    # In Python 2, we still need these from itertools
313
 
+    from itertools import imap, izip
314
 
+
315
 
 # Try to use the new-style pretty-printing if available.
316
 
 _use_gdb_pp = True
317
 
 try:
318
 
@@ -51,7 +95,7 @@
319
 
         # anything fancier here.
320
 
         field = typ.fields()[0]
321
 
         if not field.is_base_class:
322
 
-            raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
323
 
+            raise ValueError("Cannot find type %s::%s" % (str(orig), name))
324
 
         typ = field.type
325
 
 
326
 
 class SharedPointerPrinter:
327
 
@@ -87,7 +131,7 @@
328
 
 class StdListPrinter:
329
 
     "Print a std::list"
330
 
 
331
 
-    class _iterator:
332
 
+    class _iterator(Iterator):
333
 
         def __init__(self, nodetype, head):
334
 
             self.nodetype = nodetype
335
 
             self.base = head['_M_next']
336
 
@@ -97,7 +141,7 @@
337
 
         def __iter__(self):
338
 
             return self
339
 
 
340
 
-        def next(self):
341
 
+        def __next__(self):
342
 
             if self.base == self.head:
343
 
                 raise StopIteration
344
 
             elt = self.base.cast(self.nodetype).dereference()
345
 
@@ -135,7 +179,7 @@
346
 
 class StdSlistPrinter:
347
 
     "Print a __gnu_cxx::slist"
348
 
 
349
 
-    class _iterator:
350
 
+    class _iterator(Iterator):
351
 
         def __init__(self, nodetype, head):
352
 
             self.nodetype = nodetype
353
 
             self.base = head['_M_head']['_M_next']
354
 
@@ -144,7 +188,7 @@
355
 
         def __iter__(self):
356
 
             return self
357
 
 
358
 
-        def next(self):
359
 
+        def __next__(self):
360
 
             if self.base == 0:
361
 
                 raise StopIteration
362
 
             elt = self.base.cast(self.nodetype).dereference()
363
 
@@ -180,7 +224,7 @@
364
 
 class StdVectorPrinter:
365
 
     "Print a std::vector"
366
 
 
367
 
-    class _iterator:
368
 
+    class _iterator(Iterator):
369
 
         def __init__ (self, start, finish, bitvec):
370
 
             self.bitvec = bitvec
371
 
             if bitvec:
372
 
@@ -198,7 +242,7 @@
373
 
         def __iter__(self):
374
 
             return self
375
 
 
376
 
-        def next(self):
377
 
+        def __next__(self):
378
 
             count = self.count
379
 
             self.count = self.count + 1
380
 
             if self.bitvec:
381
 
@@ -265,7 +309,7 @@
382
 
 class StdTuplePrinter:
383
 
     "Print a std::tuple"
384
 
 
385
 
-    class _iterator:
386
 
+    class _iterator(Iterator):
387
 
         def __init__ (self, head):
388
 
             self.head = head
389
 
 
390
 
@@ -276,13 +320,13 @@
391
 
                 # Set the actual head to the first pair.
392
 
                 self.head  = self.head.cast (nodes[0].type)
393
 
             elif len (nodes) != 0:
394
 
-                raise ValueError, "Top of tuple tree does not consist of a single node."
395
 
+                raise ValueError("Top of tuple tree does not consist of a single node.")
396
 
             self.count = 0
397
 
 
398
 
         def __iter__ (self):
399
 
             return self
400
 
 
401
 
-        def next (self):
402
 
+        def __next__ (self):
403
 
             nodes = self.head.type.fields ()
404
 
             # Check for further recursions in the inheritance tree.
405
 
             if len (nodes) == 0:
406
 
@@ -289,7 +333,7 @@
407
 
                 raise StopIteration
408
 
             # Check that this iteration has an expected structure.
409
 
             if len (nodes) != 2:
410
 
-                raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
411
 
+                raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
412
 
 
413
 
             # - Left node is the next recursion parent.
414
 
             # - Right node is the actual class contained in the tuple.
415
 
@@ -341,7 +385,7 @@
416
 
             return self.visualizer.display_hint ()
417
 
         return None
418
 
 
419
 
-class RbtreeIterator:
420
 
+class RbtreeIterator(Iterator):
421
 
     def __init__(self, rbtree):
422
 
         self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
423
 
         self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
424
 
@@ -353,7 +397,7 @@
425
 
     def __len__(self):
426
 
         return int (self.size)
427
 
 
428
 
-    def next(self):
429
 
+    def __next__(self):
430
 
         if self.count == self.size:
431
 
             raise StopIteration
432
 
         result = self.node
433
 
@@ -405,7 +449,7 @@
434
 
     "Print a std::map or std::multimap"
435
 
 
436
 
     # Turn an RbtreeIterator into a pretty-print iterator.
437
 
-    class _iter:
438
 
+    class _iter(Iterator):
439
 
         def __init__(self, rbiter, type):
440
 
             self.rbiter = rbiter
441
 
             self.count = 0
442
 
@@ -414,9 +458,9 @@
443
 
         def __iter__(self):
444
 
             return self
445
 
 
446
 
-        def next(self):
447
 
+        def __next__(self):
448
 
             if self.count % 2 == 0:
449
 
-                n = self.rbiter.next()
450
 
+                n = next(self.rbiter)
451
 
                 n = n.cast(self.type).dereference()['_M_value_field']
452
 
                 self.pair = n
453
 
                 item = n['first']
454
 
@@ -447,7 +491,7 @@
455
 
     "Print a std::set or std::multiset"
456
 
 
457
 
     # Turn an RbtreeIterator into a pretty-print iterator.
458
 
-    class _iter:
459
 
+    class _iter(Iterator):
460
 
         def __init__(self, rbiter, type):
461
 
             self.rbiter = rbiter
462
 
             self.count = 0
463
 
@@ -456,8 +500,8 @@
464
 
         def __iter__(self):
465
 
             return self
466
 
 
467
 
-        def next(self):
468
 
-            item = self.rbiter.next()
469
 
+        def __next__(self):
470
 
+            item = next(self.rbiter)
471
 
             item = item.cast(self.type).dereference()['_M_value_field']
472
 
             # FIXME: this is weird ... what to do?
473
 
             # Maybe a 'set' display hint?
474
 
@@ -522,7 +566,7 @@
475
 
 class StdDequePrinter:
476
 
     "Print a std::deque"
477
 
 
478
 
-    class _iter:
479
 
+    class _iter(Iterator):
480
 
         def __init__(self, node, start, end, last, buffer_size):
481
 
             self.node = node
482
 
             self.p = start
483
 
@@ -534,7 +578,7 @@
484
 
         def __iter__(self):
485
 
             return self
486
 
 
487
 
-        def next(self):
488
 
+        def __next__(self):
489
 
             if self.p == self.last:
490
 
                 raise StopIteration
491
 
 
492
 
@@ -619,7 +663,7 @@
493
 
     def display_hint (self):
494
 
         return 'string'
495
 
 
496
 
-class Tr1HashtableIterator:
497
 
+class Tr1HashtableIterator(Iterator):
498
 
     def __init__ (self, hash):
499
 
         self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
500
 
         self.node_type = find_type(hash.type, '__node_type').pointer()
501
 
@@ -627,7 +671,7 @@
502
 
     def __iter__ (self):
503
 
         return self
504
 
 
505
 
-    def next (self):
506
 
+    def __next__ (self):
507
 
         if self.node == 0:
508
 
             raise StopIteration
509
 
         node = self.node.cast(self.node_type)
510
 
@@ -655,8 +699,8 @@
511
 
         return '[%d]' % i
512
 
 
513
 
     def children (self):
514
 
-        counter = itertools.imap (self.format_count, itertools.count())
515
 
-        return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
516
 
+        counter = imap (self.format_count, itertools.count())
517
 
+        return izip (counter, Tr1HashtableIterator (self.hashtable()))
518
 
 
519
 
 class Tr1UnorderedMapPrinter:
520
 
     "Print a tr1::unordered_map"
521
 
@@ -688,11 +732,11 @@
522
 
         return '[%d]' % i
523
 
 
524
 
     def children (self):
525
 
-        counter = itertools.imap (self.format_count, itertools.count())
526
 
+        counter = imap (self.format_count, itertools.count())
527
 
         # Map over the hash table and flatten the result.
528
 
-        data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
529
 
+        data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
530
 
         # Zip the two iterators together.
531
 
-        return itertools.izip (counter, data)
532
 
+        return izip (counter, data)
533
 
 
534
 
     def display_hint (self):
535
 
         return 'map'
536
 
@@ -700,7 +744,7 @@
537
 
 class StdForwardListPrinter:
538
 
     "Print a std::forward_list"
539
 
 
540
 
-    class _iterator:
541
 
+    class _iterator(Iterator):
542
 
         def __init__(self, nodetype, head):
543
 
             self.nodetype = nodetype
544
 
             self.base = head['_M_next']
545
 
@@ -709,7 +753,7 @@
546
 
         def __iter__(self):
547
 
             return self
548
 
 
549
 
-        def next(self):
550
 
+        def __next__(self):
551
 
             if self.base == 0:
552
 
                 raise StopIteration
553
 
             elt = self.base.cast(self.nodetype).dereference()
554
 
@@ -764,7 +808,7 @@
555
 
         # A small sanity check.
556
 
         # FIXME
557
 
         if not self.compiled_rx.match(name + '<>'):
558
 
-            raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
559
 
+            raise ValueError('libstdc++ programming error: "%s" does not match' % name)
560
 
         printer = RxPrinter(name, function)
561
 
         self.subprinters.append(printer)
562
 
         self.lookup[name] = printer
563
 
Index: libstdc++-v3/scripts/run_doxygen
564
 
===================================================================
565
 
--- a/src/libstdc++-v3/scripts/run_doxygen      (.../tags/gcc_4_8_3_release)
566
 
+++ b/src/libstdc++-v3/scripts/run_doxygen      (.../branches/gcc-4_8-branch)
567
 
@@ -193,8 +193,15 @@
568
 
 if $do_latex; then
569
 
     cd ${outdir}/${mode}
570
 
 
571
 
-    # Also drop in the header file and style sheet
572
 
-    doxygen -w latex header.tex doxygen.sty
573
 
+    # Grrr, Doxygen 1.8.x changed the -w latex options.
574
 
+    need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
575
 
+
576
 
+    # Also drop in the header file (maybe footer file) and style sheet
577
 
+    if $need_footer; then
578
 
+      doxygen -w latex header.tex footer.tex doxygen.sty
579
 
+    else
580
 
+      doxygen -w latex header.tex doxygen.sty
581
 
+    fi
582
 
     
583
 
     echo ::
584
 
     echo :: LaTeX pages begin with
585
 
Index: libstdc++-v3/configure.host
586
 
===================================================================
587
 
--- a/src/libstdc++-v3/configure.host   (.../tags/gcc_4_8_3_release)
588
 
+++ b/src/libstdc++-v3/configure.host   (.../branches/gcc-4_8-branch)
589
 
@@ -219,7 +219,6 @@
590
 
     os_include_dir="os/aix"
591
 
     atomicity_dir="os/aix"
592
 
     atomic_word_dir="os/aix"
593
 
-    OPT_LDFLAGS="-Wl,-G"
594
 
     ;;
595
 
   aix4.*)
596
 
     os_include_dir="os/generic"
597
 
Index: libstdc++-v3/doc/xml/manual/containers.xml
598
 
===================================================================
599
 
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../tags/gcc_4_8_3_release)
600
 
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../branches/gcc-4_8-branch)
601
 
@@ -25,8 +25,9 @@
602
 
   <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
603
 
     
604
 
    <para>
605
 
-     Yes it is, and that's okay.  This is a decision that we preserved
606
 
-     when we imported SGI's STL implementation.  The following is
607
 
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
608
 
+     In future GCC will change it to O(1) but O(N) was a decision that we
609
 
+     preserved when we imported SGI's STL implementation.  The following is
610
 
      quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
611
 
    </para>
612
 
    <blockquote>
613
 
@@ -72,26 +73,6 @@
614
 
   </section>
615
 
 </section>
616
 
 
617
 
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
618
 
-<?dbhtml filename="vector.html"?>
619
 
-  
620
 
-  <para>
621
 
-  </para>
622
 
-  <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
623
 
-    
624
 
-   <para>
625
 
-     In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
626
 
-     message to the list</link>, Daniel Kostecky announced work on an
627
 
-     alternate form of <code>std::vector</code> that would support
628
 
-     hints on the number of elements to be over-allocated.  The design
629
 
-     was also described, along with possible implementation choices.
630
 
-   </para>
631
 
-   <para>
632
 
-     The first two alpha releases were announced <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</link>
633
 
-     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
634
 
-   </para>
635
 
-
636
 
-  </section></section>
637
 
 </section>
638
 
 
639
 
 <!-- Sect1 02 : Associative -->
640
 
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
641
 
===================================================================
642
 
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../tags/gcc_4_8_3_release)
643
 
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../branches/gcc-4_8-branch)
644
 
@@ -226,10 +226,12 @@
645
 
       <entry/>
646
 
     </row>
647
 
     <row>
648
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
649
 
       <entry>18.8.6</entry>
650
 
       <entry><code>nested_exception</code></entry>
651
 
-      <entry>Y</entry>
652
 
-      <entry/>
653
 
+      <entry>Partial</entry>
654
 
+      <entry>Follows an earlier C++0x draft, not the final specification.
655
 
+      </entry>
656
 
     </row>
657
 
     <row>
658
 
       <entry>18.9</entry>
659
 
@@ -612,10 +614,11 @@
660
 
       <entry/>
661
 
     </row>
662
 
     <row>
663
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
664
 
       <entry>20.6.12.4</entry>
665
 
       <entry><code>uninitialized_fill_n</code></entry>
666
 
-      <entry>Y</entry>
667
 
-      <entry/>
668
 
+      <entry>Partial</entry>
669
 
+      <entry>Returns <code>void</code>.</entry>
670
 
     </row>
671
 
     <row>
672
 
       <entry>20.6.13</entry>
673
 
@@ -1119,10 +1122,13 @@
674
 
       <entry/>
675
 
     </row>
676
 
     <row>
677
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
678
 
       <entry>21.4</entry>
679
 
       <entry>Class template <code>basic_string</code></entry>
680
 
-      <entry>Y</entry>
681
 
-      <entry/>
682
 
+      <entry>Partial</entry>
683
 
+      <entry>Non-conforming Copy-On-Write implementation.
684
 
+             Missing <code>getline</code> overloads for rvalue streams.
685
 
+      </entry>
686
 
     </row>
687
 
     <row>
688
 
       <entry>21.5</entry>
689
 
@@ -1190,10 +1196,11 @@
690
 
       <entry/>
691
 
     </row>
692
 
     <row>
693
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
694
 
       <entry>22.3.3.1</entry>
695
 
       <entry>Character classification</entry>
696
 
-      <entry>Y</entry>
697
 
-      <entry/>
698
 
+      <entry>Partial</entry>
699
 
+      <entry>Missing <code>isblank</code>.</entry>
700
 
     </row>
701
 
     <row>
702
 
       <entry>22.3.3.2</entry>
703
 
@@ -1272,16 +1279,18 @@
704
 
       <entry/>
705
 
     </row>
706
 
     <row>
707
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
708
 
       <entry>22.4.5.1</entry>
709
 
       <entry>Class template <code>time_get</code></entry>
710
 
-      <entry>Y</entry>
711
 
-      <entry/>
712
 
+      <entry>Partial</entry>
713
 
+      <entry>Missing <code>get</code> and <code>do_get</code></entry>
714
 
     </row>
715
 
     <row>
716
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
717
 
       <entry>22.4.5.2</entry>
718
 
       <entry>Class template <code>time_get_byname</code></entry>
719
 
-      <entry>Y</entry>
720
 
-      <entry/>
721
 
+      <entry>Partial</entry>
722
 
+      <entry>Likewise</entry>
723
 
     </row>
724
 
     <row>
725
 
       <entry>22.4.5.3</entry>
726
 
@@ -1434,8 +1443,10 @@
727
 
       <entry>23.3.5</entry>
728
 
       <entry>Class template <code>list</code></entry>
729
 
       <entry>Partial</entry>
730
 
-      <entry><code>insert</code> and <code>erase</code> members do not
731
 
-             take <code>const_iterator</code> arguments (N2350).</entry>
732
 
+      <entry>O(N) size.
733
 
+             <code>insert</code> and <code>erase</code> members do not
734
 
+             take <code>const_iterator</code> arguments (N2350).
735
 
+      </entry>
736
 
     </row>
737
 
     <row>
738
 
       <?dbhtml bgcolor="#B0B0B0" ?>
739
 
@@ -1650,10 +1661,11 @@
740
 
       <entry/>
741
 
     </row>
742
 
     <row>
743
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
744
 
       <entry>25.3</entry>
745
 
       <entry>Mutating sequence operations</entry>
746
 
-      <entry>Y</entry>
747
 
-      <entry/>
748
 
+      <entry>Partial</entry>
749
 
+      <entry><code>rotate</code> returns <code>void</code>.</entry>
750
 
     </row>
751
 
     <row>
752
 
       <entry>25.4</entry>
753
 
@@ -2060,10 +2072,13 @@
754
 
       <entry/>
755
 
     </row>
756
 
     <row>
757
 
+      <?dbhtml bgcolor="#B0B0B0" ?>
758
 
       <entry>26.8</entry>
759
 
       <entry>C Library</entry>
760
 
-      <entry>Y</entry>
761
 
-      <entry/>
762
 
+      <entry>Partial</entry>
763
 
+      <entry><code>&lt;ctgmath&gt;</code> doesn't include
764
 
+       <code>&lt;ccomplex&gt;</code>
765
 
+      </entry>
766
 
     </row>
767
 
     <row>
768
 
       <entry>
769
 
@@ -2143,6 +2158,7 @@
770
 
         Missing move and swap operations on <code>basic_ios</code>.
771
 
         Missing <code>io_errc</code> and <code>iostream_category</code>.
772
 
         <code>ios_base::failure</code> is not derived from <code>system_error</code>.
773
 
+       Missing <code>ios_base::hexfloat</code>.
774
 
       </entry>
775
 
     </row>
776
 
     <row>
777
 
Index: libstdc++-v3/doc/html/index.html
778
 
===================================================================
779
 
--- a/src/libstdc++-v3/doc/html/index.html      (.../tags/gcc_4_8_3_release)
780
 
+++ b/src/libstdc++-v3/doc/html/index.html      (.../branches/gcc-4_8-branch)
781
 
@@ -43,7 +43,7 @@
782
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9. 
783
 
   Containers
784
 
   
785
 
-</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="manual/containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10. 
786
 
+</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10. 
787
 
   Iterators
788
 
   
789
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/algorithms.html">11. 
790
 
@@ -162,4 +162,4 @@
791
 
   
792
 
 </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D. 
793
 
     <acronym class="acronym">GNU</acronym> General Public License version 3
794
 
-  </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
795
 
\ No newline at end of file
796
 
+  </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
797
 
Index: libstdc++-v3/doc/html/manual/status.html
798
 
===================================================================
799
 
--- a/src/libstdc++-v3/doc/html/manual/status.html      (.../tags/gcc_4_8_3_release)
800
 
+++ b/src/libstdc++-v3/doc/html/manual/status.html      (.../branches/gcc-4_8-branch)
801
 
@@ -165,7 +165,8 @@
802
 
              <code class="code">set_new_handler</code> is not thread-safe.
803
 
       </td></tr><tr><td align="left">18.7</td><td align="left">Type identification</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.7.1</td><td align="left">Class type_info</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.2</td><td align="left">Class bad_cast</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.3</td><td align="left">Class bad_typeid</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8</td><td align="left">Exception handling</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.8.1</td><td align="left">Class exception</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.2</td><td align="left">Class bad_exception</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.3</td><td align="left">Abnormal termination</td><td align="left">Partial</td><td align="left">Missing <code class="code">get_terminate</code>.
804
 
              <code class="code">set_terminate</code> is not thread-safe.
805
 
-      </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
806
 
+      </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Partial</td><td align="left">Follows an earlier C++0x draft, not the final specification.
807
 
+      </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
808
 
        <span class="emphasis"><em>19</em></span>
809
 
       </td><td colspan="3" align="left">
810
 
        <span class="emphasis"><em>Diagnostics</em></span>
811
 
@@ -173,7 +174,7 @@
812
 
        <span class="emphasis"><em>20</em></span>
813
 
       </td><td colspan="3" align="left">
814
 
        <span class="emphasis"><em>General utilities</em></span>
815
 
-      </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.4</td><td align="left">Pointer safety</td><td align="left">Partial</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">20.6.5</td><td align="left">Align</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.10</td><td align="left">Raw storage iterator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.11</td><td align="left">Temporary buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12</td><td align="left">Specialized algorithms</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.12.1</td><td align="left"><code class="code">addressof</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.2</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.3</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.4</td><td align="left"><code class="code">uninitialized_fill_n</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.13</td><td align="left">C library</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.7.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">
816
 
+      </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.4</td><td align="left">Pointer safety</td><td align="left">Partial</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">20.6.5</td><td align="left">Align</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.10</td><td align="left">Raw storage iterator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.11</td><td align="left">Temporary buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12</td><td align="left">Specialized algorithms</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.12.1</td><td align="left"><code class="code">addressof</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.2</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.3</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.12.4</td><td align="left"><code class="code">uninitialized_fill_n</code></td><td align="left">Partial</td><td align="left">Returns <code class="code">void</code>.</td></tr><tr><td align="left">20.6.13</td><td align="left">C library</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.7.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">
817
 
        <p>
818
 
          Uses code from
819
 
          <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
820
 
@@ -187,14 +188,16 @@
821
 
        <span class="emphasis"><em>21</em></span>
822
 
       </td><td colspan="3" align="left">
823
 
        <span class="emphasis"><em>Strings</em></span>
824
 
-      </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits&lt;char&gt;</code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.2</td><td align="left">struct <code class="code">char_traits&lt;char16_t&gt;</code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">21.2.3.3</td><td align="left">struct <code class="code">char_traits&lt;char32_t&gt;</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3.4</td><td align="left">struct <code class="code">char_traits&lt;wchar_t&gt;</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.3</td><td align="left">String classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.4</td><td align="left">Class template <code class="code">basic_string</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
825
 
+      </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits&lt;char&gt;</code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.2</td><td align="left">struct <code class="code">char_traits&lt;char16_t&gt;</code></td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">21.2.3.3</td><td align="left">struct <code class="code">char_traits&lt;char32_t&gt;</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3.4</td><td align="left">struct <code class="code">char_traits&lt;wchar_t&gt;</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.3</td><td align="left">String classes</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.4</td><td align="left">Class template <code class="code">basic_string</code></td><td align="left">Partial</td><td align="left">Non-conforming Copy-On-Write implementation.
826
 
+             Missing <code class="code">getline</code> overloads for rvalue streams.
827
 
+      </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
828
 
       Missing <code class="filename">&lt;cuchar&gt;</code>
829
 
       </td></tr><tr><td align="left">
830
 
        <span class="emphasis"><em>22</em></span>
831
 
       </td><td colspan="3" align="left">
832
 
        <span class="emphasis"><em>Localization</em></span>
833
 
-      </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code">&lt;locale&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3</td><td align="left">Locales</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.3.1</td><td align="left">Class <code class="code">locale</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3.2</td><td align="left"><code class="code">locale</code> globals</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3.3</td><td align="left">Convenience interfaces</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.3.3.1</td><td align="left">Character classification</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3.3.2</td><td align="left">Conversions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.3.3.2.1</td><td align="left">Character conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.2</td><td align="left"><code class="code">string</code> conversions</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.3</td><td align="left">Buffer conversions</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">22.4</td><td align="left">Standard <code class="code">locale</code> categories</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.1</td><td align="left">The <code class="code">ctype</code> category</td><td align="left">Partial</td><td align="left">Missing <code class="code">codecvt&lt;char16_t&gt;</code> and
834
 
-             <code class="code">codecvt&lt;char32_t&gt;</code></td></tr><tr><td align="left">22.4.2</td><td align="left">The numeric category</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.4.2.1</td><td align="left"><code class="code">num_get</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.2.2</td><td align="left"><code class="code">num_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.3</td><td align="left">The numeric punctuation facet</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.4</td><td align="left">The collate category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5</td><td align="left">The time category</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.4.5.1</td><td align="left">Class template <code class="code">time_get</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5.2</td><td align="left">Class template <code class="code">time_get_byname</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put_byname</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6</td><td align="left">The monetary category</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.4.6.1</td><td align="left">Class template <code class="code">money_get</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.2</td><td align="left">Class template <code class="code">money_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.3</td><td align="left">Class template <code class="code">money_punct</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.4</td><td align="left">Class template <code class="code">money_punct_byname</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.7</td><td align="left">The message retrieval category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.8</td><td align="left">Program-defined facets</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.5</td><td align="left">Standard code conversion facets</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">22.6</td><td align="left">C Library Locales</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
835
 
+      </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code">&lt;locale&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3</td><td align="left">Locales</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.3.1</td><td align="left">Class <code class="code">locale</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3.2</td><td align="left"><code class="code">locale</code> globals</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3.3</td><td align="left">Convenience interfaces</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.3.3.1</td><td align="left">Character classification</td><td align="left">Partial</td><td align="left">Missing <code class="code">isblank</code>.</td></tr><tr><td align="left">22.3.3.2</td><td align="left">Conversions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.3.3.2.1</td><td align="left">Character conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.2</td><td align="left"><code class="code">string</code> conversions</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.3.3.2.3</td><td align="left">Buffer conversions</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">22.4</td><td align="left">Standard <code class="code">locale</code> categories</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.1</td><td align="left">The <code class="code">ctype</code> category</td><td align="left">Partial</td><td align="left">Missing <code class="code">codecvt&lt;char16_t&gt;</code> and
836
 
+             <code class="code">codecvt&lt;char32_t&gt;</code></td></tr><tr><td align="left">22.4.2</td><td align="left">The numeric category</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.4.2.1</td><td align="left"><code class="code">num_get</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.2.2</td><td align="left"><code class="code">num_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.3</td><td align="left">The numeric punctuation facet</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.4</td><td align="left">The collate category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5</td><td align="left">The time category</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.5.1</td><td align="left">Class template <code class="code">time_get</code></td><td align="left">Partial</td><td align="left">Missing <code class="code">get</code> and <code class="code">do_get</code></td></tr><tr bgcolor="#B0B0B0"><td align="left">22.4.5.2</td><td align="left">Class template <code class="code">time_get_byname</code></td><td align="left">Partial</td><td align="left">Likewise</td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.5.3</td><td align="left">Class template <code class="code">time_put_byname</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6</td><td align="left">The monetary category</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.4.6.1</td><td align="left">Class template <code class="code">money_get</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.2</td><td align="left">Class template <code class="code">money_put</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.3</td><td align="left">Class template <code class="code">money_punct</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.6.4</td><td align="left">Class template <code class="code">money_punct_byname</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.7</td><td align="left">The message retrieval category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4.8</td><td align="left">Program-defined facets</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">22.5</td><td align="left">Standard code conversion facets</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">22.6</td><td align="left">C Library Locales</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
837
 
        <span class="emphasis"><em>23</em></span>
838
 
       </td><td colspan="3" align="left">
839
 
        <span class="emphasis"><em>Containers</em></span>
840
 
@@ -201,8 +204,10 @@
841
 
       </td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Container requirements</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.2.1</td><td align="left">General container requirements</td><td align="left">Partial</td><td align="left">Only <code class="code">vector</code> and <code class="code">forward_list</code>
842
 
              meet the requirements
843
 
              relating to allocator use and propagation.</td></tr><tr><td align="left">23.2.2</td><td align="left">Container data races</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.3</td><td align="left">Sequence containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.4</td><td align="left">Associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.5</td><td align="left">Unordered associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3</td><td align="left">Sequence containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.3.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.3</td><td align="left">Class template <code class="code">deque</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
844
 
-             take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
845
 
-             take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
846
 
+             take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left">O(N) size.
847
 
+             <code class="code">insert</code> and <code class="code">erase</code> members do not
848
 
+             take <code class="code">const_iterator</code> arguments (N2350).
849
 
+      </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
850
 
              take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.7</td><td align="left">Class <code class="code">vector&lt;bool&gt;</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
851
 
              take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.4</td><td align="left">Associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.5</td><td align="left">Class template <code class="code">multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.6</td><td align="left">Class template <code class="code">set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.7</td><td align="left">Class template <code class="code">multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Unordered associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.5.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.5</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.6</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.7</td><td align="left">Class template <code class="code">unordered_multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left">Container adaptors</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.6.1</td><td align="left">Class template <code class="code">queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.2</td><td align="left">Class template <code class="code">priority_queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.3</td><td align="left">Class template <code class="code">stack</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
852
 
        <span class="emphasis"><em>24</em></span>
853
 
@@ -212,11 +217,13 @@
854
 
        <span class="emphasis"><em>25</em></span>
855
 
       </td><td colspan="3" align="left">
856
 
        <span class="emphasis"><em>Algorithms</em></span>
857
 
-      </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
858
 
+      </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Partial</td><td align="left"><code class="code">rotate</code> returns <code class="code">void</code>.</td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
859
 
       <span class="emphasis"><em>26</em></span>
860
 
       </td><td colspan="3" align="left">
861
 
        <span class="emphasis"><em>Numerics</em></span>
862
 
-      </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.3</td><td align="left">Random number engine class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4</td><td align="left">Random number engine adaptor class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.4.2</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.3</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.4</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.7</td><td align="left">Utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8</td><td align="left">Random number distribution class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.2</td><td align="left">Uniform distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.2.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.2.2</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3</td><td align="left">Bernoulli distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4</td><td align="left">Poisson distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5</td><td align="left">Normal distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6</td><td align="left">Sampling distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.2</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.3</td><td align="left">Class template <code class="code">piecewise_linear_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6</td><td align="left">Numeric arrays</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.6.1</td><td align="left">Header <code class="code">&lt;valarray&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.2</td><td align="left">Class template <code class="code">valarray</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.3</td><td align="left"><code class="code">valarray</code> non-member operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.4</td><td align="left">Class <code class="code">slice</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.5</td><td align="left">Class template <code class="code">slice_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.6</td><td align="left">The <code class="code">gslice</code> class</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.7</td><td align="left">Class template <code class="code">gslice_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.8</td><td align="left">Class template <code class="code">mask_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.9</td><td align="left">Class template <code class="code">indirect_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.10</td><td align="left"><code class="code">valarray</code> range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7</td><td align="left">Generalized numeric operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.7.1</td><td align="left">Header <code class="code">&lt;numeric&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.2</td><td align="left"><code class="code">accumulate</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.3</td><td align="left"><code class="code">inner_product</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.4</td><td align="left"><code class="code">partial_sum</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.5</td><td align="left"><code class="code">adjacent_difference</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.6</td><td align="left">iota</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.8</td><td align="left">C Library</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
863
 
+      </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.3</td><td align="left">Random number engine class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4</td><td align="left">Random number engine adaptor class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.4.2</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.3</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.4.4</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">Y</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5.7</td><td align="left">Utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8</td><td align="left">Random number distribution class templates</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.2</td><td align="left">Uniform distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.2.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.2.2</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3</td><td align="left">Bernoulli distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.3.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4</td><td align="left">Poisson distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.4.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5</td><td align="left">Normal distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.5.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6</td><td align="left">Sampling distributions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.2</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.8.6.3</td><td align="left">Class template <code class="code">piecewise_linear_distribution</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6</td><td align="left">Numeric arrays</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.6.1</td><td align="left">Header <code class="code">&lt;valarray&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.2</td><td align="left">Class template <code class="code">valarray</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.3</td><td align="left"><code class="code">valarray</code> non-member operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.4</td><td align="left">Class <code class="code">slice</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.5</td><td align="left">Class template <code class="code">slice_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.6</td><td align="left">The <code class="code">gslice</code> class</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.7</td><td align="left">Class template <code class="code">gslice_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.8</td><td align="left">Class template <code class="code">mask_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.9</td><td align="left">Class template <code class="code">indirect_array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6.10</td><td align="left"><code class="code">valarray</code> range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7</td><td align="left">Generalized numeric operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.7.1</td><td align="left">Header <code class="code">&lt;numeric&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.2</td><td align="left"><code class="code">accumulate</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.3</td><td align="left"><code class="code">inner_product</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.4</td><td align="left"><code class="code">partial_sum</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.5</td><td align="left"><code class="code">adjacent_difference</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7.6</td><td align="left">iota</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">26.8</td><td align="left">C Library</td><td align="left">Partial</td><td align="left"><code class="code">&lt;ctgmath&gt;</code> doesn't include
864
 
+       <code class="code">&lt;ccomplex&gt;</code>
865
 
+      </td></tr><tr><td align="left">
866
 
        <span class="emphasis"><em>27</em></span>
867
 
       </td><td colspan="3" align="left">
868
 
        <span class="emphasis"><em>Input/output library</em></span>
869
 
@@ -224,6 +231,7 @@
870
 
         Missing move and swap operations on <code class="code">basic_ios</code>.
871
 
         Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
872
 
         <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
873
 
+       Missing <code class="code">ios_base::hexfloat</code>.
874
 
       </td></tr><tr><td align="left">27.6</td><td align="left">Stream buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">27.7</td><td align="left">Formatting and manipulators</td><td align="left">Partial</td><td align="left">
875
 
         Missing move and swap operations
876
 
         Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
877
 
Index: libstdc++-v3/doc/html/manual/abi.html
878
 
===================================================================
879
 
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
880
 
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
881
 
@@ -96,7 +96,7 @@
882
 
    definitions, where the version definition is the maximum for a
883
 
    particular release. Labels are cumulative. If a particular release
884
 
    is not listed, it has the same version labels as the preceding
885
 
-   release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li></ul></div></li><li class="listitem"><p>
886
 
+   release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li><li class="listitem"><p>GCC 4.8.0: GCC_4.8.0</p></li></ul></div></li><li class="listitem"><p>
887
 
        Release versioning on the libstdc++.so binary, implemented in
888
 
        the same way as the libgcc_s.so binary above. Listed is the
889
 
        filename: <code class="constant">DT_SONAME</code> can be deduced from
890
 
@@ -111,7 +111,7 @@
891
 
        has the same filename and <code class="constant">DT_SONAME</code> as the
892
 
        preceding release.
893
 
       </p><p>It is versioned as follows:
894
 
-    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li></ul></div><p>
895
 
+    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li><li class="listitem"><p>GCC 4.8.3: libstdc++.so.6.0.19</p></li></ul></div><p>
896
 
       Note 1: Error should be libstdc++.so.3.0.3.
897
 
     </p><p>
898
 
       Note 2: Not strictly required.
899
 
@@ -129,7 +129,7 @@
900
 
    GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
901
 
    release.) If a particular release is not listed, it has the same
902
 
    version labels as the preceding release.
903
 
-   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
904
 
+   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li><li class="listitem"><p>GCC 4.8.3: GLIBCXX_3.4.19, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
905
 
     __GXX_ABI_VERSION. This macro is defined as the version of the
906
 
     compiler v3 ABI, with g++ 3.0 being version 100. This macro will
907
 
     be automatically defined whenever g++ is used (the curious can
908
 
Index: libstdc++-v3/doc/html/manual/std_contents.html
909
 
===================================================================
910
 
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../tags/gcc_4_8_3_release)
911
 
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../branches/gcc-4_8-branch)
912
 
@@ -21,7 +21,7 @@
913
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. 
914
 
   Containers
915
 
   
916
 
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. 
917
 
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. 
918
 
   Iterators
919
 
   
920
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11. 
921
 
@@ -42,4 +42,4 @@
922
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. 
923
 
   Support
924
 
   
925
 
-</td></tr></table></div></body></html>
926
 
\ No newline at end of file
927
 
+</td></tr></table></div></body></html>
928
 
Index: libstdc++-v3/doc/html/manual/containers.html
929
 
===================================================================
930
 
--- a/src/libstdc++-v3/doc/html/manual/containers.html  (.../tags/gcc_4_8_3_release)
931
 
+++ b/src/libstdc++-v3/doc/html/manual/containers.html  (.../branches/gcc-4_8-branch)
932
 
@@ -7,9 +7,10 @@
933
 
   </th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"></a>Chapter 9. 
934
 
   Containers
935
 
   <a id="idm269999493408" class="indexterm"></a>
936
 
-</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
937
 
-     Yes it is, and that's okay.  This is a decision that we preserved
938
 
-     when we imported SGI's STL implementation.  The following is
939
 
+</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
940
 
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
941
 
+     In future GCC will change it to O(1) but O(N) was a decision that we
942
 
+     preserved when we imported SGI's STL implementation.  The following is
943
 
      quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
944
 
    </p><div class="blockquote"><blockquote class="blockquote"><p>
945
 
        The size() member function, for list and slist, takes time
946
 
@@ -41,14 +42,4 @@
947
 
         </p><pre class="programlisting">
948
 
         if (L.empty())
949
 
             ...
950
 
-        </pre></blockquote></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.vector"></a>vector</h3></div></div></div><p>
951
 
-  </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p>
952
 
-     In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
953
 
-     message to the list</a>, Daniel Kostecky announced work on an
954
 
-     alternate form of <code class="code">std::vector</code> that would support
955
 
-     hints on the number of elements to be over-allocated.  The design
956
 
-     was also described, along with possible implementation choices.
957
 
-   </p><p>
958
 
-     The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
959
 
-     and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
960
 
-   </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
961
 
\ No newline at end of file
962
 
+        </pre></blockquote></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
963
 
Index: libstdc++-v3/doc/html/manual/index.html
964
 
===================================================================
965
 
--- a/src/libstdc++-v3/doc/html/manual/index.html       (.../tags/gcc_4_8_3_release)
966
 
+++ b/src/libstdc++-v3/doc/html/manual/index.html       (.../branches/gcc-4_8-branch)
967
 
@@ -24,7 +24,7 @@
968
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. 
969
 
   Containers
970
 
   
971
 
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. 
972
 
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. 
973
 
   Iterators
974
 
   
975
 
 </a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11. 
976
 
@@ -160,4 +160,4 @@
977
 
              </a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. 
978
 
   Introduction
979
 
   
980
 
-</td></tr></table></div></body></html>
981
 
\ No newline at end of file
982
 
+</td></tr></table></div></body></html>
983
 
Index: libstdc++-v3/include/std/tuple
984
 
===================================================================
985
 
--- a/src/libstdc++-v3/include/std/tuple        (.../tags/gcc_4_8_3_release)
986
 
+++ b/src/libstdc++-v3/include/std/tuple        (.../branches/gcc-4_8-branch)
987
 
@@ -88,21 +88,22 @@
988
 
       constexpr _Head_base(const _Head& __h)
989
 
       : _Head(__h) { }
990
 
 
991
 
-      template<typename _UHead, typename = typename
992
 
-              enable_if<!is_convertible<_UHead,
993
 
-                                        __uses_alloc_base>::value>::type>
994
 
+      constexpr _Head_base(const _Head_base&) = default;
995
 
+      constexpr _Head_base(_Head_base&&) = default;
996
 
+
997
 
+      template<typename _UHead>
998
 
         constexpr _Head_base(_UHead&& __h)
999
 
        : _Head(std::forward<_UHead>(__h)) { }
1000
 
 
1001
 
-      _Head_base(__uses_alloc0)
1002
 
+      _Head_base(allocator_arg_t, __uses_alloc0)
1003
 
       : _Head() { }
1004
 
 
1005
 
       template<typename _Alloc>
1006
 
-       _Head_base(__uses_alloc1<_Alloc> __a)
1007
 
+       _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
1008
 
        : _Head(allocator_arg, *__a._M_a) { }
1009
 
 
1010
 
       template<typename _Alloc>
1011
 
-       _Head_base(__uses_alloc2<_Alloc> __a)
1012
 
+       _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
1013
 
        : _Head(*__a._M_a) { }
1014
 
 
1015
 
       template<typename _UHead>
1016
 
@@ -133,21 +134,22 @@
1017
 
       constexpr _Head_base(const _Head& __h)
1018
 
       : _M_head_impl(__h) { }
1019
 
 
1020
 
-      template<typename _UHead, typename = typename
1021
 
-              enable_if<!is_convertible<_UHead,
1022
 
-                                        __uses_alloc_base>::value>::type>
1023
 
+      constexpr _Head_base(const _Head_base&) = default;
1024
 
+      constexpr _Head_base(_Head_base&&) = default;
1025
 
+
1026
 
+      template<typename _UHead>
1027
 
         constexpr _Head_base(_UHead&& __h)
1028
 
        : _M_head_impl(std::forward<_UHead>(__h)) { }
1029
 
 
1030
 
-      _Head_base(__uses_alloc0)
1031
 
+      _Head_base(allocator_arg_t, __uses_alloc0)
1032
 
       : _M_head_impl() { }
1033
 
 
1034
 
       template<typename _Alloc>
1035
 
-       _Head_base(__uses_alloc1<_Alloc> __a)
1036
 
+       _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
1037
 
        : _M_head_impl(allocator_arg, *__a._M_a) { }
1038
 
 
1039
 
       template<typename _Alloc>
1040
 
-       _Head_base(__uses_alloc2<_Alloc> __a)
1041
 
+       _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
1042
 
        : _M_head_impl(*__a._M_a) { }
1043
 
 
1044
 
       template<typename _UHead>
1045
 
@@ -285,7 +287,7 @@
1046
 
       template<typename _Alloc>
1047
 
        _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a)
1048
 
        : _Inherited(__tag, __a),
1049
 
-          _Base(__use_alloc<_Head>(__a)) { }
1050
 
+          _Base(__tag, __use_alloc<_Head>(__a)) { }
1051
 
 
1052
 
       template<typename _Alloc>
1053
 
        _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
1054
 
Index: libstdc++-v3/include/std/future
1055
 
===================================================================
1056
 
--- a/src/libstdc++-v3/include/std/future       (.../tags/gcc_4_8_3_release)
1057
 
+++ b/src/libstdc++-v3/include/std/future       (.../branches/gcc-4_8-branch)
1058
 
@@ -351,12 +351,14 @@
1059
 
       void
1060
 
       _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
1061
 
       {
1062
 
-        bool __set = __ignore_failure;
1063
 
+        bool __set = false;
1064
 
         // all calls to this function are serialized,
1065
 
         // side-effects of invoking __res only happen once
1066
 
         call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
1067
 
             ref(__set));
1068
 
-        if (!__set)
1069
 
+       if (__set)
1070
 
+         _M_cond.notify_all();
1071
 
+       else if (!__ignore_failure)
1072
 
           __throw_future_error(int(future_errc::promise_already_satisfied));
1073
 
       }
1074
 
 
1075
 
@@ -471,7 +473,6 @@
1076
 
           lock_guard<mutex> __lock(_M_mutex);
1077
 
           _M_result.swap(__res);
1078
 
         }
1079
 
-        _M_cond.notify_all();
1080
 
         __set = true;
1081
 
       }
1082
 
 
1083
 
@@ -983,22 +984,25 @@
1084
 
       void
1085
 
       set_value(const _Res& __r)
1086
 
       {
1087
 
+       auto __future = _M_future;
1088
 
         auto __setter = _State::__setter(this, __r);
1089
 
-        _M_future->_M_set_result(std::move(__setter));
1090
 
+        __future->_M_set_result(std::move(__setter));
1091
 
       }
1092
 
 
1093
 
       void
1094
 
       set_value(_Res&& __r)
1095
 
       {
1096
 
+       auto __future = _M_future;
1097
 
         auto __setter = _State::__setter(this, std::move(__r));
1098
 
-        _M_future->_M_set_result(std::move(__setter));
1099
 
+        __future->_M_set_result(std::move(__setter));
1100
 
       }
1101
 
 
1102
 
       void
1103
 
       set_exception(exception_ptr __p)
1104
 
       {
1105
 
+       auto __future = _M_future;
1106
 
         auto __setter = _State::__setter(__p, this);
1107
 
-        _M_future->_M_set_result(std::move(__setter));
1108
 
+        __future->_M_set_result(std::move(__setter));
1109
 
       }
1110
 
     };
1111
 
 
1112
 
@@ -1081,15 +1085,17 @@
1113
 
       void
1114
 
       set_value(_Res& __r)
1115
 
       {
1116
 
+       auto __future = _M_future;
1117
 
         auto __setter = _State::__setter(this, __r);
1118
 
-        _M_future->_M_set_result(std::move(__setter));
1119
 
+        __future->_M_set_result(std::move(__setter));
1120
 
       }
1121
 
 
1122
 
       void
1123
 
       set_exception(exception_ptr __p)
1124
 
       {
1125
 
+       auto __future = _M_future;
1126
 
         auto __setter = _State::__setter(__p, this);
1127
 
-        _M_future->_M_set_result(std::move(__setter));
1128
 
+        __future->_M_set_result(std::move(__setter));
1129
 
       }
1130
 
     };
1131
 
 
1132
 
@@ -1166,8 +1172,9 @@
1133
 
       void
1134
 
       set_exception(exception_ptr __p)
1135
 
       {
1136
 
+       auto __future = _M_future;
1137
 
         auto __setter = _State::__setter(__p, this);
1138
 
-        _M_future->_M_set_result(std::move(__setter));
1139
 
+        __future->_M_set_result(std::move(__setter));
1140
 
       }
1141
 
     };
1142
 
 
1143
 
@@ -1193,8 +1200,9 @@
1144
 
   inline void
1145
 
   promise<void>::set_value()
1146
 
   {
1147
 
+    auto __future = _M_future;
1148
 
     auto __setter = _State::__setter(this);
1149
 
-    _M_future->_M_set_result(std::move(__setter));
1150
 
+    __future->_M_set_result(std::move(__setter));
1151
 
   }
1152
 
 
1153
 
 
1154
 
Index: libstdc++-v3/include/std/functional
1155
 
===================================================================
1156
 
--- a/src/libstdc++-v3/include/std/functional   (.../tags/gcc_4_8_3_release)
1157
 
+++ b/src/libstdc++-v3/include/std/functional   (.../branches/gcc-4_8-branch)
1158
 
@@ -2439,9 +2439,9 @@
1159
 
     {
1160
 
       if (static_cast<bool>(__x))
1161
 
        {
1162
 
+         __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1163
 
          _M_invoker = __x._M_invoker;
1164
 
          _M_manager = __x._M_manager;
1165
 
-         __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1166
 
        }
1167
 
     }
1168
 
 
1169
 
Index: libstdc++-v3/include/ext/rope
1170
 
===================================================================
1171
 
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
1172
 
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
1173
 
@@ -1544,7 +1544,7 @@
1174
 
       typedef typename _Base::allocator_type allocator_type;
1175
 
       using _Base::_M_tree_ptr;
1176
 
       using _Base::get_allocator;
1177
 
-      using _Base::_M_get_allocator;      
1178
 
+      using _Base::_M_get_allocator;
1179
 
       typedef __GC_CONST _CharT* _Cstrptr;
1180
 
       
1181
 
       static _CharT _S_empty_c_str[1];
1182
 
@@ -1876,8 +1876,9 @@
1183
 
           const allocator_type& __a = allocator_type())
1184
 
       : _Base(__a)
1185
 
       {
1186
 
-       this->_M_tree_ptr = (0 == __len) ?
1187
 
-         0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
1188
 
+       this->_M_tree_ptr = (0 == __len)
1189
 
+         ? 0
1190
 
+         : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
1191
 
       }
1192
 
 
1193
 
       rope(const rope& __x, const allocator_type& __a = allocator_type())
1194
 
Index: libstdc++-v3/include/bits/stl_algo.h
1195
 
===================================================================
1196
 
--- a/src/libstdc++-v3/include/bits/stl_algo.h  (.../tags/gcc_4_8_3_release)
1197
 
+++ b/src/libstdc++-v3/include/bits/stl_algo.h  (.../branches/gcc-4_8-branch)
1198
 
@@ -5193,7 +5193,12 @@
1199
 
 
1200
 
       if (__first != __last)
1201
 
        for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
1202
 
-         std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
1203
 
+         {
1204
 
+           _RandomAccessIterator __j = __first
1205
 
+                                       + std::rand() % ((__i - __first) + 1);
1206
 
+           if (__i != __j)
1207
 
+             std::iter_swap(__i, __j);
1208
 
+         }
1209
 
     }
1210
 
 
1211
 
   /**
1212
 
@@ -5227,7 +5232,11 @@
1213
 
       if (__first == __last)
1214
 
        return;
1215
 
       for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
1216
 
-       std::iter_swap(__i, __first + __rand((__i - __first) + 1));
1217
 
+       {
1218
 
+         _RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
1219
 
+         if (__i != __j)
1220
 
+           std::iter_swap(__i, __j);
1221
 
+       }
1222
 
     }
1223
 
 
1224
 
 
1225
 
Index: libstdc++-v3/include/bits/stl_tree.h
1226
 
===================================================================
1227
 
--- a/src/libstdc++-v3/include/bits/stl_tree.h  (.../tags/gcc_4_8_3_release)
1228
 
+++ b/src/libstdc++-v3/include/bits/stl_tree.h  (.../branches/gcc-4_8-branch)
1229
 
@@ -510,11 +510,11 @@
1230
 
 
1231
 
       _Link_type
1232
 
       _M_end()
1233
 
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
1234
 
+      { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
1235
 
 
1236
 
       _Const_Link_type
1237
 
       _M_end() const
1238
 
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1239
 
+      { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1240
 
 
1241
 
       static const_reference
1242
 
       _S_value(_Const_Link_type __x)
1243
 
Index: libstdc++-v3/include/tr1/functional
1244
 
===================================================================
1245
 
--- a/src/libstdc++-v3/include/tr1/functional   (.../tags/gcc_4_8_3_release)
1246
 
+++ b/src/libstdc++-v3/include/tr1/functional   (.../branches/gcc-4_8-branch)
1247
 
@@ -2112,9 +2112,9 @@
1248
 
     {
1249
 
       if (static_cast<bool>(__x))
1250
 
        {
1251
 
+         __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1252
 
          _M_invoker = __x._M_invoker;
1253
 
          _M_manager = __x._M_manager;
1254
 
-         __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1255
 
        }
1256
 
     }
1257
 
 
1258
 
@@ -2130,9 +2130,9 @@
1259
 
 
1260
 
        if (_My_handler::_M_not_empty_function(__f))
1261
 
          {
1262
 
+           _My_handler::_M_init_functor(_M_functor, __f);
1263
 
            _M_invoker = &_My_handler::_M_invoke;
1264
 
            _M_manager = &_My_handler::_M_manager;
1265
 
-           _My_handler::_M_init_functor(_M_functor, __f);
1266
 
          }
1267
 
       }
1268
 
 
1269
 
Index: libstdc++-v3/include/tr2/bool_set
1270
 
===================================================================
1271
 
--- a/src/libstdc++-v3/include/tr2/bool_set     (.../tags/gcc_4_8_3_release)
1272
 
+++ b/src/libstdc++-v3/include/tr2/bool_set     (.../branches/gcc-4_8-branch)
1273
 
@@ -44,7 +44,7 @@
1274
 
    *  bool_set
1275
 
    *
1276
 
    *  See N2136, Bool_set: multi-valued logic
1277
 
-   *  by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
1278
 
+   *  by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
1279
 
    *
1280
 
    *  The implicit conversion to bool is slippery!  I may use the new
1281
 
    *  explicit conversion.  This has been specialized in the language
1282
 
Index: libstdc++-v3/ChangeLog
1283
 
===================================================================
1284
 
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_8_3_release)
1285
 
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_8-branch)
1286
 
@@ -1,3 +1,134 @@
1287
 
+2014-12-06  Jonathan Wakely  <jwakely@redhat.com>
1288
 
+
1289
 
+       PR libstdc++/63840
1290
 
+       * include/std/functional (function::function(const function&)): Set
1291
 
+       _M_manager after operations that might throw.
1292
 
+       * include/tr1/functional (function::function(const function&),
1293
 
+       function::function(_Functor, _Useless)): Likewise.
1294
 
+       * testsuite/20_util/function/63840.cc: New.
1295
 
+       * testsuite/tr1/3_function_objects/function/63840.cc: New.
1296
 
+
1297
 
+       PR libstdc++/61947
1298
 
+       * include/std/tuple (_Head_base): Use allocator_arg_t parameters to
1299
 
+       disambiguate unary constructors.
1300
 
+       (_Tuple_impl): Pass allocator_arg_t arguments.
1301
 
+       * testsuite/20_util/tuple/61947.cc: New.
1302
 
+       * testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error line.
1303
 
+
1304
 
+       PR libstdc++/59603
1305
 
+       * include/bits/stl_algo.h (random_shuffle): Prevent self-swapping.
1306
 
+       * testsuite/25_algorithms/random_shuffle/59603.cc: New.
1307
 
+
1308
 
+2014-11-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1309
 
+
1310
 
+       Backport from mainline
1311
 
+       2014-09-10  Tony Wang  <tony.wang@arm.com>
1312
 
+
1313
 
+       PR target/56846
1314
 
+       * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
1315
 
+       Return with CONTINUE_UNWINDING when the state pattern
1316
 
+       contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1317
 
+
1318
 
+2014-11-05  David Edelsohn  <dje.gcc@gmail.com>
1319
 
+
1320
 
+       Backported from mainline.
1321
 
+       2014-10-30  David Edelsohn  <dje.gcc@gmail.com>
1322
 
+
1323
 
+       * configure.host (aix4.3+, 5+): Do not use -G in link command.
1324
 
+
1325
 
+2014-10-15  Jason Merrill  <jason@redhat.com>
1326
 
+
1327
 
+       * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
1328
 
+       dynamic_cast more gracefully.
1329
 
+
1330
 
+2014-10-14  Kai Tietz  <ktietz@redhat.com>
1331
 
+
1332
 
+       PR libstdc++/57440
1333
 
+       * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
1334
 
+       Define to avoid leak.
1335
 
+       * config/os/mingw32-w64/os_defines.h: Likewise.
1336
 
+
1337
 
+2014-10-03  Jonathan Wakely  <jwakely@redhat.com>
1338
 
+
1339
 
+       PR libstdc++/63449
1340
 
+       * doc/xml/manual/containers.xml: Remove outdated section. Update
1341
 
+       std::list notes.
1342
 
+       * doc/html/*: Regenerate.
1343
 
+
1344
 
+2014-10-01  Jonathan Wakely  <jwakely@redhat.com>
1345
 
+
1346
 
+       * doc/xml/manual/status_cxx2011.xml: Corrections.
1347
 
+       * doc/html/manual/status.html: Regenerate.
1348
 
+
1349
 
+2014-08-28  Samuel Bronson  <naesten@gmail.com>
1350
 
+
1351
 
+       Backport r212453 from trunk
1352
 
+       2014-07-11  Samuel Bronson  <naesten@gmail.com>
1353
 
+                   Matthias Klose  <doko@ubuntu.com>
1354
 
+
1355
 
+       PR libstdc++/58962
1356
 
+       * python/libstdcxx/v6/printers.py: Port to Python 2+3
1357
 
+       (imap): New compat function.
1358
 
+       (izip): Likewise.
1359
 
+       (Iterator): New mixin to allow writing iterators in Python 3 style
1360
 
+       regardless of which version we're running on.
1361
 
+       [Python3] (long) New compat alias for "int".
1362
 
+       * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
1363
 
+
1364
 
+       Backport r210625 from trunk
1365
 
+       2014-05-19  Jonathan Wakely  <jwakely@redhat.com>
1366
 
+
1367
 
+       * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
1368
 
+
1369
 
+2014-08-26  John David Anglin  <danglin@gcc.gnu.org>
1370
 
+
1371
 
+       * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1372
 
+
1373
 
+2014-08-26  Jonathan Wakely  <jwakely@redhat.com>
1374
 
+
1375
 
+       * doc/xml/manual/status_cxx2011.xml: Correct status table.
1376
 
+       * doc/html/manual/*: Regenerate.
1377
 
+
1378
 
+2014-08-04  Jonathan Wakely  <jwakely@redhat.com>
1379
 
+
1380
 
+       Backported from mainline
1381
 
+       2014-07-29  Jonathan Wakely  <jwakely@redhat.com>
1382
 
+
1383
 
+       PR libstdc++/61946
1384
 
+       * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
1385
 
+       const allocator_type&)): Pass non-const allocator to
1386
 
+       _S_new_RopeFunction.
1387
 
+       * testsuite/ext/rope/61946.cc: New.
1388
 
+
1389
 
+2014-08-04  Zifei Tong  <zifeitong@gmail.com>
1390
 
+
1391
 
+       * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
1392
 
+       _GLIBCXX_ prefix to macro.
1393
 
+
1394
 
+2014-06-03  Jonathan Wakely  <jwakely@redhat.com>
1395
 
+
1396
 
+       Backport from mainline
1397
 
+       2014-04-15  Jonathan Wakely  <jwakely@redhat.com>
1398
 
+
1399
 
+       PR libstdc++/60734
1400
 
+       * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
1401
 
+
1402
 
+       Backport from mainline
1403
 
+       2014-05-16  Jonathan Wakely  <jwakely@redhat.com>
1404
 
+
1405
 
+       PR libstdc++/60966
1406
 
+       * include/std/future (__future_base::_State_baseV2::_M_set_result):
1407
 
+       Signal condition variable after call_once returns.
1408
 
+       (__future_base::_State_baseV2::_M_do_set): Do not signal here.
1409
 
+       (promise::set_value, promise::set_exception): Increment the reference
1410
 
+       count on the shared state until the function returns.
1411
 
+       * testsuite/30_threads/promise/60966.cc: New.
1412
 
+
1413
 
+2014-05-29  Jonathan Wakely  <jwakely@redhat.com>
1414
 
+
1415
 
+       * include/tr2/bool_set: Use UTF-8 for accented characters.
1416
 
+       * scripts/run_doxygen: Handle Doxygen 1.8.x change.
1417
 
+
1418
 
 2014-05-22  Release Manager
1419
 
 
1420
 
        * GCC 4.8.3 released.
1421
 
Index: libstdc++-v3/libsupc++/atexit_thread.cc
1422
 
===================================================================
1423
 
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../tags/gcc_4_8_3_release)
1424
 
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../branches/gcc-4_8-branch)
1425
 
@@ -26,7 +26,7 @@
1426
 
 #include <new>
1427
 
 #include "bits/gthr.h"
1428
 
 
1429
 
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
1430
 
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
1431
 
 
1432
 
 extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
1433
 
                                         void *arg, void *d);
1434
 
@@ -38,7 +38,7 @@
1435
 
   return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
1436
 
 }
1437
 
 
1438
 
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1439
 
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1440
 
 
1441
 
 namespace {
1442
 
   // One element in a singly-linked stack of cleanups.
1443
 
@@ -142,4 +142,4 @@
1444
 
   return 0;
1445
 
 }
1446
 
 
1447
 
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1448
 
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1449
 
Index: libstdc++-v3/libsupc++/eh_personality.cc
1450
 
===================================================================
1451
 
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../tags/gcc_4_8_3_release)
1452
 
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../branches/gcc-4_8-branch)
1453
 
@@ -378,6 +378,12 @@
1454
 
   switch (state & _US_ACTION_MASK)
1455
 
     {
1456
 
     case _US_VIRTUAL_UNWIND_FRAME:
1457
 
+      // If the unwind state pattern is
1458
 
+      // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1459
 
+      // then we don't need to search for any handler as it is not a real
1460
 
+      // exception. Just unwind the stack.
1461
 
+      if (state & _US_FORCE_UNWIND)
1462
 
+       CONTINUE_UNWINDING;
1463
 
       actions = _UA_SEARCH_PHASE;
1464
 
       break;
1465
 
 
1466
 
Index: libstdc++-v3/libsupc++/dyncast.cc
1467
 
===================================================================
1468
 
--- a/src/libstdc++-v3/libsupc++/dyncast.cc     (.../tags/gcc_4_8_3_release)
1469
 
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc     (.../branches/gcc-4_8-branch)
1470
 
@@ -55,6 +55,18 @@
1471
 
       adjust_pointer <void> (src_ptr, prefix->whole_object);
1472
 
   const __class_type_info *whole_type = prefix->whole_type;
1473
 
   __class_type_info::__dyncast_result result;
1474
 
+
1475
 
+  // If the whole object vptr doesn't refer to the whole object type, we're
1476
 
+  // in the middle of constructing a primary base, and src is a separate
1477
 
+  // base.  This has undefined behavior and we can't find anything outside
1478
 
+  // of the base we're actually constructing, so fail now rather than
1479
 
+  // segfault later trying to use a vbase offset that doesn't exist.
1480
 
+  const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
1481
 
+  const vtable_prefix *whole_prefix =
1482
 
+    adjust_pointer <vtable_prefix> (whole_vtable,
1483
 
+                                   -offsetof (vtable_prefix, origin));
1484
 
+  if (whole_prefix->whole_type != whole_type)
1485
 
+    return NULL;
1486
 
   
1487
 
   whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
1488
 
                             dst_type, whole_ptr, src_type, src_ptr, result);
1489
 
Index: libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc
1490
 
===================================================================
1491
 
--- a/src/libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc  (.../tags/gcc_4_8_3_release)
1492
 
+++ b/src/libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc  (.../branches/gcc-4_8-branch)
1493
 
@@ -0,0 +1,34 @@
1494
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1495
 
+//
1496
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1497
 
+// software; you can redistribute it and/or modify it under the
1498
 
+// terms of the GNU General Public License as published by the
1499
 
+// Free Software Foundation; either version 3, or (at your option)
1500
 
+// any later version.
1501
 
+
1502
 
+// This library is distributed in the hope that it will be useful,
1503
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1504
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1505
 
+// GNU General Public License for more details.
1506
 
+
1507
 
+// You should have received a copy of the GNU General Public License along
1508
 
+// with this library; see the file COPYING3.  If not see
1509
 
+// <http://www.gnu.org/licenses/>.
1510
 
+
1511
 
+// { dg-options "-std=gnu++11" }
1512
 
+// { dg-require-debug-mode "" }
1513
 
+
1514
 
+// libstdc++/59603
1515
 
+
1516
 
+#include <algorithm>
1517
 
+#include <vector>
1518
 
+
1519
 
+struct C {
1520
 
+    std::vector<int> v;
1521
 
+    C (int a) : v{a} {};
1522
 
+};
1523
 
+
1524
 
+int main () {
1525
 
+    std::vector<C> cs { {1}, {2}, {3}, {4} };
1526
 
+    std::random_shuffle(cs.begin(), cs.end());
1527
 
+}
1528
 
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1529
 
===================================================================
1530
 
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../tags/gcc_4_8_3_release)
1531
 
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../branches/gcc-4_8-branch)
1532
 
@@ -0,0 +1,67 @@
1533
 
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1534
 
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1535
 
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1536
 
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1537
 
+// { dg-require-cstdint "" }
1538
 
+// { dg-require-gthreads "" }
1539
 
+// { dg-require-atomic-builtins "" }
1540
 
+
1541
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1542
 
+//
1543
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1544
 
+// software; you can redistribute it and/or modify it under the
1545
 
+// terms of the GNU General Public License as published by the
1546
 
+// Free Software Foundation; either version 3, or (at your option)
1547
 
+// any later version.
1548
 
+
1549
 
+// This library is distributed in the hope that it will be useful,
1550
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1551
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1552
 
+// GNU General Public License for more details.
1553
 
+
1554
 
+// You should have received a copy of the GNU General Public License along
1555
 
+// with this library; see the file COPYING3.  If not see
1556
 
+// <http://www.gnu.org/licenses/>.
1557
 
+
1558
 
+// libstdc++/60966
1559
 
+// This test hangs if std::promise::~promise() destroys the
1560
 
+// shared state before std::promise::set_value() finishes using it.
1561
 
+
1562
 
+#include <future>
1563
 
+#include <thread>
1564
 
+#include <vector>
1565
 
+
1566
 
+const int THREADS = 10;
1567
 
+
1568
 
+void run_task(std::promise<void>* pr)
1569
 
+{
1570
 
+  std::this_thread::sleep_for(std::chrono::milliseconds(100));
1571
 
+  pr->set_value();
1572
 
+}
1573
 
+
1574
 
+int main()
1575
 
+{
1576
 
+  std::vector<std::promise<void>*> tasks(THREADS);
1577
 
+  std::vector<std::thread> threads(THREADS);
1578
 
+  std::vector<std::future<void>> futures(THREADS);
1579
 
+
1580
 
+  for (int i = 0; i < THREADS; ++i)
1581
 
+  {
1582
 
+    std::promise<void>* task = new std::promise<void>;
1583
 
+    tasks[i] = task;
1584
 
+    futures[i] = task->get_future();
1585
 
+    threads[i] = std::thread(run_task, task);
1586
 
+  }
1587
 
+
1588
 
+  for (int i = 0; i < THREADS; ++i)
1589
 
+  {
1590
 
+    // the temporary future releases the state as soon as wait() returns
1591
 
+    std::future<void>(std::move(futures[i])).wait();
1592
 
+    // state is ready, should now be safe to delete promise, so it
1593
 
+    // releases the shared state too
1594
 
+    delete tasks[i];
1595
 
+  }
1596
 
+
1597
 
+  for (auto& t : threads)
1598
 
+    t.join();
1599
 
+}
1600
 
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1601
 
===================================================================
1602
 
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../tags/gcc_4_8_3_release)
1603
 
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../branches/gcc-4_8-branch)
1604
 
@@ -0,0 +1,31 @@
1605
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1606
 
+//
1607
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1608
 
+// software; you can redistribute it and/or modify it under the
1609
 
+// terms of the GNU General Public License as published by the
1610
 
+// Free Software Foundation; either version 3, or (at your option)
1611
 
+// any later version.
1612
 
+
1613
 
+// This library is distributed in the hope that it will be useful,
1614
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1615
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1616
 
+// GNU General Public License for more details.
1617
 
+
1618
 
+// You should have received a copy of the GNU General Public License along
1619
 
+// with this library; see the file COPYING3.  If not see
1620
 
+// <http://www.gnu.org/licenses/>.
1621
 
+
1622
 
+// { dg-do compile }
1623
 
+
1624
 
+#include <ext/rope>
1625
 
+
1626
 
+struct empty_char_prod : __gnu_cxx::char_producer<char>
1627
 
+{
1628
 
+  virtual void operator()(size_t, size_t, char*) {}
1629
 
+};
1630
 
+
1631
 
+int main ()
1632
 
+{
1633
 
+  empty_char_prod* ecp = new empty_char_prod;
1634
 
+  __gnu_cxx::crope excrope( ecp, 10L, true );
1635
 
+}
1636
 
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1637
 
===================================================================
1638
 
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../tags/gcc_4_8_3_release)
1639
 
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../branches/gcc-4_8-branch)
1640
 
@@ -91,7 +91,7 @@
1641
 
        }
1642
 
     }
1643
 
 
1644
 
-    set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1645
 
+    set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1646
 
                           "\\\[\\\]"]
1647
 
     if {!$do_whatis_tests} {
1648
 
        send_log "skipping 'whatis' tests - gdb too old"
1649
 
@@ -252,6 +252,6 @@
1650
 
 # but not earlier versions.
1651
 
 # Return 1 if the version is ok, 0 otherwise.
1652
 
 proc gdb_version_check {} {
1653
 
-    return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1654
 
+    return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1655
 
              "<built-in function lookup_global_symbol>"]
1656
 
 }
1657
 
Index: libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc
1658
 
===================================================================
1659
 
--- a/src/libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc       (.../tags/gcc_4_8_3_release)
1660
 
+++ b/src/libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc       (.../branches/gcc-4_8-branch)
1661
 
@@ -0,0 +1,55 @@
1662
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1663
 
+//
1664
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1665
 
+// software; you can redistribute it and/or modify it under the
1666
 
+// terms of the GNU General Public License as published by the
1667
 
+// Free Software Foundation; either version 3, or (at your option)
1668
 
+// any later version.
1669
 
+
1670
 
+// This library is distributed in the hope that it will be useful,
1671
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1672
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1673
 
+// GNU General Public License for more details.
1674
 
+
1675
 
+// You should have received a copy of the GNU General Public License along
1676
 
+// with this library; see the file COPYING3.  If not see
1677
 
+// <http://www.gnu.org/licenses/>.
1678
 
+
1679
 
+#include <tr1/functional>
1680
 
+#include <stdexcept>
1681
 
+#include <testsuite_hooks.h>
1682
 
+
1683
 
+struct functor
1684
 
+{
1685
 
+  functor() : copies(0) { }
1686
 
+
1687
 
+  functor(const functor& f)
1688
 
+  : copies(f.copies + 1)
1689
 
+  {
1690
 
+    if (copies > 1)
1691
 
+      throw std::runtime_error("functor");
1692
 
+  }
1693
 
+
1694
 
+  void operator()() const { }
1695
 
+
1696
 
+  int copies;
1697
 
+};
1698
 
+
1699
 
+
1700
 
+void
1701
 
+test01()
1702
 
+{
1703
 
+  std::tr1::function<void()> f = functor();
1704
 
+  try {
1705
 
+    std::tr1::function<void()> g = f;
1706
 
+  } catch (const std::runtime_error& e) {
1707
 
+    return;
1708
 
+  }
1709
 
+  VERIFY(false);
1710
 
+}
1711
 
+
1712
 
+int
1713
 
+main()
1714
 
+{
1715
 
+  test01();
1716
 
+}
1717
 
Index: libstdc++-v3/testsuite/20_util/tuple/61947.cc
1718
 
===================================================================
1719
 
--- a/src/libstdc++-v3/testsuite/20_util/tuple/61947.cc (.../tags/gcc_4_8_3_release)
1720
 
+++ b/src/libstdc++-v3/testsuite/20_util/tuple/61947.cc (.../branches/gcc-4_8-branch)
1721
 
@@ -0,0 +1,29 @@
1722
 
+// { dg-options "-std=gnu++11" }
1723
 
+// { dg-do compile }
1724
 
+
1725
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1726
 
+//
1727
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1728
 
+// software; you can redistribute it and/or modify it under the
1729
 
+// terms of the GNU General Public License as published by the
1730
 
+// Free Software Foundation; either version 3, or (at your option)
1731
 
+// any later version.
1732
 
+
1733
 
+// This library is distributed in the hope that it will be useful,
1734
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1735
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1736
 
+// GNU General Public License for more details.
1737
 
+
1738
 
+// You should have received a copy of the GNU General Public License along
1739
 
+// with this library; see the file COPYING3.  If not see
1740
 
+// <http://www.gnu.org/licenses/>.
1741
 
+
1742
 
+#include <tuple>
1743
 
+
1744
 
+struct ConvertibleToAny {
1745
 
+  template <class T> operator T() const { return T(); }
1746
 
+};
1747
 
+
1748
 
+int main() {
1749
 
+  std::tuple<ConvertibleToAny&&> t(ConvertibleToAny{});
1750
 
+}
1751
 
Index: libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
1752
 
===================================================================
1753
 
--- a/src/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc     (.../tags/gcc_4_8_3_release)
1754
 
+++ b/src/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc     (.../branches/gcc-4_8-branch)
1755
 
@@ -44,4 +44,4 @@
1756
 
 
1757
 
   tuple<Type> t(allocator_arg, a, 1);
1758
 
 }
1759
 
-// { dg-error "no matching function" "" { target *-*-* } 118 }
1760
 
+// { dg-error "no matching function" "" { target *-*-* } 119 }
1761
 
Index: libstdc++-v3/testsuite/20_util/function/63840.cc
1762
 
===================================================================
1763
 
--- a/src/libstdc++-v3/testsuite/20_util/function/63840.cc      (.../tags/gcc_4_8_3_release)
1764
 
+++ b/src/libstdc++-v3/testsuite/20_util/function/63840.cc      (.../branches/gcc-4_8-branch)
1765
 
@@ -0,0 +1,55 @@
1766
 
+// Copyright (C) 2014 Free Software Foundation, Inc.
1767
 
+//
1768
 
+// This file is part of the GNU ISO C++ Library.  This library is free
1769
 
+// software; you can redistribute it and/or modify it under the
1770
 
+// terms of the GNU General Public License as published by the
1771
 
+// Free Software Foundation; either version 3, or (at your option)
1772
 
+// any later version.
1773
 
+
1774
 
+// This library is distributed in the hope that it will be useful,
1775
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1776
 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1777
 
+// GNU General Public License for more details.
1778
 
+
1779
 
+// You should have received a copy of the GNU General Public License along
1780
 
+// with this library; see the file COPYING3.  If not see
1781
 
+// <http://www.gnu.org/licenses/>.
1782
 
+
1783
 
+// { dg-options "-std=gnu++11" }
1784
 
+
1785
 
+#include <functional>
1786
 
+#include <stdexcept>
1787
 
+#include <testsuite_hooks.h>
1788
 
+
1789
 
+struct functor
1790
 
+{
1791
 
+  functor() = default;
1792
 
+
1793
 
+  functor(const functor&)
1794
 
+  {
1795
 
+    throw std::runtime_error("test");
1796
 
+  }
1797
 
+
1798
 
+  functor(functor&& f) = default;
1799
 
+
1800
 
+  void operator()() const { }
1801
 
+};
1802
 
+
1803
 
+
1804
 
+void
1805
 
+test01()
1806
 
+{
1807
 
+  std::function<void()> f = functor{};
1808
 
+  try {
1809
 
+    auto g = f;
1810
 
+  } catch (const std::runtime_error& e) {
1811
 
+    return;
1812
 
+  }
1813
 
+  VERIFY(false);
1814
 
+}
1815
 
+
1816
 
+int
1817
 
+main()
1818
 
+{
1819
 
+  test01();
1820
 
+}
1821
 
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
1822
 
===================================================================
1823
 
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../tags/gcc_4_8_3_release)
1824
 
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../branches/gcc-4_8-branch)
1825
 
@@ -78,4 +78,7 @@
1826
 
 #define _GLIBCXX_LLP64 1
1827
 
 #endif
1828
 
 
1829
 
+// See libstdc++/59807
1830
 
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1831
 
+
1832
 
 #endif
1833
 
Index: libstdc++-v3/config/os/mingw32/os_defines.h
1834
 
===================================================================
1835
 
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../tags/gcc_4_8_3_release)
1836
 
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../branches/gcc-4_8-branch)
1837
 
@@ -75,4 +75,7 @@
1838
 
 #define _GLIBCXX_LLP64 1
1839
 
 #endif
1840
 
 
1841
 
+// See libstdc++/59807
1842
 
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1843
 
+
1844
 
 #endif
1845
 
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1846
 
===================================================================
1847
 
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../tags/gcc_4_8_3_release)
1848
 
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../branches/gcc-4_8-branch)
1849
 
@@ -400,6 +400,7 @@
1850
 
 FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1851
 
 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1852
 
 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1853
 
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1854
 
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1855
 
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1856
 
 FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1857
 
@@ -587,6 +588,8 @@
1858
 
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1859
 
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1860
 
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1861
 
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1862
 
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1863
 
 FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1864
 
 FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1865
 
 FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1866
 
@@ -1204,6 +1207,7 @@
1867
 
 FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1868
 
 FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1869
 
 FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1870
 
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1871
 
 FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1872
 
 FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1873
 
 FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1874
 
@@ -1471,6 +1475,11 @@
1875
 
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1876
 
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1877
 
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1878
 
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1879
 
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1880
 
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1881
 
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1882
 
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1883
 
 FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1884
 
 FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1885
 
 FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1886
 
@@ -1900,6 +1909,8 @@
1887
 
 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1888
 
 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1889
 
 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1890
 
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1891
 
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1892
 
 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1893
 
 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1894
 
 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1895
 
@@ -2436,6 +2447,7 @@
1896
 
 FUNC:__cxa_guard_release@@CXXABI_1.3
1897
 
 FUNC:__cxa_pure_virtual@@CXXABI_1.3
1898
 
 FUNC:__cxa_rethrow@@CXXABI_1.3
1899
 
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1900
 
 FUNC:__cxa_throw@@CXXABI_1.3
1901
 
 FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1902
 
 FUNC:__cxa_vec_cctor@@CXXABI_1.3
1903
 
@@ -2482,6 +2494,7 @@
1904
 
 OBJECT:0:CXXABI_1.3.4
1905
 
 OBJECT:0:CXXABI_1.3.5
1906
 
 OBJECT:0:CXXABI_1.3.6
1907
 
+OBJECT:0:CXXABI_1.3.7
1908
 
 OBJECT:0:CXXABI_TM_1
1909
 
 OBJECT:0:GLIBCXX_3.4
1910
 
 OBJECT:0:GLIBCXX_3.4.1
1911
 
@@ -2493,6 +2506,8 @@
1912
 
 OBJECT:0:GLIBCXX_3.4.15
1913
 
 OBJECT:0:GLIBCXX_3.4.16
1914
 
 OBJECT:0:GLIBCXX_3.4.17
1915
 
+OBJECT:0:GLIBCXX_3.4.18
1916
 
+OBJECT:0:GLIBCXX_3.4.19
1917
 
 OBJECT:0:GLIBCXX_3.4.2
1918
 
 OBJECT:0:GLIBCXX_3.4.3
1919
 
 OBJECT:0:GLIBCXX_3.4.4
1920
 
@@ -2992,6 +3007,8 @@
1921
 
 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1922
 
 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1923
 
 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1924
 
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1925
 
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1926
 
 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1927
 
 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1928
 
 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1929
 
Index: configure.ac
1930
 
===================================================================
1931
 
--- a/src/configure.ac  (.../tags/gcc_4_8_3_release)
1932
 
+++ b/src/configure.ac  (.../branches/gcc-4_8-branch)
1933
 
@@ -1154,6 +1154,9 @@
1934
 
   *-mingw*)
1935
 
     host_makefile_frag="config/mh-mingw"
1936
 
     ;;
1937
 
+  alpha*-*-linux*)
1938
 
+    host_makefile_frag="config/mh-alpha-linux"
1939
 
+    ;;
1940
 
   hppa*-hp-hpux10*)
1941
 
     host_makefile_frag="config/mh-pa-hpux10"
1942
 
     ;;
1943
 
@@ -1632,6 +1635,9 @@
1944
 
     ISL_CHECK_VERSION(0,11)
1945
 
     if test "${gcc_cv_isl}" = no ; then
1946
 
       ISL_CHECK_VERSION(0,12)
1947
 
+      if test "${gcc_cv_isl}" = no ; then
1948
 
+        ISL_CHECK_VERSION(0,14)
1949
 
+      fi
1950
 
     fi
1951
 
   fi
1952
 
   dnl Only execute fail-action, if ISL has been requested.
1953
 
Index: ChangeLog
1954
 
===================================================================
1955
 
--- a/src/ChangeLog     (.../tags/gcc_4_8_3_release)
1956
 
+++ b/src/ChangeLog     (.../branches/gcc-4_8-branch)
1957
 
@@ -1,3 +1,19 @@
1958
 
+2014-12-08  Richard Biener  <rguenther@suse.de>
1959
 
+
1960
 
+       Backport from 4.9 branch
1961
 
+       2014-12-04  Tobias Burnus  <burnus@net-b.de>
1962
 
+
1963
 
+       * configure.ac: Permit also ISL 0.14 with CLooG.
1964
 
+       * Makefile.def: Make more dependent on mpfr, mpc, isl, and cloog.
1965
 
+       * Makefile.in: Regenerate.
1966
 
+       * configure: Regenerate.
1967
 
+
1968
 
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
1969
 
+
1970
 
+       PR target/47230
1971
 
+       * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1972
 
+       * configure: Regenerate.
1973
 
+
1974
 
 2014-05-22  Release Manager
1975
 
 
1976
 
        * GCC 4.8.3 released.
1977
 
Index: contrib/ChangeLog
1978
 
===================================================================
1979
 
--- a/src/contrib/ChangeLog     (.../tags/gcc_4_8_3_release)
1980
 
+++ b/src/contrib/ChangeLog     (.../branches/gcc-4_8-branch)
1981
 
@@ -1,3 +1,7 @@
1982
 
+2014-07-07  Richard Biener  <rguenther@suse.de>
1983
 
+
1984
 
+        * gennews: Use gcc-3.0/index.html.
1985
 
+
1986
 
 2014-05-22  Release Manager
1987
 
 
1988
 
        * GCC 4.8.3 released.
1989
 
Index: contrib/gennews
1990
 
===================================================================
1991
 
--- a/src/contrib/gennews       (.../tags/gcc_4_8_3_release)
1992
 
+++ b/src/contrib/gennews       (.../branches/gcc-4_8-branch)
1993
 
@@ -37,7 +37,7 @@
1994
 
     gcc-3.3/index.html gcc-3.3/changes.html
1995
 
     gcc-3.2/index.html gcc-3.2/changes.html
1996
 
     gcc-3.1/index.html gcc-3.1/changes.html
1997
 
-    gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1998
 
+    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1999
 
     gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
2000
 
     egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
2001
 
     egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
2002
 
Index: config/mh-alpha-linux
2003
 
===================================================================
2004
 
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
2005
 
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
2006
 
@@ -0,0 +1,3 @@
2007
 
+# Prevent GPREL16 relocation truncation
2008
 
+LDFLAGS += -Wl,--no-relax
2009
 
+BOOT_LDFLAGS += -Wl,--no-relax
2010
 
Index: config/ChangeLog
2011
 
===================================================================
2012
 
--- a/src/config/ChangeLog      (.../tags/gcc_4_8_3_release)
2013
 
+++ b/src/config/ChangeLog      (.../branches/gcc-4_8-branch)
2014
 
@@ -1,3 +1,8 @@
2015
 
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
2016
 
+
2017
 
+       PR target/47230
2018
 
+       * mh-alpha-linux: New file.
2019
 
+
2020
 
 2014-05-22  Release Manager
2021
 
 
2022
 
        * GCC 4.8.3 released.
2023
 
Index: libjava/classpath
2024
 
===================================================================
2025
 
--- a/src/libjava/classpath     (.../tags/gcc_4_8_3_release)
2026
 
+++ b/src/libjava/classpath     (.../branches/gcc-4_8-branch)
2027
 
 
2028
 
Property changes on: libjava/classpath
2029
 
___________________________________________________________________
2030
 
Modified: svn:mergeinfo
2031
 
   Merged /trunk/libjava/classpath:r211733,215049
2032
 
Index: configure
2033
 
===================================================================
2034
 
--- a/src/configure     (.../tags/gcc_4_8_3_release)
2035
 
+++ b/src/configure     (.../branches/gcc-4_8-branch)
2036
 
@@ -3834,6 +3834,9 @@
2037
 
   *-mingw*)
2038
 
     host_makefile_frag="config/mh-mingw"
2039
 
     ;;
2040
 
+  alpha*-*-linux*)
2041
 
+    host_makefile_frag="config/mh-alpha-linux"
2042
 
+    ;;
2043
 
   hppa*-hp-hpux10*)
2044
 
     host_makefile_frag="config/mh-pa-hpux10"
2045
 
     ;;
2046
 
@@ -5987,6 +5990,55 @@
2047
 
   fi
2048
 
 
2049
 
 
2050
 
+      if test "${gcc_cv_isl}" = no ; then
2051
 
+
2052
 
+  if test "${ENABLE_ISL_CHECK}" = yes ; then
2053
 
+    _isl_saved_CFLAGS=$CFLAGS
2054
 
+    _isl_saved_LDFLAGS=$LDFLAGS
2055
 
+    _isl_saved_LIBS=$LIBS
2056
 
+
2057
 
+    CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
2058
 
+    LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
2059
 
+    LIBS="${_isl_saved_LIBS} -lisl"
2060
 
+
2061
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.14 of ISL" >&5
2062
 
+$as_echo_n "checking for version 0.14 of ISL... " >&6; }
2063
 
+    if test "$cross_compiling" = yes; then :
2064
 
+  gcc_cv_isl=yes
2065
 
+else
2066
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067
 
+/* end confdefs.h.  */
2068
 
+#include <isl/version.h>
2069
 
+   #include <string.h>
2070
 
+int
2071
 
+main ()
2072
 
+{
2073
 
+if (strncmp (isl_version (), "isl-0.14", strlen ("isl-0.14")) != 0)
2074
 
+     return 1;
2075
 
+
2076
 
+  ;
2077
 
+  return 0;
2078
 
+}
2079
 
+_ACEOF
2080
 
+if ac_fn_c_try_run "$LINENO"; then :
2081
 
+  gcc_cv_isl=yes
2082
 
+else
2083
 
+  gcc_cv_isl=no
2084
 
+fi
2085
 
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2086
 
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
2087
 
+fi
2088
 
+
2089
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
2090
 
+$as_echo "$gcc_cv_isl" >&6; }
2091
 
+
2092
 
+    CFLAGS=$_isl_saved_CFLAGS
2093
 
+    LDFLAGS=$_isl_saved_LDFLAGS
2094
 
+    LIBS=$_isl_saved_LIBS
2095
 
+  fi
2096
 
+
2097
 
+
2098
 
+      fi
2099
 
     fi
2100
 
   fi
2101
 
 
2102
 
Index: libgcc/ChangeLog
2103
 
===================================================================
2104
 
--- a/src/libgcc/ChangeLog      (.../tags/gcc_4_8_3_release)
2105
 
+++ b/src/libgcc/ChangeLog      (.../branches/gcc-4_8-branch)
2106
 
@@ -1,3 +1,23 @@
2107
 
+2014-12-09  Oleg Endo  <olegendo@gcc.gnu.org>
2108
 
+
2109
 
+       Backport from mainline
2110
 
+       2014-11-30  Oleg Endo  <olegendo@gcc.gnu.org>
2111
 
+
2112
 
+       PR target/55351
2113
 
+       * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
2114
 
+       whether it's defined.
2115
 
+
2116
 
+2014-10-26  John David Anglin  <danglin@gcc.gnu.org>
2117
 
+
2118
 
+       * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
2119
 
+       (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
2120
 
+       memory read accesses are ok.
2121
 
+
2122
 
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
2123
 
+
2124
 
+       * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
2125
 
+       bits not set bits as indicating trapping exceptions.
2126
 
+
2127
 
 2014-05-22  Release Manager
2128
 
 
2129
 
        * GCC 4.8.3 released.
2130
 
Index: libgcc/config/i386/sfp-machine.h
2131
 
===================================================================
2132
 
--- a/src/libgcc/config/i386/sfp-machine.h      (.../tags/gcc_4_8_3_release)
2133
 
+++ b/src/libgcc/config/i386/sfp-machine.h      (.../branches/gcc-4_8-branch)
2134
 
@@ -59,7 +59,7 @@
2135
 
       __sfp_handle_exceptions (_fex);          \
2136
 
   } while (0);
2137
 
 
2138
 
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2139
 
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2140
 
 
2141
 
 #define FP_ROUNDMODE           (_fcw & FP_RND_MASK)
2142
 
 #endif
2143
 
Index: libgcc/config/sh/lib1funcs.S
2144
 
===================================================================
2145
 
--- a/src/libgcc/config/sh/lib1funcs.S  (.../tags/gcc_4_8_3_release)
2146
 
+++ b/src/libgcc/config/sh/lib1funcs.S  (.../branches/gcc-4_8-branch)
2147
 
@@ -1248,7 +1248,7 @@
2148
 
 #endif
2149
 
        ENDFUNC(GLOBAL(sdivsi3_2))
2150
 
 #endif
2151
 
-#elif defined __SHMEDIA__
2152
 
+#elif __SHMEDIA__
2153
 
 /* m5compact-nofpu */
2154
 
  // clobbered: r18,r19,r20,r21,r25,tr0,tr1,tr2
2155
 
        .mode   SHmedia
2156
 
@@ -1598,7 +1598,7 @@
2157
 
  add.l r18,r25,r0
2158
 
  blink tr0,r63
2159
 
 #endif
2160
 
-#elif defined (__SHMEDIA__)
2161
 
+#elif __SHMEDIA__
2162
 
 /* m5compact-nofpu - more emphasis on code size than on speed, but don't
2163
 
    ignore speed altogether - div1 needs 9 cycles, subc 7 and rotcl 4.
2164
 
    So use a short shmedia loop.  */
2165
 
@@ -1622,7 +1622,7 @@
2166
 
  bnei r25,-32,tr1
2167
 
  add.l r20,r63,r0
2168
 
  blink tr2,r63
2169
 
-#else /* ! defined (__SHMEDIA__) */
2170
 
+#else /* ! __SHMEDIA__ */
2171
 
 LOCAL(div8):
2172
 
  div1 r5,r4
2173
 
 LOCAL(div7):
2174
 
@@ -1688,7 +1688,7 @@
2175
 
 #endif /* L_udivsi3 */
2176
 
 
2177
 
 #ifdef L_udivdi3
2178
 
-#ifdef __SHMEDIA__
2179
 
+#if __SHMEDIA__
2180
 
        .mode   SHmedia
2181
 
        .section        .text..SHmedia32,"ax"
2182
 
        .align  2
2183
 
@@ -1816,7 +1816,7 @@
2184
 
 #endif /* L_udivdi3 */
2185
 
 
2186
 
 #ifdef L_divdi3
2187
 
-#ifdef __SHMEDIA__
2188
 
+#if __SHMEDIA__
2189
 
        .mode   SHmedia
2190
 
        .section        .text..SHmedia32,"ax"
2191
 
        .align  2
2192
 
@@ -1840,7 +1840,7 @@
2193
 
 #endif /* L_divdi3 */
2194
 
 
2195
 
 #ifdef L_umoddi3
2196
 
-#ifdef __SHMEDIA__
2197
 
+#if __SHMEDIA__
2198
 
        .mode   SHmedia
2199
 
        .section        .text..SHmedia32,"ax"
2200
 
        .align  2
2201
 
@@ -1969,7 +1969,7 @@
2202
 
 #endif /* L_umoddi3 */
2203
 
 
2204
 
 #ifdef L_moddi3
2205
 
-#ifdef __SHMEDIA__
2206
 
+#if __SHMEDIA__
2207
 
        .mode   SHmedia
2208
 
        .section        .text..SHmedia32,"ax"
2209
 
        .align  2
2210
 
@@ -3057,7 +3057,7 @@
2211
 
 
2212
 
 #ifdef L_div_table
2213
 
 #if __SH5__
2214
 
-#if defined(__pic__) && defined(__SHMEDIA__)
2215
 
+#if defined(__pic__) && __SHMEDIA__
2216
 
        .global GLOBAL(sdivsi3)
2217
 
        FUNC(GLOBAL(sdivsi3))
2218
 
 #if __SH5__ == 32
2219
 
@@ -3130,7 +3130,7 @@
2220
 
 #else /* ! __pic__ || ! __SHMEDIA__ */
2221
 
        .section        .rodata
2222
 
 #endif /* __pic__ */
2223
 
-#if defined(TEXT_DATA_BUG) && defined(__pic__) && defined(__SHMEDIA__)
2224
 
+#if defined(TEXT_DATA_BUG) && defined(__pic__) && __SHMEDIA__
2225
 
        .balign 2
2226
 
        .type   Local_div_table,@object
2227
 
        .size   Local_div_table,128
2228
 
Index: libgcc/config/pa/linux-unwind.h
2229
 
===================================================================
2230
 
--- a/src/libgcc/config/pa/linux-unwind.h       (.../tags/gcc_4_8_3_release)
2231
 
+++ b/src/libgcc/config/pa/linux-unwind.h       (.../branches/gcc-4_8-branch)
2232
 
@@ -32,6 +32,17 @@
2233
 
 #include <signal.h>
2234
 
 #include <sys/ucontext.h>
2235
 
 
2236
 
+/* Return TRUE if read access to *P is allowed.  */
2237
 
+
2238
 
+static inline long
2239
 
+pa32_read_access_ok (void *p)
2240
 
+{
2241
 
+  long ret;
2242
 
+
2243
 
+  __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
2244
 
+  return ret;
2245
 
+}
2246
 
+
2247
 
 /* Unfortunately, because of various bugs and changes to the kernel,
2248
 
    we have several cases to deal with.
2249
 
 
2250
 
@@ -48,8 +59,13 @@
2251
 
    tell us how to locate the sigcontext structure.
2252
 
 
2253
 
    Note that with a 2.4 64-bit kernel, the signal context is not properly
2254
 
-   passed back to userspace so the unwind will not work correctly.  */
2255
 
+   passed back to userspace so the unwind will not work correctly.
2256
 
 
2257
 
+   There is also a bug in various glibc versions.  The (CONTEXT)->ra
2258
 
+   for the outermost frame is not marked as undefined, so we need to
2259
 
+   check whether read access is allowed for all the accesses used in
2260
 
+   searching for the signal trampoline.  */
2261
 
+
2262
 
 #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
2263
 
 
2264
 
 static _Unwind_Reason_Code
2265
 
@@ -73,14 +89,17 @@
2266
 
      e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
2267
 
      08000240 nop  */
2268
 
 
2269
 
-  if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
2270
 
+  if (pa32_read_access_ok (pc)
2271
 
+      && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2272
 
     off = 4*4;
2273
 
-  else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
2274
 
+  else if (pa32_read_access_ok (&pc[4])
2275
 
+          && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
2276
 
     {
2277
 
       pc += 4;
2278
 
       off = 10 * 4;
2279
 
     }
2280
 
-  else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
2281
 
+  else if (pa32_read_access_ok (&pc[5])
2282
 
+          && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
2283
 
     {
2284
 
       pc += 5;
2285
 
       off = 10 * 4;
2286
 
@@ -96,13 +115,16 @@
2287
 
         word boundary and we can then determine the frame offset.  */
2288
 
       sp = (unsigned long)context->ra;
2289
 
       pc = (unsigned int *)sp;
2290
 
-      if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
2291
 
+      if ((sp & 4)
2292
 
+         && pa32_read_access_ok (pc)
2293
 
+         && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2294
 
        off = 5 * 4;
2295
 
       else
2296
 
        return _URC_END_OF_STACK;
2297
 
     }
2298
 
 
2299
 
-  if (pc[1] != 0x3414015a
2300
 
+  if (!pa32_read_access_ok (&pc[3])
2301
 
+      || pc[1] != 0x3414015a
2302
 
       || pc[2] != 0xe4008200
2303
 
       || pc[3] != 0x08000240)
2304
 
     return _URC_END_OF_STACK;
2305
 
Index: gcc/tree-ssa-tail-merge.c
2306
 
===================================================================
2307
 
--- a/src/gcc/tree-ssa-tail-merge.c     (.../tags/gcc_4_8_3_release)
2308
 
+++ b/src/gcc/tree-ssa-tail-merge.c     (.../branches/gcc-4_8-branch)
2309
 
@@ -298,7 +298,8 @@
2310
 
   def_operand_p def_p;
2311
 
 
2312
 
   if (gimple_has_side_effects (stmt)
2313
 
-      || gimple_vdef (stmt) != NULL_TREE)
2314
 
+      || gimple_vdef (stmt) != NULL_TREE
2315
 
+      || gimple_vuse (stmt) != NULL_TREE)
2316
 
     return false;
2317
 
 
2318
 
   def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
2319
 
@@ -1060,6 +1061,24 @@
2320
 
     gcc_unreachable ();
2321
 
 }
2322
 
 
2323
 
+/* Return true if gimple operands T1 and T2 have the same value.  */
2324
 
+
2325
 
+static bool
2326
 
+gimple_operand_equal_value_p (tree t1, tree t2)
2327
 
+{
2328
 
+  if (t1 == t2)
2329
 
+    return true;
2330
 
+
2331
 
+  if (t1 == NULL_TREE
2332
 
+      || t2 == NULL_TREE)
2333
 
+    return false;
2334
 
+
2335
 
+  if (operand_equal_p (t1, t2, 0))
2336
 
+    return true;
2337
 
+
2338
 
+  return gvn_uses_equal (t1, t2);
2339
 
+}
2340
 
+
2341
 
 /* Return true if gimple statements S1 and S2 are equal.  Gimple_bb (s1) and
2342
 
    gimple_bb (s2) are members of SAME_SUCC.  */
2343
 
 
2344
 
@@ -1122,11 +1141,13 @@
2345
 
       lhs2 = gimple_get_lhs (s2);
2346
 
       if (TREE_CODE (lhs1) != SSA_NAME
2347
 
          && TREE_CODE (lhs2) != SSA_NAME)
2348
 
-       return (vn_valueize (gimple_vdef (s1))
2349
 
-               == vn_valueize (gimple_vdef (s2)));
2350
 
+       return (operand_equal_p (lhs1, lhs2, 0)
2351
 
+               && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
2352
 
+                                                gimple_assign_rhs1 (s2)));
2353
 
       else if (TREE_CODE (lhs1) == SSA_NAME
2354
 
               && TREE_CODE (lhs2) == SSA_NAME)
2355
 
-       return vn_valueize (lhs1) == vn_valueize (lhs2);
2356
 
+       return operand_equal_p (gimple_assign_rhs1 (s1),
2357
 
+                               gimple_assign_rhs1 (s2), 0);
2358
 
       return false;
2359
 
 
2360
 
     case GIMPLE_COND:
2361
 
Index: gcc/DATESTAMP
2362
 
===================================================================
2363
 
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
2364
 
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
2365
 
@@ -1 +1 @@
2366
 
-20140522
2367
 
+20141214
2368
 
Index: gcc/tree-ssa-strlen.c
2369
 
===================================================================
2370
 
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
2371
 
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
2372
 
@@ -1777,7 +1777,7 @@
2373
 
            break;
2374
 
          }
2375
 
     }
2376
 
-  else if (is_gimple_assign (stmt))
2377
 
+  else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
2378
 
     {
2379
 
       tree lhs = gimple_assign_lhs (stmt);
2380
 
 
2381
 
Index: gcc/tree.c
2382
 
===================================================================
2383
 
--- a/src/gcc/tree.c    (.../tags/gcc_4_8_3_release)
2384
 
+++ b/src/gcc/tree.c    (.../branches/gcc-4_8-branch)
2385
 
@@ -1130,7 +1130,7 @@
2386
 
   const_tree const t = (const_tree) x;
2387
 
 
2388
 
   return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
2389
 
-         ^ htab_hash_pointer (TREE_TYPE (t)));
2390
 
+         ^ TYPE_UID (TREE_TYPE (t)));
2391
 
 }
2392
 
 
2393
 
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
2394
 
Index: gcc/ipa-cp.c
2395
 
===================================================================
2396
 
--- a/src/gcc/ipa-cp.c  (.../tags/gcc_4_8_3_release)
2397
 
+++ b/src/gcc/ipa-cp.c  (.../branches/gcc-4_8-branch)
2398
 
@@ -447,6 +447,8 @@
2399
 
   else if (!opt_for_fn (node->symbol.decl, optimize)
2400
 
           || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
2401
 
     reason = "non-optimized function";
2402
 
+  else if (node->tm_clone)
2403
 
+    reason = "transactional memory clone";
2404
 
 
2405
 
   if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
2406
 
     fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
2407
 
@@ -2902,6 +2904,11 @@
2408
 
                intersect_with_agg_replacements (cs->caller, src_idx,
2409
 
                                                 &inter, 0);
2410
 
            }
2411
 
+         else
2412
 
+           {
2413
 
+             inter.release ();
2414
 
+             return vNULL;
2415
 
+           }
2416
 
        }
2417
 
       else
2418
 
        {
2419
 
@@ -2917,6 +2924,11 @@
2420
 
              else
2421
 
                intersect_with_plats (src_plats, &inter, 0);
2422
 
            }
2423
 
+         else
2424
 
+           {
2425
 
+             inter.release ();
2426
 
+             return vNULL;
2427
 
+           }
2428
 
        }
2429
 
     }
2430
 
   else if (jfunc->type == IPA_JF_ANCESTOR
2431
 
@@ -3000,7 +3012,8 @@
2432
 
                                          vec<cgraph_edge_p> callers)
2433
 
 {
2434
 
   struct ipa_node_params *dest_info = IPA_NODE_REF (node);
2435
 
-  struct ipa_agg_replacement_value *res = NULL;
2436
 
+  struct ipa_agg_replacement_value *res;
2437
 
+  struct ipa_agg_replacement_value **tail = &res;
2438
 
   struct cgraph_edge *cs;
2439
 
   int i, j, count = ipa_get_param_count (dest_info);
2440
 
 
2441
 
@@ -3044,8 +3057,8 @@
2442
 
          v->offset = item->offset;
2443
 
          v->value = item->value;
2444
 
          v->by_ref = plats->aggs_by_ref;
2445
 
-         v->next = res;
2446
 
-         res = v;
2447
 
+         *tail = v;
2448
 
+         tail = &v->next;
2449
 
        }
2450
 
 
2451
 
     next_param:
2452
 
@@ -3052,6 +3065,7 @@
2453
 
       if (inter.exists ())
2454
 
        inter.release ();
2455
 
     }
2456
 
+  *tail = NULL;
2457
 
   return res;
2458
 
 }
2459
 
 
2460
 
@@ -3060,7 +3074,8 @@
2461
 
 static struct ipa_agg_replacement_value *
2462
 
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
2463
 
 {
2464
 
-  struct ipa_agg_replacement_value *res = NULL;
2465
 
+  struct ipa_agg_replacement_value *res;
2466
 
+  struct ipa_agg_replacement_value **tail = &res;
2467
 
   struct ipa_agg_jump_function *aggjf;
2468
 
   struct ipa_agg_jf_item *item;
2469
 
   int i, j;
2470
 
@@ -3074,9 +3089,10 @@
2471
 
        v->offset = item->offset;
2472
 
        v->value = item->value;
2473
 
        v->by_ref = aggjf->by_ref;
2474
 
-       v->next = res;
2475
 
-       res = v;
2476
 
+       *tail = v;
2477
 
+       tail = &v->next;
2478
 
       }
2479
 
+  *tail = NULL;
2480
 
   return res;
2481
 
 }
2482
 
 
2483
 
Index: gcc/configure
2484
 
===================================================================
2485
 
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
2486
 
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
2487
 
@@ -910,6 +910,7 @@
2488
 
 enable_gnu_indirect_function
2489
 
 enable_initfini_array
2490
 
 enable_comdat
2491
 
+enable_fix_cortex_a53_835769
2492
 
 enable_gnu_unique_object
2493
 
 enable_linker_build_id
2494
 
 with_long_double_128
2495
 
@@ -1619,6 +1620,14 @@
2496
 
                           glibc systems
2497
 
   --enable-initfini-array      use .init_array/.fini_array sections
2498
 
   --enable-comdat         enable COMDAT group support
2499
 
+
2500
 
+  --enable-fix-cortex-a53-835769
2501
 
+                          enable workaround for AArch64 Cortex-A53 erratum
2502
 
+                          835769 by default
2503
 
+  --disable-fix-cortex-a53-835769
2504
 
+                          disable workaround for AArch64 Cortex-A53 erratum
2505
 
+                          835769 by default
2506
 
+
2507
 
   --enable-gnu-unique-object
2508
 
                           enable the use of the @gnu_unique_object ELF
2509
 
                           extension on glibc systems
2510
 
@@ -17838,7 +17847,7 @@
2511
 
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2512
 
   lt_status=$lt_dlunknown
2513
 
   cat > conftest.$ac_ext <<_LT_EOF
2514
 
-#line 17841 "configure"
2515
 
+#line 17850 "configure"
2516
 
 #include "confdefs.h"
2517
 
 
2518
 
 #if HAVE_DLFCN_H
2519
 
@@ -17944,7 +17953,7 @@
2520
 
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2521
 
   lt_status=$lt_dlunknown
2522
 
   cat > conftest.$ac_ext <<_LT_EOF
2523
 
-#line 17947 "configure"
2524
 
+#line 17956 "configure"
2525
 
 #include "confdefs.h"
2526
 
 
2527
 
 #if HAVE_DLFCN_H
2528
 
@@ -23796,6 +23805,28 @@
2529
 
 $as_echo "$gcc_cv_lto_plugin" >&6; }
2530
 
 
2531
 
 case "$target" in
2532
 
+
2533
 
+  aarch64*-*-*)
2534
 
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
2535
 
+    # Check whether --enable-fix-cortex-a53-835769 was given.
2536
 
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
2537
 
+  enableval=$enable_fix_cortex_a53_835769;
2538
 
+        case $enableval in
2539
 
+          yes)
2540
 
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
2541
 
+            ;;
2542
 
+          no)
2543
 
+            ;;
2544
 
+          *)
2545
 
+            as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
2546
 
+  Valid choices are 'yes' and 'no'." "$LINENO" 5
2547
 
+            ;;
2548
 
+
2549
 
+        esac
2550
 
+
2551
 
+fi
2552
 
+
2553
 
+  ;;
2554
 
   # All TARGET_ABI_OSF targets.
2555
 
   alpha*-*-linux* | alpha*-*-*bsd*)
2556
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
2557
 
@@ -27281,8 +27312,48 @@
2558
 
 
2559
 
 $as_echo "#define HAVE_cloog 1" >>confdefs.h
2560
 
 
2561
 
+
2562
 
+  # Check whether isl_schedule_constraints_compute_schedule is available;
2563
 
+  # it's new in ISL-0.13.
2564
 
+  saved_CFLAGS="$CFLAGS"
2565
 
+  CFLAGS="$CFLAGS $ISLINC"
2566
 
+  saved_LIBS="$LIBS"
2567
 
+  LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
2568
 
+
2569
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
2570
 
+$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
2571
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2572
 
+/* end confdefs.h.  */
2573
 
+#include <isl/schedule.h>
2574
 
+int
2575
 
+main ()
2576
 
+{
2577
 
+isl_schedule_constraints_compute_schedule (NULL);
2578
 
+  ;
2579
 
+  return 0;
2580
 
+}
2581
 
+_ACEOF
2582
 
+if ac_fn_c_try_link "$LINENO"; then :
2583
 
+  ac_has_isl_schedule_constraints_compute_schedule=yes
2584
 
+else
2585
 
+  ac_has_isl_schedule_constraints_compute_schedule=no
2586
 
 fi
2587
 
+rm -f core conftest.err conftest.$ac_objext \
2588
 
+    conftest$ac_exeext conftest.$ac_ext
2589
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
2590
 
+$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
2591
 
 
2592
 
+  LIBS="$saved_LIBS"
2593
 
+  CFLAGS="$saved_CFLAGS"
2594
 
+
2595
 
+  if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
2596
 
+
2597
 
+$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
2598
 
+
2599
 
+  fi
2600
 
+fi
2601
 
+
2602
 
+
2603
 
 # Check for plugin support
2604
 
 # Check whether --enable-plugin was given.
2605
 
 if test "${enable_plugin+set}" = set; then :
2606
 
Index: gcc/fold-const.c
2607
 
===================================================================
2608
 
--- a/src/gcc/fold-const.c      (.../tags/gcc_4_8_3_release)
2609
 
+++ b/src/gcc/fold-const.c      (.../branches/gcc-4_8-branch)
2610
 
@@ -8929,7 +8929,8 @@
2611
 
       /* If the constant operation overflowed this can be
2612
 
         simplified as a comparison against INT_MAX/INT_MIN.  */
2613
 
       if (TREE_CODE (lhs) == INTEGER_CST
2614
 
-         && TREE_OVERFLOW (lhs))
2615
 
+         && TREE_OVERFLOW (lhs)
2616
 
+         && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
2617
 
        {
2618
 
          int const1_sgn = tree_int_cst_sgn (const1);
2619
 
          enum tree_code code2 = code;
2620
 
@@ -9213,7 +9214,7 @@
2621
 
   /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
2622
 
      X CMP Y +- C2 +- C1 for signed X, Y.  This is valid if
2623
 
      the resulting offset is smaller in absolute value than the
2624
 
-     original one.  */
2625
 
+     original one and has the same sign.  */
2626
 
   if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
2627
 
       && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
2628
 
       && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
2629
 
@@ -9232,19 +9233,20 @@
2630
 
                                      "a comparison");
2631
 
 
2632
 
       /* Put the constant on the side where it doesn't overflow and is
2633
 
-        of lower absolute value than before.  */
2634
 
+        of lower absolute value and of same sign than before.  */
2635
 
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2636
 
                             ? MINUS_EXPR : PLUS_EXPR,
2637
 
                             const2, const1);
2638
 
       if (!TREE_OVERFLOW (cst)
2639
 
-         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
2640
 
+         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
2641
 
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
2642
 
        {
2643
 
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2644
 
          return fold_build2_loc (loc, code, type,
2645
 
-                             variable1,
2646
 
-                             fold_build2_loc (loc,
2647
 
-                                          TREE_CODE (arg1), TREE_TYPE (arg1),
2648
 
-                                          variable2, cst));
2649
 
+                                 variable1,
2650
 
+                                 fold_build2_loc (loc, TREE_CODE (arg1),
2651
 
+                                                  TREE_TYPE (arg1),
2652
 
+                                                  variable2, cst));
2653
 
        }
2654
 
 
2655
 
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2656
 
@@ -9251,13 +9253,15 @@
2657
 
                             ? MINUS_EXPR : PLUS_EXPR,
2658
 
                             const1, const2);
2659
 
       if (!TREE_OVERFLOW (cst)
2660
 
-         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
2661
 
+         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
2662
 
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
2663
 
        {
2664
 
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2665
 
          return fold_build2_loc (loc, code, type,
2666
 
-                             fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
2667
 
-                                          variable1, cst),
2668
 
-                             variable2);
2669
 
+                                 fold_build2_loc (loc, TREE_CODE (arg0),
2670
 
+                                                  TREE_TYPE (arg0),
2671
 
+                                                  variable1, cst),
2672
 
+                                 variable2);
2673
 
        }
2674
 
     }
2675
 
 
2676
 
@@ -11218,7 +11222,6 @@
2677
 
        {
2678
 
          double_int c1, c2, c3, msk;
2679
 
          int width = TYPE_PRECISION (type), w;
2680
 
-         bool try_simplify = true;
2681
 
 
2682
 
          c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
2683
 
          c2 = tree_to_double_int (arg1);
2684
 
@@ -11255,20 +11258,7 @@
2685
 
                }
2686
 
            }
2687
 
 
2688
 
-         /* If X is a tree of the form (Y * K1) & K2, this might conflict
2689
 
-            with that optimization from the BIT_AND_EXPR optimizations.
2690
 
-            This could end up in an infinite recursion.  */
2691
 
-         if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
2692
 
-             && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
2693
 
-                           == INTEGER_CST)
2694
 
-         {
2695
 
-           tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
2696
 
-           double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
2697
 
-
2698
 
-           try_simplify = (masked != c1);
2699
 
-         }
2700
 
-
2701
 
-         if (try_simplify && c3 != c1)
2702
 
+         if (c3 != c1)
2703
 
            return fold_build2_loc (loc, BIT_IOR_EXPR, type,
2704
 
                                    fold_build2_loc (loc, BIT_AND_EXPR, type,
2705
 
                                                     TREE_OPERAND (arg0, 0),
2706
 
@@ -11658,16 +11648,25 @@
2707
 
          && TREE_CODE (arg0) == MULT_EXPR
2708
 
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
2709
 
        {
2710
 
+         double_int darg1 = tree_to_double_int (arg1);
2711
 
          double_int masked
2712
 
-           = mask_with_tz (type, tree_to_double_int (arg1),
2713
 
+           = mask_with_tz (type, darg1,
2714
 
                            tree_to_double_int (TREE_OPERAND (arg0, 1)));
2715
 
 
2716
 
          if (masked.is_zero ())
2717
 
            return omit_two_operands_loc (loc, type, build_zero_cst (type),
2718
 
                                          arg0, arg1);
2719
 
-         else if (masked != tree_to_double_int (arg1))
2720
 
-           return fold_build2_loc (loc, code, type, op0,
2721
 
-                                   double_int_to_tree (type, masked));
2722
 
+         else if (masked != darg1)
2723
 
+           {
2724
 
+             /* Avoid the transform if arg1 is a mask of some
2725
 
+                mode which allows further optimizations.  */
2726
 
+             int pop = darg1.popcount ();
2727
 
+             if (!(pop >= BITS_PER_UNIT
2728
 
+                   && exact_log2 (pop) != -1
2729
 
+                   && double_int::mask (pop) == darg1))
2730
 
+               return fold_build2_loc (loc, code, type, op0,
2731
 
+                                       double_int_to_tree (type, masked));
2732
 
+           }
2733
 
        }
2734
 
 
2735
 
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
2736
 
@@ -13083,6 +13082,8 @@
2737
 
          tree arg01 = TREE_OPERAND (arg0, 1);
2738
 
          tree itype = TREE_TYPE (arg00);
2739
 
          if (TREE_INT_CST_HIGH (arg01) == 0
2740
 
+             && !(TREE_CODE (itype) == COMPLEX_TYPE
2741
 
+                  || TREE_CODE (itype) == VECTOR_TYPE)
2742
 
              && TREE_INT_CST_LOW (arg01)
2743
 
                 == (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
2744
 
            {
2745
 
Index: gcc/omp-low.c
2746
 
===================================================================
2747
 
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
2748
 
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
2749
 
@@ -128,6 +128,7 @@
2750
 
 static int taskreg_nesting_level;
2751
 
 struct omp_region *root_omp_region;
2752
 
 static bitmap task_shared_vars;
2753
 
+static vec<omp_context *> taskreg_contexts;
2754
 
 
2755
 
 static void scan_omp (gimple_seq *, omp_context *);
2756
 
 static tree scan_omp_1_op (tree *, int *, void *);
2757
 
@@ -1586,7 +1587,6 @@
2758
 
   TREE_STATIC (decl) = 1;
2759
 
   TREE_USED (decl) = 1;
2760
 
   DECL_ARTIFICIAL (decl) = 1;
2761
 
-  DECL_NAMELESS (decl) = 1;
2762
 
   DECL_IGNORED_P (decl) = 0;
2763
 
   TREE_PUBLIC (decl) = 0;
2764
 
   DECL_UNINLINABLE (decl) = 1;
2765
 
@@ -1656,6 +1656,7 @@
2766
 
     }
2767
 
 
2768
 
   ctx = new_omp_context (stmt, outer_ctx);
2769
 
+  taskreg_contexts.safe_push (ctx);
2770
 
   if (taskreg_nesting_level > 1)
2771
 
     ctx->is_nested = true;
2772
 
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2773
 
@@ -1675,11 +1676,6 @@
2774
 
 
2775
 
   if (TYPE_FIELDS (ctx->record_type) == NULL)
2776
 
     ctx->record_type = ctx->receiver_decl = NULL;
2777
 
-  else
2778
 
-    {
2779
 
-      layout_type (ctx->record_type);
2780
 
-      fixup_child_record_type (ctx);
2781
 
-    }
2782
 
 }
2783
 
 
2784
 
 /* Scan an OpenMP task directive.  */
2785
 
@@ -1690,7 +1686,6 @@
2786
 
   omp_context *ctx;
2787
 
   tree name, t;
2788
 
   gimple stmt = gsi_stmt (*gsi);
2789
 
-  location_t loc = gimple_location (stmt);
2790
 
 
2791
 
   /* Ignore task directives with empty bodies.  */
2792
 
   if (optimize > 0
2793
 
@@ -1701,6 +1696,7 @@
2794
 
     }
2795
 
 
2796
 
   ctx = new_omp_context (stmt, outer_ctx);
2797
 
+  taskreg_contexts.safe_push (ctx);
2798
 
   if (taskreg_nesting_level > 1)
2799
 
     ctx->is_nested = true;
2800
 
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2801
 
@@ -1738,8 +1734,71 @@
2802
 
       t = build_int_cst (long_integer_type_node, 1);
2803
 
       gimple_omp_task_set_arg_align (stmt, t);
2804
 
     }
2805
 
+}
2806
 
+
2807
 
+
2808
 
+/* If any decls have been made addressable during scan_omp,
2809
 
+   adjust their fields if needed, and layout record types
2810
 
+   of parallel/task constructs.  */
2811
 
+
2812
 
+static void
2813
 
+finish_taskreg_scan (omp_context *ctx)
2814
 
+{
2815
 
+  if (ctx->record_type == NULL_TREE)
2816
 
+    return;
2817
 
+
2818
 
+  /* If any task_shared_vars were needed, verify all
2819
 
+     OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
2820
 
+     statements if use_pointer_for_field hasn't changed
2821
 
+     because of that.  If it did, update field types now.  */
2822
 
+  if (task_shared_vars)
2823
 
+    {
2824
 
+      tree c;
2825
 
+
2826
 
+      for (c = gimple_omp_taskreg_clauses (ctx->stmt);
2827
 
+          c; c = OMP_CLAUSE_CHAIN (c))
2828
 
+       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
2829
 
+         {
2830
 
+           tree decl = OMP_CLAUSE_DECL (c);
2831
 
+
2832
 
+           /* Global variables don't need to be copied,
2833
 
+              the receiver side will use them directly.  */
2834
 
+           if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
2835
 
+             continue;
2836
 
+           if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
2837
 
+               || !use_pointer_for_field (decl, ctx))
2838
 
+             continue;
2839
 
+           tree field = lookup_field (decl, ctx);
2840
 
+           if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
2841
 
+               && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
2842
 
+             continue;
2843
 
+           TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
2844
 
+           TREE_THIS_VOLATILE (field) = 0;
2845
 
+           DECL_USER_ALIGN (field) = 0;
2846
 
+           DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
2847
 
+           if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
2848
 
+             TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
2849
 
+           if (ctx->srecord_type)
2850
 
+             {
2851
 
+               tree sfield = lookup_sfield (decl, ctx);
2852
 
+               TREE_TYPE (sfield) = TREE_TYPE (field);
2853
 
+               TREE_THIS_VOLATILE (sfield) = 0;
2854
 
+               DECL_USER_ALIGN (sfield) = 0;
2855
 
+               DECL_ALIGN (sfield) = DECL_ALIGN (field);
2856
 
+               if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
2857
 
+                 TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
2858
 
+             }
2859
 
+         }
2860
 
+    }
2861
 
+
2862
 
+  if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
2863
 
+    {
2864
 
+      layout_type (ctx->record_type);
2865
 
+      fixup_child_record_type (ctx);
2866
 
+    }
2867
 
   else
2868
 
     {
2869
 
+      location_t loc = gimple_location (ctx->stmt);
2870
 
       tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
2871
 
       /* Move VLA fields to the end.  */
2872
 
       p = &TYPE_FIELDS (ctx->record_type);
2873
 
@@ -1759,12 +1818,12 @@
2874
 
       fixup_child_record_type (ctx);
2875
 
       if (ctx->srecord_type)
2876
 
        layout_type (ctx->srecord_type);
2877
 
-      t = fold_convert_loc (loc, long_integer_type_node,
2878
 
-                       TYPE_SIZE_UNIT (ctx->record_type));
2879
 
-      gimple_omp_task_set_arg_size (stmt, t);
2880
 
+      tree t = fold_convert_loc (loc, long_integer_type_node,
2881
 
+                                TYPE_SIZE_UNIT (ctx->record_type));
2882
 
+      gimple_omp_task_set_arg_size (ctx->stmt, t);
2883
 
       t = build_int_cst (long_integer_type_node,
2884
 
                         TYPE_ALIGN_UNIT (ctx->record_type));
2885
 
-      gimple_omp_task_set_arg_align (stmt, t);
2886
 
+      gimple_omp_task_set_arg_align (ctx->stmt, t);
2887
 
     }
2888
 
 }
2889
 
 
2890
 
@@ -7113,6 +7172,8 @@
2891
 
 execute_lower_omp (void)
2892
 
 {
2893
 
   gimple_seq body;
2894
 
+  int i;
2895
 
+  omp_context *ctx;
2896
 
 
2897
 
   /* This pass always runs, to provide PROP_gimple_lomp.
2898
 
      But there is nothing to do unless -fopenmp is given.  */
2899
 
@@ -7125,6 +7186,9 @@
2900
 
   body = gimple_body (current_function_decl);
2901
 
   scan_omp (&body, NULL);
2902
 
   gcc_assert (taskreg_nesting_level == 0);
2903
 
+  FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
2904
 
+    finish_taskreg_scan (ctx);
2905
 
+  taskreg_contexts.release ();
2906
 
 
2907
 
   if (all_contexts->root)
2908
 
     {
2909
 
Index: gcc/toplev.c
2910
 
===================================================================
2911
 
--- a/src/gcc/toplev.c  (.../tags/gcc_4_8_3_release)
2912
 
+++ b/src/gcc/toplev.c  (.../branches/gcc-4_8-branch)
2913
 
@@ -1036,16 +1036,19 @@
2914
 
 
2915
 
   if (warn_stack_usage >= 0)
2916
 
     {
2917
 
+      const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
2918
 
+
2919
 
       if (stack_usage_kind == DYNAMIC)
2920
 
-       warning (OPT_Wstack_usage_, "stack usage might be unbounded");
2921
 
+       warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
2922
 
       else if (stack_usage > warn_stack_usage)
2923
 
        {
2924
 
          if (stack_usage_kind == DYNAMIC_BOUNDED)
2925
 
-           warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
2926
 
-                    stack_usage);
2927
 
+           warning_at (loc,
2928
 
+                       OPT_Wstack_usage_, "stack usage might be %wd bytes",
2929
 
+                       stack_usage);
2930
 
          else
2931
 
-           warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
2932
 
-                    stack_usage);
2933
 
+           warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
2934
 
+                       stack_usage);
2935
 
        }
2936
 
     }
2937
 
 }
2938
 
Index: gcc/tree-ssa-sccvn.c
2939
 
===================================================================
2940
 
--- a/src/gcc/tree-ssa-sccvn.c  (.../tags/gcc_4_8_3_release)
2941
 
+++ b/src/gcc/tree-ssa-sccvn.c  (.../branches/gcc-4_8-branch)
2942
 
@@ -3015,33 +3015,12 @@
2943
 
   /* If all value numbered to the same value, the phi node has that
2944
 
      value.  */
2945
 
   if (allsame)
2946
 
-    {
2947
 
-      if (is_gimple_min_invariant (sameval))
2948
 
-       {
2949
 
-         VN_INFO (PHI_RESULT (phi))->has_constants = true;
2950
 
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
2951
 
-       }
2952
 
-      else
2953
 
-       {
2954
 
-         VN_INFO (PHI_RESULT (phi))->has_constants = false;
2955
 
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
2956
 
-       }
2957
 
+    return set_ssa_val_to (PHI_RESULT (phi), sameval);
2958
 
 
2959
 
-      if (TREE_CODE (sameval) == SSA_NAME)
2960
 
-       return visit_copy (PHI_RESULT (phi), sameval);
2961
 
-
2962
 
-      return set_ssa_val_to (PHI_RESULT (phi), sameval);
2963
 
-    }
2964
 
-
2965
 
   /* Otherwise, see if it is equivalent to a phi node in this block.  */
2966
 
   result = vn_phi_lookup (phi);
2967
 
   if (result)
2968
 
-    {
2969
 
-      if (TREE_CODE (result) == SSA_NAME)
2970
 
-       changed = visit_copy (PHI_RESULT (phi), result);
2971
 
-      else
2972
 
-       changed = set_ssa_val_to (PHI_RESULT (phi), result);
2973
 
-    }
2974
 
+    changed = set_ssa_val_to (PHI_RESULT (phi), result);
2975
 
   else
2976
 
     {
2977
 
       vn_phi_insert (phi, PHI_RESULT (phi));
2978
 
@@ -3142,24 +3121,18 @@
2979
 
      catch those with constants.  The goal here is to simultaneously
2980
 
      combine constants between expressions, but avoid infinite
2981
 
      expansion of expressions during simplification.  */
2982
 
-  if (TREE_CODE (op0) == SSA_NAME)
2983
 
-    {
2984
 
-      if (VN_INFO (op0)->has_constants
2985
 
+  op0 = vn_valueize (op0);
2986
 
+  if (TREE_CODE (op0) == SSA_NAME
2987
 
+      && (VN_INFO (op0)->has_constants
2988
 
          || TREE_CODE_CLASS (code) == tcc_comparison
2989
 
-         || code == COMPLEX_EXPR)
2990
 
-       op0 = valueize_expr (vn_get_expr_for (op0));
2991
 
-      else
2992
 
-       op0 = vn_valueize (op0);
2993
 
-    }
2994
 
+         || code == COMPLEX_EXPR))
2995
 
+    op0 = valueize_expr (vn_get_expr_for (op0));
2996
 
 
2997
 
-  if (TREE_CODE (op1) == SSA_NAME)
2998
 
-    {
2999
 
-      if (VN_INFO (op1)->has_constants
3000
 
-         || code == COMPLEX_EXPR)
3001
 
-       op1 = valueize_expr (vn_get_expr_for (op1));
3002
 
-      else
3003
 
-       op1 = vn_valueize (op1);
3004
 
-    }
3005
 
+  op1 = vn_valueize (op1);
3006
 
+  if (TREE_CODE (op1) == SSA_NAME
3007
 
+      && (VN_INFO (op1)->has_constants
3008
 
+         || code == COMPLEX_EXPR))
3009
 
+    op1 = valueize_expr (vn_get_expr_for (op1));
3010
 
 
3011
 
   /* Pointer plus constant can be represented as invariant address.
3012
 
      Do so to allow further propatation, see also tree forwprop.  */
3013
 
@@ -3217,27 +3190,31 @@
3014
 
     return NULL_TREE;
3015
 
 
3016
 
   orig_op0 = op0;
3017
 
-  if (VN_INFO (op0)->has_constants)
3018
 
-    op0 = valueize_expr (vn_get_expr_for (op0));
3019
 
-  else if (CONVERT_EXPR_CODE_P (code)
3020
 
-          || code == REALPART_EXPR
3021
 
-          || code == IMAGPART_EXPR
3022
 
-          || code == VIEW_CONVERT_EXPR
3023
 
-          || code == BIT_FIELD_REF)
3024
 
+  op0 = vn_valueize (op0);
3025
 
+  if (TREE_CODE (op0) == SSA_NAME)
3026
 
     {
3027
 
-      /* We want to do tree-combining on conversion-like expressions.
3028
 
-         Make sure we feed only SSA_NAMEs or constants to fold though.  */
3029
 
-      tree tem = valueize_expr (vn_get_expr_for (op0));
3030
 
-      if (UNARY_CLASS_P (tem)
3031
 
-         || BINARY_CLASS_P (tem)
3032
 
-         || TREE_CODE (tem) == VIEW_CONVERT_EXPR
3033
 
-         || TREE_CODE (tem) == SSA_NAME
3034
 
-         || TREE_CODE (tem) == CONSTRUCTOR
3035
 
-         || is_gimple_min_invariant (tem))
3036
 
-       op0 = tem;
3037
 
+      if (VN_INFO (op0)->has_constants)
3038
 
+       op0 = valueize_expr (vn_get_expr_for (op0));
3039
 
+      else if (CONVERT_EXPR_CODE_P (code)
3040
 
+              || code == REALPART_EXPR
3041
 
+              || code == IMAGPART_EXPR
3042
 
+              || code == VIEW_CONVERT_EXPR
3043
 
+              || code == BIT_FIELD_REF)
3044
 
+       {
3045
 
+         /* We want to do tree-combining on conversion-like expressions.
3046
 
+            Make sure we feed only SSA_NAMEs or constants to fold though.  */
3047
 
+         tree tem = valueize_expr (vn_get_expr_for (op0));
3048
 
+         if (UNARY_CLASS_P (tem)
3049
 
+             || BINARY_CLASS_P (tem)
3050
 
+             || TREE_CODE (tem) == VIEW_CONVERT_EXPR
3051
 
+             || TREE_CODE (tem) == SSA_NAME
3052
 
+             || TREE_CODE (tem) == CONSTRUCTOR
3053
 
+             || is_gimple_min_invariant (tem))
3054
 
+           op0 = tem;
3055
 
+       }
3056
 
     }
3057
 
 
3058
 
-  /* Avoid folding if nothing changed, but remember the expression.  */
3059
 
+  /* Avoid folding if nothing changed.  */
3060
 
   if (op0 == orig_op0)
3061
 
     return NULL_TREE;
3062
 
 
3063
 
Index: gcc/cgraphunit.c
3064
 
===================================================================
3065
 
--- a/src/gcc/cgraphunit.c      (.../tags/gcc_4_8_3_release)
3066
 
+++ b/src/gcc/cgraphunit.c      (.../branches/gcc-4_8-branch)
3067
 
@@ -1097,7 +1097,7 @@
3068
 
          /* We use local aliases for C++ thunks to force the tailcall
3069
 
             to bind locally.  This is a hack - to keep it working do
3070
 
             the following (which is not strictly correct).  */
3071
 
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
3072
 
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
3073
 
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
3074
 
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
3075
 
        {
3076
 
Index: gcc/ChangeLog
3077
 
===================================================================
3078
 
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
3079
 
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
3080
 
@@ -1,3 +1,1296 @@
3081
 
+2014-12-13  Jakub Jelinek  <jakub@redhat.com>
3082
 
+
3083
 
+       Backported from mainline
3084
 
+       2014-12-12  Jakub Jelinek  <jakub@redhat.com>
3085
 
+
3086
 
+       PR tree-optimization/64269
3087
 
+       * tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
3088
 
+       len2 or diff are too large.
3089
 
+
3090
 
+2014-12-11  Eric Botcazou  <ebotcazou@adacore.com>
3091
 
+
3092
 
+       * doc/md.texi (Insn Lengths): Fix description of (pc).
3093
 
+
3094
 
+2014-12-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3095
 
+
3096
 
+       Backport from mainline
3097
 
+        2014-09-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3098
 
+
3099
 
+       * config/rs6000/rs6000-builtin.def (XVCVSXDDP_SCALE):  New
3100
 
+       built-in definition.
3101
 
+       (XVCVUXDDP_SCALE): Likewise.
3102
 
+       (XVCVDPSXDS_SCALE): Likewise.
3103
 
+       (XVCVDPUXDS_SCALE): Likewise.
3104
 
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):  Add
3105
 
+       entries for VSX_BUILTIN_XVCVSXDDP_SCALE,
3106
 
+       VSX_BUILTIN_XVCVUXDDP_SCALE, VSX_BUILTIN_XVCVDPSXDS_SCALE, and
3107
 
+       VSX_BUILTIN_XVCVDPUXDS_SCALE.
3108
 
+       * config/rs6000/rs6000-protos.h (rs6000_scale_v2df): New
3109
 
+       prototype.
3110
 
+       * config/rs6000/rs6000.c (real.h): New include.
3111
 
+       (rs6000_scale_v2df): New function.
3112
 
+       * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSXDDP): New unspec.
3113
 
+       (UNSPEC_VSX_XVCVUXDDP): Likewise.
3114
 
+       (UNSPEC_VSX_XVCVDPSXDS): Likewise.
3115
 
+       (UNSPEC_VSX_XVCVDPUXDS): Likewise.
3116
 
+       (vsx_xvcvsxddp_scale): New define_expand.
3117
 
+       (vsx_xvcvsxddp): New define_insn.
3118
 
+       (vsx_xvcvuxddp_scale): New define_expand.
3119
 
+       (vsx_xvcvuxddp): New define_insn.
3120
 
+       (vsx_xvcvdpsxds_scale): New define_expand.
3121
 
+       (vsx_xvcvdpsxds): New define_insn.
3122
 
+       (vsx_xvcvdpuxds_scale): New define_expand.
3123
 
+       (vsx_xvcvdpuxds): New define_insn.
3124
 
+       * doc/extend.texi (vec_ctf): Add new prototypes.
3125
 
+       (vec_cts): Likewise.
3126
 
+       (vec_ctu): Likewise.
3127
 
+       (vec_splat): Likewise.
3128
 
+       (vec_div): Likewise.
3129
 
+       (vec_mul): Likewise.
3130
 
+
3131
 
+       Backport from mainline
3132
 
+        2014-08-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3133
 
+
3134
 
+       * config/rs6000/altivec.h (vec_xl): New #define.
3135
 
+       (vec_xst): Likewise.
3136
 
+       * config/rs6000/rs6000-builtin.def (XXSPLTD_V2DF): New built-in.
3137
 
+       (XXSPLTD_V2DI): Likewise.
3138
 
+       (DIV_V2DI): Likewise.
3139
 
+       (UDIV_V2DI): Likewise.
3140
 
+       (MUL_V2DI): Likewise.
3141
 
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3142
 
+       entries for VSX_BUILTIN_XVRDPI, VSX_BUILTIN_DIV_V2DI,
3143
 
+       VSX_BUILTIN_UDIV_V2DI, VSX_BUILTIN_MUL_V2DI,
3144
 
+       VSX_BUILTIN_XXSPLTD_V2DF, and VSX_BUILTIN_XXSPLTD_V2DI).
3145
 
+       * config/rs6000/vsx.md (UNSPEC_VSX_XXSPLTD): New unspec.
3146
 
+       (UNSPEC_VSX_DIVSD): Likewise.
3147
 
+       (UNSPEC_VSX_DIVUD): Likewise.
3148
 
+       (UNSPEC_VSX_MULSD): Likewise.
3149
 
+       (vsx_mul_v2di): New insn-and-split.
3150
 
+       (vsx_div_v2di): Likewise.
3151
 
+       (vsx_udiv_v2di): Likewise.
3152
 
+       (vsx_xxspltd_<mode>): New insn.
3153
 
+
3154
 
+       Backport from mainline
3155
 
+        2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3156
 
+
3157
 
+       * config/rs6000/altivec.h (vec_cpsgn): New #define.
3158
 
+       (vec_mergee): Likewise.
3159
 
+       (vec_mergeo): Likewise.
3160
 
+       (vec_cntlz): Likewise.
3161
 
+       * config/rs600/rs6000-c.c (altivec_overloaded_builtins): Add new
3162
 
+       entries for VEC_AND, VEC_ANDC, VEC_MERGEH, VEC_MERGEL, VEC_NOR,
3163
 
+       VEC_OR, VEC_PACKSU, VEC_XOR, VEC_PERM, VEC_SEL, VEC_VCMPGT_P,
3164
 
+       VMRGEW, and VMRGOW.
3165
 
+       * doc/extend.texi: Document various forms of vec_cpsgn,
3166
 
+       vec_splats, vec_and, vec_andc, vec_mergeh, vec_mergel, vec_nor,
3167
 
+       vec_or, vec_perm, vec_sel, vec_sub, vec_xor, vec_all_eq,
3168
 
+       vec_all_ge, vec_all_gt, vec_all_le, vec_all_lt, vec_all_ne,
3169
 
+       vec_any_eq, vec_any_ge, vec_any_gt, vec_any_le, vec_any_lt,
3170
 
+       vec_any_ne, vec_mergee, vec_mergeo, vec_packsu, and vec_cntlz.
3171
 
+
3172
 
+       Backport from mainline
3173
 
+        2014-07-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3174
 
+
3175
 
+       * config/rs6000/altivec.md (unspec enum):  Fix typo in UNSPEC_VSLDOI.
3176
 
+       (altivec_vsldoi_<mode>): Likewise.
3177
 
+
3178
 
+2014-12-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3179
 
+
3180
 
+       Backport from mainline:
3181
 
+       2014-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3182
 
+
3183
 
+       PR middle-end/64225
3184
 
+       * tree-ssa-reassoc.c (acceptable_pow_call): Disable transformation
3185
 
+       for BUILT_IN_POW when flag_errno_math is present.
3186
 
+
3187
 
+2014-12-10  Marek Polacek  <polacek@redhat.com>
3188
 
+
3189
 
+       Backport from mainline
3190
 
+       2014-12-10  Marek Polacek  <polacek@redhat.com>
3191
 
+
3192
 
+       PR tree-optimization/61686
3193
 
+       * tree-ssa-reassoc.c (range_entry_cmp): Use q->high instead of
3194
 
+       p->high.
3195
 
+
3196
 
+2014-12-09  David Edelsohn  <dje.gcc@gmail.com>
3197
 
+
3198
 
+       Backport from mainline
3199
 
+       2014-12-05  David Edelsohn  <dje.gcc@gmail.com>
3200
 
+
3201
 
+       * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_LOCAL): Append
3202
 
+       alignment to section name. Increase default alignment to
3203
 
+       word.
3204
 
+
3205
 
+2014-12-09  Uros Bizjak  <ubizjak@gmail.com>
3206
 
+
3207
 
+       PR bootstrap/64213
3208
 
+       Revert:
3209
 
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
3210
 
+
3211
 
+       PR rtl-optimization/64037
3212
 
+       * combine.c (setup_incoming_promotions): Pass the argument
3213
 
+       before any promotions happen to promote_function_mode.
3214
 
+
3215
 
+2014-12-08  Richard Biener  <rguenther@suse.de>
3216
 
+
3217
 
+       Backport from 4.9 branch
3218
 
+       * configure.ac
3219
 
+       (ac_has_isl_schedule_constraints_compute_schedule):
3220
 
+       New check.
3221
 
+       * graphite-clast-to-gimple.c: For ISL 0.14, include deprecate headers.
3222
 
+       * graphite-interchange.c: Ditto.
3223
 
+       * graphite-poly.c: Ditto.
3224
 
+       * graphite-sese-to-poly.c: Ditto.
3225
 
+       * graphite-optimize-isl.c (getScheduleForBandList): Ditto.
3226
 
+       Conditionally use ISL 0.13+ functions.
3227
 
+       * config.in: Regenerate.
3228
 
+       * configure: Regenerate.
3229
 
+
3230
 
+2014-12-07  Oleg Endo  <olegendo@gcc.gnu.org>
3231
 
+
3232
 
+       Backport from mainline
3233
 
+       2014-12-07  Oleg Endo  <olegendo@gcc.gnu.org>
3234
 
+
3235
 
+       PR target/50751
3236
 
+       * config/sh/sh.md (extendqihi2): Allow only for TARGET_SH1.
3237
 
+
3238
 
+2014-12-05  H.J. Lu  <hongjiu.lu@intel.com>
3239
 
+
3240
 
+       Backport from mainline
3241
 
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
3242
 
+
3243
 
+       PR rtl-optimization/64037
3244
 
+       * combine.c (setup_incoming_promotions): Pass the argument
3245
 
+       before any promotions happen to promote_function_mode.
3246
 
+
3247
 
+2014-12-04  Shanyao Chen  <chenshanyao@huawei.com>
3248
 
+
3249
 
+       Backport from mainline
3250
 
+       2014-11-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3251
 
+
3252
 
+       PR target/59593
3253
 
+       * config/arm/arm.md (*movhi_insn): Use right formatting
3254
 
+       for immediate.
3255
 
+
3256
 
+       2014-11-19  Felix Yang  <felix.yang@huawei.com>
3257
 
+                   Shanyao Chen  <chenshanyao@huawei.com>
3258
 
+
3259
 
+       PR target/59593
3260
 
+       * config/arm/arm.md (define_attr "arch"): Add v6t2.
3261
 
+       (define_attr "arch_enabled"): Add test for the above.
3262
 
+       (*movhi_insn_arch4): Add new alternative.
3263
 
+
3264
 
+2014-12-04  Jakub Jelinek  <jakub@redhat.com>
3265
 
+
3266
 
+       PR c++/56493
3267
 
+       * convert.c (convert_to_real, convert_to_expr, convert_to_complex):
3268
 
+       Handle COMPOUND_EXPR.
3269
 
+
3270
 
+2014-12-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3271
 
+
3272
 
+       PR target/64115
3273
 
+       * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
3274
 
+       invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.
3275
 
+
3276
 
+2014-12-01  Richard Biener  <rguenther@suse.de>
3277
 
+
3278
 
+       PR middle-end/64111
3279
 
+       * tree.c (int_cst_hash_hash): Use TYPE_UID instead of
3280
 
+       htab_hash_pointer to not break PCH.
3281
 
+
3282
 
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
3283
 
+
3284
 
+       Backported from mainline
3285
 
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
3286
 
+
3287
 
+       PR middle-end/64067
3288
 
+       * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
3289
 
+       Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
3290
 
+       not only if modifier is EXPAND_INITIALIZER, but whenever
3291
 
+       COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
3292
 
+
3293
 
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
3294
 
+
3295
 
+       PR rtl-optimization/63659
3296
 
+       * ree.c (update_reg_equal_equiv_notes): New function.
3297
 
+       (combine_set_extension, transform_ifelse): Use it.
3298
 
+
3299
 
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
3300
 
+
3301
 
+       PR libgomp/61200
3302
 
+       * omp-low.c (taskreg_contexts): New variable.
3303
 
+       (scan_omp_parallel): Push newly created context into taskreg_contexts
3304
 
+       vector and move record layout code to finish_taskreg_scan.
3305
 
+       (scan_omp_task): Likewise.
3306
 
+       (finish_taskreg_scan): New function.
3307
 
+       (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
3308
 
+       vector elements and release it.
3309
 
+
3310
 
+2014-11-26  Richard Biener  <rguenther@suse.de>
3311
 
+
3312
 
+       Backport from mainline
3313
 
+       2014-10-08  Richard Biener  <rguenther@suse.de>
3314
 
+
3315
 
+       PR tree-optimization/61969
3316
 
+       * tree-nrv.c (pass_nrv::execute): Properly test for automatic
3317
 
+       variables.
3318
 
+
3319
 
+       2014-08-15  Richard Biener  <rguenther@suse.de>
3320
 
+
3321
 
+       PR tree-optimization/62031
3322
 
+       * tree-data-ref.c (dr_analyze_indices): Do not set
3323
 
+       DR_UNCONSTRAINED_BASE.
3324
 
+       (dr_may_alias_p): All indirect accesses have to go the
3325
 
+       formerly DR_UNCONSTRAINED_BASE path.
3326
 
+       * tree-data-ref.h (struct indices): Remove
3327
 
+       unconstrained_base member.
3328
 
+       (DR_UNCONSTRAINED_BASE): Remove.
3329
 
+
3330
 
+       2014-10-10  Richard Biener  <rguenther@suse.de>
3331
 
+
3332
 
+       PR tree-optimization/63379
3333
 
+       * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
3334
 
+       a neutral operand for min/max when it is not a reduction chain.
3335
 
+
3336
 
+       2014-11-07  Richard Biener  <rguenther@suse.de>
3337
 
+
3338
 
+       PR tree-optimization/63605
3339
 
+       * fold-const.c (fold_binary_loc): Properly use element_precision
3340
 
+       for types that may not be scalar.
3341
 
+
3342
 
+       2014-10-28  Richard Biener  <rguenther@suse.de>
3343
 
+
3344
 
+       PR middle-end/63665
3345
 
+       * fold-const.c (fold_comparison): Properly guard simplifying
3346
 
+       against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
3347
 
+
3348
 
+2014-11-22  Oleg Endo  <olegendo@gcc.gnu.org>
3349
 
+
3350
 
+       Backport from mainline
3351
 
+       2014-11-20  Segher Boessenkool  <segher@kernel.crashing.org>
3352
 
+
3353
 
+       PR target/60111
3354
 
+       * config/sh/sh.c: Use signed char for signed field.
3355
 
+
3356
 
+2014-11-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3357
 
+
3358
 
+       PR target/63673
3359
 
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
3360
 
+       the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
3361
 
+       double.
3362
 
+
3363
 
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
3364
 
+
3365
 
+       PR target/63947
3366
 
+       * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
3367
 
+       Output "b" and "nb" suffix for FP mode.
3368
 
+
3369
 
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
3370
 
+
3371
 
+       Backport from mainline
3372
 
+       PR tree-optimization/62167
3373
 
+       * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
3374
 
+       conservatively.
3375
 
+       (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
3376
 
+       assigns.
3377
 
+
3378
 
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
3379
 
+
3380
 
+       Backport from mainline and gcc-4_9 branch.
3381
 
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
3382
 
+
3383
 
+       PR tree-optimization/63841
3384
 
+       * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
3385
 
+
3386
 
+2014-11-16  Eric Botcazou  <ebotcazou@adacore.com>
3387
 
+
3388
 
+       * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
3389
 
+       * doc/tm.texi: Regenerate.
3390
 
+
3391
 
+       Backport from mainline
3392
 
+       2013-09-16  Andreas Schwab  <schwab@linux-m68k.org>
3393
 
+
3394
 
+       * doc/tm.texi.in (Cond Exec Macros): Remove node.
3395
 
+       (Condition Code): Don't reference it.
3396
 
+       * doc/tm.texi: Regenerate.
3397
 
+
3398
 
+2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>
3399
 
+
3400
 
+       Backport from mainline
3401
 
+       2014-11-02  Michael Collison  <michael.collison@linaro.org>
3402
 
+
3403
 
+       * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
3404
 
+       to support vector modes.
3405
 
+       (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
3406
 
+
3407
 
+2014-11-13  Eric Botcazou  <ebotcazou@adacore.com>
3408
 
+
3409
 
+       * doc/tm.texi.in (SELECT_CC_MODE): Update example.
3410
 
+       (REVERSIBLE_CC_MODE): Fix example.
3411
 
+       (REVERSE_CONDITION): Fix typo.
3412
 
+       * doc/tm.texi: Regenerate.
3413
 
+
3414
 
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
3415
 
+
3416
 
+       PR ipa/63838
3417
 
+       * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
3418
 
+       chain instead of node->indirect_calls.
3419
 
+
3420
 
+2014-11-10  Daniel Hellstrom  <daniel@gaisler.com>
3421
 
+
3422
 
+       Backport from mainline
3423
 
+       * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
3424
 
+       * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
3425
 
+
3426
 
+2014-11-07  Daniel Hellstrom  <daniel@gaisler.com>
3427
 
+
3428
 
+       * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
3429
 
+       * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
3430
 
+       * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
3431
 
+       leon3v7 as leon3.
3432
 
+       * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
3433
 
+       * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
3434
 
+       * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
3435
 
+       * config/sparc/sparc.md (cpu): Add leon3v7.
3436
 
+       * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
3437
 
+
3438
 
+2014-11-06  John David Anglin  <danglin@gcc.gnu.org>
3439
 
+
3440
 
+       * config/pa/pa.md (trap): New insn.  Add "trap" to attribute type.
3441
 
+       Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
3442
 
+       or in_call_delay.
3443
 
+       
3444
 
+2014-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3445
 
+
3446
 
+       * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
3447
 
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3448
 
+       * config/aarch64/aarch64-linux.h
3449
 
+       (CA53_ERR_835769_SPEC): Define.
3450
 
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3451
 
+
3452
 
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3453
 
+
3454
 
+       * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
3455
 
+       recog state after aarch64_prev_real_insn call.
3456
 
+
3457
 
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3458
 
+
3459
 
+       * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
3460
 
+       if asked.
3461
 
+       * configure.ac: Add --enable-fix-cortex-a53-835769 option.
3462
 
+       * configure: Regenerate.
3463
 
+       * config/aarch64/aarch64.c (aarch64_override_options): Handle
3464
 
+       TARGET_FIX_ERR_A53_835769_DEFAULT.
3465
 
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
3466
 
+       to 2.
3467
 
+       * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
3468
 
+
3469
 
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3470
 
+
3471
 
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
3472
 
+       * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
3473
 
+       (FINAL_PRESCAN_INSN): Likewise.
3474
 
+       * config/aarch64/aarch64.h (is_mem_p): New function.
3475
 
+       (has_memory_op): Likewise.
3476
 
+       (aarch64_prev_real_insn): Likewise.
3477
 
+       (is_madd_op): Likewise.
3478
 
+       (dep_between_memop_and_curr): Likewise.
3479
 
+       (aarch64_madd_needs_nop): Likewise.
3480
 
+       (aarch64_final_prescan_insn): Likewise.
3481
 
+       * doc/invoke.texi (Document new option).
3482
 
+
3483
 
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
3484
 
+
3485
 
+       * stor-layout.c (self_referential_size): Do not promote arguments.
3486
 
+
3487
 
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3488
 
+
3489
 
+       Backport from mainline r215880
3490
 
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3491
 
+
3492
 
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3493
 
+       Issue a warning message when vec_lvsl or vec_lvsr is used with a
3494
 
+       little endian target.
3495
 
+
3496
 
+       Backport from mainline r215882
3497
 
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3498
 
+
3499
 
+       * altivec.md (altivec_lvsl): New define_expand.
3500
 
+       (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
3501
 
+       (altivec_lvsr): New define_expand.
3502
 
+       (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
3503
 
+       * rs6000.c (rs6000_expand_builtin): Change to use
3504
 
+       altivec_lvs[lr]_direct; remove commented-out code.
3505
 
+
3506
 
+2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
3507
 
+
3508
 
+       Backport from mainline
3509
 
+       2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
3510
 
+
3511
 
+       PR rtl-optimization/57003
3512
 
+       * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
3513
 
+       also check CALL_INSN_FUNCTION_USAGE for clobbers again after
3514
 
+       killing regs_invalidated_by_call.
3515
 
+
3516
 
+2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
3517
 
+
3518
 
+       Backport from mainline
3519
 
+       2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
3520
 
+
3521
 
+       PR target/52941
3522
 
+       * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
3523
 
+       atomic_fetch_<fetchop_name>si_hard,
3524
 
+       atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
3525
 
+       atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
3526
 
+       atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
3527
 
+       atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
3528
 
+
3529
 
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
3530
 
+
3531
 
+       PR tree-optimization/63375
3532
 
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
3533
 
+       references.
3534
 
+
3535
 
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
3536
 
+
3537
 
+       PR debug/63342
3538
 
+       * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
3539
 
+       SSA_NAME.
3540
 
+
3541
 
+       PR target/63428
3542
 
+       * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
3543
 
+       argument to avx2_permv2ti.
3544
 
+
3545
 
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
3546
 
+
3547
 
+       Backport from mainline
3548
 
+       2014-09-30  Uros Bizjak  <ubizjak@gmail.com>
3549
 
+
3550
 
+       * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
3551
 
+       (fmod<mode>3): Ditto.
3552
 
+       (fpremxf4_i387): Ditto.
3553
 
+       (reminderxf3): Ditto.
3554
 
+       (reminder<mode>3): Ditto.
3555
 
+       (fprem1xf4_i387): Ditto.
3556
 
+
3557
 
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
3558
 
+
3559
 
+       PR inline-asm/63282
3560
 
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
3561
 
+       or invert_jump_1 if jump isn't any_condjump_p.
3562
 
+
3563
 
+2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
3564
 
+
3565
 
+       Backport from mainline r212303
3566
 
+       PR target/49423
3567
 
+       * config/arm/arm-protos.h (arm_legitimate_address_p,
3568
 
+       arm_is_constant_pool_ref): Add prototypes.
3569
 
+       * config/arm/arm.c (arm_legitimate_address_p): Remove static.
3570
 
+       (arm_is_constant_pool_ref) New function.
3571
 
+       * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
3572
 
+       arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
3573
 
+       (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
3574
 
+       operand and remove pool_range and neg_pool_range attributes.
3575
 
+       (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
3576
 
+       pool_range and neg_pool_range attributes.
3577
 
+       * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
3578
 
+       constant pool references.
3579
 
+
3580
 
+2014-09-28  John David Anglin  <danglin@gcc.gnu.org>
3581
 
+
3582
 
+       * config/pa/pa.c (pa_output_function_epilogue): Only update
3583
 
+       last_address when a nonnote insn is found.
3584
 
+
3585
 
+2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
3586
 
+
3587
 
+       Backport from mainline
3588
 
+       2014-09-25  Nick Clifton  <nickc@redhat.com>
3589
 
+       2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
3590
 
+
3591
 
+       PR target/62218
3592
 
+       * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
3593
 
+       atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
3594
 
+
3595
 
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3596
 
+
3597
 
+       Backport from mainline r215559
3598
 
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3599
 
+
3600
 
+       PR target/63335
3601
 
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
3602
 
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
3603
 
+
3604
 
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3605
 
+
3606
 
+       PR tree-optimization/63341
3607
 
+       * tree-vectorizer.h (vect_create_data_ref_ptr,
3608
 
+       vect_create_addr_base_for_vector_ref): Add another tree argument
3609
 
+       defaulting to NULL_TREE.
3610
 
+       * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
3611
 
+       argument, pass it down to vect_create_addr_base_for_vector_ref.
3612
 
+       (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
3613
 
+       add that to base_offset too if non-NULL.
3614
 
+       * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
3615
 
+       for dr_explicit_realign_optimized set it to vector byte size
3616
 
+       - 1 instead of setting offset, pass byte_offset down to
3617
 
+       vect_create_data_ref_ptr.
3618
 
+
3619
 
+2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
3620
 
+
3621
 
+       Back port from trunk:
3622
 
+       2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
3623
 
+
3624
 
+       * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
3625
 
+       refine the constraints used on 32/64-bit floating point moves.
3626
 
+       (f32_av): Likewise.
3627
 
+       (f64_vsx): Likewise.
3628
 
+       (f64_dm): Likewise.
3629
 
+       (f64_av): Likewise.
3630
 
+       (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
3631
 
+       (BOOL_REGS_OP1): Likewise.
3632
 
+       (BOOL_REGS_OP2): Likewise.
3633
 
+       (BOOL_REGS_UNARY): Likewise.
3634
 
+       (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
3635
 
+       32/64-bit floating point moves.  Do not use wa, instead use ww/ws
3636
 
+       for moves involving VSX registers.  Do not use constraints that
3637
 
+       target VSX registers for decimal types.
3638
 
+       (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
3639
 
+       (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
3640
 
+
3641
 
+2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
3642
 
+
3643
 
+       Back port from trunk:
3644
 
+       2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
3645
 
+
3646
 
+       * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
3647
 
+       for base_reg_operand to be common between LO_SUM and PLUS.
3648
 
+       (fusion_gpr_mem_combo): New predicate to match a fused address
3649
 
+       that combines the addis and memory offset address.
3650
 
+
3651
 
+       * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
3652
 
+       calling signature.
3653
 
+       (emit_fusion_gpr_load): Likewise.
3654
 
+
3655
 
+       * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
3656
 
+       signature to pass each argument separately, rather than
3657
 
+       using an operands array.  Rewrite the insns found by peephole2 to
3658
 
+       be a single insn, rather than hoping the insns will still be
3659
 
+       together when the peephole pass is done.  Drop being called via a
3660
 
+       normal peephole.
3661
 
+       (emit_fusion_gpr_load): Change calling signature to be called from
3662
 
+       the fusion_gpr_load_<mode> insns with a combined memory address
3663
 
+       instead of the peephole pass passing the addis and offset
3664
 
+       separately.
3665
 
+
3666
 
+       * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
3667
 
+       fusion.
3668
 
+       (power8 fusion peephole): Drop support for doing power8 via a
3669
 
+       normal peephole that was created by the peephole2 pass.
3670
 
+       (power8 fusion peephole2): Create a new insn with the fused
3671
 
+       address, so that the fused operation is kept together after
3672
 
+       register allocation is done.
3673
 
+       (fusion_gpr_load_<mode>): Likewise.
3674
 
+
3675
 
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
3676
 
+
3677
 
+       PR debug/63284
3678
 
+       * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
3679
 
+       if there are only debug stmts after the noreturn call, instead
3680
 
+       remove the debug stmts.
3681
 
+
3682
 
+2014-09-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
3683
 
+
3684
 
+       * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
3685
 
+       V2DF, V4SF, DF, and DI modes.
3686
 
+       (vsx_fmav2df2): Likewise.
3687
 
+       (vsx_float_fix_<mode>2): Likewise.
3688
 
+       (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
3689
 
+
3690
 
+2014-09-10  Alan Modra  <amodra@gmail.com>
3691
 
+
3692
 
+       PR debug/60655
3693
 
+       * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
3694
 
+       can't be output.
3695
 
+
3696
 
+2014-09-09  Richard Biener  <rguenther@suse.de>
3697
 
+
3698
 
+       Backport from mainline
3699
 
+       2014-06-11  Richard Biener  <rguenther@suse.de>
3700
 
+
3701
 
+       PR tree-optimization/61452
3702
 
+       * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
3703
 
+       expr and has_constants in case we found a leader.
3704
 
+       (simplify_binary_expression): Always valueize operands first.
3705
 
+       (simplify_unary_expression): Likewise.
3706
 
+
3707
 
+2014-09-09  Richard Biener  <rguenther@suse.de>
3708
 
+
3709
 
+       Backport from mainline
3710
 
+       2014-05-05  Richard Biener  <rguenther@suse.de>
3711
 
+
3712
 
+       PR middle-end/61010
3713
 
+       * fold-const.c (fold_binary_loc): Consistently avoid
3714
 
+       canonicalizing X & CST away from a CST that is the mask
3715
 
+       of a mode.
3716
 
+
3717
 
+       2014-05-28  Richard Biener  <rguenther@suse.de>
3718
 
+
3719
 
+       PR middle-end/61045
3720
 
+       * fold-const.c (fold_comparison): When folding
3721
 
+       X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
3722
 
+       the sign of the remaining constant operand stays the same.
3723
 
+
3724
 
+       2014-08-11  Richard Biener  <rguenther@suse.de>
3725
 
+
3726
 
+       PR tree-optimization/62075
3727
 
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
3728
 
+       handle uses in patterns.
3729
 
+
3730
 
+2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
3731
 
+
3732
 
+       Backport from mainline.
3733
 
+       2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
3734
 
+
3735
 
+       * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
3736
 
+       (-mtune): Likewise.
3737
 
+       (-mcpu): Likewise.
3738
 
+
3739
 
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
3740
 
+
3741
 
+       PR tree-optimization/60196
3742
 
+       PR tree-optimization/63189
3743
 
+       Backported from mainline
3744
 
+       2013-09-17  Cong Hou  <congh@google.com>
3745
 
+
3746
 
+       * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
3747
 
+       when checking the dot production pattern. The type of rhs operand
3748
 
+       of multiply is now checked correctly.
3749
 
+
3750
 
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
3751
 
+
3752
 
+       Backported from mainline
3753
 
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
3754
 
+
3755
 
+       PR debug/61923
3756
 
+       * haifa-sched.c (advance_one_cycle): Fix dump.
3757
 
+       (schedule_block): Don't advance cycle if we are already at the
3758
 
+       beginning of the cycle.
3759
 
+
3760
 
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
3761
 
+
3762
 
+       PR ipa/62015
3763
 
+       * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
3764
 
+       pass-trough jump functions correctly.
3765
 
+
3766
 
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
3767
 
+
3768
 
+       PR ipa/61986
3769
 
+       * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
3770
 
+       created replacements in ascending order of offsets.
3771
 
+       (known_aggs_to_agg_replacement_list): Likewise.
3772
 
+
3773
 
+2014-09-01  Marek Polacek  <polacek@redhat.com>
3774
 
+
3775
 
+       Backport from mainline
3776
 
+       2014-08-21  Marek Polacek  <polacek@redhat.com>
3777
 
+
3778
 
+       PR c/61271
3779
 
+       * expr.c (is_aligning_offset): Remove logical not.
3780
 
+
3781
 
+2014-09-01  Marek Polacek  <polacek@redhat.com>
3782
 
+
3783
 
+       Backport from mainline
3784
 
+       2014-08-19  Marek Polacek  <polacek@redhat.com>
3785
 
+
3786
 
+       PR c/61271
3787
 
+       * cgraphunit.c (handle_alias_pairs): Fix condition.
3788
 
+
3789
 
+2014-08-30  John David Anglin  <danglin@gcc.gnu.org>
3790
 
+
3791
 
+       * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
3792
 
+       prefix to function labels when generating fast indirect calls.
3793
 
+
3794
 
+2014-08-26  Joel Sherrill <joel.sherrill@oarcorp.com>
3795
 
+
3796
 
+       * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
3797
 
+
3798
 
+2014-08-26  Marek Polacek  <polacek@redhat.com>
3799
 
+
3800
 
+       Backport from mainline
3801
 
+       2014-08-26  Marek Polacek  <polacek@redhat.com>
3802
 
+
3803
 
+       PR c/61271
3804
 
+       * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
3805
 
+       LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
3806
 
+
3807
 
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
3808
 
+
3809
 
+       Backport from mainline
3810
 
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
3811
 
+
3812
 
+       PR target/61996
3813
 
+       * config/sh/sh.opt (musermode): Allow negative form.
3814
 
+       * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
3815
 
+       targets that don't support it.
3816
 
+       * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
3817
 
+       Document -mno-usermode option.
3818
 
+
3819
 
+2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
3820
 
+
3821
 
+       PR target/62038
3822
 
+       * config/pa/pa.c (pa_output_function_epilogue): Don't set
3823
 
+       last_address when the current function is a thunk.
3824
 
+       (pa_asm_output_mi_thunk): When we don't have named sections or they
3825
 
+       are not being used, check that thunk can reach the stub table with a
3826
 
+       short branch.
3827
 
+
3828
 
+2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
3829
 
+
3830
 
+       Backport fro mainline
3831
 
+       2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
3832
 
+
3833
 
+       PR target/62195
3834
 
+       * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
3835
 
+       documentation to state it is only for VSX operations.
3836
 
+
3837
 
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
3838
 
+       constraint only active if VSX.
3839
 
+
3840
 
+       * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
3841
 
+       wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
3842
 
+       (lfiwzx): Likewise.
3843
 
+
3844
 
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
3845
 
+
3846
 
+       Backport from mainline:
3847
 
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
3848
 
+
3849
 
+       PR rtl-optimization/62004
3850
 
+       PR rtl-optimization/62030
3851
 
+       * ifcvt.c (rtx_interchangeable_p): New function.
3852
 
+       (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
3853
 
+
3854
 
+       2014-08-05  Richard Biener  <rguenther@suse.de>
3855
 
+
3856
 
+       * emit-rtl.h (mem_attrs_eq_p): Declare.
3857
 
+       * emit-rtl.c (mem_attrs_eq_p): Export.
3858
 
+
3859
 
+2014-08-16  John David Anglin  <danglin@gcc.gnu.org>
3860
 
+
3861
 
+       Backport from trunk:
3862
 
+       2014-04-06  John David Anglin  <danglin@gcc.gnu.org>
3863
 
+
3864
 
+       PR debug/55794
3865
 
+       * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
3866
 
+       size accounting for thunks.
3867
 
+       (pa_asm_output_mi_thunk): Use final_start_function() and
3868
 
+       final_end_function() to output function start and end directives.
3869
 
+
3870
 
+2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
3871
 
+
3872
 
+       Backport from mainline:
3873
 
+       2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
3874
 
+
3875
 
+       * doc/invoke.texi (SH options): Document missing processor variant
3876
 
+       options.  Remove references to Hitachi.  Undocument deprecated mspace
3877
 
+       option.
3878
 
+
3879
 
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
3880
 
+
3881
 
+       PR tree-optimization/62073
3882
 
+       * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
3883
 
+       a basic block.
3884
 
+
3885
 
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3886
 
+
3887
 
+       Backport from mainline
3888
 
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3889
 
+
3890
 
+       PR middle-end/62103
3891
 
+       * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
3892
 
+       bitfields, that is when size doesn't match the size of type or the
3893
 
+       size of the constructor.
3894
 
+
3895
 
+2014-08-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
3896
 
+
3897
 
+       Backport patch from mainline
3898
 
+       2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
3899
 
+
3900
 
+       * config/rs6000/constraints.md (wh constraint): New constraint,
3901
 
+       for FP registers if direct move is available.
3902
 
+       (wi constraint): New constraint, for VSX/FP registers that can
3903
 
+       handle 64-bit integers.
3904
 
+       (wj constraint): New constraint for VSX/FP registers that can
3905
 
+       handle 64-bit integers for direct moves.
3906
 
+       (wk constraint): New constraint for VSX/FP registers that can
3907
 
+       handle 64-bit doubles for direct moves.
3908
 
+       (wy constraint): Make documentation match implementation.
3909
 
+
3910
 
+       * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
3911
 
+       scalar_in_vmx_p field to simplify tests of whether SFmode or
3912
 
+       DFmode can go in the Altivec registers.
3913
 
+       (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
3914
 
+       (rs6000_setup_reg_addr_masks): Likewise.
3915
 
+       (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
3916
 
+       field, and wh/wi/wj/wk constraints.
3917
 
+       (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
3918
 
+       the wh/wi/wj/wk constraints.
3919
 
+       (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
3920
 
+       upper registers, prefer VSX registers unless the operation is a
3921
 
+       memory operation with REG+OFFSET addressing.
3922
 
+
3923
 
+       * config/rs6000/vsx.md (VSr mode attribute): Add support for
3924
 
+       DImode.  Change SFmode to use ww constraint instead of d to allow
3925
 
+       SF registers in the upper registers.
3926
 
+       (VSr2): Likewise.
3927
 
+       (VSr3): Likewise.
3928
 
+       (VSr5): Fix thinko in comment.
3929
 
+       (VSa): New mode attribute that is an alternative to wa, that
3930
 
+       returns the VSX register class that a mode can go in, but may not
3931
 
+       be the preferred register class.
3932
 
+       (VS_64dm): New mode attribute for appropriate register classes for
3933
 
+       referencing 64-bit elements of vectors for direct moves and normal
3934
 
+       moves.
3935
 
+       (VS_64reg): Likewise.
3936
 
+       (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
3937
 
+       register allocator to only registers the data type can handle.
3938
 
+       (vsx_le_perm_load_<mode>): Likewise.
3939
 
+       (vsx_le_perm_store_<mode>): Likewise.
3940
 
+       (vsx_xxpermdi2_le_<mode>): Likewise.
3941
 
+       (vsx_xxpermdi4_le_<mode>): Likewise.
3942
 
+       (vsx_lxvd2x2_le_<mode>): Likewise.
3943
 
+       (vsx_lxvd2x4_le_<mode>): Likewise.
3944
 
+       (vsx_stxvd2x2_le_<mode>): Likewise.
3945
 
+       (vsx_add<mode>3): Likewise.
3946
 
+       (vsx_sub<mode>3): Likewise.
3947
 
+       (vsx_mul<mode>3): Likewise.
3948
 
+       (vsx_div<mode>3): Likewise.
3949
 
+       (vsx_tdiv<mode>3_internal): Likewise.
3950
 
+       (vsx_fre<mode>2): Likewise.
3951
 
+       (vsx_neg<mode>2): Likewise.
3952
 
+       (vsx_abs<mode>2): Likewise.
3953
 
+       (vsx_nabs<mode>2): Likewise.
3954
 
+       (vsx_smax<mode>3): Likewise.
3955
 
+       (vsx_smin<mode>3): Likewise.
3956
 
+       (vsx_sqrt<mode>2): Likewise.
3957
 
+       (vsx_rsqrte<mode>2): Likewise.
3958
 
+       (vsx_tsqrt<mode>2_internal): Likewise.
3959
 
+       (vsx_fms<mode>4): Likewise.
3960
 
+       (vsx_nfma<mode>4): Likewise.
3961
 
+       (vsx_eq<mode>): Likewise.
3962
 
+       (vsx_gt<mode>): Likewise.
3963
 
+       (vsx_ge<mode>): Likewise.
3964
 
+       (vsx_eq<mode>_p): Likewise.
3965
 
+       (vsx_gt<mode>_p): Likewise.
3966
 
+       (vsx_ge<mode>_p): Likewise.
3967
 
+       (vsx_xxsel<mode>): Likewise.
3968
 
+       (vsx_xxsel<mode>_uns): Likewise.
3969
 
+       (vsx_copysign<mode>3): Likewise.
3970
 
+       (vsx_float<VSi><mode>2): Likewise.
3971
 
+       (vsx_floatuns<VSi><mode>2): Likewise.
3972
 
+       (vsx_fix_trunc<mode><VSi>2): Likewise.
3973
 
+       (vsx_fixuns_trunc<mode><VSi>2): Likewise.
3974
 
+       (vsx_x<VSv>r<VSs>i): Likewise.
3975
 
+       (vsx_x<VSv>r<VSs>ic): Likewise.
3976
 
+       (vsx_btrunc<mode>2): Likewise.
3977
 
+       (vsx_b2trunc<mode>2): Likewise.
3978
 
+       (vsx_floor<mode>2): Likewise.
3979
 
+       (vsx_ceil<mode>2): Likewise.
3980
 
+       (vsx_<VS_spdp_insn>): Likewise.
3981
 
+       (vsx_xscvspdp): Likewise.
3982
 
+       (vsx_xvcvspuxds): Likewise.
3983
 
+       (vsx_float_fix_<mode>2): Likewise.
3984
 
+       (vsx_set_<mode>): Likewise.
3985
 
+       (vsx_extract_<mode>_internal1): Likewise.
3986
 
+       (vsx_extract_<mode>_internal2): Likewise.
3987
 
+       (vsx_extract_<mode>_load): Likewise.
3988
 
+       (vsx_extract_<mode>_store): Likewise.
3989
 
+       (vsx_splat_<mode>): Likewise.
3990
 
+       (vsx_xxspltw_<mode>): Likewise.
3991
 
+       (vsx_xxspltw_<mode>_direct): Likewise.
3992
 
+       (vsx_xxmrghw_<mode>): Likewise.
3993
 
+       (vsx_xxmrglw_<mode>): Likewise.
3994
 
+       (vsx_xxsldwi_<mode>): Likewise.
3995
 
+       (vsx_xscvdpspn): Tighten constraints to only use register classes
3996
 
+       the types use.
3997
 
+       (vsx_xscvspdpn): Likewise.
3998
 
+       (vsx_xscvdpspn_scalar): Likewise.
3999
 
+
4000
 
+       * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
4001
 
+       wj, and wk constraints.
4002
 
+       (GPR_REG_CLASS_P): New helper macro for register classes targeting
4003
 
+       general purpose registers.
4004
 
+
4005
 
+       * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
4006
 
+       direct moves.
4007
 
+       (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
4008
 
+       DImode instead of wm.  Use wk constraint for direct move of DFmode
4009
 
+       instead of wm.
4010
 
+       (extendsidi2_lfiwax): Likewise.
4011
 
+       (lfiwax): Likewise.
4012
 
+       (lfiwzx): Likewise.
4013
 
+       (movdi_internal64): Likewise.
4014
 
+
4015
 
+       * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
4016
 
+       wk constraints. Make the wy constraint documentation match them
4017
 
+       implementation.
4018
 
+
4019
 
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4020
 
+
4021
 
+       Backport from mainline
4022
 
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4023
 
+
4024
 
+       PR tree-optimization/61375
4025
 
+       * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
4026
 
+       symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
4027
 
+       (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
4028
 
+
4029
 
+2014-08-01  Richard Biener  <rguenther@suse.de>
4030
 
+
4031
 
+       PR tree-optimization/61964
4032
 
+       * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
4033
 
+       function merged from trunk.
4034
 
+       (gimple_equal_p): Handle non-SSA LHS solely by structural
4035
 
+       equality.
4036
 
+
4037
 
+2014-07-25  Uros Bizjak  <ubizjak@gmail.com>
4038
 
+
4039
 
+       * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
4040
 
+
4041
 
+2014-07-24  Kyle McMartin  <kyle@redhat.com>
4042
 
+
4043
 
+       * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
4044
 
+
4045
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
4046
 
+
4047
 
+       * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
4048
 
+       Add prototype.
4049
 
+       * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
4050
 
+       function.  Issue -Wpsabi warning if future GCC releases will use
4051
 
+       different field alignment rules for this type.
4052
 
+       * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
4053
 
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
4054
 
+       * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
4055
 
+
4056
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
4057
 
+
4058
 
+       * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
4059
 
+       -Wpsabi note when encountering a type where future GCC releases
4060
 
+       will apply different alignment requirements.
4061
 
+
4062
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
4063
 
+
4064
 
+       * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
4065
 
+       does not fit fully into floating-point registers, and there is still
4066
 
+       space in the register parameter area, issue -Wpsabi note that the ABI
4067
 
+       will change in a future GCC release.
4068
 
+
4069
 
+2014-07-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4070
 
+
4071
 
+       * config/arm/t-rtems-eabi: Add
4072
 
+       mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
4073
 
+       mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
4074
 
+       mbig-endian/mthumb/march=armv7-r, and
4075
 
+       mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
4076
 
+       multilibs.
4077
 
+
4078
 
+2014-07-21  Peter Bergner  <bergner@vnet.ibm.com>
4079
 
+
4080
 
+       * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
4081
 
+       (LIBTSAN_EARLY_SPEC): Likewise.
4082
 
+       (STATIC_LIBASAN_LIBS): Likewise.
4083
 
+       (STATIC_LIBTSAN_LIBS): Likewise.
4084
 
+
4085
 
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
4086
 
+
4087
 
+       * toplev.c (output_stack_usage): Adjust the location of the warning.
4088
 
+
4089
 
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
4090
 
+
4091
 
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
4092
 
+       (*membar_storeload): Disable for LEON3.
4093
 
+
4094
 
+2014-07-17  Richard Biener  <rguenther@suse.de>
4095
 
+
4096
 
+       PR rtl-optimization/61801
4097
 
+       * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
4098
 
+       ASM_INPUT don't set reg_pending_barrier if it appears in a
4099
 
+       debug-insn.
4100
 
+
4101
 
+2014-07-16  Jakub Jelinek  <jakub@redhat.com>
4102
 
+
4103
 
+       * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
4104
 
+       on the FUNCTION_DECL.
4105
 
+
4106
 
+2014-07-10  Tom G. Christensen  <tgc@jupiterrise.com>
4107
 
+
4108
 
+       * doc/install.texi: Remove links to defunct package providers for
4109
 
+       Solaris.
4110
 
+
4111
 
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
4112
 
+
4113
 
+       PR middle-end/53590
4114
 
+       * function.c (allocate_struct_function): Revert r188667 change.
4115
 
+
4116
 
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
4117
 
+
4118
 
+       PR tree-optimization/61684
4119
 
+       * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
4120
 
+       rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
4121
 
+
4122
 
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4123
 
+
4124
 
+       Backport from Mainline
4125
 
+       2014-06-20  Jakub Jelinek  <jakub@redhat.com>
4126
 
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4127
 
+
4128
 
+       PR tree-optimization/61306
4129
 
+       * tree-ssa-math-opts.c (struct symbolic_number): Store type of
4130
 
+       expression instead of its size.
4131
 
+       (do_shift_rotate): Adapt to change in struct symbolic_number. Return
4132
 
+       false to prevent optimization when the result is unpredictable due to
4133
 
+       arithmetic right shift of signed type with highest byte is set.
4134
 
+       (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
4135
 
+       (find_bswap_1): Likewise. Return NULL to prevent optimization when the
4136
 
+       result is unpredictable due to sign extension.
4137
 
+       (find_bswap): Adapt to change in struct symbolic_number.
4138
 
+
4139
 
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
4140
 
+
4141
 
+       Backport from mainline
4142
 
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
4143
 
+
4144
 
+       PR target/61586
4145
 
+       * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
4146
 
+
4147
 
+2014-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4148
 
+
4149
 
+       PR target/61542
4150
 
+       * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
4151
 
+       extraction other than index 3.
4152
 
+
4153
 
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
4154
 
+
4155
 
+       PR target/61570
4156
 
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
4157
 
+       model family 6 CPU with has_longmode never use a CPU without
4158
 
+       64-bit support.
4159
 
+
4160
 
+2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
4161
 
+
4162
 
+       Backport from mainline
4163
 
+
4164
 
+       2014-06-20  Julian Brown  <julian@codesourcery.com>
4165
 
+                   Chung-Lin Tang  <cltang@codesourcery.com>
4166
 
+
4167
 
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
4168
 
+       TARGET_THUMB1_ONLY. Add comments.
4169
 
+
4170
 
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
4171
 
+
4172
 
+       Backport from mainline
4173
 
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
4174
 
+
4175
 
+       PR target/61423
4176
 
+       * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
4177
 
+       define_insn_and_split pattern, merged from *floatunssi<mode>2_1
4178
 
+       and corresponding splitters.  Zero extend general register
4179
 
+       or memory input operand to XMM temporary.  Enable for
4180
 
+       TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
4181
 
+       (floatunssi<mode>2): Update expander predicate.
4182
 
+
4183
 
+2014-06-18  Richard Henderson  <rth@redhat.com>
4184
 
+
4185
 
+       PR target/61545
4186
 
+       * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
4187
 
+
4188
 
+2014-06-17  Nagaraju Mekala <nagaraju.mekala@xilinx.com>
4189
 
+
4190
 
+       Revert on gcc-4_8-branch.
4191
 
+       * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
4192
 
+       * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
4193
 
+
4194
 
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
4195
 
+
4196
 
+       Backport from mainline
4197
 
+
4198
 
+       PR target/61483
4199
 
+       * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
4200
 
+       variable 'size'; calculate 'size' right in the front; use
4201
 
+       'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
4202
 
+       pcum->aapcs_stack_words.
4203
 
+
4204
 
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
4205
 
+
4206
 
+       Backport from mainline
4207
 
+
4208
 
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
4209
 
+       PR target/61415
4210
 
+       * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
4211
 
+       (BU_MISC_2): Rename to ...
4212
 
+       (BU_LDBL128_2): ... this.
4213
 
+       * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
4214
 
+       (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
4215
 
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
4216
 
+       RS6000_BTM_LDBL128.
4217
 
+       (rs6000_invalid_builtin): Add long double 128-bit builtin support.
4218
 
+       (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
4219
 
+       * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
4220
 
+       (unpacktf_1): Likewise.
4221
 
+       * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
4222
 
+       (__builtin_longdouble_dw1): Likewise.
4223
 
+       * doc/sourcebuild.texi (longdouble128): Document.
4224
 
+
4225
 
+2014-06-13  Jason Merrill  <jason@redhat.com>
4226
 
+
4227
 
+       PR c++/60731
4228
 
+       * common.opt (-fno-gnu-unique): Add.
4229
 
+       * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
4230
 
+
4231
 
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
4232
 
+
4233
 
+       Backport from 2014-05-09 trunk r210272
4234
 
+
4235
 
+       * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
4236
 
+       unsigned int initializers for regno_in, regno_out.
4237
 
+
4238
 
+       Backport from 2014-05-14 trunk r210418
4239
 
+       * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
4240
 
+       shifted values to avoid build warning.
4241
 
+
4242
 
+       Backport from 2014-06-12 trunk r211491
4243
 
+
4244
 
+       PR target/61443
4245
 
+       * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
4246
 
+       loading from address spaces.
4247
 
+
4248
 
+2014-06-12  Alan Modra  <amodra@gmail.com>
4249
 
+
4250
 
+       PR target/61300
4251
 
+       * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
4252
 
+       * doc/tm.texi: Regenerate.
4253
 
+       * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
4254
 
+       Use throughout in place of REG_PARM_STACK_SPACE.
4255
 
+       * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
4256
 
+       "incoming" param.  Pass to rs6000_function_parms_need_stack.
4257
 
+       (rs6000_function_parms_need_stack): Add "incoming" param, ignore
4258
 
+       prototype_p when incoming.  Use function decl when incoming
4259
 
+       to handle K&R style functions.
4260
 
+       * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
4261
 
+       (INCOMING_REG_PARM_STACK_SPACE): Define.
4262
 
+
4263
 
+2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
4264
 
+
4265
 
+       Back port from trunk
4266
 
+       2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
4267
 
+
4268
 
+       PR target/61431
4269
 
+       * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
4270
 
+       iterators, VSX_D that handles 64-bit types, and VSX_LE that
4271
 
+       handles swapping the two 64-bit double words on little endian
4272
 
+       systems.  Include V1TImode and optionally TImode in VSX_LE so that
4273
 
+       these types are properly swapped.  Change all of the insns and
4274
 
+       splits that do the 64-bit swaps to use VSX_LE.
4275
 
+       (vsx_le_perm_load_<mode>): Likewise.
4276
 
+       (vsx_le_perm_store_<mode>): Likewise.
4277
 
+       (splitters for little endian memory operations): Likewise.
4278
 
+       (vsx_xxpermdi2_le_<mode>): Likewise.
4279
 
+       (vsx_lxvd2x2_le_<mode>): Likewise.
4280
 
+       (vsx_stxvd2x2_le_<mode>): Likewise.
4281
 
+
4282
 
+2014-06-05  Martin Jambor  <mjambor@suse.cz>
4283
 
+
4284
 
+       PR ipa/61393
4285
 
+       * ipa-cp.c (determine_versionability): Pretend that tm_clones are
4286
 
+       not versionable.
4287
 
+
4288
 
+2014-06-04  Richard Biener  <rguenther@suse.de>
4289
 
+
4290
 
+       PR tree-optimization/61383
4291
 
+       * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
4292
 
+       stmts can't trap.
4293
 
+
4294
 
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
4295
 
+
4296
 
+       Backport from mainline
4297
 
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
4298
 
+
4299
 
+       PR rtl-optimization/60866
4300
 
+       * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
4301
 
+       Default it to -1.  Pass it down to init_simplejump_data.
4302
 
+       (init_simplejump_data): New parameter old_seqno.  Pass it down
4303
 
+       to get_seqno_for_a_jump.
4304
 
+       (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
4305
 
+       initializing new jump seqno as a last resort.  Add comment.
4306
 
+       (sel_redirect_edge_and_branch): Save old seqno of the conditional
4307
 
+       jump and pass it down to sel_init_new_insn.
4308
 
+       (sel_redirect_edge_and_branch_force): Likewise.
4309
 
+
4310
 
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
4311
 
+
4312
 
+       Backport from mainline
4313
 
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
4314
 
+
4315
 
+       PR rtl-optimization/60901
4316
 
+       * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
4317
 
+       bb predecessor belongs to the same scheduling region.  Adjust comment.
4318
 
+
4319
 
+2014-06-03  Uros Bizjak  <ubizjak@gmail.com>
4320
 
+
4321
 
+       Backport from mainline
4322
 
+       2014-06-02  Uros Bizjak  <ubizjak@gmail.com>
4323
 
+
4324
 
+       PR target/61239
4325
 
+       * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
4326
 
+       GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
4327
 
+
4328
 
+2014-05-28  Guozhi Wei  <carrot@google.com>
4329
 
+
4330
 
+       PR target/61202
4331
 
+       * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
4332
 
+       constraint.
4333
 
+       (vqdmulhq_n_s16): Likewise.
4334
 
+
4335
 
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
4336
 
+
4337
 
+       Backport from mainline
4338
 
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
4339
 
+
4340
 
+       * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
4341
 
+       predicate to detect a negative quotient.
4342
 
+
4343
 
+2014-05-28  Georg-Johann Lay  <avr@gjlay.de>
4344
 
+
4345
 
+       PR target/61044
4346
 
+       * doc/extend.texi (Local Labels): Note that label differences are
4347
 
+       not supported for AVR.
4348
 
+
4349
 
+2014-05-26  Michael Tautschnig  <mt@debian.org>
4350
 
+
4351
 
+       PR target/61249
4352
 
+       * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
4353
 
+       __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
4354
 
+
4355
 
+2014-05-23  Alan Modra  <amodra@gmail.com>
4356
 
+
4357
 
+       PR target/61231
4358
 
+       * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
4359
 
+       * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
4360
 
+       Use "Y" constraint rather than "m".
4361
 
+
4362
 
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
4363
 
+
4364
 
+       Backport from mainline
4365
 
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
4366
 
+
4367
 
+       * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
4368
 
+
4369
 
+2014-05-22  Richard Earnshaw  <rearnsha@arm.com>
4370
 
+
4371
 
+       PR target/61208
4372
 
+       * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
4373
 
+
4374
 
 2014-05-22  Release Manager
4375
 
 
4376
 
        * GCC 4.8.3 released.
4377
 
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
4378
 
===================================================================
4379
 
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../tags/gcc_4_8_3_release)
4380
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../branches/gcc-4_8-branch)
4381
 
@@ -0,0 +1,14 @@
4382
 
+/* Test for deprecation messages on use of lvsl and lvsr for little endian.  */
4383
 
+
4384
 
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4385
 
+/* { dg-options "-O0 -Wdeprecated" } */
4386
 
+
4387
 
+#include <altivec.h>
4388
 
+
4389
 
+float f[20];
4390
 
+
4391
 
+void foo ()
4392
 
+{
4393
 
+  vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
4394
 
+  vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
4395
 
+}
4396
 
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
4397
 
===================================================================
4398
 
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../tags/gcc_4_8_3_release)
4399
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../branches/gcc-4_8-branch)
4400
 
@@ -0,0 +1,30 @@
4401
 
+/* { dg-do run { target { powerpc64*-*-* } } } */
4402
 
+/* { dg-require-effective-target powerpc_vsx_ok } */
4403
 
+/* { dg-options "-mvsx" } */
4404
 
+
4405
 
+#include <altivec.h>
4406
 
+
4407
 
+void abort (void);
4408
 
+
4409
 
+vector double vec = (vector double) {99.0, 99.0};
4410
 
+
4411
 
+int main() {
4412
 
+
4413
 
+  int actual = vec_all_nge(vec, vec);
4414
 
+  if ( actual != 0)
4415
 
+    abort();
4416
 
+
4417
 
+  actual = vec_all_nle(vec, vec);
4418
 
+  if ( actual != 0)
4419
 
+    abort();
4420
 
+
4421
 
+  actual = vec_any_nge(vec, vec);
4422
 
+  if ( actual != 0)
4423
 
+    abort();
4424
 
+
4425
 
+  actual = vec_any_nle(vec, vec);
4426
 
+  if ( actual != 0)
4427
 
+    abort();
4428
 
+
4429
 
+  return 0;
4430
 
+}
4431
 
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
4432
 
===================================================================
4433
 
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../tags/gcc_4_8_3_release)
4434
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../branches/gcc-4_8-branch)
4435
 
@@ -1,7 +1,7 @@
4436
 
 /* { dg-do compile { target { powerpc*-*-* } } } */
4437
 
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4438
 
 /* { dg-require-effective-target powerpc_vsx_ok } */
4439
 
-/* { dg-options "-O3 -mcpu=power7" } */
4440
 
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
4441
 
 
4442
 
 /* Test the various load/store varients.  */
4443
 
 
4444
 
Index: gcc/testsuite/gcc.target/powerpc/builtins-1.c
4445
 
===================================================================
4446
 
--- a/src/gcc/testsuite/gcc.target/powerpc/builtins-1.c (.../tags/gcc_4_8_3_release)
4447
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/builtins-1.c (.../branches/gcc-4_8-branch)
4448
 
@@ -0,0 +1,166 @@
4449
 
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4450
 
+/* { dg-options "-mcpu=power8 -O0" } */
4451
 
+
4452
 
+/* Test that a number of newly added builtin overloads are accepted
4453
 
+   by the compiler.  */
4454
 
+
4455
 
+#include <altivec.h>
4456
 
+
4457
 
+vector double y = { 2.0, 4.0 };
4458
 
+vector double z;
4459
 
+
4460
 
+int main ()
4461
 
+{
4462
 
+  vector float fa = {1.0, 2.0, 3.0, -4.0};
4463
 
+  vector float fb = {-2.0, -3.0, -4.0, -5.0};
4464
 
+  vector float fc = vec_cpsgn (fa, fb);
4465
 
+
4466
 
+  vector long long la = {5L, 14L};
4467
 
+  vector long long lb = {3L, 86L};
4468
 
+  vector long long lc = vec_and (la, lb);
4469
 
+  vector bool long long ld = {0, -1};
4470
 
+  vector long long le = vec_and (la, ld);
4471
 
+  vector long long lf = vec_and (ld, lb);
4472
 
+
4473
 
+  vector unsigned long long ua = {5L, 14L};
4474
 
+  vector unsigned long long ub = {3L, 86L};
4475
 
+  vector unsigned long long uc = vec_and (ua, ub);
4476
 
+  vector bool long long ud = {0, -1};
4477
 
+  vector unsigned long long ue = vec_and (ua, ud);
4478
 
+  vector unsigned long long uf = vec_and (ud, ub);
4479
 
+
4480
 
+  vector long long lg = vec_andc (la, lb);
4481
 
+  vector long long lh = vec_andc (la, ld);
4482
 
+  vector long long li = vec_andc (ld, lb);
4483
 
+
4484
 
+  vector unsigned long long ug = vec_andc (ua, ub);
4485
 
+  vector unsigned long long uh = vec_andc (ua, ud);
4486
 
+  vector unsigned long long ui = vec_andc (ud, ub);
4487
 
+
4488
 
+  vector double da = {1.0, -4.0};
4489
 
+  vector double db = {-2.0, 5.0};
4490
 
+  vector double dc = vec_cpsgn (da, db);
4491
 
+
4492
 
+  vector long long lj = vec_mergeh (la, lb);
4493
 
+  vector long long lk = vec_mergeh (la, ld);
4494
 
+  vector long long ll = vec_mergeh (ld, la);
4495
 
+
4496
 
+  vector unsigned long long uj = vec_mergeh (ua, ub);
4497
 
+  vector unsigned long long uk = vec_mergeh (ua, ud);
4498
 
+  vector unsigned long long ul = vec_mergeh (ud, ua);
4499
 
+
4500
 
+  vector long long lm = vec_mergel (la, lb);
4501
 
+  vector long long ln = vec_mergel (la, ld);
4502
 
+  vector long long lo = vec_mergel (ld, la);
4503
 
+
4504
 
+  vector unsigned long long um = vec_mergel (ua, ub);
4505
 
+  vector unsigned long long un = vec_mergel (ua, ud);
4506
 
+  vector unsigned long long uo = vec_mergel (ud, ua);
4507
 
+
4508
 
+  vector long long lp = vec_nor (la, lb);
4509
 
+  vector long long lq = vec_nor (la, ld);
4510
 
+  vector long long lr = vec_nor (ld, la);
4511
 
+
4512
 
+  vector unsigned long long up = vec_nor (ua, ub);
4513
 
+  vector unsigned long long uq = vec_nor (ua, ud);
4514
 
+  vector unsigned long long ur = vec_nor (ud, ua);
4515
 
+
4516
 
+  vector long long ls = vec_or (la, lb);
4517
 
+  vector long long lt = vec_or (la, ld);
4518
 
+  vector long long lu = vec_or (ld, la);
4519
 
+
4520
 
+  vector unsigned long long us = vec_or (ua, ub);
4521
 
+  vector unsigned long long ut = vec_or (ua, ud);
4522
 
+  vector unsigned long long uu = vec_or (ud, ua);
4523
 
+
4524
 
+  vector unsigned char ca = {0,4,8,1,5,9,2,6,10,3,7,11,15,12,14,13};
4525
 
+  vector long long lv = vec_perm (la, lb, ca);
4526
 
+  vector unsigned long long uv = vec_perm (ua, ub, ca);
4527
 
+
4528
 
+  vector long long lw = vec_sel (la, lb, lc);
4529
 
+  vector long long lx = vec_sel (la, lb, uc);
4530
 
+  vector long long ly = vec_sel (la, lb, ld);
4531
 
+
4532
 
+  vector unsigned long long uw = vec_sel (ua, ub, lc);
4533
 
+  vector unsigned long long ux = vec_sel (ua, ub, uc);
4534
 
+  vector unsigned long long uy = vec_sel (ua, ub, ld);
4535
 
+
4536
 
+  vector long long lz = vec_xor (la, lb);
4537
 
+  vector long long l0 = vec_xor (la, ld);
4538
 
+  vector long long l1 = vec_xor (ld, la);
4539
 
+
4540
 
+  vector unsigned long long uz = vec_xor (ua, ub);
4541
 
+  vector unsigned long long u0 = vec_xor (ua, ud);
4542
 
+  vector unsigned long long u1 = vec_xor (ud, ua);
4543
 
+
4544
 
+  int ia = vec_all_eq (ua, ub);
4545
 
+  int ib = vec_all_ge (ua, ub);
4546
 
+  int ic = vec_all_gt (ua, ub);
4547
 
+  int id = vec_all_le (ua, ub);
4548
 
+  int ie = vec_all_lt (ua, ub);
4549
 
+  int ig = vec_all_ne (ua, ub);
4550
 
+
4551
 
+  int ih = vec_any_eq (ua, ub);
4552
 
+  int ii = vec_any_ge (ua, ub);
4553
 
+  int ij = vec_any_gt (ua, ub);
4554
 
+  int ik = vec_any_le (ua, ub);
4555
 
+  int il = vec_any_lt (ua, ub);
4556
 
+  int im = vec_any_ne (ua, ub);
4557
 
+
4558
 
+  vector int sia = {9, 16, 25, 36};
4559
 
+  vector int sib = {-8, -27, -64, -125};
4560
 
+  vector int sic = vec_mergee (sia, sib);
4561
 
+  vector int sid = vec_mergeo (sia, sib);
4562
 
+
4563
 
+  vector unsigned int uia = {9, 16, 25, 36};
4564
 
+  vector unsigned int uib = {8, 27, 64, 125};
4565
 
+  vector unsigned int uic = vec_mergee (uia, uib);
4566
 
+  vector unsigned int uid = vec_mergeo (uia, uib);
4567
 
+
4568
 
+  vector bool int bia = {0, -1, -1, 0};
4569
 
+  vector bool int bib = {-1, -1, 0, -1};
4570
 
+  vector bool int bic = vec_mergee (bia, bib);
4571
 
+  vector bool int bid = vec_mergeo (bia, bib);
4572
 
+
4573
 
+  vector unsigned int uie = vec_packsu (ua, ub);
4574
 
+
4575
 
+  vector long long l2 = vec_cntlz (la);
4576
 
+  vector unsigned long long u2 = vec_cntlz (ua);
4577
 
+  vector int sie = vec_cntlz (sia);
4578
 
+  vector unsigned int uif = vec_cntlz (uia);
4579
 
+  vector short ssa = {20, -40, -60, 80, 100, -120, -140, 160};
4580
 
+  vector short ssb = vec_cntlz (ssa);
4581
 
+  vector unsigned short usa = {81, 72, 63, 54, 45, 36, 27, 18};
4582
 
+  vector unsigned short usb = vec_cntlz (usa);
4583
 
+  vector signed char sca = {-4, 3, -9, 15, -31, 31, 0, 0,
4584
 
+                           1, 117, -36, 99, 98, 97, 96, 95};
4585
 
+  vector signed char scb = vec_cntlz (sca);
4586
 
+  vector unsigned char cb = vec_cntlz (ca);
4587
 
+
4588
 
+  vector double dd = vec_xl (0, &y);
4589
 
+  vec_xst (dd, 0, &z);
4590
 
+
4591
 
+  vector double de = vec_round (dd);
4592
 
+
4593
 
+  vector double df = vec_splat (de, 0);
4594
 
+  vector double dg = vec_splat (de, 1);
4595
 
+  vector long long l3 = vec_splat (l2, 0);
4596
 
+  vector long long l4 = vec_splat (l2, 1);
4597
 
+  vector unsigned long long u3 = vec_splat (u2, 0);
4598
 
+  vector unsigned long long u4 = vec_splat (u2, 1);
4599
 
+  vector bool long long l5 = vec_splat (ld, 0);
4600
 
+  vector bool long long l6 = vec_splat (ld, 1);
4601
 
+
4602
 
+  vector long long l7 = vec_div (l3, l4);
4603
 
+  vector unsigned long long u5 = vec_div (u3, u4);
4604
 
+
4605
 
+  vector long long l8 = vec_mul (l3, l4);
4606
 
+  vector unsigned long long u6 = vec_mul (u3, u4);
4607
 
+
4608
 
+  vector double dh = vec_ctf (la, -2);
4609
 
+  vector double di = vec_ctf (ua, 2);
4610
 
+  vector long long l9 = vec_cts (dh, -2);
4611
 
+  vector unsigned long long u7 = vec_ctu (di, 2);
4612
 
+
4613
 
+  return 0;
4614
 
+}
4615
 
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
4616
 
===================================================================
4617
 
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
4618
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
4619
 
@@ -1,6 +1,7 @@
4620
 
 /* { dg-do assemble } */
4621
 
 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
4622
 
 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
4623
 
+/* { dg-require-effective-target longdouble128 } */
4624
 
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
4625
 
 
4626
 
 typedef float TFmode __attribute__ ((mode (TF)));
4627
 
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
4628
 
===================================================================
4629
 
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../tags/gcc_4_8_3_release)
4630
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../branches/gcc-4_8-branch)
4631
 
@@ -2,6 +2,7 @@
4632
 
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4633
 
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
4634
 
 /* { dg-require-effective-target powerpc_fprs } */
4635
 
+/* { dg-require-effective-target longdouble128 } */
4636
 
 /* { dg-options "-O2 -mhard-float" } */
4637
 
 
4638
 
 #include <stddef.h>
4639
 
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
4640
 
===================================================================
4641
 
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../tags/gcc_4_8_3_release)
4642
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../branches/gcc-4_8-branch)
4643
 
@@ -0,0 +1,12 @@
4644
 
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4645
 
+/* { dg-options "-mabi=elfv2" } */
4646
 
+
4647
 
+struct f8
4648
 
+  {
4649
 
+    float x[8];
4650
 
+  };
4651
 
+
4652
 
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
4653
 
+{
4654
 
+}
4655
 
+
4656
 
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
4657
 
===================================================================
4658
 
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../tags/gcc_4_8_3_release)
4659
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../branches/gcc-4_8-branch)
4660
 
@@ -0,0 +1,14 @@
4661
 
+/* { dg-do compile { target { powerpc*-*-* } } } */
4662
 
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4663
 
+/* { dg-require-effective-target powerpc_htm_ok } */
4664
 
+/* { dg-options "-O2 -mhtm" } */
4665
 
+
4666
 
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
4667
 
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
4668
 
+
4669
 
+#include <htmintrin.h>
4670
 
+long
4671
 
+ttest (void)
4672
 
+{
4673
 
+  return _HTM_STATE(__builtin_ttest());
4674
 
+}
4675
 
Index: gcc/testsuite/gcc.target/powerpc/builtins-2.c
4676
 
===================================================================
4677
 
--- a/src/gcc/testsuite/gcc.target/powerpc/builtins-2.c (.../tags/gcc_4_8_3_release)
4678
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/builtins-2.c (.../branches/gcc-4_8-branch)
4679
 
@@ -0,0 +1,47 @@
4680
 
+/* { dg-do run { target { powerpc64le-*-* } } } */
4681
 
+/* { dg-options "-mcpu=power8 " } */
4682
 
+
4683
 
+#include <altivec.h>
4684
 
+
4685
 
+void abort (void);
4686
 
+
4687
 
+int main ()
4688
 
+{
4689
 
+  vector long long sa = {27L, -14L};
4690
 
+  vector long long sb = {-9L, -2L};
4691
 
+
4692
 
+  vector unsigned long long ua = {27L, 14L};
4693
 
+  vector unsigned long long ub = {9L, 2L};
4694
 
+
4695
 
+  vector long long sc = vec_div (sa, sb);
4696
 
+  vector unsigned long long uc = vec_div (ua, ub);
4697
 
+
4698
 
+  if (sc[0] != -3L || sc[1] != 7L || uc[0] != 3L || uc[1] != 7L)
4699
 
+    abort ();
4700
 
+
4701
 
+  vector long long sd = vec_mul (sa, sb);
4702
 
+  vector unsigned long long ud = vec_mul (ua, ub);
4703
 
+
4704
 
+  if (sd[0] != -243L || sd[1] != 28L || ud[0] != 243L || ud[1] != 28L)
4705
 
+    abort ();
4706
 
+
4707
 
+  vector long long se = vec_splat (sa, 0);
4708
 
+  vector long long sf = vec_splat (sa, 1);
4709
 
+  vector unsigned long long ue = vec_splat (ua, 0);
4710
 
+  vector unsigned long long uf = vec_splat (ua, 1);
4711
 
+
4712
 
+  if (se[0] != 27L || se[1] != 27L || sf[0] != -14L || sf[1] != -14L
4713
 
+      || ue[0] != 27L || ue[1] != 27L || uf[0] != 14L || uf[1] != 14L)
4714
 
+    abort ();
4715
 
+
4716
 
+  vector double da = vec_ctf (sa, -2);
4717
 
+  vector double db = vec_ctf (ua, 2);
4718
 
+  vector long long sg = vec_cts (da, -2);
4719
 
+  vector unsigned long long ug = vec_ctu (db, 2);
4720
 
+
4721
 
+  if (da[0] != 108.0 || da[1] != -56.0 || db[0] != 6.75 || db[1] != 3.5
4722
 
+      || sg[0] != 27L || sg[1] != -14L || ug[0] != 27L || ug[1] != 14L)
4723
 
+    abort ();
4724
 
+
4725
 
+  return 0;
4726
 
+}
4727
 
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
4728
 
===================================================================
4729
 
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../tags/gcc_4_8_3_release)
4730
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../branches/gcc-4_8-branch)
4731
 
@@ -0,0 +1,21 @@
4732
 
+/* Test expected code generation for lvsl and lvsr on little endian.
4733
 
+   Note that lvsl and lvsr are each produced once, but the filename
4734
 
+   causes them to appear twice in the file.  */
4735
 
+
4736
 
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4737
 
+/* { dg-options "-O0 -Wno-deprecated" } */
4738
 
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
4739
 
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
4740
 
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
4741
 
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
4742
 
+
4743
 
+
4744
 
+#include <altivec.h>
4745
 
+
4746
 
+float f[20];
4747
 
+
4748
 
+void foo ()
4749
 
+{
4750
 
+  vector unsigned char a = vec_lvsl (4, f);
4751
 
+  vector unsigned char b = vec_lvsr (8, f);
4752
 
+}
4753
 
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
4754
 
===================================================================
4755
 
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../tags/gcc_4_8_3_release)
4756
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../branches/gcc-4_8-branch)
4757
 
@@ -0,0 +1,12 @@
4758
 
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4759
 
+/* { dg-options "-mno-compat-align-parm" } */
4760
 
+
4761
 
+struct test
4762
 
+  {
4763
 
+    long a __attribute__((aligned (16)));
4764
 
+  };
4765
 
+
4766
 
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
4767
 
+{
4768
 
+}
4769
 
+
4770
 
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
4771
 
===================================================================
4772
 
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../tags/gcc_4_8_3_release)
4773
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../branches/gcc-4_8-branch)
4774
 
@@ -0,0 +1,9 @@
4775
 
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4776
 
+/* { dg-require-effective-target powerpc_altivec_ok } */
4777
 
+/* { dg-options "-maltivec" } */
4778
 
+
4779
 
+struct test
4780
 
+  {
4781
 
+    int a __attribute__((vector_size (8)));
4782
 
+  }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
4783
 
+
4784
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
4785
 
===================================================================
4786
 
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../tags/gcc_4_8_3_release)
4787
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../branches/gcc-4_8-branch)
4788
 
@@ -1,6 +1,6 @@
4789
 
 /* { dg-do compile { target powerpc*-*-* } } */
4790
 
 /* { dg-require-effective-target powerpc_altivec_ok } */
4791
 
-/* { dg-options "-maltivec -O0 -Wall" } */
4792
 
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
4793
 
 
4794
 
 #include <altivec.h>
4795
 
 
4796
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
4797
 
===================================================================
4798
 
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../tags/gcc_4_8_3_release)
4799
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../branches/gcc-4_8-branch)
4800
 
@@ -1,7 +1,7 @@
4801
 
 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
4802
 
 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
4803
 
 /* { dg-require-effective-target powerpc_altivec_ok } */
4804
 
-/* { dg-options "-maltivec -O2" } */
4805
 
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
4806
 
 
4807
 
 #include <altivec.h>
4808
 
 
4809
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
4810
 
===================================================================
4811
 
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
4812
 
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
4813
 
@@ -1,5 +1,5 @@
4814
 
 /* { dg-do compile { target powerpc_altivec_ok } } */
4815
 
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
4816
 
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
4817
 
 
4818
 
 #include <altivec.h>
4819
 
 
4820
 
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
4821
 
===================================================================
4822
 
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../tags/gcc_4_8_3_release)
4823
 
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../branches/gcc-4_8-branch)
4824
 
@@ -0,0 +1,10 @@
4825
 
+/* { dg-do compile } */
4826
 
+/* { dg-options "-O2 -mieee" } */
4827
 
+
4828
 
+void foo (int *dimensions, double **params, int hh)
4829
 
+{
4830
 
+  if (params[hh])
4831
 
+    ;
4832
 
+  else if (dimensions[hh] > 0)
4833
 
+    params[hh][0] = 1.0f;
4834
 
+}
4835
 
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
4836
 
===================================================================
4837
 
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../tags/gcc_4_8_3_release)
4838
 
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../branches/gcc-4_8-branch)
4839
 
@@ -0,0 +1,35 @@
4840
 
+/* Test AAPCS64 layout and __builtin_va_start.
4841
 
+
4842
 
+   Pass named HFA/HVA argument on stack.  */
4843
 
+
4844
 
+/* { dg-do run { target aarch64*-*-* } } */
4845
 
+
4846
 
+#ifndef IN_FRAMEWORK
4847
 
+#define AAPCS64_TEST_STDARG
4848
 
+#define TESTFILE "va_arg-14.c"
4849
 
+#include "type-def.h"
4850
 
+
4851
 
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
4852
 
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
4853
 
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
4854
 
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
4855
 
+
4856
 
+#include "abitest.h"
4857
 
+#else
4858
 
+  ARG (float, 1.0f, S0, 0)
4859
 
+  ARG (float, 2.0f, S1, 1)
4860
 
+  ARG (float, 3.0f, S2, 2)
4861
 
+  ARG (float, 4.0f, S3, 3)
4862
 
+  ARG (float, 5.0f, S4, 4)
4863
 
+  ARG (float, 6.0f, S5, 5)
4864
 
+  ARG (float, 7.0f, S6, 6)
4865
 
+  ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
4866
 
+  /* Previous argument size has been rounded up to the nearest multiple of
4867
 
+     8 bytes.  */
4868
 
+  ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
4869
 
+  /* NSAA is rounded up to the nearest natural alignment of float32x4.  */
4870
 
+  ARG (vf4_t, float32x4, STACK + 32, 9)
4871
 
+  ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
4872
 
+  DOTS
4873
 
+  LAST_ANON (double, 123456789.987, STACK + 64, 11)
4874
 
+#endif
4875
 
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
4876
 
===================================================================
4877
 
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../tags/gcc_4_8_3_release)
4878
 
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../branches/gcc-4_8-branch)
4879
 
@@ -34,6 +34,13 @@
4880
 
   float b;
4881
 
 };
4882
 
 
4883
 
+struct hfa_fx3_t
4884
 
+{
4885
 
+  float a;
4886
 
+  float b;
4887
 
+  float c;
4888
 
+};
4889
 
+
4890
 
 struct hfa_dx2_t
4891
 
 {
4892
 
   double a;
4893
 
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
4894
 
===================================================================
4895
 
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../tags/gcc_4_8_3_release)
4896
 
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../branches/gcc-4_8-branch)
4897
 
@@ -0,0 +1,59 @@
4898
 
+/* Test AAPCS64 layout and __builtin_va_start.
4899
 
+
4900
 
+   Pass named HFA/HVA argument on stack.  */
4901
 
+
4902
 
+/* { dg-do run { target aarch64*-*-* } } */
4903
 
+
4904
 
+#ifndef IN_FRAMEWORK
4905
 
+#define AAPCS64_TEST_STDARG
4906
 
+#define TESTFILE "va_arg-13.c"
4907
 
+
4908
 
+struct float_float_t
4909
 
+{
4910
 
+  float a;
4911
 
+  float b;
4912
 
+} float_float;
4913
 
+
4914
 
+union float_int_t
4915
 
+{
4916
 
+  float b8;
4917
 
+  int b5;
4918
 
+} float_int;
4919
 
+
4920
 
+#define HAS_DATA_INIT_FUNC
4921
 
+void
4922
 
+init_data ()
4923
 
+{
4924
 
+  float_float.a = 1.2f;
4925
 
+  float_float.b = 2.2f;
4926
 
+
4927
 
+  float_int.b8 = 4983.80f;
4928
 
+}
4929
 
+
4930
 
+#include "abitest.h"
4931
 
+#else
4932
 
+  ARG (float, 1.0f, S0, 0)
4933
 
+  ARG (float, 2.0f, S1, 1)
4934
 
+  ARG (float, 3.0f, S2, 2)
4935
 
+  ARG (float, 4.0f, S3, 3)
4936
 
+  ARG (float, 5.0f, S4, 4)
4937
 
+  ARG (float, 6.0f, S5, 5)
4938
 
+  ARG (float, 7.0f, S6, 6)
4939
 
+  ARG (struct float_float_t, float_float, STACK, 7)
4940
 
+  ARG (int,  9, W0, 8)
4941
 
+  ARG (int, 10, W1, 9)
4942
 
+  ARG (int, 11, W2, 10)
4943
 
+  ARG (int, 12, W3, 11)
4944
 
+  ARG (int, 13, W4, 12)
4945
 
+  ARG (int, 14, W5, 13)
4946
 
+  ARG (int, 15, W6, LAST_NAMED_ARG_ID)
4947
 
+  DOTS
4948
 
+  /* Note on the reason of using 'X7' instead of 'W7' here:
4949
 
+     Using 'X7' makes sure the test works in the big-endian mode.
4950
 
+     According to PCS rules B.4 and C.10, the size of float_int is rounded
4951
 
+     to 8 bytes and prepared in the register X7 as if loaded via LDR from
4952
 
+     the memory, with the content of the other 4 bytes unspecified.  The
4953
 
+     test framework will only compare the 4 relavent bytes.  */
4954
 
+  ANON (union float_int_t, float_int, X7, 15)
4955
 
+  LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
4956
 
+#endif
4957
 
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
4958
 
===================================================================
4959
 
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../tags/gcc_4_8_3_release)
4960
 
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../branches/gcc-4_8-branch)
4961
 
@@ -0,0 +1,39 @@
4962
 
+/* Test AAPCS64 layout and __builtin_va_start.
4963
 
+
4964
 
+   Pass named __128int argument on stack.  */
4965
 
+
4966
 
+/* { dg-do run { target aarch64*-*-* } } */
4967
 
+
4968
 
+#ifndef IN_FRAMEWORK
4969
 
+#define AAPCS64_TEST_STDARG
4970
 
+#define TESTFILE "va_arg-15.c"
4971
 
+#include "type-def.h"
4972
 
+
4973
 
+union int128_t qword;
4974
 
+
4975
 
+#define HAS_DATA_INIT_FUNC
4976
 
+void
4977
 
+init_data ()
4978
 
+{
4979
 
+  /* Init signed quad-word integer.  */
4980
 
+  qword.l64 = 0xfdb9753102468aceLL;
4981
 
+  qword.h64 = 0xeca8642013579bdfLL;
4982
 
+}
4983
 
+
4984
 
+#include "abitest.h"
4985
 
+#else
4986
 
+  ARG (int, 1, W0, 0)
4987
 
+  ARG (int, 2, W1, 1)
4988
 
+  ARG (int, 3, W2, 2)
4989
 
+  ARG (int, 4, W3, 3)
4990
 
+  ARG (int, 5, W4, 4)
4991
 
+  ARG (int, 6, W5, 5)
4992
 
+  ARG (int, 7, W6, 6)
4993
 
+  ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
4994
 
+  DOTS
4995
 
+#ifndef __AAPCS64_BIG_ENDIAN__
4996
 
+  LAST_ANON (int, 8, STACK + 16, 8)
4997
 
+#else
4998
 
+  LAST_ANON (int, 8, STACK + 20, 8)
4999
 
+#endif
5000
 
+#endif
5001
 
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
5002
 
===================================================================
5003
 
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../tags/gcc_4_8_3_release)
5004
 
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../branches/gcc-4_8-branch)
5005
 
@@ -0,0 +1,14 @@
5006
 
+/* { dg-do assemble } */
5007
 
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
5008
 
+
5009
 
+int
5010
 
+test (int a, double b, int c, int d, int e)
5011
 
+{
5012
 
+  double result;
5013
 
+  __asm__ __volatile ("// %0, %1"
5014
 
+                      : "=w" (result)
5015
 
+                      : "0" (b)
5016
 
+                      :    /* No clobbers */
5017
 
+                      );
5018
 
+  return c * d + e;
5019
 
+}
5020
 
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
5021
 
===================================================================
5022
 
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../tags/gcc_4_8_3_release)
5023
 
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../branches/gcc-4_8-branch)
5024
 
@@ -0,0 +1,134 @@
5025
 
+/* { dg-do run } */
5026
 
+/* { dg-options "-std=gnu99" } */
5027
 
+
5028
 
+#include <stdlib.h>
5029
 
+#include <stdarg.h>
5030
 
+
5031
 
+#define NC __attribute__((noinline,noclone))
5032
 
+
5033
 
+void NC vfun (char n, ...)
5034
 
+{
5035
 
+  va_list ap;
5036
 
+
5037
 
+  va_start (ap, n);
5038
 
+
5039
 
+  switch (n)
5040
 
+    {
5041
 
+    default:
5042
 
+      abort();
5043
 
+    case 1:
5044
 
+      if (11 != va_arg (ap, int))
5045
 
+        abort();
5046
 
+      break;
5047
 
+    case 2:
5048
 
+      if (2222 != va_arg (ap, int))
5049
 
+        abort();
5050
 
+      break;
5051
 
+    case 3:
5052
 
+      if (333333 != va_arg (ap, __int24))
5053
 
+        abort();
5054
 
+      break;
5055
 
+    case 4:
5056
 
+      if (44444444 != va_arg (ap, long))
5057
 
+        abort();
5058
 
+      break;
5059
 
+    case 8:
5060
 
+      if (8888888888888888 != va_arg (ap, long long))
5061
 
+        abort();
5062
 
+      break;
5063
 
+    }
5064
 
+
5065
 
+  va_end (ap);
5066
 
+}
5067
 
+
5068
 
+
5069
 
+void NC boo_qi (const __flash char *p)
5070
 
+{
5071
 
+  vfun (1, *p);
5072
 
+}
5073
 
+
5074
 
+void NC boox_qi (const __memx char *p)
5075
 
+{
5076
 
+  vfun (1, *p);
5077
 
+}
5078
 
+
5079
 
+void NC boo_hi (const __flash int *p)
5080
 
+{
5081
 
+  vfun (2, *p);
5082
 
+}
5083
 
+
5084
 
+void NC boox_hi (const __memx int *p)
5085
 
+{
5086
 
+  vfun (2, *p);
5087
 
+}
5088
 
+
5089
 
+void NC boo_psi (const __flash __int24 *p)
5090
 
+{
5091
 
+  vfun (3, *p);
5092
 
+}
5093
 
+
5094
 
+void NC boox_psi (const __memx __int24 *p)
5095
 
+{
5096
 
+  vfun (3, *p);
5097
 
+}
5098
 
+
5099
 
+void NC boo_si (const __flash long *p)
5100
 
+{
5101
 
+  vfun (4, *p);
5102
 
+}
5103
 
+
5104
 
+void NC boox_si (const __memx long *p)
5105
 
+{
5106
 
+  vfun (4, *p);
5107
 
+}
5108
 
+
5109
 
+void NC boo_di (const __flash long long *p)
5110
 
+{
5111
 
+  vfun (8, *p);
5112
 
+}
5113
 
+
5114
 
+void NC boox_di (const __memx long long *p)
5115
 
+{
5116
 
+  vfun (8, *p);
5117
 
+}
5118
 
+
5119
 
+const __flash char f_qi = 11;
5120
 
+const __flash int f_hi = 2222;
5121
 
+const __flash __int24 f_psi = 333333;
5122
 
+const __flash long f_si = 44444444;
5123
 
+const __flash long long f_di = 8888888888888888;
5124
 
+
5125
 
+const __memx char x_qi = 11;
5126
 
+const __memx int x_hi = 2222;
5127
 
+const __memx __int24 x_psi = 333333;
5128
 
+const __memx long x_si = 44444444;
5129
 
+const __memx long long x_di = 8888888888888888;
5130
 
+
5131
 
+char r_qi = 11;
5132
 
+int r_hi = 2222;
5133
 
+__int24 r_psi = 333333;
5134
 
+long r_si = 44444444;
5135
 
+long long r_di = 8888888888888888;
5136
 
+
5137
 
+int main (void)
5138
 
+{
5139
 
+  boo_qi (&f_qi);
5140
 
+  boo_hi (&f_hi);
5141
 
+  boo_psi (&f_psi);
5142
 
+  boo_si (&f_si);
5143
 
+  boo_di (&f_di);
5144
 
+
5145
 
+  boox_qi (&x_qi);
5146
 
+  boox_hi (&x_hi);
5147
 
+  boox_psi (&x_psi);
5148
 
+  boox_si (&x_si);
5149
 
+  boox_di (&x_di);
5150
 
+
5151
 
+  boox_qi (&r_qi);
5152
 
+  boox_hi (&r_hi);
5153
 
+  boox_psi (&r_psi);
5154
 
+  boox_si (&r_si);
5155
 
+  boox_di (&r_di);
5156
 
+
5157
 
+  exit (0);
5158
 
+}
5159
 
Index: gcc/testsuite/gcc.target/i386/pr61923.c
5160
 
===================================================================
5161
 
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../tags/gcc_4_8_3_release)
5162
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../branches/gcc-4_8-branch)
5163
 
@@ -0,0 +1,36 @@
5164
 
+/* PR debug/61923 */
5165
 
+/* { dg-do compile } */
5166
 
+/* { dg-options "-O2 -fcompare-debug" } */
5167
 
+
5168
 
+typedef struct
5169
 
+{
5170
 
+  struct
5171
 
+  {
5172
 
+    struct
5173
 
+    {
5174
 
+      char head;
5175
 
+    } tickets;
5176
 
+  };
5177
 
+} arch_spinlock_t;
5178
 
+struct ext4_map_blocks
5179
 
+{
5180
 
+  int m_lblk;
5181
 
+  int m_len;
5182
 
+  int m_flags;
5183
 
+};
5184
 
+int ext4_da_map_blocks_ei_0;
5185
 
+void fn1 (int p1, struct ext4_map_blocks *p2)
5186
 
+{
5187
 
+  int ret;
5188
 
+  if (p2->m_flags)
5189
 
+    {
5190
 
+      ext4_da_map_blocks_ei_0++;
5191
 
+      arch_spinlock_t *lock;
5192
 
+      switch (sizeof *&lock->tickets.head)
5193
 
+      case 1:
5194
 
+      asm("" : "+m"(*&lock->tickets.head) : ""(0));
5195
 
+      __asm__("");
5196
 
+      ret = 0;
5197
 
+    }
5198
 
+  fn2 (p2->m_lblk, p2->m_len);
5199
 
+}
5200
 
Index: gcc/testsuite/gcc.target/i386/pr61423.c
5201
 
===================================================================
5202
 
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../tags/gcc_4_8_3_release)
5203
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../branches/gcc-4_8-branch)
5204
 
@@ -0,0 +1,38 @@
5205
 
+/* PR target/61423 */
5206
 
+/* { dg-do run { target ia32 } } */
5207
 
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
5208
 
+
5209
 
+#define N 1024
5210
 
+static unsigned int A[N];
5211
 
+
5212
 
+double
5213
 
+__attribute__((noinline))
5214
 
+func (void)
5215
 
+{
5216
 
+  unsigned int sum = 0;
5217
 
+  unsigned i;
5218
 
+  double t;
5219
 
+
5220
 
+  for (i = 0; i < N; i++)
5221
 
+    sum += A[i];
5222
 
+
5223
 
+  t = sum;
5224
 
+  return t;
5225
 
+}
5226
 
+
5227
 
+int
5228
 
+main ()
5229
 
+{
5230
 
+  unsigned i;
5231
 
+  double d;
5232
 
+
5233
 
+  for(i = 0; i < N; i++)
5234
 
+    A[i] = 1;
5235
 
+
5236
 
+  d = func();
5237
 
+
5238
 
+  if (d != 1024.0)
5239
 
+    __builtin_abort ();
5240
 
+
5241
 
+  return 0;
5242
 
+}
5243
 
Index: gcc/testsuite/gcc.target/i386/pr60901.c
5244
 
===================================================================
5245
 
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../tags/gcc_4_8_3_release)
5246
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../branches/gcc-4_8-branch)
5247
 
@@ -0,0 +1,17 @@
5248
 
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts"  } */
5249
 
+
5250
 
+extern int n;
5251
 
+extern void bar (void);
5252
 
+extern int baz (int);
5253
 
+
5254
 
+void
5255
 
+foo (void)
5256
 
+{
5257
 
+  int i, j;
5258
 
+  for (j = 0; j < n; j++)
5259
 
+    {
5260
 
+      for (i = 1; i < j; i++)
5261
 
+       bar ();
5262
 
+      baz (0);
5263
 
+    }
5264
 
+}
5265
 
Index: gcc/testsuite/gcc.target/i386/pr61801.c
5266
 
===================================================================
5267
 
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../tags/gcc_4_8_3_release)
5268
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../branches/gcc-4_8-branch)
5269
 
@@ -0,0 +1,21 @@
5270
 
+/* PR rtl-optimization/61801 */
5271
 
+/* { dg-do compile } */
5272
 
+/* { dg-options "-Os -fcompare-debug" } */
5273
 
+
5274
 
+int a, c;
5275
 
+int bar (void);
5276
 
+void baz (void);
5277
 
+
5278
 
+void
5279
 
+foo (void)
5280
 
+{
5281
 
+  int d;
5282
 
+  if (bar ())
5283
 
+    {
5284
 
+      int e;
5285
 
+      baz ();
5286
 
+      asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
5287
 
+      d = e;
5288
 
+    }
5289
 
+  c = d;
5290
 
+}
5291
 
Index: gcc/testsuite/gcc.target/i386/pr61446.c
5292
 
===================================================================
5293
 
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../tags/gcc_4_8_3_release)
5294
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../branches/gcc-4_8-branch)
5295
 
@@ -0,0 +1,14 @@
5296
 
+/* PR rtl-optimization/61446 */
5297
 
+
5298
 
+/* { dg-do compile { target { ia32 } } } */
5299
 
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
5300
 
+
5301
 
+unsigned long long
5302
 
+foo (float a)
5303
 
+{
5304
 
+  const double dfa = a;
5305
 
+  const unsigned int hi = dfa / 0x1p32f;
5306
 
+  const unsigned int lo = dfa - (double) hi * 0x1p32f;
5307
 
+
5308
 
+  return ((unsigned long long) hi << (4 * (8))) | lo;
5309
 
+}
5310
 
Index: gcc/testsuite/gcc.target/i386/pr63947.c
5311
 
===================================================================
5312
 
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../tags/gcc_4_8_3_release)
5313
 
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../branches/gcc-4_8-branch)
5314
 
@@ -0,0 +1,9 @@
5315
 
+/* PR target/63947 */
5316
 
+/* { dg-do assemble } */
5317
 
+/* { dg-options "-Os" } */
5318
 
+/* { dg-additional-options "-march=i686" { target ia32 } } */
5319
 
+
5320
 
+long double foo (unsigned a, unsigned b)
5321
 
+{
5322
 
+  return a + b < a;
5323
 
+}
5324
 
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
5325
 
===================================================================
5326
 
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../tags/gcc_4_8_3_release)
5327
 
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../branches/gcc-4_8-branch)
5328
 
@@ -0,0 +1,50 @@
5329
 
+/* { dg-do run } */
5330
 
+/* { dg-options "-march=octeon" } */
5331
 
+
5332
 
+extern void abort (void);
5333
 
+
5334
 
+struct node
5335
 
+{
5336
 
+  struct node *next;
5337
 
+  struct node *prev;
5338
 
+};
5339
 
+
5340
 
+struct node node;
5341
 
+
5342
 
+struct head
5343
 
+{
5344
 
+  struct node *first;
5345
 
+};
5346
 
+
5347
 
+struct head heads[5];
5348
 
+
5349
 
+int k = 2;
5350
 
+
5351
 
+struct head *head = &heads[2];
5352
 
+
5353
 
+static int __attribute__((noinline))
5354
 
+foo (void)
5355
 
+{
5356
 
+  node.prev = (void *)head;
5357
 
+  head->first = &node;
5358
 
+
5359
 
+  struct node *n = head->first;
5360
 
+  struct head *h = &heads[k];
5361
 
+  struct node *next = n->next;
5362
 
+
5363
 
+  if (n->prev == (void *)h)
5364
 
+    h->first = next;
5365
 
+  else
5366
 
+    n->prev->next = next;
5367
 
+
5368
 
+  n->next = h->first;
5369
 
+  return n->next == &node;
5370
 
+}
5371
 
+
5372
 
+int
5373
 
+main (void)
5374
 
+{
5375
 
+  if (foo ())
5376
 
+    abort ();
5377
 
+  return 0;
5378
 
+}
5379
 
Index: gcc/testsuite/gcc.target/sh/pr61996.c
5380
 
===================================================================
5381
 
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
5382
 
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
5383
 
@@ -0,0 +1,12 @@
5384
 
+/* Check that the option -musermode has no effect on targets that do not
5385
 
+   support user/privileged mode and that it does not interfere with option
5386
 
+   -matomic-model=soft-imask.  */
5387
 
+/* { dg-do compile }  */
5388
 
+/* { dg-options "-matomic-model=soft-imask" }  */
5389
 
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } }  */
5390
 
+
5391
 
+int
5392
 
+test (void)
5393
 
+{
5394
 
+  return 0;
5395
 
+}
5396
 
Index: gcc/testsuite/lib/target-supports.exp
5397
 
===================================================================
5398
 
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
5399
 
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
5400
 
@@ -1790,6 +1790,15 @@
5401
 
     }]
5402
 
 }
5403
 
 
5404
 
+# Return 1 if the target supports long double of 128 bits,
5405
 
+# 0 otherwise.
5406
 
+
5407
 
+proc check_effective_target_longdouble128 { } {
5408
 
+    return [check_no_compiler_messages longdouble128 object {
5409
 
+       int dummy[sizeof(long double) == 16 ? 1 : -1];
5410
 
+    }]
5411
 
+}
5412
 
+
5413
 
 # Return 1 if the target supports double of 64 bits,
5414
 
 # 0 otherwise.
5415
 
 
5416
 
@@ -5329,3 +5338,40 @@
5417
 
        return 0
5418
 
     }
5419
 
 }
5420
 
+
5421
 
+# Return 1 if <fenv.h> is available with all the standard IEEE
5422
 
+# exceptions and floating-point exceptions are raised by arithmetic
5423
 
+# operations.  (If the target requires special options for "inexact"
5424
 
+# exceptions, those need to be specified in the testcases.)
5425
 
+
5426
 
+proc check_effective_target_fenv_exceptions {} {
5427
 
+    return [check_runtime fenv_exceptions {
5428
 
+       #include <fenv.h>
5429
 
+       #include <stdlib.h>
5430
 
+       #ifndef FE_DIVBYZERO
5431
 
+       # error Missing FE_DIVBYZERO
5432
 
+       #endif
5433
 
+       #ifndef FE_INEXACT
5434
 
+       # error Missing FE_INEXACT
5435
 
+       #endif
5436
 
+       #ifndef FE_INVALID
5437
 
+       # error Missing FE_INVALID
5438
 
+       #endif
5439
 
+       #ifndef FE_OVERFLOW
5440
 
+       # error Missing FE_OVERFLOW
5441
 
+       #endif
5442
 
+       #ifndef FE_UNDERFLOW
5443
 
+       # error Missing FE_UNDERFLOW
5444
 
+       #endif
5445
 
+       volatile float a = 0.0f, r;
5446
 
+       int
5447
 
+       main (void)
5448
 
+       {
5449
 
+         r = a / a;
5450
 
+         if (fetestexcept (FE_INVALID))
5451
 
+           exit (0);
5452
 
+         else
5453
 
+           abort ();
5454
 
+       }
5455
 
+    } "-std=gnu99"]
5456
 
+}
5457
 
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
5458
 
===================================================================
5459
 
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../tags/gcc_4_8_3_release)
5460
 
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../branches/gcc-4_8-branch)
5461
 
@@ -1,6 +1,6 @@
5462
 
 ! { dg-require-effective-target fortran_large_real }
5463
 
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
5464
 
-! Test XFAILed on these platforms because the system's printf() lacks
5465
 
+! { dg-do run { xfail powerpc*-apple-darwin* } }
5466
 
+! Test XFAILed on this platform because the system's printf() lacks
5467
 
 ! proper support for denormalized long doubles. See PR24685
5468
 
 !
5469
 
 ! This tests that the default formats for formatted I/O of reals are
5470
 
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
5471
 
===================================================================
5472
 
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../tags/gcc_4_8_3_release)
5473
 
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../branches/gcc-4_8-branch)
5474
 
@@ -0,0 +1,15 @@
5475
 
+! { dg-do compile }
5476
 
+! { dg-options "-fdump-tree-original" }
5477
 
+! PR 61999 - this used to ICE.
5478
 
+! Original test case by A. Kasahara
5479
 
+program main
5480
 
+   use, intrinsic:: iso_fortran_env, only: output_unit
5481
 
+
5482
 
+   implicit none
5483
 
+
5484
 
+   write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
5485
 
+
5486
 
+   stop
5487
 
+end program main
5488
 
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
5489
 
+! { dg-final { cleanup-tree-dump "original" } }
5490
 
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
5491
 
===================================================================
5492
 
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../tags/gcc_4_8_3_release)
5493
 
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../branches/gcc-4_8-branch)
5494
 
@@ -0,0 +1,13 @@
5495
 
+! PR fortran/59488
5496
 
+! { dg-do compile }
5497
 
+! { dg-options "-fopenmp" }
5498
 
+
5499
 
+  implicit none
5500
 
+  integer, parameter :: p(2) = (/ 11, 12 /)
5501
 
+  integer :: r
5502
 
+
5503
 
+  !$omp parallel do default(none)
5504
 
+  do r = 1, 2
5505
 
+    print *, p(r)
5506
 
+  end do
5507
 
+end
5508
 
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
5509
 
===================================================================
5510
 
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../tags/gcc_4_8_3_release)
5511
 
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../branches/gcc-4_8-branch)
5512
 
@@ -0,0 +1,16 @@
5513
 
+! PR fortran/59488
5514
 
+! { dg-do compile }
5515
 
+! { dg-options "-fopenmp" }
5516
 
+
5517
 
+  implicit none
5518
 
+  type t
5519
 
+    integer :: s1, s2, s3
5520
 
+  end type
5521
 
+  integer :: r
5522
 
+  type(t), parameter :: u = t(1, 2, 3)
5523
 
+
5524
 
+  !$omp parallel do default(none)
5525
 
+  do r = 1, 2
5526
 
+    print *, u
5527
 
+  end do
5528
 
+end
5529
 
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
5530
 
===================================================================
5531
 
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../tags/gcc_4_8_3_release)
5532
 
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../branches/gcc-4_8-branch)
5533
 
@@ -0,0 +1,18 @@
5534
 
+! { dg-do run }
5535
 
+! { dg-options "-fcray-pointer" }
5536
 
+!
5537
 
+! PR fortran/45187
5538
 
+!
5539
 
+module foo
5540
 
+  implicit none
5541
 
+  real :: a
5542
 
+  pointer(c_a, a)
5543
 
+end module foo
5544
 
+
5545
 
+program test
5546
 
+  use foo
5547
 
+  real :: z
5548
 
+  c_a = loc(z)
5549
 
+  a = 42
5550
 
+  if (z /= 42) call abort
5551
 
+end program test
5552
 
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
5553
 
===================================================================
5554
 
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../tags/gcc_4_8_3_release)
5555
 
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../branches/gcc-4_8-branch)
5556
 
@@ -0,0 +1,36 @@
5557
 
+! { dg-do run }
5558
 
+! Tests fix for PR61780 in which the loop reversal mechanism was
5559
 
+! not accounting for the first index being an element so that no
5560
 
+! loop in this dimension is created.
5561
 
+!
5562
 
+! Contributed by Manfred Tietze on clf.
5563
 
+!
5564
 
+program prgm3
5565
 
+    implicit none
5566
 
+    integer, parameter :: n = 10, k = 3
5567
 
+    integer :: i, j
5568
 
+    integer, dimension(n,n) :: y
5569
 
+    integer :: res1(n), res2(n)
5570
 
+
5571
 
+1   format(10i5)
5572
 
+
5573
 
+!initialize
5574
 
+    do i=1,n
5575
 
+        do j=1,n
5576
 
+            y(i,j) = n*i + j
5577
 
+        end do
5578
 
+    end do
5579
 
+    res2 = y(k,:)
5580
 
+
5581
 
+!shift right
5582
 
+    y(k,4:n) = y(k,3:n-1)
5583
 
+    y(k,3) = 0
5584
 
+    res1 = y(k,:)
5585
 
+    y(k,:) = res2
5586
 
+    y(k,n:4:-1) = y(k,n-1:3:-1)
5587
 
+    y(k,3) = 0
5588
 
+    res2 = y(k,:)
5589
 
+!    print *, res1
5590
 
+!    print *, res2
5591
 
+    if (any(res1 /= res2)) call abort ()
5592
 
+end program prgm3
5593
 
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
5594
 
===================================================================
5595
 
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../tags/gcc_4_8_3_release)
5596
 
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../branches/gcc-4_8-branch)
5597
 
@@ -0,0 +1,8 @@
5598
 
+C { dg-do compile }
5599
 
+      TYPE T
5600
 
+      INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
5601
 
+      END TYPE
5602
 
+      TYPE S
5603
 
+      INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
5604
 
+      END TYPE
5605
 
+      END
5606
 
Index: gcc/testsuite/gfortran.dg/nint_2.f90
5607
 
===================================================================
5608
 
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../tags/gcc_4_8_3_release)
5609
 
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../branches/gcc-4_8-branch)
5610
 
@@ -4,7 +4,8 @@
5611
 
 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
5612
 
 !
5613
 
 ! { dg-do run }
5614
 
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
5615
 
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
5616
 
+! Note that this doesn't fail on powerpc64le-*-linux*.
5617
 
   real(kind=8) :: a
5618
 
   integer(kind=8) :: i1, i2
5619
 
   real :: b
5620
 
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
5621
 
===================================================================
5622
 
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../tags/gcc_4_8_3_release)
5623
 
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../branches/gcc-4_8-branch)
5624
 
@@ -23,7 +23,7 @@
5625
 
     call bar2 (c)
5626
 
     call bar3 (c)
5627
 
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5628
 
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5629
 
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
5630
 
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5631
 
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5632
 
   end subroutine
5633
 
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
5634
 
===================================================================
5635
 
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../tags/gcc_4_8_3_release)
5636
 
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../branches/gcc-4_8-branch)
5637
 
@@ -0,0 +1,16 @@
5638
 
+! { dg-do run }
5639
 
+! { dg-options "-ffrontend-optimize" }
5640
 
+! PR 62214 - this used to give the wrong result.
5641
 
+! Original test case by Oliver Fuhrer
5642
 
+PROGRAM test
5643
 
+  IMPLICIT NONE
5644
 
+  CHARACTER(LEN=20)   :: fullNames(2)
5645
 
+  CHARACTER(LEN=255)  :: pathName
5646
 
+  CHARACTER(LEN=5)    :: fileNames(2)
5647
 
+  
5648
 
+  pathName = "/dir1/dir2/"
5649
 
+  fileNames = (/ "file1", "file2" /)
5650
 
+  fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
5651
 
+  if (fullNames(1) /= '/dir1/dir2/file1' .or. &
5652
 
+       & fullnames(2) /= '/dir1/dir2/file2') call abort
5653
 
+END PROGRAM test
5654
 
Index: gcc/testsuite/gfortran.dg/pr45636.f90
5655
 
===================================================================
5656
 
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
5657
 
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
5658
 
@@ -10,5 +10,5 @@
5659
 
   b = y
5660
 
   call sub(a, b)
5661
 
 end program main
5662
 
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
5663
 
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
5664
 
 ! { dg-final { cleanup-tree-dump "forwprop2" } }
5665
 
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
5666
 
===================================================================
5667
 
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../tags/gcc_4_8_3_release)
5668
 
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../branches/gcc-4_8-branch)
5669
 
@@ -0,0 +1,47 @@
5670
 
+! { dg-do run }
5671
 
+! Test the fix for PR61459.
5672
 
+!
5673
 
+! Contributed by John Wingate  <johnww@tds.net>
5674
 
+!
5675
 
+module a
5676
 
+
5677
 
+   implicit none
5678
 
+   private
5679
 
+   public :: f_segfault, f_segfault_plus, f_workaround
5680
 
+   integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
5681
 
+
5682
 
+contains
5683
 
+
5684
 
+   function f_segfault(x)
5685
 
+      real, dimension(:), allocatable :: f_segfault
5686
 
+      real, dimension(:), intent(in)  :: x
5687
 
+      allocate(f_segfault(2))
5688
 
+      f_segfault = matmul(b,x)
5689
 
+   end function f_segfault
5690
 
+
5691
 
+! Sefaulted without the ALLOCATE as well.
5692
 
+   function f_segfault_plus(x)
5693
 
+      real, dimension(:), allocatable :: f_segfault_plus
5694
 
+      real, dimension(:), intent(in)  :: x
5695
 
+      f_segfault_plus = matmul(b,x)
5696
 
+   end function f_segfault_plus
5697
 
+
5698
 
+   function f_workaround(x)
5699
 
+      real, dimension(:), allocatable :: f_workaround
5700
 
+      real, dimension(:), intent(in)  :: x
5701
 
+      real, dimension(:), allocatable :: tmp
5702
 
+      allocate(f_workaround(2),tmp(2))
5703
 
+      tmp = matmul(b,x)
5704
 
+      f_workaround = tmp
5705
 
+   end function f_workaround
5706
 
+
5707
 
+end module a
5708
 
+
5709
 
+program main
5710
 
+   use a
5711
 
+   implicit none
5712
 
+   real, dimension(2) :: x = 1.0, y
5713
 
+   y = f_workaround (x)
5714
 
+   if (any (f_segfault (x) .ne. y)) call abort
5715
 
+   if (any (f_segfault_plus (x) .ne. y)) call abort
5716
 
+end program main
5717
 
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
5718
 
===================================================================
5719
 
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../tags/gcc_4_8_3_release)
5720
 
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../branches/gcc-4_8-branch)
5721
 
@@ -16,7 +16,7 @@
5722
 
 implicit none
5723
 
 real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
5724
 
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
5725
 
-                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
5726
 
+                  * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
5727
 
 ! The following is sufficient for me - the values above are a bit
5728
 
 ! more tolerant
5729
 
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
5730
 
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
5731
 
===================================================================
5732
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
5733
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
5734
 
@@ -0,0 +1,29 @@
5735
 
+/* PR rtl-optimization/63659 */
5736
 
+
5737
 
+int a, b, c, *d = &b, g, h, i;
5738
 
+unsigned char e;
5739
 
+char f;
5740
 
+
5741
 
+int
5742
 
+main ()
5743
 
+{
5744
 
+  while (a)
5745
 
+    {
5746
 
+      for (a = 0; a; a++)
5747
 
+       for (; c; c++)
5748
 
+         ;
5749
 
+      if (i)
5750
 
+       break;
5751
 
+    }
5752
 
+
5753
 
+  char j = c, k = -1, l;
5754
 
+  l = g = j >> h;
5755
 
+  f = l == 0 ? k : k % l;
5756
 
+  e = 0 ? 0 : f;
5757
 
+  *d = e;
5758
 
+
5759
 
+  if (b != 255)
5760
 
+    __builtin_abort ();
5761
 
+
5762
 
+  return 0;
5763
 
+}
5764
 
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
5765
 
===================================================================
5766
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../tags/gcc_4_8_3_release)
5767
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../branches/gcc-4_8-branch)
5768
 
@@ -0,0 +1,39 @@
5769
 
+#ifdef __INT32_TYPE__
5770
 
+typedef __INT32_TYPE__ int32_t;
5771
 
+#else
5772
 
+typedef int int32_t;
5773
 
+#endif
5774
 
+
5775
 
+#ifdef __UINT32_TYPE__
5776
 
+typedef __UINT32_TYPE__ uint32_t;
5777
 
+#else
5778
 
+typedef unsigned uint32_t;
5779
 
+#endif
5780
 
+
5781
 
+#define __fake_const_swab32(x) ((uint32_t)(                  \
5782
 
+       (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |    \
5783
 
+       (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |    \
5784
 
+       (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |    \
5785
 
+       (( (int32_t)(x) &  (int32_t)0xff000000UL) >> 24)))
5786
 
+
5787
 
+/* Previous version of bswap optimization failed to consider sign extension
5788
 
+   and as a result would replace an expression *not* doing a bswap by a
5789
 
+   bswap.  */
5790
 
+
5791
 
+__attribute__ ((noinline, noclone)) uint32_t
5792
 
+fake_bswap32 (uint32_t in)
5793
 
+{
5794
 
+  return __fake_const_swab32 (in);
5795
 
+}
5796
 
+
5797
 
+int
5798
 
+main(void)
5799
 
+{
5800
 
+  if (sizeof (int32_t) * __CHAR_BIT__ != 32)
5801
 
+    return 0;
5802
 
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5803
 
+    return 0;
5804
 
+  if (fake_bswap32 (0x87654321) != 0xffffff87)
5805
 
+    __builtin_abort ();
5806
 
+  return 0;
5807
 
+}
5808
 
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
5809
 
===================================================================
5810
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
5811
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
5812
 
@@ -0,0 +1,2 @@
5813
 
+set additional_flags "-Wno-psabi"
5814
 
+return 0
5815
 
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
5816
 
===================================================================
5817
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../tags/gcc_4_8_3_release)
5818
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../branches/gcc-4_8-branch)
5819
 
@@ -0,0 +1,23 @@
5820
 
+union U
5821
 
+{
5822
 
+  const int a;
5823
 
+  unsigned b : 20;
5824
 
+};
5825
 
+
5826
 
+static union U u = { 0x12345678 };
5827
 
+
5828
 
+/* Constant folding used to fail to account for endianness when folding a
5829
 
+   union.  */
5830
 
+
5831
 
+int
5832
 
+main (void)
5833
 
+{
5834
 
+#ifdef __BYTE_ORDER__
5835
 
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
5836
 
+  return u.b - 0x45678;
5837
 
+#else
5838
 
+  return u.b - 0x12345;
5839
 
+#endif
5840
 
+#endif
5841
 
+  return 0;
5842
 
+}
5843
 
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
5844
 
===================================================================
5845
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../tags/gcc_4_8_3_release)
5846
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../branches/gcc-4_8-branch)
5847
 
@@ -0,0 +1,13 @@
5848
 
+short a = -1;
5849
 
+int b;
5850
 
+char c;
5851
 
+
5852
 
+int
5853
 
+main ()
5854
 
+{
5855
 
+  c = a;
5856
 
+  b = a | c;
5857
 
+  if (b != -1)
5858
 
+    __builtin_abort ();
5859
 
+  return 0;
5860
 
+}
5861
 
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
5862
 
===================================================================
5863
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../tags/gcc_4_8_3_release)
5864
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../branches/gcc-4_8-branch)
5865
 
@@ -6,4 +6,5 @@
5866
 
        set additional_flags "-mno-mmx"
5867
 
 }
5868
 
 
5869
 
+set additional_flags "-Wno-psabi"
5870
 
 return 0
5871
 
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
5872
 
===================================================================
5873
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../tags/gcc_4_8_3_release)
5874
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../branches/gcc-4_8-branch)
5875
 
@@ -0,0 +1,40 @@
5876
 
+#ifdef __INT16_TYPE__
5877
 
+typedef __INT16_TYPE__ int16_t;
5878
 
+#else
5879
 
+typedef short int16_t;
5880
 
+#endif
5881
 
+
5882
 
+#ifdef __UINT32_TYPE__
5883
 
+typedef __UINT32_TYPE__ uint32_t;
5884
 
+#else
5885
 
+typedef unsigned uint32_t;
5886
 
+#endif
5887
 
+
5888
 
+#define __fake_const_swab32(x) ((uint32_t)(                          \
5889
 
+       (((uint32_t)         (x) & (uint32_t)0x000000ffUL) << 24) |   \
5890
 
+       (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) <<  8) |   \
5891
 
+       (((uint32_t)         (x) & (uint32_t)0x00ff0000UL) >>  8) |   \
5892
 
+       (((uint32_t)         (x) & (uint32_t)0xff000000UL) >> 24)))
5893
 
+
5894
 
+
5895
 
+/* Previous version of bswap optimization failed to consider sign extension
5896
 
+   and as a result would replace an expression *not* doing a bswap by a
5897
 
+   bswap.  */
5898
 
+
5899
 
+__attribute__ ((noinline, noclone)) uint32_t
5900
 
+fake_bswap32 (uint32_t in)
5901
 
+{
5902
 
+  return __fake_const_swab32 (in);
5903
 
+}
5904
 
+
5905
 
+int
5906
 
+main(void)
5907
 
+{
5908
 
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5909
 
+    return 0;
5910
 
+  if (sizeof (int16_t) * __CHAR_BIT__ != 16)
5911
 
+    return 0;
5912
 
+  if (fake_bswap32 (0x81828384) != 0xff838281)
5913
 
+    __builtin_abort ();
5914
 
+  return 0;
5915
 
+}
5916
 
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
5917
 
===================================================================
5918
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
5919
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
5920
 
@@ -0,0 +1,35 @@
5921
 
+#ifdef __UINT64_TYPE__
5922
 
+typedef __UINT64_TYPE__ uint64_t;
5923
 
+#else
5924
 
+typedef unsigned long long uint64_t;
5925
 
+#endif
5926
 
+
5927
 
+#ifndef __SIZEOF_INT128__
5928
 
+#define __int128 long long
5929
 
+#endif
5930
 
+
5931
 
+/* Some version of bswap optimization would ICE when analyzing a mask constant
5932
 
+   too big for an HOST_WIDE_INT (PR61375).  */
5933
 
+
5934
 
+__attribute__ ((noinline, noclone)) uint64_t
5935
 
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
5936
 
+{
5937
 
+  __int128 mask = (__int128)0xffff << 56;
5938
 
+  return ((in1 & mask) >> 56) | in2;
5939
 
+}
5940
 
+
5941
 
+int
5942
 
+main (int argc)
5943
 
+{
5944
 
+  __int128 in = 1;
5945
 
+#ifdef __SIZEOF_INT128__
5946
 
+  in <<= 64;
5947
 
+#endif
5948
 
+  if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
5949
 
+    return 0;
5950
 
+  if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
5951
 
+    return 0;
5952
 
+  if (uint128_central_bitsi_ior (in, 2) != 0x102)
5953
 
+    __builtin_abort ();
5954
 
+  return 0;
5955
 
+}
5956
 
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
5957
 
===================================================================
5958
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../tags/gcc_4_8_3_release)
5959
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../branches/gcc-4_8-branch)
5960
 
@@ -4,4 +4,5 @@
5961
 
        return 1
5962
 
 }
5963
 
 
5964
 
+set additional_flags "-Wno-psabi"
5965
 
 return 0;
5966
 
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
5967
 
===================================================================
5968
 
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../tags/gcc_4_8_3_release)
5969
 
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../branches/gcc-4_8-branch)
5970
 
@@ -0,0 +1,2 @@
5971
 
+set additional_flags "-Wno-psabi"
5972
 
+return 0
5973
 
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
5974
 
===================================================================
5975
 
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
5976
 
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
5977
 
@@ -0,0 +1,15 @@
5978
 
+/* PR tree-optimization/61684 */
5979
 
+
5980
 
+int a, c;
5981
 
+static int *b = 0;
5982
 
+short d;
5983
 
+static short **e = 0;
5984
 
+
5985
 
+void
5986
 
+foo ()
5987
 
+{
5988
 
+  for (; c < 1; c++)
5989
 
+    ;
5990
 
+  *e = &d;
5991
 
+  a = d && (c && 1) & *b;
5992
 
+}
5993
 
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
5994
 
===================================================================
5995
 
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
5996
 
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
5997
 
@@ -0,0 +1,10 @@
5998
 
+/* PR middle-end/64067 */
5999
 
+
6000
 
+struct S { int s; };
6001
 
+int *const v[1] = { &((struct S) { .s = 42 }).s };
6002
 
+
6003
 
+int *
6004
 
+foo (void)
6005
 
+{
6006
 
+  return v[0];
6007
 
+}
6008
 
Index: gcc/testsuite/gcc.c-torture/compile/pr64269.c
6009
 
===================================================================
6010
 
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64269.c (.../tags/gcc_4_8_3_release)
6011
 
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64269.c (.../branches/gcc-4_8-branch)
6012
 
@@ -0,0 +1,9 @@
6013
 
+/* PR tree-optimization/64269 */
6014
 
+
6015
 
+void
6016
 
+foo (char *p)
6017
 
+{
6018
 
+  __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
6019
 
+  *p = 0;
6020
 
+  __builtin_memset (p + 1, 0, s);
6021
 
+}
6022
 
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
6023
 
===================================================================
6024
 
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
6025
 
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
6026
 
@@ -0,0 +1,13 @@
6027
 
+/* PR inline-asm/63282 */
6028
 
+
6029
 
+void bar (void);
6030
 
+
6031
 
+void
6032
 
+foo (void)
6033
 
+{
6034
 
+  asm volatile goto ("" : : : : a, b);
6035
 
+a:
6036
 
+  bar ();
6037
 
+b:
6038
 
+  return;
6039
 
+}
6040
 
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
6041
 
===================================================================
6042
 
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../tags/gcc_4_8_3_release)
6043
 
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../branches/gcc-4_8-branch)
6044
 
@@ -0,0 +1,53 @@
6045
 
+with Ada.Streams; use Ada.Streams;
6046
 
+
6047
 
+package body Opt41_Pkg is
6048
 
+
6049
 
+   type Wstream is new Root_Stream_Type with record
6050
 
+      S : Unbounded_String;
6051
 
+   end record;
6052
 
+
6053
 
+   procedure Read (Stream : in out Wstream;
6054
 
+                   Item   : out Stream_Element_Array;
6055
 
+                   Last   : out Stream_Element_Offset) is null;
6056
 
+
6057
 
+   procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
6058
 
+   begin
6059
 
+      for J in Item'Range loop
6060
 
+         Append (Stream.S, Character'Val (Item (J)));
6061
 
+      end loop;
6062
 
+   end Write;
6063
 
+
6064
 
+   function Rec_Write (R : Rec) return Unbounded_String is
6065
 
+      S : aliased Wstream;
6066
 
+   begin
6067
 
+      Rec'Output (S'Access, R);
6068
 
+      return S.S;
6069
 
+   end Rec_Write;
6070
 
+
6071
 
+   type Rstream is new Root_Stream_Type with record
6072
 
+      S   : String_Access;
6073
 
+      Idx : Integer := 1;
6074
 
+   end record;
6075
 
+
6076
 
+   procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
6077
 
+
6078
 
+   procedure Read (Stream : in out Rstream;
6079
 
+                   Item   : out Stream_Element_Array;
6080
 
+                   Last   : out Stream_Element_Offset) is
6081
 
+   begin
6082
 
+      Last := Stream_Element_Offset'Min
6083
 
+         (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
6084
 
+      for I in Item'First .. Last loop
6085
 
+         Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
6086
 
+         Stream.Idx := Stream.Idx + 1;
6087
 
+      end loop;
6088
 
+   end Read;
6089
 
+
6090
 
+   function Rec_Read (Str : String_Access) return Rec is
6091
 
+      S : aliased Rstream;
6092
 
+   begin
6093
 
+      S.S := Str;
6094
 
+      return Rec'Input (S'Access);
6095
 
+   end Rec_Read;
6096
 
+
6097
 
+end Opt41_Pkg;
6098
 
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
6099
 
===================================================================
6100
 
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../tags/gcc_4_8_3_release)
6101
 
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../branches/gcc-4_8-branch)
6102
 
@@ -0,0 +1,28 @@
6103
 
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
6104
 
+
6105
 
+package Opt41_Pkg is
6106
 
+
6107
 
+   type Enum is (One, Two, Three, Four, Five, Six);
6108
 
+
6109
 
+   type Rec (D : Enum) is record
6110
 
+      case D is
6111
 
+         when One => 
6112
 
+            I : Integer;
6113
 
+         when Two | Five | Six =>
6114
 
+            S : Unbounded_String;
6115
 
+            case D is
6116
 
+               when Two => B : Boolean;
6117
 
+               when others => null;
6118
 
+            end case;
6119
 
+         when others =>
6120
 
+            null;
6121
 
+      end case;
6122
 
+   end record;
6123
 
+
6124
 
+   type Rec_Ptr is access all Rec;
6125
 
+
6126
 
+   function Rec_Write (R : Rec) return Unbounded_String;
6127
 
+
6128
 
+   function Rec_Read (Str : String_Access) return Rec;
6129
 
+
6130
 
+end Opt41_Pkg;
6131
 
Index: gcc/testsuite/gnat.dg/opt39.adb
6132
 
===================================================================
6133
 
--- a/src/gcc/testsuite/gnat.dg/opt39.adb       (.../tags/gcc_4_8_3_release)
6134
 
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb       (.../branches/gcc-4_8-branch)
6135
 
@@ -0,0 +1,31 @@
6136
 
+-- { dg-do compile }
6137
 
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
6138
 
+
6139
 
+procedure Opt39 (I : Integer) is
6140
 
+
6141
 
+  type Rec is record
6142
 
+    I1 : Integer;
6143
 
+    I2 : Integer;
6144
 
+    I3 : Integer;
6145
 
+    I4 : Integer;
6146
 
+    I5 : Integer;
6147
 
+  end record;
6148
 
+
6149
 
+  procedure Set (A : access Rec; I : Integer) is
6150
 
+    Tmp : Rec := A.all;
6151
 
+  begin
6152
 
+    Tmp.I1 := I;
6153
 
+    A.all := Tmp;
6154
 
+  end;
6155
 
+
6156
 
+  R : aliased Rec;
6157
 
+
6158
 
+begin
6159
 
+  Set (R'Access, I);
6160
 
+  if R.I1 /= I then
6161
 
+    raise Program_Error;
6162
 
+  end if;
6163
 
+end;
6164
 
+
6165
 
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
6166
 
+-- { dg-final { cleanup-tree-dump "optimized" } }
6167
 
Index: gcc/testsuite/gnat.dg/opt41.adb
6168
 
===================================================================
6169
 
--- a/src/gcc/testsuite/gnat.dg/opt41.adb       (.../tags/gcc_4_8_3_release)
6170
 
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb       (.../branches/gcc-4_8-branch)
6171
 
@@ -0,0 +1,15 @@
6172
 
+-- { dg-do run }
6173
 
+-- { dg-options "-Os" }
6174
 
+
6175
 
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
6176
 
+with Opt41_Pkg;             use Opt41_Pkg;
6177
 
+
6178
 
+procedure Opt41 is
6179
 
+   R  : Rec := (Five, To_Unbounded_String ("CONFIG"));
6180
 
+   SP : String_Access := new String'(To_String (Rec_Write (R)));
6181
 
+   RP : Rec_Ptr := new Rec'(Rec_Read (SP));
6182
 
+begin
6183
 
+   if RP.D /= R.D then
6184
 
+      raise Program_Error;
6185
 
+   end if;
6186
 
+end;
6187
 
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
6188
 
===================================================================
6189
 
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../tags/gcc_4_8_3_release)
6190
 
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../branches/gcc-4_8-branch)
6191
 
@@ -0,0 +1,19 @@
6192
 
+-- { dg-do run }
6193
 
+-- { dg-options "-gnato -O" }
6194
 
+
6195
 
+procedure Overflow_Fixed is
6196
 
+
6197
 
+  type Unsigned_8_Bit is mod 2**8;
6198
 
+
6199
 
+  procedure Fixed_To_Eight (Value : Duration) is
6200
 
+    Item : Unsigned_8_Bit;
6201
 
+  begin
6202
 
+    Item := Unsigned_8_Bit(Value);
6203
 
+    raise Program_Error;
6204
 
+  exception
6205
 
+    when Constraint_Error => null; -- expected case
6206
 
+  end;
6207
 
+
6208
 
+begin
6209
 
+  Fixed_To_Eight (-0.5);
6210
 
+end;
6211
 
Index: gcc/testsuite/gnat.dg/aliasing1.adb
6212
 
===================================================================
6213
 
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../tags/gcc_4_8_3_release)
6214
 
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../branches/gcc-4_8-branch)
6215
 
@@ -18,5 +18,5 @@
6216
 
 
6217
 
 end Aliasing1;
6218
 
 
6219
 
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
6220
 
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
6221
 
 -- { dg-final { cleanup-tree-dump "optimized" } }
6222
 
Index: gcc/testsuite/gcc.dg/pr60866.c
6223
 
===================================================================
6224
 
--- a/src/gcc/testsuite/gcc.dg/pr60866.c        (.../tags/gcc_4_8_3_release)
6225
 
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c        (.../branches/gcc-4_8-branch)
6226
 
@@ -0,0 +1,18 @@
6227
 
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
6228
 
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns"  } */
6229
 
+
6230
 
+int n;
6231
 
+
6232
 
+void
6233
 
+foo (int w, int **dnroot, int **dn)
6234
 
+{
6235
 
+  int *child;
6236
 
+  int *xchild = xchild;
6237
 
+  for (; w < n; w++)
6238
 
+    if (!dnroot)
6239
 
+      {
6240
 
+       dnroot = dn;
6241
 
+       for (child = *dn; child; child = xchild)
6242
 
+         ;
6243
 
+      }
6244
 
+}
6245
 
Index: gcc/testsuite/gcc.dg/pr51879-12.c
6246
 
===================================================================
6247
 
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../tags/gcc_4_8_3_release)
6248
 
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../branches/gcc-4_8-branch)
6249
 
@@ -24,6 +24,6 @@
6250
 
   baz (a);
6251
 
 }
6252
 
 
6253
 
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
6254
 
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
6255
 
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
6256
 
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
6257
 
 /* { dg-final { cleanup-tree-dump "pre" } } */
6258
 
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
6259
 
===================================================================
6260
 
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../tags/gcc_4_8_3_release)
6261
 
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../branches/gcc-4_8-branch)
6262
 
@@ -1,4 +1,5 @@
6263
 
 /* { dg-do compile } */
6264
 
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6265
 
 #include <altivec.h>
6266
 
 typedef const volatile unsigned int _1;
6267
 
 typedef const  unsigned int _2;
6268
 
Index: gcc/testsuite/gcc.dg/vmx/ops.c
6269
 
===================================================================
6270
 
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../tags/gcc_4_8_3_release)
6271
 
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../branches/gcc-4_8-branch)
6272
 
@@ -1,4 +1,5 @@
6273
 
 /* { dg-do compile } */
6274
 
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6275
 
 #include <altivec.h>
6276
 
 #include <stdlib.h>
6277
 
 extern char * *var_char_ptr;
6278
 
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
6279
 
===================================================================
6280
 
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
6281
 
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
6282
 
@@ -1,4 +1,5 @@
6283
 
 /* { dg-do compile } */
6284
 
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6285
 
 
6286
 
 /* Checks from the original ops.c that pass pointers to long or
6287
 
    unsigned long for operations that support that in released versions
6288
 
Index: gcc/testsuite/gcc.dg/pr63665.c
6289
 
===================================================================
6290
 
--- a/src/gcc/testsuite/gcc.dg/pr63665.c        (.../tags/gcc_4_8_3_release)
6291
 
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c        (.../branches/gcc-4_8-branch)
6292
 
@@ -0,0 +1,18 @@
6293
 
+/* { dg-do run } */
6294
 
+/* { dg-require-effective-target int32plus } */
6295
 
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
6296
 
+
6297
 
+static inline int
6298
 
+test5 (int x)
6299
 
+{
6300
 
+  int y = 0x80000000;
6301
 
+  return x + y;
6302
 
+}
6303
 
+
6304
 
+int
6305
 
+main ()
6306
 
+{
6307
 
+  if (test5 (0x80000000) != 0)
6308
 
+    __builtin_abort ();
6309
 
+  return 0;
6310
 
+}
6311
 
Index: gcc/testsuite/gcc.dg/pr63342.c
6312
 
===================================================================
6313
 
--- a/src/gcc/testsuite/gcc.dg/pr63342.c        (.../tags/gcc_4_8_3_release)
6314
 
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c        (.../branches/gcc-4_8-branch)
6315
 
@@ -0,0 +1,26 @@
6316
 
+/* PR debug/63342 */
6317
 
+/* { dg-do compile } */
6318
 
+/* { dg-options "-g -O2" } */
6319
 
+/* { dg-additional-options "-fpic" { target fpic } } */
6320
 
+
6321
 
+static __thread double u[9], v[9];
6322
 
+
6323
 
+void
6324
 
+foo (double **p, double **q)
6325
 
+{
6326
 
+  *p = u;
6327
 
+  *q = v;
6328
 
+}
6329
 
+
6330
 
+double
6331
 
+bar (double x)
6332
 
+{
6333
 
+  int i;
6334
 
+  double s = 0.0;
6335
 
+  for (i = 0; i < 9; i++)
6336
 
+    {
6337
 
+      double a = x + v[i];
6338
 
+      s += u[i] * a * a;
6339
 
+    }
6340
 
+  return s;
6341
 
+}
6342
 
Index: gcc/testsuite/gcc.dg/pr63284.c
6343
 
===================================================================
6344
 
--- a/src/gcc/testsuite/gcc.dg/pr63284.c        (.../tags/gcc_4_8_3_release)
6345
 
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c        (.../branches/gcc-4_8-branch)
6346
 
@@ -0,0 +1,42 @@
6347
 
+/* PR debug/63284 */
6348
 
+/* { dg-do compile } */
6349
 
+/* { dg-options "-O2 -fcompare-debug" } */
6350
 
+
6351
 
+int a[10], *b, *d, c, f;
6352
 
+int fn2 (void);
6353
 
+void fn3 (void);
6354
 
+void fn4 (int);
6355
 
+
6356
 
+static int
6357
 
+fn1 (int x)
6358
 
+{
6359
 
+  int e = a[0];
6360
 
+  if (e)
6361
 
+    return 1;
6362
 
+  if (b)
6363
 
+    switch (x)
6364
 
+      {
6365
 
+      case 1:
6366
 
+        if (d)
6367
 
+          e = fn2 ();
6368
 
+        else
6369
 
+          fn3 ();
6370
 
+        break;
6371
 
+      case 0:
6372
 
+        if (d)
6373
 
+          {
6374
 
+            fn3 ();
6375
 
+            if (c)
6376
 
+              fn4 (1);
6377
 
+          }
6378
 
+        else
6379
 
+          fn4 (0);
6380
 
+      }
6381
 
+  return e;
6382
 
+}
6383
 
+
6384
 
+void
6385
 
+fn6 (void)
6386
 
+{
6387
 
+  f = fn1 (0);
6388
 
+}
6389
 
Index: gcc/testsuite/gcc.dg/pr61045.c
6390
 
===================================================================
6391
 
--- a/src/gcc/testsuite/gcc.dg/pr61045.c        (.../tags/gcc_4_8_3_release)
6392
 
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c        (.../branches/gcc-4_8-branch)
6393
 
@@ -0,0 +1,12 @@
6394
 
+/* { dg-do run } */
6395
 
+/* { dg-options "-fstrict-overflow" } */
6396
 
+
6397
 
+int main ()
6398
 
+{
6399
 
+  int a = 0;
6400
 
+  int b = __INT_MAX__;
6401
 
+  int t = (a - 2) > (b - 1);
6402
 
+  if (t != 0)
6403
 
+    __builtin_abort();
6404
 
+  return 0;
6405
 
+}
6406
 
Index: gcc/testsuite/gcc.dg/pr62167-run.c
6407
 
===================================================================
6408
 
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../tags/gcc_4_8_3_release)
6409
 
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../branches/gcc-4_8-branch)
6410
 
@@ -0,0 +1,47 @@
6411
 
+/* { dg-do run } */
6412
 
+/* { dg-options "-O2 -ftree-tail-merge" } */
6413
 
+
6414
 
+struct node
6415
 
+{
6416
 
+  struct node *next;
6417
 
+  struct node *prev;
6418
 
+};
6419
 
+
6420
 
+struct node node;
6421
 
+
6422
 
+struct head
6423
 
+{
6424
 
+  struct node *first;
6425
 
+};
6426
 
+
6427
 
+struct head heads[5];
6428
 
+
6429
 
+int k = 2;
6430
 
+
6431
 
+struct head *head = &heads[2];
6432
 
+
6433
 
+int
6434
 
+main ()
6435
 
+{
6436
 
+  struct node *p;
6437
 
+
6438
 
+  node.next = (void*)0;
6439
 
+
6440
 
+  node.prev = (void *)head;
6441
 
+
6442
 
+  head->first = &node;
6443
 
+
6444
 
+  struct node *n = head->first;
6445
 
+
6446
 
+  struct head *h = &heads[k];
6447
 
+
6448
 
+  heads[2].first = n->next;
6449
 
+
6450
 
+  if ((void*)n->prev == (void *)h)
6451
 
+    p = h->first;
6452
 
+  else
6453
 
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
6454
 
+    p = n->prev->next;
6455
 
+
6456
 
+  return !(p == (void*)0);
6457
 
+}
6458
 
Index: gcc/testsuite/gcc.dg/pr52769.c
6459
 
===================================================================
6460
 
--- a/src/gcc/testsuite/gcc.dg/pr52769.c        (.../tags/gcc_4_8_3_release)
6461
 
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c        (.../branches/gcc-4_8-branch)
6462
 
@@ -0,0 +1,24 @@
6463
 
+/* PR c/52769 */
6464
 
+/* { dg-do run } */
6465
 
+/* { dg-options "-O3" } */
6466
 
+
6467
 
+typedef struct
6468
 
+{
6469
 
+  int should_be_zero;
6470
 
+  char s[6];
6471
 
+  int x;
6472
 
+} foo_t;
6473
 
+
6474
 
+int
6475
 
+main (void)
6476
 
+{
6477
 
+  volatile foo_t foo = {
6478
 
+    .s = "123456",
6479
 
+    .x = 2
6480
 
+  };
6481
 
+
6482
 
+  if (foo.should_be_zero != 0)
6483
 
+    __builtin_abort ();
6484
 
+
6485
 
+  return 0;
6486
 
+}
6487
 
Index: gcc/testsuite/gcc.dg/pr62167.c
6488
 
===================================================================
6489
 
--- a/src/gcc/testsuite/gcc.dg/pr62167.c        (.../tags/gcc_4_8_3_release)
6490
 
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c        (.../branches/gcc-4_8-branch)
6491
 
@@ -0,0 +1,50 @@
6492
 
+/* { dg-do compile } */
6493
 
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
6494
 
+
6495
 
+struct node
6496
 
+{
6497
 
+  struct node *next;
6498
 
+  struct node *prev;
6499
 
+};
6500
 
+
6501
 
+struct node node;
6502
 
+
6503
 
+struct head
6504
 
+{
6505
 
+  struct node *first;
6506
 
+};
6507
 
+
6508
 
+struct head heads[5];
6509
 
+
6510
 
+int k = 2;
6511
 
+
6512
 
+struct head *head = &heads[2];
6513
 
+
6514
 
+int
6515
 
+main ()
6516
 
+{
6517
 
+  struct node *p;
6518
 
+
6519
 
+  node.next = (void*)0;
6520
 
+
6521
 
+  node.prev = (void *)head;
6522
 
+
6523
 
+  head->first = &node;
6524
 
+
6525
 
+  struct node *n = head->first;
6526
 
+
6527
 
+  struct head *h = &heads[k];
6528
 
+
6529
 
+  heads[2].first = n->next;
6530
 
+
6531
 
+  if ((void*)n->prev == (void *)h)
6532
 
+    p = h->first;
6533
 
+  else
6534
 
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
6535
 
+    p = n->prev->next;
6536
 
+
6537
 
+  return !(p == (void*)0);
6538
 
+}
6539
 
+
6540
 
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
6541
 
+/* { dg-final { cleanup-tree-dump "pre" } } */
6542
 
Index: gcc/testsuite/gcc.dg/pr62004.c
6543
 
===================================================================
6544
 
--- a/src/gcc/testsuite/gcc.dg/pr62004.c        (.../tags/gcc_4_8_3_release)
6545
 
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c        (.../branches/gcc-4_8-branch)
6546
 
@@ -0,0 +1,47 @@
6547
 
+/* { dg-do run } */
6548
 
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
6549
 
+
6550
 
+struct node
6551
 
+{
6552
 
+  struct node *next;
6553
 
+  struct node *prev;
6554
 
+};
6555
 
+
6556
 
+struct node node;
6557
 
+
6558
 
+struct head
6559
 
+{
6560
 
+  struct node *first;
6561
 
+};
6562
 
+
6563
 
+struct head heads[5];
6564
 
+
6565
 
+int k = 2;
6566
 
+
6567
 
+struct head *head = &heads[2];
6568
 
+
6569
 
+int
6570
 
+main ()
6571
 
+{
6572
 
+  struct node *p;
6573
 
+
6574
 
+  node.next = (void*)0;
6575
 
+
6576
 
+  node.prev = (void *)head;
6577
 
+
6578
 
+  head->first = &node;
6579
 
+
6580
 
+  struct node *n = head->first;
6581
 
+
6582
 
+  struct head *h = &heads[k];
6583
 
+
6584
 
+  heads[2].first = n->next;
6585
 
+
6586
 
+  if ((void*)n->prev == (void *)h)
6587
 
+    p = h->first;
6588
 
+  else
6589
 
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
6590
 
+    p = n->prev->next;
6591
 
+
6592
 
+  return !(p == (void*)0);
6593
 
+}
6594
 
Index: gcc/testsuite/gcc.dg/pr51879-18.c
6595
 
===================================================================
6596
 
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../tags/gcc_4_8_3_release)
6597
 
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../branches/gcc-4_8-branch)
6598
 
@@ -13,5 +13,5 @@
6599
 
     *q = foo ();
6600
 
 }
6601
 
 
6602
 
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
6603
 
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
6604
 
 /* { dg-final { cleanup-tree-dump "pre" } } */
6605
 
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
6606
 
===================================================================
6607
 
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../tags/gcc_4_8_3_release)
6608
 
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../branches/gcc-4_8-branch)
6609
 
@@ -0,0 +1,33 @@
6610
 
+/* { dg-do run } */
6611
 
+
6612
 
+extern void abort (void);
6613
 
+
6614
 
+struct node { struct node *next, *prev; } node;
6615
 
+struct head { struct node *first; } heads[5];
6616
 
+int k = 2;
6617
 
+struct head *head = &heads[2];
6618
 
+
6619
 
+static int __attribute__((noinline))
6620
 
+foo()
6621
 
+{
6622
 
+  node.prev = (void *)head;
6623
 
+  head->first = &node;
6624
 
+
6625
 
+  struct node *n = head->first;
6626
 
+  struct head *h = &heads[k];
6627
 
+
6628
 
+  if (n->prev == (void *)h)
6629
 
+    h->first = n->next;
6630
 
+  else
6631
 
+    n->prev->next = n->next;
6632
 
+
6633
 
+  n->next = h->first;
6634
 
+  return n->next == &node;
6635
 
+}
6636
 
+
6637
 
+int main()
6638
 
+{
6639
 
+  if (foo ())
6640
 
+    abort ();
6641
 
+  return 0;
6642
 
+}
6643
 
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
6644
 
===================================================================
6645
 
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../tags/gcc_4_8_3_release)
6646
 
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../branches/gcc-4_8-branch)
6647
 
@@ -0,0 +1,8 @@
6648
 
+/* { dg-do compile } */
6649
 
+
6650
 
+int main (void)
6651
 
+{
6652
 
+  int a = 0;
6653
 
+  unsigned b = (a * 64 & 192) | 63U;
6654
 
+  return 0;
6655
 
+}
6656
 
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
6657
 
===================================================================
6658
 
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../tags/gcc_4_8_3_release)
6659
 
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../branches/gcc-4_8-branch)
6660
 
@@ -0,0 +1,31 @@
6661
 
+/* { dg-do run } */
6662
 
+
6663
 
+int a, b;
6664
 
+short c, d;
6665
 
+char e, f;
6666
 
+
6667
 
+int
6668
 
+fn1 (int p1, char p2)
6669
 
+{
6670
 
+  return p1 || p2 ? 0 : p2;
6671
 
+}
6672
 
+
6673
 
+void
6674
 
+fn2 ()
6675
 
+{
6676
 
+  for (; a;)
6677
 
+    {
6678
 
+      int g;
6679
 
+      g = c = e;
6680
 
+      for (; a;)
6681
 
+       b = fn1 (g = d = e, g);
6682
 
+      f = g; 
6683
 
+    }
6684
 
+}
6685
 
+
6686
 
+int
6687
 
+main ()
6688
 
+{
6689
 
+  fn2 (); 
6690
 
+  return 0;
6691
 
+}
6692
 
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
6693
 
===================================================================
6694
 
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../tags/gcc_4_8_3_release)
6695
 
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../branches/gcc-4_8-branch)
6696
 
@@ -0,0 +1,35 @@
6697
 
+/* { dg-do run } */
6698
 
+
6699
 
+int a, b = 1, c, d, e, f, g;
6700
 
+
6701
 
+int
6702
 
+fn1 ()
6703
 
+{
6704
 
+  int h;
6705
 
+  for (;;)
6706
 
+    {
6707
 
+      g = b;
6708
 
+      g = g ? 0 : 1 % g;
6709
 
+      e = a + 1;
6710
 
+      for (; d < 1; d = e)
6711
 
+       {
6712
 
+         if (f == 0)
6713
 
+           h = 0;
6714
 
+         else
6715
 
+           h = 1 % f;
6716
 
+         if (f < 1)
6717
 
+           c = 0;
6718
 
+         else if (h)
6719
 
+           break;
6720
 
+       }
6721
 
+      if (b)
6722
 
+       return 0;
6723
 
+    }
6724
 
+}
6725
 
+
6726
 
+int
6727
 
+main ()
6728
 
+{
6729
 
+  fn1 ();
6730
 
+  return 0;
6731
 
+}
6732
 
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
6733
 
===================================================================
6734
 
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../tags/gcc_4_8_3_release)
6735
 
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../branches/gcc-4_8-branch)
6736
 
@@ -0,0 +1,41 @@
6737
 
+/* Test that exact underflow in __float128 signals the underflow
6738
 
+   exception if trapping is enabled, but does not raise the flag
6739
 
+   otherwise.  */
6740
 
+
6741
 
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
6742
 
+/* { dg-options "-D_GNU_SOURCE" } */
6743
 
+/* { dg-require-effective-target fenv_exceptions } */
6744
 
+
6745
 
+#include <fenv.h>
6746
 
+#include <setjmp.h>
6747
 
+#include <signal.h>
6748
 
+#include <stdlib.h>
6749
 
+
6750
 
+volatile sig_atomic_t caught_sigfpe;
6751
 
+sigjmp_buf buf;
6752
 
+
6753
 
+static void
6754
 
+handle_sigfpe (int sig)
6755
 
+{
6756
 
+  caught_sigfpe = 1;
6757
 
+  siglongjmp (buf, 1);
6758
 
+}
6759
 
+
6760
 
+int
6761
 
+main (void)
6762
 
+{
6763
 
+  volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
6764
 
+  volatile __float128 r;
6765
 
+  r = a * b;
6766
 
+  if (fetestexcept (FE_UNDERFLOW))
6767
 
+    abort ();
6768
 
+  if (r != 0x1p-16384q)
6769
 
+    abort ();
6770
 
+  feenableexcept (FE_UNDERFLOW);
6771
 
+  signal (SIGFPE, handle_sigfpe);
6772
 
+  if (sigsetjmp (buf, 1) == 0)
6773
 
+    r = a * b;
6774
 
+  if (!caught_sigfpe)
6775
 
+    abort ();
6776
 
+  exit (0);
6777
 
+}
6778
 
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
6779
 
===================================================================
6780
 
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../tags/gcc_4_8_3_release)
6781
 
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../branches/gcc-4_8-branch)
6782
 
@@ -0,0 +1,52 @@
6783
 
+/* { dg-do run } */
6784
 
+
6785
 
+#include <stdlib.h>
6786
 
+
6787
 
+#define NUM_OF_STATES 4
6788
 
+typedef unsigned int entry_t[2];
6789
 
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
6790
 
+
6791
 
+void __attribute__((noinline,noclone))
6792
 
+test_00(size_t numOfStates, entries_item_t* p_bm,
6793
 
+       const unsigned int* polyArray,
6794
 
+       size_t polyArraySize)
6795
 
+{
6796
 
+  size_t idx;
6797
 
+  unsigned int hlp0, hlp1;
6798
 
+  for (idx = 0; idx < numOfStates; ++idx)
6799
 
+    {
6800
 
+      size_t idy;
6801
 
+
6802
 
+      hlp0 = (idx << 1) | 0x00;
6803
 
+      hlp1 = (idx << 1) | 0x01;
6804
 
+      p_bm->metricEntries_[idx][0] = 0;
6805
 
+      p_bm->metricEntries_[idx][1] = 0;
6806
 
+      for (idy = 0; idy < polyArraySize; ++idy)
6807
 
+       {
6808
 
+         p_bm->metricEntries_[idx][0]
6809
 
+             |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
6810
 
+         p_bm->metricEntries_[idx][1]
6811
 
+             |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
6812
 
+       }
6813
 
+    }
6814
 
+}
6815
 
+
6816
 
+int main()
6817
 
+{
6818
 
+  unsigned int polyArray[] = { 0x07, 0x05 };
6819
 
+  entries_item_t* pBranchMetrics;
6820
 
+  pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
6821
 
+  test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
6822
 
+         sizeof(polyArray) / sizeof(polyArray[0]));
6823
 
+  if (pBranchMetrics->metricEntries_[0][0] != 0
6824
 
+      || pBranchMetrics->metricEntries_[0][1] != 3
6825
 
+      || pBranchMetrics->metricEntries_[1][0] != 1
6826
 
+      || pBranchMetrics->metricEntries_[1][1] != 2
6827
 
+      || pBranchMetrics->metricEntries_[2][0] != 3
6828
 
+      || pBranchMetrics->metricEntries_[2][1] != 0
6829
 
+      || pBranchMetrics->metricEntries_[3][0] != 2
6830
 
+      || pBranchMetrics->metricEntries_[3][1] != 1)
6831
 
+    abort ();
6832
 
+  free(pBranchMetrics);
6833
 
+  return 0;
6834
 
+}
6835
 
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
6836
 
===================================================================
6837
 
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../tags/gcc_4_8_3_release)
6838
 
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../branches/gcc-4_8-branch)
6839
 
@@ -23,7 +23,8 @@
6840
 
 T (20, 0, 4, 1, 5) \
6841
 
 T (21, 2, 6, 3, 7) \
6842
 
 T (22, 1, 2, 3, 0) \
6843
 
-T (23, 2, 1, 0, 3)
6844
 
+T (23, 2, 1, 0, 3) \
6845
 
+T (24, 2, 5, 6, 3)
6846
 
 #define EXPTESTS \
6847
 
 T (116,        1, 2, 4, 3) \
6848
 
 T (117,        7, 3, 3, 0) \
6849
 
@@ -31,7 +32,6 @@
6850
 
 T (119,        0, 3, 5, 6) \
6851
 
 T (120,        0, 0, 1, 5) \
6852
 
 T (121,        4, 6, 2, 1) \
6853
 
-T (122,        2, 5, 6, 3) \
6854
 
 T (123,        4, 6, 3, 2) \
6855
 
 T (124,        4, 7, 5, 6) \
6856
 
 T (125,        0, 4, 2, 4) \
6857
 
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
6858
 
===================================================================
6859
 
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../tags/gcc_4_8_3_release)
6860
 
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../branches/gcc-4_8-branch)
6861
 
@@ -1,21 +1,21 @@
6862
 
 /* { dg-do compile } */
6863
 
 /* { dg-options "-Wstack-usage=512" } */
6864
 
 
6865
 
-int foo1 (void)
6866
 
+int foo1 (void)  /* { dg-bogus "stack usage" } */
6867
 
 {
6868
 
   char arr[16];
6869
 
   arr[0] = 1;
6870
 
   return 0;
6871
 
-} /* { dg-bogus "stack usage" } */
6872
 
+}
6873
 
 
6874
 
-int foo2 (void)
6875
 
+int foo2 (void)  /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6876
 
 {
6877
 
   char arr[1024];
6878
 
   arr[0] = 1;
6879
 
   return 0;
6880
 
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6881
 
+}
6882
 
 
6883
 
-int foo3 (void)
6884
 
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6885
 
 {
6886
 
   char arr[1024] __attribute__((aligned (512)));
6887
 
   arr[0] = 1;
6888
 
@@ -22,12 +22,11 @@
6889
 
   /* Force dynamic realignment of argument pointer.  */
6890
 
   __builtin_apply ((void (*)()) foo2, 0, 0);
6891
 
   return 0;
6892
 
+}
6893
 
 
6894
 
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6895
 
-
6896
 
-int foo4 (int n)
6897
 
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
6898
 
 {
6899
 
   char arr[n];
6900
 
   arr[0] = 1;
6901
 
   return 0;
6902
 
-} /* { dg-warning "stack usage might be unbounded" } */
6903
 
+}
6904
 
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
6905
 
===================================================================
6906
 
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../tags/gcc_4_8_3_release)
6907
 
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../branches/gcc-4_8-branch)
6908
 
@@ -0,0 +1,48 @@
6909
 
+/* { dg-do compile } */
6910
 
+/* { dg-options "-O3" } */
6911
 
+
6912
 
+int a, b, c;
6913
 
+
6914
 
+struct S
6915
 
+{
6916
 
+  int f0;
6917
 
+  int f1;
6918
 
+} d;
6919
 
+
6920
 
+static int fn2 (struct S);
6921
 
+void fn3 (struct S);
6922
 
+
6923
 
+void
6924
 
+fn1 (struct S p)
6925
 
+{
6926
 
+  struct S h = { 0, 0 };
6927
 
+  fn3 (p);
6928
 
+  fn2 (h);
6929
 
+}
6930
 
+
6931
 
+int
6932
 
+fn2 (struct S p)
6933
 
+{
6934
 
+  struct S j = { 0, 0 };
6935
 
+  fn3 (p);
6936
 
+  fn2 (j);
6937
 
+  return 0;
6938
 
+}
6939
 
+
6940
 
+void
6941
 
+fn3 (struct S p)
6942
 
+{
6943
 
+  for (; b; a++)
6944
 
+    c = p.f0;
6945
 
+  fn1 (d);
6946
 
+}
6947
 
+
6948
 
+void
6949
 
+fn4 ()
6950
 
+{
6951
 
+  for (;;)
6952
 
+    {
6953
 
+      struct S f = { 0, 0 };
6954
 
+      fn1 (f);
6955
 
+    }
6956
 
+}
6957
 
Index: gcc/testsuite/gcc.dg/pr62030.c
6958
 
===================================================================
6959
 
--- a/src/gcc/testsuite/gcc.dg/pr62030.c        (.../tags/gcc_4_8_3_release)
6960
 
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c        (.../branches/gcc-4_8-branch)
6961
 
@@ -0,0 +1,50 @@
6962
 
+/* { dg-do run } */
6963
 
+/* { dg-options "-O2" } */
6964
 
+
6965
 
+extern void abort (void);
6966
 
+
6967
 
+struct node
6968
 
+{
6969
 
+  struct node *next;
6970
 
+  struct node *prev;
6971
 
+};
6972
 
+
6973
 
+struct node node;
6974
 
+
6975
 
+struct head
6976
 
+{
6977
 
+  struct node *first;
6978
 
+};
6979
 
+
6980
 
+struct head heads[5];
6981
 
+
6982
 
+int k = 2;
6983
 
+
6984
 
+struct head *head = &heads[2];
6985
 
+
6986
 
+static int __attribute__((noinline))
6987
 
+foo (void)
6988
 
+{
6989
 
+  node.prev = (void *)head;
6990
 
+  head->first = &node;
6991
 
+
6992
 
+  struct node *n = head->first;
6993
 
+  struct head *h = &heads[k];
6994
 
+  struct node *next = n->next;
6995
 
+
6996
 
+  if (n->prev == (void *)h)
6997
 
+    h->first = next;
6998
 
+  else
6999
 
+    n->prev->next = next;
7000
 
+
7001
 
+  n->next = h->first;
7002
 
+  return n->next == &node;
7003
 
+}
7004
 
+
7005
 
+int
7006
 
+main (void)
7007
 
+{
7008
 
+  if (foo ())
7009
 
+    abort ();
7010
 
+  return 0;
7011
 
+}
7012
 
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
7013
 
===================================================================
7014
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
7015
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
7016
 
@@ -0,0 +1,35 @@
7017
 
+/* PR tree-optimization/63341 */
7018
 
+/* { dg-do run } */
7019
 
+
7020
 
+#include "tree-vect.h"
7021
 
+
7022
 
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
7023
 
+struct S { char e __attribute__((aligned (64))); U s[32]; };
7024
 
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
7025
 
+                 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
7026
 
+                 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
7027
 
+                 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
7028
 
+unsigned short d[32] = { 1 };
7029
 
+
7030
 
+__attribute__((noinline, noclone)) void
7031
 
+foo ()
7032
 
+{
7033
 
+  int i;
7034
 
+  for (i = 0; i < 32; i++)
7035
 
+    d[i] = t.s[i].s + 4;
7036
 
+  for (i = 0; i < 32; i++)
7037
 
+    if (d[i] != t.s[i].s + 4)
7038
 
+      abort ();
7039
 
+    else
7040
 
+      asm volatile ("" : : : "memory");
7041
 
+}
7042
 
+
7043
 
+int
7044
 
+main ()
7045
 
+{
7046
 
+  check_vect ();
7047
 
+  foo ();
7048
 
+  return 0;
7049
 
+}
7050
 
+
7051
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7052
 
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
7053
 
===================================================================
7054
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../tags/gcc_4_8_3_release)
7055
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../branches/gcc-4_8-branch)
7056
 
@@ -0,0 +1,26 @@
7057
 
+/* PR tree-optimization/63189 */
7058
 
+/* { dg-do run } */
7059
 
+
7060
 
+#include "tree-vect.h"
7061
 
+
7062
 
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
7063
 
+
7064
 
+__attribute__((noinline, noclone)) void
7065
 
+foo (void)
7066
 
+{
7067
 
+  int j, s = 0;
7068
 
+  for (j = 0; j < 8; j++)
7069
 
+    s += d[j] * j;
7070
 
+  if (s != 7)
7071
 
+    abort ();
7072
 
+}
7073
 
+
7074
 
+int
7075
 
+main ()
7076
 
+{
7077
 
+  check_vect ();
7078
 
+  foo ();
7079
 
+  return 0;
7080
 
+}
7081
 
+
7082
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7083
 
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
7084
 
===================================================================
7085
 
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../tags/gcc_4_8_3_release)
7086
 
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../branches/gcc-4_8-branch)
7087
 
@@ -0,0 +1,73 @@
7088
 
+/* { dg-require-effective-target vect_int } */
7089
 
+
7090
 
+#include <stdarg.h>
7091
 
+#include "tree-vect.h"
7092
 
+
7093
 
+#define N 64
7094
 
+#define DOT 43680
7095
 
+
7096
 
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7097
 
+signed int   Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7098
 
+
7099
 
+/* (short, int)->int->int dot product.
7100
 
+   Not detected as a dot-product pattern.  */
7101
 
+
7102
 
+__attribute__ ((noinline)) int
7103
 
+foo (int len)
7104
 
+{
7105
 
+  int i;
7106
 
+  int result = 0;
7107
 
+
7108
 
+  for (i = 0; i < len; i++)
7109
 
+    {
7110
 
+      result += (X[i] * Y[i]);
7111
 
+    }
7112
 
+  return result;
7113
 
+}
7114
 
+
7115
 
+
7116
 
+/* (int, short)->int->int dot product.
7117
 
+   Not detected as a dot-product pattern.  */
7118
 
+
7119
 
+__attribute__ ((noinline)) int
7120
 
+bar (int len)
7121
 
+{
7122
 
+  int i;
7123
 
+  int result = 0;
7124
 
+
7125
 
+  for (i = 0; i < len; i++)
7126
 
+    {
7127
 
+      result += (Y[i] * X[i]);
7128
 
+    }
7129
 
+  return result;
7130
 
+}
7131
 
+
7132
 
+int
7133
 
+main (void)
7134
 
+{
7135
 
+  int i;
7136
 
+  int dot;
7137
 
+
7138
 
+  check_vect ();
7139
 
+
7140
 
+  for (i = 0; i < N; i++)
7141
 
+    {
7142
 
+      X[i] = i;
7143
 
+      Y[i] = N - i;
7144
 
+      __asm__ volatile ("");
7145
 
+    }
7146
 
+
7147
 
+  dot = foo (N);
7148
 
+  if (dot != DOT)
7149
 
+    abort ();
7150
 
+
7151
 
+  dot = bar (N);
7152
 
+  if (dot != DOT)
7153
 
+    abort ();
7154
 
+
7155
 
+  return 0;
7156
 
+}
7157
 
+
7158
 
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
7159
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7160
 
+
7161
 
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
7162
 
===================================================================
7163
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../tags/gcc_4_8_3_release)
7164
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../branches/gcc-4_8-branch)
7165
 
@@ -0,0 +1,43 @@
7166
 
+/* PR tree-optimization/63379  */
7167
 
+/* { dg-do run } */
7168
 
+
7169
 
+#include "tree-vect.h"
7170
 
+
7171
 
+extern void abort (void);
7172
 
+
7173
 
+typedef struct {
7174
 
+    int x;
7175
 
+    int y;
7176
 
+} Point;
7177
 
+
7178
 
+Point pt_array[25];
7179
 
+
7180
 
+void __attribute__((noinline,noclone))
7181
 
+generate_array(void)
7182
 
+{
7183
 
+  unsigned int i;
7184
 
+  for (i = 0; i<25; i++)
7185
 
+    {
7186
 
+      pt_array[i].x = i;
7187
 
+      pt_array[i].y = 1000+i;
7188
 
+    }
7189
 
+}
7190
 
+
7191
 
+int main()
7192
 
+{
7193
 
+  check_vect ();
7194
 
+  generate_array ();
7195
 
+  Point min_pt = pt_array[0];
7196
 
+  Point *ptr, *ptr_end;
7197
 
+  for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
7198
 
+    {
7199
 
+      min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
7200
 
+      min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
7201
 
+    }
7202
 
+
7203
 
+  if (min_pt.x != 0 || min_pt.y != 1000)
7204
 
+    abort ();
7205
 
+  return 0;
7206
 
+}
7207
 
+
7208
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7209
 
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
7210
 
===================================================================
7211
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../tags/gcc_4_8_3_release)
7212
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../branches/gcc-4_8-branch)
7213
 
@@ -0,0 +1,40 @@
7214
 
+/* { dg-do compile } */
7215
 
+/* { dg-additional-options "-O1" } */
7216
 
+
7217
 
+struct S0
7218
 
+{
7219
 
+  int f7;
7220
 
+};
7221
 
+struct S0 g_50;
7222
 
+int g_70;
7223
 
+int g_76;
7224
 
+
7225
 
+int foo (long long p_56, int * p_57)
7226
 
+{
7227
 
+  int *l_77;
7228
 
+  int l_101;
7229
 
+
7230
 
+  for (; g_70;)
7231
 
+    {
7232
 
+      int **l_78 = &l_77;
7233
 
+      if (g_50.f7)
7234
 
+       continue;
7235
 
+      *l_78 = 0;
7236
 
+    }
7237
 
+  for (g_76 = 1; g_76 >= 0; g_76--)
7238
 
+    {
7239
 
+      int *l_90;
7240
 
+      for (l_101 = 4; l_101 >= 0; l_101--)
7241
 
+       if (l_101)
7242
 
+         *l_90 = 0;
7243
 
+       else
7244
 
+         {
7245
 
+           int **l_113 = &l_77;
7246
 
+           *l_113 = p_57;
7247
 
+         }
7248
 
+    }
7249
 
+
7250
 
+  return *l_77;
7251
 
+}
7252
 
+
7253
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7254
 
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
7255
 
===================================================================
7256
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
7257
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
7258
 
@@ -0,0 +1,34 @@
7259
 
+/* PR tree-optimization/63189 */
7260
 
+/* { dg-additional-options "-fwrapv" } */
7261
 
+/* { dg-do run } */
7262
 
+
7263
 
+#include "tree-vect.h"
7264
 
+
7265
 
+__attribute__((noinline, noclone)) static int
7266
 
+bar (const short *a, int len)
7267
 
+{
7268
 
+  int x;
7269
 
+  int x1 = 0;
7270
 
+
7271
 
+  for (x = 0; x < len; x++)
7272
 
+    x1 += x * a[x];
7273
 
+  return x1;
7274
 
+}
7275
 
+
7276
 
+__attribute__((noinline, noclone)) void
7277
 
+foo (void)
7278
 
+{
7279
 
+  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
7280
 
+  if (bar (stuff, 9) != 36)
7281
 
+    abort ();
7282
 
+}
7283
 
+
7284
 
+int
7285
 
+main ()
7286
 
+{
7287
 
+  check_vect ();
7288
 
+  foo ();
7289
 
+  return 0;
7290
 
+}
7291
 
+
7292
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7293
 
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
7294
 
===================================================================
7295
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../tags/gcc_4_8_3_release)
7296
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../branches/gcc-4_8-branch)
7297
 
@@ -0,0 +1,22 @@
7298
 
+/* { dg-do compile } */
7299
 
+
7300
 
+int a[16][2];
7301
 
+struct A
7302
 
+{
7303
 
+  int b[16][2];
7304
 
+  int c[16][1];
7305
 
+};
7306
 
+
7307
 
+void
7308
 
+foo (struct A *x)
7309
 
+{
7310
 
+  int i;
7311
 
+  for (i = 0; i < 16; ++i)
7312
 
+    {
7313
 
+      x->b[i][0] = a[i][0];
7314
 
+      x->c[i][0] = 0 != a[i][0];
7315
 
+      x->b[i][1] = a[i][1];
7316
 
+    }
7317
 
+}
7318
 
+
7319
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7320
 
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
7321
 
===================================================================
7322
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
7323
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
7324
 
@@ -0,0 +1,33 @@
7325
 
+/* PR tree-optimization/63189 */
7326
 
+/* { dg-do run } */
7327
 
+
7328
 
+#include "tree-vect.h"
7329
 
+
7330
 
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
7331
 
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
7332
 
+
7333
 
+__attribute__((noinline, noclone)) static int
7334
 
+bar (void)
7335
 
+{
7336
 
+  int sum = 0, i;
7337
 
+  for (i = 0; i < 8; ++i)
7338
 
+    sum += a[i] * b[i];
7339
 
+  return sum;
7340
 
+}
7341
 
+
7342
 
+__attribute__((noinline, noclone)) void
7343
 
+foo (void)
7344
 
+{
7345
 
+  if (bar () != 0)
7346
 
+    abort ();
7347
 
+}
7348
 
+
7349
 
+int
7350
 
+main ()
7351
 
+{
7352
 
+  check_vect ();
7353
 
+  foo ();
7354
 
+  return 0;
7355
 
+}
7356
 
+
7357
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7358
 
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
7359
 
===================================================================
7360
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../tags/gcc_4_8_3_release)
7361
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../branches/gcc-4_8-branch)
7362
 
@@ -0,0 +1,22 @@
7363
 
+/* { dg-do run } */
7364
 
+
7365
 
+#include "tree-vect.h"
7366
 
+
7367
 
+extern void abort (void);
7368
 
+
7369
 
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
7370
 
+
7371
 
+int
7372
 
+main ()
7373
 
+{
7374
 
+  int d;
7375
 
+  check_vect ();
7376
 
+  for (; a < 8; a++)
7377
 
+    {
7378
 
+      d = b[a] >> 1;
7379
 
+      c[a] = d != 0;
7380
 
+    }
7381
 
+  if (c[0] != 1)
7382
 
+    abort ();
7383
 
+  return 0;
7384
 
+}
7385
 
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
7386
 
===================================================================
7387
 
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
7388
 
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
7389
 
@@ -0,0 +1,32 @@
7390
 
+/* PR tree-optimization/63341 */
7391
 
+/* { dg-do run } */
7392
 
+
7393
 
+#include "tree-vect.h"
7394
 
+
7395
 
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
7396
 
+struct S { char e __attribute__((aligned (64))); U s[32]; };
7397
 
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
7398
 
+                 {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
7399
 
+                 {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
7400
 
+                 {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
7401
 
+unsigned short d[32] = { 1 };
7402
 
+
7403
 
+__attribute__((noinline, noclone)) void
7404
 
+foo ()
7405
 
+{
7406
 
+  int i;
7407
 
+  for (i = 0; i < 32; i++)
7408
 
+    d[i] = t.s[i].s;
7409
 
+  if (__builtin_memcmp (d, t.s, sizeof d))
7410
 
+    abort ();
7411
 
+}
7412
 
+
7413
 
+int
7414
 
+main ()
7415
 
+{
7416
 
+  check_vect ();
7417
 
+  foo ();
7418
 
+  return 0;
7419
 
+}
7420
 
+
7421
 
+/* { dg-final { cleanup-tree-dump "vect" } } */
7422
 
Index: gcc/testsuite/ChangeLog
7423
 
===================================================================
7424
 
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_8_3_release)
7425
 
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_8-branch)
7426
 
@@ -1,3 +1,551 @@
7427
 
+2014-12-13  Jakub Jelinek  <jakub@redhat.com>
7428
 
+
7429
 
+       Backported from mainline
7430
 
+       2014-12-12  Jakub Jelinek  <jakub@redhat.com>
7431
 
+
7432
 
+       PR tree-optimization/64269
7433
 
+       * gcc.c-torture/compile/pr64269.c: New test.
7434
 
+
7435
 
+2014-12-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7436
 
+
7437
 
+       Backport from mainline
7438
 
+       2014-09-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7439
 
+
7440
 
+       * gcc.target/powerpc/builtins-1.c: Add tests for vec_ctf,
7441
 
+       vec_cts, and vec_ctu.
7442
 
+       * gcc.target/powerpc/builtins-2.c: Likewise.
7443
 
+
7444
 
+       Backport from mainline
7445
 
+       2014-08-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7446
 
+
7447
 
+       * gcc.target/powerpc/builtins-1.c: Add tests for vec_xl, vec_xst,
7448
 
+       vec_round, vec_splat, vec_div, and vec_mul.
7449
 
+       * gcc.target/powerpc/builtins-2.c: New test.
7450
 
+
7451
 
+       Backport from mainline
7452
 
+       2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7453
 
+
7454
 
+       * testsuite/gcc.target/powerpc/builtins-1.c: New test.
7455
 
+
7456
 
+2014-12-09  Uros Bizjak  <ubizjak@gmail.com>
7457
 
+
7458
 
+       PR bootstrap/64213
7459
 
+       Revert:
7460
 
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
7461
 
+
7462
 
+       PR rtl-optimization/64037
7463
 
+       * g++.dg/pr64037.C: New test.
7464
 
+
7465
 
+2014-12-05  H.J. Lu  <hongjiu.lu@intel.com>
7466
 
+
7467
 
+       Backport from mainline
7468
 
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
7469
 
+
7470
 
+       PR rtl-optimization/64037
7471
 
+       * g++.dg/pr64037.C: New test.
7472
 
+
7473
 
+2014-12-04  Jakub Jelinek  <jakub@redhat.com>
7474
 
+
7475
 
+       PR c++/56493
7476
 
+       * c-c++-common/pr56493.c: New test.
7477
 
+
7478
 
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
7479
 
+
7480
 
+       Backported from mainline
7481
 
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
7482
 
+
7483
 
+       PR middle-end/64067
7484
 
+       * gcc.c-torture/compile/pr64067.c: New test.
7485
 
+
7486
 
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
7487
 
+
7488
 
+       PR rtl-optimization/63659
7489
 
+       * gcc.c-torture/execute/pr63659.c: New test.
7490
 
+
7491
 
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
7492
 
+
7493
 
+       PR libgomp/61200
7494
 
+       * c-c++-common/gomp/pr61200.c: New test.
7495
 
+
7496
 
+2014-11-26  Richard Biener  <rguenther@suse.de>
7497
 
+
7498
 
+       Backport from mainline
7499
 
+       2014-08-15  Richard Biener  <rguenther@suse.de>
7500
 
+
7501
 
+       PR tree-optimization/62031
7502
 
+       * gcc.dg/torture/pr62031.c: New testcase.
7503
 
+
7504
 
+       2014-10-10  Richard Biener  <rguenther@suse.de>
7505
 
+
7506
 
+       PR tree-optimization/63379
7507
 
+       * gcc.dg/vect/pr63379.c: New testcase.
7508
 
+
7509
 
+       2014-11-07  Richard Biener  <rguenther@suse.de>
7510
 
+
7511
 
+       PR tree-optimization/63605
7512
 
+       * gcc.dg/vect/pr63605.c: New testcase.
7513
 
+
7514
 
+       2014-10-28  Richard Biener  <rguenther@suse.de>
7515
 
+
7516
 
+       PR middle-end/63665
7517
 
+       * gcc.dg/pr63665.c: New testcase.
7518
 
+
7519
 
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
7520
 
+
7521
 
+       PR target/63947
7522
 
+       * gcc.target/i386/pr63947.c: New test.
7523
 
+
7524
 
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
7525
 
+
7526
 
+       Backport from mainline
7527
 
+       PR tree-optimization/62167
7528
 
+       * gcc.dg/pr51879-12.c: Add xfails.
7529
 
+       * gcc.dg/pr62167-run.c: New test.
7530
 
+       * gcc.dg/pr62167.c: New test.
7531
 
+
7532
 
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
7533
 
+
7534
 
+       Backport from mainline and gcc-4_9 branch.
7535
 
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
7536
 
+
7537
 
+       PR tree-optimization/63841
7538
 
+       * g++.dg/tree-ssa/pr63841.C: New test.
7539
 
+
7540
 
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
7541
 
+
7542
 
+       PR ipa/63838
7543
 
+       * g++.dg/ipa/pr63838.C: New test.
7544
 
+
7545
 
+2014-11-03  Marek Polacek  <polacek@redhat.com>
7546
 
+
7547
 
+       PR c/52769
7548
 
+       * gcc.dg/pr52769.c: New test.
7549
 
+
7550
 
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7551
 
+
7552
 
+       * gcc.target/aarch64/madd_after_asm_1.c: New test.
7553
 
+
7554
 
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
7555
 
+
7556
 
+       * gnat.dg/opt41.adb: New test.
7557
 
+       * gnat.dg/opt41_pkg.ad[sb]: New helper.
7558
 
+
7559
 
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7560
 
+
7561
 
+       Backport from mainline r215880
7562
 
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7563
 
+
7564
 
+       * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
7565
 
+       failing with the new warning message.
7566
 
+       * gcc.dg/vmx/3c-01a.c: Likewise.
7567
 
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
7568
 
+       * gcc.dg/vmx/ops.c: Likewise.
7569
 
+       * gcc.target/powerpc/altivec-20.c: Likewise.
7570
 
+       * gcc.target/powerpc/altivec-6.c: Likewise.
7571
 
+       * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
7572
 
+       * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
7573
 
+       * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
7574
 
+
7575
 
+       Backport from mainline r215882
7576
 
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7577
 
+
7578
 
+       * gcc.target/powerpc/lvsl-lvsr.c: New test.
7579
 
+
7580
 
+       Backport from mainline r216017
7581
 
+       2014-10-08  Pat Haugen  <pthaugen@us.ibm.com>
7582
 
+
7583
 
+       * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
7584
 
+       * gcc.dg/vmx/ops.c: Likewise.
7585
 
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
7586
 
+
7587
 
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
7588
 
+
7589
 
+       PR fortran/59488
7590
 
+       * gfortran.dg/gomp/pr59488-1.f90: New test.
7591
 
+       * gfortran.dg/gomp/pr59488-2.f90: New test.
7592
 
+
7593
 
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
7594
 
+
7595
 
+       PR debug/63342
7596
 
+       * gcc.dg/pr63342.c: New test.
7597
 
+
7598
 
+       PR target/63428
7599
 
+       * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
7600
 
+       to test 24 in TESTS.
7601
 
+
7602
 
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
7603
 
+
7604
 
+       Backport from mainline
7605
 
+       2013-11-07  Joseph Myers  <joseph@codesourcery.com>
7606
 
+
7607
 
+       * lib/target-supports.exp
7608
 
+       (check_effective_target_fenv_exceptions): New function.
7609
 
+
7610
 
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
7611
 
+
7612
 
+       PR inline-asm/63282
7613
 
+       * gcc.c-torture/compile/pr63282.c: New test.
7614
 
+
7615
 
+2014-09-26  Jakub Jelinek  <jakub@redhat.com>
7616
 
+
7617
 
+       * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
7618
 
+       to default options.
7619
 
+
7620
 
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7621
 
+
7622
 
+       Backport from mainline r215559
7623
 
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7624
 
+
7625
 
+       PR target/63335
7626
 
+       * gcc.target/powerpc/pr63335.c: New test.
7627
 
+
7628
 
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
7629
 
+
7630
 
+       PR tree-optimization/63341
7631
 
+       * gcc.dg/vect/pr63341-1.c: New test.
7632
 
+       * gcc.dg/vect/pr63341-2.c: New test.
7633
 
+
7634
 
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
7635
 
+
7636
 
+       * gcc.dg/torture/float128-exact-underflow.c: New test.
7637
 
+
7638
 
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
7639
 
+
7640
 
+       PR debug/63284
7641
 
+       * gcc.dg/pr63284.c: New test.
7642
 
+
7643
 
+2014-09-09  Richard Biener  <rguenther@suse.de>
7644
 
+
7645
 
+       Backport from mainline
7646
 
+       2014-06-11  Richard Biener  <rguenther@suse.de>
7647
 
+
7648
 
+       PR tree-optimization/61452
7649
 
+       * gcc.dg/torture/pr61452.c: New testcase.
7650
 
+
7651
 
+2014-09-09  Richard Biener  <rguenther@suse.de>
7652
 
+
7653
 
+       Backport from mainline
7654
 
+       2014-05-05  Richard Biener  <rguenther@suse.de>
7655
 
+
7656
 
+       PR middle-end/61010
7657
 
+       * gcc.dg/torture/pr61010.c: New testcase.
7658
 
+
7659
 
+       2014-05-28  Richard Biener  <rguenther@suse.de>
7660
 
+
7661
 
+       PR middle-end/61045
7662
 
+       * gcc.dg/pr61045.c: New testcase.
7663
 
+
7664
 
+       2014-08-11  Richard Biener  <rguenther@suse.de>
7665
 
+
7666
 
+       PR tree-optimization/62075
7667
 
+       * gcc.dg/vect/pr62075.c: New testcase.
7668
 
+
7669
 
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
7670
 
+
7671
 
+       PR tree-optimization/60196
7672
 
+       PR tree-optimization/63189
7673
 
+       * gcc.dg/vect/pr63189.c: New test.
7674
 
+       * gcc.dg/vect/pr60196-1.c: New test.
7675
 
+       * gcc.dg/vect/pr60196-2.c: New test.
7676
 
+
7677
 
+       Backported from mainline
7678
 
+       2013-09-17  Cong Hou  <congh@google.com>
7679
 
+
7680
 
+       * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product 
7681
 
+       on two arrays with short and int types. This should not be recognized
7682
 
+       as a dot product pattern.
7683
 
+
7684
 
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
7685
 
+
7686
 
+       Backported from mainline
7687
 
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
7688
 
+
7689
 
+       PR debug/61923
7690
 
+       * gcc.target/i386/pr61923.c: New test.
7691
 
+
7692
 
+2014-09-06  John David Anglin  <danglin@gcc.gnu.org>
7693
 
+
7694
 
+       PR testsuite/56194
7695
 
+       * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
7696
 
+
7697
 
+2014-09-03  Marek Polacek  <polacek@redhat.com>
7698
 
+
7699
 
+       Backport from mainline
7700
 
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
7701
 
+
7702
 
+       PR fortran/62270
7703
 
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
7704
 
+
7705
 
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
7706
 
+
7707
 
+       PR ipa/62015
7708
 
+       * g++.dg/ipa/pr62015.C: New test.
7709
 
+
7710
 
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
7711
 
+
7712
 
+       PR ipa/61986
7713
 
+       * gcc.dg/ipa/pr61986.c: New test.
7714
 
+
7715
 
+2014-08-26  Dominik Vogt  <vogt@linux.vnet.ibm.com>
7716
 
+
7717
 
+       * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
7718
 
+       failure on s390*-*-linux-gnu.
7719
 
+
7720
 
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
7721
 
+
7722
 
+       Backport from mainline
7723
 
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
7724
 
+
7725
 
+       PR target/61996
7726
 
+       * gcc.target/sh/pr61996.c: New.
7727
 
+
7728
 
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
7729
 
+
7730
 
+       Backport from trunk
7731
 
+       PR fortran/62214
7732
 
+       * gfortran.dg/array_assignment_5.f90:  New test.
7733
 
+
7734
 
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
7735
 
+
7736
 
+       Backport from mainline:
7737
 
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
7738
 
+
7739
 
+       PR rtl-optimization/62004
7740
 
+       PR rtl-optimization/62030
7741
 
+       * gcc.dg/pr62004.c: New test.
7742
 
+       * gcc.dg/pr62030.c: Same.
7743
 
+       * gcc.target/mips/pr62030-octeon.c: Same.
7744
 
+
7745
 
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
7746
 
+
7747
 
+       PR tree-optimization/62073
7748
 
+       * gcc.dg/vect/pr62073.c: New test.
7749
 
+
7750
 
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7751
 
+
7752
 
+       Backport from mainline
7753
 
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7754
 
+
7755
 
+       PR middle-end/62103
7756
 
+       * gcc.c-torture/execute/bitfld-6.c: New test.
7757
 
+
7758
 
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
7759
 
+
7760
 
+       Backport from trunk
7761
 
+       PR fortran/61999
7762
 
+       * gfortran.dg/dot_product_3.f90:  New test case.
7763
 
+
7764
 
+2014-08-07  John David Anglin  <danglin@gcc.gnu.org>
7765
 
+
7766
 
+       PR tree-optimization/60707
7767
 
+       * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
7768
 
+
7769
 
+2014-08-06  Jakub Jelinek  <jakub@redhat.com>
7770
 
+
7771
 
+       PR rtl-optimization/61801
7772
 
+       * gcc.target/i386/pr61801.c: Rewritten.
7773
 
+
7774
 
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7775
 
+
7776
 
+       Backport from mainline
7777
 
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7778
 
+
7779
 
+       PR tree-optimization/61375
7780
 
+       * gcc.c-torture/execute/pr61375-1.c: New test.
7781
 
+
7782
 
+2014-08-01  Richard Biener  <rguenther@suse.de>
7783
 
+
7784
 
+       PR tree-optimization/61964
7785
 
+       * gcc.dg/torture/pr61964.c: New testcase.
7786
 
+       * gcc.dg/pr51879-18.c: XFAIL.
7787
 
+
7788
 
+2014-07-28  Richard Biener  <rguenther@suse.de>
7789
 
+
7790
 
+       PR rtl-optimization/61801
7791
 
+       * gcc.target/i386/pr61801.c: Fix testcase.
7792
 
+
7793
 
+2014-07-28  Richard Biener  <rguenther@suse.de>
7794
 
+
7795
 
+       PR rtl-optimization/61801
7796
 
+       * gcc.target/i386/pr61801.c: New testcase.
7797
 
+
7798
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7799
 
+
7800
 
+       Backport from mainline:
7801
 
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7802
 
+
7803
 
+       * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
7804
 
+
7805
 
+       * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
7806
 
+       * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
7807
 
+       * gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
7808
 
+       * gcc.c-torture/execute/pr23135.x: Likewise.
7809
 
+
7810
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7811
 
+
7812
 
+       Backport from mainline:
7813
 
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7814
 
+
7815
 
+       * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
7816
 
+
7817
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7818
 
+
7819
 
+       Backport from mainline:
7820
 
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7821
 
+
7822
 
+       * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
7823
 
+
7824
 
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7825
 
+
7826
 
+       Backport from mainline:
7827
 
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
7828
 
+
7829
 
+       * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
7830
 
+
7831
 
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
7832
 
+
7833
 
+       * gcc.dg/stack-usage-2.c: Adjust.
7834
 
+
7835
 
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
7836
 
+
7837
 
+       Backport from trunk.
7838
 
+       PR fortran/61780
7839
 
+       * gfortran.dg/dependency_44.f90 : New test
7840
 
+
7841
 
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
7842
 
+
7843
 
+       * gnat.dg/opt39.adb: New test.
7844
 
+
7845
 
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
7846
 
+
7847
 
+       PR fortran/61459
7848
 
+       PR fortran/58883
7849
 
+       * gfortran.dg/allocatable_function_8.f90 : New test
7850
 
+
7851
 
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
7852
 
+
7853
 
+       PR tree-optimization/61684
7854
 
+       * gcc.c-torture/compile/pr61684.c: New test.
7855
 
+
7856
 
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
7857
 
+           Fritz Reese  <Reese-Fritz@zai.com>
7858
 
+
7859
 
+       * gfortran.dg/oldstyle_5.f: New test.
7860
 
+
7861
 
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7862
 
+
7863
 
+       Backport from mainline
7864
 
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7865
 
+
7866
 
+       PR tree-optimization/61306
7867
 
+       * gcc.c-torture/execute/pr61306-1.c: New test.
7868
 
+       * gcc.c-torture/execute/pr61306-2.c: Likewise.
7869
 
+       * gcc.c-torture/execute/pr61306-3.c: Likewise.
7870
 
+
7871
 
+2014-06-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7872
 
+
7873
 
+       * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
7874
 
+
7875
 
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
7876
 
+
7877
 
+       Backport from mainline
7878
 
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
7879
 
+
7880
 
+       PR target/61586
7881
 
+       * gcc.target/alpha/pr61586.c: New test.
7882
 
+
7883
 
+2014-06-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7884
 
+
7885
 
+       * gfortran.dg/default_format_denormal_2.f90:  Remove xfail for
7886
 
+       powerpc*-*-linux*.
7887
 
+
7888
 
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
7889
 
+
7890
 
+       Backport from mainline
7891
 
+       2014-06-13  Ilya Enkovich  <ilya.enkovich@intel.com>
7892
 
+
7893
 
+       PR rtl-optimization/61094
7894
 
+       PR rtl-optimization/61446
7895
 
+       * gcc.target/i386/pr61446.c : New.
7896
 
+
7897
 
+       Backport from mainline
7898
 
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
7899
 
+
7900
 
+       PR target/61423
7901
 
+       * gcc.target/i386/pr61423.c: New test.
7902
 
+
7903
 
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
7904
 
+
7905
 
+       Backport from mainline
7906
 
+
7907
 
+       PR target/61483
7908
 
+       * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
7909
 
+       * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
7910
 
+       * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
7911
 
+       * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
7912
 
+
7913
 
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7914
 
+
7915
 
+       Backport from trunk.
7916
 
+       PR fortran/45187
7917
 
+       * gfortran.dg/cray_pointers_10.f90: New file.
7918
 
+
7919
 
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
7920
 
+
7921
 
+       Backport from mainline
7922
 
+
7923
 
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
7924
 
+       PR target/61415
7925
 
+       * lib/target-supports.exp (check_effective_target_longdouble128): New.
7926
 
+       * gcc.target/powerpc/pack02.c: Use it.
7927
 
+       * gcc.target/powerpc/tfmode_off.c: Likewise.
7928
 
+
7929
 
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
7930
 
+
7931
 
+       Backport from 2014-06-12 trunk r211491
7932
 
+
7933
 
+       PR target/61443
7934
 
+       * gcc.target/avr/torture/pr61443.c: New test.
7935
 
+
7936
 
+2014-06-04  Richard Biener  <rguenther@suse.de>
7937
 
+
7938
 
+       PR tree-optimization/61383
7939
 
+       * gcc.dg/torture/pr61383-1.c: New testcase.
7940
 
+
7941
 
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
7942
 
+
7943
 
+       Backport from mainline
7944
 
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
7945
 
+
7946
 
+       PR rtl-optimization/60866
7947
 
+       * gcc.dg/pr60866.c: New test.
7948
 
+
7949
 
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
7950
 
+
7951
 
+       Backport from mainline
7952
 
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
7953
 
+
7954
 
+       PR rtl-optimization/60901
7955
 
+       * gcc.target/i386/pr60901.c: New test.
7956
 
+
7957
 
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
7958
 
+
7959
 
+       Backport from mainline
7960
 
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
7961
 
+
7962
 
+       * gnat.dg/overflow_fixed.adb: New test.
7963
 
+
7964
 
+2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
7965
 
+
7966
 
+       * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
7967
 
+
7968
 
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
7969
 
+
7970
 
+       Backport from mainline
7971
 
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
7972
 
+
7973
 
+       * gcc.target/powerpc/htm-ttest.c: New test.
7974
 
+
7975
 
 2014-05-22  Release Manager
7976
 
 
7977
 
        * GCC 4.8.3 released.
7978
 
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
7979
 
===================================================================
7980
 
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../tags/gcc_4_8_3_release)
7981
 
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../branches/gcc-4_8-branch)
7982
 
@@ -0,0 +1,28 @@
7983
 
+// I think this dynamic_cast has undefined behavior when destroying E::o
7984
 
+// because we're the F period of destruction has started and ap doesn't
7985
 
+// point to the object currently being destroyed--but the reasonable
7986
 
+// options are success or failure, not SEGV.
7987
 
+
7988
 
+// { dg-do run }
7989
 
+
7990
 
+extern "C" void abort();
7991
 
+
7992
 
+struct A { virtual ~A(); };
7993
 
+struct B { virtual ~B() { } };
7994
 
+struct C : B, A { };
7995
 
+struct E : virtual B { A o; };
7996
 
+struct F : virtual C, virtual E { };
7997
 
+
7998
 
+A* ap;
7999
 
+C* cp;
8000
 
+
8001
 
+A::~A() {
8002
 
+  C* cp2 = dynamic_cast<C*>(ap);
8003
 
+  if (cp2 != cp && cp2 != 0)
8004
 
+    abort();
8005
 
+}
8006
 
+
8007
 
+int main() {
8008
 
+  F f;
8009
 
+  ap = cp = &f;
8010
 
+}
8011
 
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
8012
 
===================================================================
8013
 
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../tags/gcc_4_8_3_release)
8014
 
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../branches/gcc-4_8-branch)
8015
 
@@ -1,6 +1,6 @@
8016
 
 /* { dg-do compile { target powerpc*-*-* } } */
8017
 
 /* { dg-require-effective-target powerpc_altivec_ok } */
8018
 
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
8019
 
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
8020
 
 
8021
 
 /* This test checks if AltiVec builtins accept const-qualified
8022
 
    arguments.  */
8023
 
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
8024
 
===================================================================
8025
 
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
8026
 
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
8027
 
@@ -0,0 +1,10 @@
8028
 
+// PR c++/63455
8029
 
+// { dg-options "-std=gnu++11" }
8030
 
+
8031
 
+int main()
8032
 
+{
8033
 
+    int x = 0;
8034
 
+
8035
 
+    // without '+0', gcc 4.6 gives a different error (no ICE though)
8036
 
+    decltype(({ int y = x; y; })+0) v1 = 0;
8037
 
+}
8038
 
Index: gcc/testsuite/g++.dg/expr/cond12.C
8039
 
===================================================================
8040
 
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../tags/gcc_4_8_3_release)
8041
 
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../branches/gcc-4_8-branch)
8042
 
@@ -0,0 +1,12 @@
8043
 
+// PR c++/58714
8044
 
+// { dg-do run }
8045
 
+
8046
 
+struct X {
8047
 
+    X& operator=(const X&){}
8048
 
+    X& operator=(X&){__builtin_abort();}
8049
 
+};
8050
 
+
8051
 
+int main(int argv,char**) {
8052
 
+  X a, b;
8053
 
+  ((argv > 2) ? a : b) = X();
8054
 
+}
8055
 
Index: gcc/testsuite/g++.dg/init/const9.C
8056
 
===================================================================
8057
 
--- a/src/gcc/testsuite/g++.dg/init/const9.C    (.../tags/gcc_4_8_3_release)
8058
 
+++ b/src/gcc/testsuite/g++.dg/init/const9.C    (.../branches/gcc-4_8-branch)
8059
 
@@ -1,5 +1,5 @@
8060
 
 // PR c++/55893
8061
 
-// { dg-final { scan-assembler-not "rodata" } }
8062
 
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
8063
 
 
8064
 
 struct foo
8065
 
 {
8066
 
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
8067
 
===================================================================
8068
 
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../tags/gcc_4_8_3_release)
8069
 
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../branches/gcc-4_8-branch)
8070
 
@@ -0,0 +1,35 @@
8071
 
+/* { dg-do run } */
8072
 
+/* { dg-options "-O2" } */
8073
 
+
8074
 
+#include <string>
8075
 
+
8076
 
+std::string __attribute__ ((noinline)) comp_test_write() {
8077
 
+  std::string data;
8078
 
+
8079
 
+  for (int i = 0; i < 2; ++i) {
8080
 
+    char b = 1 >> (i * 8);
8081
 
+    data.append(&b, 1);
8082
 
+  }
8083
 
+
8084
 
+  return data;
8085
 
+}
8086
 
+
8087
 
+std::string __attribute__ ((noinline)) comp_test_write_good() {
8088
 
+  std::string data;
8089
 
+
8090
 
+  char b;
8091
 
+  for (int i = 0; i < 2; ++i) {
8092
 
+    b = 1 >> (i * 8);
8093
 
+    data.append(&b, 1);
8094
 
+  }
8095
 
+
8096
 
+  return data;
8097
 
+}
8098
 
+
8099
 
+int main() {
8100
 
+  std::string good = comp_test_write_good();
8101
 
+  std::string bad = comp_test_write();
8102
 
+
8103
 
+  if (good != bad)
8104
 
+    __builtin_abort ();
8105
 
+}
8106
 
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
8107
 
===================================================================
8108
 
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../tags/gcc_4_8_3_release)
8109
 
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../branches/gcc-4_8-branch)
8110
 
@@ -0,0 +1,23 @@
8111
 
+// PR c++/58624
8112
 
+
8113
 
+// { dg-do run { target c++11 } }
8114
 
+// { dg-add-options tls }
8115
 
+// { dg-require-effective-target tls_runtime }
8116
 
+
8117
 
+int i;
8118
 
+
8119
 
+template <typename> struct A
8120
 
+{
8121
 
+  static thread_local int s;
8122
 
+
8123
 
+  A () { i = s; }
8124
 
+};
8125
 
+
8126
 
+int f() { return 42; }
8127
 
+template <typename T> thread_local int A<T>::s = f();
8128
 
+
8129
 
+int main () {
8130
 
+  A<void> a;
8131
 
+  if (i != 42)
8132
 
+    __builtin_abort();
8133
 
+}
8134
 
Index: gcc/testsuite/g++.dg/parse/typename7.C
8135
 
===================================================================
8136
 
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../tags/gcc_4_8_3_release)
8137
 
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../branches/gcc-4_8-branch)
8138
 
@@ -7,10 +7,9 @@
8139
 
 
8140
 
 struct A
8141
 
 {
8142
 
-  template<typename>   void foo(int); // { dg-message "note" }
8143
 
-  template<typename T> void bar(T t) { // { dg-message "note" }
8144
 
+  template<typename>   void foo(int);
8145
 
+  template<typename T> void bar(T t) {
8146
 
     this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8147
 
-  // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
8148
 
   template<typename T> void bad(T t) {
8149
 
     foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8150
 
 };
8151
 
@@ -20,7 +19,6 @@
8152
 
 {
8153
 
   void bar(T t) {
8154
 
     A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8155
 
-  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
8156
 
   void bad(T t) {
8157
 
     B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
8158
 
 };
8159
 
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
8160
 
===================================================================
8161
 
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../tags/gcc_4_8_3_release)
8162
 
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../branches/gcc-4_8-branch)
8163
 
@@ -1,2 +1,2 @@
8164
 
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
8165
 
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
8166
 
 // { dg-prune-output "array bound" }
8167
 
Index: gcc/testsuite/g++.dg/parse/ambig7.C
8168
 
===================================================================
8169
 
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../tags/gcc_4_8_3_release)
8170
 
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../branches/gcc-4_8-branch)
8171
 
@@ -0,0 +1,16 @@
8172
 
+// PR c++/60361
8173
 
+
8174
 
+struct Helper
8175
 
+{
8176
 
+  Helper(int a, void (*pfunc)());
8177
 
+};
8178
 
+
8179
 
+template <int I> void function();
8180
 
+
8181
 
+const int A = 1;
8182
 
+const int B = 2;
8183
 
+
8184
 
+Helper testOk(A, function<A>);
8185
 
+Helper testOk2(int(A), function<B>);
8186
 
+Helper testOk3((int(A)), function<A>);
8187
 
+Helper testFail(int(A), function<A>);
8188
 
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
8189
 
===================================================================
8190
 
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../tags/gcc_4_8_3_release)
8191
 
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../branches/gcc-4_8-branch)
8192
 
@@ -89,6 +89,9 @@
8193
 
 # This must be done after the compat-use-*-compiler definitions.
8194
 
 load_lib compat.exp
8195
 
 
8196
 
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
8197
 
+load_lib g++-dg.exp
8198
 
+
8199
 
 g++_init
8200
 
 
8201
 
 # Save variables for the C++ compiler under test, which each test will
8202
 
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
8203
 
===================================================================
8204
 
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../tags/gcc_4_8_3_release)
8205
 
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../branches/gcc-4_8-branch)
8206
 
@@ -1,5 +1,5 @@
8207
 
 /* Structure layout test generator.
8208
 
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
8209
 
+   Copyright (C) 2004-2014
8210
 
    Free Software Foundation, Inc.
8211
 
    Contributed by Jakub Jelinek <jakub@redhat.com>.
8212
 
 
8213
 
@@ -44,7 +44,7 @@
8214
 
 #endif
8215
 
 
8216
 
 const char *dg_options[] = {
8217
 
-"/* { dg-options \"%s-I%s\" } */\n",
8218
 
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
8219
 
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
8220
 
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
8221
 
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
8222
 
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
8223
 
===================================================================
8224
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
8225
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
8226
 
@@ -0,0 +1,28 @@
8227
 
+// PR c++/61959
8228
 
+// { dg-do compile { target c++11 } }
8229
 
+
8230
 
+template <class Coord> struct BasePoint
8231
 
+{
8232
 
+  Coord x, y;
8233
 
+  constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
8234
 
+};
8235
 
+template <class T> struct BaseCoord
8236
 
+{
8237
 
+  int value;
8238
 
+  constexpr BaseCoord (T) : value (1) {}
8239
 
+};
8240
 
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
8241
 
+{
8242
 
+  typedef BaseCoord Super;
8243
 
+  constexpr IntCoordTyped (int) : Super (0) {}
8244
 
+};
8245
 
+template <class units>
8246
 
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
8247
 
+{
8248
 
+  typedef BasePoint<IntCoordTyped<units> > Super;
8249
 
+  constexpr IntPointTyped (int, int) : Super (0, 0) {}
8250
 
+};
8251
 
+struct A
8252
 
+{
8253
 
+};
8254
 
+IntPointTyped<A> a (0, 0);
8255
 
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
8256
 
===================================================================
8257
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../tags/gcc_4_8_3_release)
8258
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../branches/gcc-4_8-branch)
8259
 
@@ -0,0 +1,9 @@
8260
 
+// PR c++/56710
8261
 
+// { dg-options "-std=c++11 -Wall" }
8262
 
+
8263
 
+int main()
8264
 
+{
8265
 
+    int t = 0;
8266
 
+    return [&]() -> int {int __t; __t = t; return __t; }();
8267
 
+    return [&t]() -> int {int __t; __t = t; return __t; }();
8268
 
+}
8269
 
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
8270
 
===================================================================
8271
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../tags/gcc_4_8_3_release)
8272
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../branches/gcc-4_8-branch)
8273
 
@@ -0,0 +1,24 @@
8274
 
+// PR c++/61134
8275
 
+// { dg-do compile { target c++11 } }
8276
 
+
8277
 
+struct Base { };
8278
 
+
8279
 
+template <typename>
8280
 
+struct Fixed {
8281
 
+  typedef const char* name;
8282
 
+};
8283
 
+
8284
 
+template <typename VT, typename... Fields>
8285
 
+void New(const char* name,
8286
 
+         typename Fixed<Fields>::name... field_names);
8287
 
+
8288
 
+template <typename VT, typename... Fields>
8289
 
+void CreateMetric(const char* name,
8290
 
+                  typename Fixed<Fields>::name... field_names,
8291
 
+                  const Base&) { }
8292
 
+
8293
 
+
8294
 
+void Fn()
8295
 
+{
8296
 
+  CreateMetric<int, const char*>("abcd", "def", Base());
8297
 
+}
8298
 
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
8299
 
===================================================================
8300
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../tags/gcc_4_8_3_release)
8301
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../branches/gcc-4_8-branch)
8302
 
@@ -0,0 +1,7 @@
8303
 
+// PR c++/63415
8304
 
+// { dg-do compile { target c++11 } }
8305
 
+
8306
 
+template <typename T>
8307
 
+struct A {
8308
 
+  static constexpr int value = int(T{});
8309
 
+};
8310
 
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
8311
 
===================================================================
8312
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../tags/gcc_4_8_3_release)
8313
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../branches/gcc-4_8-branch)
8314
 
@@ -0,0 +1,49 @@
8315
 
+// PR c++/61539
8316
 
+// { dg-do compile { target c++11 } }
8317
 
+
8318
 
+template <typename _CharT> class A;
8319
 
+template <typename> class B;
8320
 
+template <class charT> class C;
8321
 
+template <> class C<char>
8322
 
+{
8323
 
+  virtual void xparse (int &, const B<A<char> > &) const;
8324
 
+};
8325
 
+template <class T, class charT = char> class G : C<charT>
8326
 
+{
8327
 
+public:
8328
 
+  G (void *) {}
8329
 
+  void default_value (const T &);
8330
 
+  void xparse (int &, const B<A<charT> > &) const;
8331
 
+};
8332
 
+template <class T, class charT>
8333
 
+void validate (int &, const B<A<charT> > &, T *, int);
8334
 
+template <class T, class charT>
8335
 
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
8336
 
+{
8337
 
+  validate (p1, p2, (T *)0, 0);
8338
 
+}
8339
 
+template <class T> G<T> *value (T *) { return new G<T>(0); }
8340
 
+namespace Eigen
8341
 
+{
8342
 
+template <typename T> struct D;
8343
 
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
8344
 
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
8345
 
+          int _MaxCols>
8346
 
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
8347
 
+{
8348
 
+  typedef _Scalar Scalar;
8349
 
+};
8350
 
+template <typename, int, int, int, int, int _MaxCols> class F
8351
 
+{
8352
 
+public:
8353
 
+  typedef typename Eigen::D<F>::Scalar Scalar;
8354
 
+  F (const Scalar &, const Scalar &, const Scalar &);
8355
 
+};
8356
 
+template <class... T>
8357
 
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
8358
 
+}
8359
 
+int main (int, char *[])
8360
 
+{
8361
 
+  Eigen::F<double, 3, 1> a (0, 0, 0);
8362
 
+  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
8363
 
+}
8364
 
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
8365
 
===================================================================
8366
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
8367
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
8368
 
@@ -0,0 +1,13 @@
8369
 
+// PR c++/58714
8370
 
+// { dg-do compile { target c++11 } }
8371
 
+
8372
 
+struct X {
8373
 
+  X& operator=(const X&) = delete;
8374
 
+  X& operator=(X&& ) = default;
8375
 
+};
8376
 
+
8377
 
+void f(bool t) {
8378
 
+  X a, b;
8379
 
+  *(t ? &a : &b) = X();
8380
 
+  (t ? a : b) = X();
8381
 
+}
8382
 
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
8383
 
===================================================================
8384
 
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../tags/gcc_4_8_3_release)
8385
 
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../branches/gcc-4_8-branch)
8386
 
@@ -0,0 +1,17 @@
8387
 
+// PR c++/59823
8388
 
+// { dg-options "-std=c++11" }
8389
 
+
8390
 
+struct X { };
8391
 
+
8392
 
+void f(X&&);                   // { dg-message "void f" }
8393
 
+
8394
 
+struct wrap
8395
 
+{
8396
 
+  operator const X&() const;
8397
 
+};
8398
 
+
8399
 
+int main()
8400
 
+{
8401
 
+  wrap w;
8402
 
+  f(w);                                // { dg-error "lvalue" }
8403
 
+}
8404
 
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
8405
 
===================================================================
8406
 
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../tags/gcc_4_8_3_release)
8407
 
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../branches/gcc-4_8-branch)
8408
 
@@ -0,0 +1,56 @@
8409
 
+// PR ipa/63838
8410
 
+// { dg-do run }
8411
 
+// { dg-options "-O2 -fdump-ipa-pure-const" }
8412
 
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
8413
 
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
8414
 
+// { dg-final { cleanup-ipa-dump "pure-const" } }
8415
 
+
8416
 
+__attribute__((noinline, noclone)) static void bar (int);
8417
 
+volatile int v;
8418
 
+void (*fn) ();
8419
 
+struct S { S () { v++; } ~S () { v++; } };
8420
 
+
8421
 
+__attribute__((noinline, noclone)) static void
8422
 
+foo (int x)
8423
 
+{
8424
 
+  v++;
8425
 
+  if (x == 5)
8426
 
+    bar (x);
8427
 
+}
8428
 
+
8429
 
+__attribute__((noinline, noclone)) static void
8430
 
+bar (int x)
8431
 
+{
8432
 
+  v++;
8433
 
+  if (x == 6)
8434
 
+    foo (x);
8435
 
+  else if (x == 5)
8436
 
+    fn ();
8437
 
+}
8438
 
+
8439
 
+__attribute__((noinline, noclone)) int
8440
 
+baz (int x)
8441
 
+{
8442
 
+  S s;
8443
 
+  foo (x);
8444
 
+}
8445
 
+
8446
 
+void
8447
 
+throw0 ()
8448
 
+{
8449
 
+  throw 0;
8450
 
+}
8451
 
+
8452
 
+int
8453
 
+main ()
8454
 
+{
8455
 
+  fn = throw0;
8456
 
+  asm volatile ("" : : : "memory");
8457
 
+  try
8458
 
+    {
8459
 
+      baz (5);
8460
 
+    }
8461
 
+  catch (int)
8462
 
+    {
8463
 
+    }
8464
 
+}
8465
 
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
8466
 
===================================================================
8467
 
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../tags/gcc_4_8_3_release)
8468
 
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../branches/gcc-4_8-branch)
8469
 
@@ -0,0 +1,55 @@
8470
 
+/* { dg-do run } */
8471
 
+/* { dg-options "-O3 -std=c++11"  } */
8472
 
+
8473
 
+
8474
 
+extern "C" int printf(const char *fmt, ...);
8475
 
+extern "C" void abort(void);
8476
 
+
8477
 
+struct Side {
8478
 
+    enum _Value { Left, Right, Invalid };
8479
 
+
8480
 
+    constexpr Side() : _value(Invalid) {}
8481
 
+    constexpr Side(_Value value) : _value(value) {}
8482
 
+    operator _Value() const { return (_Value)_value; }
8483
 
+
8484
 
+  private:
8485
 
+    char _value;
8486
 
+};
8487
 
+
8488
 
+struct A {
8489
 
+    void init();
8490
 
+    void adjust(Side side, bool final);
8491
 
+    void move(Side side);
8492
 
+};
8493
 
+
8494
 
+void A::init()
8495
 
+{
8496
 
+    adjust(Side::Invalid, false);
8497
 
+}
8498
 
+
8499
 
+static void __attribute__((noinline))
8500
 
+check (int v, int final)
8501
 
+{
8502
 
+    if (v != 0)
8503
 
+      abort();
8504
 
+}
8505
 
+
8506
 
+
8507
 
+__attribute__((noinline))
8508
 
+void A::adjust(Side side, bool final)
8509
 
+{
8510
 
+  check ((int)side, final);
8511
 
+}
8512
 
+
8513
 
+void A::move(Side side)
8514
 
+{
8515
 
+    adjust(side, false);
8516
 
+    adjust(side, true);
8517
 
+}
8518
 
+
8519
 
+int main()
8520
 
+{
8521
 
+    A t;
8522
 
+    t.move(Side::Left);
8523
 
+    return 0;
8524
 
+}
8525
 
Index: gcc/testsuite/g++.dg/template/local-fn1.C
8526
 
===================================================================
8527
 
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../tags/gcc_4_8_3_release)
8528
 
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../branches/gcc-4_8-branch)
8529
 
@@ -0,0 +1,8 @@
8530
 
+// PR c++/60605
8531
 
+
8532
 
+template <typename T = int>
8533
 
+struct Foo {
8534
 
+    void bar() {
8535
 
+        void bug();
8536
 
+    }
8537
 
+};
8538
 
Index: gcc/testsuite/g++.dg/template/conv14.C
8539
 
===================================================================
8540
 
--- a/src/gcc/testsuite/g++.dg/template/conv14.C        (.../tags/gcc_4_8_3_release)
8541
 
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C        (.../branches/gcc-4_8-branch)
8542
 
@@ -0,0 +1,30 @@
8543
 
+// PR c++/61647
8544
 
+
8545
 
+class XX;
8546
 
+
8547
 
+template<typename Container, typename Key>
8548
 
+struct Accessor;
8549
 
+
8550
 
+template<typename Container, typename Key, typename KeyStore = Key>
8551
 
+class Variant {
8552
 
+protected:
8553
 
+    KeyStore index;
8554
 
+    Container state;
8555
 
+public:
8556
 
+    Variant(Container st, const Key& i) : index(i), state(st) {}
8557
 
+
8558
 
+    template<typename T>
8559
 
+    operator T() const {
8560
 
+        return Accessor<Container, KeyStore>::template get<T>(state, index);
8561
 
+    }
8562
 
+};
8563
 
+
8564
 
+class AutoCleanVariant : public Variant<XX*, int> {
8565
 
+public:
8566
 
+    AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
8567
 
+
8568
 
+    template<typename T>
8569
 
+    operator T() const {
8570
 
+         return Variant<XX*, int>::operator T();
8571
 
+    }
8572
 
+};
8573
 
Index: gcc/testsuite/g++.dg/template/friend55.C
8574
 
===================================================================
8575
 
--- a/src/gcc/testsuite/g++.dg/template/friend55.C      (.../tags/gcc_4_8_3_release)
8576
 
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C      (.../branches/gcc-4_8-branch)
8577
 
@@ -0,0 +1,18 @@
8578
 
+// PR c++/59956
8579
 
+
8580
 
+template <int I> struct A;
8581
 
+template <int I> class B {
8582
 
+  int i;
8583
 
+  template <int A_S> friend void A<A_S>::impl();
8584
 
+};
8585
 
+
8586
 
+B<0> b1;
8587
 
+template<int I>struct A { void impl(); };
8588
 
+B<1> b2;
8589
 
+
8590
 
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
8591
 
+
8592
 
+int main()
8593
 
+{
8594
 
+  A<0>().impl();
8595
 
+}
8596
 
Index: gcc/testsuite/g++.dg/template/memclass5.C
8597
 
===================================================================
8598
 
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../tags/gcc_4_8_3_release)
8599
 
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../branches/gcc-4_8-branch)
8600
 
@@ -0,0 +1,26 @@
8601
 
+// PR c++/60241
8602
 
+
8603
 
+template <typename T>
8604
 
+struct x
8605
 
+{
8606
 
+    template <typename U>
8607
 
+    struct y
8608
 
+    {
8609
 
+        typedef T result2;
8610
 
+    };
8611
 
+
8612
 
+    typedef y<int> zy;
8613
 
+};
8614
 
+
8615
 
+template<>
8616
 
+template<class T>
8617
 
+struct x<int>::y
8618
 
+{
8619
 
+    typedef double result2;
8620
 
+};
8621
 
+
8622
 
+int main()
8623
 
+{
8624
 
+    x<int>::zy::result2 xxx;
8625
 
+    x<int>::y<int>::result2 xxx2;
8626
 
+}
8627
 
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
8628
 
===================================================================
8629
 
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../tags/gcc_4_8_3_release)
8630
 
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../branches/gcc-4_8-branch)
8631
 
@@ -0,0 +1,22 @@
8632
 
+// PR c++/61500
8633
 
+
8634
 
+struct X {
8635
 
+  int i;
8636
 
+  int j;
8637
 
+
8638
 
+  int foo(int X::* ptr);
8639
 
+
8640
 
+  template <int X::* ptr>
8641
 
+  int bar();
8642
 
+};
8643
 
+
8644
 
+int X::foo(int X::* ptr) {
8645
 
+  int* p = &(this->*ptr);  // OK.
8646
 
+  return *p;
8647
 
+}
8648
 
+
8649
 
+template <int X::* ptr>
8650
 
+int X::bar() {
8651
 
+  int* p = &(this->*ptr);  // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
8652
 
+  return *p;
8653
 
+}
8654
 
Index: gcc/testsuite/c-c++-common/pr56493.c
8655
 
===================================================================
8656
 
--- a/src/gcc/testsuite/c-c++-common/pr56493.c  (.../tags/gcc_4_8_3_release)
8657
 
+++ b/src/gcc/testsuite/c-c++-common/pr56493.c  (.../branches/gcc-4_8-branch)
8658
 
@@ -0,0 +1,16 @@
8659
 
+/* PR c++/56493 */
8660
 
+/* { dg-do compile } */
8661
 
+/* { dg-options "-O2 -fdump-tree-gimple" } */
8662
 
+
8663
 
+unsigned long long bar (void);
8664
 
+int x;
8665
 
+
8666
 
+void
8667
 
+foo (void)
8668
 
+{
8669
 
+  x += bar ();
8670
 
+}
8671
 
+
8672
 
+/* Verify we narrow the addition from unsigned long long to unsigned int type.  */
8673
 
+/* { dg-final { scan-tree-dump "  (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.*  (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */
8674
 
+/* { dg-final { cleanup-tree-dump "gimple" } } */
8675
 
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
8676
 
===================================================================
8677
 
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../tags/gcc_4_8_3_release)
8678
 
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../branches/gcc-4_8-branch)
8679
 
@@ -0,0 +1,13 @@
8680
 
+/* PR libgomp/61200 */
8681
 
+
8682
 
+int
8683
 
+main ()
8684
 
+{
8685
 
+  int var = 1;
8686
 
+  #pragma omp parallel
8687
 
+    if (var != 1)
8688
 
+      __builtin_abort ();
8689
 
+  #pragma omp task shared(var)
8690
 
+    var = 2;
8691
 
+  return 0;
8692
 
+}
8693
 
Index: gcc/cp/tree.c
8694
 
===================================================================
8695
 
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
8696
 
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
8697
 
@@ -97,6 +97,16 @@
8698
 
     case IMAGPART_EXPR:
8699
 
       return lvalue_kind (TREE_OPERAND (ref, 0));
8700
 
 
8701
 
+    case MEMBER_REF:
8702
 
+    case DOTSTAR_EXPR:
8703
 
+      if (TREE_CODE (ref) == MEMBER_REF)
8704
 
+       op1_lvalue_kind = clk_ordinary;
8705
 
+      else
8706
 
+       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8707
 
+      if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
8708
 
+       op1_lvalue_kind = clk_none;
8709
 
+      return op1_lvalue_kind;
8710
 
+
8711
 
     case COMPONENT_REF:
8712
 
       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8713
 
       /* Look at the member designator.  */
8714
 
@@ -3738,6 +3748,10 @@
8715
 
     {
8716
 
       init_expr = get_target_expr (exp);
8717
 
       exp = TARGET_EXPR_SLOT (init_expr);
8718
 
+      if (CLASS_TYPE_P (TREE_TYPE (exp)))
8719
 
+       exp = move (exp);
8720
 
+      else
8721
 
+       exp = rvalue (exp);
8722
 
     }
8723
 
   else
8724
 
     {
8725
 
Index: gcc/cp/ChangeLog
8726
 
===================================================================
8727
 
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_8_3_release)
8728
 
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_8-branch)
8729
 
@@ -1,3 +1,87 @@
8730
 
+2014-10-15  Jason Merrill  <jason@redhat.com>
8731
 
+
8732
 
+       PR c++/63455
8733
 
+       Revert:
8734
 
+       * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
8735
 
+       committed to this tentative parse.
8736
 
+
8737
 
+       PR c++/63415
8738
 
+       * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
8739
 
+       (iterative_hash_template_arg): Likewise.
8740
 
+
8741
 
+       PR c++/56710
8742
 
+       * semantics.c (finish_member_declaration): Don't push closure
8743
 
+       members.
8744
 
+
8745
 
+       PR c++/58624
8746
 
+       * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
8747
 
+       * semantics.c (finish_id_expression): Don't call TLS wrapper in a
8748
 
+       template.
8749
 
+
8750
 
+2014-08-07  Jason Merrill  <jason@redhat.com>
8751
 
+
8752
 
+       PR c++/61959
8753
 
+       * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
8754
 
+
8755
 
+       PR c++/58714
8756
 
+       * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
8757
 
+
8758
 
+2014-01-27  Jason Merrill  <jason@redhat.com>
8759
 
+
8760
 
+       PR c++/59823
8761
 
+       Core DR 1138
8762
 
+       * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
8763
 
+       list-initialization.  A conversion to rvalue ref that involves
8764
 
+       an lvalue-rvalue conversion is bad.
8765
 
+       (convert_like_real): Give helpful error message.
8766
 
+
8767
 
+2014-01-29  Jason Merrill  <jason@redhat.com>
8768
 
+
8769
 
+       PR c++/59956
8770
 
+       * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
8771
 
+       have a friend template in a class template.
8772
 
+       * pt.c (tsubst_friend_function): Look through it.
8773
 
+       (push_template_decl_real): A friend member template is
8774
 
+       primary.
8775
 
+
8776
 
+2014-02-21  Jason Merrill  <jason@redhat.com>
8777
 
+
8778
 
+       PR c++/60241
8779
 
+       * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
8780
 
+       of the partial instantiation, not the most general template.
8781
 
+       (maybe_process_partial_specialization): Reassign everything on
8782
 
+       that list.
8783
 
+
8784
 
+2014-03-05  Jason Merrill  <jason@redhat.com>
8785
 
+
8786
 
+       PR c++/60361
8787
 
+       * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
8788
 
+       if re-parsing might succeed.
8789
 
+       * semantics.c (finish_id_expression): Use of a parameter outside
8790
 
+       the function body is a parse error.
8791
 
+
8792
 
+2014-06-30  Jason Merrill  <jason@redhat.com>
8793
 
+
8794
 
+       PR c++/61647
8795
 
+       * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
8796
 
+
8797
 
+       PR c++/61539
8798
 
+       * pt.c (unify_one_argument): Type/expression mismatch just causes
8799
 
+       deduction failure.
8800
 
+
8801
 
+       PR c++/61500
8802
 
+       * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
8803
 
+
8804
 
+2014-06-17  Jason Merrill  <jason@redhat.com>
8805
 
+
8806
 
+       PR c++/60605
8807
 
+       * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
8808
 
+
8809
 
+2014-06-02  Jason Merrill  <jason@redhat.com>
8810
 
+
8811
 
+       PR c++/61134
8812
 
+       * pt.c (pack_deducible_p): Handle canonicalization.
8813
 
+
8814
 
 2014-05-22  Release Manager
8815
 
 
8816
 
        * GCC 4.8.3 released.
8817
 
Index: gcc/cp/pt.c
8818
 
===================================================================
8819
 
--- a/src/gcc/cp/pt.c   (.../tags/gcc_4_8_3_release)
8820
 
+++ b/src/gcc/cp/pt.c   (.../branches/gcc-4_8-branch)
8821
 
@@ -907,11 +907,13 @@
8822
 
               t; t = TREE_CHAIN (t))
8823
 
            {
8824
 
              tree inst = TREE_VALUE (t);
8825
 
-             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
8826
 
+             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
8827
 
+                 || !COMPLETE_OR_OPEN_TYPE_P (inst))
8828
 
                {
8829
 
                  /* We already have a full specialization of this partial
8830
 
-                    instantiation.  Reassign it to the new member
8831
 
-                    specialization template.  */
8832
 
+                    instantiation, or a full specialization has been
8833
 
+                    looked up but not instantiated.  Reassign it to the
8834
 
+                    new member specialization template.  */
8835
 
                  spec_entry elt;
8836
 
                  spec_entry *entry;
8837
 
                  void **slot;
8838
 
@@ -930,7 +932,7 @@
8839
 
                  *entry = elt;
8840
 
                  *slot = entry;
8841
 
                }
8842
 
-             else if (COMPLETE_OR_OPEN_TYPE_P (inst))
8843
 
+             else
8844
 
                /* But if we've had an implicit instantiation, that's a
8845
 
                   problem ([temp.expl.spec]/6).  */
8846
 
                error ("specialization %qT after instantiation %qT",
8847
 
@@ -1569,6 +1571,7 @@
8848
 
     case CONSTRUCTOR:
8849
 
       {
8850
 
        tree field, value;
8851
 
+       iterative_hash_template_arg (TREE_TYPE (arg), val);
8852
 
        FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
8853
 
          {
8854
 
            val = iterative_hash_template_arg (field, val);
8855
 
@@ -4308,7 +4311,8 @@
8856
 
      in the template-parameter-list of the definition of a member of a
8857
 
      class template.  */
8858
 
 
8859
 
-  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
8860
 
+  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
8861
 
+      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
8862
 
     /* You can't have a function template declaration in a local
8863
 
        scope, nor you can you define a member of a class template in a
8864
 
        local scope.  */
8865
 
@@ -4572,7 +4576,8 @@
8866
 
     DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
8867
 
 
8868
 
   /* See if this is a primary template.  */
8869
 
-  if (is_friend && ctx)
8870
 
+  if (is_friend && ctx
8871
 
+      && uses_template_parms_level (ctx, processing_template_decl))
8872
 
     /* A friend template that specifies a class context, i.e.
8873
 
          template <typename T> friend void A<T>::f();
8874
 
        is not primary.  */
8875
 
@@ -7454,7 +7459,7 @@
8876
 
        }
8877
 
 
8878
 
       /* Let's consider the explicit specialization of a member
8879
 
-         of a class template specialization that is implicitely instantiated,
8880
 
+         of a class template specialization that is implicitly instantiated,
8881
 
         e.g.:
8882
 
             template<class T>
8883
 
             struct S
8884
 
@@ -7552,9 +7557,9 @@
8885
 
 
8886
 
       /* Note this use of the partial instantiation so we can check it
8887
 
         later in maybe_process_partial_specialization.  */
8888
 
-      DECL_TEMPLATE_INSTANTIATIONS (templ)
8889
 
+      DECL_TEMPLATE_INSTANTIATIONS (found)
8890
 
        = tree_cons (arglist, t,
8891
 
-                    DECL_TEMPLATE_INSTANTIATIONS (templ));
8892
 
+                    DECL_TEMPLATE_INSTANTIATIONS (found));
8893
 
 
8894
 
       if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
8895
 
        /* Now that the type has been registered on the instantiations
8896
 
@@ -8289,10 +8294,17 @@
8897
 
 
8898
 
       if (COMPLETE_TYPE_P (context))
8899
 
        {
8900
 
+         tree fn = new_friend;
8901
 
+         /* do_friend adds the TEMPLATE_DECL for any member friend
8902
 
+            template even if it isn't a member template, i.e.
8903
 
+              template <class T> friend A<T>::f();
8904
 
+            Look through it in that case.  */
8905
 
+         if (TREE_CODE (fn) == TEMPLATE_DECL
8906
 
+             && !PRIMARY_TEMPLATE_P (fn))
8907
 
+           fn = DECL_TEMPLATE_RESULT (fn);
8908
 
          /* Check to see that the declaration is really present, and,
8909
 
             possibly obtain an improved declaration.  */
8910
 
-         tree fn = check_classfn (context,
8911
 
-                                  new_friend, NULL_TREE);
8912
 
+         fn = check_classfn (context, fn, NULL_TREE);
8913
 
 
8914
 
          if (fn)
8915
 
            new_friend = fn;
8916
 
@@ -14488,6 +14500,16 @@
8917
 
     case PARM_DECL:
8918
 
       {
8919
 
        tree r = tsubst_copy (t, args, complain, in_decl);
8920
 
+       if (TREE_CODE (r) == VAR_DECL
8921
 
+           && !processing_template_decl
8922
 
+           && !cp_unevaluated_operand
8923
 
+           && DECL_THREAD_LOCAL_P (r))
8924
 
+         {
8925
 
+           if (tree wrap = get_tls_wrapper_fn (r))
8926
 
+             /* Replace an evaluated use of the thread_local variable with
8927
 
+                a call to its wrapper.  */
8928
 
+             r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
8929
 
+         }
8930
 
 
8931
 
        if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
8932
 
          /* If the original type was a reference, we'll be wrapped in
8933
 
@@ -14934,7 +14956,7 @@
8934
 
        continue;
8935
 
       for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
8936
 
           packs; packs = TREE_CHAIN (packs))
8937
 
-       if (TREE_VALUE (packs) == parm)
8938
 
+       if (template_args_equal (TREE_VALUE (packs), parm))
8939
 
          {
8940
 
            /* The template parameter pack is used in a function parameter
8941
 
               pack.  If this is the end of the parameter list, the
8942
 
@@ -15502,8 +15524,9 @@
8943
 
        maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
8944
 
     }
8945
 
   else
8946
 
-    gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8947
 
-               == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
8948
 
+    if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8949
 
+       != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
8950
 
+      return unify_template_argument_mismatch (explain_p, parm, arg);
8951
 
 
8952
 
   /* For deduction from an init-list we need the actual list.  */
8953
 
   if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
8954
 
@@ -19804,6 +19827,8 @@
8955
 
       {
8956
 
        unsigned ix;
8957
 
        tree val;
8958
 
+       if (dependent_type_p (TREE_TYPE (expression)))
8959
 
+         return true;
8960
 
        FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
8961
 
          if (value_dependent_expression_p (val))
8962
 
            return true;
8963
 
@@ -20009,7 +20034,12 @@
8964
 
        return true;
8965
 
 
8966
 
       if (BASELINK_P (expression))
8967
 
-       expression = BASELINK_FUNCTIONS (expression);
8968
 
+       {
8969
 
+         if (BASELINK_OPTYPE (expression)
8970
 
+             && dependent_type_p (BASELINK_OPTYPE (expression)))
8971
 
+           return true;
8972
 
+         expression = BASELINK_FUNCTIONS (expression);
8973
 
+       }
8974
 
 
8975
 
       if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
8976
 
        {
8977
 
Index: gcc/cp/semantics.c
8978
 
===================================================================
8979
 
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_8_3_release)
8980
 
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_8-branch)
8981
 
@@ -2735,8 +2735,10 @@
8982
 
                                              /*friend_p=*/0);
8983
 
        }
8984
 
     }
8985
 
-  /* Enter the DECL into the scope of the class.  */
8986
 
-  else if (pushdecl_class_level (decl))
8987
 
+  /* Enter the DECL into the scope of the class, if the class
8988
 
+     isn't a closure (whose fields are supposed to be unnamed).  */
8989
 
+  else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
8990
 
+          || pushdecl_class_level (decl))
8991
 
     {
8992
 
       if (TREE_CODE (decl) == USING_DECL)
8993
 
        {
8994
 
@@ -3108,7 +3110,7 @@
8995
 
          && DECL_CONTEXT (decl) == NULL_TREE
8996
 
          && !cp_unevaluated_operand)
8997
 
        {
8998
 
-         error ("use of parameter %qD outside function body", decl);
8999
 
+         *error_msg = "use of parameter outside function body";
9000
 
          return error_mark_node;
9001
 
        }
9002
 
     }
9003
 
@@ -3343,6 +3345,7 @@
9004
 
       tree wrap;
9005
 
       if (TREE_CODE (decl) == VAR_DECL
9006
 
          && !cp_unevaluated_operand
9007
 
+         && !processing_template_decl
9008
 
          && DECL_THREAD_LOCAL_P (decl)
9009
 
          && (wrap = get_tls_wrapper_fn (decl)))
9010
 
        {
9011
 
@@ -7296,7 +7299,9 @@
9012
 
          constructor_elt *inner = base_field_constructor_elt (n, ce->index);
9013
 
          inner->value = elt;
9014
 
        }
9015
 
-      else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
9016
 
+      else if (ce->index
9017
 
+              && (TREE_CODE (ce->index) == NOP_EXPR
9018
 
+                  || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
9019
 
        {
9020
 
          /* This is an initializer for an empty base; now that we've
9021
 
             checked that it's constant, we can ignore it.  */
9022
 
Index: gcc/cp/parser.c
9023
 
===================================================================
9024
 
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_8_3_release)
9025
 
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_8-branch)
9026
 
@@ -12831,7 +12831,12 @@
9027
 
      the effort required to do the parse, nor will we issue duplicate
9028
 
      error messages about problems during instantiation of the
9029
 
      template.  */
9030
 
-  if (start_of_id)
9031
 
+  if (start_of_id
9032
 
+      /* Don't do this if we had a parse error in a declarator; re-parsing
9033
 
+        might succeed if a name changes meaning (60361).  */
9034
 
+      && !(cp_parser_error_occurred (parser)
9035
 
+          && cp_parser_parsing_tentatively (parser)
9036
 
+          && parser->in_declarator_p))
9037
 
     {
9038
 
       cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
9039
 
 
9040
 
@@ -23774,8 +23779,6 @@
9041
 
 static void
9042
 
 cp_parser_abort_tentative_parse (cp_parser* parser)
9043
 
 {
9044
 
-  gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
9045
 
-             || errorcount > 0);
9046
 
   cp_parser_simulate_error (parser);
9047
 
   /* Now, pretend that we want to see if the construct was
9048
 
      successfully parsed.  */
9049
 
Index: gcc/cp/call.c
9050
 
===================================================================
9051
 
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
9052
 
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
9053
 
@@ -1464,7 +1464,7 @@
9054
 
     {
9055
 
       maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
9056
 
       conv = implicit_conversion (to, from, expr, c_cast_p,
9057
 
-                                 flags, complain);
9058
 
+                                 flags|LOOKUP_NO_TEMP_BIND, complain);
9059
 
       if (!CLASS_TYPE_P (to)
9060
 
          && CONSTRUCTOR_NELTS (expr) == 1)
9061
 
        {
9062
 
@@ -1624,9 +1624,9 @@
9063
 
 
9064
 
   /* [dcl.init.ref]
9065
 
 
9066
 
-     Otherwise, the reference shall be to a non-volatile const type.
9067
 
-
9068
 
-     Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
9069
 
+     Otherwise, the reference shall be an lvalue reference to a
9070
 
+     non-volatile const type, or the reference shall be an rvalue
9071
 
+     reference.  */
9072
 
   if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
9073
 
     return NULL;
9074
 
 
9075
 
@@ -1664,7 +1664,16 @@
9076
 
   /* This reference binding, unlike those above, requires the
9077
 
      creation of a temporary.  */
9078
 
   conv->need_temporary_p = true;
9079
 
-  conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
9080
 
+  if (TYPE_REF_IS_RVALUE (rto))
9081
 
+    {
9082
 
+      conv->rvaluedness_matches_p = 1;
9083
 
+      /* In the second case, if the reference is an rvalue reference and
9084
 
+        the second standard conversion sequence of the user-defined
9085
 
+        conversion sequence includes an lvalue-to-rvalue conversion, the
9086
 
+        program is ill-formed.  */
9087
 
+      if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
9088
 
+       conv->bad_p = 1;
9089
 
+    }
9090
 
 
9091
 
   return conv;
9092
 
 }
9093
 
@@ -5811,7 +5820,7 @@
9094
 
       && convs->kind != ck_list
9095
 
       && convs->kind != ck_ambig
9096
 
       && (convs->kind != ck_ref_bind
9097
 
-         || convs->user_conv_p)
9098
 
+         || (convs->user_conv_p && next_conversion (convs)->bad_p))
9099
 
       && (convs->kind != ck_rvalue
9100
 
          || SCALAR_TYPE_P (totype))
9101
 
       && convs->kind != ck_base)
9102
 
@@ -6110,7 +6119,8 @@
9103
 
        if (convs->bad_p && !next_conversion (convs)->bad_p)
9104
 
          {
9105
 
            gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
9106
 
-                       && real_lvalue_p (expr));
9107
 
+                       && (real_lvalue_p (expr)
9108
 
+                           || next_conversion(convs)->kind == ck_rvalue));
9109
 
 
9110
 
            error_at (loc, "cannot bind %qT lvalue to %qT",
9111
 
                      TREE_TYPE (expr), totype);
9112
 
Index: gcc/cp/friend.c
9113
 
===================================================================
9114
 
--- a/src/gcc/cp/friend.c       (.../tags/gcc_4_8_3_release)
9115
 
+++ b/src/gcc/cp/friend.c       (.../branches/gcc-4_8-branch)
9116
 
@@ -502,7 +502,13 @@
9117
 
                                  ? current_template_parms
9118
 
                                  : NULL_TREE);
9119
 
 
9120
 
-         if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
9121
 
+         if ((template_member_p
9122
 
+              /* Always pull out the TEMPLATE_DECL if we have a friend
9123
 
+                 template in a class template so that it gets tsubsted
9124
 
+                 properly later on (59956).  tsubst_friend_function knows
9125
 
+                 how to tell this apart from a member template.  */
9126
 
+              || (class_template_depth && friend_depth))
9127
 
+             && decl && TREE_CODE (decl) == FUNCTION_DECL)
9128
 
            decl = DECL_TI_TEMPLATE (decl);
9129
 
 
9130
 
          if (decl)
9131
 
Index: gcc/haifa-sched.c
9132
 
===================================================================
9133
 
--- a/src/gcc/haifa-sched.c     (.../tags/gcc_4_8_3_release)
9134
 
+++ b/src/gcc/haifa-sched.c     (.../branches/gcc-4_8-branch)
9135
 
@@ -2931,7 +2931,7 @@
9136
 
 {
9137
 
   advance_state (curr_state);
9138
 
   if (sched_verbose >= 6)
9139
 
-    fprintf (sched_dump, ";;\tAdvanced a state.\n");
9140
 
+    fprintf (sched_dump, ";;\tAdvance the current state.\n");
9141
 
 }
9142
 
 
9143
 
 /* Update register pressure after scheduling INSN.  */
9144
 
@@ -5964,6 +5964,7 @@
9145
 
   modulo_insns_scheduled = 0;
9146
 
 
9147
 
   ls.modulo_epilogue = false;
9148
 
+  ls.first_cycle_insn_p = true;
9149
 
 
9150
 
   /* Loop until all the insns in BB are scheduled.  */
9151
 
   while ((*current_sched_info->schedule_more_p) ())
9152
 
@@ -6034,7 +6035,6 @@
9153
 
       if (must_backtrack)
9154
 
        goto do_backtrack;
9155
 
 
9156
 
-      ls.first_cycle_insn_p = true;
9157
 
       ls.shadows_only_p = false;
9158
 
       cycle_issued_insns = 0;
9159
 
       ls.can_issue_more = issue_rate;
9160
 
@@ -6321,11 +6321,13 @@
9161
 
              break;
9162
 
            }
9163
 
        }
9164
 
+      ls.first_cycle_insn_p = true;
9165
 
     }
9166
 
   if (ls.modulo_epilogue)
9167
 
     success = true;
9168
 
  end_schedule:
9169
 
-  advance_one_cycle ();
9170
 
+  if (!ls.first_cycle_insn_p)
9171
 
+    advance_one_cycle ();
9172
 
   perform_replacements_new_cycle ();
9173
 
   if (modulo_ii > 0)
9174
 
     {
9175
 
Index: gcc/double-int.c
9176
 
===================================================================
9177
 
--- a/src/gcc/double-int.c      (.../tags/gcc_4_8_3_release)
9178
 
+++ b/src/gcc/double-int.c      (.../branches/gcc-4_8-branch)
9179
 
@@ -616,7 +616,7 @@
9180
 
                 == (unsigned HOST_WIDE_INT) htwice)
9181
 
                && (labs_den <= ltwice)))
9182
 
          {
9183
 
-           if (*hquo < 0)
9184
 
+           if (quo_neg)
9185
 
              /* quo = quo - 1;  */
9186
 
              add_double (*lquo, *hquo,
9187
 
                          (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
9188
 
Index: gcc/ipa-pure-const.c
9189
 
===================================================================
9190
 
--- a/src/gcc/ipa-pure-const.c  (.../tags/gcc_4_8_3_release)
9191
 
+++ b/src/gcc/ipa-pure-const.c  (.../branches/gcc-4_8-branch)
9192
 
@@ -1429,7 +1429,7 @@
9193
 
              else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
9194
 
                can_throw = true;
9195
 
            }
9196
 
-          for (ie = node->indirect_calls; ie; ie = ie->next_callee)
9197
 
+          for (ie = w->indirect_calls; ie; ie = ie->next_callee)
9198
 
            if (ie->can_throw_external)
9199
 
              can_throw = true;
9200
 
          w_info = (struct ipa_dfs_info *) w->symbol.aux;
9201
 
Index: gcc/tree-ssa-math-opts.c
9202
 
===================================================================
9203
 
--- a/src/gcc/tree-ssa-math-opts.c      (.../tags/gcc_4_8_3_release)
9204
 
+++ b/src/gcc/tree-ssa-math-opts.c      (.../branches/gcc-4_8-branch)
9205
 
@@ -1537,7 +1537,7 @@
9206
 
 
9207
 
 struct symbolic_number {
9208
 
   unsigned HOST_WIDEST_INT n;
9209
 
-  int size;
9210
 
+  tree type;
9211
 
 };
9212
 
 
9213
 
 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
9214
 
@@ -1549,13 +1549,15 @@
9215
 
                 struct symbolic_number *n,
9216
 
                 int count)
9217
 
 {
9218
 
+  int bitsize = TYPE_PRECISION (n->type);
9219
 
+
9220
 
   if (count % 8 != 0)
9221
 
     return false;
9222
 
 
9223
 
   /* Zero out the extra bits of N in order to avoid them being shifted
9224
 
      into the significant bits.  */
9225
 
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
9226
 
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
9227
 
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9228
 
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9229
 
 
9230
 
   switch (code)
9231
 
     {
9232
 
@@ -1563,20 +1565,24 @@
9233
 
       n->n <<= count;
9234
 
       break;
9235
 
     case RSHIFT_EXPR:
9236
 
+      /* Arithmetic shift of signed type: result is dependent on the value.  */
9237
 
+      if (!TYPE_UNSIGNED (n->type)
9238
 
+         && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
9239
 
+       return false;
9240
 
       n->n >>= count;
9241
 
       break;
9242
 
     case LROTATE_EXPR:
9243
 
-      n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
9244
 
+      n->n = (n->n << count) | (n->n >> (bitsize - count));
9245
 
       break;
9246
 
     case RROTATE_EXPR:
9247
 
-      n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
9248
 
+      n->n = (n->n >> count) | (n->n << (bitsize - count));
9249
 
       break;
9250
 
     default:
9251
 
       return false;
9252
 
     }
9253
 
   /* Zero unused bits for size.  */
9254
 
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
9255
 
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
9256
 
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9257
 
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9258
 
   return true;
9259
 
 }
9260
 
 
9261
 
@@ -1593,7 +1599,7 @@
9262
 
   if (TREE_CODE (lhs_type) != INTEGER_TYPE)
9263
 
     return false;
9264
 
 
9265
 
-  if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
9266
 
+  if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
9267
 
     return false;
9268
 
 
9269
 
   return true;
9270
 
@@ -1650,20 +1656,25 @@
9271
 
         to initialize the symbolic number.  */
9272
 
       if (!source_expr1)
9273
 
        {
9274
 
+         int size;
9275
 
+
9276
 
          /* Set up the symbolic number N by setting each byte to a
9277
 
             value between 1 and the byte size of rhs1.  The highest
9278
 
             order byte is set to n->size and the lowest order
9279
 
             byte to 1.  */
9280
 
-         n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
9281
 
-         if (n->size % BITS_PER_UNIT != 0)
9282
 
+         n->type = TREE_TYPE (rhs1);
9283
 
+         size = TYPE_PRECISION (n->type);
9284
 
+         if (size % BITS_PER_UNIT != 0)
9285
 
            return NULL_TREE;
9286
 
-         n->size /= BITS_PER_UNIT;
9287
 
+         if (size > HOST_BITS_PER_WIDEST_INT)
9288
 
+           return NULL_TREE;
9289
 
+         size /= BITS_PER_UNIT;
9290
 
          n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
9291
 
                  (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
9292
 
 
9293
 
-         if (n->size < (int)sizeof (HOST_WIDEST_INT))
9294
 
+         if (size < (int)sizeof (HOST_WIDEST_INT))
9295
 
            n->n &= ((unsigned HOST_WIDEST_INT)1 <<
9296
 
-                    (n->size * BITS_PER_UNIT)) - 1;
9297
 
+                    (size * BITS_PER_UNIT)) - 1;
9298
 
 
9299
 
          source_expr1 = rhs1;
9300
 
        }
9301
 
@@ -1672,12 +1683,12 @@
9302
 
        {
9303
 
        case BIT_AND_EXPR:
9304
 
          {
9305
 
-           int i;
9306
 
+           int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
9307
 
            unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
9308
 
            unsigned HOST_WIDEST_INT tmp = val;
9309
 
 
9310
 
            /* Only constants masking full bytes are allowed.  */
9311
 
-           for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
9312
 
+           for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
9313
 
              if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
9314
 
                return NULL_TREE;
9315
 
 
9316
 
@@ -1693,12 +1704,24 @@
9317
 
          break;
9318
 
        CASE_CONVERT:
9319
 
          {
9320
 
-           int type_size;
9321
 
+           int type_size, old_type_size;
9322
 
+           tree type;
9323
 
 
9324
 
-           type_size = TYPE_PRECISION (gimple_expr_type (stmt));
9325
 
+           type = gimple_expr_type (stmt);
9326
 
+           type_size = TYPE_PRECISION (type);
9327
 
            if (type_size % BITS_PER_UNIT != 0)
9328
 
              return NULL_TREE;
9329
 
+           if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
9330
 
+             return NULL_TREE;
9331
 
 
9332
 
+           /* Sign extension: result is dependent on the value.  */
9333
 
+           old_type_size = TYPE_PRECISION (n->type);
9334
 
+           if (!TYPE_UNSIGNED (n->type)
9335
 
+               && type_size > old_type_size
9336
 
+               && n->n &
9337
 
+                  ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
9338
 
+             return NULL_TREE;
9339
 
+
9340
 
            if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
9341
 
              {
9342
 
                /* If STMT casts to a smaller type mask out the bits not
9343
 
@@ -1705,7 +1728,7 @@
9344
 
                   belonging to the target type.  */
9345
 
                n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
9346
 
              }
9347
 
-           n->size = type_size / BITS_PER_UNIT;
9348
 
+           n->type = type;
9349
 
          }
9350
 
          break;
9351
 
        default:
9352
 
@@ -1718,7 +1741,7 @@
9353
 
 
9354
 
   if (rhs_class == GIMPLE_BINARY_RHS)
9355
 
     {
9356
 
-      int i;
9357
 
+      int i, size;
9358
 
       struct symbolic_number n1, n2;
9359
 
       unsigned HOST_WIDEST_INT mask;
9360
 
       tree source_expr2;
9361
 
@@ -1742,11 +1765,12 @@
9362
 
          source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
9363
 
 
9364
 
          if (source_expr1 != source_expr2
9365
 
-             || n1.size != n2.size)
9366
 
+             || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
9367
 
            return NULL_TREE;
9368
 
 
9369
 
-         n->size = n1.size;
9370
 
-         for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
9371
 
+         n->type = n1.type;
9372
 
+         size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
9373
 
+         for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
9374
 
            {
9375
 
              unsigned HOST_WIDEST_INT masked1, masked2;
9376
 
 
9377
 
@@ -1785,7 +1809,7 @@
9378
 
 
9379
 
   struct symbolic_number n;
9380
 
   tree source_expr;
9381
 
-  int limit;
9382
 
+  int limit, bitsize;
9383
 
 
9384
 
   /* The last parameter determines the depth search limit.  It usually
9385
 
      correlates directly to the number of bytes to be touched.  We
9386
 
@@ -1800,13 +1824,14 @@
9387
 
     return NULL_TREE;
9388
 
 
9389
 
   /* Zero out the extra bits of N and CMP.  */
9390
 
-  if (n.size < (int)sizeof (HOST_WIDEST_INT))
9391
 
+  bitsize = TYPE_PRECISION (n.type);
9392
 
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9393
 
     {
9394
 
       unsigned HOST_WIDEST_INT mask =
9395
 
-       ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
9396
 
+       ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9397
 
 
9398
 
       n.n &= mask;
9399
 
-      cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
9400
 
+      cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
9401
 
     }
9402
 
 
9403
 
   /* A complete byte swap should make the symbolic number to start
9404
 
@@ -1828,7 +1853,7 @@
9405
 
   bool changed = false;
9406
 
   tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
9407
 
 
9408
 
-  if (BITS_PER_UNIT != 8)
9409
 
+  if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
9410
 
     return 0;
9411
 
 
9412
 
   if (sizeof (HOST_WIDEST_INT) < 8)
9413
 
Index: gcc/tree-nrv.c
9414
 
===================================================================
9415
 
--- a/src/gcc/tree-nrv.c        (.../tags/gcc_4_8_3_release)
9416
 
+++ b/src/gcc/tree-nrv.c        (.../branches/gcc-4_8-branch)
9417
 
@@ -178,8 +178,7 @@
9418
 
                 same type and alignment as the function's result.  */
9419
 
              if (TREE_CODE (found) != VAR_DECL
9420
 
                  || TREE_THIS_VOLATILE (found)
9421
 
-                 || DECL_CONTEXT (found) != current_function_decl
9422
 
-                 || TREE_STATIC (found)
9423
 
+                 || !auto_var_in_fn_p (found, current_function_decl)
9424
 
                  || TREE_ADDRESSABLE (found)
9425
 
                  || DECL_ALIGN (found) > DECL_ALIGN (result)
9426
 
                  || !useless_type_conversion_p (result_type,
9427
 
Index: gcc/config.in
9428
 
===================================================================
9429
 
--- a/src/gcc/config.in (.../tags/gcc_4_8_3_release)
9430
 
+++ b/src/gcc/config.in (.../branches/gcc-4_8-branch)
9431
 
@@ -1175,6 +1175,12 @@
9432
 
 #endif
9433
 
 
9434
 
 
9435
 
+/* Define if isl_schedule_constraints_compute_schedule exists. */
9436
 
+#ifndef USED_FOR_TARGET
9437
 
+#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
9438
 
+#endif
9439
 
+
9440
 
+
9441
 
 /* Define to 1 if you have the `kill' function. */
9442
 
 #ifndef USED_FOR_TARGET
9443
 
 #undef HAVE_KILL
9444
 
Index: gcc/ifcvt.c
9445
 
===================================================================
9446
 
--- a/src/gcc/ifcvt.c   (.../tags/gcc_4_8_3_release)
9447
 
+++ b/src/gcc/ifcvt.c   (.../branches/gcc-4_8-branch)
9448
 
@@ -294,6 +294,28 @@
9449
 
 
9450
 
   return (e) ? e->dest : NULL_BLOCK;
9451
 
 }
9452
 
+
9453
 
+/* Return true if RTXs A and B can be safely interchanged.  */
9454
 
+
9455
 
+static bool
9456
 
+rtx_interchangeable_p (const_rtx a, const_rtx b)
9457
 
+{
9458
 
+  if (!rtx_equal_p (a, b))
9459
 
+    return false;
9460
 
+
9461
 
+  if (GET_CODE (a) != MEM)
9462
 
+    return true;
9463
 
+
9464
 
+  /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
9465
 
+     reference is not.  Interchanging a dead type-unsafe memory reference with
9466
 
+     a live type-safe one creates a live type-unsafe memory reference, in other
9467
 
+     words, it makes the program illegal.
9468
 
+     We check here conservatively whether the two memory references have equal
9469
 
+     memory attributes.  */
9470
 
+
9471
 
+  return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
9472
 
+}
9473
 
+
9474
 
 
9475
 
 /* Go through a bunch of insns, converting them to conditional
9476
 
    execution format if possible.  Return TRUE if all of the non-note
9477
 
@@ -1014,6 +1036,9 @@
9478
 
       || (rtx_equal_p (if_info->a, XEXP (cond, 1))
9479
 
          && rtx_equal_p (if_info->b, XEXP (cond, 0))))
9480
 
     {
9481
 
+      if (!rtx_interchangeable_p (if_info->a, if_info->b))
9482
 
+       return FALSE;
9483
 
+
9484
 
       y = (code == EQ) ? if_info->a : if_info->b;
9485
 
 
9486
 
       /* Avoid generating the move if the source is the destination.  */
9487
 
@@ -2483,7 +2508,7 @@
9488
 
       if (! insn_b
9489
 
          || insn_b != last_active_insn (else_bb, FALSE)
9490
 
          || (set_b = single_set (insn_b)) == NULL_RTX
9491
 
-         || ! rtx_equal_p (x, SET_DEST (set_b)))
9492
 
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
9493
 
        return FALSE;
9494
 
     }
9495
 
   else
9496
 
@@ -2496,7 +2521,7 @@
9497
 
          || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
9498
 
          || !NONJUMP_INSN_P (insn_b)
9499
 
          || (set_b = single_set (insn_b)) == NULL_RTX
9500
 
-         || ! rtx_equal_p (x, SET_DEST (set_b))
9501
 
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b))
9502
 
          || ! noce_operand_ok (SET_SRC (set_b))
9503
 
          || reg_overlap_mentioned_p (x, SET_SRC (set_b))
9504
 
          || modified_between_p (SET_SRC (set_b), insn_b, jump)
9505
 
@@ -2562,7 +2587,7 @@
9506
 
 
9507
 
   /* Look and see if A and B are really the same.  Avoid creating silly
9508
 
      cmove constructs that no one will fix up later.  */
9509
 
-  if (rtx_equal_p (a, b))
9510
 
+  if (rtx_interchangeable_p (a, b))
9511
 
     {
9512
 
       /* If we have an INSN_B, we don't have to create any new rtl.  Just
9513
 
         move the instruction that we already have.  If we don't have an
9514
 
@@ -4246,6 +4271,9 @@
9515
 
   old_dest = JUMP_LABEL (jump);
9516
 
   if (other_bb != new_dest)
9517
 
     {
9518
 
+      if (!any_condjump_p (jump))
9519
 
+       goto cancel;
9520
 
+
9521
 
       if (JUMP_P (BB_END (dest_edge->src)))
9522
 
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
9523
 
       else if (new_dest == EXIT_BLOCK_PTR)
9524
 
Index: gcc/dwarf2out.c
9525
 
===================================================================
9526
 
--- a/src/gcc/dwarf2out.c       (.../tags/gcc_4_8_3_release)
9527
 
+++ b/src/gcc/dwarf2out.c       (.../branches/gcc-4_8-branch)
9528
 
@@ -12234,7 +12234,7 @@
9529
 
              op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
9530
 
                                        VAR_INIT_STATUS_INITIALIZED);
9531
 
              if (op1 == 0)
9532
 
-               break;
9533
 
+               return NULL;
9534
 
              add_loc_descr (&mem_loc_result, op1);
9535
 
              add_loc_descr (&mem_loc_result,
9536
 
                             new_loc_descr (DW_OP_plus, 0, 0));
9537
 
@@ -13882,6 +13882,10 @@
9538
 
       have_address = 1;
9539
 
       break;
9540
 
 
9541
 
+    case TARGET_MEM_REF:
9542
 
+    case SSA_NAME:
9543
 
+      return NULL;
9544
 
+
9545
 
     case COMPOUND_EXPR:
9546
 
       return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
9547
 
 
9548
 
Index: gcc/expr.c
9549
 
===================================================================
9550
 
--- a/src/gcc/expr.c    (.../tags/gcc_4_8_3_release)
9551
 
+++ b/src/gcc/expr.c    (.../branches/gcc-4_8-branch)
9552
 
@@ -7590,11 +7590,13 @@
9553
 
       break;
9554
 
 
9555
 
     case COMPOUND_LITERAL_EXPR:
9556
 
-      /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
9557
 
-        rtl_for_decl_init is called on DECL_INITIAL with
9558
 
-        COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified.  */
9559
 
-      if (modifier == EXPAND_INITIALIZER
9560
 
-         && COMPOUND_LITERAL_EXPR_DECL (exp))
9561
 
+      /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
9562
 
+        initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
9563
 
+        with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
9564
 
+        array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
9565
 
+        the initializers aren't gimplified.  */
9566
 
+      if (COMPOUND_LITERAL_EXPR_DECL (exp)
9567
 
+         && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
9568
 
        return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
9569
 
                                        target, tmode, modifier, as);
9570
 
       /* FALLTHRU */
9571
 
@@ -10603,7 +10605,7 @@
9572
 
       || !host_integerp (TREE_OPERAND (offset, 1), 1)
9573
 
       || compare_tree_int (TREE_OPERAND (offset, 1),
9574
 
                           BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
9575
 
-      || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9576
 
+      || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9577
 
     return 0;
9578
 
 
9579
 
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
9580
 
Index: gcc/ada/socket.c
9581
 
===================================================================
9582
 
--- a/src/gcc/ada/socket.c      (.../tags/gcc_4_8_3_release)
9583
 
+++ b/src/gcc/ada/socket.c      (.../branches/gcc-4_8-branch)
9584
 
@@ -212,7 +212,7 @@
9585
 
   struct hostent *rh;
9586
 
   int ri;
9587
 
 
9588
 
-#if defined(__linux__) || defined(__GLIBC__)
9589
 
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
9590
 
   (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
9591
 
 #else
9592
 
   rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
9593
 
Index: gcc/ada/uintp.adb
9594
 
===================================================================
9595
 
--- a/src/gcc/ada/uintp.adb     (.../tags/gcc_4_8_3_release)
9596
 
+++ b/src/gcc/ada/uintp.adb     (.../branches/gcc-4_8-branch)
9597
 
@@ -171,22 +171,6 @@
9598
 
    --  If Discard_Quotient is True, Quotient is set to No_Uint
9599
 
    --  If Discard_Remainder is True, Remainder is set to No_Uint
9600
 
 
9601
 
-   function Vector_To_Uint
9602
 
-     (In_Vec   : UI_Vector;
9603
 
-      Negative : Boolean) return Uint;
9604
 
-   --  Functions that calculate values in UI_Vectors, call this function to
9605
 
-   --  create and return the Uint value. In_Vec contains the multiple precision
9606
 
-   --  (Base) representation of a non-negative value. Leading zeroes are
9607
 
-   --  permitted. Negative is set if the desired result is the negative of the
9608
 
-   --  given value. The result will be either the appropriate directly
9609
 
-   --  represented value, or a table entry in the proper canonical format is
9610
 
-   --  created and returned.
9611
 
-   --
9612
 
-   --  Note that Init_Operand puts a signed value in the result vector, but
9613
 
-   --  Vector_To_Uint is always presented with a non-negative value. The
9614
 
-   --  processing of signs is something that is done by the caller before
9615
 
-   --  calling Vector_To_Uint.
9616
 
-
9617
 
    ------------
9618
 
    -- Direct --
9619
 
    ------------
9620
 
Index: gcc/ada/uintp.ads
9621
 
===================================================================
9622
 
--- a/src/gcc/ada/uintp.ads     (.../tags/gcc_4_8_3_release)
9623
 
+++ b/src/gcc/ada/uintp.ads     (.../branches/gcc-4_8-branch)
9624
 
@@ -90,6 +90,18 @@
9625
 
    Uint_Minus_80  : constant Uint;
9626
 
    Uint_Minus_128 : constant Uint;
9627
 
 
9628
 
+   type UI_Vector is array (Pos range <>) of Int;
9629
 
+   --  Vector containing the integer values of a Uint value
9630
 
+
9631
 
+   --  Note: An earlier version of this package used pointers of arrays of Ints
9632
 
+   --  (dynamically allocated) for the Uint type. The change leads to a few
9633
 
+   --  less natural idioms used throughout this code, but eliminates all uses
9634
 
+   --  of the heap except for the table package itself. For example, Uint
9635
 
+   --  parameters are often converted to UI_Vectors for internal manipulation.
9636
 
+   --  This is done by creating the local UI_Vector using the function N_Digits
9637
 
+   --  on the Uint to find the size needed for the vector, and then calling
9638
 
+   --  Init_Operand to copy the values out of the table into the vector.
9639
 
+
9640
 
    -----------------
9641
 
    -- Subprograms --
9642
 
    -----------------
9643
 
@@ -252,6 +264,22 @@
9644
 
    --  function is used for capacity checks, and it can be one bit off
9645
 
    --  without affecting its usage.
9646
 
 
9647
 
+   function Vector_To_Uint
9648
 
+     (In_Vec   : UI_Vector;
9649
 
+      Negative : Boolean) return Uint;
9650
 
+   --  Functions that calculate values in UI_Vectors, call this function to
9651
 
+   --  create and return the Uint value. In_Vec contains the multiple precision
9652
 
+   --  (Base) representation of a non-negative value. Leading zeroes are
9653
 
+   --  permitted. Negative is set if the desired result is the negative of the
9654
 
+   --  given value. The result will be either the appropriate directly
9655
 
+   --  represented value, or a table entry in the proper canonical format is
9656
 
+   --  created and returned.
9657
 
+   --
9658
 
+   --  Note that Init_Operand puts a signed value in the result vector, but
9659
 
+   --  Vector_To_Uint is always presented with a non-negative value. The
9660
 
+   --  processing of signs is something that is done by the caller before
9661
 
+   --  calling Vector_To_Uint.
9662
 
+
9663
 
    ---------------------
9664
 
    -- Output Routines --
9665
 
    ---------------------
9666
 
@@ -494,18 +522,6 @@
9667
 
    --  UI_Vector is defined for this purpose and some internal subprograms
9668
 
    --  used for converting from one to the other are defined.
9669
 
 
9670
 
-   type UI_Vector is array (Pos range <>) of Int;
9671
 
-   --  Vector containing the integer values of a Uint value
9672
 
-
9673
 
-   --  Note: An earlier version of this package used pointers of arrays of Ints
9674
 
-   --  (dynamically allocated) for the Uint type. The change leads to a few
9675
 
-   --  less natural idioms used throughout this code, but eliminates all uses
9676
 
-   --  of the heap except for the table package itself. For example, Uint
9677
 
-   --  parameters are often converted to UI_Vectors for internal manipulation.
9678
 
-   --  This is done by creating the local UI_Vector using the function N_Digits
9679
 
-   --  on the Uint to find the size needed for the vector, and then calling
9680
 
-   --  Init_Operand to copy the values out of the table into the vector.
9681
 
-
9682
 
    type Uint_Entry is record
9683
 
       Length : Pos;
9684
 
       --  Length of entry in Udigits table in digits (i.e. in words)
9685
 
Index: gcc/ada/ChangeLog
9686
 
===================================================================
9687
 
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_8_3_release)
9688
 
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_8-branch)
9689
 
@@ -1,3 +1,29 @@
9690
 
+2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
9691
 
+
9692
 
+       Backport from mainline
9693
 
+       2014-11-20  Vincent Celier  <celier@adacore.com>
9694
 
+
9695
 
+       PR ada/47500
9696
 
+       * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
9697
 
+       its argument.
9698
 
+
9699
 
+2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
9700
 
+            Alan Modra  <amodra@gmail.com>
9701
 
+
9702
 
+       PR ada/63225
9703
 
+       * uintp.adb (Vector_To_Uint): Move from here to...
9704
 
+       * uintp.ads (UI_Vector): Make public.
9705
 
+       (Vector_To_Uint): ...here.
9706
 
+
9707
 
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
9708
 
+
9709
 
+       * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
9710
 
+       * gsocket.h Add include of <unistd.h> on RTEMS.
9711
 
+
9712
 
+2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
9713
 
+
9714
 
+       * s-osinte-rtems.adb: Correct formatting of line in license block.
9715
 
+
9716
 
 2014-05-22  Release Manager
9717
 
 
9718
 
        * GCC 4.8.3 released.
9719
 
Index: gcc/ada/s-osinte-rtems.adb
9720
 
===================================================================
9721
 
--- a/src/gcc/ada/s-osinte-rtems.adb    (.../tags/gcc_4_8_3_release)
9722
 
+++ b/src/gcc/ada/s-osinte-rtems.adb    (.../branches/gcc-4_8-branch)
9723
 
@@ -22,7 +22,7 @@
9724
 
 -- You should have received a copy of the GNU General Public License and    --
9725
 
 -- a copy of the GCC Runtime Library Exception along with this program;     --
9726
 
 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
9727
 
--- <http://www.gnu.org/licenses/>.                                         
9728
 
+-- <http://www.gnu.org/licenses/>.                                          --
9729
 
 --                                                                          --
9730
 
 -- GNARL was developed by the GNARL team at Florida State University. It is --
9731
 
 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
9732
 
Index: gcc/ada/gsocket.h
9733
 
===================================================================
9734
 
--- a/src/gcc/ada/gsocket.h     (.../tags/gcc_4_8_3_release)
9735
 
+++ b/src/gcc/ada/gsocket.h     (.../branches/gcc-4_8-branch)
9736
 
@@ -183,6 +183,11 @@
9737
 
 #include <sys/time.h>
9738
 
 #endif
9739
 
 
9740
 
+#if defined(__rtems__)
9741
 
+#include <unistd.h>
9742
 
+/* Required, for read(), write(), and close() */
9743
 
+#endif
9744
 
+
9745
 
 /*
9746
 
  * RTEMS has these .h files but not until you have built and installed RTEMS.
9747
 
  * When building a C/C++ toolset, you also build the newlib C library, so the
9748
 
Index: gcc/ada/back_end.adb
9749
 
===================================================================
9750
 
--- a/src/gcc/ada/back_end.adb  (.../tags/gcc_4_8_3_release)
9751
 
+++ b/src/gcc/ada/back_end.adb  (.../branches/gcc-4_8-branch)
9752
 
@@ -209,9 +209,10 @@
9753
 
          Last  : constant Natural  := Switch_Last (Switch_Chars);
9754
 
 
9755
 
       begin
9756
 
-         --  Skip -o or internal GCC switches together with their argument
9757
 
+         --  Skip -o, -G or internal GCC switches together with their argument.
9758
 
 
9759
 
          if Switch_Chars (First .. Last) = "o"
9760
 
+           or else Switch_Chars (First .. Last) = "G"
9761
 
            or else Is_Internal_GCC_Switch (Switch_Chars)
9762
 
          then
9763
 
             Next_Arg := Next_Arg + 1;
9764
 
Index: gcc/tree-ssa-ifcombine.c
9765
 
===================================================================
9766
 
--- a/src/gcc/tree-ssa-ifcombine.c      (.../tags/gcc_4_8_3_release)
9767
 
+++ b/src/gcc/tree-ssa-ifcombine.c      (.../branches/gcc-4_8-branch)
9768
 
@@ -105,7 +105,11 @@
9769
 
     {
9770
 
       gimple stmt = gsi_stmt (gsi);
9771
 
 
9772
 
+      if (is_gimple_debug (stmt))
9773
 
+       continue;
9774
 
+
9775
 
       if (gimple_has_side_effects (stmt)
9776
 
+         || gimple_could_trap_p (stmt)
9777
 
          || gimple_vuse (stmt))
9778
 
        return false;
9779
 
     }
9780
 
@@ -197,7 +201,8 @@
9781
 
       while (is_gimple_assign (stmt)
9782
 
             && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
9783
 
                  && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
9784
 
-                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
9785
 
+                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
9786
 
+                 && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
9787
 
                 || gimple_assign_ssa_name_copy_p (stmt)))
9788
 
        stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
9789
 
 
9790
 
Index: gcc/sel-sched-ir.c
9791
 
===================================================================
9792
 
--- a/src/gcc/sel-sched-ir.c    (.../tags/gcc_4_8_3_release)
9793
 
+++ b/src/gcc/sel-sched-ir.c    (.../branches/gcc-4_8-branch)
9794
 
@@ -162,7 +162,7 @@
9795
 
 static void free_av_set (basic_block);
9796
 
 static void invalidate_av_set (basic_block);
9797
 
 static void extend_insn_data (void);
9798
 
-static void sel_init_new_insn (insn_t, int);
9799
 
+static void sel_init_new_insn (insn_t, int, int = -1);
9800
 
 static void finish_insns (void);
9801
 
 
9802
 
 /* Various list functions.  */
9803
 
@@ -4011,9 +4011,10 @@
9804
 
   return seqno;
9805
 
 }
9806
 
 
9807
 
-/* Compute seqno for INSN by its preds or succs.  */
9808
 
+/* Compute seqno for INSN by its preds or succs.  Use OLD_SEQNO to compute
9809
 
+   seqno in corner cases.  */
9810
 
 static int
9811
 
-get_seqno_for_a_jump (insn_t insn)
9812
 
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
9813
 
 {
9814
 
   int seqno;
9815
 
 
9816
 
@@ -4069,8 +4070,16 @@
9817
 
   if (seqno < 0)
9818
 
     seqno = get_seqno_by_succs (insn);
9819
 
 
9820
 
+  if (seqno < 0)
9821
 
+    {
9822
 
+      /* The only case where this could be here legally is that the only
9823
 
+        unscheduled insn was a conditional jump that got removed and turned
9824
 
+        into this unconditional one.  Initialize from the old seqno
9825
 
+        of that jump passed down to here.  */
9826
 
+      seqno = old_seqno;
9827
 
+    }
9828
 
+
9829
 
   gcc_assert (seqno >= 0);
9830
 
-
9831
 
   return seqno;
9832
 
 }
9833
 
 
9834
 
@@ -4250,22 +4259,24 @@
9835
 
 }
9836
 
 
9837
 
 /* This is used to initialize spurious jumps generated by
9838
 
-   sel_redirect_edge ().  */
9839
 
+   sel_redirect_edge ().  OLD_SEQNO is used for initializing seqnos
9840
 
+   in corner cases within get_seqno_for_a_jump.  */
9841
 
 static void
9842
 
-init_simplejump_data (insn_t insn)
9843
 
+init_simplejump_data (insn_t insn, int old_seqno)
9844
 
 {
9845
 
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
9846
 
             REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
9847
 
             vNULL, true, false, false,
9848
 
             false, true);
9849
 
-  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
9850
 
+  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
9851
 
   init_first_time_insn_data (insn);
9852
 
 }
9853
 
 
9854
 
 /* Perform deferred initialization of insns.  This is used to process
9855
 
-   a new jump that may be created by redirect_edge.  */
9856
 
-void
9857
 
-sel_init_new_insn (insn_t insn, int flags)
9858
 
+   a new jump that may be created by redirect_edge.  OLD_SEQNO is used
9859
 
+   for initializing simplejumps in init_simplejump_data.  */
9860
 
+static void
9861
 
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
9862
 
 {
9863
 
   /* We create data structures for bb when the first insn is emitted in it.  */
9864
 
   if (INSN_P (insn)
9865
 
@@ -4292,7 +4303,7 @@
9866
 
   if (flags & INSN_INIT_TODO_SIMPLEJUMP)
9867
 
     {
9868
 
       extend_insn_data ();
9869
 
-      init_simplejump_data (insn);
9870
 
+      init_simplejump_data (insn, old_seqno);
9871
 
     }
9872
 
 
9873
 
   gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
9874
 
@@ -5578,8 +5589,7 @@
9875
 
 }
9876
 
 
9877
 
 /* A wrapper for redirect_edge_and_branch_force, which also initializes
9878
 
-   data structures for possibly created bb and insns.  Returns the newly
9879
 
-   added bb or NULL, when a bb was not needed.  */
9880
 
+   data structures for possibly created bb and insns.  */
9881
 
 void
9882
 
 sel_redirect_edge_and_branch_force (edge e, basic_block to)
9883
 
 {
9884
 
@@ -5586,6 +5596,7 @@
9885
 
   basic_block jump_bb, src, orig_dest = e->dest;
9886
 
   int prev_max_uid;
9887
 
   rtx jump;
9888
 
+  int old_seqno = -1;
9889
 
 
9890
 
   /* This function is now used only for bookkeeping code creation, where
9891
 
      we'll never get the single pred of orig_dest block and thus will not
9892
 
@@ -5594,8 +5605,13 @@
9893
 
               && !single_pred_p (orig_dest));
9894
 
   src = e->src;
9895
 
   prev_max_uid = get_max_uid ();
9896
 
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9897
 
+     when the conditional jump being redirected may become unconditional.  */
9898
 
+  if (any_condjump_p (BB_END (src))
9899
 
+      && INSN_SEQNO (BB_END (src)) >= 0)
9900
 
+    old_seqno = INSN_SEQNO (BB_END (src));
9901
 
+
9902
 
   jump_bb = redirect_edge_and_branch_force (e, to);
9903
 
-
9904
 
   if (jump_bb != NULL)
9905
 
     sel_add_bb (jump_bb);
9906
 
 
9907
 
@@ -5607,7 +5623,8 @@
9908
 
 
9909
 
   jump = find_new_jump (src, jump_bb, prev_max_uid);
9910
 
   if (jump)
9911
 
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9912
 
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
9913
 
+                      old_seqno);
9914
 
   set_immediate_dominator (CDI_DOMINATORS, to,
9915
 
                           recompute_dominator (CDI_DOMINATORS, to));
9916
 
   set_immediate_dominator (CDI_DOMINATORS, orig_dest,
9917
 
@@ -5626,6 +5643,7 @@
9918
 
   edge redirected;
9919
 
   bool recompute_toporder_p = false;
9920
 
   bool maybe_unreachable = single_pred_p (orig_dest);
9921
 
+  int old_seqno = -1;
9922
 
 
9923
 
   latch_edge_p = (pipelining_p
9924
 
                   && current_loop_nest
9925
 
@@ -5634,6 +5652,12 @@
9926
 
   src = e->src;
9927
 
   prev_max_uid = get_max_uid ();
9928
 
 
9929
 
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9930
 
+     when the conditional jump being redirected may become unconditional.  */
9931
 
+  if (any_condjump_p (BB_END (src))
9932
 
+      && INSN_SEQNO (BB_END (src)) >= 0)
9933
 
+    old_seqno = INSN_SEQNO (BB_END (src));
9934
 
+
9935
 
   redirected = redirect_edge_and_branch (e, to);
9936
 
 
9937
 
   gcc_assert (redirected && !last_added_blocks.exists ());
9938
 
@@ -5654,7 +5678,7 @@
9939
 
 
9940
 
   jump = find_new_jump (src, NULL, prev_max_uid);
9941
 
   if (jump)
9942
 
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9943
 
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
9944
 
 
9945
 
   /* Only update dominator info when we don't have unreachable blocks.
9946
 
      Otherwise we'll update in maybe_tidy_empty_bb.  */
9947
 
Index: gcc/fortran/interface.c
9948
 
===================================================================
9949
 
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_8_3_release)
9950
 
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_8-branch)
9951
 
@@ -1923,7 +1923,7 @@
9952
 
   /* F2008, 12.5.2.5; IR F08/0073.  */
9953
 
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
9954
 
       && ((CLASS_DATA (formal)->attr.class_pointer
9955
 
-          && !formal->attr.intent == INTENT_IN)
9956
 
+          && formal->attr.intent != INTENT_IN)
9957
 
           || CLASS_DATA (formal)->attr.allocatable))
9958
 
     {
9959
 
       if (actual->ts.type != BT_CLASS)
9960
 
Index: gcc/fortran/trans-expr.c
9961
 
===================================================================
9962
 
--- a/src/gcc/fortran/trans-expr.c      (.../tags/gcc_4_8_3_release)
9963
 
+++ b/src/gcc/fortran/trans-expr.c      (.../branches/gcc-4_8-branch)
9964
 
@@ -7096,7 +7096,7 @@
9965
 
 
9966
 
   res_desc = gfc_evaluate_now (desc, &se->pre);
9967
 
   gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
9968
 
-  se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
9969
 
+  se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
9970
 
 
9971
 
   /* Free the lhs after the function call and copy the result data to
9972
 
      the lhs descriptor.  */
9973
 
Index: gcc/fortran/decl.c
9974
 
===================================================================
9975
 
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_8_3_release)
9976
 
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_8-branch)
9977
 
@@ -1996,6 +1996,13 @@
9978
 
       if (gfc_notify_std (GFC_STD_GNU, "Old-style "
9979
 
                          "initialization at %C") == FAILURE)
9980
 
        return MATCH_ERROR;
9981
 
+      else if (gfc_current_state () == COMP_DERIVED)
9982
 
+       {
9983
 
+         gfc_error ("Invalid old style initialization for derived type "
9984
 
+                    "component at %C");
9985
 
+         m = MATCH_ERROR;
9986
 
+         goto cleanup;
9987
 
+       }
9988
 
 
9989
 
       return match_old_style_init (name);
9990
 
     }
9991
 
Index: gcc/fortran/trans-openmp.c
9992
 
===================================================================
9993
 
--- a/src/gcc/fortran/trans-openmp.c    (.../tags/gcc_4_8_3_release)
9994
 
+++ b/src/gcc/fortran/trans-openmp.c    (.../branches/gcc-4_8-branch)
9995
 
@@ -115,6 +115,16 @@
9996
 
   if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
9997
 
     return OMP_CLAUSE_DEFAULT_SHARED;
9998
 
 
9999
 
+  /* These are either array or derived parameters, or vtables.
10000
 
+     In the former cases, the OpenMP standard doesn't consider them to be
10001
 
+     variables at all (they can't be redefined), but they can nevertheless appear
10002
 
+     in parallel/task regions and for default(none) purposes treat them as shared.
10003
 
+     For vtables likely the same handling is desirable.  */
10004
 
+  if (TREE_CODE (decl) == VAR_DECL
10005
 
+      && TREE_READONLY (decl)
10006
 
+      && TREE_STATIC (decl))
10007
 
+    return OMP_CLAUSE_DEFAULT_SHARED;
10008
 
+
10009
 
   return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
10010
 
 }
10011
 
 
10012
 
@@ -1217,6 +1227,18 @@
10013
 
     }
10014
 
 
10015
 
   lhsaddr = save_expr (lhsaddr);
10016
 
+  if (TREE_CODE (lhsaddr) != SAVE_EXPR
10017
 
+      && (TREE_CODE (lhsaddr) != ADDR_EXPR
10018
 
+         || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
10019
 
+    {
10020
 
+      /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
10021
 
+        it even after unsharing function body.  */
10022
 
+      tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
10023
 
+      DECL_CONTEXT (var) = current_function_decl;
10024
 
+      lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
10025
 
+                       NULL_TREE, NULL_TREE);
10026
 
+    }
10027
 
+
10028
 
   rhs = gfc_evaluate_now (rse.expr, &block);
10029
 
 
10030
 
   if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
10031
 
Index: gcc/fortran/ChangeLog
10032
 
===================================================================
10033
 
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
10034
 
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
10035
 
@@ -1,3 +1,72 @@
10036
 
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
10037
 
+
10038
 
+       Backported from mainline
10039
 
+       2014-11-24  Jakub Jelinek  <jakub@redhat.com>
10040
 
+
10041
 
+       PR fortran/63938
10042
 
+       * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
10043
 
+       simple enough for goa_lhs_expr_p.
10044
 
+
10045
 
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
10046
 
+
10047
 
+       PR fortran/59488
10048
 
+       * trans-openmp.c (gfc_omp_predetermined_sharing): Return
10049
 
+       OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
10050
 
+
10051
 
+2014-09-03  Marek Polacek  <polacek@redhat.com>
10052
 
+
10053
 
+       Backport from trunk
10054
 
+       PR fortran/62270
10055
 
+       * interface.c (compare_parameter): Fix condition.
10056
 
+
10057
 
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
10058
 
+
10059
 
+       Backport from trunk
10060
 
+       PR fortran/62214
10061
 
+       * gfortran.dg/array_assignment_5.f90:  New test.
10062
 
+
10063
 
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
10064
 
+
10065
 
+       Backport from trunk
10066
 
+       PR fortran/61999
10067
 
+       * simplify.c (gfc_simplify_dot_product): Convert types of
10068
 
+       vectors before calculating the result.
10069
 
+
10070
 
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
10071
 
+
10072
 
+       Backport from trunk.
10073
 
+       PR fortran/61780
10074
 
+       * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
10075
 
+       that elements are skipped. This then correctly aligns 'reverse'
10076
 
+       with the scalarizer loops.
10077
 
+
10078
 
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
10079
 
+
10080
 
+       PR fortran/61459
10081
 
+       PR fortran/58883
10082
 
+       * trans-expr.c (fcncall_realloc_result): Use the natural type
10083
 
+       for the address expression of 'res_desc'.
10084
 
+
10085
 
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
10086
 
+           Fritz Reese  <Reese-Fritz@zai.com>
10087
 
+
10088
 
+       * decl.c (variable_decl): Reject old style initialization
10089
 
+       for derived type components.
10090
 
+
10091
 
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
10092
 
+
10093
 
+       Backport from trunk.
10094
 
+       PR fortran/45187
10095
 
+       * trans-decl.c (gfc_create_module_variable): Don't create
10096
 
+       Cray-pointee decls twice.
10097
 
+
10098
 
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
10099
 
+
10100
 
+       Backport from mainline
10101
 
+       PR libfortran/61310
10102
 
+       * intrinsics.texi (CTIME): Remove mention of locale-dependent
10103
 
+       behavior.
10104
 
+
10105
 
 2014-05-22  Release Manager
10106
 
 
10107
 
        * GCC 4.8.3 released.
10108
 
Index: gcc/fortran/frontend-passes.c
10109
 
===================================================================
10110
 
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
10111
 
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
10112
 
@@ -874,6 +874,10 @@
10113
 
            return true;
10114
 
          break;
10115
 
 
10116
 
+       case INTRINSIC_CONCAT:
10117
 
+         /* Do not do string concatenations.  */
10118
 
+         break;
10119
 
+
10120
 
        default:
10121
 
          /* Binary operators.  */
10122
 
          if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
10123
 
Index: gcc/fortran/trans-decl.c
10124
 
===================================================================
10125
 
--- a/src/gcc/fortran/trans-decl.c      (.../tags/gcc_4_8_3_release)
10126
 
+++ b/src/gcc/fortran/trans-decl.c      (.../branches/gcc-4_8-branch)
10127
 
@@ -4084,8 +4084,8 @@
10128
 
     }
10129
 
 
10130
 
   /* Don't generate variables from other modules. Variables from
10131
 
-     COMMONs will already have been generated.  */
10132
 
-  if (sym->attr.use_assoc || sym->attr.in_common)
10133
 
+     COMMONs and Cray pointees will already have been generated.  */
10134
 
+  if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
10135
 
     return;
10136
 
 
10137
 
   /* Equivalenced variables arrive here after creation.  */
10138
 
Index: gcc/fortran/dependency.c
10139
 
===================================================================
10140
 
--- a/src/gcc/fortran/dependency.c      (.../tags/gcc_4_8_3_release)
10141
 
+++ b/src/gcc/fortran/dependency.c      (.../branches/gcc-4_8-branch)
10142
 
@@ -1779,6 +1779,7 @@
10143
 
 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
10144
 
 {
10145
 
   int n;
10146
 
+  int m;
10147
 
   gfc_dependency fin_dep;
10148
 
   gfc_dependency this_dep;
10149
 
 
10150
 
@@ -1828,6 +1829,8 @@
10151
 
              break;
10152
 
            }
10153
 
 
10154
 
+         /* Index for the reverse array.  */
10155
 
+         m = -1;
10156
 
          for (n=0; n < lref->u.ar.dimen; n++)
10157
 
            {
10158
 
              /* Assume dependency when either of array reference is vector
10159
 
@@ -1862,31 +1865,37 @@
10160
 
                 The ability to reverse or not is set by previous conditions
10161
 
                 in this dimension.  If reversal is not activated, the
10162
 
                 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP.  */
10163
 
+
10164
 
+             /* Get the indexing right for the scalarizing loop. If this
10165
 
+                is an element, there is no corresponding loop.  */
10166
 
+             if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
10167
 
+               m++;
10168
 
+
10169
 
              if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
10170
 
                    && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
10171
 
                {
10172
 
                  /* Set reverse if backward dependence and not inhibited.  */
10173
 
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
10174
 
-                   reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
10175
 
-                                GFC_REVERSE_SET : reverse[n];
10176
 
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
10177
 
+                   reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
10178
 
+                                GFC_REVERSE_SET : reverse[m];
10179
 
 
10180
 
                  /* Set forward if forward dependence and not inhibited.  */
10181
 
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
10182
 
-                   reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
10183
 
-                                GFC_FORWARD_SET : reverse[n];
10184
 
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
10185
 
+                   reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
10186
 
+                                GFC_FORWARD_SET : reverse[m];
10187
 
 
10188
 
                  /* Flag up overlap if dependence not compatible with
10189
 
                     the overall state of the expression.  */
10190
 
-                 if (reverse && reverse[n] == GFC_REVERSE_SET
10191
 
+                 if (reverse && reverse[m] == GFC_REVERSE_SET
10192
 
                        && this_dep == GFC_DEP_FORWARD)
10193
 
                    {
10194
 
-                     reverse[n] = GFC_INHIBIT_REVERSE;
10195
 
+                     reverse[m] = GFC_INHIBIT_REVERSE;
10196
 
                      this_dep = GFC_DEP_OVERLAP;
10197
 
                    }
10198
 
-                 else if (reverse && reverse[n] == GFC_FORWARD_SET
10199
 
+                 else if (reverse && reverse[m] == GFC_FORWARD_SET
10200
 
                        && this_dep == GFC_DEP_BACKWARD)
10201
 
                    {
10202
 
-                     reverse[n] = GFC_INHIBIT_REVERSE;
10203
 
+                     reverse[m] = GFC_INHIBIT_REVERSE;
10204
 
                      this_dep = GFC_DEP_OVERLAP;
10205
 
                    }
10206
 
 
10207
 
@@ -1893,7 +1902,7 @@
10208
 
                  /* If no intention of reversing or reversing is explicitly
10209
 
                     inhibited, convert backward dependence to overlap.  */
10210
 
                  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
10211
 
-                     || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
10212
 
+                     || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
10213
 
                    this_dep = GFC_DEP_OVERLAP;
10214
 
                }
10215
 
 
10216
 
Index: gcc/fortran/simplify.c
10217
 
===================================================================
10218
 
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_8_3_release)
10219
 
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_8-branch)
10220
 
@@ -1877,6 +1877,9 @@
10221
 
 gfc_expr*
10222
 
 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
10223
 
 {
10224
 
+
10225
 
+  gfc_expr temp;
10226
 
+
10227
 
   if (!is_constant_array_expr (vector_a)
10228
 
       || !is_constant_array_expr (vector_b))
10229
 
     return NULL;
10230
 
@@ -1883,8 +1886,14 @@
10231
 
 
10232
 
   gcc_assert (vector_a->rank == 1);
10233
 
   gcc_assert (vector_b->rank == 1);
10234
 
-  gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
10235
 
 
10236
 
+  temp.expr_type = EXPR_OP;
10237
 
+  gfc_clear_ts (&temp.ts);
10238
 
+  temp.value.op.op = INTRINSIC_NONE;
10239
 
+  temp.value.op.op1 = vector_a;
10240
 
+  temp.value.op.op2 = vector_b;
10241
 
+  gfc_type_convert_binary (&temp, 1);
10242
 
+
10243
 
   return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
10244
 
 }
10245
 
 
10246
 
Index: gcc/configure.ac
10247
 
===================================================================
10248
 
--- a/src/gcc/configure.ac      (.../tags/gcc_4_8_3_release)
10249
 
+++ b/src/gcc/configure.ac      (.../branches/gcc-4_8-branch)
10250
 
@@ -3443,6 +3443,32 @@
10251
 
 AC_MSG_RESULT($gcc_cv_lto_plugin)
10252
 
 
10253
 
 case "$target" in
10254
 
+
10255
 
+  aarch64*-*-*)
10256
 
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
10257
 
+    AC_ARG_ENABLE(fix-cortex-a53-835769,
10258
 
+    [
10259
 
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
10260
 
+        [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
10261
 
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
10262
 
+        [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
10263
 
+    ],
10264
 
+      [
10265
 
+        case $enableval in
10266
 
+          yes)
10267
 
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
10268
 
+            ;;
10269
 
+          no)
10270
 
+            ;;
10271
 
+          *)
10272
 
+            AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
10273
 
+  Valid choices are 'yes' and 'no'.])
10274
 
+            ;;
10275
 
+
10276
 
+        esac
10277
 
+      ],
10278
 
+    [])
10279
 
+  ;;
10280
 
   # All TARGET_ABI_OSF targets.
10281
 
   alpha*-*-linux* | alpha*-*-*bsd*)
10282
 
     gcc_GAS_CHECK_FEATURE([explicit relocation support],
10283
 
@@ -5185,8 +5211,31 @@
10284
 
 AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
10285
 
 if test "x${CLOOGLIBS}" != "x" ; then 
10286
 
    AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
10287
 
+
10288
 
+  # Check whether isl_schedule_constraints_compute_schedule is available;
10289
 
+  # it's new in ISL-0.13.
10290
 
+  saved_CFLAGS="$CFLAGS"
10291
 
+  CFLAGS="$CFLAGS $ISLINC"
10292
 
+  saved_LIBS="$LIBS"
10293
 
+  LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
10294
 
+
10295
 
+  AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
10296
 
+  AC_TRY_LINK([#include <isl/schedule.h>],
10297
 
+              [isl_schedule_constraints_compute_schedule (NULL);],
10298
 
+              [ac_has_isl_schedule_constraints_compute_schedule=yes],
10299
 
+              [ac_has_isl_schedule_constraints_compute_schedule=no])
10300
 
+  AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
10301
 
+
10302
 
+  LIBS="$saved_LIBS"
10303
 
+  CFLAGS="$saved_CFLAGS"
10304
 
+
10305
 
+  if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
10306
 
+     AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
10307
 
+               [Define if isl_schedule_constraints_compute_schedule exists.])
10308
 
+  fi
10309
 
 fi
10310
 
 
10311
 
+
10312
 
 # Check for plugin support
10313
 
 AC_ARG_ENABLE(plugin,
10314
 
 [AS_HELP_STRING([--enable-plugin], [enable plugin support])],
10315
 
Index: gcc/function.c
10316
 
===================================================================
10317
 
--- a/src/gcc/function.c        (.../tags/gcc_4_8_3_release)
10318
 
+++ b/src/gcc/function.c        (.../branches/gcc-4_8-branch)
10319
 
@@ -1354,9 +1354,13 @@
10320
 
 #define STACK_POINTER_OFFSET   0
10321
 
 #endif
10322
 
 
10323
 
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
10324
 
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
10325
 
+#endif
10326
 
+
10327
 
 /* If not defined, pick an appropriate default for the offset of dynamically
10328
 
    allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
10329
 
-   REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
10330
 
+   INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
10331
 
 
10332
 
 #ifndef STACK_DYNAMIC_OFFSET
10333
 
 
10334
 
@@ -1368,12 +1372,12 @@
10335
 
    `crtl->outgoing_args_size'.  Nevertheless, we must allow
10336
 
    for it when allocating stack dynamic objects.  */
10337
 
 
10338
 
-#if defined(REG_PARM_STACK_SPACE)
10339
 
+#ifdef INCOMING_REG_PARM_STACK_SPACE
10340
 
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
10341
 
 ((ACCUMULATE_OUTGOING_ARGS                                                   \
10342
 
   ? (crtl->outgoing_args_size                                \
10343
 
      + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
10344
 
-                                              : REG_PARM_STACK_SPACE (FNDECL))) \
10345
 
+                                              : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
10346
 
   : 0) + (STACK_POINTER_OFFSET))
10347
 
 #else
10348
 
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
10349
 
@@ -2211,8 +2215,9 @@
10350
 
 #endif
10351
 
   all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
10352
 
 
10353
 
-#ifdef REG_PARM_STACK_SPACE
10354
 
-  all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
10355
 
+#ifdef INCOMING_REG_PARM_STACK_SPACE
10356
 
+  all->reg_parm_stack_space
10357
 
+    = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
10358
 
 #endif
10359
 
 }
10360
 
 
10361
 
@@ -4518,6 +4523,7 @@
10362
 
       /* ??? This could be set on a per-function basis by the front-end
10363
 
          but is this worth the hassle?  */
10364
 
       cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
10365
 
+      cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
10366
 
     }
10367
 
 }
10368
 
 
10369
 
Index: gcc/tree-vectorizer.h
10370
 
===================================================================
10371
 
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
10372
 
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
10373
 
@@ -324,9 +324,9 @@
10374
 
 #define LOOP_VINFO_OPERANDS_SWAPPED(L)     (L)->operands_swapped
10375
 
 
10376
 
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
10377
 
-(L)->may_misalign_stmts.length () > 0
10378
 
+((L)->may_misalign_stmts.length () > 0)
10379
 
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)     \
10380
 
-(L)->may_alias_ddrs.length () > 0
10381
 
+((L)->may_alias_ddrs.length () > 0)
10382
 
 
10383
 
 #define NITERS_KNOWN_P(n)                     \
10384
 
 (host_integerp ((n),0)                        \
10385
 
@@ -931,7 +931,8 @@
10386
 
 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
10387
 
 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
10388
 
                                      tree *, gimple_stmt_iterator *,
10389
 
-                                     gimple *, bool, bool *);
10390
 
+                                     gimple *, bool, bool *,
10391
 
+                                     tree = NULL_TREE);
10392
 
 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
10393
 
 extern tree vect_create_destination_var (tree, tree);
10394
 
 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
10395
 
@@ -949,7 +950,8 @@
10396
 
 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
10397
 
 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
10398
 
 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
10399
 
-                                                  tree, struct loop *);
10400
 
+                                                 tree, struct loop *,
10401
 
+                                                 tree = NULL_TREE);
10402
 
 
10403
 
 /* In tree-vect-loop.c.  */
10404
 
 /* FORNOW: Used in tree-parloops.c.  */
10405
 
Index: gcc/stor-layout.c
10406
 
===================================================================
10407
 
--- a/src/gcc/stor-layout.c     (.../tags/gcc_4_8_3_release)
10408
 
+++ b/src/gcc/stor-layout.c     (.../branches/gcc-4_8-branch)
10409
 
@@ -234,12 +234,7 @@
10410
 
       param_type = TREE_TYPE (ref);
10411
 
       param_decl
10412
 
        = build_decl (input_location, PARM_DECL, param_name, param_type);
10413
 
-      if (targetm.calls.promote_prototypes (NULL_TREE)
10414
 
-         && INTEGRAL_TYPE_P (param_type)
10415
 
-         && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
10416
 
-       DECL_ARG_TYPE (param_decl) = integer_type_node;
10417
 
-      else
10418
 
-       DECL_ARG_TYPE (param_decl) = param_type;
10419
 
+      DECL_ARG_TYPE (param_decl) = param_type;
10420
 
       DECL_ARTIFICIAL (param_decl) = 1;
10421
 
       TREE_READONLY (param_decl) = 1;
10422
 
 
10423
 
Index: gcc/tree-vect-loop.c
10424
 
===================================================================
10425
 
--- a/src/gcc/tree-vect-loop.c  (.../tags/gcc_4_8_3_release)
10426
 
+++ b/src/gcc/tree-vect-loop.c  (.../branches/gcc-4_8-branch)
10427
 
@@ -2205,7 +2205,8 @@
10428
 
         }
10429
 
 
10430
 
       def1 = SSA_NAME_DEF_STMT (op1);
10431
 
-      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
10432
 
+      if (gimple_bb (def1)
10433
 
+         && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
10434
 
           && loop->inner
10435
 
           && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
10436
 
           && is_gimple_assign (def1))
10437
 
Index: gcc/tree-data-ref.c
10438
 
===================================================================
10439
 
--- a/src/gcc/tree-data-ref.c   (.../tags/gcc_4_8_3_release)
10440
 
+++ b/src/gcc/tree-data-ref.c   (.../branches/gcc-4_8-branch)
10441
 
@@ -919,7 +919,6 @@
10442
 
          ref = fold_build2_loc (EXPR_LOCATION (ref),
10443
 
                                 MEM_REF, TREE_TYPE (ref),
10444
 
                                 base, memoff);
10445
 
-         DR_UNCONSTRAINED_BASE (dr) = true;
10446
 
          access_fns.safe_push (access_fn);
10447
 
        }
10448
 
     }
10449
 
@@ -1326,14 +1325,20 @@
10450
 
        return false;
10451
 
     }
10452
 
 
10453
 
-  /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
10454
 
-     the size of the base-object.  So we cannot do any offset/overlap
10455
 
-     based analysis but have to rely on points-to information only.  */
10456
 
+  /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
10457
 
+     do not know the size of the base-object.  So we cannot do any
10458
 
+     offset/overlap based analysis but have to rely on points-to
10459
 
+     information only.  */
10460
 
   if (TREE_CODE (addr_a) == MEM_REF
10461
 
-      && DR_UNCONSTRAINED_BASE (a))
10462
 
+      && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
10463
 
     {
10464
 
-      if (TREE_CODE (addr_b) == MEM_REF
10465
 
-         && DR_UNCONSTRAINED_BASE (b))
10466
 
+      /* For true dependences we can apply TBAA.  */
10467
 
+      if (flag_strict_aliasing
10468
 
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
10469
 
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
10470
 
+                                    get_alias_set (DR_REF (b))))
10471
 
+       return false;
10472
 
+      if (TREE_CODE (addr_b) == MEM_REF)
10473
 
        return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10474
 
                                       TREE_OPERAND (addr_b, 0));
10475
 
       else
10476
 
@@ -1341,9 +1346,21 @@
10477
 
                                       build_fold_addr_expr (addr_b));
10478
 
     }
10479
 
   else if (TREE_CODE (addr_b) == MEM_REF
10480
 
-          && DR_UNCONSTRAINED_BASE (b))
10481
 
-    return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10482
 
-                                  TREE_OPERAND (addr_b, 0));
10483
 
+          && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
10484
 
+    {
10485
 
+      /* For true dependences we can apply TBAA.  */
10486
 
+      if (flag_strict_aliasing
10487
 
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
10488
 
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
10489
 
+                                    get_alias_set (DR_REF (b))))
10490
 
+       return false;
10491
 
+      if (TREE_CODE (addr_a) == MEM_REF)
10492
 
+       return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10493
 
+                                      TREE_OPERAND (addr_b, 0));
10494
 
+      else
10495
 
+       return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10496
 
+                                      TREE_OPERAND (addr_b, 0));
10497
 
+    }
10498
 
 
10499
 
   /* Otherwise DR_BASE_OBJECT is an access that covers the whole object
10500
 
      that is being subsetted in the loop nest.  */
10501
 
Index: gcc/tree-data-ref.h
10502
 
===================================================================
10503
 
--- a/src/gcc/tree-data-ref.h   (.../tags/gcc_4_8_3_release)
10504
 
+++ b/src/gcc/tree-data-ref.h   (.../branches/gcc-4_8-branch)
10505
 
@@ -81,10 +81,6 @@
10506
 
 
10507
 
   /* A list of chrecs.  Access functions of the indices.  */
10508
 
   vec<tree> access_fns;
10509
 
-
10510
 
-  /* Whether BASE_OBJECT is an access representing the whole object
10511
 
-     or whether the access could not be constrained.  */
10512
 
-  bool unconstrained_base;
10513
 
 };
10514
 
 
10515
 
 struct dr_alias
10516
 
@@ -195,7 +191,6 @@
10517
 
 #define DR_STMT(DR)                (DR)->stmt
10518
 
 #define DR_REF(DR)                 (DR)->ref
10519
 
 #define DR_BASE_OBJECT(DR)         (DR)->indices.base_object
10520
 
-#define DR_UNCONSTRAINED_BASE(DR)  (DR)->indices.unconstrained_base
10521
 
 #define DR_ACCESS_FNS(DR)         (DR)->indices.access_fns
10522
 
 #define DR_ACCESS_FN(DR, I)        DR_ACCESS_FNS (DR)[I]
10523
 
 #define DR_NUM_DIMENSIONS(DR)      DR_ACCESS_FNS (DR).length ()
10524
 
Index: gcc/tree-vect-data-refs.c
10525
 
===================================================================
10526
 
--- a/src/gcc/tree-vect-data-refs.c     (.../tags/gcc_4_8_3_release)
10527
 
+++ b/src/gcc/tree-vect-data-refs.c     (.../branches/gcc-4_8-branch)
10528
 
@@ -3553,6 +3553,9 @@
10529
 
            is as follows:
10530
 
            if LOOP=i_loop:     &in             (relative to i_loop)
10531
 
            if LOOP=j_loop:     &in+i*2B        (relative to j_loop)
10532
 
+   BYTE_OFFSET: Optional, defaulted to NULL.  If supplied, it is added to the
10533
 
+           initial address.  Unlike OFFSET, which is number of elements to
10534
 
+           be added, BYTE_OFFSET is measured in bytes.
10535
 
 
10536
 
    Output:
10537
 
    1. Return an SSA_NAME whose value is the address of the memory location of
10538
 
@@ -3566,7 +3569,8 @@
10539
 
 vect_create_addr_base_for_vector_ref (gimple stmt,
10540
 
                                      gimple_seq *new_stmt_list,
10541
 
                                      tree offset,
10542
 
-                                     struct loop *loop)
10543
 
+                                     struct loop *loop,
10544
 
+                                     tree byte_offset)
10545
 
 {
10546
 
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10547
 
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
10548
 
@@ -3628,7 +3632,17 @@
10549
 
       base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10550
 
       gimple_seq_add_seq (new_stmt_list, seq);
10551
 
     }
10552
 
+  if (byte_offset)
10553
 
+    {
10554
 
+      tree tmp = create_tmp_var (sizetype, "offset");
10555
 
 
10556
 
+      byte_offset = fold_convert (sizetype, byte_offset);
10557
 
+      base_offset = fold_build2 (PLUS_EXPR, sizetype,
10558
 
+                                base_offset, byte_offset);
10559
 
+      base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10560
 
+      gimple_seq_add_seq (new_stmt_list, seq);
10561
 
+    }
10562
 
+
10563
 
   /* base + base_offset */
10564
 
   if (loop_vinfo)
10565
 
     addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
10566
 
@@ -3692,6 +3706,10 @@
10567
 
    5. BSI: location where the new stmts are to be placed if there is no loop
10568
 
    6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
10569
 
         pointing to the initial address.
10570
 
+   7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
10571
 
+       to the initial address accessed by the data-ref in STMT.  This is
10572
 
+       similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
10573
 
+       in bytes.
10574
 
 
10575
 
    Output:
10576
 
    1. Declare a new ptr to vector_type, and have it point to the base of the
10577
 
@@ -3705,6 +3723,8 @@
10578
 
          initial_address = &a[init];
10579
 
       if OFFSET is supplied:
10580
 
          initial_address = &a[init + OFFSET];
10581
 
+      if BYTE_OFFSET is supplied:
10582
 
+        initial_address = &a[init] + BYTE_OFFSET;
10583
 
 
10584
 
       Return the initial_address in INITIAL_ADDRESS.
10585
 
 
10586
 
@@ -3722,7 +3742,7 @@
10587
 
 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
10588
 
                          tree offset, tree *initial_address,
10589
 
                          gimple_stmt_iterator *gsi, gimple *ptr_incr,
10590
 
-                         bool only_init, bool *inv_p)
10591
 
+                         bool only_init, bool *inv_p, tree byte_offset)
10592
 
 {
10593
 
   const char *base_name;
10594
 
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10595
 
@@ -3881,10 +3901,10 @@
10596
 
   /* (2) Calculate the initial address of the aggregate-pointer, and set
10597
 
      the aggregate-pointer to point to it before the loop.  */
10598
 
 
10599
 
-  /* Create: (&(base[init_val+offset]) in the loop preheader.  */
10600
 
+  /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader.  */
10601
 
 
10602
 
   new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
10603
 
-                                                   offset, loop);
10604
 
+                                                  offset, loop, byte_offset);
10605
 
   if (new_stmt_list)
10606
 
     {
10607
 
       if (pe)
10608
 
Index: gcc/emit-rtl.c
10609
 
===================================================================
10610
 
--- a/src/gcc/emit-rtl.c        (.../tags/gcc_4_8_3_release)
10611
 
+++ b/src/gcc/emit-rtl.c        (.../branches/gcc-4_8-branch)
10612
 
@@ -263,7 +263,7 @@
10613
 
 
10614
 
 /* Return true if the given memory attributes are equal.  */
10615
 
 
10616
 
-static bool
10617
 
+bool
10618
 
 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
10619
 
 {
10620
 
   return (p->alias == q->alias
10621
 
Index: gcc/gimple-fold.c
10622
 
===================================================================
10623
 
--- a/src/gcc/gimple-fold.c     (.../tags/gcc_4_8_3_release)
10624
 
+++ b/src/gcc/gimple-fold.c     (.../branches/gcc-4_8-branch)
10625
 
@@ -2955,8 +2955,8 @@
10626
 
      result.  */
10627
 
   if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
10628
 
       /* VIEW_CONVERT_EXPR is defined only for matching sizes.  */
10629
 
-      && operand_equal_p (TYPE_SIZE (type),
10630
 
-                         TYPE_SIZE (TREE_TYPE (ctor)), 0))
10631
 
+      && !compare_tree_int (TYPE_SIZE (type), size)
10632
 
+      && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
10633
 
     {
10634
 
       ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
10635
 
       ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
10636
 
Index: gcc/emit-rtl.h
10637
 
===================================================================
10638
 
--- a/src/gcc/emit-rtl.h        (.../tags/gcc_4_8_3_release)
10639
 
+++ b/src/gcc/emit-rtl.h        (.../branches/gcc-4_8-branch)
10640
 
@@ -20,6 +20,9 @@
10641
 
 #ifndef GCC_EMIT_RTL_H
10642
 
 #define GCC_EMIT_RTL_H
10643
 
 
10644
 
+/* Return whether two MEM_ATTRs are equal.  */
10645
 
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
10646
 
+
10647
 
 /* Set the alias set of MEM to SET.  */
10648
 
 extern void set_mem_alias_set (rtx, alias_set_type);
10649
 
 
10650
 
Index: gcc/tree-cfgcleanup.c
10651
 
===================================================================
10652
 
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
10653
 
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
10654
 
@@ -498,7 +498,20 @@
10655
 
 
10656
 
   /* First split basic block if stmt is not last.  */
10657
 
   if (stmt != gsi_stmt (gsi_last_bb (bb)))
10658
 
-    split_block (bb, stmt);
10659
 
+    {
10660
 
+      if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
10661
 
+       {
10662
 
+         /* Don't split if there are only debug stmts
10663
 
+            after stmt, that can result in -fcompare-debug
10664
 
+            failures.  Remove the debug stmts instead,
10665
 
+            they should be all unreachable anyway.  */
10666
 
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
10667
 
+         for (gsi_next (&gsi); !gsi_end_p (gsi); )
10668
 
+           gsi_remove (&gsi, true);
10669
 
+       }
10670
 
+      else
10671
 
+       split_block (bb, stmt);
10672
 
+    }
10673
 
 
10674
 
   changed |= remove_fallthru_edge (bb->succs);
10675
 
 
10676
 
Index: gcc/tree-sra.c
10677
 
===================================================================
10678
 
--- a/src/gcc/tree-sra.c        (.../tags/gcc_4_8_3_release)
10679
 
+++ b/src/gcc/tree-sra.c        (.../branches/gcc-4_8-branch)
10680
 
@@ -1030,6 +1030,11 @@
10681
 
                               "component.");
10682
 
       return NULL;
10683
 
     }
10684
 
+  if (TREE_THIS_VOLATILE (expr))
10685
 
+    {
10686
 
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
10687
 
+      return NULL;
10688
 
+    }
10689
 
 
10690
 
   switch (TREE_CODE (expr))
10691
 
     {
10692
 
Index: gcc/tree-ssa-forwprop.c
10693
 
===================================================================
10694
 
--- a/src/gcc/tree-ssa-forwprop.c       (.../tags/gcc_4_8_3_release)
10695
 
+++ b/src/gcc/tree-ssa-forwprop.c       (.../branches/gcc-4_8-branch)
10696
 
@@ -1438,7 +1438,8 @@
10697
 
          use_operand_p use_p;
10698
 
 
10699
 
          if (!host_integerp (val2, 0)
10700
 
-             || !host_integerp (len2, 1))
10701
 
+             || !host_integerp (len2, 1)
10702
 
+             || compare_tree_int (len2, 1024) == 1)
10703
 
            break;
10704
 
          if (is_gimple_call (stmt1))
10705
 
            {
10706
 
@@ -1504,7 +1505,8 @@
10707
 
             is not constant, or is bigger than memcpy length, bail out.  */
10708
 
          if (diff == NULL
10709
 
              || !host_integerp (diff, 1)
10710
 
-             || tree_int_cst_lt (len1, diff))
10711
 
+             || tree_int_cst_lt (len1, diff)
10712
 
+             || compare_tree_int (diff, 1024) == 1)
10713
 
            break;
10714
 
 
10715
 
          /* Use maximum of difference plus memset length and memcpy length
10716
 
Index: gcc/graphite-clast-to-gimple.c
10717
 
===================================================================
10718
 
--- a/src/gcc/graphite-clast-to-gimple.c        (.../tags/gcc_4_8_3_release)
10719
 
+++ b/src/gcc/graphite-clast-to-gimple.c        (.../branches/gcc-4_8-branch)
10720
 
@@ -30,7 +30,12 @@
10721
 
 #include <isl/aff.h>
10722
 
 #include <cloog/cloog.h>
10723
 
 #include <cloog/isl/domain.h>
10724
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10725
 
+#include <isl/deprecated/int.h>
10726
 
+#include <isl/lp.h>
10727
 
+#include <isl/deprecated/ilp_int.h>
10728
 
 #endif
10729
 
+#endif
10730
 
 
10731
 
 #include "system.h"
10732
 
 #include "coretypes.h"
10733
 
Index: gcc/common.opt
10734
 
===================================================================
10735
 
--- a/src/gcc/common.opt        (.../tags/gcc_4_8_3_release)
10736
 
+++ b/src/gcc/common.opt        (.../branches/gcc-4_8-branch)
10737
 
@@ -1226,6 +1226,10 @@
10738
 
 Common Report Var(flag_tm)
10739
 
 Enable support for GNU transactional memory
10740
 
 
10741
 
+fgnu-unique
10742
 
+Common Report Var(flag_gnu_unique) Init(1)
10743
 
+Use STB_GNU_UNIQUE if supported by the assembler
10744
 
+
10745
 
 floop-flatten
10746
 
 Common Ignore
10747
 
 Does nothing. Preserved for backward compatibility.
10748
 
Index: gcc/graphite-optimize-isl.c
10749
 
===================================================================
10750
 
--- a/src/gcc/graphite-optimize-isl.c   (.../tags/gcc_4_8_3_release)
10751
 
+++ b/src/gcc/graphite-optimize-isl.c   (.../branches/gcc-4_8-branch)
10752
 
@@ -28,7 +28,11 @@
10753
 
 #include <isl/band.h>
10754
 
 #include <isl/aff.h>
10755
 
 #include <isl/options.h>
10756
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10757
 
+#include <isl/deprecated/int.h>
10758
 
+#include <isl/deprecated/aff_int.h>
10759
 
 #endif
10760
 
+#endif
10761
 
 
10762
 
 #include "system.h"
10763
 
 #include "coretypes.h"
10764
 
@@ -365,7 +369,11 @@
10765
 
        {
10766
 
          for (i = ScheduleDimensions - 1 ;  i >= 0 ; i--)
10767
 
            {
10768
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10769
 
+             if (isl_band_member_is_coincident (Band, i))
10770
 
+#else
10771
 
              if (isl_band_member_is_zero_distance(Band, i))
10772
 
+#endif
10773
 
                {
10774
 
                  isl_map *TileMap;
10775
 
                  isl_union_map *TileUMap;
10776
 
Index: gcc/tree-vect-patterns.c
10777
 
===================================================================
10778
 
--- a/src/gcc/tree-vect-patterns.c      (.../tags/gcc_4_8_3_release)
10779
 
+++ b/src/gcc/tree-vect-patterns.c      (.../branches/gcc-4_8-branch)
10780
 
@@ -395,7 +395,7 @@
10781
 
           || !promotion)
10782
 
         return NULL;
10783
 
       oprnd00 = gimple_assign_rhs1 (def_stmt);
10784
 
-      if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
10785
 
+      if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
10786
 
                                 &promotion)
10787
 
           || !promotion)
10788
 
         return NULL;
10789
 
Index: gcc/sched-deps.c
10790
 
===================================================================
10791
 
--- a/src/gcc/sched-deps.c      (.../tags/gcc_4_8_3_release)
10792
 
+++ b/src/gcc/sched-deps.c      (.../branches/gcc-4_8-branch)
10793
 
@@ -2744,7 +2744,8 @@
10794
 
           Consider for instance a volatile asm that changes the fpu rounding
10795
 
           mode.  An insn should not be moved across this even if it only uses
10796
 
           pseudo-regs because it might give an incorrectly rounded result.  */
10797
 
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10798
 
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10799
 
+           && !DEBUG_INSN_P (insn))
10800
 
          reg_pending_barrier = TRUE_BARRIER;
10801
 
 
10802
 
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
10803
 
Index: gcc/graphite-poly.c
10804
 
===================================================================
10805
 
--- a/src/gcc/graphite-poly.c   (.../tags/gcc_4_8_3_release)
10806
 
+++ b/src/gcc/graphite-poly.c   (.../branches/gcc-4_8-branch)
10807
 
@@ -30,7 +30,11 @@
10808
 
 #include <isl/aff.h>
10809
 
 #include <cloog/cloog.h>
10810
 
 #include <cloog/isl/domain.h>
10811
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10812
 
+#include <isl/deprecated/int.h>
10813
 
+#include <isl/deprecated/ilp_int.h>
10814
 
 #endif
10815
 
+#endif
10816
 
 
10817
 
 #include "system.h"
10818
 
 #include "coretypes.h"
10819
 
Index: gcc/tree-vect-stmts.c
10820
 
===================================================================
10821
 
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
10822
 
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
10823
 
@@ -4319,6 +4319,7 @@
10824
 
   int i, j, group_size;
10825
 
   tree msq = NULL_TREE, lsq;
10826
 
   tree offset = NULL_TREE;
10827
 
+  tree byte_offset = NULL_TREE;
10828
 
   tree realignment_token = NULL_TREE;
10829
 
   gimple phi = NULL;
10830
 
   vec<tree> dr_chain = vNULL;
10831
 
@@ -4934,7 +4935,8 @@
10832
 
       if (alignment_support_scheme == dr_explicit_realign_optimized)
10833
 
        {
10834
 
          phi = SSA_NAME_DEF_STMT (msq);
10835
 
-         offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
10836
 
+         byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
10837
 
+                                   size_one_node);
10838
 
        }
10839
 
     }
10840
 
   else
10841
 
@@ -4955,7 +4957,8 @@
10842
 
       if (j == 0)
10843
 
         dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
10844
 
                                                offset, &dummy, gsi,
10845
 
-                                               &ptr_incr, false, &inv_p);
10846
 
+                                               &ptr_incr, false, &inv_p,
10847
 
+                                               byte_offset);
10848
 
       else
10849
 
         dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
10850
 
                                       TYPE_SIZE_UNIT (aggr_type));
10851
 
Index: gcc/graphite-sese-to-poly.c
10852
 
===================================================================
10853
 
--- a/src/gcc/graphite-sese-to-poly.c   (.../tags/gcc_4_8_3_release)
10854
 
+++ b/src/gcc/graphite-sese-to-poly.c   (.../branches/gcc-4_8-branch)
10855
 
@@ -29,7 +29,12 @@
10856
 
 #include <cloog/cloog.h>
10857
 
 #include <cloog/cloog.h>
10858
 
 #include <cloog/isl/domain.h>
10859
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10860
 
+#include <isl/deprecated/int.h>
10861
 
+#include <isl/deprecated/aff_int.h>
10862
 
+#include <isl/deprecated/constraint_int.h>
10863
 
 #endif
10864
 
+#endif
10865
 
 
10866
 
 #include "system.h"
10867
 
 #include "coretypes.h"
10868
 
Index: gcc/config.gcc
10869
 
===================================================================
10870
 
--- a/src/gcc/config.gcc        (.../tags/gcc_4_8_3_release)
10871
 
+++ b/src/gcc/config.gcc        (.../branches/gcc-4_8-branch)
10872
 
@@ -2466,7 +2466,7 @@
10873
 
        ;;
10874
 
 sparc-*-rtems*)
10875
 
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
10876
 
-       tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
10877
 
+       tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
10878
 
        ;;
10879
 
 sparc-*-linux*)
10880
 
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
10881
 
@@ -2992,6 +2992,9 @@
10882
 
        *-leon[3-9]*)
10883
 
          with_cpu=leon3
10884
 
          ;;
10885
 
+       *-leon[3-9]v7*)
10886
 
+         with_cpu=leon3v7
10887
 
+         ;;
10888
 
        *)
10889
 
          with_cpu="`echo ${target} | sed 's/-.*$//'`"
10890
 
          ;;
10891
 
@@ -3630,7 +3633,7 @@
10892
 
                        case ${val} in
10893
 
                        "" | sparc | sparcv9 | sparc64 \
10894
 
                        | v7 | cypress \
10895
 
-                       | v8 | supersparc | hypersparc | leon | leon3 \
10896
 
+                       | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
10897
 
                        | sparclite | f930 | f934 | sparclite86x \
10898
 
                        | sparclet | tsc701 \
10899
 
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
10900
 
Index: gcc/ree.c
10901
 
===================================================================
10902
 
--- a/src/gcc/ree.c     (.../tags/gcc_4_8_3_release)
10903
 
+++ b/src/gcc/ree.c     (.../branches/gcc-4_8-branch)
10904
 
@@ -261,6 +261,50 @@
10905
 
 
10906
 
 static int max_insn_uid;
10907
 
 
10908
 
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN.  */
10909
 
+
10910
 
+static bool
10911
 
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
10912
 
+                             enum machine_mode old_mode, enum rtx_code code)
10913
 
+{
10914
 
+  rtx *loc = &REG_NOTES (insn);
10915
 
+  while (*loc)
10916
 
+    {
10917
 
+      enum reg_note kind = REG_NOTE_KIND (*loc);
10918
 
+      if (kind == REG_EQUAL || kind == REG_EQUIV)
10919
 
+       {
10920
 
+         rtx orig_src = XEXP (*loc, 0);
10921
 
+         /* Update equivalency constants.  Recall that RTL constants are
10922
 
+            sign-extended.  */
10923
 
+         if (GET_CODE (orig_src) == CONST_INT
10924
 
+             && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
10925
 
+           {
10926
 
+             if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
10927
 
+               /* Nothing needed.  */;
10928
 
+             else
10929
 
+               {
10930
 
+                 /* Zero-extend the negative constant by masking out the
10931
 
+                    bits outside the source mode.  */
10932
 
+                 rtx new_const_int
10933
 
+                   = gen_int_mode (INTVAL (orig_src)
10934
 
+                                   & GET_MODE_MASK (old_mode),
10935
 
+                                   new_mode);
10936
 
+                 if (!validate_change (insn, &XEXP (*loc, 0),
10937
 
+                                       new_const_int, true))
10938
 
+                   return false;
10939
 
+               }
10940
 
+             loc = &XEXP (*loc, 1);
10941
 
+           }
10942
 
+         /* Drop all other notes, they assume a wrong mode.  */
10943
 
+         else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
10944
 
+           return false;
10945
 
+       }
10946
 
+      else
10947
 
+       loc = &XEXP (*loc, 1);
10948
 
+    }
10949
 
+  return true;
10950
 
+}
10951
 
+
10952
 
 /* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
10953
 
    and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
10954
 
    this code modifies the SET rtx to a new SET rtx that extends the
10955
 
@@ -282,6 +326,7 @@
10956
 
 combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
10957
 
 {
10958
 
   rtx orig_src = SET_SRC (*orig_set);
10959
 
+  enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
10960
 
   rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
10961
 
   rtx new_set;
10962
 
 
10963
 
@@ -296,9 +341,8 @@
10964
 
        {
10965
 
          /* Zero-extend the negative constant by masking out the bits outside
10966
 
             the source mode.  */
10967
 
-         enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
10968
 
          rtx new_const_int
10969
 
-           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
10970
 
+           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
10971
 
          new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
10972
 
        }
10973
 
     }
10974
 
@@ -336,7 +380,9 @@
10975
 
 
10976
 
   /* This change is a part of a group of changes.  Hence,
10977
 
      validate_change will not try to commit the change.  */
10978
 
-  if (validate_change (curr_insn, orig_set, new_set, true))
10979
 
+  if (validate_change (curr_insn, orig_set, new_set, true)
10980
 
+      && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
10981
 
+                                      cand->code))
10982
 
     {
10983
 
       if (dump_file)
10984
 
         {
10985
 
@@ -385,7 +431,9 @@
10986
 
   ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
10987
 
   new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
10988
 
 
10989
 
-  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
10990
 
+  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
10991
 
+      && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
10992
 
+                                      cand->code))
10993
 
     {
10994
 
       if (dump_file)
10995
 
         {
10996
 
Index: gcc/tree-ssa-reassoc.c
10997
 
===================================================================
10998
 
--- a/src/gcc/tree-ssa-reassoc.c        (.../tags/gcc_4_8_3_release)
10999
 
+++ b/src/gcc/tree-ssa-reassoc.c        (.../branches/gcc-4_8-branch)
11000
 
@@ -1898,7 +1898,7 @@
11001
 
              else
11002
 
                return -1;
11003
 
            }
11004
 
-         else if (p->high != NULL_TREE)
11005
 
+         else if (q->high != NULL_TREE)
11006
 
            return 1;
11007
 
          /* If both ranges are the same, sort below by ascending idx.  */
11008
 
        }
11009
 
@@ -3297,6 +3297,9 @@
11010
 
   switch (DECL_FUNCTION_CODE (fndecl))
11011
 
     {
11012
 
     CASE_FLT_FN (BUILT_IN_POW):
11013
 
+      if (flag_errno_math)
11014
 
+       return false;
11015
 
+
11016
 
       *base = gimple_call_arg (stmt, 0);
11017
 
       arg1 = gimple_call_arg (stmt, 1);
11018
 
 
11019
 
Index: gcc/config/alpha/elf.h
11020
 
===================================================================
11021
 
--- a/src/gcc/config/alpha/elf.h        (.../tags/gcc_4_8_3_release)
11022
 
+++ b/src/gcc/config/alpha/elf.h        (.../branches/gcc-4_8-branch)
11023
 
@@ -126,6 +126,10 @@
11024
 
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
11025
 
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
11026
 
 
11027
 
+/* This variable should be set to 'true' if the target ABI requires
11028
 
+   unwinding tables even when exceptions are not used.  */
11029
 
+#define TARGET_UNWIND_TABLES_DEFAULT true
11030
 
+
11031
 
 /* Select a format to encode pointers in exception handling data.  CODE
11032
 
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
11033
 
    true if the symbol may be affected by dynamic relocations.
11034
 
Index: gcc/config/alpha/alpha.c
11035
 
===================================================================
11036
 
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_8_3_release)
11037
 
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_8-branch)
11038
 
@@ -8658,6 +8658,11 @@
11039
 
                        }
11040
 
                      break;
11041
 
 
11042
 
+                   case BARRIER:
11043
 
+                     /* __builtin_unreachable can expand to no code at all,
11044
 
+                        leaving (barrier) RTXes in the instruction stream.  */
11045
 
+                     goto close_shadow_notrapb;
11046
 
+
11047
 
                    case JUMP_INSN:
11048
 
                    case CALL_INSN:
11049
 
                    case CODE_LABEL:
11050
 
@@ -8673,6 +8678,7 @@
11051
 
                  n = emit_insn_before (gen_trapb (), i);
11052
 
                  PUT_MODE (n, TImode);
11053
 
                  PUT_MODE (i, TImode);
11054
 
+               close_shadow_notrapb:
11055
 
                  trap_pending = 0;
11056
 
                  shadow.used.i = 0;
11057
 
                  shadow.used.fp = 0;
11058
 
Index: gcc/config/elfos.h
11059
 
===================================================================
11060
 
--- a/src/gcc/config/elfos.h    (.../tags/gcc_4_8_3_release)
11061
 
+++ b/src/gcc/config/elfos.h    (.../branches/gcc-4_8-branch)
11062
 
@@ -287,7 +287,7 @@
11063
 
 /* Write the extra assembler code needed to declare an object properly.  */
11064
 
 
11065
 
 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
11066
 
-#define USE_GNU_UNIQUE_OBJECT 1
11067
 
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
11068
 
 #else
11069
 
 #define USE_GNU_UNIQUE_OBJECT 0
11070
 
 #endif
11071
 
Index: gcc/config/sparc/t-rtems
11072
 
===================================================================
11073
 
--- a/src/gcc/config/sparc/t-rtems      (.../tags/gcc_4_8_3_release)
11074
 
+++ b/src/gcc/config/sparc/t-rtems      (.../branches/gcc-4_8-branch)
11075
 
@@ -17,6 +17,15 @@
11076
 
 # <http://www.gnu.org/licenses/>.
11077
 
 #
11078
 
 
11079
 
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
11080
 
-MULTILIB_DIRNAMES = soft v8 leon3
11081
 
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
11082
 
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
11083
 
 MULTILIB_MATCHES = msoft-float=mno-fpu
11084
 
+
11085
 
+MULTILIB_EXCEPTIONS = muser-mode
11086
 
+MULTILIB_EXCEPTIONS += mcpu=leon3
11087
 
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
11088
 
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
11089
 
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
11090
 
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
11091
 
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
11092
 
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
11093
 
Index: gcc/config/sparc/sparc.md
11094
 
===================================================================
11095
 
--- a/src/gcc/config/sparc/sparc.md     (.../tags/gcc_4_8_3_release)
11096
 
+++ b/src/gcc/config/sparc/sparc.md     (.../branches/gcc-4_8-branch)
11097
 
@@ -215,6 +215,7 @@
11098
 
    hypersparc,
11099
 
    leon,
11100
 
    leon3,
11101
 
+   leon3v7,
11102
 
    sparclite,
11103
 
    f930,
11104
 
    f934,
11105
 
Index: gcc/config/sparc/sparc.opt
11106
 
===================================================================
11107
 
--- a/src/gcc/config/sparc/sparc.opt    (.../tags/gcc_4_8_3_release)
11108
 
+++ b/src/gcc/config/sparc/sparc.opt    (.../branches/gcc-4_8-branch)
11109
 
@@ -153,6 +153,9 @@
11110
 
 Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
11111
 
 
11112
 
 EnumValue
11113
 
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
11114
 
+
11115
 
+EnumValue
11116
 
 Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
11117
 
 
11118
 
 EnumValue
11119
 
Index: gcc/config/sparc/sync.md
11120
 
===================================================================
11121
 
--- a/src/gcc/config/sparc/sync.md      (.../tags/gcc_4_8_3_release)
11122
 
+++ b/src/gcc/config/sparc/sync.md      (.../branches/gcc-4_8-branch)
11123
 
@@ -64,11 +64,19 @@
11124
 
   "stbar"
11125
 
   [(set_attr "type" "multi")])
11126
 
 
11127
 
+;; For LEON3, STB has the effect of membar #StoreLoad.
11128
 
+(define_insn "*membar_storeload_leon3"
11129
 
+  [(set (match_operand:BLK 0 "" "")
11130
 
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
11131
 
+  "TARGET_LEON3"
11132
 
+  "stb\t%%g0, [%%sp-1]"
11133
 
+  [(set_attr "type" "store")])
11134
 
+
11135
 
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
11136
 
 (define_insn "*membar_storeload"
11137
 
   [(set (match_operand:BLK 0 "" "")
11138
 
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
11139
 
-  "TARGET_V8"
11140
 
+  "TARGET_V8 && !TARGET_LEON3"
11141
 
   "ldstub\t[%%sp-1], %%g0"
11142
 
   [(set_attr "type" "multi")])
11143
 
 
11144
 
Index: gcc/config/sparc/sparc-opts.h
11145
 
===================================================================
11146
 
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
11147
 
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
11148
 
@@ -31,6 +31,7 @@
11149
 
   PROCESSOR_HYPERSPARC,
11150
 
   PROCESSOR_LEON,
11151
 
   PROCESSOR_LEON3,
11152
 
+  PROCESSOR_LEON3V7,
11153
 
   PROCESSOR_SPARCLITE,
11154
 
   PROCESSOR_F930,
11155
 
   PROCESSOR_F934,
11156
 
Index: gcc/config/sparc/sparc.c
11157
 
===================================================================
11158
 
--- a/src/gcc/config/sparc/sparc.c      (.../tags/gcc_4_8_3_release)
11159
 
+++ b/src/gcc/config/sparc/sparc.c      (.../branches/gcc-4_8-branch)
11160
 
@@ -1210,6 +1210,7 @@
11161
 
     { TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
11162
 
     { TARGET_CPU_leon, PROCESSOR_LEON },
11163
 
     { TARGET_CPU_leon3, PROCESSOR_LEON3 },
11164
 
+    { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
11165
 
     { TARGET_CPU_sparclite, PROCESSOR_F930 },
11166
 
     { TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
11167
 
     { TARGET_CPU_sparclet, PROCESSOR_TSC701 },
11168
 
@@ -1238,6 +1239,7 @@
11169
 
     { "hypersparc",    MASK_ISA, MASK_V8|MASK_FPU },
11170
 
     { "leon",          MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
11171
 
     { "leon3",         MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
11172
 
+    { "leon3v7",       MASK_ISA, MASK_LEON3|MASK_FPU },
11173
 
     { "sparclite",     MASK_ISA, MASK_SPARCLITE },
11174
 
     /* The Fujitsu MB86930 is the original sparclite chip, with no FPU.  */
11175
 
     { "f930",          MASK_ISA|MASK_FPU, MASK_SPARCLITE },
11176
 
@@ -1490,6 +1492,7 @@
11177
 
       sparc_costs = &leon_costs;
11178
 
       break;
11179
 
     case PROCESSOR_LEON3:
11180
 
+    case PROCESSOR_LEON3V7:
11181
 
       sparc_costs = &leon3_costs;
11182
 
       break;
11183
 
     case PROCESSOR_SPARCLET:
11184
 
Index: gcc/config/sparc/leon.md
11185
 
===================================================================
11186
 
--- a/src/gcc/config/sparc/leon.md      (.../tags/gcc_4_8_3_release)
11187
 
+++ b/src/gcc/config/sparc/leon.md      (.../branches/gcc-4_8-branch)
11188
 
@@ -29,11 +29,11 @@
11189
 
 
11190
 
 ;; Use a double reservation to work around the load pipeline hazard on UT699.
11191
 
 (define_insn_reservation "leon3_load" 1
11192
 
-  (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
11193
 
+  (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
11194
 
   "leon_memory*2")
11195
 
 
11196
 
 (define_insn_reservation "leon_store" 2
11197
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
11198
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
11199
 
   "leon_memory*2")
11200
 
 
11201
 
 ;; This describes Gaisler Research's FPU
11202
 
@@ -44,21 +44,21 @@
11203
 
 (define_cpu_unit "grfpu_ds" "grfpu")
11204
 
 
11205
 
 (define_insn_reservation "leon_fp_alu" 4
11206
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
11207
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
11208
 
   "grfpu_alu, nothing*3")
11209
 
 
11210
 
 (define_insn_reservation "leon_fp_divs" 16
11211
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
11212
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
11213
 
   "grfpu_ds*14, nothing*2")
11214
 
 
11215
 
 (define_insn_reservation "leon_fp_divd" 17
11216
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
11217
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
11218
 
   "grfpu_ds*15, nothing*2")
11219
 
 
11220
 
 (define_insn_reservation "leon_fp_sqrts" 24
11221
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
11222
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
11223
 
   "grfpu_ds*22, nothing*2")
11224
 
 
11225
 
 (define_insn_reservation "leon_fp_sqrtd" 25
11226
 
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
11227
 
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
11228
 
   "grfpu_ds*23, nothing*2")
11229
 
Index: gcc/config/sparc/sparc.h
11230
 
===================================================================
11231
 
--- a/src/gcc/config/sparc/sparc.h      (.../tags/gcc_4_8_3_release)
11232
 
+++ b/src/gcc/config/sparc/sparc.h      (.../branches/gcc-4_8-branch)
11233
 
@@ -137,21 +137,22 @@
11234
 
 #define TARGET_CPU_hypersparc  3
11235
 
 #define TARGET_CPU_leon                4
11236
 
 #define TARGET_CPU_leon3       5
11237
 
-#define TARGET_CPU_sparclite   6
11238
 
-#define TARGET_CPU_f930                6       /* alias */
11239
 
-#define TARGET_CPU_f934                6       /* alias */
11240
 
-#define TARGET_CPU_sparclite86x        7
11241
 
-#define TARGET_CPU_sparclet    8
11242
 
-#define TARGET_CPU_tsc701      8       /* alias */
11243
 
-#define TARGET_CPU_v9          9       /* generic v9 implementation */
11244
 
-#define TARGET_CPU_sparcv9     9       /* alias */
11245
 
-#define TARGET_CPU_sparc64     9       /* alias */
11246
 
-#define TARGET_CPU_ultrasparc  10
11247
 
-#define TARGET_CPU_ultrasparc3 11
11248
 
-#define TARGET_CPU_niagara     12
11249
 
-#define TARGET_CPU_niagara2    13
11250
 
-#define TARGET_CPU_niagara3    14
11251
 
-#define TARGET_CPU_niagara4    15
11252
 
+#define TARGET_CPU_leon3v7     6
11253
 
+#define TARGET_CPU_sparclite   7
11254
 
+#define TARGET_CPU_f930                7       /* alias */
11255
 
+#define TARGET_CPU_f934                7       /* alias */
11256
 
+#define TARGET_CPU_sparclite86x        8
11257
 
+#define TARGET_CPU_sparclet    9
11258
 
+#define TARGET_CPU_tsc701      9       /* alias */
11259
 
+#define TARGET_CPU_v9          10      /* generic v9 implementation */
11260
 
+#define TARGET_CPU_sparcv9     10      /* alias */
11261
 
+#define TARGET_CPU_sparc64     10      /* alias */
11262
 
+#define TARGET_CPU_ultrasparc  11
11263
 
+#define TARGET_CPU_ultrasparc3 12
11264
 
+#define TARGET_CPU_niagara     13
11265
 
+#define TARGET_CPU_niagara2    14
11266
 
+#define TARGET_CPU_niagara3    15
11267
 
+#define TARGET_CPU_niagara4    16
11268
 
 
11269
 
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
11270
 
  || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
11271
 
@@ -239,8 +240,13 @@
11272
 
 #define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
11273
 
 #endif
11274
 
 
11275
 
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
11276
 
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
11277
 
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
11278
 
 #endif
11279
 
 
11280
 
+#endif
11281
 
+
11282
 
 #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
11283
 
  #error Unrecognized value in TARGET_CPU_DEFAULT.
11284
 
 #endif
11285
 
@@ -285,6 +291,7 @@
11286
 
 %{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
11287
 
 %{mcpu=leon:-D__leon__ -D__sparc_v8__} \
11288
 
 %{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
11289
 
+%{mcpu=leon3v7:-D__leon__} \
11290
 
 %{mcpu=v9:-D__sparc_v9__} \
11291
 
 %{mcpu=ultrasparc:-D__sparc_v9__} \
11292
 
 %{mcpu=ultrasparc3:-D__sparc_v9__} \
11293
 
@@ -334,6 +341,7 @@
11294
 
 %{mcpu=hypersparc:-Av8} \
11295
 
 %{mcpu=leon:" AS_LEON_FLAG "} \
11296
 
 %{mcpu=leon3:" AS_LEON_FLAG "} \
11297
 
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
11298
 
 %{mv8plus:-Av8plus} \
11299
 
 %{mcpu=v9:-Av9} \
11300
 
 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
11301
 
@@ -1760,8 +1768,10 @@
11302
 
 
11303
 
 #ifdef HAVE_AS_LEON
11304
 
 #define AS_LEON_FLAG "-Aleon"
11305
 
+#define AS_LEONV7_FLAG "-Aleon"
11306
 
 #else
11307
 
 #define AS_LEON_FLAG "-Av8"
11308
 
+#define AS_LEONV7_FLAG "-Av7"
11309
 
 #endif
11310
 
 
11311
 
 /* We use gcc _mcount for profiling.  */
11312
 
Index: gcc/config/i386/i386.md
11313
 
===================================================================
11314
 
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_8_3_release)
11315
 
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_8-branch)
11316
 
@@ -5339,66 +5339,37 @@
11317
 
 
11318
 
 ;; Avoid store forwarding (partial memory) stall penalty by extending
11319
 
 ;; SImode value to DImode through XMM register instead of pushing two
11320
 
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
11321
 
-;; targets benefit from this optimization. Also note that fild
11322
 
-;; loads from memory only.
11323
 
+;; SImode values to stack. Also note that fild loads from memory only.
11324
 
 
11325
 
-(define_insn "*floatunssi<mode>2_1"
11326
 
-  [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
11327
 
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
11328
 
+  [(set (match_operand:X87MODEF 0 "register_operand" "=f")
11329
 
        (unsigned_float:X87MODEF
11330
 
-         (match_operand:SI 1 "nonimmediate_operand" "x,m")))
11331
 
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
11332
 
-   (clobber (match_scratch:SI 3 "=X,x"))]
11333
 
+         (match_operand:SI 1 "nonimmediate_operand" "rm")))
11334
 
+   (clobber (match_scratch:DI 3 "=x"))
11335
 
+   (clobber (match_operand:DI 2 "memory_operand" "=m"))]
11336
 
   "!TARGET_64BIT
11337
 
    && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11338
 
-   && TARGET_SSE"
11339
 
+   && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
11340
 
   "#"
11341
 
+  "&& reload_completed"
11342
 
+  [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
11343
 
+   (set (match_dup 2) (match_dup 3))
11344
 
+   (set (match_dup 0)
11345
 
+       (float:X87MODEF (match_dup 2)))]
11346
 
+  ""
11347
 
   [(set_attr "type" "multi")
11348
 
    (set_attr "mode" "<MODE>")])
11349
 
 
11350
 
-(define_split
11351
 
-  [(set (match_operand:X87MODEF 0 "register_operand")
11352
 
-       (unsigned_float:X87MODEF
11353
 
-         (match_operand:SI 1 "register_operand")))
11354
 
-   (clobber (match_operand:DI 2 "memory_operand"))
11355
 
-   (clobber (match_scratch:SI 3))]
11356
 
-  "!TARGET_64BIT
11357
 
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11358
 
-   && TARGET_SSE
11359
 
-   && reload_completed"
11360
 
-  [(set (match_dup 2) (match_dup 1))
11361
 
-   (set (match_dup 0)
11362
 
-       (float:X87MODEF (match_dup 2)))]
11363
 
-  "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
11364
 
-
11365
 
-(define_split
11366
 
-  [(set (match_operand:X87MODEF 0 "register_operand")
11367
 
-       (unsigned_float:X87MODEF
11368
 
-         (match_operand:SI 1 "memory_operand")))
11369
 
-   (clobber (match_operand:DI 2 "memory_operand"))
11370
 
-   (clobber (match_scratch:SI 3))]
11371
 
-  "!TARGET_64BIT
11372
 
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11373
 
-   && TARGET_SSE
11374
 
-   && reload_completed"
11375
 
-  [(set (match_dup 2) (match_dup 3))
11376
 
-   (set (match_dup 0)
11377
 
-       (float:X87MODEF (match_dup 2)))]
11378
 
-{
11379
 
-  emit_move_insn (operands[3], operands[1]);
11380
 
-  operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
11381
 
-})
11382
 
-
11383
 
 (define_expand "floatunssi<mode>2"
11384
 
   [(parallel
11385
 
      [(set (match_operand:X87MODEF 0 "register_operand")
11386
 
           (unsigned_float:X87MODEF
11387
 
             (match_operand:SI 1 "nonimmediate_operand")))
11388
 
-      (clobber (match_dup 2))
11389
 
-      (clobber (match_scratch:SI 3))])]
11390
 
+      (clobber (match_scratch:DI 3))
11391
 
+      (clobber (match_dup 2))])]
11392
 
   "!TARGET_64BIT
11393
 
    && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11394
 
-       && TARGET_SSE)
11395
 
+       && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
11396
 
        || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
11397
 
 {
11398
 
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
11399
 
@@ -13545,7 +13516,8 @@
11400
 
    (set (reg:CCFP FPSR_REG)
11401
 
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
11402
 
                     UNSPEC_C2_FLAG))]
11403
 
-  "TARGET_USE_FANCY_MATH_387"
11404
 
+  "TARGET_USE_FANCY_MATH_387
11405
 
+   && flag_finite_math_only"
11406
 
   "fprem"
11407
 
   [(set_attr "type" "fpspc")
11408
 
    (set_attr "mode" "XF")])
11409
 
@@ -13554,7 +13526,8 @@
11410
 
   [(use (match_operand:XF 0 "register_operand"))
11411
 
    (use (match_operand:XF 1 "general_operand"))
11412
 
    (use (match_operand:XF 2 "general_operand"))]
11413
 
-  "TARGET_USE_FANCY_MATH_387"
11414
 
+  "TARGET_USE_FANCY_MATH_387
11415
 
+   && flag_finite_math_only"
11416
 
 {
11417
 
   rtx label = gen_label_rtx ();
11418
 
 
11419
 
@@ -13577,7 +13550,8 @@
11420
 
   [(use (match_operand:MODEF 0 "register_operand"))
11421
 
    (use (match_operand:MODEF 1 "general_operand"))
11422
 
    (use (match_operand:MODEF 2 "general_operand"))]
11423
 
-  "TARGET_USE_FANCY_MATH_387"
11424
 
+  "TARGET_USE_FANCY_MATH_387
11425
 
+   && flag_finite_math_only"
11426
 
 {
11427
 
   rtx (*gen_truncxf) (rtx, rtx);
11428
 
 
11429
 
@@ -13616,7 +13590,8 @@
11430
 
    (set (reg:CCFP FPSR_REG)
11431
 
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
11432
 
                     UNSPEC_C2_FLAG))]
11433
 
-  "TARGET_USE_FANCY_MATH_387"
11434
 
+  "TARGET_USE_FANCY_MATH_387
11435
 
+   && flag_finite_math_only"
11436
 
   "fprem1"
11437
 
   [(set_attr "type" "fpspc")
11438
 
    (set_attr "mode" "XF")])
11439
 
@@ -13625,7 +13600,8 @@
11440
 
   [(use (match_operand:XF 0 "register_operand"))
11441
 
    (use (match_operand:XF 1 "general_operand"))
11442
 
    (use (match_operand:XF 2 "general_operand"))]
11443
 
-  "TARGET_USE_FANCY_MATH_387"
11444
 
+  "TARGET_USE_FANCY_MATH_387
11445
 
+   && flag_finite_math_only"
11446
 
 {
11447
 
   rtx label = gen_label_rtx ();
11448
 
 
11449
 
@@ -13648,7 +13624,8 @@
11450
 
   [(use (match_operand:MODEF 0 "register_operand"))
11451
 
    (use (match_operand:MODEF 1 "general_operand"))
11452
 
    (use (match_operand:MODEF 2 "general_operand"))]
11453
 
-  "TARGET_USE_FANCY_MATH_387"
11454
 
+  "TARGET_USE_FANCY_MATH_387
11455
 
+   && flag_finite_math_only"
11456
 
 {
11457
 
   rtx (*gen_truncxf) (rtx, rtx);
11458
 
 
11459
 
Index: gcc/config/i386/driver-i386.c
11460
 
===================================================================
11461
 
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
11462
 
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
11463
 
@@ -713,6 +713,11 @@
11464
 
                    /* Assume Core 2.  */
11465
 
                    cpu = "core2";
11466
 
                }
11467
 
+             else if (has_longmode)
11468
 
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
11469
 
+                  -march=native would be unusable for 64-bit compilations,
11470
 
+                  as all the CPUs below are 32-bit only.  */
11471
 
+               cpu = "x86-64";
11472
 
              else if (has_sse3)
11473
 
                /* It is Core Duo.  */
11474
 
                cpu = "pentium-m";
11475
 
Index: gcc/config/i386/i386.c
11476
 
===================================================================
11477
 
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_8_3_release)
11478
 
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_8-branch)
11479
 
@@ -13800,7 +13800,7 @@
11480
 
       if (mode == CCmode)
11481
 
        suffix = "b";
11482
 
       else if (mode == CCCmode)
11483
 
-       suffix = "c";
11484
 
+       suffix = fp ? "b" : "c";
11485
 
       else
11486
 
        gcc_unreachable ();
11487
 
       break;
11488
 
@@ -13823,9 +13823,9 @@
11489
 
       break;
11490
 
     case GEU:
11491
 
       if (mode == CCmode)
11492
 
-       suffix = fp ? "nb" : "ae";
11493
 
+       suffix = "nb";
11494
 
       else if (mode == CCCmode)
11495
 
-       suffix = "nc";
11496
 
+       suffix = fp ? "nb" : "nc";
11497
 
       else
11498
 
        gcc_unreachable ();
11499
 
       break;
11500
 
@@ -20505,7 +20505,7 @@
11501
 
          t1 = gen_reg_rtx (V32QImode);
11502
 
          t2 = gen_reg_rtx (V32QImode);
11503
 
          t3 = gen_reg_rtx (V32QImode);
11504
 
-         vt2 = GEN_INT (128);
11505
 
+         vt2 = GEN_INT (-128);
11506
 
          for (i = 0; i < 32; i++)
11507
 
            vec[i] = vt2;
11508
 
          vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
11509
 
@@ -24640,13 +24640,17 @@
11510
 
              {
11511
 
                edge e;
11512
 
                edge_iterator ei;
11513
 
-               /* Assume that region is SCC, i.e. all immediate predecessors
11514
 
-                  of non-head block are in the same region.  */
11515
 
+
11516
 
+               /* Regions are SCCs with the exception of selective
11517
 
+                  scheduling with pipelining of outer blocks enabled.
11518
 
+                  So also check that immediate predecessors of a non-head
11519
 
+                  block are in the same region.  */
11520
 
                FOR_EACH_EDGE (e, ei, bb->preds)
11521
 
                  {
11522
 
                    /* Avoid creating of loop-carried dependencies through
11523
 
-                      using topological odering in region.  */
11524
 
-                   if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11525
 
+                      using topological ordering in the region.  */
11526
 
+                   if (rgn == CONTAINING_RGN (e->src->index)
11527
 
+                       && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11528
 
                      add_dependee_for_func_arg (first_arg, e->src); 
11529
 
                  }
11530
 
              }
11531
 
@@ -38807,8 +38811,8 @@
11532
 
              op0 = gen_lowpart (V4DImode, d->op0);
11533
 
              op1 = gen_lowpart (V4DImode, d->op1);
11534
 
              rperm[0]
11535
 
-               = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
11536
 
-                          || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
11537
 
+               = GEN_INT ((d->perm[0] / (nelt / 2))
11538
 
+                          | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
11539
 
              emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
11540
 
              return true;
11541
 
            }
11542
 
Index: gcc/config/sh/sh.c
11543
 
===================================================================
11544
 
--- a/src/gcc/config/sh/sh.c    (.../tags/gcc_4_8_3_release)
11545
 
+++ b/src/gcc/config/sh/sh.c    (.../branches/gcc-4_8-branch)
11546
 
@@ -808,6 +808,12 @@
11547
 
        targetm.asm_out.aligned_op.di = NULL;
11548
 
        targetm.asm_out.unaligned_op.di = NULL;
11549
 
     }
11550
 
+
11551
 
+  /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
11552
 
+     Disable it for everything else.  */
11553
 
+  if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
11554
 
+    TARGET_USERMODE = false;
11555
 
+
11556
 
   if (TARGET_SH1)
11557
 
     {
11558
 
       if (! strcmp (sh_div_str, "call-div1"))
11559
 
@@ -3036,7 +3042,7 @@
11560
 
 struct ashl_lshr_sequence
11561
 
 {
11562
 
   char insn_count;
11563
 
-  char amount[6];
11564
 
+  signed char amount[6];
11565
 
   char clobbers_t;
11566
 
 };
11567
 
 
11568
 
Index: gcc/config/sh/sync.md
11569
 
===================================================================
11570
 
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
11571
 
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
11572
 
@@ -466,6 +466,7 @@
11573
 
    (set (mem:SI (match_dup 1))
11574
 
        (unspec:SI
11575
 
          [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
11576
 
+   (set (reg:SI T_REG) (const_int 1))
11577
 
    (clobber (reg:SI R0_REG))]
11578
 
   "TARGET_ATOMIC_HARD_LLCS
11579
 
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11580
 
@@ -484,6 +485,7 @@
11581
 
    (set (mem:QIHI (match_dup 1))
11582
 
        (unspec:QIHI
11583
 
          [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
11584
 
+   (set (reg:SI T_REG) (const_int 1))
11585
 
    (clobber (reg:SI R0_REG))
11586
 
    (clobber (match_scratch:SI 3 "=&r"))
11587
 
    (clobber (match_scratch:SI 4 "=1"))]
11588
 
@@ -617,6 +619,7 @@
11589
 
          [(FETCHOP:SI (mem:SI (match_dup 1))
11590
 
             (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11591
 
          UNSPEC_ATOMIC))
11592
 
+   (set (reg:SI T_REG) (const_int 1))
11593
 
    (clobber (reg:SI R0_REG))]
11594
 
   "TARGET_ATOMIC_HARD_LLCS
11595
 
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11596
 
@@ -637,6 +640,7 @@
11597
 
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
11598
 
             (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11599
 
          UNSPEC_ATOMIC))
11600
 
+   (set (reg:SI T_REG) (const_int 1))
11601
 
    (clobber (reg:SI R0_REG))
11602
 
    (clobber (match_scratch:SI 3 "=&r"))
11603
 
    (clobber (match_scratch:SI 4 "=1"))]
11604
 
@@ -784,6 +788,7 @@
11605
 
          [(not:SI (and:SI (mem:SI (match_dup 1))
11606
 
                   (match_operand:SI 2 "logical_operand" "rK08")))]
11607
 
          UNSPEC_ATOMIC))
11608
 
+   (set (reg:SI T_REG) (const_int 1))
11609
 
    (clobber (reg:SI R0_REG))]
11610
 
   "TARGET_ATOMIC_HARD_LLCS
11611
 
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11612
 
@@ -805,6 +810,7 @@
11613
 
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
11614
 
                     (match_operand:QIHI 2 "logical_operand" "rK08")))]
11615
 
          UNSPEC_ATOMIC))
11616
 
+   (set (reg:SI T_REG) (const_int 1))
11617
 
    (clobber (reg:SI R0_REG))
11618
 
    (clobber (match_scratch:SI 3 "=&r"))
11619
 
    (clobber (match_scratch:SI 4 "=1"))]
11620
 
@@ -903,7 +909,7 @@
11621
 
         "      and     %0,%3"                  "\n"
11622
 
         "      not     %3,%3"                  "\n"
11623
 
         "      mov.<bwl>       %3,@%1"         "\n"
11624
 
-        "      stc     %4,sr";
11625
 
+        "      ldc     %4,sr";
11626
 
 }
11627
 
   [(set_attr "length" "20")])
11628
 
 
11629
 
@@ -960,7 +966,8 @@
11630
 
    (set (mem:SI (match_dup 1))
11631
 
        (unspec:SI
11632
 
          [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
11633
 
-         UNSPEC_ATOMIC))]
11634
 
+         UNSPEC_ATOMIC))
11635
 
+   (set (reg:SI T_REG) (const_int 1))]
11636
 
   "TARGET_ATOMIC_HARD_LLCS
11637
 
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11638
 
 {
11639
 
@@ -980,6 +987,7 @@
11640
 
        (unspec:QIHI
11641
 
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
11642
 
          UNSPEC_ATOMIC))
11643
 
+   (set (reg:SI T_REG) (const_int 1))
11644
 
    (clobber (reg:SI R0_REG))
11645
 
    (clobber (match_scratch:SI 3 "=&r"))
11646
 
    (clobber (match_scratch:SI 4 "=1"))]
11647
 
@@ -1124,7 +1132,8 @@
11648
 
    (set (mem:SI (match_dup 1))
11649
 
        (unspec:SI
11650
 
          [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
11651
 
-         UNSPEC_ATOMIC))]
11652
 
+         UNSPEC_ATOMIC))
11653
 
+   (set (reg:SI T_REG) (const_int 1))]
11654
 
   "TARGET_ATOMIC_HARD_LLCS
11655
 
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11656
 
 {
11657
 
@@ -1145,6 +1154,7 @@
11658
 
        (unspec:QIHI
11659
 
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
11660
 
          UNSPEC_ATOMIC))
11661
 
+   (set (reg:SI T_REG) (const_int 1))
11662
 
    (clobber (reg:SI R0_REG))
11663
 
    (clobber (match_scratch:SI 3 "=&r"))
11664
 
    (clobber (match_scratch:SI 4 "=1"))]
11665
 
@@ -1353,7 +1363,7 @@
11666
 
         "      ldc     r0,sr"          "\n"
11667
 
         "      mov.b   @%0,r0"         "\n"
11668
 
         "      mov.b   %1,@%0"         "\n"
11669
 
-        "      stc     %2,sr"          "\n"
11670
 
+        "      ldc     %2,sr"          "\n"
11671
 
         "      tst     r0,r0";
11672
 
 }
11673
 
   [(set_attr "length" "16")])
11674
 
Index: gcc/config/sh/sh.md
11675
 
===================================================================
11676
 
--- a/src/gcc/config/sh/sh.md   (.../tags/gcc_4_8_3_release)
11677
 
+++ b/src/gcc/config/sh/sh.md   (.../branches/gcc-4_8-branch)
11678
 
@@ -6133,10 +6133,9 @@
11679
 
 })
11680
 
 
11681
 
 (define_expand "extendqihi2"
11682
 
-  [(set (match_operand:HI 0 "arith_reg_dest" "")
11683
 
-       (sign_extend:HI (match_operand:QI 1 "arith_reg_operand" "")))]
11684
 
-  ""
11685
 
-  "")
11686
 
+  [(set (match_operand:HI 0 "arith_reg_dest")
11687
 
+       (sign_extend:HI (match_operand:QI 1 "arith_reg_operand")))]
11688
 
+  "TARGET_SH1")
11689
 
 
11690
 
 (define_insn "*extendqihi2_compact_reg"
11691
 
   [(set (match_operand:HI 0 "arith_reg_dest" "=r")
11692
 
Index: gcc/config/sh/sh.opt
11693
 
===================================================================
11694
 
--- a/src/gcc/config/sh/sh.opt  (.../tags/gcc_4_8_3_release)
11695
 
+++ b/src/gcc/config/sh/sh.opt  (.../branches/gcc-4_8-branch)
11696
 
@@ -343,7 +343,7 @@
11697
 
 Cost to assume for a multiply insn
11698
 
 
11699
 
 musermode
11700
 
-Target Report RejectNegative Var(TARGET_USERMODE)
11701
 
+Target Var(TARGET_USERMODE)
11702
 
 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
11703
 
 
11704
 
 ;; We might want to enable this by default for TARGET_HARD_SH4, because
11705
 
Index: gcc/config/microblaze/predicates.md
11706
 
===================================================================
11707
 
--- a/src/gcc/config/microblaze/predicates.md   (.../tags/gcc_4_8_3_release)
11708
 
+++ b/src/gcc/config/microblaze/predicates.md   (.../branches/gcc-4_8-branch)
11709
 
@@ -85,10 +85,6 @@
11710
 
   (ior (match_operand 0 "const_0_operand")
11711
 
        (match_operand 0 "register_operand")))
11712
 
 
11713
 
-(define_predicate "reg_or_mem_operand"
11714
 
-  (ior (match_operand 0 "memory_operand")
11715
 
-       (match_operand 0 "register_operand")))
11716
 
-
11717
 
 ;;  Return if the operand is either the PC or a label_ref.  
11718
 
 (define_special_predicate "pc_or_label_operand"
11719
 
   (ior (match_code "pc,label_ref")
11720
 
Index: gcc/config/microblaze/microblaze.md
11721
 
===================================================================
11722
 
--- a/src/gcc/config/microblaze/microblaze.md   (.../tags/gcc_4_8_3_release)
11723
 
+++ b/src/gcc/config/microblaze/microblaze.md   (.../branches/gcc-4_8-branch)
11724
 
@@ -1119,18 +1119,6 @@
11725
 
   }
11726
 
 )
11727
 
 
11728
 
-;;Load and store reverse
11729
 
-(define_insn "movsi4_rev"
11730
 
-  [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
11731
 
-        (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
11732
 
-  "TARGET_REORDER"
11733
 
-  "@
11734
 
-   lwr\t%0,%y1,r0
11735
 
-   swr\t%1,%y0,r0"
11736
 
-  [(set_attr "type"     "load,store")
11737
 
-  (set_attr "mode"      "SI")
11738
 
-  (set_attr "length"    "4,4")])
11739
 
-
11740
 
 ;; 32-bit floating point moves
11741
 
 
11742
 
 (define_expand "movsf"
11743
 
Index: gcc/config/avr/avr-fixed.md
11744
 
===================================================================
11745
 
--- a/src/gcc/config/avr/avr-fixed.md   (.../tags/gcc_4_8_3_release)
11746
 
+++ b/src/gcc/config/avr/avr-fixed.md   (.../branches/gcc-4_8-branch)
11747
 
@@ -430,8 +430,8 @@
11748
 
       }
11749
 
 
11750
 
     // Input and output of the libgcc function
11751
 
-    const unsigned int regno_in[]  = { -1, 22, 22, -1, 18 };
11752
 
-    const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
11753
 
+    const unsigned int regno_in[]  = { -1U, 22, 22, -1U, 18 };
11754
 
+    const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
11755
 
 
11756
 
     operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11757
 
     operands[4] = gen_rtx_REG (<MODE>mode,  regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11758
 
Index: gcc/config/avr/avr.md
11759
 
===================================================================
11760
 
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
11761
 
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
11762
 
@@ -367,6 +367,15 @@
11763
 
   ""
11764
 
   {
11765
 
     int i;
11766
 
+
11767
 
+    // Avoid (subreg (mem)) for non-generic address spaces below.  Because
11768
 
+    // of the poor addressing capabilities of these spaces it's better to
11769
 
+    // load them in one chunk.  And it avoids PR61443.
11770
 
+
11771
 
+    if (MEM_P (operands[0])
11772
 
+        && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
11773
 
+      operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
11774
 
+
11775
 
     for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
11776
 
       {
11777
 
         rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
11778
 
Index: gcc/config/avr/avr.h
11779
 
===================================================================
11780
 
--- a/src/gcc/config/avr/avr.h  (.../tags/gcc_4_8_3_release)
11781
 
+++ b/src/gcc/config/avr/avr.h  (.../branches/gcc-4_8-branch)
11782
 
@@ -250,18 +250,18 @@
11783
 
 #define REG_CLASS_CONTENTS {                                           \
11784
 
   {0x00000000,0x00000000},     /* NO_REGS */                           \
11785
 
   {0x00000001,0x00000000},     /* R0_REG */                            \
11786
 
-  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */                \
11787
 
-  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */                \
11788
 
-  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */                \
11789
 
+  {3u << REG_X,0x00000000},     /* POINTER_X_REGS, r26 - r27 */                \
11790
 
+  {3u << REG_Y,0x00000000},     /* POINTER_Y_REGS, r28 - r29 */                \
11791
 
+  {3u << REG_Z,0x00000000},     /* POINTER_Z_REGS, r30 - r31 */                \
11792
 
   {0x00000000,0x00000003},     /* STACK_REG, STACK */                  \
11793
 
-  {(3 << REG_Y) | (3 << REG_Z),                                                \
11794
 
+  {(3u << REG_Y) | (3u << REG_Z),                                      \
11795
 
      0x00000000},              /* BASE_POINTER_REGS, r28 - r31 */      \
11796
 
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                         \
11797
 
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z),                      \
11798
 
      0x00000000},              /* POINTER_REGS, r26 - r31 */           \
11799
 
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),          \
11800
 
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W),      \
11801
 
      0x00000000},              /* ADDW_REGS, r24 - r31 */              \
11802
 
   {0x00ff0000,0x00000000},     /* SIMPLE_LD_REGS r16 - r23 */          \
11803
 
-  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),   \
11804
 
+  {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
11805
 
      0x00000000},      /* LD_REGS, r16 - r31 */                        \
11806
 
   {0x0000ffff,0x00000000},     /* NO_LD_REGS  r0 - r15 */              \
11807
 
   {0xffffffff,0x00000000},     /* GENERAL_REGS, r0 - r31 */            \
11808
 
Index: gcc/config/aarch64/arm_neon.h
11809
 
===================================================================
11810
 
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
11811
 
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
11812
 
@@ -13815,7 +13815,7 @@
11813
 
   int16x4_t result;
11814
 
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
11815
 
            : "=w"(result)
11816
 
-           : "w"(a), "w"(b)
11817
 
+           : "w"(a), "x"(b)
11818
 
            : /* No clobbers */);
11819
 
   return result;
11820
 
 }
11821
 
@@ -13837,7 +13837,7 @@
11822
 
   int16x8_t result;
11823
 
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
11824
 
            : "=w"(result)
11825
 
-           : "w"(a), "w"(b)
11826
 
+           : "w"(a), "x"(b)
11827
 
            : /* No clobbers */);
11828
 
   return result;
11829
 
 }
11830
 
Index: gcc/config/aarch64/aarch64.md
11831
 
===================================================================
11832
 
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
11833
 
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
11834
 
@@ -3292,6 +3292,7 @@
11835
 
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
11836
 
                   UNSPEC_TLSDESC))
11837
 
    (clobber (reg:DI LR_REGNUM))
11838
 
+   (clobber (reg:CC CC_REGNUM))
11839
 
    (clobber (match_scratch:DI 1 "=r"))]
11840
 
   "TARGET_TLS_DESC"
11841
 
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
11842
 
Index: gcc/config/aarch64/aarch64.opt
11843
 
===================================================================
11844
 
--- a/src/gcc/config/aarch64/aarch64.opt        (.../tags/gcc_4_8_3_release)
11845
 
+++ b/src/gcc/config/aarch64/aarch64.opt        (.../branches/gcc-4_8-branch)
11846
 
@@ -67,6 +67,10 @@
11847
 
 Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
11848
 
 Generate code which uses only the general registers
11849
 
 
11850
 
+mfix-cortex-a53-835769
11851
 
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
11852
 
+Workaround for ARM Cortex-A53 Erratum number 835769
11853
 
+
11854
 
 mlittle-endian
11855
 
 Target Report RejectNegative InverseMask(BIG_END)
11856
 
 Assume target CPU is configured as little endian
11857
 
Index: gcc/config/aarch64/aarch64-protos.h
11858
 
===================================================================
11859
 
--- a/src/gcc/config/aarch64/aarch64-protos.h   (.../tags/gcc_4_8_3_release)
11860
 
+++ b/src/gcc/config/aarch64/aarch64-protos.h   (.../branches/gcc-4_8-branch)
11861
 
@@ -247,6 +247,8 @@
11862
 
 
11863
 
 extern void aarch64_split_combinev16qi (rtx operands[3]);
11864
 
 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
11865
 
+extern bool aarch64_madd_needs_nop (rtx);
11866
 
+extern void aarch64_final_prescan_insn (rtx);
11867
 
 extern bool
11868
 
 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
11869
 
 
11870
 
Index: gcc/config/aarch64/aarch64.c
11871
 
===================================================================
11872
 
--- a/src/gcc/config/aarch64/aarch64.c  (.../tags/gcc_4_8_3_release)
11873
 
+++ b/src/gcc/config/aarch64/aarch64.c  (.../branches/gcc-4_8-branch)
11874
 
@@ -1201,6 +1201,7 @@
11875
 
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
11876
 
   int ncrn, nvrn, nregs;
11877
 
   bool allocate_ncrn, allocate_nvrn;
11878
 
+  HOST_WIDE_INT size;
11879
 
 
11880
 
   /* We need to do this once per argument.  */
11881
 
   if (pcum->aapcs_arg_processed)
11882
 
@@ -1208,6 +1209,11 @@
11883
 
 
11884
 
   pcum->aapcs_arg_processed = true;
11885
 
 
11886
 
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
11887
 
+  size
11888
 
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
11889
 
+                       UNITS_PER_WORD);
11890
 
+
11891
 
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
11892
 
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
11893
 
                                                 mode,
11894
 
@@ -1258,10 +1264,8 @@
11895
 
     }
11896
 
 
11897
 
   ncrn = pcum->aapcs_ncrn;
11898
 
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
11899
 
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
11900
 
+  nregs = size / UNITS_PER_WORD;
11901
 
 
11902
 
-
11903
 
   /* C6 - C9.  though the sign and zero extension semantics are
11904
 
      handled elsewhere.  This is the case where the argument fits
11905
 
      entirely general registers.  */
11906
 
@@ -1309,13 +1313,12 @@
11907
 
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
11908
 
 
11909
 
   /* The argument is passed on stack; record the needed number of words for
11910
 
-     this argument (we can re-use NREGS) and align the total size if
11911
 
-     necessary.  */
11912
 
+     this argument and align the total size if necessary.  */
11913
 
 on_stack:
11914
 
-  pcum->aapcs_stack_words = nregs;
11915
 
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
11916
 
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
11917
 
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
11918
 
-                                              16 / UNITS_PER_WORD) + 1;
11919
 
+                                              16 / UNITS_PER_WORD);
11920
 
   return;
11921
 
 }
11922
 
 
11923
 
@@ -4845,6 +4848,15 @@
11924
 
   aarch64_tune = selected_tune->core;
11925
 
   aarch64_tune_params = selected_tune->tune;
11926
 
 
11927
 
+  if (aarch64_fix_a53_err835769 == 2)
11928
 
+    {
11929
 
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
11930
 
+      aarch64_fix_a53_err835769 = 1;
11931
 
+#else
11932
 
+      aarch64_fix_a53_err835769 = 0;
11933
 
+#endif
11934
 
+    }
11935
 
+
11936
 
   aarch64_override_options_after_change ();
11937
 
 }
11938
 
 
11939
 
@@ -6037,6 +6049,135 @@
11940
 
   return NULL;
11941
 
 }
11942
 
 
11943
 
+
11944
 
+/* Return true iff X is a MEM rtx.  */
11945
 
+
11946
 
+static int
11947
 
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
11948
 
+{
11949
 
+  return MEM_P (*x);
11950
 
+}
11951
 
+
11952
 
+
11953
 
+/*  Return true if mem_insn contains a MEM RTX somewhere in it.  */
11954
 
+
11955
 
+static bool
11956
 
+has_memory_op (rtx mem_insn)
11957
 
+{
11958
 
+   rtx pattern = PATTERN (mem_insn);
11959
 
+   return for_each_rtx (&pattern, is_mem_p, NULL);
11960
 
+}
11961
 
+
11962
 
+
11963
 
+/* Find the first rtx before insn that will generate an assembly
11964
 
+   instruction.  */
11965
 
+
11966
 
+static rtx
11967
 
+aarch64_prev_real_insn (rtx insn)
11968
 
+{
11969
 
+  if (!insn)
11970
 
+    return NULL;
11971
 
+
11972
 
+  do
11973
 
+    {
11974
 
+      insn = prev_real_insn (insn);
11975
 
+    }
11976
 
+  while (insn && recog_memoized (insn) < 0);
11977
 
+
11978
 
+  return insn;
11979
 
+}
11980
 
+
11981
 
+/*  Return true iff t1 is the v8type of a multiply-accumulate instruction.  */
11982
 
+
11983
 
+static bool
11984
 
+is_madd_op (enum attr_v8type t1)
11985
 
+{
11986
 
+  return t1 == V8TYPE_MADD
11987
 
+         || t1 == V8TYPE_MADDL;
11988
 
+}
11989
 
+
11990
 
+
11991
 
+/* Check if there is a register dependency between a load and the insn
11992
 
+   for which we hold recog_data.  */
11993
 
+
11994
 
+static bool
11995
 
+dep_between_memop_and_curr (rtx memop)
11996
 
+{
11997
 
+  rtx load_reg;
11998
 
+  int opno;
11999
 
+
12000
 
+  gcc_assert (GET_CODE (memop) == SET);
12001
 
+
12002
 
+  if (!REG_P (SET_DEST (memop)))
12003
 
+    return false;
12004
 
+
12005
 
+  load_reg = SET_DEST (memop);
12006
 
+  for (opno = 1; opno < recog_data.n_operands; opno++)
12007
 
+    {
12008
 
+      rtx operand = recog_data.operand[opno];
12009
 
+      if (REG_P (operand)
12010
 
+          && reg_overlap_mentioned_p (load_reg, operand))
12011
 
+        return true;
12012
 
+
12013
 
+    }
12014
 
+  return false;
12015
 
+}
12016
 
+
12017
 
+
12018
 
+
12019
 
+/* When working around the Cortex-A53 erratum 835769,
12020
 
+   given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
12021
 
+   instruction and has a preceding memory instruction such that a NOP
12022
 
+   should be inserted between them.  */
12023
 
+
12024
 
+bool
12025
 
+aarch64_madd_needs_nop (rtx insn)
12026
 
+{
12027
 
+  enum attr_v8type attr_type;
12028
 
+  rtx prev;
12029
 
+  rtx body;
12030
 
+
12031
 
+  if (!aarch64_fix_a53_err835769)
12032
 
+    return false;
12033
 
+
12034
 
+  if (recog_memoized (insn) < 0)
12035
 
+    return false;
12036
 
+
12037
 
+  attr_type = get_attr_v8type (insn);
12038
 
+  if (!is_madd_op (attr_type))
12039
 
+    return false;
12040
 
+
12041
 
+  prev = aarch64_prev_real_insn (insn);
12042
 
+  /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
12043
 
+     Restore recog state to INSN to avoid state corruption.  */
12044
 
+  extract_constrain_insn_cached (insn);
12045
 
+
12046
 
+  if (!prev || !has_memory_op (prev))
12047
 
+    return false;
12048
 
+
12049
 
+  body = single_set (prev);
12050
 
+
12051
 
+  /* If the previous insn is a memory op and there is no dependency between
12052
 
+     it and the madd, emit a nop between them.  If we know it's a memop but
12053
 
+     body is NULL, return true to be safe.  */
12054
 
+  if (GET_MODE (recog_data.operand[0]) == DImode
12055
 
+      && (!body || !dep_between_memop_and_curr (body)))
12056
 
+    return true;
12057
 
+
12058
 
+  return false;
12059
 
+
12060
 
+}
12061
 
+
12062
 
+/* Implement FINAL_PRESCAN_INSN.  */
12063
 
+
12064
 
+void
12065
 
+aarch64_final_prescan_insn (rtx insn)
12066
 
+{
12067
 
+  if (aarch64_madd_needs_nop (insn))
12068
 
+    fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
12069
 
+}
12070
 
+
12071
 
+
12072
 
 /* Return the equivalent letter for size.  */
12073
 
 static unsigned char
12074
 
 sizetochar (int size)
12075
 
Index: gcc/config/aarch64/aarch64-elf-raw.h
12076
 
===================================================================
12077
 
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../tags/gcc_4_8_3_release)
12078
 
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../branches/gcc-4_8-branch)
12079
 
@@ -25,8 +25,17 @@
12080
 
 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
12081
 
 #define ENDFILE_SPEC " crtend%O%s crtn%O%s"
12082
 
 
12083
 
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
12084
 
+#define CA53_ERR_835769_SPEC \
12085
 
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
12086
 
+#else
12087
 
+#define CA53_ERR_835769_SPEC \
12088
 
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
12089
 
+#endif
12090
 
+
12091
 
 #ifndef LINK_SPEC
12092
 
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
12093
 
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
12094
 
+                  CA53_ERR_835769_SPEC
12095
 
 #endif
12096
 
 
12097
 
 #endif /* GCC_AARCH64_ELF_RAW_H */
12098
 
Index: gcc/config/aarch64/aarch64-linux.h
12099
 
===================================================================
12100
 
--- a/src/gcc/config/aarch64/aarch64-linux.h    (.../tags/gcc_4_8_3_release)
12101
 
+++ b/src/gcc/config/aarch64/aarch64-linux.h    (.../branches/gcc-4_8-branch)
12102
 
@@ -34,8 +34,17 @@
12103
 
    -X                                          \
12104
 
    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
12105
 
 
12106
 
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
12107
 
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
12108
 
+#define CA53_ERR_835769_SPEC \
12109
 
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
12110
 
+#else
12111
 
+#define CA53_ERR_835769_SPEC \
12112
 
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
12113
 
+#endif
12114
 
 
12115
 
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
12116
 
+                  CA53_ERR_835769_SPEC
12117
 
+
12118
 
 #define TARGET_OS_CPP_BUILTINS()               \
12119
 
   do                                           \
12120
 
     {                                          \
12121
 
@@ -43,4 +52,6 @@
12122
 
     }                                          \
12123
 
   while (0)
12124
 
 
12125
 
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
12126
 
+
12127
 
 #endif  /* GCC_AARCH64_LINUX_H */
12128
 
Index: gcc/config/aarch64/aarch64.h
12129
 
===================================================================
12130
 
--- a/src/gcc/config/aarch64/aarch64.h  (.../tags/gcc_4_8_3_release)
12131
 
+++ b/src/gcc/config/aarch64/aarch64.h  (.../branches/gcc-4_8-branch)
12132
 
@@ -465,6 +465,18 @@
12133
 
   (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
12134
 
 #endif
12135
 
 
12136
 
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
12137
 
+   length so that conditional branching code is updated appropriately.  */
12138
 
+#define ADJUST_INSN_LENGTH(insn, length)       \
12139
 
+  do                                           \
12140
 
+    {                                          \
12141
 
+      if (aarch64_madd_needs_nop (insn))       \
12142
 
+        length += 4;                           \
12143
 
+    } while (0)
12144
 
+
12145
 
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)     \
12146
 
+    aarch64_final_prescan_insn (INSN);                 \
12147
 
+
12148
 
 /* The processor for which instructions should be scheduled.  */
12149
 
 extern enum aarch64_processor aarch64_tune;
12150
 
 
12151
 
Index: gcc/config/rs6000/constraints.md
12152
 
===================================================================
12153
 
--- a/src/gcc/config/rs6000/constraints.md      (.../tags/gcc_4_8_3_release)
12154
 
+++ b/src/gcc/config/rs6000/constraints.md      (.../branches/gcc-4_8-branch)
12155
 
@@ -65,6 +65,20 @@
12156
 
 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
12157
 
   "If -mmfpgpr was used, a floating point register or NO_REGS.")
12158
 
 
12159
 
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
12160
 
+  "Floating point register if direct moves are available, or NO_REGS.")
12161
 
+
12162
 
+;; At present, DImode is not allowed in the Altivec registers.  If in the
12163
 
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
12164
 
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
12165
 
+  "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
12166
 
+
12167
 
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
12168
 
+  "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
12169
 
+
12170
 
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
12171
 
+  "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
12172
 
+
12173
 
 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
12174
 
   "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
12175
 
 
12176
 
@@ -98,7 +112,7 @@
12177
 
   "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
12178
 
 
12179
 
 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
12180
 
-  "VSX vector register to hold scalar float values or NO_REGS.")
12181
 
+  "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
12182
 
 
12183
 
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
12184
 
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
12185
 
Index: gcc/config/rs6000/predicates.md
12186
 
===================================================================
12187
 
--- a/src/gcc/config/rs6000/predicates.md       (.../tags/gcc_4_8_3_release)
12188
 
+++ b/src/gcc/config/rs6000/predicates.md       (.../branches/gcc-4_8-branch)
12189
 
@@ -1795,7 +1795,7 @@
12190
 
 (define_predicate "fusion_gpr_mem_load"
12191
 
   (match_code "mem,sign_extend,zero_extend")
12192
 
 {
12193
 
-  rtx addr;
12194
 
+  rtx addr, base, offset;
12195
 
 
12196
 
   /* Handle sign/zero extend.  */
12197
 
   if (GET_CODE (op) == ZERO_EXTEND
12198
 
@@ -1825,24 +1825,79 @@
12199
 
     }
12200
 
 
12201
 
   addr = XEXP (op, 0);
12202
 
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12203
 
+    return 0;
12204
 
+
12205
 
+  base = XEXP (addr, 0);
12206
 
+  if (!base_reg_operand (base, GET_MODE (base)))
12207
 
+    return 0;
12208
 
+
12209
 
+  offset = XEXP (addr, 1);
12210
 
+
12211
 
   if (GET_CODE (addr) == PLUS)
12212
 
+    return satisfies_constraint_I (offset);
12213
 
+
12214
 
+  else if (GET_CODE (addr) == LO_SUM)
12215
 
     {
12216
 
-      rtx base = XEXP (addr, 0);
12217
 
-      rtx offset = XEXP (addr, 1);
12218
 
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12219
 
+       return small_toc_ref (offset, GET_MODE (offset));
12220
 
 
12221
 
-      return (base_reg_operand (base, GET_MODE (base))
12222
 
-             && satisfies_constraint_I (offset));
12223
 
+      else if (TARGET_ELF && !TARGET_POWERPC64)
12224
 
+       return CONSTANT_P (offset);
12225
 
     }
12226
 
 
12227
 
-  else if (GET_CODE (addr) == LO_SUM)
12228
 
+  return 0;
12229
 
+})
12230
 
+
12231
 
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
12232
 
+;; memory field with both the addis and the memory offset.  Sign extension
12233
 
+;; is not handled here, since lha and lwa are not fused.
12234
 
+(define_predicate "fusion_gpr_mem_combo"
12235
 
+  (match_code "mem,zero_extend")
12236
 
+{
12237
 
+  rtx addr, base, offset;
12238
 
+
12239
 
+  /* Handle zero extend.  */
12240
 
+  if (GET_CODE (op) == ZERO_EXTEND)
12241
 
     {
12242
 
-      rtx base = XEXP (addr, 0);
12243
 
-      rtx offset = XEXP (addr, 1);
12244
 
+      op = XEXP (op, 0);
12245
 
+      mode = GET_MODE (op);
12246
 
+    }
12247
 
 
12248
 
-      if (!base_reg_operand (base, GET_MODE (base)))
12249
 
+  if (!MEM_P (op))
12250
 
+    return 0;
12251
 
+
12252
 
+  switch (mode)
12253
 
+    {
12254
 
+    case QImode:
12255
 
+    case HImode:
12256
 
+    case SImode:
12257
 
+      break;
12258
 
+
12259
 
+    case DImode:
12260
 
+      if (!TARGET_POWERPC64)
12261
 
        return 0;
12262
 
+      break;
12263
 
 
12264
 
-      else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12265
 
+    default:
12266
 
+      return 0;
12267
 
+    }
12268
 
+
12269
 
+  addr = XEXP (op, 0);
12270
 
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12271
 
+    return 0;
12272
 
+
12273
 
+  base = XEXP (addr, 0);
12274
 
+  if (!fusion_gpr_addis (base, GET_MODE (base)))
12275
 
+    return 0;
12276
 
+
12277
 
+  offset = XEXP (addr, 1);
12278
 
+  if (GET_CODE (addr) == PLUS)
12279
 
+    return satisfies_constraint_I (offset);
12280
 
+
12281
 
+  else if (GET_CODE (addr) == LO_SUM)
12282
 
+    {
12283
 
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12284
 
        return small_toc_ref (offset, GET_MODE (offset));
12285
 
 
12286
 
       else if (TARGET_ELF && !TARGET_POWERPC64)
12287
 
Index: gcc/config/rs6000/htm.md
12288
 
===================================================================
12289
 
--- a/src/gcc/config/rs6000/htm.md      (.../tags/gcc_4_8_3_release)
12290
 
+++ b/src/gcc/config/rs6000/htm.md      (.../branches/gcc-4_8-branch)
12291
 
@@ -179,7 +179,7 @@
12292
 
                             (const_int 0)]
12293
 
                            UNSPECV_HTM_TABORTWCI))
12294
 
    (set (subreg:CC (match_dup 2) 0) (match_dup 1))
12295
 
-   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
12296
 
+   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
12297
 
    (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
12298
 
                   (and:SI (match_dup 3) (const_int 15)))
12299
 
               (clobber (scratch:CC))])]
12300
 
Index: gcc/config/rs6000/freebsd64.h
12301
 
===================================================================
12302
 
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
12303
 
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
12304
 
@@ -367,7 +367,7 @@
12305
 
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
12306
 
 #undef  ADJUST_FIELD_ALIGN
12307
 
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
12308
 
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
12309
 
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
12310
 
    ? 128                                                                \
12311
 
    : (TARGET_64BIT                                                      \
12312
 
       && TARGET_ALIGN_NATURAL == 0                                      \
12313
 
Index: gcc/config/rs6000/rs6000-protos.h
12314
 
===================================================================
12315
 
--- a/src/gcc/config/rs6000/rs6000-protos.h     (.../tags/gcc_4_8_3_release)
12316
 
+++ b/src/gcc/config/rs6000/rs6000-protos.h     (.../branches/gcc-4_8-branch)
12317
 
@@ -65,6 +65,7 @@
12318
 
 extern void altivec_expand_stvex_be (rtx, rtx, enum machine_mode, unsigned);
12319
 
 extern void rs6000_expand_extract_even (rtx, rtx, rtx);
12320
 
 extern void rs6000_expand_interleave (rtx, rtx, rtx, bool);
12321
 
+extern void rs6000_scale_v2df (rtx, rtx, int);
12322
 
 extern void build_mask64_2_operands (rtx, rtx *);
12323
 
 extern int expand_block_clear (rtx[]);
12324
 
 extern int expand_block_move (rtx[]);
12325
 
@@ -79,9 +80,9 @@
12326
 
 extern bool gpr_or_gpr_p (rtx, rtx);
12327
 
 extern bool direct_move_p (rtx, rtx);
12328
 
 extern bool quad_load_store_p (rtx, rtx);
12329
 
-extern bool fusion_gpr_load_p (rtx *, bool);
12330
 
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
12331
 
 extern void expand_fusion_gpr_load (rtx *);
12332
 
-extern const char *emit_fusion_gpr_load (rtx *);
12333
 
+extern const char *emit_fusion_gpr_load (rtx, rtx);
12334
 
 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
12335
 
                                                            enum reg_class);
12336
 
 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
12337
 
@@ -153,6 +154,7 @@
12338
 
 
12339
 
 #ifdef TREE_CODE
12340
 
 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
12341
 
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
12342
 
 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
12343
 
                                                     unsigned int);
12344
 
 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
12345
 
@@ -161,7 +163,7 @@
12346
 
 extern rtx rs6000_libcall_value (enum machine_mode);
12347
 
 extern rtx rs6000_va_arg (tree, tree);
12348
 
 extern int function_ok_for_sibcall (tree);
12349
 
-extern int rs6000_reg_parm_stack_space (tree);
12350
 
+extern int rs6000_reg_parm_stack_space (tree, bool);
12351
 
 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
12352
 
 extern bool rs6000_elf_in_small_data_p (const_tree);
12353
 
 #ifdef ARGS_SIZE_RTX
12354
 
Index: gcc/config/rs6000/xcoff.h
12355
 
===================================================================
12356
 
--- a/src/gcc/config/rs6000/xcoff.h     (.../tags/gcc_4_8_3_release)
12357
 
+++ b/src/gcc/config/rs6000/xcoff.h     (.../branches/gcc-4_8-branch)
12358
 
@@ -1,6 +1,6 @@
12359
 
 /* Definitions of target machine for GNU compiler,
12360
 
    for some generic XCOFF file format
12361
 
-   Copyright (C) 2001-2013 Free Software Foundation, Inc.
12362
 
+   Copyright (C) 2001-2014 Free Software Foundation, Inc.
12363
 
 
12364
 
    This file is part of GCC.
12365
 
 
12366
 
@@ -304,14 +304,15 @@
12367
 
   do { fputs (LOCAL_COMMON_ASM_OP, (FILE));                    \
12368
 
        RS6000_OUTPUT_BASENAME ((FILE), (NAME));                        \
12369
 
        if ((ALIGN) > 32)                                       \
12370
 
-        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,%u\n",    \
12371
 
+        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s%u_,%u\n", \
12372
 
                  (SIZE), xcoff_bss_section_name,                       \
12373
 
+                 floor_log2 ((ALIGN) / BITS_PER_UNIT),                 \
12374
 
                  floor_log2 ((ALIGN) / BITS_PER_UNIT));                \
12375
 
        else if ((SIZE) > 4)                                    \
12376
 
-        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,3\n",     \
12377
 
+        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s3_,3\n",   \
12378
 
                  (SIZE), xcoff_bss_section_name);              \
12379
 
        else                                                    \
12380
 
-        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s\n",       \
12381
 
+        fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,2\n",     \
12382
 
                  (SIZE), xcoff_bss_section_name);              \
12383
 
      } while (0)
12384
 
 #endif
12385
 
Index: gcc/config/rs6000/rs6000-builtin.def
12386
 
===================================================================
12387
 
--- a/src/gcc/config/rs6000/rs6000-builtin.def  (.../tags/gcc_4_8_3_release)
12388
 
+++ b/src/gcc/config/rs6000/rs6000-builtin.def  (.../branches/gcc-4_8-branch)
12389
 
@@ -622,20 +622,13 @@
12390
 
                     | RS6000_BTC_TERNARY),                             \
12391
 
                    CODE_FOR_ ## ICODE)                 /* ICODE */
12392
 
 
12393
 
-/* Miscellaneous builtins.  */
12394
 
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE)                             \
12395
 
+/* 128-bit long double floating point builtins.  */
12396
 
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE)                          \
12397
 
   RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
12398
 
                    "__builtin_" NAME,                  /* NAME */      \
12399
 
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
12400
 
+                   (RS6000_BTM_HARD_FLOAT              /* MASK */      \
12401
 
+                    | RS6000_BTM_LDBL128),                             \
12402
 
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
12403
 
-                    | RS6000_BTC_UNARY),                               \
12404
 
-                   CODE_FOR_ ## ICODE)                 /* ICODE */
12405
 
-
12406
 
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE)                             \
12407
 
-  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
12408
 
-                   "__builtin_" NAME,                  /* NAME */      \
12409
 
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
12410
 
-                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
12411
 
                     | RS6000_BTC_BINARY),                              \
12412
 
                    CODE_FOR_ ## ICODE)                 /* ICODE */
12413
 
 
12414
 
@@ -1265,7 +1258,17 @@
12415
 
 BU_VSX_2 (VEC_MERGEL_V2DI,    "mergel_2di",    CONST,  vsx_mergel_v2di)
12416
 
 BU_VSX_2 (VEC_MERGEH_V2DF,    "mergeh_2df",    CONST,  vsx_mergeh_v2df)
12417
 
 BU_VSX_2 (VEC_MERGEH_V2DI,    "mergeh_2di",    CONST,  vsx_mergeh_v2di)
12418
 
+BU_VSX_2 (XXSPLTD_V2DF,       "xxspltd_2df",    CONST,  vsx_xxspltd_v2df)
12419
 
+BU_VSX_2 (XXSPLTD_V2DI,       "xxspltd_2di",    CONST,  vsx_xxspltd_v2di)
12420
 
+BU_VSX_2 (DIV_V2DI,           "div_2di",        CONST,  vsx_div_v2di)
12421
 
+BU_VSX_2 (UDIV_V2DI,          "udiv_2di",       CONST,  vsx_udiv_v2di)
12422
 
+BU_VSX_2 (MUL_V2DI,           "mul_2di",        CONST,  vsx_mul_v2di)
12423
 
 
12424
 
+BU_VSX_2 (XVCVSXDDP_SCALE,    "xvcvsxddp_scale", CONST, vsx_xvcvsxddp_scale)
12425
 
+BU_VSX_2 (XVCVUXDDP_SCALE,    "xvcvuxddp_scale", CONST, vsx_xvcvuxddp_scale)
12426
 
+BU_VSX_2 (XVCVDPSXDS_SCALE,   "xvcvdpsxds_scale", CONST, vsx_xvcvdpsxds_scale)
12427
 
+BU_VSX_2 (XVCVDPUXDS_SCALE,   "xvcvdpuxds_scale", CONST, vsx_xvcvdpuxds_scale)
12428
 
+
12429
 
 /* VSX abs builtin functions.  */
12430
 
 BU_VSX_A (XVABSDP,           "xvabsdp",        CONST,  absv2df2)
12431
 
 BU_VSX_A (XVNABSDP,          "xvnabsdp",       CONST,  vsx_nabsv2df2)
12432
 
@@ -1593,10 +1596,8 @@
12433
 
 BU_DFP_MISC_2 (PACK_TD,                "pack_dec128",          CONST,  packtd)
12434
 
 BU_DFP_MISC_2 (UNPACK_TD,      "unpack_dec128",        CONST,  unpacktd)
12435
 
 
12436
 
-BU_MISC_2 (PACK_TF,            "pack_longdouble",      CONST,  packtf)
12437
 
-BU_MISC_2 (UNPACK_TF,          "unpack_longdouble",    CONST,  unpacktf)
12438
 
-BU_MISC_1 (UNPACK_TF_0,                "longdouble_dw0",       CONST,  unpacktf_0)
12439
 
-BU_MISC_1 (UNPACK_TF_1,                "longdouble_dw1",       CONST,  unpacktf_1)
12440
 
+BU_LDBL128_2 (PACK_TF,         "pack_longdouble",      CONST,  packtf)
12441
 
+BU_LDBL128_2 (UNPACK_TF,       "unpack_longdouble",    CONST,  unpacktf)
12442
 
 
12443
 
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
12444
 
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
12445
 
Index: gcc/config/rs6000/rs6000-c.c
12446
 
===================================================================
12447
 
--- a/src/gcc/config/rs6000/rs6000-c.c  (.../tags/gcc_4_8_3_release)
12448
 
+++ b/src/gcc/config/rs6000/rs6000-c.c  (.../branches/gcc-4_8-branch)
12449
 
@@ -595,6 +595,8 @@
12450
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0, 0 },
12451
 
   { ALTIVEC_BUILTIN_VEC_ROUND, ALTIVEC_BUILTIN_VRFIN,
12452
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0, 0 },
12453
 
+  { ALTIVEC_BUILTIN_VEC_ROUND, VSX_BUILTIN_XVRDPI,
12454
 
+    RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0, 0 },
12455
 
   { ALTIVEC_BUILTIN_VEC_RECIP, ALTIVEC_BUILTIN_VRECIPFP,
12456
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12457
 
   { ALTIVEC_BUILTIN_VEC_RECIP, VSX_BUILTIN_RECIP_V2DF,
12458
 
@@ -875,6 +877,18 @@
12459
 
   { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12460
 
     RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12461
 
   { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12462
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12463
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12464
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12465
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12466
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12467
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12468
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12469
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12470
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12471
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12472
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12473
 
+  { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12474
 
     RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12475
 
   { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12476
 
     RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12477
 
@@ -929,6 +943,18 @@
12478
 
   { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12479
 
     RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12480
 
   { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12481
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12482
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12483
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12484
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12485
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12486
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12487
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12488
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12489
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12490
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12491
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12492
 
+  { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12493
 
     RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12494
 
   { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12495
 
     RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12496
 
@@ -1116,6 +1142,10 @@
12497
 
     RS6000_BTI_V4SF, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12498
 
   { ALTIVEC_BUILTIN_VEC_CTF, ALTIVEC_BUILTIN_VCFSX,
12499
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SI, RS6000_BTI_INTSI, 0 },
12500
 
+  { ALTIVEC_BUILTIN_VEC_CTF, VSX_BUILTIN_XVCVSXDDP_SCALE,
12501
 
+    RS6000_BTI_V2DF, RS6000_BTI_V2DI, RS6000_BTI_INTSI, 0},
12502
 
+  { ALTIVEC_BUILTIN_VEC_CTF, VSX_BUILTIN_XVCVUXDDP_SCALE,
12503
 
+    RS6000_BTI_V2DF, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, 0},
12504
 
   { ALTIVEC_BUILTIN_VEC_VCFSX, ALTIVEC_BUILTIN_VCFSX,
12505
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SI, RS6000_BTI_INTSI, 0 },
12506
 
   { ALTIVEC_BUILTIN_VEC_VCFUX, ALTIVEC_BUILTIN_VCFUX,
12507
 
@@ -1122,12 +1152,20 @@
12508
 
     RS6000_BTI_V4SF, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12509
 
   { ALTIVEC_BUILTIN_VEC_CTS, ALTIVEC_BUILTIN_VCTSXS,
12510
 
     RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12511
 
+  { ALTIVEC_BUILTIN_VEC_CTS, VSX_BUILTIN_XVCVDPSXDS_SCALE,
12512
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12513
 
   { ALTIVEC_BUILTIN_VEC_CTU, ALTIVEC_BUILTIN_VCTUXS,
12514
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12515
 
+  { ALTIVEC_BUILTIN_VEC_CTU, VSX_BUILTIN_XVCVDPUXDS_SCALE,
12516
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12517
 
   { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_XVDIVSP,
12518
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12519
 
   { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_XVDIVDP,
12520
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12521
 
+  { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_DIV_V2DI,
12522
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12523
 
+  { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_UDIV_V2DI,
12524
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12525
 
   { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX_V2DF,
12526
 
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
12527
 
   { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX_V2DI,
12528
 
@@ -1593,6 +1631,16 @@
12529
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12530
 
   { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12531
 
     RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12532
 
+  { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12533
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12534
 
+  { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12535
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12536
 
+  { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12537
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12538
 
+  { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12539
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12540
 
+  { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12541
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12542
 
   { ALTIVEC_BUILTIN_VEC_VMRGHW, ALTIVEC_BUILTIN_VMRGHW,
12543
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12544
 
   { ALTIVEC_BUILTIN_VEC_VMRGHW, ALTIVEC_BUILTIN_VMRGHW,
12545
 
@@ -1641,6 +1689,16 @@
12546
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12547
 
   { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12548
 
     RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12549
 
+  { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12550
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12551
 
+  { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12552
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12553
 
+  { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12554
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12555
 
+  { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12556
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12557
 
+  { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12558
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12559
 
   { ALTIVEC_BUILTIN_VEC_VMRGLW, ALTIVEC_BUILTIN_VMRGLW,
12560
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12561
 
   { ALTIVEC_BUILTIN_VEC_VMRGLW, ALTIVEC_BUILTIN_VMRGLW,
12562
 
@@ -1769,6 +1827,10 @@
12563
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12564
 
   { VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_XVMULDP,
12565
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12566
 
+  { VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_MUL_V2DI,
12567
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12568
 
+  { VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_MUL_V2DI,
12569
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12570
 
   { ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULEUB,
12571
 
     RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
12572
 
   { ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULESB,
12573
 
@@ -1810,6 +1872,18 @@
12574
 
   { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12575
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12576
 
   { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12577
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12578
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12579
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12580
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12581
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12582
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12583
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12584
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12585
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12586
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12587
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12588
 
+  { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12589
 
     RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12590
 
   { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12591
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
12592
 
@@ -1840,6 +1914,18 @@
12593
 
   { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12594
 
     RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12595
 
   { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12596
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12597
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12598
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12599
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12600
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12601
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12602
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12603
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12604
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12605
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12606
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12607
 
+  { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12608
 
     RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12609
 
   { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12610
 
     RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12611
 
@@ -1943,6 +2029,8 @@
12612
 
     RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12613
 
   { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
12614
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12615
 
+  { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
12616
 
+    RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12617
 
   { ALTIVEC_BUILTIN_VEC_VPKSWUS, ALTIVEC_BUILTIN_VPKSWUS,
12618
 
     RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12619
 
   { ALTIVEC_BUILTIN_VEC_VPKSHUS, ALTIVEC_BUILTIN_VPKSHUS,
12620
 
@@ -2125,6 +2213,14 @@
12621
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12622
 
   { ALTIVEC_BUILTIN_VEC_SPLAT, ALTIVEC_BUILTIN_VSPLTW,
12623
 
     RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, 0 },
12624
 
+  { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DF,
12625
 
+    RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12626
 
+  { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12627
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_INTSI, 0 },
12628
 
+  { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12629
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, 0 },
12630
 
+  { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12631
 
+    RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, 0 },
12632
 
   { ALTIVEC_BUILTIN_VEC_VSPLTW, ALTIVEC_BUILTIN_VSPLTW,
12633
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12634
 
   { ALTIVEC_BUILTIN_VEC_VSPLTW, ALTIVEC_BUILTIN_VSPLTW,
12635
 
@@ -2517,6 +2613,18 @@
12636
 
   { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12637
 
     RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12638
 
   { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12639
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12640
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12641
 
+    RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12642
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12643
 
+    RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12644
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12645
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12646
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12647
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12648
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12649
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12650
 
+  { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12651
 
     RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12652
 
   { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12653
 
     RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12654
 
@@ -2776,6 +2884,8 @@
12655
 
     RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_unsigned_V16QI },
12656
 
   { ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_2DI,
12657
 
     RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V16QI },
12658
 
+  { ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_2DI,
12659
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V16QI },
12660
 
   { ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_4SF,
12661
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_unsigned_V16QI },
12662
 
   { ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_4SI,
12663
 
@@ -2816,6 +2926,12 @@
12664
 
     RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V2DI },
12665
 
   { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12666
 
     RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI },
12667
 
+  { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12668
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI },
12669
 
+  { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12670
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI },
12671
 
+  { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12672
 
+    RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_V2DI },
12673
 
   { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_4SF,
12674
 
     RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI },
12675
 
   { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_4SF,
12676
 
@@ -3265,6 +3381,8 @@
12677
 
 
12678
 
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
12679
 
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
12680
 
+  { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
12681
 
+    RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
12682
 
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
12683
 
     RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
12684
 
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
12685
 
@@ -3319,6 +3437,8 @@
12686
 
 
12687
 
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
12688
 
     RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
12689
 
+  { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
12690
 
+    RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
12691
 
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
12692
 
     RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
12693
 
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
12694
 
@@ -3429,6 +3549,18 @@
12695
 
     RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI },
12696
 
   { ALTIVEC_BUILTIN_VEC_VCMPGT_P, ALTIVEC_BUILTIN_VCMPGTSW_P,
12697
 
     RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SI, RS6000_BTI_V4SI },
12698
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12699
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI },
12700
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12701
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI },
12702
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12703
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI },
12704
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12705
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI },
12706
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12707
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI },
12708
 
+  { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12709
 
+    RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V2DI, RS6000_BTI_V2DI },
12710
 
   { ALTIVEC_BUILTIN_VEC_VCMPGT_P, ALTIVEC_BUILTIN_VCMPGTFP_P,
12711
 
     RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SF, RS6000_BTI_V4SF },
12712
 
   { ALTIVEC_BUILTIN_VEC_VCMPGT_P, VSX_BUILTIN_XVCMPGTDP_P,
12713
 
@@ -3887,6 +4019,8 @@
12714
 
   { P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VMRGEW,
12715
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
12716
 
     RS6000_BTI_unsigned_V4SI, 0 },
12717
 
+  { P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VMRGEW,
12718
 
+    RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12719
 
 
12720
 
   { P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12721
 
     RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12722
 
@@ -3893,6 +4027,8 @@
12723
 
   { P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12724
 
     RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
12725
 
     RS6000_BTI_unsigned_V4SI, 0 },
12726
 
+  { P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12727
 
+    RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12728
 
 
12729
 
   { P8V_BUILTIN_VEC_VPOPCNT, P8V_BUILTIN_VPOPCNTB,
12730
 
     RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 },
12731
 
@@ -4126,7 +4262,8 @@
12732
 
      argument) is reversed.  Patch the arguments here before building
12733
 
      the resolved CALL_EXPR.  */
12734
 
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
12735
 
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
12736
 
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
12737
 
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
12738
 
     {
12739
 
       tree t;
12740
 
       t = args[2], args[2] = args[1], args[1] = t;
12741
 
@@ -4184,6 +4321,14 @@
12742
 
   if (TARGET_DEBUG_BUILTIN)
12743
 
     fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
12744
 
             (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
12745
 
12746
 
+  /* vec_lvsl and vec_lvsr are deprecated for use with LE element order.  */
12747
 
+  if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
12748
 
+    warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
12749
 
+assignment for unaligned loads and stores");
12750
 
+  else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
12751
 
+    warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
12752
 
+assignment for unaligned loads and stores");
12753
 
 
12754
 
   /* For now treat vec_splats and vec_promote as the same.  */
12755
 
   if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
12756
 
Index: gcc/config/rs6000/linux64.h
12757
 
===================================================================
12758
 
--- a/src/gcc/config/rs6000/linux64.h   (.../tags/gcc_4_8_3_release)
12759
 
+++ b/src/gcc/config/rs6000/linux64.h   (.../branches/gcc-4_8-branch)
12760
 
@@ -246,7 +246,7 @@
12761
 
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
12762
 
 #undef  ADJUST_FIELD_ALIGN
12763
 
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
12764
 
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)    \
12765
 
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
12766
 
    ? 128                                                               \
12767
 
    : (TARGET_64BIT                                                     \
12768
 
       && TARGET_ALIGN_NATURAL == 0                                     \
12769
 
Index: gcc/config/rs6000/rs6000.c
12770
 
===================================================================
12771
 
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_8_3_release)
12772
 
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_8-branch)
12773
 
@@ -60,6 +60,7 @@
12774
 
 #include "opts.h"
12775
 
 #include "tree-vectorizer.h"
12776
 
 #include "dumpfile.h"
12777
 
+#include "real.h"
12778
 
 #if TARGET_XCOFF
12779
 
 #include "xcoffout.h"  /* get declarations of xcoff_*_section_name */
12780
 
 #endif
12781
 
@@ -369,6 +370,7 @@
12782
 
   enum insn_code reload_gpr_vsx;       /* INSN to move from GPR to VSX.  */
12783
 
   enum insn_code reload_vsx_gpr;       /* INSN to move from VSX to GPR.  */
12784
 
   addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks.  */
12785
 
+  bool scalar_in_vmx_p;                        /* Scalar value can go in VMX.  */
12786
 
 };
12787
 
 
12788
 
 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
12789
 
@@ -1704,8 +1706,7 @@
12790
 
      asked for it.  */
12791
 
   if (TARGET_VSX && VSX_REGNO_P (regno)
12792
 
       && (VECTOR_MEM_VSX_P (mode)
12793
 
-         || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
12794
 
-         || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
12795
 
+         || reg_addr[mode].scalar_in_vmx_p
12796
 
          || (TARGET_VSX_TIMODE && mode == TImode)
12797
 
          || (TARGET_VADDUQM && mode == V1TImode)))
12798
 
     {
12799
 
@@ -1714,12 +1715,9 @@
12800
 
 
12801
 
       if (ALTIVEC_REGNO_P (regno))
12802
 
        {
12803
 
-         if (mode == SFmode && !TARGET_UPPER_REGS_SF)
12804
 
+         if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
12805
 
            return 0;
12806
 
 
12807
 
-         if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
12808
 
-           return 0;
12809
 
-
12810
 
          return ALTIVEC_REGNO_P (last_regno);
12811
 
        }
12812
 
     }
12813
 
@@ -1897,14 +1895,16 @@
12814
 
   if (rs6000_vector_unit[m] != VECTOR_NONE
12815
 
       || rs6000_vector_mem[m] != VECTOR_NONE
12816
 
       || (reg_addr[m].reload_store != CODE_FOR_nothing)
12817
 
-      || (reg_addr[m].reload_load != CODE_FOR_nothing))
12818
 
+      || (reg_addr[m].reload_load != CODE_FOR_nothing)
12819
 
+      || reg_addr[m].scalar_in_vmx_p)
12820
 
     {
12821
 
       fprintf (stderr,
12822
 
-              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
12823
 
+              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
12824
 
               rs6000_debug_vector_unit (rs6000_vector_unit[m]),
12825
 
               rs6000_debug_vector_unit (rs6000_vector_mem[m]),
12826
 
               (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
12827
 
-              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
12828
 
+              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
12829
 
+              (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
12830
 
     }
12831
 
 
12832
 
   fputs ("\n", stderr);
12833
 
@@ -2021,6 +2021,10 @@
12834
 
           "wd reg_class = %s\n"
12835
 
           "wf reg_class = %s\n"
12836
 
           "wg reg_class = %s\n"
12837
 
+          "wh reg_class = %s\n"
12838
 
+          "wi reg_class = %s\n"
12839
 
+          "wj reg_class = %s\n"
12840
 
+          "wk reg_class = %s\n"
12841
 
           "wl reg_class = %s\n"
12842
 
           "wm reg_class = %s\n"
12843
 
           "wr reg_class = %s\n"
12844
 
@@ -2040,6 +2044,10 @@
12845
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
12846
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
12847
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
12848
 
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
12849
 
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
12850
 
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
12851
 
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
12852
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
12853
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
12854
 
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
12855
 
@@ -2324,6 +2332,8 @@
12856
 
 
12857
 
   for (m = 0; m < NUM_MACHINE_MODES; ++m)
12858
 
     {
12859
 
+      enum machine_mode m2 = (enum machine_mode)m;
12860
 
+
12861
 
       /* SDmode is special in that we want to access it only via REG+REG
12862
 
         addressing on power7 and above, since we want to use the LFIWZX and
12863
 
         STFIWZX instructions to load it.  */
12864
 
@@ -2358,13 +2368,12 @@
12865
 
 
12866
 
              if (TARGET_UPDATE
12867
 
                  && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
12868
 
-                 && GET_MODE_SIZE (m) <= 8
12869
 
-                 && !VECTOR_MODE_P (m)
12870
 
-                 && !COMPLEX_MODE_P (m)
12871
 
+                 && GET_MODE_SIZE (m2) <= 8
12872
 
+                 && !VECTOR_MODE_P (m2)
12873
 
+                 && !COMPLEX_MODE_P (m2)
12874
 
                  && !indexed_only_p
12875
 
-                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
12876
 
-                 && !(m == DFmode && TARGET_UPPER_REGS_DF)
12877
 
-                 && !(m == SFmode && TARGET_UPPER_REGS_SF))
12878
 
+                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
12879
 
+                 && !reg_addr[m2].scalar_in_vmx_p)
12880
 
                {
12881
 
                  addr_mask |= RELOAD_REG_PRE_INCDEC;
12882
 
 
12883
 
@@ -2595,16 +2604,22 @@
12884
 
        f  - Register class to use with traditional SFmode instructions.
12885
 
        v  - Altivec register.
12886
 
        wa - Any VSX register.
12887
 
+       wc - Reserved to represent individual CR bits (used in LLVM).
12888
 
        wd - Preferred register class for V2DFmode.
12889
 
        wf - Preferred register class for V4SFmode.
12890
 
        wg - Float register for power6x move insns.
12891
 
+       wh - FP register for direct move instructions.
12892
 
+       wi - FP or VSX register to hold 64-bit integers for VSX insns.
12893
 
+       wj - FP or VSX register to hold 64-bit integers for direct moves.
12894
 
+       wk - FP or VSX register to hold 64-bit doubles for direct moves.
12895
 
        wl - Float register if we can do 32-bit signed int loads.
12896
 
        wm - VSX register for ISA 2.07 direct move operations.
12897
 
+       wn - always NO_REGS.
12898
 
        wr - GPR if 64-bit mode is permitted.
12899
 
        ws - Register class to do ISA 2.06 DF operations.
12900
 
+       wt - VSX register for TImode in VSX registers.
12901
 
        wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
12902
 
        wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
12903
 
-       wt - VSX register for TImode in VSX registers.
12904
 
        ww - Register class to do SF conversions in with VSX operations.
12905
 
        wx - Float register if we can do 32-bit int stores.
12906
 
        wy - Register class to do ISA 2.07 SF operations.
12907
 
@@ -2611,21 +2626,22 @@
12908
 
        wz - Float register if we can do 32-bit unsigned int loads.  */
12909
 
 
12910
 
   if (TARGET_HARD_FLOAT && TARGET_FPRS)
12911
 
-    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
12912
 
+    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;      /* SFmode  */
12913
 
 
12914
 
   if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
12915
 
-    rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
12916
 
+    rs6000_constraints[RS6000_CONSTRAINT_d]  = FLOAT_REGS;     /* DFmode  */
12917
 
 
12918
 
   if (TARGET_VSX)
12919
 
     {
12920
 
       rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
12921
 
-      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
12922
 
-      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
12923
 
+      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;     /* V2DFmode  */
12924
 
+      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;     /* V4SFmode  */
12925
 
+      rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS;   /* DImode  */
12926
 
 
12927
 
       if (TARGET_VSX_TIMODE)
12928
 
-       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
12929
 
+       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;    /* TImode  */
12930
 
 
12931
 
-      if (TARGET_UPPER_REGS_DF)
12932
 
+      if (TARGET_UPPER_REGS_DF)                                        /* DFmode  */
12933
 
        {
12934
 
          rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
12935
 
          rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
12936
 
@@ -2639,19 +2655,26 @@
12937
 
   if (TARGET_ALTIVEC)
12938
 
     rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
12939
 
 
12940
 
-  if (TARGET_MFPGPR)
12941
 
+  if (TARGET_MFPGPR)                                           /* DFmode  */
12942
 
     rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
12943
 
 
12944
 
   if (TARGET_LFIWAX)
12945
 
-    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
12946
 
+    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;     /* DImode  */
12947
 
 
12948
 
   if (TARGET_DIRECT_MOVE)
12949
 
-    rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12950
 
+    {
12951
 
+      rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
12952
 
+      rs6000_constraints[RS6000_CONSTRAINT_wj]                 /* DImode  */
12953
 
+       = rs6000_constraints[RS6000_CONSTRAINT_wi];
12954
 
+      rs6000_constraints[RS6000_CONSTRAINT_wk]                 /* DFmode  */
12955
 
+       = rs6000_constraints[RS6000_CONSTRAINT_ws];
12956
 
+      rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12957
 
+    }
12958
 
 
12959
 
   if (TARGET_POWERPC64)
12960
 
     rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
12961
 
 
12962
 
-  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
12963
 
+  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
12964
 
     {
12965
 
       rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
12966
 
       rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
12967
 
@@ -2666,10 +2689,10 @@
12968
 
     rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
12969
 
 
12970
 
   if (TARGET_STFIWX)
12971
 
-    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
12972
 
+    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;     /* DImode  */
12973
 
 
12974
 
   if (TARGET_LFIWZX)
12975
 
-    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
12976
 
+    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;     /* DImode  */
12977
 
 
12978
 
   /* Set up the reload helper and direct move functions.  */
12979
 
   if (TARGET_VSX || TARGET_ALTIVEC)
12980
 
@@ -2692,10 +2715,11 @@
12981
 
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_di_load;
12982
 
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
12983
 
            {
12984
 
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_di_store;
12985
 
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_di_load;
12986
 
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_di_store;
12987
 
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_di_load;
12988
 
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_di_store;
12989
 
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_di_load;
12990
 
+             reg_addr[DFmode].scalar_in_vmx_p = true;
12991
 
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_di_store;
12992
 
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_di_load;
12993
 
            }
12994
 
          if (TARGET_P8_VECTOR)
12995
 
            {
12996
 
@@ -2703,6 +2727,8 @@
12997
 
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_di_load;
12998
 
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_di_store;
12999
 
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_di_load;
13000
 
+             if (TARGET_UPPER_REGS_SF)
13001
 
+               reg_addr[SFmode].scalar_in_vmx_p = true;
13002
 
            }
13003
 
          if (TARGET_VSX_TIMODE)
13004
 
            {
13005
 
@@ -2759,10 +2785,11 @@
13006
 
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_si_load;
13007
 
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
13008
 
            {
13009
 
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_si_store;
13010
 
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_si_load;
13011
 
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_si_store;
13012
 
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_si_load;
13013
 
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_si_store;
13014
 
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_si_load;
13015
 
+             reg_addr[DFmode].scalar_in_vmx_p = true;
13016
 
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_si_store;
13017
 
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_si_load;
13018
 
            }
13019
 
          if (TARGET_P8_VECTOR)
13020
 
            {
13021
 
@@ -2770,6 +2797,8 @@
13022
 
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_si_load;
13023
 
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_si_store;
13024
 
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_si_load;
13025
 
+             if (TARGET_UPPER_REGS_SF)
13026
 
+               reg_addr[SFmode].scalar_in_vmx_p = true;
13027
 
            }
13028
 
          if (TARGET_VSX_TIMODE)
13029
 
            {
13030
 
@@ -2810,6 +2839,7 @@
13031
 
 
13032
 
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
13033
 
        {
13034
 
+         enum machine_mode m2 = (enum machine_mode)m;
13035
 
          int reg_size2 = reg_size;
13036
 
 
13037
 
          /* TFmode/TDmode always takes 2 registers, even in VSX.  */
13038
 
@@ -2818,7 +2848,7 @@
13039
 
            reg_size2 = UNITS_PER_FP_WORD;
13040
 
 
13041
 
          rs6000_class_max_nregs[m][c]
13042
 
-           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
13043
 
+           = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
13044
 
        }
13045
 
     }
13046
 
 
13047
 
@@ -3014,7 +3044,8 @@
13048
 
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
13049
 
          | ((TARGET_HTM)                   ? RS6000_BTM_HTM       : 0)
13050
 
          | ((TARGET_DFP)                   ? RS6000_BTM_DFP       : 0)
13051
 
-         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0));
13052
 
+         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0)
13053
 
+         | ((TARGET_LONG_DOUBLE_128)       ? RS6000_BTM_LDBL128 : 0));
13054
 
 }
13055
 
 
13056
 
 /* Override command line options.  Mostly we process the processor type and
13057
 
@@ -5861,6 +5892,34 @@
13058
 
   return align;
13059
 
 }
13060
 
 
13061
 
+/* Previous GCC releases forced all vector types to have 16-byte alignment.  */
13062
 
+
13063
 
+bool
13064
 
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
13065
 
+{
13066
 
+  if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
13067
 
+    {
13068
 
+      if (computed != 128)
13069
 
+       {
13070
 
+         static bool warned;
13071
 
+         if (!warned && warn_psabi)
13072
 
+           {
13073
 
+             warned = true;
13074
 
+             inform (input_location,
13075
 
+                     "the layout of aggregates containing vectors with"
13076
 
+                     " %d-byte alignment will change in a future GCC release",
13077
 
+                     computed / BITS_PER_UNIT);
13078
 
+           }
13079
 
+       }
13080
 
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
13081
 
+        keep the special treatment of vector types, but warn if there will
13082
 
+        be differences in future GCC releases.  */
13083
 
+      return true;
13084
 
+    }
13085
 
+
13086
 
+  return false;
13087
 
+}
13088
 
+
13089
 
 /* AIX increases natural record alignment to doubleword if the first
13090
 
    field is an FP double while the FP fields remain word aligned.  */
13091
 
 
13092
 
@@ -6109,7 +6168,8 @@
13093
 
     return false;
13094
 
 
13095
 
   extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
13096
 
-  gcc_assert (extra >= 0);
13097
 
+  if (extra < 0)
13098
 
+    extra = 0;
13099
 
 
13100
 
   if (GET_CODE (addr) == LO_SUM)
13101
 
     /* For lo_sum addresses, we must allow any offset except one that
13102
 
@@ -6818,24 +6878,6 @@
13103
 
   if (GET_CODE (y) == UNSPEC
13104
 
       && XINT (y, 1) == UNSPEC_TOCREL)
13105
 
     {
13106
 
-#ifdef ENABLE_CHECKING
13107
 
-      if (REG_P (XVECEXP (y, 0, 1))
13108
 
-         && REGNO (XVECEXP (y, 0, 1)) == TOC_REGISTER)
13109
 
-       {
13110
 
-         /* All good.  */
13111
 
-       }
13112
 
-      else if (GET_CODE (XVECEXP (y, 0, 1)) == DEBUG_EXPR)
13113
 
-       {
13114
 
-         /* Weirdness alert.  df_note_compute can replace r2 with a
13115
 
-            debug_expr when this unspec is in a debug_insn.
13116
 
-            Seen in gcc.dg/pr51957-1.c  */
13117
 
-       }
13118
 
-      else
13119
 
-       {
13120
 
-         debug_rtx (orig_x);
13121
 
-         abort ();
13122
 
-       }
13123
 
-#endif
13124
 
       y = XVECEXP (y, 0, 0);
13125
 
 
13126
 
 #ifdef HAVE_AS_TLS
13127
 
@@ -9198,14 +9240,51 @@
13128
 
           || (type && TREE_CODE (type) == VECTOR_TYPE
13129
 
               && int_size_in_bytes (type) >= 16))
13130
 
     return 128;
13131
 
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
13132
 
-           || DEFAULT_ABI == ABI_ELFv2
13133
 
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
13134
 
-          && mode == BLKmode
13135
 
-          && type && TYPE_ALIGN (type) > 64)
13136
 
+
13137
 
+  /* Aggregate types that need > 8 byte alignment are quadword-aligned
13138
 
+     in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
13139
 
+     -mcompat-align-parm is used.  */
13140
 
+  if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
13141
 
+       || DEFAULT_ABI == ABI_ELFv2)
13142
 
+      && type && TYPE_ALIGN (type) > 64)
13143
 
+    {
13144
 
+      /* "Aggregate" means any AGGREGATE_TYPE except for single-element
13145
 
+         or homogeneous float/vector aggregates here.  We already handled
13146
 
+         vector aggregates above, but still need to check for float here. */
13147
 
+      bool aggregate_p = (AGGREGATE_TYPE_P (type)
13148
 
+                         && !SCALAR_FLOAT_MODE_P (elt_mode));
13149
 
+
13150
 
+      /* We used to check for BLKmode instead of the above aggregate type
13151
 
+        check.  Warn when this results in any difference to the ABI.  */
13152
 
+      if (aggregate_p != (mode == BLKmode))
13153
 
+       {
13154
 
+         static bool warned;
13155
 
+         if (!warned && warn_psabi)
13156
 
+           {
13157
 
+             warned = true;
13158
 
+             inform (input_location,
13159
 
+                     "the ABI of passing aggregates with %d-byte alignment"
13160
 
+                     " will change in a future GCC release",
13161
 
+                     (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
13162
 
+           }
13163
 
+       }
13164
 
+
13165
 
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
13166
 
+        keep using the BLKmode check, but warn if there will be differences
13167
 
+        in future GCC releases.  */
13168
 
+      if (mode == BLKmode)
13169
 
+       return 128;
13170
 
+    }
13171
 
+
13172
 
+  /* Similar for the Darwin64 ABI.  Note that for historical reasons we
13173
 
+     implement the "aggregate type" check as a BLKmode check here; this
13174
 
+     means certain aggregate types are in fact not aligned.  */
13175
 
+  if (TARGET_MACHO && rs6000_darwin64_abi
13176
 
+      && mode == BLKmode
13177
 
+      && type && TYPE_ALIGN (type) > 64)
13178
 
     return 128;
13179
 
-  else
13180
 
-    return PARM_BOUNDARY;
13181
 
+
13182
 
+  return PARM_BOUNDARY;
13183
 
 }
13184
 
 
13185
 
 /* The offset in words to the start of the parameter save area.  */
13186
 
@@ -10243,6 +10322,7 @@
13187
 
          rtx r, off;
13188
 
          int i, k = 0;
13189
 
          unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
13190
 
+         int fpr_words;
13191
 
 
13192
 
          /* Do we also need to pass this argument in the parameter
13193
 
             save area?  */
13194
 
@@ -10271,6 +10351,37 @@
13195
 
              rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
13196
 
            }
13197
 
 
13198
 
+         /* If there were not enough FPRs to hold the argument, the rest
13199
 
+            usually goes into memory.  However, if the current position
13200
 
+            is still within the register parameter area, a portion may
13201
 
+            actually have to go into GPRs.
13202
 
+
13203
 
+            Note that it may happen that the portion of the argument
13204
 
+            passed in the first "half" of the first GPR was already
13205
 
+            passed in the last FPR as well.
13206
 
+
13207
 
+            For unnamed arguments, we already set up GPRs to cover the
13208
 
+            whole argument in rs6000_psave_function_arg, so there is
13209
 
+            nothing further to do at this point.
13210
 
+
13211
 
+            GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
13212
 
+            GCC releases.  To avoid any ABI change on the release branch,
13213
 
+            we retain that original implementation here, but warn if we
13214
 
+            encounter a case where the ABI will change in the future.  */
13215
 
+         fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
13216
 
+         if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
13217
 
+             && cum->nargs_prototype > 0)
13218
 
+            {
13219
 
+             static bool warned;
13220
 
+             if (!warned && warn_psabi)
13221
 
+               {
13222
 
+                 warned = true;
13223
 
+                 inform (input_location,
13224
 
+                         "the ABI of passing homogeneous float aggregates"
13225
 
+                         " will change in a future GCC release");
13226
 
+               }
13227
 
+           }
13228
 
+
13229
 
          return rs6000_finish_function_arg (mode, rvec, k);
13230
 
        }
13231
 
       else if (align_words < GP_ARG_NUM_REG)
13232
 
@@ -10497,10 +10608,9 @@
13233
 
    list, or passes any parameter in memory.  */
13234
 
 
13235
 
 static bool
13236
 
-rs6000_function_parms_need_stack (tree fun)
13237
 
+rs6000_function_parms_need_stack (tree fun, bool incoming)
13238
 
 {
13239
 
-  function_args_iterator args_iter;
13240
 
-  tree arg_type;
13241
 
+  tree fntype, result;
13242
 
   CUMULATIVE_ARGS args_so_far_v;
13243
 
   cumulative_args_t args_so_far;
13244
 
 
13245
 
@@ -10507,26 +10617,57 @@
13246
 
   if (!fun)
13247
 
     /* Must be a libcall, all of which only use reg parms.  */
13248
 
     return false;
13249
 
+
13250
 
+  fntype = fun;
13251
 
   if (!TYPE_P (fun))
13252
 
-    fun = TREE_TYPE (fun);
13253
 
+    fntype = TREE_TYPE (fun);
13254
 
 
13255
 
   /* Varargs functions need the parameter save area.  */
13256
 
-  if (!prototype_p (fun) || stdarg_p (fun))
13257
 
+  if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
13258
 
     return true;
13259
 
 
13260
 
-  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
13261
 
+  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
13262
 
   args_so_far = pack_cumulative_args (&args_so_far_v);
13263
 
 
13264
 
-  if (aggregate_value_p (TREE_TYPE (fun), fun))
13265
 
+  /* When incoming, we will have been passed the function decl.
13266
 
+     It is necessary to use the decl to handle K&R style functions,
13267
 
+     where TYPE_ARG_TYPES may not be available.  */
13268
 
+  if (incoming)
13269
 
     {
13270
 
-      tree type = build_pointer_type (TREE_TYPE (fun));
13271
 
-      rs6000_parm_needs_stack (args_so_far, type);
13272
 
+      gcc_assert (DECL_P (fun));
13273
 
+      result = DECL_RESULT (fun);
13274
 
     }
13275
 
+  else
13276
 
+    result = TREE_TYPE (fntype);
13277
 
 
13278
 
-  FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
13279
 
-    if (rs6000_parm_needs_stack (args_so_far, arg_type))
13280
 
-      return true;
13281
 
+  if (result && aggregate_value_p (result, fntype))
13282
 
+    {
13283
 
+      if (!TYPE_P (result))
13284
 
+       result = TREE_TYPE (result);
13285
 
+      result = build_pointer_type (result);
13286
 
+      rs6000_parm_needs_stack (args_so_far, result);
13287
 
+    }
13288
 
 
13289
 
+  if (incoming)
13290
 
+    {
13291
 
+      tree parm;
13292
 
+
13293
 
+      for (parm = DECL_ARGUMENTS (fun);
13294
 
+          parm && parm != void_list_node;
13295
 
+          parm = TREE_CHAIN (parm))
13296
 
+       if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
13297
 
+         return true;
13298
 
+    }
13299
 
+  else
13300
 
+    {
13301
 
+      function_args_iterator args_iter;
13302
 
+      tree arg_type;
13303
 
+
13304
 
+      FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
13305
 
+       if (rs6000_parm_needs_stack (args_so_far, arg_type))
13306
 
+         return true;
13307
 
+    }
13308
 
+
13309
 
   return false;
13310
 
 }
13311
 
 
13312
 
@@ -10537,7 +10678,7 @@
13313
 
    all parameters in registers.  */
13314
 
 
13315
 
 int
13316
 
-rs6000_reg_parm_stack_space (tree fun)
13317
 
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
13318
 
 {
13319
 
   int reg_parm_stack_space;
13320
 
 
13321
 
@@ -10555,7 +10696,7 @@
13322
 
     case ABI_ELFv2:
13323
 
       /* ??? Recomputing this every time is a bit expensive.  Is there
13324
 
         a place to cache this information?  */
13325
 
-      if (rs6000_function_parms_need_stack (fun))
13326
 
+      if (rs6000_function_parms_need_stack (fun, incoming))
13327
 
        reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
13328
 
       else
13329
 
        reg_parm_stack_space = 0;
13330
 
@@ -13544,11 +13685,15 @@
13331
 
   else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
13332
 
           == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
13333
 
     error ("Builtin function %s requires the -mhard-dfp and"
13334
 
-          "-mpower8-vector options", name);
13335
 
+          " -mpower8-vector options", name);
13336
 
   else if ((fnmask & RS6000_BTM_DFP) != 0)
13337
 
     error ("Builtin function %s requires the -mhard-dfp option", name);
13338
 
   else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
13339
 
     error ("Builtin function %s requires the -mpower8-vector option", name);
13340
 
+  else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
13341
 
+          == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
13342
 
+    error ("Builtin function %s requires the -mhard-float and"
13343
 
+          " -mlong-double-128 options", name);
13344
 
   else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
13345
 
     error ("Builtin function %s requires the -mhard-float option", name);
13346
 
   else
13347
 
@@ -13649,8 +13794,8 @@
13348
 
     case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
13349
 
     case ALTIVEC_BUILTIN_MASK_FOR_STORE:
13350
 
       {
13351
 
-       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
13352
 
-                    : (int) CODE_FOR_altivec_lvsl);
13353
 
+       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
13354
 
+                    : (int) CODE_FOR_altivec_lvsl_direct);
13355
 
        enum machine_mode tmode = insn_data[icode].operand[0].mode;
13356
 
        enum machine_mode mode = insn_data[icode].operand[1].mode;
13357
 
        tree arg;
13358
 
@@ -13678,7 +13823,6 @@
13359
 
            || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
13360
 
          target = gen_reg_rtx (tmode);
13361
 
 
13362
 
-       /*pat = gen_altivec_lvsr (target, op);*/
13363
 
        pat = GEN_FCN (icode) (target, op);
13364
 
        if (!pat)
13365
 
          return 0;
13366
 
@@ -17099,7 +17243,14 @@
13367
 
      prefer Altivec loads..  */
13368
 
   if (rclass == VSX_REGS)
13369
 
     {
13370
 
-      if (GET_MODE_SIZE (mode) <= 8)
13371
 
+      if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
13372
 
+       {
13373
 
+         rtx addr = XEXP (x, 0);
13374
 
+         if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
13375
 
+             || legitimate_lo_sum_address_p (mode, addr, false))
13376
 
+           return FLOAT_REGS;
13377
 
+       }
13378
 
+      else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
13379
 
        return FLOAT_REGS;
13380
 
 
13381
 
       if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
13382
 
@@ -30865,6 +31016,23 @@
13383
 
   rs6000_do_expand_vec_perm (target, op0, op1, vmode, nelt, perm);
13384
 
 }
13385
 
 
13386
 
+/* Scale a V2DF vector SRC by two to the SCALE and place in TGT.  */
13387
 
+void
13388
 
+rs6000_scale_v2df (rtx tgt, rtx src, int scale)
13389
 
+{
13390
 
+  HOST_WIDE_INT hwi_scale (scale);
13391
 
+  REAL_VALUE_TYPE r_pow;
13392
 
+  rtvec v = rtvec_alloc (2);
13393
 
+  rtx elt;
13394
 
+  rtx scale_vec = gen_reg_rtx (V2DFmode);
13395
 
+  (void)real_powi (&r_pow, DFmode, &dconst2, hwi_scale);
13396
 
+  elt = CONST_DOUBLE_FROM_REAL_VALUE (r_pow, DFmode);
13397
 
+  RTVEC_ELT (v, 0) = elt;
13398
 
+  RTVEC_ELT (v, 1) = elt;
13399
 
+  rs6000_expand_vector_init (scale_vec, gen_rtx_PARALLEL (V2DFmode, v));
13400
 
+  emit_insn (gen_mulv2df3 (tgt, src, scale_vec));
13401
 
+}
13402
 
+
13403
 
 /* Return an RTX representing where to find the function value of a
13404
 
    function returning MODE.  */
13405
 
 static rtx
13406
 
@@ -31413,6 +31581,7 @@
13407
 
   { "htm",              RS6000_BTM_HTM,        false, false },
13408
 
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
13409
 
   { "hard-float",       RS6000_BTM_HARD_FLOAT, false, false },
13410
 
+  { "long-double-128",  RS6000_BTM_LDBL128,    false, false },
13411
 
 };
13412
 
 
13413
 
 /* Option variables that we want to support inside attribute((target)) and
13414
 
@@ -32663,25 +32832,14 @@
13415
 
 
13416
 
 /* Return true if the peephole2 can combine a load involving a combination of
13417
 
    an addis instruction and a load with an offset that can be fused together on
13418
 
-   a power8.
13419
 
+   a power8.  */
13420
 
 
13421
 
-   The operands are:
13422
 
-       operands[0]     register set with addis
13423
 
-       operands[1]     value set via addis
13424
 
-       operands[2]     target register being loaded
13425
 
-       operands[3]     D-form memory reference using operands[0].
13426
 
-
13427
 
-   In addition, we are passed a boolean that is true if this is a peephole2,
13428
 
-   and we can use see if the addis_reg is dead after the insn and can be
13429
 
-   replaced by the target register.  */
13430
 
-
13431
 
 bool
13432
 
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
13433
 
+fusion_gpr_load_p (rtx addis_reg,      /* register set via addis.  */
13434
 
+                  rtx addis_value,     /* addis value.  */
13435
 
+                  rtx target,          /* target register that is loaded.  */
13436
 
+                  rtx mem)             /* bottom part of the memory addr. */
13437
 
 {
13438
 
-  rtx addis_reg = operands[0];
13439
 
-  rtx addis_value = operands[1];
13440
 
-  rtx target = operands[2];
13441
 
-  rtx mem = operands[3];
13442
 
   rtx addr;
13443
 
   rtx base_reg;
13444
 
 
13445
 
@@ -32695,9 +32853,6 @@
13446
 
   if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
13447
 
     return false;
13448
 
 
13449
 
-  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
13450
 
-    return false;
13451
 
-
13452
 
   /* Allow sign/zero extension.  */
13453
 
   if (GET_CODE (mem) == ZERO_EXTEND
13454
 
       || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
13455
 
@@ -32706,22 +32861,22 @@
13456
 
   if (!MEM_P (mem))
13457
 
     return false;
13458
 
 
13459
 
+  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
13460
 
+    return false;
13461
 
+
13462
 
   addr = XEXP (mem, 0);                        /* either PLUS or LO_SUM.  */
13463
 
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
13464
 
     return false;
13465
 
 
13466
 
   /* Validate that the register used to load the high value is either the
13467
 
-     register being loaded, or we can safely replace its use in a peephole2.
13468
 
+     register being loaded, or we can safely replace its use.
13469
 
 
13470
 
-     If this is a peephole2, we assume that there are 2 instructions in the
13471
 
-     peephole (addis and load), so we want to check if the target register was
13472
 
-     not used in the memory address and the register to hold the addis result
13473
 
-     is dead after the peephole.  */
13474
 
+     This function is only called from the peephole2 pass and we assume that
13475
 
+     there are 2 instructions in the peephole (addis and load), so we want to
13476
 
+     check if the target register was not used in the memory address and the
13477
 
+     register to hold the addis result is dead after the peephole.  */
13478
 
   if (REGNO (addis_reg) != REGNO (target))
13479
 
     {
13480
 
-      if (!peep2_p)
13481
 
-       return false;
13482
 
-
13483
 
       if (reg_mentioned_p (target, mem))
13484
 
        return false;
13485
 
 
13486
 
@@ -32762,9 +32917,6 @@
13487
 
   enum machine_mode extend_mode = target_mode;
13488
 
   enum machine_mode ptr_mode = Pmode;
13489
 
   enum rtx_code extend = UNKNOWN;
13490
 
-  rtx addis_reg = ((ptr_mode == target_mode)
13491
 
-                  ? target
13492
 
-                  : simplify_subreg (ptr_mode, target, target_mode, 0));
13493
 
 
13494
 
   if (GET_CODE (orig_mem) == ZERO_EXTEND
13495
 
       || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
13496
 
@@ -32781,13 +32933,14 @@
13497
 
   gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
13498
 
 
13499
 
   offset = XEXP (orig_addr, 1);
13500
 
-  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
13501
 
-  new_mem = change_address (orig_mem, target_mode, new_addr);
13502
 
+  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
13503
 
+  new_mem = replace_equiv_address_nv (orig_mem, new_addr);
13504
 
 
13505
 
   if (extend != UNKNOWN)
13506
 
     new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
13507
 
 
13508
 
-  emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
13509
 
+  new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
13510
 
+                           UNSPEC_FUSION_GPR);
13511
 
   emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
13512
 
 
13513
 
   if (extend == SIGN_EXTEND)
13514
 
@@ -32806,55 +32959,40 @@
13515
 
 }
13516
 
 
13517
 
 /* Return a string to fuse an addis instruction with a gpr load to the same
13518
 
-   register that we loaded up the addis instruction.  The code is complicated,
13519
 
-   so we call output_asm_insn directly, and just return "".
13520
 
+   register that we loaded up the addis instruction.  The address that is used
13521
 
+   is the logical address that was formed during peephole2:
13522
 
+       (lo_sum (high) (low-part))
13523
 
 
13524
 
-   The operands are:
13525
 
-       operands[0]     register set with addis (must be same reg as target).
13526
 
-       operands[1]     value set via addis
13527
 
-       operands[2]     target register being loaded
13528
 
-       operands[3]     D-form memory reference using operands[0].  */
13529
 
+   The code is complicated, so we call output_asm_insn directly, and just
13530
 
+   return "".  */
13531
 
 
13532
 
 const char *
13533
 
-emit_fusion_gpr_load (rtx *operands)
13534
 
+emit_fusion_gpr_load (rtx target, rtx mem)
13535
 
 {
13536
 
-  rtx addis_reg = operands[0];
13537
 
-  rtx addis_value = operands[1];
13538
 
-  rtx target = operands[2];
13539
 
-  rtx mem = operands[3];
13540
 
+  rtx addis_value;
13541
 
   rtx fuse_ops[10];
13542
 
   rtx addr;
13543
 
   rtx load_offset;
13544
 
   const char *addis_str = NULL;
13545
 
   const char *load_str = NULL;
13546
 
-  const char *extend_insn = NULL;
13547
 
   const char *mode_name = NULL;
13548
 
   char insn_template[80];
13549
 
   enum machine_mode mode;
13550
 
   const char *comment_str = ASM_COMMENT_START;
13551
 
-  bool sign_p = false;
13552
 
 
13553
 
-  gcc_assert (REG_P (addis_reg) && REG_P (target));
13554
 
-  gcc_assert (REGNO (addis_reg) == REGNO (target));
13555
 
+  if (GET_CODE (mem) == ZERO_EXTEND)
13556
 
+    mem = XEXP (mem, 0);
13557
 
 
13558
 
+  gcc_assert (REG_P (target) && MEM_P (mem));
13559
 
+
13560
 
   if (*comment_str == ' ')
13561
 
     comment_str++;
13562
 
 
13563
 
-  /* Allow sign/zero extension.  */
13564
 
-  if (GET_CODE (mem) == ZERO_EXTEND)
13565
 
-    mem = XEXP (mem, 0);
13566
 
-
13567
 
-  else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
13568
 
-    {
13569
 
-      sign_p = true;
13570
 
-      mem = XEXP (mem, 0);
13571
 
-    }
13572
 
-
13573
 
-  gcc_assert (MEM_P (mem));
13574
 
   addr = XEXP (mem, 0);
13575
 
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
13576
 
     gcc_unreachable ();
13577
 
 
13578
 
+  addis_value = XEXP (addr, 0);
13579
 
   load_offset = XEXP (addr, 1);
13580
 
 
13581
 
   /* Now emit the load instruction to the same register.  */
13582
 
@@ -32864,29 +33002,22 @@
13583
 
     case QImode:
13584
 
       mode_name = "char";
13585
 
       load_str = "lbz";
13586
 
-      extend_insn = "extsb %0,%0";
13587
 
       break;
13588
 
 
13589
 
     case HImode:
13590
 
       mode_name = "short";
13591
 
       load_str = "lhz";
13592
 
-      extend_insn = "extsh %0,%0";
13593
 
       break;
13594
 
 
13595
 
     case SImode:
13596
 
       mode_name = "int";
13597
 
       load_str = "lwz";
13598
 
-      extend_insn = "extsw %0,%0";
13599
 
       break;
13600
 
 
13601
 
     case DImode:
13602
 
-      if (TARGET_POWERPC64)
13603
 
-       {
13604
 
-         mode_name = "long";
13605
 
-         load_str = "ld";
13606
 
-       }
13607
 
-      else
13608
 
-       gcc_unreachable ();
13609
 
+      gcc_assert (TARGET_POWERPC64);
13610
 
+      mode_name = "long";
13611
 
+      load_str = "ld";
13612
 
       break;
13613
 
 
13614
 
     default:
13615
 
@@ -33030,14 +33161,6 @@
13616
 
   else
13617
 
     fatal_insn ("Unable to generate load offset for fusion", load_offset);
13618
 
 
13619
 
-  /* Handle sign extension.  The peephole2 pass generates this as a separate
13620
 
-     insn, but we handle it just in case it got reattached.  */
13621
 
-  if (sign_p)
13622
 
-    {
13623
 
-      gcc_assert (extend_insn != NULL);
13624
 
-      output_asm_insn (extend_insn, fuse_ops);
13625
 
-    }
13626
 
-
13627
 
   return "";
13628
 
 }
13629
 
 
13630
 
Index: gcc/config/rs6000/vsx.md
13631
 
===================================================================
13632
 
--- a/src/gcc/config/rs6000/vsx.md      (.../tags/gcc_4_8_3_release)
13633
 
+++ b/src/gcc/config/rs6000/vsx.md      (.../branches/gcc-4_8-branch)
13634
 
@@ -24,6 +24,13 @@
13635
 
 ;; Iterator for the 2 64-bit vector types
13636
 
 (define_mode_iterator VSX_D [V2DF V2DI])
13637
 
 
13638
 
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
13639
 
+;; lxvd2x to properly handle swapping words on little endian
13640
 
+(define_mode_iterator VSX_LE [V2DF
13641
 
+                             V2DI
13642
 
+                             V1TI
13643
 
+                             (TI       "VECTOR_MEM_VSX_P (TImode)")])
13644
 
+
13645
 
 ;; Iterator for the 2 32-bit vector types
13646
 
 (define_mode_iterator VSX_W [V4SF V4SI])
13647
 
 
13648
 
@@ -79,19 +86,26 @@
13649
 
                         (V4SF  "wf")
13650
 
                         (V2DI  "wd")
13651
 
                         (V2DF  "wd")
13652
 
+                        (DI    "wi")
13653
 
                         (DF    "ws")
13654
 
-                        (SF    "d")
13655
 
+                        (SF    "ww")
13656
 
                         (V1TI  "v")
13657
 
                         (TI    "wt")])
13658
 
 
13659
 
-;; Map the register class used for float<->int conversions
13660
 
+;; Map the register class used for float<->int conversions (floating point side)
13661
 
+;; VSr2 is the preferred register class, VSr3 is any register class that will
13662
 
+;; hold the data
13663
 
 (define_mode_attr VSr2 [(V2DF  "wd")
13664
 
                         (V4SF  "wf")
13665
 
-                        (DF    "ws")])
13666
 
+                        (DF    "ws")
13667
 
+                        (SF    "ww")
13668
 
+                        (DI    "wi")])
13669
 
 
13670
 
 (define_mode_attr VSr3 [(V2DF  "wa")
13671
 
                         (V4SF  "wa")
13672
 
-                        (DF    "ws")])
13673
 
+                        (DF    "ws")
13674
 
+                        (SF    "ww")
13675
 
+                        (DI    "wi")])
13676
 
 
13677
 
 ;; Map the register class for sp<->dp float conversions, destination
13678
 
 (define_mode_attr VSr4 [(SF    "ws")
13679
 
@@ -99,12 +113,27 @@
13680
 
                         (V2DF  "wd")
13681
 
                         (V4SF  "v")])
13682
 
 
13683
 
-;; Map the register class for sp<->dp float conversions, destination
13684
 
+;; Map the register class for sp<->dp float conversions, source
13685
 
 (define_mode_attr VSr5 [(SF    "ws")
13686
 
                         (DF    "f")
13687
 
                         (V2DF  "v")
13688
 
                         (V4SF  "wd")])
13689
 
 
13690
 
+;; The VSX register class that a type can occupy, even if it is not the
13691
 
+;; preferred register class (VSr is the preferred register class that will get
13692
 
+;; allocated first).
13693
 
+(define_mode_attr VSa  [(V16QI "wa")
13694
 
+                        (V8HI  "wa")
13695
 
+                        (V4SI  "wa")
13696
 
+                        (V4SF  "wa")
13697
 
+                        (V2DI  "wa")
13698
 
+                        (V2DF  "wa")
13699
 
+                        (DI    "wi")
13700
 
+                        (DF    "ws")
13701
 
+                        (SF    "ww")
13702
 
+                        (V1TI  "wa")
13703
 
+                        (TI    "wt")])
13704
 
+
13705
 
 ;; Same size integer type for floating point data
13706
 
 (define_mode_attr VSi [(V4SF  "v4si")
13707
 
                       (V2DF  "v2di")
13708
 
@@ -200,6 +229,16 @@
13709
 
                             (V2DF      "V4DF")
13710
 
                             (V1TI      "V2TI")])
13711
 
 
13712
 
+;; Map register class for 64-bit element in 128-bit vector for direct moves
13713
 
+;; to/from gprs
13714
 
+(define_mode_attr VS_64dm [(V2DF       "wk")
13715
 
+                          (V2DI        "wj")])
13716
 
+
13717
 
+;; Map register class for 64-bit element in 128-bit vector for normal register
13718
 
+;; to register moves
13719
 
+(define_mode_attr VS_64reg [(V2DF      "ws")
13720
 
+                           (V2DI       "wi")])
13721
 
+
13722
 
 ;; Constants for creating unspecs
13723
 
 (define_c_enum "unspec"
13724
 
   [UNSPEC_VSX_CONCAT
13725
 
@@ -221,6 +260,14 @@
13726
 
    UNSPEC_VSX_ROUND_IC
13727
 
    UNSPEC_VSX_SLDWI
13728
 
    UNSPEC_VSX_XXSPLTW
13729
 
+   UNSPEC_VSX_XXSPLTD
13730
 
+   UNSPEC_VSX_DIVSD
13731
 
+   UNSPEC_VSX_DIVUD
13732
 
+   UNSPEC_VSX_MULSD
13733
 
+   UNSPEC_VSX_XVCVSXDDP
13734
 
+   UNSPEC_VSX_XVCVUXDDP
13735
 
+   UNSPEC_VSX_XVCVDPSXDS
13736
 
+   UNSPEC_VSX_XVCVDPUXDS
13737
 
   ])
13738
 
 
13739
 
 ;; VSX moves
13740
 
@@ -228,8 +275,8 @@
13741
 
 ;; The patterns for LE permuted loads and stores come before the general
13742
 
 ;; VSX moves so they match first.
13743
 
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
13744
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
13745
 
-        (match_operand:VSX_D 1 "memory_operand" "Z"))]
13746
 
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
13747
 
+        (match_operand:VSX_LE 1 "memory_operand" "Z"))]
13748
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
13749
 
   "#"
13750
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
13751
 
@@ -251,7 +298,7 @@
13752
 
    (set_attr "length" "8")])
13753
 
 
13754
 
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
13755
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
13756
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
13757
 
         (match_operand:VSX_W 1 "memory_operand" "Z"))]
13758
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
13759
 
   "#"
13760
 
@@ -342,8 +389,8 @@
13761
 
    (set_attr "length" "8")])
13762
 
 
13763
 
 (define_insn "*vsx_le_perm_store_<mode>"
13764
 
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
13765
 
-        (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
13766
 
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
13767
 
+        (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
13768
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
13769
 
   "#"
13770
 
   [(set_attr "type" "vecstore")
13771
 
@@ -350,8 +397,8 @@
13772
 
    (set_attr "length" "12")])
13773
 
 
13774
 
 (define_split
13775
 
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
13776
 
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
13777
 
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
13778
 
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
13779
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
13780
 
   [(set (match_dup 2)
13781
 
         (vec_select:<MODE>
13782
 
@@ -369,8 +416,8 @@
13783
 
 ;; The post-reload split requires that we re-permute the source
13784
 
 ;; register in case it is still live.
13785
 
 (define_split
13786
 
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
13787
 
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
13788
 
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
13789
 
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
13790
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
13791
 
   [(set (match_dup 1)
13792
 
         (vec_select:<MODE>
13793
 
@@ -388,7 +435,7 @@
13794
 
 
13795
 
 (define_insn "*vsx_le_perm_store_<mode>"
13796
 
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
13797
 
-        (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
13798
 
+        (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
13799
 
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
13800
 
   "#"
13801
 
   [(set_attr "type" "vecstore")
13802
 
@@ -578,8 +625,8 @@
13803
 
 
13804
 
 
13805
 
 (define_insn "*vsx_mov<mode>"
13806
 
-  [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?wa,?wa,wQ,?&r,??Y,??r,??r,<VSr>,?wa,*r,v,wZ, v")
13807
 
-       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
13808
 
+  [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ, v")
13809
 
+       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
13810
 
   "VECTOR_MEM_VSX_P (<MODE>mode)
13811
 
    && (register_operand (operands[0], <MODE>mode) 
13812
 
        || register_operand (operands[1], <MODE>mode))"
13813
 
@@ -681,9 +728,9 @@
13814
 
 ;; instructions are now combined with the insn for the traditional floating
13815
 
 ;; point unit.
13816
 
 (define_insn "*vsx_add<mode>3"
13817
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13818
 
-        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13819
 
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13820
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13821
 
+        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13822
 
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13823
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13824
 
   "xvadd<VSs> %x0,%x1,%x2"
13825
 
   [(set_attr "type" "<VStype_simple>")
13826
 
@@ -690,9 +737,9 @@
13827
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13828
 
 
13829
 
 (define_insn "*vsx_sub<mode>3"
13830
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13831
 
-        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13832
 
-                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13833
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13834
 
+        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13835
 
+                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13836
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13837
 
   "xvsub<VSs> %x0,%x1,%x2"
13838
 
   [(set_attr "type" "<VStype_simple>")
13839
 
@@ -699,23 +746,106 @@
13840
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13841
 
 
13842
 
 (define_insn "*vsx_mul<mode>3"
13843
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13844
 
-        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13845
 
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13846
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13847
 
+        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13848
 
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13849
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13850
 
   "xvmul<VSs> %x0,%x1,%x2"
13851
 
   [(set_attr "type" "<VStype_simple>")
13852
 
    (set_attr "fp_type" "<VSfptype_mul>")])
13853
 
 
13854
 
+; Emulate vector with scalar for vec_mul in V2DImode
13855
 
+(define_insn_and_split "vsx_mul_v2di"
13856
 
+  [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13857
 
+        (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13858
 
+                      (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13859
 
+                     UNSPEC_VSX_MULSD))]
13860
 
+  "VECTOR_MEM_VSX_P (V2DImode)"
13861
 
+  "#"
13862
 
+  "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13863
 
+  [(const_int 0)]
13864
 
+  "
13865
 
+{
13866
 
+  rtx op0 = operands[0];
13867
 
+  rtx op1 = operands[1];
13868
 
+  rtx op2 = operands[2];
13869
 
+  rtx op3 = gen_reg_rtx (DImode);
13870
 
+  rtx op4 = gen_reg_rtx (DImode);
13871
 
+  rtx op5 = gen_reg_rtx (DImode);
13872
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13873
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13874
 
+  emit_insn (gen_muldi3 (op5, op3, op4));
13875
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13876
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13877
 
+  emit_insn (gen_muldi3 (op3, op3, op4));
13878
 
+  emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13879
 
+}"
13880
 
+  [(set_attr "type" "vecdouble")])
13881
 
+
13882
 
 (define_insn "*vsx_div<mode>3"
13883
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13884
 
-        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13885
 
-                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13886
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13887
 
+        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13888
 
+                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13889
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13890
 
   "xvdiv<VSs> %x0,%x1,%x2"
13891
 
   [(set_attr "type" "<VStype_div>")
13892
 
    (set_attr "fp_type" "<VSfptype_div>")])
13893
 
 
13894
 
+; Emulate vector with scalar for vec_div in V2DImode
13895
 
+(define_insn_and_split "vsx_div_v2di"
13896
 
+  [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13897
 
+        (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13898
 
+                      (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13899
 
+                     UNSPEC_VSX_DIVSD))]
13900
 
+  "VECTOR_MEM_VSX_P (V2DImode)"
13901
 
+  "#"
13902
 
+  "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13903
 
+  [(const_int 0)]
13904
 
+  "
13905
 
+{
13906
 
+  rtx op0 = operands[0];
13907
 
+  rtx op1 = operands[1];
13908
 
+  rtx op2 = operands[2];
13909
 
+  rtx op3 = gen_reg_rtx (DImode);
13910
 
+  rtx op4 = gen_reg_rtx (DImode);
13911
 
+  rtx op5 = gen_reg_rtx (DImode);
13912
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13913
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13914
 
+  emit_insn (gen_divdi3 (op5, op3, op4));
13915
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13916
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13917
 
+  emit_insn (gen_divdi3 (op3, op3, op4));
13918
 
+  emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13919
 
+}"
13920
 
+  [(set_attr "type" "vecdiv")])
13921
 
+
13922
 
+(define_insn_and_split "vsx_udiv_v2di"
13923
 
+  [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13924
 
+        (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13925
 
+                      (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13926
 
+                     UNSPEC_VSX_DIVUD))]
13927
 
+  "VECTOR_MEM_VSX_P (V2DImode)"
13928
 
+  "#"
13929
 
+  "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13930
 
+  [(const_int 0)]
13931
 
+  "
13932
 
+{
13933
 
+  rtx op0 = operands[0];
13934
 
+  rtx op1 = operands[1];
13935
 
+  rtx op2 = operands[2];
13936
 
+  rtx op3 = gen_reg_rtx (DImode);
13937
 
+  rtx op4 = gen_reg_rtx (DImode);
13938
 
+  rtx op5 = gen_reg_rtx (DImode);
13939
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13940
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13941
 
+  emit_insn (gen_udivdi3 (op5, op3, op4));
13942
 
+  emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13943
 
+  emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13944
 
+  emit_insn (gen_udivdi3 (op3, op3, op4));
13945
 
+  emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13946
 
+}"
13947
 
+  [(set_attr "type" "vecdiv")])
13948
 
+
13949
 
 ;; *tdiv* instruction returning the FG flag
13950
 
 (define_expand "vsx_tdiv<mode>3_fg"
13951
 
   [(set (match_dup 3)
13952
 
@@ -746,8 +876,8 @@
13953
 
 
13954
 
 (define_insn "*vsx_tdiv<mode>3_internal"
13955
 
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
13956
 
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
13957
 
-                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
13958
 
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
13959
 
+                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
13960
 
                   UNSPEC_VSX_TDIV))]
13961
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13962
 
   "x<VSv>tdiv<VSs> %0,%x1,%x2"
13963
 
@@ -755,8 +885,8 @@
13964
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13965
 
 
13966
 
 (define_insn "vsx_fre<mode>2"
13967
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13968
 
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13969
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13970
 
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13971
 
                      UNSPEC_FRES))]
13972
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13973
 
   "xvre<VSs> %x0,%x1"
13974
 
@@ -764,8 +894,8 @@
13975
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13976
 
 
13977
 
 (define_insn "*vsx_neg<mode>2"
13978
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13979
 
-        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13980
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13981
 
+        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13982
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13983
 
   "xvneg<VSs> %x0,%x1"
13984
 
   [(set_attr "type" "<VStype_simple>")
13985
 
@@ -772,8 +902,8 @@
13986
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13987
 
 
13988
 
 (define_insn "*vsx_abs<mode>2"
13989
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13990
 
-        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13991
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13992
 
+        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13993
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
13994
 
   "xvabs<VSs> %x0,%x1"
13995
 
   [(set_attr "type" "<VStype_simple>")
13996
 
@@ -780,10 +910,10 @@
13997
 
    (set_attr "fp_type" "<VSfptype_simple>")])
13998
 
 
13999
 
 (define_insn "vsx_nabs<mode>2"
14000
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14001
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14002
 
         (neg:VSX_F
14003
 
         (abs:VSX_F
14004
 
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
14005
 
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
14006
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14007
 
   "xvnabs<VSs> %x0,%x1"
14008
 
   [(set_attr "type" "<VStype_simple>")
14009
 
@@ -790,9 +920,9 @@
14010
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14011
 
 
14012
 
 (define_insn "vsx_smax<mode>3"
14013
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14014
 
-        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14015
 
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14016
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14017
 
+        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14018
 
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14019
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14020
 
   "xvmax<VSs> %x0,%x1,%x2"
14021
 
   [(set_attr "type" "<VStype_simple>")
14022
 
@@ -799,9 +929,9 @@
14023
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14024
 
 
14025
 
 (define_insn "*vsx_smin<mode>3"
14026
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14027
 
-        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14028
 
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14029
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14030
 
+        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14031
 
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14032
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14033
 
   "xvmin<VSs> %x0,%x1,%x2"
14034
 
   [(set_attr "type" "<VStype_simple>")
14035
 
@@ -808,8 +938,8 @@
14036
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14037
 
 
14038
 
 (define_insn "*vsx_sqrt<mode>2"
14039
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14040
 
-        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
14041
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14042
 
+        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
14043
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14044
 
   "xvsqrt<VSs> %x0,%x1"
14045
 
   [(set_attr "type" "<VStype_sqrt>")
14046
 
@@ -816,8 +946,8 @@
14047
 
    (set_attr "fp_type" "<VSfptype_sqrt>")])
14048
 
 
14049
 
 (define_insn "*vsx_rsqrte<mode>2"
14050
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14051
 
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14052
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14053
 
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14054
 
                      UNSPEC_RSQRT))]
14055
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14056
 
   "xvrsqrte<VSs> %x0,%x1"
14057
 
@@ -852,7 +982,7 @@
14058
 
 
14059
 
 (define_insn "*vsx_tsqrt<mode>2_internal"
14060
 
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
14061
 
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14062
 
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14063
 
                     UNSPEC_VSX_TSQRT))]
14064
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14065
 
   "x<VSv>tsqrt<VSs> %0,%x1"
14066
 
@@ -865,11 +995,11 @@
14067
 
 ;; multiply.
14068
 
 
14069
 
 (define_insn "*vsx_fmav4sf4"
14070
 
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
14071
 
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
14072
 
        (fma:V4SF
14073
 
-         (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
14074
 
-         (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
14075
 
-         (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
14076
 
+         (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
14077
 
+         (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
14078
 
+         (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
14079
 
   "VECTOR_UNIT_VSX_P (V4SFmode)"
14080
 
   "@
14081
 
    xvmaddasp %x0,%x1,%x2
14082
 
@@ -880,11 +1010,11 @@
14083
 
   [(set_attr "type" "vecfloat")])
14084
 
 
14085
 
 (define_insn "*vsx_fmav2df4"
14086
 
-  [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
14087
 
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
14088
 
        (fma:V2DF
14089
 
-         (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
14090
 
-         (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
14091
 
-         (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
14092
 
+         (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
14093
 
+         (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
14094
 
+         (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
14095
 
   "VECTOR_UNIT_VSX_P (V2DFmode)"
14096
 
   "@
14097
 
    xvmaddadp %x0,%x1,%x2
14098
 
@@ -894,12 +1024,12 @@
14099
 
   [(set_attr "type" "vecdouble")])
14100
 
 
14101
 
 (define_insn "*vsx_fms<mode>4"
14102
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
14103
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
14104
 
        (fma:VSX_F
14105
 
-         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
14106
 
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
14107
 
+         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
14108
 
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
14109
 
          (neg:VSX_F
14110
 
-           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
14111
 
+           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
14112
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14113
 
   "@
14114
 
    xvmsuba<VSs> %x0,%x1,%x2
14115
 
@@ -909,12 +1039,12 @@
14116
 
   [(set_attr "type" "<VStype_mul>")])
14117
 
 
14118
 
 (define_insn "*vsx_nfma<mode>4"
14119
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
14120
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
14121
 
        (neg:VSX_F
14122
 
         (fma:VSX_F
14123
 
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
14124
 
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
14125
 
-         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
14126
 
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
14127
 
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
14128
 
+         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
14129
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14130
 
   "@
14131
 
    xvnmadda<VSs> %x0,%x1,%x2
14132
 
@@ -959,9 +1089,9 @@
14133
 
 
14134
 
 ;; Vector conditional expressions (no scalar version for these instructions)
14135
 
 (define_insn "vsx_eq<mode>"
14136
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14137
 
-       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14138
 
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14139
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14140
 
+       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14141
 
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14142
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14143
 
   "xvcmpeq<VSs> %x0,%x1,%x2"
14144
 
   [(set_attr "type" "<VStype_simple>")
14145
 
@@ -968,9 +1098,9 @@
14146
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14147
 
 
14148
 
 (define_insn "vsx_gt<mode>"
14149
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14150
 
-       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14151
 
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14152
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14153
 
+       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14154
 
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14155
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14156
 
   "xvcmpgt<VSs> %x0,%x1,%x2"
14157
 
   [(set_attr "type" "<VStype_simple>")
14158
 
@@ -977,9 +1107,9 @@
14159
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14160
 
 
14161
 
 (define_insn "*vsx_ge<mode>"
14162
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14163
 
-       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14164
 
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14165
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14166
 
+       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14167
 
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14168
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14169
 
   "xvcmpge<VSs> %x0,%x1,%x2"
14170
 
   [(set_attr "type" "<VStype_simple>")
14171
 
@@ -990,10 +1120,10 @@
14172
 
 (define_insn "*vsx_eq_<mode>_p"
14173
 
   [(set (reg:CC 74)
14174
 
        (unspec:CC
14175
 
-        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14176
 
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14177
 
+        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14178
 
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14179
 
         UNSPEC_PREDICATE))
14180
 
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14181
 
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14182
 
        (eq:VSX_F (match_dup 1)
14183
 
                  (match_dup 2)))]
14184
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14185
 
@@ -1003,10 +1133,10 @@
14186
 
 (define_insn "*vsx_gt_<mode>_p"
14187
 
   [(set (reg:CC 74)
14188
 
        (unspec:CC
14189
 
-        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14190
 
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14191
 
+        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14192
 
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14193
 
         UNSPEC_PREDICATE))
14194
 
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14195
 
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14196
 
        (gt:VSX_F (match_dup 1)
14197
 
                  (match_dup 2)))]
14198
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14199
 
@@ -1016,10 +1146,10 @@
14200
 
 (define_insn "*vsx_ge_<mode>_p"
14201
 
   [(set (reg:CC 74)
14202
 
        (unspec:CC
14203
 
-        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14204
 
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14205
 
+        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14206
 
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14207
 
         UNSPEC_PREDICATE))
14208
 
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14209
 
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14210
 
        (ge:VSX_F (match_dup 1)
14211
 
                  (match_dup 2)))]
14212
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14213
 
@@ -1028,23 +1158,23 @@
14214
 
 
14215
 
 ;; Vector select
14216
 
 (define_insn "*vsx_xxsel<mode>"
14217
 
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
14218
 
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14219
 
        (if_then_else:VSX_L
14220
 
-        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
14221
 
+        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
14222
 
                (match_operand:VSX_L 4 "zero_constant" ""))
14223
 
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
14224
 
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
14225
 
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
14226
 
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
14227
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14228
 
   "xxsel %x0,%x3,%x2,%x1"
14229
 
   [(set_attr "type" "vecperm")])
14230
 
 
14231
 
 (define_insn "*vsx_xxsel<mode>_uns"
14232
 
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
14233
 
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14234
 
        (if_then_else:VSX_L
14235
 
-        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
14236
 
+        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
14237
 
                   (match_operand:VSX_L 4 "zero_constant" ""))
14238
 
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
14239
 
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
14240
 
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
14241
 
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
14242
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14243
 
   "xxsel %x0,%x3,%x2,%x1"
14244
 
   [(set_attr "type" "vecperm")])
14245
 
@@ -1051,10 +1181,10 @@
14246
 
 
14247
 
 ;; Copy sign
14248
 
 (define_insn "vsx_copysign<mode>3"
14249
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14250
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14251
 
        (unspec:VSX_F
14252
 
-        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14253
 
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
14254
 
+        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14255
 
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
14256
 
         UNSPEC_COPYSIGN))]
14257
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14258
 
   "xvcpsgn<VSs> %x0,%x2,%x1"
14259
 
@@ -1067,7 +1197,7 @@
14260
 
 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
14261
 
 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
14262
 
 (define_insn "vsx_float<VSi><mode>2"
14263
 
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
14264
 
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
14265
 
        (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
14266
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14267
 
   "x<VSv>cvsx<VSc><VSs> %x0,%x1"
14268
 
@@ -1075,7 +1205,7 @@
14269
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14270
 
 
14271
 
 (define_insn "vsx_floatuns<VSi><mode>2"
14272
 
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
14273
 
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
14274
 
        (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
14275
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14276
 
   "x<VSv>cvux<VSc><VSs> %x0,%x1"
14277
 
@@ -1084,7 +1214,7 @@
14278
 
 
14279
 
 (define_insn "vsx_fix_trunc<mode><VSi>2"
14280
 
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
14281
 
-       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
14282
 
+       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
14283
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14284
 
   "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
14285
 
   [(set_attr "type" "<VStype_simple>")
14286
 
@@ -1092,7 +1222,7 @@
14287
 
 
14288
 
 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
14289
 
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
14290
 
-       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
14291
 
+       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
14292
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14293
 
   "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
14294
 
   [(set_attr "type" "<VStype_simple>")
14295
 
@@ -1100,8 +1230,8 @@
14296
 
 
14297
 
 ;; Math rounding functions
14298
 
 (define_insn "vsx_x<VSv>r<VSs>i"
14299
 
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14300
 
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14301
 
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14302
 
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14303
 
                      UNSPEC_VSX_ROUND_I))]
14304
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14305
 
   "x<VSv>r<VSs>i %x0,%x1"
14306
 
@@ -1109,8 +1239,8 @@
14307
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14308
 
 
14309
 
 (define_insn "vsx_x<VSv>r<VSs>ic"
14310
 
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14311
 
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14312
 
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14313
 
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14314
 
                      UNSPEC_VSX_ROUND_IC))]
14315
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14316
 
   "x<VSv>r<VSs>ic %x0,%x1"
14317
 
@@ -1118,8 +1248,8 @@
14318
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14319
 
 
14320
 
 (define_insn "vsx_btrunc<mode>2"
14321
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14322
 
-       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
14323
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14324
 
+       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
14325
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14326
 
   "xvr<VSs>iz %x0,%x1"
14327
 
   [(set_attr "type" "<VStype_simple>")
14328
 
@@ -1126,8 +1256,8 @@
14329
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14330
 
 
14331
 
 (define_insn "*vsx_b2trunc<mode>2"
14332
 
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14333
 
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14334
 
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14335
 
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14336
 
                      UNSPEC_FRIZ))]
14337
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14338
 
   "x<VSv>r<VSs>iz %x0,%x1"
14339
 
@@ -1135,8 +1265,8 @@
14340
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14341
 
 
14342
 
 (define_insn "vsx_floor<mode>2"
14343
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14344
 
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14345
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14346
 
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14347
 
                      UNSPEC_FRIM))]
14348
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14349
 
   "xvr<VSs>im %x0,%x1"
14350
 
@@ -1144,8 +1274,8 @@
14351
 
    (set_attr "fp_type" "<VSfptype_simple>")])
14352
 
 
14353
 
 (define_insn "vsx_ceil<mode>2"
14354
 
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14355
 
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14356
 
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14357
 
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14358
 
                      UNSPEC_FRIP))]
14359
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14360
 
   "xvr<VSs>ip %x0,%x1"
14361
 
@@ -1160,8 +1290,8 @@
14362
 
 ;; scalar single precision instructions internally use the double format.
14363
 
 ;; Prefer the altivec registers, since we likely will need to do a vperm
14364
 
 (define_insn "vsx_<VS_spdp_insn>"
14365
 
-  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
14366
 
-       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
14367
 
+  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
14368
 
+       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
14369
 
                              UNSPEC_VSX_CVSPDP))]
14370
 
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
14371
 
   "<VS_spdp_insn> %x0,%x1"
14372
 
@@ -1169,8 +1299,8 @@
14373
 
 
14374
 
 ;; xscvspdp, represent the scalar SF type as V4SF
14375
 
 (define_insn "vsx_xscvspdp"
14376
 
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
14377
 
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
14378
 
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
14379
 
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
14380
 
                   UNSPEC_VSX_CVSPDP))]
14381
 
   "VECTOR_UNIT_VSX_P (V4SFmode)"
14382
 
   "xscvspdp %x0,%x1"
14383
 
@@ -1197,7 +1327,7 @@
14384
 
 
14385
 
 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
14386
 
 (define_insn "vsx_xscvdpspn"
14387
 
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
14388
 
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
14389
 
        (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
14390
 
                     UNSPEC_VSX_CVDPSPN))]
14391
 
   "TARGET_XSCVDPSPN"
14392
 
@@ -1205,8 +1335,8 @@
14393
 
   [(set_attr "type" "fp")])
14394
 
 
14395
 
 (define_insn "vsx_xscvspdpn"
14396
 
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
14397
 
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
14398
 
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
14399
 
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
14400
 
                   UNSPEC_VSX_CVSPDPN))]
14401
 
   "TARGET_XSCVSPDPN"
14402
 
   "xscvspdpn %x0,%x1"
14403
 
@@ -1213,8 +1343,8 @@
14404
 
   [(set_attr "type" "fp")])
14405
 
 
14406
 
 (define_insn "vsx_xscvdpspn_scalar"
14407
 
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
14408
 
-       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
14409
 
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
14410
 
+       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
14411
 
                     UNSPEC_VSX_CVDPSPN))]
14412
 
   "TARGET_XSCVDPSPN"
14413
 
   "xscvdpspn %x0,%x1"
14414
 
@@ -1229,6 +1359,102 @@
14415
 
   "xscvspdpn %x0,%x1"
14416
 
   [(set_attr "type" "fp")])
14417
 
 
14418
 
+;; Convert and scale (used by vec_ctf, vec_cts, vec_ctu for double/long long)
14419
 
+
14420
 
+(define_expand "vsx_xvcvsxddp_scale"
14421
 
+  [(match_operand:V2DF 0 "vsx_register_operand" "")
14422
 
+   (match_operand:V2DI 1 "vsx_register_operand" "")
14423
 
+   (match_operand:QI 2 "immediate_operand" "")]
14424
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14425
 
+{
14426
 
+  rtx op0 = operands[0];
14427
 
+  rtx op1 = operands[1];
14428
 
+  int scale = INTVAL(operands[2]);
14429
 
+  emit_insn (gen_vsx_xvcvsxddp (op0, op1));
14430
 
+  if (scale != 0)
14431
 
+    rs6000_scale_v2df (op0, op0, -scale);
14432
 
+  DONE;
14433
 
+})
14434
 
+
14435
 
+(define_insn "vsx_xvcvsxddp"
14436
 
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wa")
14437
 
+        (unspec:V2DF [(match_operand:V2DI 1 "vsx_register_operand" "wa")]
14438
 
+                     UNSPEC_VSX_XVCVSXDDP))]
14439
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14440
 
+  "xvcvsxddp %x0,%x1"
14441
 
+  [(set_attr "type" "vecdouble")])
14442
 
+
14443
 
+(define_expand "vsx_xvcvuxddp_scale"
14444
 
+  [(match_operand:V2DF 0 "vsx_register_operand" "")
14445
 
+   (match_operand:V2DI 1 "vsx_register_operand" "")
14446
 
+   (match_operand:QI 2 "immediate_operand" "")]
14447
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14448
 
+{
14449
 
+  rtx op0 = operands[0];
14450
 
+  rtx op1 = operands[1];
14451
 
+  int scale = INTVAL(operands[2]);
14452
 
+  emit_insn (gen_vsx_xvcvuxddp (op0, op1));
14453
 
+  if (scale != 0)
14454
 
+    rs6000_scale_v2df (op0, op0, -scale);
14455
 
+  DONE;
14456
 
+})
14457
 
+
14458
 
+(define_insn "vsx_xvcvuxddp"
14459
 
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wa")
14460
 
+        (unspec:V2DF [(match_operand:V2DI 1 "vsx_register_operand" "wa")]
14461
 
+                     UNSPEC_VSX_XVCVUXDDP))]
14462
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14463
 
+  "xvcvuxddp %x0,%x1"
14464
 
+  [(set_attr "type" "vecdouble")])
14465
 
+
14466
 
+(define_expand "vsx_xvcvdpsxds_scale"
14467
 
+  [(match_operand:V2DI 0 "vsx_register_operand" "")
14468
 
+   (match_operand:V2DF 1 "vsx_register_operand" "")
14469
 
+   (match_operand:QI 2 "immediate_operand" "")]
14470
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14471
 
+{
14472
 
+  rtx op0 = operands[0];
14473
 
+  rtx op1 = operands[1];
14474
 
+  rtx tmp = gen_reg_rtx (V2DFmode);
14475
 
+  int scale = INTVAL(operands[2]);
14476
 
+  if (scale != 0)
14477
 
+    rs6000_scale_v2df (tmp, op1, scale);
14478
 
+  emit_insn (gen_vsx_xvcvdpsxds (op0, tmp));
14479
 
+  DONE;
14480
 
+})
14481
 
+
14482
 
+(define_insn "vsx_xvcvdpsxds"
14483
 
+  [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
14484
 
+        (unspec:V2DI [(match_operand:V2DF 1 "vsx_register_operand" "wa")]
14485
 
+                     UNSPEC_VSX_XVCVDPSXDS))]
14486
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14487
 
+  "xvcvdpsxds %x0,%x1"
14488
 
+  [(set_attr "type" "vecdouble")])
14489
 
+
14490
 
+(define_expand "vsx_xvcvdpuxds_scale"
14491
 
+  [(match_operand:V2DI 0 "vsx_register_operand" "")
14492
 
+   (match_operand:V2DF 1 "vsx_register_operand" "")
14493
 
+   (match_operand:QI 2 "immediate_operand" "")]
14494
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14495
 
+{
14496
 
+  rtx op0 = operands[0];
14497
 
+  rtx op1 = operands[1];
14498
 
+  rtx tmp = gen_reg_rtx (V2DFmode);
14499
 
+  int scale = INTVAL(operands[2]);
14500
 
+  if (scale != 0)
14501
 
+    rs6000_scale_v2df (tmp, op1, scale);
14502
 
+  emit_insn (gen_vsx_xvcvdpuxds (op0, tmp));
14503
 
+  DONE;
14504
 
+})
14505
 
+
14506
 
+(define_insn "vsx_xvcvdpuxds"
14507
 
+  [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
14508
 
+        (unspec:V2DI [(match_operand:V2DF 1 "vsx_register_operand" "wa")]
14509
 
+                     UNSPEC_VSX_XVCVDPUXDS))]
14510
 
+  "VECTOR_UNIT_VSX_P (V2DFmode)"
14511
 
+  "xvcvdpuxds %x0,%x1"
14512
 
+  [(set_attr "type" "vecdouble")])
14513
 
+
14514
 
 ;; Convert from 64-bit to 32-bit types
14515
 
 ;; Note, favor the Altivec registers since the usual use of these instructions
14516
 
 ;; is in vector converts and we need to use the Altivec vperm instruction.
14517
 
@@ -1302,10 +1528,10 @@
14518
 
 ;; since the xsrdpiz instruction does not truncate the value if the floating
14519
 
 ;; point value is < LONG_MIN or > LONG_MAX.
14520
 
 (define_insn "*vsx_float_fix_<mode>2"
14521
 
-  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
14522
 
+  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14523
 
        (float:VSX_DF
14524
 
         (fix:<VSI>
14525
 
-         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
14526
 
+         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
14527
 
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
14528
 
    && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
14529
 
    && !flag_trapping_math && TARGET_FRIZ"
14530
 
@@ -1318,10 +1544,10 @@
14531
 
 
14532
 
 ;; Build a V2DF/V2DI vector from two scalars
14533
 
 (define_insn "vsx_concat_<mode>"
14534
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
14535
 
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14536
 
        (vec_concat:VSX_D
14537
 
-        (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
14538
 
-        (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
14539
 
+        (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
14540
 
+        (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
14541
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14542
 
 {
14543
 
   if (BYTES_BIG_ENDIAN)
14544
 
@@ -1352,9 +1578,9 @@
14545
 
 ;; xxpermdi for little endian loads and stores.  We need several of
14546
 
 ;; these since the form of the PARALLEL differs by mode.
14547
 
 (define_insn "*vsx_xxpermdi2_le_<mode>"
14548
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14549
 
-        (vec_select:VSX_D
14550
 
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
14551
 
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
14552
 
+        (vec_select:VSX_LE
14553
 
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
14554
 
           (parallel [(const_int 1) (const_int 0)])))]
14555
 
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14556
 
   "xxpermdi %x0,%x1,%x1,2"
14557
 
@@ -1361,9 +1587,9 @@
14558
 
   [(set_attr "type" "vecperm")])
14559
 
 
14560
 
 (define_insn "*vsx_xxpermdi4_le_<mode>"
14561
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
14562
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
14563
 
         (vec_select:VSX_W
14564
 
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
14565
 
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
14566
 
           (parallel [(const_int 2) (const_int 3)
14567
 
                      (const_int 0) (const_int 1)])))]
14568
 
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14569
 
@@ -1401,9 +1627,9 @@
14570
 
 ;; lxvd2x for little endian loads.  We need several of
14571
 
 ;; these since the form of the PARALLEL differs by mode.
14572
 
 (define_insn "*vsx_lxvd2x2_le_<mode>"
14573
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14574
 
-        (vec_select:VSX_D
14575
 
-          (match_operand:VSX_D 1 "memory_operand" "Z")
14576
 
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
14577
 
+        (vec_select:VSX_LE
14578
 
+          (match_operand:VSX_LE 1 "memory_operand" "Z")
14579
 
           (parallel [(const_int 1) (const_int 0)])))]
14580
 
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14581
 
   "lxvd2x %x0,%y1"
14582
 
@@ -1410,7 +1636,7 @@
14583
 
   [(set_attr "type" "vecload")])
14584
 
 
14585
 
 (define_insn "*vsx_lxvd2x4_le_<mode>"
14586
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
14587
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
14588
 
         (vec_select:VSX_W
14589
 
           (match_operand:VSX_W 1 "memory_operand" "Z")
14590
 
           (parallel [(const_int 2) (const_int 3)
14591
 
@@ -1450,9 +1676,9 @@
14592
 
 ;; stxvd2x for little endian stores.  We need several of
14593
 
 ;; these since the form of the PARALLEL differs by mode.
14594
 
 (define_insn "*vsx_stxvd2x2_le_<mode>"
14595
 
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
14596
 
-        (vec_select:VSX_D
14597
 
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
14598
 
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
14599
 
+        (vec_select:VSX_LE
14600
 
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
14601
 
           (parallel [(const_int 1) (const_int 0)])))]
14602
 
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14603
 
   "stxvd2x %x1,%y0"
14604
 
@@ -1461,7 +1687,7 @@
14605
 
 (define_insn "*vsx_stxvd2x4_le_<mode>"
14606
 
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
14607
 
         (vec_select:VSX_W
14608
 
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
14609
 
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
14610
 
           (parallel [(const_int 2) (const_int 3)
14611
 
                      (const_int 0) (const_int 1)])))]
14612
 
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14613
 
@@ -1513,11 +1739,12 @@
14614
 
 
14615
 
 ;; Set the element of a V2DI/VD2F mode
14616
 
 (define_insn "vsx_set_<mode>"
14617
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
14618
 
-       (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
14619
 
-                      (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
14620
 
-                      (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
14621
 
-                     UNSPEC_VSX_SET))]
14622
 
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
14623
 
+       (unspec:VSX_D
14624
 
+        [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
14625
 
+         (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
14626
 
+         (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
14627
 
+        UNSPEC_VSX_SET))]
14628
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14629
 
 {
14630
 
   int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
14631
 
@@ -1582,7 +1809,7 @@
14632
 
 (define_insn_and_split "vsx_extract_v4sf"
14633
 
   [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
14634
 
        (vec_select:SF
14635
 
-        (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
14636
 
+        (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
14637
 
         (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
14638
 
    (clobber (match_scratch:V4SF 3 "=X,0"))]
14639
 
   "VECTOR_UNIT_VSX_P (V4SFmode)"
14640
 
@@ -1606,7 +1833,7 @@
14641
 
     {
14642
 
       if (GET_CODE (op3) == SCRATCH)
14643
 
        op3 = gen_reg_rtx (V4SFmode);
14644
 
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
14645
 
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
14646
 
       tmp = op3;
14647
 
     }
14648
 
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
14649
 
@@ -1765,9 +1992,9 @@
14650
 
 
14651
 
 ;; V2DF/V2DI splat
14652
 
 (define_insn "vsx_splat_<mode>"
14653
 
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
14654
 
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
14655
 
        (vec_duplicate:VSX_D
14656
 
-        (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
14657
 
+        (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
14658
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14659
 
   "@
14660
 
    xxpermdi %x0,%x1,%x1,0
14661
 
@@ -1780,10 +2007,10 @@
14662
 
 
14663
 
 ;; V4SF/V4SI splat
14664
 
 (define_insn "vsx_xxspltw_<mode>"
14665
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14666
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14667
 
        (vec_duplicate:VSX_W
14668
 
         (vec_select:<VS_scalar>
14669
 
-         (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14670
 
+         (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14671
 
          (parallel
14672
 
           [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
14673
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14674
 
@@ -1796,8 +2023,8 @@
14675
 
   [(set_attr "type" "vecperm")])
14676
 
 
14677
 
 (define_insn "vsx_xxspltw_<mode>_direct"
14678
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14679
 
-        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14680
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14681
 
+        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14682
 
                        (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
14683
 
                       UNSPEC_VSX_XXSPLTW))]
14684
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14685
 
@@ -1804,13 +2031,29 @@
14686
 
   "xxspltw %x0,%x1,%2"
14687
 
   [(set_attr "type" "vecperm")])
14688
 
 
14689
 
+;; V2DF/V2DI splat for use by vec_splat builtin
14690
 
+(define_insn "vsx_xxspltd_<mode>"
14691
 
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14692
 
+        (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wa")
14693
 
+                      (match_operand:QI 2 "u5bit_cint_operand" "i")]
14694
 
+                      UNSPEC_VSX_XXSPLTD))]
14695
 
+  "VECTOR_MEM_VSX_P (<MODE>mode)"
14696
 
+{
14697
 
+  if ((VECTOR_ELT_ORDER_BIG && INTVAL (operands[2]) == 0)
14698
 
+      || (!VECTOR_ELT_ORDER_BIG && INTVAL (operands[2]) == 1))
14699
 
+    return "xxpermdi %x0,%x1,%x1,0";
14700
 
+  else
14701
 
+    return "xxpermdi %x0,%x1,%x1,3";
14702
 
+}
14703
 
+  [(set_attr "type" "vecperm")])
14704
 
+
14705
 
 ;; V4SF/V4SI interleave
14706
 
 (define_insn "vsx_xxmrghw_<mode>"
14707
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14708
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14709
 
         (vec_select:VSX_W
14710
 
          (vec_concat:<VS_double>
14711
 
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14712
 
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
14713
 
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14714
 
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
14715
 
          (parallel [(const_int 0) (const_int 4)
14716
 
                     (const_int 1) (const_int 5)])))]
14717
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14718
 
@@ -1823,11 +2066,11 @@
14719
 
   [(set_attr "type" "vecperm")])
14720
 
 
14721
 
 (define_insn "vsx_xxmrglw_<mode>"
14722
 
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14723
 
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14724
 
        (vec_select:VSX_W
14725
 
          (vec_concat:<VS_double>
14726
 
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14727
 
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
14728
 
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14729
 
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
14730
 
          (parallel [(const_int 2) (const_int 6)
14731
 
                     (const_int 3) (const_int 7)])))]
14732
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14733
 
@@ -1841,9 +2084,9 @@
14734
 
 
14735
 
 ;; Shift left double by word immediate
14736
 
 (define_insn "vsx_xxsldwi_<mode>"
14737
 
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
14738
 
-       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
14739
 
-                      (match_operand:VSX_L 2 "vsx_register_operand" "wa")
14740
 
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
14741
 
+       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
14742
 
+                      (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
14743
 
                       (match_operand:QI 3 "u5bit_cint_operand" "i")]
14744
 
                      UNSPEC_VSX_SLDWI))]
14745
 
   "VECTOR_MEM_VSX_P (<MODE>mode)"
14746
 
@@ -1924,7 +2167,7 @@
14747
 
 ;; to the top element of the V2DF array without doing an extract.
14748
 
 
14749
 
 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
14750
 
-  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
14751
 
+  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
14752
 
        (vec_select:DF
14753
 
         (VEC_reduc:V2DF
14754
 
          (vec_concat:V2DF
14755
 
Index: gcc/config/rs6000/rs6000.h
14756
 
===================================================================
14757
 
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_8_3_release)
14758
 
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_8-branch)
14759
 
@@ -1438,6 +1438,10 @@
14760
 
   RS6000_CONSTRAINT_wd,                /* VSX register for V2DF */
14761
 
   RS6000_CONSTRAINT_wf,                /* VSX register for V4SF */
14762
 
   RS6000_CONSTRAINT_wg,                /* FPR register for -mmfpgpr */
14763
 
+  RS6000_CONSTRAINT_wh,                /* FPR register for direct moves.  */
14764
 
+  RS6000_CONSTRAINT_wi,                /* FPR/VSX register to hold DImode */
14765
 
+  RS6000_CONSTRAINT_wj,                /* FPR/VSX register for DImode direct moves. */
14766
 
+  RS6000_CONSTRAINT_wk,                /* FPR/VSX register for DFmode direct moves. */
14767
 
   RS6000_CONSTRAINT_wl,                /* FPR register for LFIWAX */
14768
 
   RS6000_CONSTRAINT_wm,                /* VSX register for direct move */
14769
 
   RS6000_CONSTRAINT_wr,                /* GPR register if 64-bit  */
14770
 
@@ -1462,6 +1466,9 @@
14771
 
 #define VSX_REG_CLASS_P(CLASS)                 \
14772
 
   ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
14773
 
 
14774
 
+/* Return whether a given register class targets general purpose registers.  */
14775
 
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
14776
 
+
14777
 
 /* Given an rtx X being reloaded into a reg required to be
14778
 
    in class CLASS, return the class of reg to actually use.
14779
 
    In general this is just CLASS; but on some machines
14780
 
@@ -1593,8 +1600,15 @@
14781
 
 /* Define this if stack space is still allocated for a parameter passed
14782
 
    in a register.  The value is the number of bytes allocated to this
14783
 
    area.  */
14784
 
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
14785
 
+#define REG_PARM_STACK_SPACE(FNDECL) \
14786
 
+  rs6000_reg_parm_stack_space ((FNDECL), false)
14787
 
 
14788
 
+/* Define this macro if space guaranteed when compiling a function body
14789
 
+   is different to space required when making a call, a situation that
14790
 
+   can arise with K&R style function definitions.  */
14791
 
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
14792
 
+  rs6000_reg_parm_stack_space ((FNDECL), true)
14793
 
+
14794
 
 /* Define this if the above stack space is to be considered part of the
14795
 
    space allocated by the caller.  */
14796
 
 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
14797
 
@@ -2483,8 +2497,8 @@
14798
 
 #define RS6000_BTC_SAT         RS6000_BTC_MISC /* saturate sets VSCR.  */
14799
 
 
14800
 
 /* Builtin targets.  For now, we reuse the masks for those options that are in
14801
 
-   target flags, and pick two random bits for SPE and paired which aren't in
14802
 
-   target_flags.  */
14803
 
+   target flags, and pick three random bits for SPE, paired and ldbl128 which
14804
 
+   aren't in target_flags.  */
14805
 
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
14806
 
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
14807
 
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
14808
 
@@ -2501,6 +2515,7 @@
14809
 
 #define RS6000_BTM_CELL                MASK_FPRND      /* Target is cell powerpc.  */
14810
 
 #define RS6000_BTM_DFP         MASK_DFP        /* Decimal floating point.  */
14811
 
 #define RS6000_BTM_HARD_FLOAT  MASK_SOFT_FLOAT /* Hardware floating point.  */
14812
 
+#define RS6000_BTM_LDBL128     MASK_MULTIPLE   /* 128-bit long double.  */
14813
 
 
14814
 
 #define RS6000_BTM_COMMON      (RS6000_BTM_ALTIVEC                     \
14815
 
                                 | RS6000_BTM_VSX                       \
14816
 
@@ -2514,7 +2529,8 @@
14817
 
                                 | RS6000_BTM_POPCNTD                   \
14818
 
                                 | RS6000_BTM_CELL                      \
14819
 
                                 | RS6000_BTM_DFP                       \
14820
 
-                                | RS6000_BTM_HARD_FLOAT)
14821
 
+                                | RS6000_BTM_HARD_FLOAT                \
14822
 
+                                | RS6000_BTM_LDBL128)
14823
 
 
14824
 
 /* Define builtin enum index.  */
14825
 
 
14826
 
Index: gcc/config/rs6000/altivec.md
14827
 
===================================================================
14828
 
--- a/src/gcc/config/rs6000/altivec.md  (.../tags/gcc_4_8_3_release)
14829
 
+++ b/src/gcc/config/rs6000/altivec.md  (.../branches/gcc-4_8-branch)
14830
 
@@ -67,7 +67,7 @@
14831
 
    UNSPEC_VCTSXS
14832
 
    UNSPEC_VLOGEFP
14833
 
    UNSPEC_VEXPTEFP
14834
 
-   UNSPEC_VLSDOI
14835
 
+   UNSPEC_VSLDOI
14836
 
    UNSPEC_VUNPACK_HI_SIGN
14837
 
    UNSPEC_VUNPACK_LO_SIGN
14838
 
    UNSPEC_VUNPACK_HI_SIGN_DIRECT
14839
 
@@ -2077,7 +2077,7 @@
14840
 
         (unspec:VM [(match_operand:VM 1 "register_operand" "v")
14841
 
                    (match_operand:VM 2 "register_operand" "v")
14842
 
                    (match_operand:QI 3 "immediate_operand" "i")]
14843
 
-                 UNSPEC_VLSDOI))]
14844
 
+                 UNSPEC_VSLDOI))]
14845
 
   "TARGET_ALTIVEC"
14846
 
   "vsldoi %0,%1,%2,%3"
14847
 
   [(set_attr "type" "vecperm")])
14848
 
@@ -2297,7 +2297,31 @@
14849
 
   "dststt %0,%1,%2"
14850
 
   [(set_attr "type" "vecsimple")])
14851
 
 
14852
 
-(define_insn "altivec_lvsl"
14853
 
+(define_expand "altivec_lvsl"
14854
 
+  [(use (match_operand:V16QI 0 "register_operand" ""))
14855
 
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
14856
 
+  "TARGET_ALTIVEC"
14857
 
+{
14858
 
+  if (VECTOR_ELT_ORDER_BIG)
14859
 
+    emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
14860
 
+  else
14861
 
+    {
14862
 
+      int i;
14863
 
+      rtx mask, perm[16], constv, vperm;
14864
 
+      mask = gen_reg_rtx (V16QImode);
14865
 
+      emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
14866
 
+      for (i = 0; i < 16; ++i)
14867
 
+        perm[i] = GEN_INT (i);
14868
 
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
14869
 
+      constv = force_reg (V16QImode, constv);
14870
 
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
14871
 
+                              UNSPEC_VPERM);
14872
 
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
14873
 
+    }
14874
 
+  DONE;
14875
 
+})
14876
 
+
14877
 
+(define_insn "altivec_lvsl_direct"
14878
 
   [(set (match_operand:V16QI 0 "register_operand" "=v")
14879
 
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
14880
 
                      UNSPEC_LVSL))]
14881
 
@@ -2305,7 +2329,31 @@
14882
 
   "lvsl %0,%y1"
14883
 
   [(set_attr "type" "vecload")])
14884
 
 
14885
 
-(define_insn "altivec_lvsr"
14886
 
+(define_expand "altivec_lvsr"
14887
 
+  [(use (match_operand:V16QI 0 "register_operand" ""))
14888
 
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
14889
 
+  "TARGET_ALTIVEC"
14890
 
+{
14891
 
+  if (VECTOR_ELT_ORDER_BIG)
14892
 
+    emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
14893
 
+  else
14894
 
+    {
14895
 
+      int i;
14896
 
+      rtx mask, perm[16], constv, vperm;
14897
 
+      mask = gen_reg_rtx (V16QImode);
14898
 
+      emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
14899
 
+      for (i = 0; i < 16; ++i)
14900
 
+        perm[i] = GEN_INT (i);
14901
 
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
14902
 
+      constv = force_reg (V16QImode, constv);
14903
 
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
14904
 
+                              UNSPEC_VPERM);
14905
 
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
14906
 
+    }
14907
 
+  DONE;
14908
 
+})
14909
 
+
14910
 
+(define_insn "altivec_lvsr_direct"
14911
 
   [(set (match_operand:V16QI 0 "register_operand" "=v")
14912
 
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
14913
 
                      UNSPEC_LVSR))]
14914
 
Index: gcc/config/rs6000/rs6000.md
14915
 
===================================================================
14916
 
--- a/src/gcc/config/rs6000/rs6000.md   (.../tags/gcc_4_8_3_release)
14917
 
+++ b/src/gcc/config/rs6000/rs6000.md   (.../branches/gcc-4_8-branch)
14918
 
@@ -134,6 +134,7 @@
14919
 
    UNSPEC_UNPACK_128BIT
14920
 
    UNSPEC_PACK_128BIT
14921
 
    UNSPEC_LSQ
14922
 
+   UNSPEC_FUSION_GPR
14923
 
   ])
14924
 
 
14925
 
 ;;
14926
 
@@ -317,8 +318,25 @@
14927
 
 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0")  (SD "stxsiwzx %x1,%y0")])
14928
 
 
14929
 
 ; Definitions for 32-bit fpr direct move
14930
 
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
14931
 
+; At present, the decimal modes are not allowed in the traditional altivec
14932
 
+; registers, so restrict the constraints to just the traditional FPRs.
14933
 
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
14934
 
 
14935
 
+; Definitions for 32-bit VSX
14936
 
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
14937
 
+
14938
 
+; Definitions for 32-bit use of altivec registers
14939
 
+(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
14940
 
+
14941
 
+; Definitions for 64-bit VSX
14942
 
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
14943
 
+
14944
 
+; Definitions for 64-bit direct move
14945
 
+(define_mode_attr f64_dm  [(DF "wk") (DD "wh")])
14946
 
+
14947
 
+; Definitions for 64-bit use of altivec registers
14948
 
+(define_mode_attr f64_av  [(DF "wv") (DD "wn")])
14949
 
+
14950
 
 ; These modes do not fit in integer registers in 32-bit mode.
14951
 
 ; but on e500v2, the gpr are 64 bit registers
14952
 
 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
14953
 
@@ -424,7 +442,7 @@
14954
 
 ;; either.
14955
 
 
14956
 
 ;; Mode attribute for boolean operation register constraints for output
14957
 
-(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wa,v")
14958
 
+(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wt,v")
14959
 
                                         (PTI   "&r,r,r")
14960
 
                                         (V16QI "wa,v,&?r,?r,?r")
14961
 
                                         (V8HI  "wa,v,&?r,?r,?r")
14962
 
@@ -435,7 +453,7 @@
14963
 
                                         (V1TI  "wa,v,&?r,?r,?r")])
14964
 
 
14965
 
 ;; Mode attribute for boolean operation register constraints for operand1
14966
 
-(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wa,v")
14967
 
+(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wt,v")
14968
 
                                         (PTI   "r,0,r")
14969
 
                                         (V16QI "wa,v,r,0,r")
14970
 
                                         (V8HI  "wa,v,r,0,r")
14971
 
@@ -446,7 +464,7 @@
14972
 
                                         (V1TI  "wa,v,r,0,r")])
14973
 
 
14974
 
 ;; Mode attribute for boolean operation register constraints for operand2
14975
 
-(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wa,v")
14976
 
+(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wt,v")
14977
 
                                         (PTI   "r,r,0")
14978
 
                                         (V16QI "wa,v,r,r,0")
14979
 
                                         (V8HI  "wa,v,r,r,0")
14980
 
@@ -459,7 +477,7 @@
14981
 
 ;; Mode attribute for boolean operation register constraints for operand1
14982
 
 ;; for one_cmpl.  To simplify things, we repeat the constraint where 0
14983
 
 ;; is used for operand1 or operand2
14984
 
-(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wa,v")
14985
 
+(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wt,v")
14986
 
                                         (PTI   "r,0,0")
14987
 
                                         (V16QI "wa,v,r,0,0")
14988
 
                                         (V8HI  "wa,v,r,0,0")
14989
 
@@ -566,7 +584,7 @@
14990
 
   "")
14991
 
 
14992
 
 (define_insn "*zero_extendsidi2_lfiwzx"
14993
 
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
14994
 
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
14995
 
        (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
14996
 
   "TARGET_POWERPC64 && TARGET_LFIWZX"
14997
 
   "@
14998
 
@@ -736,8 +754,8 @@
14999
 
   "")
15000
 
 
15001
 
 (define_insn "*extendsidi2_lfiwax"
15002
 
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
15003
 
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
15004
 
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
15005
 
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
15006
 
   "TARGET_POWERPC64 && TARGET_LFIWAX"
15007
 
   "@
15008
 
    lwa%U1%X1 %0,%1
15009
 
@@ -760,7 +778,7 @@
15010
 
 
15011
 
 (define_insn "*extendsidi2_nocell"
15012
 
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
15013
 
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
15014
 
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
15015
 
   "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
15016
 
   "@
15017
 
    lwa%U1%X1 %0,%1
15018
 
@@ -5614,7 +5632,7 @@
15019
 
 ; We don't define lfiwax/lfiwzx with the normal definition, because we
15020
 
 ; don't want to support putting SImode in FPR registers.
15021
 
 (define_insn "lfiwax"
15022
 
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
15023
 
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
15024
 
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
15025
 
                   UNSPEC_LFIWAX))]
15026
 
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
15027
 
@@ -5694,7 +5712,7 @@
15028
 
    (set_attr "type" "fpload")])
15029
 
 
15030
 
 (define_insn "lfiwzx"
15031
 
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
15032
 
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
15033
 
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
15034
 
                   UNSPEC_LFIWZX))]
15035
 
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
15036
 
@@ -9210,8 +9228,8 @@
15037
 
 }")
15038
 
 
15039
 
 (define_insn "mov<mode>_hardfloat"
15040
 
-  [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,wa,wa,<f32_lr>,<f32_sm>,wu,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
15041
 
-       (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,wa,j,<f32_lm>,<f32_sr>,Z,wu,r,<f32_dm>,r,h,0,G,Fn"))]
15042
 
+  [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,<f32_vsx>,<f32_vsx>,<f32_lr>,<f32_sm>,<f32_av>,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
15043
 
+       (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,<f32_vsx>,j,<f32_lm>,<f32_sr>,Z,<f32_av>,r,<f32_dm>,r, h, 0, G,Fn"))]
15044
 
   "(gpc_reg_operand (operands[0], <MODE>mode)
15045
 
    || gpc_reg_operand (operands[1], <MODE>mode))
15046
 
    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
15047
 
@@ -9422,8 +9440,8 @@
15048
 
 ;; reloading.
15049
 
 
15050
 
 (define_insn "*mov<mode>_hardfloat32"
15051
 
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
15052
 
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
15053
 
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
15054
 
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
15055
 
   "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
15056
 
    && (gpc_reg_operand (operands[0], <MODE>mode)
15057
 
        || gpc_reg_operand (operands[1], <MODE>mode))"
15058
 
@@ -9491,8 +9509,8 @@
15059
 
 ; ld/std require word-aligned displacements -> 'Y' constraint.
15060
 
 ; List Y->r and r->Y before r->r for reload.
15061
 
 (define_insn "*mov<mode>_hardfloat64"
15062
 
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,wm")
15063
 
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,r,h,0,G,H,F,wg,r,wm,r"))]
15064
 
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,<f64_dm>")
15065
 
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,r,h,0,G,H,F,wg,r,<f64_dm>,r"))]
15066
 
   "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
15067
 
    && (gpc_reg_operand (operands[0], <MODE>mode)
15068
 
        || gpc_reg_operand (operands[1], <MODE>mode))"
15069
 
@@ -10272,8 +10290,8 @@
15070
 
 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
15071
 
 
15072
 
 (define_insn "*movdi_internal64"
15073
 
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
15074
 
-       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
15075
 
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
15076
 
+       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
15077
 
   "TARGET_POWERPC64
15078
 
    && (gpc_reg_operand (operands[0], DImode)
15079
 
        || gpc_reg_operand (operands[1], DImode))"
15080
 
@@ -10293,7 +10311,8 @@
15081
 
    mftgpr %0,%1
15082
 
    mffgpr %0,%1
15083
 
    mfvsrd %0,%x1
15084
 
-   mtvsrd %x0,%1"
15085
 
+   mtvsrd %x0,%1
15086
 
+   xxlxor %x0,%x0,%x0"
15087
 
   [(set_attr_alternative "type"
15088
 
       [(if_then_else
15089
 
         (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
15090
 
@@ -10334,8 +10353,9 @@
15091
 
        (const_string "mftgpr")
15092
 
        (const_string "mffgpr")
15093
 
        (const_string "mftgpr")
15094
 
-       (const_string "mffgpr")])
15095
 
-   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
15096
 
+       (const_string "mffgpr")
15097
 
+       (const_string "vecsimple")])
15098
 
+   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
15099
 
 
15100
 
 ;; immediate value valid for a single instruction hiding in a const_double
15101
 
 (define_insn ""
15102
 
@@ -15751,23 +15771,10 @@
15103
 
 ;; a GPR.  The addis instruction must be adjacent to the load, and use the same
15104
 
 ;; register that is being loaded.  The fused ops must be physically adjacent.
15105
 
 
15106
 
-;; We use define_peephole for the actual addis/load, and the register used to
15107
 
-;; hold the addis value must be the same as the register being loaded.  We use
15108
 
-;; define_peephole2 to change the register used for addis to be the register
15109
 
-;; being loaded, since we can look at whether it is dead after the load insn.
15110
 
+;; Find cases where the addis that feeds into a load instruction is either used
15111
 
+;; once or is the same as the target register, and replace it with the fusion
15112
 
+;; insn
15113
 
 
15114
 
-(define_peephole
15115
 
-  [(set (match_operand:P 0 "base_reg_operand" "")
15116
 
-       (match_operand:P 1 "fusion_gpr_addis" ""))
15117
 
-   (set (match_operand:INT1 2 "base_reg_operand" "")
15118
 
-       (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
15119
 
-  "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
15120
 
-{
15121
 
-  return emit_fusion_gpr_load (operands);
15122
 
-}
15123
 
-  [(set_attr "type" "load")
15124
 
-   (set_attr "length" "8")])
15125
 
-
15126
 
 (define_peephole2
15127
 
   [(set (match_operand:P 0 "base_reg_operand" "")
15128
 
        (match_operand:P 1 "fusion_gpr_addis" ""))
15129
 
@@ -15774,9 +15781,8 @@
15130
 
    (set (match_operand:INT1 2 "base_reg_operand" "")
15131
 
        (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
15132
 
   "TARGET_P8_FUSION
15133
 
-   && (REGNO (operands[0]) != REGNO (operands[2])
15134
 
-       || GET_CODE (operands[3]) == SIGN_EXTEND)
15135
 
-   && fusion_gpr_load_p (operands, true)"
15136
 
+   && fusion_gpr_load_p (operands[0], operands[1], operands[2],
15137
 
+                        operands[3])"
15138
 
   [(const_int 0)]
15139
 
 {
15140
 
   expand_fusion_gpr_load (operands);
15141
 
@@ -15783,6 +15789,20 @@
15142
 
   DONE;
15143
 
 })
15144
 
 
15145
 
+;; Fusion insn, created by the define_peephole2 above (and eventually by
15146
 
+;; reload)
15147
 
+
15148
 
+(define_insn "fusion_gpr_load_<mode>"
15149
 
+  [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
15150
 
+       (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
15151
 
+                    UNSPEC_FUSION_GPR))]
15152
 
+  "TARGET_P8_FUSION"
15153
 
+{
15154
 
+  return emit_fusion_gpr_load (operands[0], operands[1]);
15155
 
+}
15156
 
+  [(set_attr "type" "load")
15157
 
+   (set_attr "length" "8")])
15158
 
+
15159
 
 
15160
 
 ;; Miscellaneous ISA 2.06 (power7) instructions
15161
 
 (define_insn "addg6s"
15162
 
@@ -15847,26 +15867,6 @@
15163
 
   ""
15164
 
   "")
15165
 
 
15166
 
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
15167
 
-;; and __builtin_longdouble_dw1 to optimize glibc.  Add support for these
15168
 
-;; builtins here.
15169
 
-
15170
 
-(define_expand "unpacktf_0"
15171
 
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
15172
 
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
15173
 
-                   (const_int 0)]
15174
 
-        UNSPEC_UNPACK_128BIT))]
15175
 
-  ""
15176
 
-  "")
15177
 
-
15178
 
-(define_expand "unpacktf_1"
15179
 
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
15180
 
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
15181
 
-                   (const_int 1)]
15182
 
-        UNSPEC_UNPACK_128BIT))]
15183
 
-  ""
15184
 
-  "")
15185
 
-
15186
 
 (define_insn_and_split "unpack<mode>_dm"
15187
 
   [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
15188
 
        (unspec:<FP128_64>
15189
 
Index: gcc/config/rs6000/altivec.h
15190
 
===================================================================
15191
 
--- a/src/gcc/config/rs6000/altivec.h   (.../tags/gcc_4_8_3_release)
15192
 
+++ b/src/gcc/config/rs6000/altivec.h   (.../branches/gcc-4_8-branch)
15193
 
@@ -124,6 +124,7 @@
15194
 
 #define vec_vcfux __builtin_vec_vcfux
15195
 
 #define vec_cts __builtin_vec_cts
15196
 
 #define vec_ctu __builtin_vec_ctu
15197
 
+#define vec_cpsgn __builtin_vec_copysign
15198
 
 #define vec_expte __builtin_vec_expte
15199
 
 #define vec_floor __builtin_vec_floor
15200
 
 #define vec_loge __builtin_vec_loge
15201
 
@@ -214,8 +215,10 @@
15202
 
 #define vec_lvsl __builtin_vec_lvsl
15203
 
 #define vec_lvsr __builtin_vec_lvsr
15204
 
 #define vec_max __builtin_vec_max
15205
 
+#define vec_mergee __builtin_vec_vmrgew
15206
 
 #define vec_mergeh __builtin_vec_mergeh
15207
 
 #define vec_mergel __builtin_vec_mergel
15208
 
+#define vec_mergeo __builtin_vec_vmrgow
15209
 
 #define vec_min __builtin_vec_min
15210
 
 #define vec_mladd __builtin_vec_mladd
15211
 
 #define vec_msum __builtin_vec_msum
15212
 
@@ -319,6 +322,8 @@
15213
 
 #define vec_sqrt __builtin_vec_sqrt
15214
 
 #define vec_vsx_ld __builtin_vec_vsx_ld
15215
 
 #define vec_vsx_st __builtin_vec_vsx_st
15216
 
+#define vec_xl __builtin_vec_vsx_ld
15217
 
+#define vec_xst __builtin_vec_vsx_st
15218
 
 
15219
 
 /* Note, xxsldi and xxpermdi were added as __builtin_vsx_<xxx> functions
15220
 
    instead of __builtin_vec_<xxx>  */
15221
 
@@ -336,6 +341,7 @@
15222
 
 #define vec_vadduqm __builtin_vec_vadduqm
15223
 
 #define vec_vbpermq __builtin_vec_vbpermq
15224
 
 #define vec_vclz __builtin_vec_vclz
15225
 
+#define vec_cntlz __builtin_vec_vclz
15226
 
 #define vec_vclzb __builtin_vec_vclzb
15227
 
 #define vec_vclzd __builtin_vec_vclzd
15228
 
 #define vec_vclzh __builtin_vec_vclzh
15229
 
Index: gcc/config/rs6000/sysv4.h
15230
 
===================================================================
15231
 
--- a/src/gcc/config/rs6000/sysv4.h     (.../tags/gcc_4_8_3_release)
15232
 
+++ b/src/gcc/config/rs6000/sysv4.h     (.../branches/gcc-4_8-branch)
15233
 
@@ -292,7 +292,7 @@
15234
 
 /* An expression for the alignment of a structure field FIELD if the
15235
 
    alignment computed in the usual way is COMPUTED.  */
15236
 
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                  \
15237
 
-       ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
15238
 
+       (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))            \
15239
 
         ? 128 : COMPUTED)
15240
 
 
15241
 
 #undef  BIGGEST_FIELD_ALIGNMENT
15242
 
@@ -949,3 +949,27 @@
15243
 
 #define TARGET_USES_SYSV4_OPT 1
15244
 
 
15245
 
 #undef DBX_REGISTER_NUMBER
15246
 
+
15247
 
+/* Link -lasan early on the command line.  For -static-libasan, don't link
15248
 
+   it for -shared link, the executable should be compiled with -static-libasan
15249
 
+   in that case, and for executable link link with --{,no-}whole-archive around
15250
 
+   it to force everything into the executable.  And similarly for -ltsan.  */
15251
 
+#if defined(HAVE_LD_STATIC_DYNAMIC)
15252
 
+#undef LIBASAN_EARLY_SPEC
15253
 
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
15254
 
+  "%{static-libasan:%{!shared:" \
15255
 
+  LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
15256
 
+  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
15257
 
+#undef LIBTSAN_EARLY_SPEC
15258
 
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
15259
 
+  LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
15260
 
+  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
15261
 
+#endif
15262
 
+
15263
 
+/* Additional libraries needed by -static-libasan.  */
15264
 
+#undef STATIC_LIBASAN_LIBS
15265
 
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
15266
 
+
15267
 
+/* Additional libraries needed by -static-libtsan.  */
15268
 
+#undef STATIC_LIBTSAN_LIBS
15269
 
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
15270
 
Index: gcc/config/arm/arm.c
15271
 
===================================================================
15272
 
--- a/src/gcc/config/arm/arm.c  (.../tags/gcc_4_8_3_release)
15273
 
+++ b/src/gcc/config/arm/arm.c  (.../branches/gcc-4_8-branch)
15274
 
@@ -82,7 +82,6 @@
15275
 
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
15276
 
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
15277
 
 inline static int thumb1_index_register_rtx_p (rtx, int);
15278
 
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
15279
 
 static int thumb_far_jump_used_p (void);
15280
 
 static bool thumb_force_lr_save (void);
15281
 
 static unsigned arm_size_return_regs (void);
15282
 
@@ -24476,9 +24475,13 @@
15283
 
       fputs (":\n", file);
15284
 
       if (flag_pic)
15285
 
        {
15286
 
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
15287
 
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
15288
 
          rtx tem = XEXP (DECL_RTL (function), 0);
15289
 
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
15290
 
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
15291
 
+            pipeline offset is four rather than eight.  Adjust the offset
15292
 
+            accordingly.  */
15293
 
+         tem = plus_constant (GET_MODE (tem), tem,
15294
 
+                              TARGET_THUMB1_ONLY ? -3 : -7);
15295
 
          tem = gen_rtx_MINUS (GET_MODE (tem),
15296
 
                               tem,
15297
 
                               gen_rtx_SYMBOL_REF (Pmode,
15298
 
@@ -27462,4 +27465,13 @@
15299
 
 
15300
 
 }
15301
 
 
15302
 
+/* return TRUE if x is a reference to a value in a constant pool */
15303
 
+extern bool
15304
 
+arm_is_constant_pool_ref (rtx x)
15305
 
+{
15306
 
+  return (MEM_P (x)
15307
 
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
15308
 
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
15309
 
+}
15310
 
+
15311
 
 #include "gt-arm.h"
15312
 
Index: gcc/config/arm/arm.h
15313
 
===================================================================
15314
 
--- a/src/gcc/config/arm/arm.h  (.../tags/gcc_4_8_3_release)
15315
 
+++ b/src/gcc/config/arm/arm.h  (.../branches/gcc-4_8-branch)
15316
 
@@ -2082,9 +2082,10 @@
15317
 
    ? reverse_condition_maybe_unordered (code) \
15318
 
    : reverse_condition (code))
15319
 
 
15320
 
-/* The arm5 clz instruction returns 32.  */
15321
 
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
15322
 
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
15323
 
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
15324
 
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
15325
 
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
15326
 
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
15327
 
 
15328
 
 #define CC_STATUS_INIT \
15329
 
   do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
15330
 
Index: gcc/config/arm/arm-protos.h
15331
 
===================================================================
15332
 
--- a/src/gcc/config/arm/arm-protos.h   (.../tags/gcc_4_8_3_release)
15333
 
+++ b/src/gcc/config/arm/arm-protos.h   (.../branches/gcc-4_8-branch)
15334
 
@@ -55,6 +55,7 @@
15335
 
 extern int legitimate_pic_operand_p (rtx);
15336
 
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
15337
 
 extern rtx legitimize_tls_address (rtx, rtx);
15338
 
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
15339
 
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
15340
 
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
15341
 
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
15342
 
@@ -286,4 +287,6 @@
15343
 
 
15344
 
 extern void arm_emit_eabi_attribute (const char *, int, int);
15345
 
 
15346
 
+extern bool arm_is_constant_pool_ref (rtx);
15347
 
+
15348
 
 #endif /* ! GCC_ARM_PROTOS_H */
15349
 
Index: gcc/config/arm/constraints.md
15350
 
===================================================================
15351
 
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
15352
 
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
15353
 
@@ -36,7 +36,7 @@
15354
 
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
15355
 
 
15356
 
 ;; The following memory constraints have been used:
15357
 
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
15358
 
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
15359
 
 ;; in ARM state: Uq
15360
 
 ;; in Thumb state: Uu, Uw
15361
 
 
15362
 
@@ -310,6 +310,12 @@
15363
 
   An address valid for loading/storing register exclusive"
15364
 
  (match_operand 0 "mem_noofs_operand"))
15365
 
 
15366
 
+(define_memory_constraint "Uh"
15367
 
+ "@internal
15368
 
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
15369
 
+ (and (match_code "mem")
15370
 
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
15371
 
+
15372
 
 (define_memory_constraint "Ut"
15373
 
  "@internal
15374
 
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
15375
 
@@ -356,7 +362,8 @@
15376
 
  (and (match_code "mem")
15377
 
       (match_test "TARGET_ARM
15378
 
                   && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
15379
 
-                                                     SIGN_EXTEND, 0)")))
15380
 
+                                                     SIGN_EXTEND, 0)
15381
 
+                  && !arm_is_constant_pool_ref (op)")))
15382
 
 
15383
 
 (define_memory_constraint "Q"
15384
 
  "@internal
15385
 
Index: gcc/config/arm/arm.md
15386
 
===================================================================
15387
 
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
15388
 
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
15389
 
@@ -92,9 +92,11 @@
15390
 
 ; This can be "a" for ARM, "t" for either of the Thumbs, "32" for
15391
 
 ; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode.  "v6"
15392
 
 ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
15393
 
-; arm_arch6.  This attribute is used to compute attribute "enabled",
15394
 
-; use type "any" to enable an alternative in all cases.
15395
 
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
15396
 
+; arm_arch6.  "v6t2" for Thumb-2 with arm_arch6.  This attribute is
15397
 
+; used to compute attribute "enabled", use type "any" to enable an
15398
 
+; alternative in all cases.
15399
 
+
15400
 
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
15401
 
   (const_string "any"))
15402
 
 
15403
 
 (define_attr "arch_enabled" "no,yes"
15404
 
@@ -129,6 +131,10 @@
15405
 
              (match_test "TARGET_32BIT && !arm_arch6"))
15406
 
         (const_string "yes")
15407
 
 
15408
 
+        (and (eq_attr "arch" "v6t2")
15409
 
+             (match_test "TARGET_32BIT && arm_arch6 && arm_arch_thumb2"))
15410
 
+        (const_string "yes")
15411
 
+
15412
 
         (and (eq_attr "arch" "onlya8")
15413
 
              (eq_attr "tune" "cortexa8"))
15414
 
         (const_string "yes")
15415
 
@@ -4047,7 +4053,7 @@
15416
 
 (define_insn "unaligned_loadhis"
15417
 
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
15418
 
        (sign_extend:SI
15419
 
-         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
15420
 
+         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
15421
 
                     UNSPEC_UNALIGNED_LOAD)))]
15422
 
   "unaligned_access && TARGET_32BIT"
15423
 
   "ldr%(sh%)\t%0, %1\t@ unaligned"
15424
 
@@ -4655,7 +4661,7 @@
15425
 
 
15426
 
 (define_insn "*arm_zero_extendhisi2_v6"
15427
 
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
15428
 
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15429
 
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15430
 
   "TARGET_ARM && arm_arch6"
15431
 
   "@
15432
 
    uxth%?\\t%0, %1
15433
 
@@ -4748,7 +4754,7 @@
15434
 
 
15435
 
 (define_insn "*arm_zero_extendqisi2_v6"
15436
 
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
15437
 
-       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
15438
 
+       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
15439
 
   "TARGET_ARM && arm_arch6"
15440
 
   "@
15441
 
    uxtb%(%)\\t%0, %1
15442
 
@@ -4980,7 +4986,7 @@
15443
 
 
15444
 
 (define_insn "*arm_extendhisi2"
15445
 
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
15446
 
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15447
 
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15448
 
   "TARGET_ARM && arm_arch4 && !arm_arch6"
15449
 
   "@
15450
 
    #
15451
 
@@ -4987,23 +4993,19 @@
15452
 
    ldr%(sh%)\\t%0, %1"
15453
 
   [(set_attr "length" "8,4")
15454
 
    (set_attr "type" "alu_shift,load_byte")
15455
 
-   (set_attr "predicable" "yes")
15456
 
-   (set_attr "pool_range" "*,256")
15457
 
-   (set_attr "neg_pool_range" "*,244")]
15458
 
+   (set_attr "predicable" "yes")]
15459
 
 )
15460
 
 
15461
 
 ;; ??? Check Thumb-2 pool range
15462
 
 (define_insn "*arm_extendhisi2_v6"
15463
 
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
15464
 
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15465
 
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15466
 
   "TARGET_32BIT && arm_arch6"
15467
 
   "@
15468
 
    sxth%?\\t%0, %1
15469
 
    ldr%(sh%)\\t%0, %1"
15470
 
   [(set_attr "type" "simple_alu_shift,load_byte")
15471
 
-   (set_attr "predicable" "yes")
15472
 
-   (set_attr "pool_range" "*,256")
15473
 
-   (set_attr "neg_pool_range" "*,244")]
15474
 
+   (set_attr "predicable" "yes")]
15475
 
 )
15476
 
 
15477
 
 (define_insn "*arm_extendhisi2addsi"
15478
 
@@ -5045,9 +5047,7 @@
15479
 
   "TARGET_ARM && arm_arch4"
15480
 
   "ldr%(sb%)\\t%0, %1"
15481
 
   [(set_attr "type" "load_byte")
15482
 
-   (set_attr "predicable" "yes")
15483
 
-   (set_attr "pool_range" "256")
15484
 
-   (set_attr "neg_pool_range" "244")]
15485
 
+   (set_attr "predicable" "yes")]
15486
 
 )
15487
 
 
15488
 
 (define_expand "extendqisi2"
15489
 
@@ -5087,9 +5087,7 @@
15490
 
    ldr%(sb%)\\t%0, %1"
15491
 
   [(set_attr "length" "8,4")
15492
 
    (set_attr "type" "alu_shift,load_byte")
15493
 
-   (set_attr "predicable" "yes")
15494
 
-   (set_attr "pool_range" "*,256")
15495
 
-   (set_attr "neg_pool_range" "*,244")]
15496
 
+   (set_attr "predicable" "yes")]
15497
 
 )
15498
 
 
15499
 
 (define_insn "*arm_extendqisi_v6"
15500
 
@@ -5101,9 +5099,7 @@
15501
 
    sxtb%?\\t%0, %1
15502
 
    ldr%(sb%)\\t%0, %1"
15503
 
   [(set_attr "type" "simple_alu_shift,load_byte")
15504
 
-   (set_attr "predicable" "yes")
15505
 
-   (set_attr "pool_range" "*,256")
15506
 
-   (set_attr "neg_pool_range" "*,244")]
15507
 
+   (set_attr "predicable" "yes")]
15508
 
 )
15509
 
 
15510
 
 (define_insn "*arm_extendqisi2addsi"
15511
 
@@ -6292,8 +6288,8 @@
15512
 
 
15513
 
 ;; Pattern to recognize insn generated default case above
15514
 
 (define_insn "*movhi_insn_arch4"
15515
 
-  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r")
15516
 
-       (match_operand:HI 1 "general_operand"      "rI,K,r,mi"))]
15517
 
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,r")
15518
 
+       (match_operand:HI 1 "general_operand"      "rI,K,n,r,mi"))]
15519
 
   "TARGET_ARM
15520
 
    && arm_arch4
15521
 
    && (register_operand (operands[0], HImode)
15522
 
@@ -6301,17 +6297,20 @@
15523
 
   "@
15524
 
    mov%?\\t%0, %1\\t%@ movhi
15525
 
    mvn%?\\t%0, #%B1\\t%@ movhi
15526
 
+   movw%?\\t%0, %L1\\t%@ movhi
15527
 
    str%(h%)\\t%1, %0\\t%@ movhi
15528
 
    ldr%(h%)\\t%0, %1\\t%@ movhi"
15529
 
   [(set_attr "predicable" "yes")
15530
 
-   (set_attr "insn" "mov,mvn,*,*")
15531
 
-   (set_attr "pool_range" "*,*,*,256")
15532
 
-   (set_attr "neg_pool_range" "*,*,*,244")
15533
 
+   (set_attr "insn" "mov,mvn,mov,*,*")
15534
 
+   (set_attr "pool_range" "*,*,*,*,256")
15535
 
+   (set_attr "neg_pool_range" "*,*,*,*,244")
15536
 
+   (set_attr "arch" "*,*,v6t2,*,*")
15537
 
    (set_attr_alternative "type"
15538
 
                          [(if_then_else (match_operand 1 "const_int_operand" "")
15539
 
                                         (const_string "simple_alu_imm" )
15540
 
                                         (const_string "*"))
15541
 
                           (const_string "simple_alu_imm")
15542
 
+                          (const_string "simple_alu_imm")
15543
 
                           (const_string "store1")
15544
 
                           (const_string "load1")])]
15545
 
 )
15546
 
@@ -7630,12 +7629,13 @@
15547
 
 
15548
 
 (define_insn "*arm_cmpdi_unsigned"
15549
 
   [(set (reg:CC_CZ CC_REGNUM)
15550
 
-       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
15551
 
-                      (match_operand:DI 1 "arm_di_operand"     "rDi")))]
15552
 
+       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
15553
 
+                      (match_operand:DI 1 "arm_di_operand"     "rDi,rDi")))]
15554
 
   "TARGET_32BIT"
15555
 
   "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
15556
 
   [(set_attr "conds" "set")
15557
 
-   (set_attr "length" "8")]
15558
 
+   (set_attr "arch" "a,t2")
15559
 
+   (set_attr "length" "8,10")]
15560
 
 )
15561
 
 
15562
 
 (define_insn "*arm_cmpdi_zero"
15563
 
Index: gcc/config/arm/t-rtems-eabi
15564
 
===================================================================
15565
 
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_8_3_release)
15566
 
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_8-branch)
15567
 
@@ -1,47 +1,167 @@
15568
 
 # Custom RTEMS EABI multilibs
15569
 
 
15570
 
-MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
15571
 
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
15572
 
+MULTILIB_OPTIONS  = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
15573
 
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
15574
 
 
15575
 
 # Enumeration of multilibs
15576
 
 
15577
 
 MULTILIB_EXCEPTIONS =
15578
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
15579
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
15580
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15581
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
15582
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15583
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
15584
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
15585
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
15586
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
15587
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
15588
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15589
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
15590
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15591
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
15592
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
15593
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
15594
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
15595
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
15596
 
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15597
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
15598
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15599
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
15600
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
15601
 
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
15602
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
15603
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
15604
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15605
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
15606
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15607
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
15608
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
15609
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
15610
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
15611
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
15612
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
15613
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
15614
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
15615
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
15616
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
15617
 
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
15618
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
15619
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
15620
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15621
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
15622
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15623
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
15624
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
15625
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
15626
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
15627
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
15628
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15629
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
15630
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15631
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
15632
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
15633
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
15634
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
15635
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
15636
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15637
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
15638
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15639
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
15640
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
15641
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
15642
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
15643
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
15644
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15645
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
15646
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15647
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
15648
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
15649
 
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
15650
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
15651
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
15652
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
15653
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
15654
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
15655
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
15656
 
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
15657
 
+MULTILIB_EXCEPTIONS += mbig-endian
15658
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
15659
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
15660
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15661
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
15662
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15663
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
15664
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
15665
 
 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
15666
 
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
15667
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
15668
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15669
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
15670
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15671
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
15672
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
15673
 
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
15674
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
15675
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
15676
 
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15677
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
15678
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15679
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
15680
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
15681
 
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
15682
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
15683
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
15684
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15685
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
15686
 
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15687
 
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
15688
 
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
15689
 
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
15690
 
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
15691
 
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
15692
 
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
15693
 
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
15694
 
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
15695
 
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
15696
 
 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
15697
 
 # MULTILIB_EXCEPTIONS += mthumb
15698
 
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
15699
 
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
15700
 
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15701
 
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
15702
 
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15703
 
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
15704
 
 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
15705
 
 MULTILIB_EXCEPTIONS += march=armv6-m
15706
 
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
15707
 
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
15708
 
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15709
 
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
15710
 
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15711
 
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
15712
 
 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
15713
 
 MULTILIB_EXCEPTIONS += march=armv7-a
15714
 
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
15715
 
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
15716
 
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15717
 
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
15718
 
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15719
 
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
15720
 
 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
15721
 
 MULTILIB_EXCEPTIONS += march=armv7-r
15722
 
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
15723
 
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
15724
 
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15725
 
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
15726
 
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15727
 
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
15728
 
 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
15729
 
 MULTILIB_EXCEPTIONS += march=armv7-m
15730
 
 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
15731
 
 MULTILIB_EXCEPTIONS += mfpu=neon
15732
 
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
15733
 
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
15734
 
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
15735
 
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
15736
 
 MULTILIB_EXCEPTIONS += mfloat-abi=hard
15737
 
Index: gcc/config/pa/pa.md
15738
 
===================================================================
15739
 
--- a/src/gcc/config/pa/pa.md   (.../tags/gcc_4_8_3_release)
15740
 
+++ b/src/gcc/config/pa/pa.md   (.../branches/gcc-4_8-branch)
15741
 
@@ -123,7 +123,7 @@
15742
 
 ;; type "binary" insns have two input operands (1,2) and one output (0)
15743
 
 
15744
 
 (define_attr "type"
15745
 
-  "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload"
15746
 
+  "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload,trap"
15747
 
   (const_string "binary"))
15748
 
 
15749
 
 (define_attr "pa_combine_type"
15750
 
@@ -166,7 +166,7 @@
15751
 
 ;; For conditional branches. Frame related instructions are not allowed
15752
 
 ;; because they confuse the unwind support.
15753
 
 (define_attr "in_branch_delay" "false,true"
15754
 
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
15755
 
+  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
15756
 
                     (eq_attr "length" "4")
15757
 
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
15758
 
                (const_string "true")
15759
 
@@ -175,7 +175,7 @@
15760
 
 ;; Disallow instructions which use the FPU since they will tie up the FPU
15761
 
 ;; even if the instruction is nullified.
15762
 
 (define_attr "in_nullified_branch_delay" "false,true"
15763
 
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
15764
 
+  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch,trap")
15765
 
                     (eq_attr "length" "4")
15766
 
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
15767
 
                (const_string "true")
15768
 
@@ -184,7 +184,7 @@
15769
 
 ;; For calls and millicode calls.  Allow unconditional branches in the
15770
 
 ;; delay slot.
15771
 
 (define_attr "in_call_delay" "false,true"
15772
 
-  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
15773
 
+  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
15774
 
              (eq_attr "length" "4")
15775
 
              (not (match_test "RTX_FRAME_RELATED_P (insn)")))
15776
 
           (const_string "true")
15777
 
@@ -5331,6 +5331,15 @@
15778
 
   [(set_attr "type" "binary,binary")
15779
 
    (set_attr "length" "4,4")])
15780
 
 
15781
 
+;; Trap instructions.
15782
 
+
15783
 
+(define_insn "trap"
15784
 
+  [(trap_if (const_int 1) (const_int 0))]
15785
 
+  ""
15786
 
+  "{addit|addi,tc},<> 1,%%r0,%%r0"
15787
 
+  [(set_attr "type" "trap")
15788
 
+   (set_attr "length" "4")])
15789
 
+
15790
 
 ;; Clobbering a "register_operand" instead of a match_scratch
15791
 
 ;; in operand3 of millicode calls avoids spilling %r1 and
15792
 
 ;; produces better code.
15793
 
Index: gcc/config/pa/pa.c
15794
 
===================================================================
15795
 
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_8_3_release)
15796
 
+++ b/src/gcc/config/pa/pa.c    (.../branches/gcc-4_8-branch)
15797
 
@@ -3237,7 +3237,12 @@
15798
 
       && aligned_p
15799
 
       && function_label_operand (x, VOIDmode))
15800
 
     {
15801
 
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
15802
 
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
15803
 
+
15804
 
+      /* We don't want an OPD when generating fast indirect calls.  */
15805
 
+      if (!TARGET_FAST_INDIRECT_CALLS)
15806
 
+       fputs ("P%", asm_out_file);
15807
 
+
15808
 
       output_addr_const (asm_out_file, x);
15809
 
       fputc ('\n', asm_out_file);
15810
 
       return true;
15811
 
@@ -4160,9 +4165,8 @@
15812
 
 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
15813
 
 {
15814
 
   rtx insn = get_last_insn ();
15815
 
+  bool extra_nop;
15816
 
 
15817
 
-  last_address = 0;
15818
 
-
15819
 
   /* pa_expand_epilogue does the dirty work now.  We just need
15820
 
      to output the assembler directives which denote the end
15821
 
      of a function.
15822
 
@@ -4185,14 +4189,16 @@
15823
 
   if (insn && GET_CODE (insn) == CALL_INSN)
15824
 
     {
15825
 
       fputs ("\tnop\n", file);
15826
 
-      last_address += 4;
15827
 
+      extra_nop = true;
15828
 
     }
15829
 
+  else
15830
 
+    extra_nop = false;
15831
 
 
15832
 
   fputs ("\t.EXIT\n\t.PROCEND\n", file);
15833
 
 
15834
 
   if (TARGET_SOM && TARGET_GAS)
15835
 
     {
15836
 
-      /* We done with this subspace except possibly for some additional
15837
 
+      /* We are done with this subspace except possibly for some additional
15838
 
         debug information.  Forget that we are in this subspace to ensure
15839
 
         that the next function is output in its own subspace.  */
15840
 
       in_section = NULL;
15841
 
@@ -4199,12 +4205,20 @@
15842
 
       cfun->machine->in_nsubspa = 2;
15843
 
     }
15844
 
 
15845
 
+  /* Thunks do their own insn accounting.  */
15846
 
+  if (cfun->is_thunk)
15847
 
+    return;
15848
 
+
15849
 
   if (INSN_ADDRESSES_SET_P ())
15850
 
     {
15851
 
+      last_address = extra_nop ? 4 : 0;
15852
 
       insn = get_last_nonnote_insn ();
15853
 
-      last_address += INSN_ADDRESSES (INSN_UID (insn));
15854
 
-      if (INSN_P (insn))
15855
 
-       last_address += insn_default_length (insn);
15856
 
+      if (insn)
15857
 
+       {
15858
 
+         last_address += INSN_ADDRESSES (INSN_UID (insn));
15859
 
+         if (INSN_P (insn))
15860
 
+           last_address += insn_default_length (insn);
15861
 
+       }
15862
 
       last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
15863
 
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
15864
 
     }
15865
 
@@ -8270,8 +8284,7 @@
15866
 
   xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
15867
 
   xoperands[2] = GEN_INT (delta);
15868
 
 
15869
 
-  ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
15870
 
-  fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
15871
 
+  final_start_function (emit_barrier (), file, 1);
15872
 
 
15873
 
   /* Output the thunk.  We know that the function is in the same
15874
 
      translation unit (i.e., the same space) as the thunk, and that
15875
 
@@ -8301,12 +8314,16 @@
15876
 
                   || ((DECL_SECTION_NAME (thunk_fndecl)
15877
 
                        == DECL_SECTION_NAME (function))
15878
 
                       && last_address < 262132)))
15879
 
+             /* In this case, we need to be able to reach the start of
15880
 
+                the stub table even though the function is likely closer
15881
 
+                and can be jumped to directly.  */
15882
 
              || (targetm_common.have_named_sections
15883
 
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
15884
 
                  && DECL_SECTION_NAME (function) == NULL
15885
 
-                 && last_address < 262132)
15886
 
+                 && total_code_bytes < MAX_PCREL17F_OFFSET)
15887
 
+             /* Likewise.  */
15888
 
              || (!targetm_common.have_named_sections
15889
 
-                 && last_address < 262132))))
15890
 
+                 && total_code_bytes < MAX_PCREL17F_OFFSET))))
15891
 
     {
15892
 
       if (!val_14)
15893
 
        output_asm_insn ("addil L'%2,%%r26", xoperands);
15894
 
@@ -8477,17 +8494,8 @@
15895
 
        }
15896
 
     }
15897
 
 
15898
 
-  fprintf (file, "\t.EXIT\n\t.PROCEND\n");
15899
 
+  final_end_function ();
15900
 
 
15901
 
-  if (TARGET_SOM && TARGET_GAS)
15902
 
-    {
15903
 
-      /* We done with this subspace except possibly for some additional
15904
 
-        debug information.  Forget that we are in this subspace to ensure
15905
 
-        that the next function is output in its own subspace.  */
15906
 
-      in_section = NULL;
15907
 
-      cfun->machine->in_nsubspa = 2;
15908
 
-    }
15909
 
-
15910
 
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
15911
 
     {
15912
 
       switch_to_section (data_section);
15913
 
Index: gcc/tree-vect-slp.c
15914
 
===================================================================
15915
 
--- a/src/gcc/tree-vect-slp.c   (.../tags/gcc_4_8_3_release)
15916
 
+++ b/src/gcc/tree-vect-slp.c   (.../branches/gcc-4_8-branch)
15917
 
@@ -1837,7 +1837,10 @@
15918
 
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
15919
 
            && !STMT_SLP_TYPE (stmt_vinfo)
15920
 
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
15921
 
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
15922
 
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
15923
 
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
15924
 
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
15925
 
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
15926
 
            && !(gimple_code (use_stmt) == GIMPLE_PHI
15927
 
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
15928
 
                   == vect_reduction_def))
15929
 
@@ -2377,13 +2380,21 @@
15930
 
             neutral_op = build_int_cst (TREE_TYPE (op), -1);
15931
 
             break;
15932
 
 
15933
 
-          case MAX_EXPR:
15934
 
-          case MIN_EXPR:
15935
 
-            def_stmt = SSA_NAME_DEF_STMT (op);
15936
 
-            loop = (gimple_bb (stmt))->loop_father;
15937
 
-            neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
15938
 
-                                                loop_preheader_edge (loop));
15939
 
-            break;
15940
 
+         /* For MIN/MAX we don't have an easy neutral operand but
15941
 
+            the initial values can be used fine here.  Only for
15942
 
+            a reduction chain we have to force a neutral element.  */
15943
 
+         case MAX_EXPR:
15944
 
+         case MIN_EXPR:
15945
 
+           if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
15946
 
+             neutral_op = NULL;
15947
 
+           else
15948
 
+             {
15949
 
+               def_stmt = SSA_NAME_DEF_STMT (op);
15950
 
+               loop = (gimple_bb (stmt))->loop_father;
15951
 
+               neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
15952
 
+                                                   loop_preheader_edge (loop));
15953
 
+             }
15954
 
+           break;
15955
 
 
15956
 
           default:
15957
 
             neutral_op = NULL;
15958
 
Index: gcc/convert.c
15959
 
===================================================================
15960
 
--- a/src/gcc/convert.c (.../tags/gcc_4_8_3_release)
15961
 
+++ b/src/gcc/convert.c (.../branches/gcc-4_8-branch)
15962
 
@@ -95,6 +95,15 @@
15963
 
   enum built_in_function fcode = builtin_mathfn_code (expr);
15964
 
   tree itype = TREE_TYPE (expr);
15965
 
 
15966
 
+  if (TREE_CODE (expr) == COMPOUND_EXPR)
15967
 
+    {
15968
 
+      tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
15969
 
+      if (t == TREE_OPERAND (expr, 1))
15970
 
+       return expr;
15971
 
+      return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
15972
 
+                        TREE_OPERAND (expr, 0), t);
15973
 
+    }    
15974
 
+
15975
 
   /* Disable until we figure out how to decide whether the functions are
15976
 
      present in runtime.  */
15977
 
   /* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
15978
 
@@ -366,6 +375,15 @@
15979
 
       return error_mark_node;
15980
 
     }
15981
 
 
15982
 
+  if (ex_form == COMPOUND_EXPR)
15983
 
+    {
15984
 
+      tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
15985
 
+      if (t == TREE_OPERAND (expr, 1))
15986
 
+       return expr;
15987
 
+      return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
15988
 
+                        TREE_OPERAND (expr, 0), t);
15989
 
+    }    
15990
 
+
15991
 
   /* Convert e.g. (long)round(d) -> lround(d).  */
15992
 
   /* If we're converting to char, we may encounter differing behavior
15993
 
      between converting from double->char vs double->long->char.
15994
 
@@ -854,6 +872,14 @@
15995
 
 
15996
 
        if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
15997
 
          return expr;
15998
 
+       else if (TREE_CODE (expr) == COMPOUND_EXPR)
15999
 
+         {
16000
 
+           tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
16001
 
+           if (t == TREE_OPERAND (expr, 1))
16002
 
+             return expr;
16003
 
+           return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
16004
 
+                              TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
16005
 
+         }    
16006
 
        else if (TREE_CODE (expr) == COMPLEX_EXPR)
16007
 
          return fold_build2 (COMPLEX_EXPR, type,
16008
 
                              convert (subtype, TREE_OPERAND (expr, 0)),
16009
 
Index: gcc/regcprop.c
16010
 
===================================================================
16011
 
--- a/src/gcc/regcprop.c        (.../tags/gcc_4_8_3_release)
16012
 
+++ b/src/gcc/regcprop.c        (.../branches/gcc-4_8-branch)
16013
 
@@ -1039,7 +1039,17 @@
16014
 
             but instead among CLOBBERs on the CALL_INSN, we could wrongly
16015
 
             assume the value in it is still live.  */
16016
 
          if (ksvd.ignore_set_reg)
16017
 
-           note_stores (PATTERN (insn), kill_clobbered_value, vd);
16018
 
+           {
16019
 
+             note_stores (PATTERN (insn), kill_clobbered_value, vd);
16020
 
+             for (exp = CALL_INSN_FUNCTION_USAGE (insn);
16021
 
+                  exp;
16022
 
+                  exp = XEXP (exp, 1))
16023
 
+               {
16024
 
+                 rtx x = XEXP (exp, 0);
16025
 
+                 if (GET_CODE (x) == CLOBBER)
16026
 
+                   kill_value (SET_DEST (x), vd);
16027
 
+               }
16028
 
+           }
16029
 
        }
16030
 
 
16031
 
       /* Notice stores.  */
16032
 
Index: gcc/graphite-interchange.c
16033
 
===================================================================
16034
 
--- a/src/gcc/graphite-interchange.c    (.../tags/gcc_4_8_3_release)
16035
 
+++ b/src/gcc/graphite-interchange.c    (.../branches/gcc-4_8-branch)
16036
 
@@ -31,7 +31,13 @@
16037
 
 #include <isl/ilp.h>
16038
 
 #include <cloog/cloog.h>
16039
 
 #include <cloog/isl/domain.h>
16040
 
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
16041
 
+#include <isl/deprecated/int.h>
16042
 
+#include <isl/deprecated/aff_int.h>
16043
 
+#include <isl/deprecated/ilp_int.h>
16044
 
+#include <isl/deprecated/constraint_int.h>
16045
 
 #endif
16046
 
+#endif
16047
 
 
16048
 
 #include "system.h"
16049
 
 #include "coretypes.h"
16050
 
Index: libobjc/encoding.c
16051
 
===================================================================
16052
 
--- a/src/libobjc/encoding.c    (.../tags/gcc_4_8_3_release)
16053
 
+++ b/src/libobjc/encoding.c    (.../branches/gcc-4_8-branch)
16054
 
@@ -192,6 +192,8 @@
16055
 
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
16056
 
    : MAX (COMPUTED, SPECIFIED));})
16057
 
 
16058
 
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
16059
 
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
16060
 
 
16061
 
 /* Skip a variable name, enclosed in quotes (").  */
16062
 
 static inline
16063
 
Index: libobjc/ChangeLog
16064
 
===================================================================
16065
 
--- a/src/libobjc/ChangeLog     (.../tags/gcc_4_8_3_release)
16066
 
+++ b/src/libobjc/ChangeLog     (.../branches/gcc-4_8-branch)
16067
 
@@ -1,3 +1,16 @@
16068
 
+2014-07-27  Ulrich Weigand  <uweigand@de.ibm.com>
16069
 
+
16070
 
+       PR libobjc/61920
16071
 
+       * encoding.c (rs6000_special_adjust_field_align_p): Use definition
16072
 
+       that matches the 4.8 branch ABI.
16073
 
+
16074
 
+2014-07-27  Alan Modra  <amodra@gmail.com>
16075
 
+           Matthias Klose  <doko@ubuntu.com>
16076
 
+
16077
 
+       PR libobjc/61920
16078
 
+
16079
 
+       * encoding.c: Define rs6000_special_adjust_field_align_p.
16080
 
+
16081
 
 2014-05-22  Release Manager
16082
 
 
16083
 
        * GCC 4.8.3 released.
16084
 
Index: libgfortran/m4/in_pack.m4
16085
 
===================================================================
16086
 
--- a/src/libgfortran/m4/in_pack.m4     (.../tags/gcc_4_8_3_release)
16087
 
+++ b/src/libgfortran/m4/in_pack.m4     (.../branches/gcc-4_8-branch)
16088
 
@@ -79,7 +79,7 @@
16089
 
     return source->base_addr;
16090
 
 
16091
 
   /* Allocate storage for the destination.  */
16092
 
-  destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
16093
 
+  destptr = xmallocarray (ssize, sizeof ('rtype_name`));
16094
 
   dest = destptr;
16095
 
   src = source->base_addr;
16096
 
   stride0 = stride[0];
16097
 
Index: libgfortran/m4/pack.m4
16098
 
===================================================================
16099
 
--- a/src/libgfortran/m4/pack.m4        (.../tags/gcc_4_8_3_release)
16100
 
+++ b/src/libgfortran/m4/pack.m4        (.../branches/gcc-4_8-branch)
16101
 
@@ -168,8 +168,8 @@
16102
 
 
16103
 
          ret->offset = 0;
16104
 
 
16105
 
-         /* xmalloc allocates a single byte for zero size.  */
16106
 
-         ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
16107
 
+         /* xmallocarray allocates a single byte for zero size.  */
16108
 
+         ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
16109
 
 
16110
 
          if (total == 0)
16111
 
            return;
16112
 
Index: libgfortran/m4/spread.m4
16113
 
===================================================================
16114
 
--- a/src/libgfortran/m4/spread.m4      (.../tags/gcc_4_8_3_release)
16115
 
+++ b/src/libgfortran/m4/spread.m4      (.../branches/gcc-4_8-branch)
16116
 
@@ -102,8 +102,8 @@
16117
 
        }
16118
 
       ret->offset = 0;
16119
 
 
16120
 
-      /* xmalloc allocates a single byte for zero size.  */
16121
 
-      ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
16122
 
+      /* xmallocarray allocates a single byte for zero size.  */
16123
 
+      ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
16124
 
       if (rs <= 0)
16125
 
         return;
16126
 
     }
16127
 
@@ -245,7 +245,7 @@
16128
 
 
16129
 
   if (ret->base_addr == NULL)
16130
 
     {
16131
 
-      ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
16132
 
+      ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
16133
 
       ret->offset = 0;
16134
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16135
 
     }
16136
 
Index: libgfortran/m4/transpose.m4
16137
 
===================================================================
16138
 
--- a/src/libgfortran/m4/transpose.m4   (.../tags/gcc_4_8_3_release)
16139
 
+++ b/src/libgfortran/m4/transpose.m4   (.../branches/gcc-4_8-branch)
16140
 
@@ -61,7 +61,8 @@
16141
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16142
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
16143
 
 
16144
 
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
16145
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
16146
 
+                                     sizeof ('rtype_name`));
16147
 
       ret->offset = 0;
16148
 
     } else if (unlikely (compile_options.bounds_check))
16149
 
     {
16150
 
Index: libgfortran/m4/iforeach.m4
16151
 
===================================================================
16152
 
--- a/src/libgfortran/m4/iforeach.m4    (.../tags/gcc_4_8_3_release)
16153
 
+++ b/src/libgfortran/m4/iforeach.m4    (.../branches/gcc-4_8-branch)
16154
 
@@ -30,7 +30,7 @@
16155
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16156
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16157
 
       retarray->offset = 0;
16158
 
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16159
 
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16160
 
     }
16161
 
   else
16162
 
     {
16163
 
@@ -133,7 +133,7 @@
16164
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16165
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16166
 
       retarray->offset = 0;
16167
 
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16168
 
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16169
 
     }
16170
 
   else
16171
 
     {
16172
 
@@ -264,7 +264,7 @@
16173
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16174
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16175
 
       retarray->offset = 0;
16176
 
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16177
 
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16178
 
     }
16179
 
   else if (unlikely (compile_options.bounds_check))
16180
 
     {
16181
 
Index: libgfortran/m4/eoshift1.m4
16182
 
===================================================================
16183
 
--- a/src/libgfortran/m4/eoshift1.m4    (.../tags/gcc_4_8_3_release)
16184
 
+++ b/src/libgfortran/m4/eoshift1.m4    (.../branches/gcc-4_8-branch)
16185
 
@@ -106,8 +106,8 @@
16186
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16187
 
 
16188
 
         }
16189
 
-      /* xmalloc allocates a single byte for zero size.  */
16190
 
-      ret->base_addr = xmalloc (size * arraysize);
16191
 
+      /* xmallocarray allocates a single byte for zero size.  */
16192
 
+      ret->base_addr = xmallocarray (arraysize, size);
16193
 
 
16194
 
     }
16195
 
   else if (unlikely (compile_options.bounds_check))
16196
 
Index: libgfortran/m4/eoshift3.m4
16197
 
===================================================================
16198
 
--- a/src/libgfortran/m4/eoshift3.m4    (.../tags/gcc_4_8_3_release)
16199
 
+++ b/src/libgfortran/m4/eoshift3.m4    (.../branches/gcc-4_8-branch)
16200
 
@@ -90,7 +90,7 @@
16201
 
     {
16202
 
       int i;
16203
 
 
16204
 
-      ret->base_addr = xmalloc (size * arraysize);
16205
 
+      ret->base_addr = xmallocarray (arraysize, size);
16206
 
       ret->offset = 0;
16207
 
       ret->dtype = array->dtype;
16208
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16209
 
@@ -108,8 +108,8 @@
16210
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16211
 
 
16212
 
         }
16213
 
-      /* xmalloc allocates a single byte for zero size.  */
16214
 
-      ret->base_addr = xmalloc (size * arraysize);
16215
 
+      /* xmallocarray allocates a single byte for zero size.  */
16216
 
+      ret->base_addr = xmallocarray (arraysize, size);
16217
 
 
16218
 
     }
16219
 
   else if (unlikely (compile_options.bounds_check))
16220
 
Index: libgfortran/m4/shape.m4
16221
 
===================================================================
16222
 
--- a/src/libgfortran/m4/shape.m4       (.../tags/gcc_4_8_3_release)
16223
 
+++ b/src/libgfortran/m4/shape.m4       (.../branches/gcc-4_8-branch)
16224
 
@@ -50,7 +50,7 @@
16225
 
     {
16226
 
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
16227
 
       ret->offset = 0;
16228
 
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
16229
 
+      ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
16230
 
     }
16231
 
 
16232
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
16233
 
Index: libgfortran/m4/cshift1.m4
16234
 
===================================================================
16235
 
--- a/src/libgfortran/m4/cshift1.m4     (.../tags/gcc_4_8_3_release)
16236
 
+++ b/src/libgfortran/m4/cshift1.m4     (.../branches/gcc-4_8-branch)
16237
 
@@ -81,7 +81,7 @@
16238
 
     {
16239
 
       int i;
16240
 
 
16241
 
-      ret->base_addr = xmalloc (size * arraysize);
16242
 
+      ret->base_addr = xmallocarray (arraysize, size);
16243
 
       ret->offset = 0;
16244
 
       ret->dtype = array->dtype;
16245
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16246
 
Index: libgfortran/m4/matmull.m4
16247
 
===================================================================
16248
 
--- a/src/libgfortran/m4/matmull.m4     (.../tags/gcc_4_8_3_release)
16249
 
+++ b/src/libgfortran/m4/matmull.m4     (.../branches/gcc-4_8-branch)
16250
 
@@ -89,7 +89,7 @@
16251
 
         }
16252
 
           
16253
 
       retarray->base_addr
16254
 
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
16255
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
16256
 
       retarray->offset = 0;
16257
 
     }
16258
 
     else if (unlikely (compile_options.bounds_check))
16259
 
Index: libgfortran/m4/bessel.m4
16260
 
===================================================================
16261
 
--- a/src/libgfortran/m4/bessel.m4      (.../tags/gcc_4_8_3_release)
16262
 
+++ b/src/libgfortran/m4/bessel.m4      (.../branches/gcc-4_8-branch)
16263
 
@@ -56,7 +56,7 @@
16264
 
     {
16265
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
16266
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16267
 
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
16268
 
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
16269
 
       ret->offset = 0;
16270
 
     }
16271
 
 
16272
 
@@ -123,7 +123,7 @@
16273
 
     {
16274
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
16275
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16276
 
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
16277
 
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
16278
 
       ret->offset = 0;
16279
 
     }
16280
 
 
16281
 
@@ -163,7 +163,7 @@
16282
 
 
16283
 
   x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
16284
 
 
16285
 
-  for (i = 2; i <= n1+n2; i++)
16286
 
+  for (i = 2; i <= n2 - n1; i++)
16287
 
     {
16288
 
 #if defined('rtype_name`_INFINITY)
16289
 
       if (unlikely (last2 == -'rtype_name`_INFINITY))
16290
 
Index: libgfortran/m4/unpack.m4
16291
 
===================================================================
16292
 
--- a/src/libgfortran/m4/unpack.m4      (.../tags/gcc_4_8_3_release)
16293
 
+++ b/src/libgfortran/m4/unpack.m4      (.../branches/gcc-4_8-branch)
16294
 
@@ -100,7 +100,7 @@
16295
 
          rs *= extent[n];
16296
 
        }
16297
 
       ret->offset = 0;
16298
 
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
16299
 
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
16300
 
     }
16301
 
   else
16302
 
     {
16303
 
@@ -245,7 +245,7 @@
16304
 
          rs *= extent[n];
16305
 
        }
16306
 
       ret->offset = 0;
16307
 
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
16308
 
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
16309
 
     }
16310
 
   else
16311
 
     {
16312
 
Index: libgfortran/m4/reshape.m4
16313
 
===================================================================
16314
 
--- a/src/libgfortran/m4/reshape.m4     (.../tags/gcc_4_8_3_release)
16315
 
+++ b/src/libgfortran/m4/reshape.m4     (.../branches/gcc-4_8-branch)
16316
 
@@ -115,11 +115,11 @@
16317
 
       ret->offset = 0;
16318
 
 
16319
 
       if (unlikely (rs < 1))
16320
 
-        alloc_size = 1;
16321
 
+        alloc_size = 0;
16322
 
       else
16323
 
-        alloc_size = rs * sizeof ('rtype_name`);
16324
 
+        alloc_size = rs;
16325
 
 
16326
 
-      ret->base_addr = xmalloc (alloc_size);
16327
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
16328
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16329
 
     }
16330
 
 
16331
 
Index: libgfortran/m4/ifunction_logical.m4
16332
 
===================================================================
16333
 
--- a/src/libgfortran/m4/ifunction_logical.m4   (.../tags/gcc_4_8_3_release)
16334
 
+++ b/src/libgfortran/m4/ifunction_logical.m4   (.../branches/gcc-4_8-branch)
16335
 
@@ -89,8 +89,7 @@
16336
 
       retarray->offset = 0;
16337
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16338
 
 
16339
 
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16340
 
-                  * extent[rank-1];
16341
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16342
 
 
16343
 
       if (alloc_size == 0)
16344
 
        {
16345
 
@@ -99,7 +98,7 @@
16346
 
          return;
16347
 
        }
16348
 
       else
16349
 
-       retarray->base_addr = xmalloc (alloc_size);
16350
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16351
 
     }
16352
 
   else
16353
 
     {
16354
 
Index: libgfortran/m4/ifunction.m4
16355
 
===================================================================
16356
 
--- a/src/libgfortran/m4/ifunction.m4   (.../tags/gcc_4_8_3_release)
16357
 
+++ b/src/libgfortran/m4/ifunction.m4   (.../branches/gcc-4_8-branch)
16358
 
@@ -85,10 +85,9 @@
16359
 
       retarray->offset = 0;
16360
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16361
 
 
16362
 
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16363
 
-                  * extent[rank-1];
16364
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16365
 
 
16366
 
-      retarray->base_addr = xmalloc (alloc_size);
16367
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16368
 
       if (alloc_size == 0)
16369
 
        {
16370
 
          /* Make sure we have a zero-sized array.  */
16371
 
@@ -260,8 +259,7 @@
16372
 
 
16373
 
        }
16374
 
 
16375
 
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16376
 
-                  * extent[rank-1];
16377
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16378
 
 
16379
 
       retarray->offset = 0;
16380
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16381
 
@@ -273,7 +271,7 @@
16382
 
          return;
16383
 
        }
16384
 
       else
16385
 
-       retarray->base_addr = xmalloc (alloc_size);
16386
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16387
 
 
16388
 
     }
16389
 
   else
16390
 
@@ -417,8 +415,7 @@
16391
 
       retarray->offset = 0;
16392
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16393
 
 
16394
 
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16395
 
-                  * extent[rank-1];
16396
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16397
 
 
16398
 
       if (alloc_size == 0)
16399
 
        {
16400
 
@@ -427,7 +424,7 @@
16401
 
          return;
16402
 
        }
16403
 
       else
16404
 
-       retarray->base_addr = xmalloc (alloc_size);
16405
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16406
 
     }
16407
 
   else
16408
 
     {
16409
 
Index: libgfortran/m4/matmul.m4
16410
 
===================================================================
16411
 
--- a/src/libgfortran/m4/matmul.m4      (.../tags/gcc_4_8_3_release)
16412
 
+++ b/src/libgfortran/m4/matmul.m4      (.../branches/gcc-4_8-branch)
16413
 
@@ -125,7 +125,7 @@
16414
 
         }
16415
 
 
16416
 
       retarray->base_addr
16417
 
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
16418
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
16419
 
       retarray->offset = 0;
16420
 
     }
16421
 
     else if (unlikely (compile_options.bounds_check))
16422
 
Index: libgfortran/configure
16423
 
===================================================================
16424
 
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
16425
 
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
16426
 
@@ -2595,6 +2595,7 @@
16427
 
 as_fn_append ac_func_list " getegid"
16428
 
 as_fn_append ac_func_list " secure_getenv"
16429
 
 as_fn_append ac_func_list " __secure_getenv"
16430
 
+as_fn_append ac_func_list " strtok_r"
16431
 
 as_fn_append ac_header_list " math.h"
16432
 
 # Check that the precious variables saved in the cache have kept the same
16433
 
 # value.
16434
 
@@ -12339,7 +12340,7 @@
16435
 
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16436
 
   lt_status=$lt_dlunknown
16437
 
   cat > conftest.$ac_ext <<_LT_EOF
16438
 
-#line 12342 "configure"
16439
 
+#line 12343 "configure"
16440
 
 #include "confdefs.h"
16441
 
 
16442
 
 #if HAVE_DLFCN_H
16443
 
@@ -12445,7 +12446,7 @@
16444
 
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16445
 
   lt_status=$lt_dlunknown
16446
 
   cat > conftest.$ac_ext <<_LT_EOF
16447
 
-#line 12448 "configure"
16448
 
+#line 12449 "configure"
16449
 
 #include "confdefs.h"
16450
 
 
16451
 
 #if HAVE_DLFCN_H
16452
 
@@ -16506,6 +16507,8 @@
16453
 
 
16454
 
 
16455
 
 
16456
 
+
16457
 
+
16458
 
 
16459
 
 
16460
 
 
16461
 
Index: libgfortran/runtime/in_pack_generic.c
16462
 
===================================================================
16463
 
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
16464
 
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
16465
 
@@ -180,7 +180,7 @@
16466
 
     return source->base_addr;
16467
 
 
16468
 
    /* Allocate storage for the destination.  */
16469
 
-  destptr = xmalloc (ssize * size);
16470
 
+  destptr = xmallocarray (ssize, size);
16471
 
   dest = (char *)destptr;
16472
 
   src = source->base_addr;
16473
 
   stride0 = stride[0] * size;
16474
 
Index: libgfortran/runtime/memory.c
16475
 
===================================================================
16476
 
--- a/src/libgfortran/runtime/memory.c  (.../tags/gcc_4_8_3_release)
16477
 
+++ b/src/libgfortran/runtime/memory.c  (.../branches/gcc-4_8-branch)
16478
 
@@ -25,8 +25,13 @@
16479
 
 
16480
 
 #include "libgfortran.h"
16481
 
 #include <stdlib.h>
16482
 
+#include <errno.h>
16483
 
 
16484
 
+#ifndef SIZE_MAX
16485
 
+#define SIZE_MAX ((size_t)-1)
16486
 
+#endif
16487
 
 
16488
 
+
16489
 
 void *
16490
 
 xmalloc (size_t n)
16491
 
 {
16492
 
@@ -44,12 +49,34 @@
16493
 
 }
16494
 
 
16495
 
 
16496
 
+void *
16497
 
+xmallocarray (size_t nmemb, size_t size)
16498
 
+{
16499
 
+  void *p;
16500
 
+
16501
 
+  if (!nmemb || !size)
16502
 
+    size = nmemb = 1;
16503
 
+  else if (nmemb > SIZE_MAX / size)
16504
 
+    {
16505
 
+      errno = ENOMEM;
16506
 
+      os_error ("Integer overflow in xmallocarray");
16507
 
+    }
16508
 
+
16509
 
+  p = malloc (nmemb * size);
16510
 
+
16511
 
+  if (!p)
16512
 
+    os_error ("Memory allocation failed in xmallocarray");
16513
 
+
16514
 
+  return p;
16515
 
+}
16516
 
+
16517
 
+
16518
 
 /* calloc wrapper that aborts on error.  */
16519
 
 
16520
 
 void *
16521
 
 xcalloc (size_t nmemb, size_t size)
16522
 
 {
16523
 
-  if (nmemb * size == 0)
16524
 
+  if (!nmemb || !size)
16525
 
     nmemb = size = 1;
16526
 
 
16527
 
   void *p = calloc (nmemb, size);
16528
 
Index: libgfortran/runtime/convert_char.c
16529
 
===================================================================
16530
 
--- a/src/libgfortran/runtime/convert_char.c    (.../tags/gcc_4_8_3_release)
16531
 
+++ b/src/libgfortran/runtime/convert_char.c    (.../branches/gcc-4_8-branch)
16532
 
@@ -44,7 +44,7 @@
16533
 
   gfc_charlen_type i, l;
16534
 
 
16535
 
   l = len > 0 ? len : 0;
16536
 
-  *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
16537
 
+  *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
16538
 
 
16539
 
   for (i = 0; i < l; i++)
16540
 
     (*dst)[i] = src[i];
16541
 
@@ -60,7 +60,7 @@
16542
 
   gfc_charlen_type i, l;
16543
 
 
16544
 
   l = len > 0 ? len : 0;
16545
 
-  *dst = xmalloc ((l + 1) * sizeof (unsigned char));
16546
 
+  *dst = xmalloc (l + 1);
16547
 
 
16548
 
   for (i = 0; i < l; i++)
16549
 
     (*dst)[i] = src[i];
16550
 
Index: libgfortran/runtime/environ.c
16551
 
===================================================================
16552
 
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
16553
 
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
16554
 
@@ -833,7 +833,7 @@
16555
 
     }
16556
 
   else
16557
 
     {
16558
 
-      elist = xmalloc (unit_count * sizeof (exception_t));
16559
 
+      elist = xmallocarray (unit_count, sizeof (exception_t));
16560
 
       do_count = 0;
16561
 
       p = val;
16562
 
       do_parse ();
16563
 
Index: libgfortran/runtime/main.c
16564
 
===================================================================
16565
 
--- a/src/libgfortran/runtime/main.c    (.../tags/gcc_4_8_3_release)
16566
 
+++ b/src/libgfortran/runtime/main.c    (.../branches/gcc-4_8-branch)
16567
 
@@ -153,6 +153,16 @@
16568
 
 }
16569
 
 
16570
 
 
16571
 
+#ifndef HAVE_STRTOK_R
16572
 
+static char*
16573
 
+gfstrtok_r (char *str, const char *delim, 
16574
 
+           char **saveptr __attribute__ ((unused)))
16575
 
+{
16576
 
+  return strtok (str, delim);
16577
 
+}
16578
 
+#define strtok_r gfstrtok_r
16579
 
+#endif
16580
 
+
16581
 
 char *addr2line_path;
16582
 
 
16583
 
 /* Find addr2line and store the path.  */
16584
 
@@ -161,30 +171,32 @@
16585
 
 find_addr2line (void)
16586
 
 {
16587
 
 #ifdef HAVE_ACCESS
16588
 
-#define A2L_LEN 10
16589
 
+#define A2L_LEN 11
16590
 
   char *path = secure_getenv ("PATH");
16591
 
   if (!path)
16592
 
     return;
16593
 
+  char *tp = strdup (path);
16594
 
+  if (!tp)
16595
 
+    return;
16596
 
   size_t n = strlen (path);
16597
 
-  char ap[n + 1 + A2L_LEN];
16598
 
-  size_t ai = 0;
16599
 
-  for (size_t i = 0; i < n; i++)
16600
 
+  char *ap = xmalloc (n + A2L_LEN);
16601
 
+  char *saveptr;
16602
 
+  for (char *str = tp;; str = NULL)
16603
 
     {
16604
 
-      if (path[i] != ':')
16605
 
-       ap[ai++] = path[i];
16606
 
-      else
16607
 
+      char *token = strtok_r (str, ":", &saveptr);
16608
 
+      if (!token)
16609
 
+       break;
16610
 
+      size_t toklen = strlen (token);
16611
 
+      memcpy (ap, token, toklen);
16612
 
+      memcpy (ap + toklen, "/addr2line", A2L_LEN);
16613
 
+      if (access (ap, R_OK|X_OK) == 0)
16614
 
        {
16615
 
-         ap[ai++] = '/';
16616
 
-         memcpy (ap + ai, "addr2line", A2L_LEN);
16617
 
-         if (access (ap, R_OK|X_OK) == 0)
16618
 
-           {
16619
 
-             addr2line_path = strdup (ap);
16620
 
-             return;
16621
 
-           }
16622
 
-         else
16623
 
-           ai = 0;
16624
 
+         addr2line_path = strdup (ap);
16625
 
+         break;
16626
 
        }
16627
 
     }
16628
 
+  free (tp);
16629
 
+  free (ap);
16630
 
 #endif
16631
 
 }
16632
 
 
16633
 
Index: libgfortran/intrinsics/string_intrinsics_inc.c
16634
 
===================================================================
16635
 
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../tags/gcc_4_8_3_release)
16636
 
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../branches/gcc-4_8-branch)
16637
 
@@ -164,7 +164,7 @@
16638
 
   else
16639
 
     {
16640
 
       /* Allocate space for result string.  */
16641
 
-      *dest = xmalloc (*len * sizeof (CHARTYPE));
16642
 
+      *dest = xmallocarray (*len, sizeof (CHARTYPE));
16643
 
 
16644
 
       /* Copy string if necessary.  */
16645
 
       memcpy (*dest, src, *len * sizeof (CHARTYPE));
16646
 
@@ -442,7 +442,7 @@
16647
 
     *dest = &zero_length_string;
16648
 
   else
16649
 
     {
16650
 
-      CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
16651
 
+      CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
16652
 
       memcpy (tmp, res, reslen * sizeof (CHARTYPE));
16653
 
       MEMSET (&tmp[reslen], ' ', *rlen - reslen);
16654
 
       *dest = tmp;
16655
 
Index: libgfortran/intrinsics/pack_generic.c
16656
 
===================================================================
16657
 
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
16658
 
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
16659
 
@@ -152,8 +152,8 @@
16660
 
          GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
16661
 
 
16662
 
          ret->offset = 0;
16663
 
-         /* xmalloc allocates a single byte for zero size.  */
16664
 
-         ret->base_addr = xmalloc (size * total);
16665
 
+         /* xmallocarray allocates a single byte for zero size.  */
16666
 
+         ret->base_addr = xmallocarray (total, size);
16667
 
 
16668
 
          if (total == 0)
16669
 
            return;      /* In this case, nothing remains to be done.  */
16670
 
@@ -519,7 +519,7 @@
16671
 
 
16672
 
       ret->offset = 0;
16673
 
 
16674
 
-      ret->base_addr = xmalloc (size * total);
16675
 
+      ret->base_addr = xmallocarray (total, size);
16676
 
 
16677
 
       if (total == 0)
16678
 
        return;
16679
 
Index: libgfortran/intrinsics/transpose_generic.c
16680
 
===================================================================
16681
 
--- a/src/libgfortran/intrinsics/transpose_generic.c    (.../tags/gcc_4_8_3_release)
16682
 
+++ b/src/libgfortran/intrinsics/transpose_generic.c    (.../branches/gcc-4_8-branch)
16683
 
@@ -60,7 +60,7 @@
16684
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16685
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
16686
 
 
16687
 
-      ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
16688
 
+      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
16689
 
       ret->offset = 0;
16690
 
     }
16691
 
   else if (unlikely (compile_options.bounds_check))
16692
 
Index: libgfortran/intrinsics/cshift0.c
16693
 
===================================================================
16694
 
--- a/src/libgfortran/intrinsics/cshift0.c      (.../tags/gcc_4_8_3_release)
16695
 
+++ b/src/libgfortran/intrinsics/cshift0.c      (.../branches/gcc-4_8-branch)
16696
 
@@ -79,8 +79,8 @@
16697
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16698
 
         }
16699
 
 
16700
 
-      /* xmalloc allocates a single byte for zero size.  */
16701
 
-      ret->base_addr = xmalloc (size * arraysize);
16702
 
+      /* xmallocarray allocates a single byte for zero size.  */
16703
 
+      ret->base_addr = xmallocarray (arraysize, size);
16704
 
     }
16705
 
   else if (unlikely (compile_options.bounds_check))
16706
 
     {
16707
 
Index: libgfortran/intrinsics/ctime.c
16708
 
===================================================================
16709
 
--- a/src/libgfortran/intrinsics/ctime.c        (.../tags/gcc_4_8_3_release)
16710
 
+++ b/src/libgfortran/intrinsics/ctime.c        (.../branches/gcc-4_8-branch)
16711
 
@@ -31,31 +31,53 @@
16712
 
 #include <string.h>
16713
 
 
16714
 
 
16715
 
-/* strftime-like function that fills a C string with %c format which
16716
 
-   is identical to ctime in the default locale. As ctime and ctime_r
16717
 
-   are poorly specified and their usage not recommended, the
16718
 
-   implementation instead uses strftime.  */
16719
 
+/* Maximum space a ctime-like string might need. A "normal" ctime
16720
 
+   string is 26 bytes, and in our case 24 bytes as we don't include
16721
 
+   the trailing newline and null. However, the longest possible year
16722
 
+   number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
16723
 
+   32-bit signed integer) so an extra 7 bytes are needed. */
16724
 
+#define CTIME_BUFSZ 31
16725
 
 
16726
 
-static size_t
16727
 
-strctime (char *s, size_t max, const time_t *timep)
16728
 
+
16729
 
+/* Thread-safe ctime-like function that fills a Fortran
16730
 
+   string. ctime_r is a portability headache and marked as obsolescent
16731
 
+   in POSIX 2008, which recommends strftime in its place. However,
16732
 
+   strftime(..., "%c",...)  doesn't produce ctime-like output on
16733
 
+   MinGW, so do it manually with snprintf.  */
16734
 
+
16735
 
+static int
16736
 
+gf_ctime (char *s, size_t max, const time_t timev)
16737
 
 {
16738
 
   struct tm ltm;
16739
 
   int failed;
16740
 
+  char buf[CTIME_BUFSZ + 1];
16741
 
   /* Some targets provide a localtime_r based on a draft of the POSIX
16742
 
      standard where the return type is int rather than the
16743
 
      standardized struct tm*.  */
16744
 
-  __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, &ltm)) 
16745
 
+  __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, &ltm)) 
16746
 
                         == 5,
16747
 
-                        failed = localtime_r (timep, &ltm) == NULL,
16748
 
-                        failed = localtime_r (timep, &ltm) != 0);
16749
 
+                        failed = localtime_r (&timev, &ltm) == NULL,
16750
 
+                        failed = localtime_r (&timev, &ltm) != 0);
16751
 
   if (failed)
16752
 
-    return 0;
16753
 
-  return strftime (s, max, "%c", &ltm);
16754
 
+    goto blank;
16755
 
+  int n = snprintf (buf, sizeof (buf), 
16756
 
+                   "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
16757
 
+                   "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
16758
 
+                   "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
16759
 
+                   ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 
16760
 
+                   1900 + ltm.tm_year);
16761
 
+  if (n < 0)
16762
 
+    goto blank;
16763
 
+  if ((size_t) n <= max)
16764
 
+    {
16765
 
+      cf_strcpy (s, max, buf);
16766
 
+      return n;
16767
 
+    }
16768
 
+ blank:
16769
 
+  memset (s, ' ', max);
16770
 
+  return 0;
16771
 
 }
16772
 
 
16773
 
-/* In the default locale, the date and time representation fits in 26
16774
 
-   bytes. However, other locales might need more space.  */
16775
 
-#define CSZ 100
16776
 
 
16777
 
 extern void fdate (char **, gfc_charlen_type *);
16778
 
 export_proto(fdate);
16779
 
@@ -64,8 +86,8 @@
16780
 
 fdate (char ** date, gfc_charlen_type * date_len)
16781
 
 {
16782
 
   time_t now = time(NULL);
16783
 
-  *date = xmalloc (CSZ);
16784
 
-  *date_len = strctime (*date, CSZ, &now);
16785
 
+  *date = xmalloc (CTIME_BUFSZ);
16786
 
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
16787
 
 }
16788
 
 
16789
 
 
16790
 
@@ -76,10 +98,7 @@
16791
 
 fdate_sub (char * date, gfc_charlen_type date_len)
16792
 
 {
16793
 
   time_t now = time(NULL);
16794
 
-  char *s = xmalloc (date_len + 1);
16795
 
-  size_t n = strctime (s, date_len + 1, &now);
16796
 
-  fstrcpy (date, date_len, s, n);
16797
 
-  free (s);
16798
 
+  gf_ctime (date, date_len, now);
16799
 
 }
16800
 
 
16801
 
 
16802
 
@@ -91,8 +110,8 @@
16803
 
 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
16804
 
 {
16805
 
   time_t now = t;
16806
 
-  *date = xmalloc (CSZ);
16807
 
-  *date_len = strctime (*date, CSZ, &now);
16808
 
+  *date = xmalloc (CTIME_BUFSZ);
16809
 
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
16810
 
 }
16811
 
 
16812
 
 
16813
 
@@ -103,8 +122,5 @@
16814
 
 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
16815
 
 {
16816
 
   time_t now = *t;
16817
 
-  char *s = xmalloc (date_len + 1);
16818
 
-  size_t n = strctime (s, date_len + 1, &now);
16819
 
-  fstrcpy (date, date_len, s, n);
16820
 
-  free (s);
16821
 
+  gf_ctime (date, date_len, now);
16822
 
 }
16823
 
Index: libgfortran/intrinsics/spread_generic.c
16824
 
===================================================================
16825
 
--- a/src/libgfortran/intrinsics/spread_generic.c       (.../tags/gcc_4_8_3_release)
16826
 
+++ b/src/libgfortran/intrinsics/spread_generic.c       (.../branches/gcc-4_8-branch)
16827
 
@@ -100,7 +100,7 @@
16828
 
          GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
16829
 
        }
16830
 
       ret->offset = 0;
16831
 
-      ret->base_addr = xmalloc (rs * size);
16832
 
+      ret->base_addr = xmallocarray (rs, size);
16833
 
 
16834
 
       if (rs <= 0)
16835
 
        return;
16836
 
@@ -245,7 +245,7 @@
16837
 
 
16838
 
   if (ret->base_addr == NULL)
16839
 
     {
16840
 
-      ret->base_addr = xmalloc (ncopies * size);
16841
 
+      ret->base_addr = xmallocarray (ncopies, size);
16842
 
       ret->offset = 0;
16843
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16844
 
     }
16845
 
Index: libgfortran/intrinsics/unpack_generic.c
16846
 
===================================================================
16847
 
--- a/src/libgfortran/intrinsics/unpack_generic.c       (.../tags/gcc_4_8_3_release)
16848
 
+++ b/src/libgfortran/intrinsics/unpack_generic.c       (.../branches/gcc-4_8-branch)
16849
 
@@ -125,7 +125,7 @@
16850
 
          rs *= extent[n];
16851
 
        }
16852
 
       ret->offset = 0;
16853
 
-      ret->base_addr = xmalloc (rs * size);
16854
 
+      ret->base_addr = xmallocarray (rs, size);
16855
 
     }
16856
 
   else
16857
 
     {
16858
 
Index: libgfortran/intrinsics/eoshift0.c
16859
 
===================================================================
16860
 
--- a/src/libgfortran/intrinsics/eoshift0.c     (.../tags/gcc_4_8_3_release)
16861
 
+++ b/src/libgfortran/intrinsics/eoshift0.c     (.../branches/gcc-4_8-branch)
16862
 
@@ -86,8 +86,8 @@
16863
 
 
16864
 
         }
16865
 
 
16866
 
-      /* xmalloc allocates a single byte for zero size.  */
16867
 
-      ret->base_addr = xmalloc (size * arraysize);
16868
 
+      /* xmallocarray allocates a single byte for zero size.  */
16869
 
+      ret->base_addr = xmallocarray (arraysize, size);
16870
 
     }
16871
 
   else if (unlikely (compile_options.bounds_check))
16872
 
     {
16873
 
Index: libgfortran/intrinsics/eoshift2.c
16874
 
===================================================================
16875
 
--- a/src/libgfortran/intrinsics/eoshift2.c     (.../tags/gcc_4_8_3_release)
16876
 
+++ b/src/libgfortran/intrinsics/eoshift2.c     (.../branches/gcc-4_8-branch)
16877
 
@@ -78,8 +78,8 @@
16878
 
       ret->offset = 0;
16879
 
       ret->dtype = array->dtype;
16880
 
 
16881
 
-      /* xmalloc allocates a single byte for zero size.  */
16882
 
-      ret->base_addr = xmalloc (size * arraysize);
16883
 
+      /* xmallocarray allocates a single byte for zero size.  */
16884
 
+      ret->base_addr = xmallocarray (arraysize, size);
16885
 
 
16886
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16887
 
         {
16888
 
Index: libgfortran/intrinsics/reshape_generic.c
16889
 
===================================================================
16890
 
--- a/src/libgfortran/intrinsics/reshape_generic.c      (.../tags/gcc_4_8_3_release)
16891
 
+++ b/src/libgfortran/intrinsics/reshape_generic.c      (.../branches/gcc-4_8-branch)
16892
 
@@ -99,11 +99,11 @@
16893
 
       ret->offset = 0;
16894
 
 
16895
 
       if (unlikely (rs < 1))
16896
 
-       alloc_size = 1;
16897
 
+       alloc_size = 0; /* xmalloc will allocate 1 byte.  */
16898
 
       else
16899
 
-       alloc_size = rs * size;
16900
 
+       alloc_size = rs;
16901
 
 
16902
 
-      ret->base_addr = xmalloc (alloc_size);
16903
 
+      ret->base_addr = xmallocarray (alloc_size, size);
16904
 
 
16905
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16906
 
     }
16907
 
Index: libgfortran/configure.ac
16908
 
===================================================================
16909
 
--- a/src/libgfortran/configure.ac      (.../tags/gcc_4_8_3_release)
16910
 
+++ b/src/libgfortran/configure.ac      (.../branches/gcc-4_8-branch)
16911
 
@@ -267,7 +267,7 @@
16912
 
 strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
16913
 
 getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
16914
 
 readlink getgid getpid getppid getuid geteuid umask getegid \
16915
 
-secure_getenv __secure_getenv)
16916
 
+secure_getenv __secure_getenv strtok_r)
16917
 
 
16918
 
 # Check strerror_r, cannot be above as versions with two and three arguments exist
16919
 
 LIBGFOR_CHECK_STRERROR_R
16920
 
Index: libgfortran/ChangeLog
16921
 
===================================================================
16922
 
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
16923
 
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
16924
 
@@ -1,3 +1,94 @@
16925
 
+2014-10-20  Janne Blomqvist  <jb@gcc.gnu.org>
16926
 
+
16927
 
+       PR libfortran/63589
16928
 
+       * configure.ac: Check for strtok_r.
16929
 
+       * runtime/main.c (gfstrtok_r): Fallback implementation of
16930
 
+       strtok_r.
16931
 
+       (find_addr2line): Use strtok_r to split PATH.
16932
 
+       * config.h.in: Regenerated.
16933
 
+       * configure: Regenerated.
16934
 
+
16935
 
+2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
16936
 
+
16937
 
+       PR libgfortran/62188
16938
 
+       * m4/bessel.m4: Avoid indexing off the end of an array.
16939
 
+       * generated/bessel_r10.c: Regenerated.
16940
 
+       * generated/bessel_r16.c: Ditto.
16941
 
+       * generated/bessel_r4.c: Ditto.
16942
 
+       * generated/bessel_r8.c: Ditto.
16943
 
+
16944
 
+2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>
16945
 
+
16946
 
+       Backport from mainline
16947
 
+       CVE-2014-5044
16948
 
+        * libgfortran.h (xmallocarray): New prototype.
16949
 
+        * runtime/memory.c (xmallocarray): New function.
16950
 
+        (xcalloc): Check for nonzero separately instead of multiplying.
16951
 
+        * generated/*.c: Regenerated.
16952
 
+        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
16953
 
+        xmalloc.
16954
 
+        * intrinsics/eoshift0.c (eoshift0): Likewise.
16955
 
+        * intrinsics/eoshift2.c (eoshift2): Likewise.
16956
 
+        * intrinsics/pack_generic.c (pack_internal): Likewise.
16957
 
+        (pack_s_internal): Likewise.
16958
 
+        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
16959
 
+        * intrinsics/spread_generic.c (spread_internal): Likewise.
16960
 
+        (spread_internal_scalar): Likewise.
16961
 
+        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
16962
 
+        (string_minmax): Likewise.
16963
 
+        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
16964
 
+        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
16965
 
+        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
16966
 
+        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
16967
 
+        xmalloc.
16968
 
+        * io/unit.c (get_internal_unit): Likewise.
16969
 
+        (filename_from_unit): Don't cast xmalloc return value.
16970
 
+        * io/write.c (nml_write_obj): Likewise, formatting.
16971
 
+        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
16972
 
+        instead of xmalloc.
16973
 
+        (besse_yn_r'rtype_kind`): Likewise.
16974
 
+        * m4/cshift1.m4 (cshift1): Likewise.
16975
 
+        * m4/eoshift1.m4 (eoshift1): Likewise.
16976
 
+        * m4/eoshift3.m4 (eoshift3): Likewise.
16977
 
+        * m4/iforeach.m4: Likewise.
16978
 
+        * m4/ifunction.m4: Likewise.
16979
 
+        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
16980
 
+        Likewise.
16981
 
+        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
16982
 
+        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
16983
 
+        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
16984
 
+        * m4/pack.m4 (pack_'rtype_code`): Likewise.
16985
 
+        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
16986
 
+        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
16987
 
+        * m4/spread.m4 (spread_'rtype_code`): Likewise.
16988
 
+        (spread_scalar_'rtype_code`): Likewise.
16989
 
+        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
16990
 
+        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
16991
 
+        (unpack1_'rtype_code`): Likewise.
16992
 
+        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
16993
 
+        (convert_char4_to_char1): Simplify.
16994
 
+        * runtime/environ.c (init_unformatted): Call xmallocarray instead
16995
 
+        of xmalloc.
16996
 
+        * runtime/in_pack_generic.c (internal_pack): Likewise.
16997
 
+
16998
 
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
16999
 
+
17000
 
+       Backport from mainline
17001
 
+       PR libfortran/61310
17002
 
+       * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
17003
 
+       instead of strftime.
17004
 
+       (fdate): Use gf_ctime.
17005
 
+       (fdate_sub): Likewise.
17006
 
+       (ctime): Likewise.
17007
 
+       (ctime_sub): Likewise.
17008
 
+
17009
 
+2014-05-25  Janne Blomqvist  <jb@gcc.gnu.org>
17010
 
+
17011
 
+       Backport from trunk.
17012
 
+       PR libfortran/61187
17013
 
+       * io/unix.c (raw_close): Check if s->fd is -1.
17014
 
+       (fd_to_stream): Check return value of fstat(), handle error.
17015
 
+
17016
 
 2014-05-22  Release Manager
17017
 
 
17018
 
        * GCC 4.8.3 released.
17019
 
Index: libgfortran/generated/spread_r10.c
17020
 
===================================================================
17021
 
--- a/src/libgfortran/generated/spread_r10.c    (.../tags/gcc_4_8_3_release)
17022
 
+++ b/src/libgfortran/generated/spread_r10.c    (.../branches/gcc-4_8-branch)
17023
 
@@ -101,8 +101,8 @@
17024
 
        }
17025
 
       ret->offset = 0;
17026
 
 
17027
 
-      /* xmalloc allocates a single byte for zero size.  */
17028
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
17029
 
+      /* xmallocarray allocates a single byte for zero size.  */
17030
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
17031
 
       if (rs <= 0)
17032
 
         return;
17033
 
     }
17034
 
@@ -244,7 +244,7 @@
17035
 
 
17036
 
   if (ret->base_addr == NULL)
17037
 
     {
17038
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
17039
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
17040
 
       ret->offset = 0;
17041
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17042
 
     }
17043
 
Index: libgfortran/generated/maxloc1_4_r8.c
17044
 
===================================================================
17045
 
--- a/src/libgfortran/generated/maxloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
17046
 
+++ b/src/libgfortran/generated/maxloc1_4_r8.c  (.../branches/gcc-4_8-branch)
17047
 
@@ -98,10 +98,9 @@
17048
 
       retarray->offset = 0;
17049
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17050
 
 
17051
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17052
 
-                  * extent[rank-1];
17053
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17054
 
 
17055
 
-      retarray->base_addr = xmalloc (alloc_size);
17056
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17057
 
       if (alloc_size == 0)
17058
 
        {
17059
 
          /* Make sure we have a zero-sized array.  */
17060
 
@@ -294,8 +293,7 @@
17061
 
 
17062
 
        }
17063
 
 
17064
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17065
 
-                  * extent[rank-1];
17066
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17067
 
 
17068
 
       retarray->offset = 0;
17069
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17070
 
@@ -307,7 +305,7 @@
17071
 
          return;
17072
 
        }
17073
 
       else
17074
 
-       retarray->base_addr = xmalloc (alloc_size);
17075
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17076
 
 
17077
 
     }
17078
 
   else
17079
 
@@ -485,8 +483,7 @@
17080
 
       retarray->offset = 0;
17081
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17082
 
 
17083
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17084
 
-                  * extent[rank-1];
17085
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17086
 
 
17087
 
       if (alloc_size == 0)
17088
 
        {
17089
 
@@ -495,7 +492,7 @@
17090
 
          return;
17091
 
        }
17092
 
       else
17093
 
-       retarray->base_addr = xmalloc (alloc_size);
17094
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17095
 
     }
17096
 
   else
17097
 
     {
17098
 
Index: libgfortran/generated/norm2_r4.c
17099
 
===================================================================
17100
 
--- a/src/libgfortran/generated/norm2_r4.c      (.../tags/gcc_4_8_3_release)
17101
 
+++ b/src/libgfortran/generated/norm2_r4.c      (.../branches/gcc-4_8-branch)
17102
 
@@ -101,10 +101,9 @@
17103
 
       retarray->offset = 0;
17104
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17105
 
 
17106
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17107
 
-                  * extent[rank-1];
17108
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17109
 
 
17110
 
-      retarray->base_addr = xmalloc (alloc_size);
17111
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17112
 
       if (alloc_size == 0)
17113
 
        {
17114
 
          /* Make sure we have a zero-sized array.  */
17115
 
Index: libgfortran/generated/parity_l2.c
17116
 
===================================================================
17117
 
--- a/src/libgfortran/generated/parity_l2.c     (.../tags/gcc_4_8_3_release)
17118
 
+++ b/src/libgfortran/generated/parity_l2.c     (.../branches/gcc-4_8-branch)
17119
 
@@ -98,10 +98,9 @@
17120
 
       retarray->offset = 0;
17121
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17122
 
 
17123
 
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17124
 
-                  * extent[rank-1];
17125
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17126
 
 
17127
 
-      retarray->base_addr = xmalloc (alloc_size);
17128
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
17129
 
       if (alloc_size == 0)
17130
 
        {
17131
 
          /* Make sure we have a zero-sized array.  */
17132
 
Index: libgfortran/generated/eoshift3_4.c
17133
 
===================================================================
17134
 
--- a/src/libgfortran/generated/eoshift3_4.c    (.../tags/gcc_4_8_3_release)
17135
 
+++ b/src/libgfortran/generated/eoshift3_4.c    (.../branches/gcc-4_8-branch)
17136
 
@@ -89,7 +89,7 @@
17137
 
     {
17138
 
       int i;
17139
 
 
17140
 
-      ret->base_addr = xmalloc (size * arraysize);
17141
 
+      ret->base_addr = xmallocarray (arraysize, size);
17142
 
       ret->offset = 0;
17143
 
       ret->dtype = array->dtype;
17144
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17145
 
@@ -107,8 +107,8 @@
17146
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17147
 
 
17148
 
         }
17149
 
-      /* xmalloc allocates a single byte for zero size.  */
17150
 
-      ret->base_addr = xmalloc (size * arraysize);
17151
 
+      /* xmallocarray allocates a single byte for zero size.  */
17152
 
+      ret->base_addr = xmallocarray (arraysize, size);
17153
 
 
17154
 
     }
17155
 
   else if (unlikely (compile_options.bounds_check))
17156
 
Index: libgfortran/generated/transpose_c8.c
17157
 
===================================================================
17158
 
--- a/src/libgfortran/generated/transpose_c8.c  (.../tags/gcc_4_8_3_release)
17159
 
+++ b/src/libgfortran/generated/transpose_c8.c  (.../branches/gcc-4_8-branch)
17160
 
@@ -60,7 +60,8 @@
17161
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17162
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
17163
 
 
17164
 
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
17165
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
17166
 
+                                     sizeof (GFC_COMPLEX_8));
17167
 
       ret->offset = 0;
17168
 
     } else if (unlikely (compile_options.bounds_check))
17169
 
     {
17170
 
Index: libgfortran/generated/eoshift1_8.c
17171
 
===================================================================
17172
 
--- a/src/libgfortran/generated/eoshift1_8.c    (.../tags/gcc_4_8_3_release)
17173
 
+++ b/src/libgfortran/generated/eoshift1_8.c    (.../branches/gcc-4_8-branch)
17174
 
@@ -105,8 +105,8 @@
17175
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17176
 
 
17177
 
         }
17178
 
-      /* xmalloc allocates a single byte for zero size.  */
17179
 
-      ret->base_addr = xmalloc (size * arraysize);
17180
 
+      /* xmallocarray allocates a single byte for zero size.  */
17181
 
+      ret->base_addr = xmallocarray (arraysize, size);
17182
 
 
17183
 
     }
17184
 
   else if (unlikely (compile_options.bounds_check))
17185
 
Index: libgfortran/generated/reshape_r16.c
17186
 
===================================================================
17187
 
--- a/src/libgfortran/generated/reshape_r16.c   (.../tags/gcc_4_8_3_release)
17188
 
+++ b/src/libgfortran/generated/reshape_r16.c   (.../branches/gcc-4_8-branch)
17189
 
@@ -111,11 +111,11 @@
17190
 
       ret->offset = 0;
17191
 
 
17192
 
       if (unlikely (rs < 1))
17193
 
-        alloc_size = 1;
17194
 
+        alloc_size = 0;
17195
 
       else
17196
 
-        alloc_size = rs * sizeof (GFC_REAL_16);
17197
 
+        alloc_size = rs;
17198
 
 
17199
 
-      ret->base_addr = xmalloc (alloc_size);
17200
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17201
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17202
 
     }
17203
 
 
17204
 
Index: libgfortran/generated/bessel_r4.c
17205
 
===================================================================
17206
 
--- a/src/libgfortran/generated/bessel_r4.c     (.../tags/gcc_4_8_3_release)
17207
 
+++ b/src/libgfortran/generated/bessel_r4.c     (.../branches/gcc-4_8-branch)
17208
 
@@ -55,7 +55,7 @@
17209
 
     {
17210
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
17211
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17212
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
17213
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
17214
 
       ret->offset = 0;
17215
 
     }
17216
 
 
17217
 
@@ -122,7 +122,7 @@
17218
 
     {
17219
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
17220
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17221
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
17222
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
17223
 
       ret->offset = 0;
17224
 
     }
17225
 
 
17226
 
@@ -162,7 +162,7 @@
17227
 
 
17228
 
   x2rev = GFC_REAL_4_LITERAL(2.)/x;
17229
 
 
17230
 
-  for (i = 2; i <= n1+n2; i++)
17231
 
+  for (i = 2; i <= n2 - n1; i++)
17232
 
     {
17233
 
 #if defined(GFC_REAL_4_INFINITY)
17234
 
       if (unlikely (last2 == -GFC_REAL_4_INFINITY))
17235
 
Index: libgfortran/generated/any_l2.c
17236
 
===================================================================
17237
 
--- a/src/libgfortran/generated/any_l2.c        (.../tags/gcc_4_8_3_release)
17238
 
+++ b/src/libgfortran/generated/any_l2.c        (.../branches/gcc-4_8-branch)
17239
 
@@ -101,8 +101,7 @@
17240
 
       retarray->offset = 0;
17241
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17242
 
 
17243
 
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17244
 
-                  * extent[rank-1];
17245
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17246
 
 
17247
 
       if (alloc_size == 0)
17248
 
        {
17249
 
@@ -111,7 +110,7 @@
17250
 
          return;
17251
 
        }
17252
 
       else
17253
 
-       retarray->base_addr = xmalloc (alloc_size);
17254
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
17255
 
     }
17256
 
   else
17257
 
     {
17258
 
Index: libgfortran/generated/product_r4.c
17259
 
===================================================================
17260
 
--- a/src/libgfortran/generated/product_r4.c    (.../tags/gcc_4_8_3_release)
17261
 
+++ b/src/libgfortran/generated/product_r4.c    (.../branches/gcc-4_8-branch)
17262
 
@@ -97,10 +97,9 @@
17263
 
       retarray->offset = 0;
17264
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17265
 
 
17266
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17267
 
-                  * extent[rank-1];
17268
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17269
 
 
17270
 
-      retarray->base_addr = xmalloc (alloc_size);
17271
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17272
 
       if (alloc_size == 0)
17273
 
        {
17274
 
          /* Make sure we have a zero-sized array.  */
17275
 
@@ -272,8 +271,7 @@
17276
 
 
17277
 
        }
17278
 
 
17279
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17280
 
-                  * extent[rank-1];
17281
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17282
 
 
17283
 
       retarray->offset = 0;
17284
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17285
 
@@ -285,7 +283,7 @@
17286
 
          return;
17287
 
        }
17288
 
       else
17289
 
-       retarray->base_addr = xmalloc (alloc_size);
17290
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17291
 
 
17292
 
     }
17293
 
   else
17294
 
@@ -430,8 +428,7 @@
17295
 
       retarray->offset = 0;
17296
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17297
 
 
17298
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17299
 
-                  * extent[rank-1];
17300
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17301
 
 
17302
 
       if (alloc_size == 0)
17303
 
        {
17304
 
@@ -440,7 +437,7 @@
17305
 
          return;
17306
 
        }
17307
 
       else
17308
 
-       retarray->base_addr = xmalloc (alloc_size);
17309
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17310
 
     }
17311
 
   else
17312
 
     {
17313
 
Index: libgfortran/generated/iany_i1.c
17314
 
===================================================================
17315
 
--- a/src/libgfortran/generated/iany_i1.c       (.../tags/gcc_4_8_3_release)
17316
 
+++ b/src/libgfortran/generated/iany_i1.c       (.../branches/gcc-4_8-branch)
17317
 
@@ -97,10 +97,9 @@
17318
 
       retarray->offset = 0;
17319
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17320
 
 
17321
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17322
 
-                  * extent[rank-1];
17323
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17324
 
 
17325
 
-      retarray->base_addr = xmalloc (alloc_size);
17326
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17327
 
       if (alloc_size == 0)
17328
 
        {
17329
 
          /* Make sure we have a zero-sized array.  */
17330
 
@@ -272,8 +271,7 @@
17331
 
 
17332
 
        }
17333
 
 
17334
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17335
 
-                  * extent[rank-1];
17336
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17337
 
 
17338
 
       retarray->offset = 0;
17339
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17340
 
@@ -285,7 +283,7 @@
17341
 
          return;
17342
 
        }
17343
 
       else
17344
 
-       retarray->base_addr = xmalloc (alloc_size);
17345
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17346
 
 
17347
 
     }
17348
 
   else
17349
 
@@ -430,8 +428,7 @@
17350
 
       retarray->offset = 0;
17351
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17352
 
 
17353
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17354
 
-                  * extent[rank-1];
17355
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17356
 
 
17357
 
       if (alloc_size == 0)
17358
 
        {
17359
 
@@ -440,7 +437,7 @@
17360
 
          return;
17361
 
        }
17362
 
       else
17363
 
-       retarray->base_addr = xmalloc (alloc_size);
17364
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17365
 
     }
17366
 
   else
17367
 
     {
17368
 
Index: libgfortran/generated/parity_l16.c
17369
 
===================================================================
17370
 
--- a/src/libgfortran/generated/parity_l16.c    (.../tags/gcc_4_8_3_release)
17371
 
+++ b/src/libgfortran/generated/parity_l16.c    (.../branches/gcc-4_8-branch)
17372
 
@@ -98,10 +98,9 @@
17373
 
       retarray->offset = 0;
17374
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17375
 
 
17376
 
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17377
 
-                  * extent[rank-1];
17378
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17379
 
 
17380
 
-      retarray->base_addr = xmalloc (alloc_size);
17381
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
17382
 
       if (alloc_size == 0)
17383
 
        {
17384
 
          /* Make sure we have a zero-sized array.  */
17385
 
Index: libgfortran/generated/in_pack_r4.c
17386
 
===================================================================
17387
 
--- a/src/libgfortran/generated/in_pack_r4.c    (.../tags/gcc_4_8_3_release)
17388
 
+++ b/src/libgfortran/generated/in_pack_r4.c    (.../branches/gcc-4_8-branch)
17389
 
@@ -76,7 +76,7 @@
17390
 
     return source->base_addr;
17391
 
 
17392
 
   /* Allocate storage for the destination.  */
17393
 
-  destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
17394
 
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
17395
 
   dest = destptr;
17396
 
   src = source->base_addr;
17397
 
   stride0 = stride[0];
17398
 
Index: libgfortran/generated/product_i2.c
17399
 
===================================================================
17400
 
--- a/src/libgfortran/generated/product_i2.c    (.../tags/gcc_4_8_3_release)
17401
 
+++ b/src/libgfortran/generated/product_i2.c    (.../branches/gcc-4_8-branch)
17402
 
@@ -97,10 +97,9 @@
17403
 
       retarray->offset = 0;
17404
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17405
 
 
17406
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17407
 
-                  * extent[rank-1];
17408
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17409
 
 
17410
 
-      retarray->base_addr = xmalloc (alloc_size);
17411
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17412
 
       if (alloc_size == 0)
17413
 
        {
17414
 
          /* Make sure we have a zero-sized array.  */
17415
 
@@ -272,8 +271,7 @@
17416
 
 
17417
 
        }
17418
 
 
17419
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17420
 
-                  * extent[rank-1];
17421
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17422
 
 
17423
 
       retarray->offset = 0;
17424
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17425
 
@@ -285,7 +283,7 @@
17426
 
          return;
17427
 
        }
17428
 
       else
17429
 
-       retarray->base_addr = xmalloc (alloc_size);
17430
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17431
 
 
17432
 
     }
17433
 
   else
17434
 
@@ -430,8 +428,7 @@
17435
 
       retarray->offset = 0;
17436
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17437
 
 
17438
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17439
 
-                  * extent[rank-1];
17440
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17441
 
 
17442
 
       if (alloc_size == 0)
17443
 
        {
17444
 
@@ -440,7 +437,7 @@
17445
 
          return;
17446
 
        }
17447
 
       else
17448
 
-       retarray->base_addr = xmalloc (alloc_size);
17449
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17450
 
     }
17451
 
   else
17452
 
     {
17453
 
Index: libgfortran/generated/iparity_i4.c
17454
 
===================================================================
17455
 
--- a/src/libgfortran/generated/iparity_i4.c    (.../tags/gcc_4_8_3_release)
17456
 
+++ b/src/libgfortran/generated/iparity_i4.c    (.../branches/gcc-4_8-branch)
17457
 
@@ -97,10 +97,9 @@
17458
 
       retarray->offset = 0;
17459
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17460
 
 
17461
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17462
 
-                  * extent[rank-1];
17463
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17464
 
 
17465
 
-      retarray->base_addr = xmalloc (alloc_size);
17466
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17467
 
       if (alloc_size == 0)
17468
 
        {
17469
 
          /* Make sure we have a zero-sized array.  */
17470
 
@@ -272,8 +271,7 @@
17471
 
 
17472
 
        }
17473
 
 
17474
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17475
 
-                  * extent[rank-1];
17476
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17477
 
 
17478
 
       retarray->offset = 0;
17479
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17480
 
@@ -285,7 +283,7 @@
17481
 
          return;
17482
 
        }
17483
 
       else
17484
 
-       retarray->base_addr = xmalloc (alloc_size);
17485
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17486
 
 
17487
 
     }
17488
 
   else
17489
 
@@ -430,8 +428,7 @@
17490
 
       retarray->offset = 0;
17491
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17492
 
 
17493
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17494
 
-                  * extent[rank-1];
17495
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17496
 
 
17497
 
       if (alloc_size == 0)
17498
 
        {
17499
 
@@ -440,7 +437,7 @@
17500
 
          return;
17501
 
        }
17502
 
       else
17503
 
-       retarray->base_addr = xmalloc (alloc_size);
17504
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17505
 
     }
17506
 
   else
17507
 
     {
17508
 
Index: libgfortran/generated/minloc0_4_i1.c
17509
 
===================================================================
17510
 
--- a/src/libgfortran/generated/minloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
17511
 
+++ b/src/libgfortran/generated/minloc0_4_i1.c  (.../branches/gcc-4_8-branch)
17512
 
@@ -58,7 +58,7 @@
17513
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17514
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17515
 
       retarray->offset = 0;
17516
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17517
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17518
 
     }
17519
 
   else
17520
 
     {
17521
 
@@ -199,7 +199,7 @@
17522
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17523
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17524
 
       retarray->offset = 0;
17525
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17526
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17527
 
     }
17528
 
   else
17529
 
     {
17530
 
@@ -367,7 +367,7 @@
17531
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17532
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17533
 
       retarray->offset = 0;
17534
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17535
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17536
 
     }
17537
 
   else if (unlikely (compile_options.bounds_check))
17538
 
     {
17539
 
Index: libgfortran/generated/reshape_c4.c
17540
 
===================================================================
17541
 
--- a/src/libgfortran/generated/reshape_c4.c    (.../tags/gcc_4_8_3_release)
17542
 
+++ b/src/libgfortran/generated/reshape_c4.c    (.../branches/gcc-4_8-branch)
17543
 
@@ -111,11 +111,11 @@
17544
 
       ret->offset = 0;
17545
 
 
17546
 
       if (unlikely (rs < 1))
17547
 
-        alloc_size = 1;
17548
 
+        alloc_size = 0;
17549
 
       else
17550
 
-        alloc_size = rs * sizeof (GFC_COMPLEX_4);
17551
 
+        alloc_size = rs;
17552
 
 
17553
 
-      ret->base_addr = xmalloc (alloc_size);
17554
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
17555
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17556
 
     }
17557
 
 
17558
 
Index: libgfortran/generated/maxloc0_4_r16.c
17559
 
===================================================================
17560
 
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
17561
 
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
17562
 
@@ -58,7 +58,7 @@
17563
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17564
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17565
 
       retarray->offset = 0;
17566
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17567
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17568
 
     }
17569
 
   else
17570
 
     {
17571
 
@@ -199,7 +199,7 @@
17572
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17573
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17574
 
       retarray->offset = 0;
17575
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17576
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17577
 
     }
17578
 
   else
17579
 
     {
17580
 
@@ -367,7 +367,7 @@
17581
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17582
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17583
 
       retarray->offset = 0;
17584
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17585
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17586
 
     }
17587
 
   else if (unlikely (compile_options.bounds_check))
17588
 
     {
17589
 
Index: libgfortran/generated/iall_i8.c
17590
 
===================================================================
17591
 
--- a/src/libgfortran/generated/iall_i8.c       (.../tags/gcc_4_8_3_release)
17592
 
+++ b/src/libgfortran/generated/iall_i8.c       (.../branches/gcc-4_8-branch)
17593
 
@@ -97,10 +97,9 @@
17594
 
       retarray->offset = 0;
17595
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17596
 
 
17597
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17598
 
-                  * extent[rank-1];
17599
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17600
 
 
17601
 
-      retarray->base_addr = xmalloc (alloc_size);
17602
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17603
 
       if (alloc_size == 0)
17604
 
        {
17605
 
          /* Make sure we have a zero-sized array.  */
17606
 
@@ -272,8 +271,7 @@
17607
 
 
17608
 
        }
17609
 
 
17610
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17611
 
-                  * extent[rank-1];
17612
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17613
 
 
17614
 
       retarray->offset = 0;
17615
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17616
 
@@ -285,7 +283,7 @@
17617
 
          return;
17618
 
        }
17619
 
       else
17620
 
-       retarray->base_addr = xmalloc (alloc_size);
17621
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17622
 
 
17623
 
     }
17624
 
   else
17625
 
@@ -430,8 +428,7 @@
17626
 
       retarray->offset = 0;
17627
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17628
 
 
17629
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17630
 
-                  * extent[rank-1];
17631
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17632
 
 
17633
 
       if (alloc_size == 0)
17634
 
        {
17635
 
@@ -440,7 +437,7 @@
17636
 
          return;
17637
 
        }
17638
 
       else
17639
 
-       retarray->base_addr = xmalloc (alloc_size);
17640
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17641
 
     }
17642
 
   else
17643
 
     {
17644
 
Index: libgfortran/generated/maxloc1_8_r16.c
17645
 
===================================================================
17646
 
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
17647
 
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
17648
 
@@ -98,10 +98,9 @@
17649
 
       retarray->offset = 0;
17650
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17651
 
 
17652
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17653
 
-                  * extent[rank-1];
17654
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17655
 
 
17656
 
-      retarray->base_addr = xmalloc (alloc_size);
17657
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17658
 
       if (alloc_size == 0)
17659
 
        {
17660
 
          /* Make sure we have a zero-sized array.  */
17661
 
@@ -294,8 +293,7 @@
17662
 
 
17663
 
        }
17664
 
 
17665
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17666
 
-                  * extent[rank-1];
17667
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17668
 
 
17669
 
       retarray->offset = 0;
17670
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17671
 
@@ -307,7 +305,7 @@
17672
 
          return;
17673
 
        }
17674
 
       else
17675
 
-       retarray->base_addr = xmalloc (alloc_size);
17676
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17677
 
 
17678
 
     }
17679
 
   else
17680
 
@@ -485,8 +483,7 @@
17681
 
       retarray->offset = 0;
17682
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17683
 
 
17684
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17685
 
-                  * extent[rank-1];
17686
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17687
 
 
17688
 
       if (alloc_size == 0)
17689
 
        {
17690
 
@@ -495,7 +492,7 @@
17691
 
          return;
17692
 
        }
17693
 
       else
17694
 
-       retarray->base_addr = xmalloc (alloc_size);
17695
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17696
 
     }
17697
 
   else
17698
 
     {
17699
 
Index: libgfortran/generated/sum_r16.c
17700
 
===================================================================
17701
 
--- a/src/libgfortran/generated/sum_r16.c       (.../tags/gcc_4_8_3_release)
17702
 
+++ b/src/libgfortran/generated/sum_r16.c       (.../branches/gcc-4_8-branch)
17703
 
@@ -97,10 +97,9 @@
17704
 
       retarray->offset = 0;
17705
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17706
 
 
17707
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17708
 
-                  * extent[rank-1];
17709
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17710
 
 
17711
 
-      retarray->base_addr = xmalloc (alloc_size);
17712
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17713
 
       if (alloc_size == 0)
17714
 
        {
17715
 
          /* Make sure we have a zero-sized array.  */
17716
 
@@ -272,8 +271,7 @@
17717
 
 
17718
 
        }
17719
 
 
17720
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17721
 
-                  * extent[rank-1];
17722
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17723
 
 
17724
 
       retarray->offset = 0;
17725
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17726
 
@@ -285,7 +283,7 @@
17727
 
          return;
17728
 
        }
17729
 
       else
17730
 
-       retarray->base_addr = xmalloc (alloc_size);
17731
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17732
 
 
17733
 
     }
17734
 
   else
17735
 
@@ -430,8 +428,7 @@
17736
 
       retarray->offset = 0;
17737
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17738
 
 
17739
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17740
 
-                  * extent[rank-1];
17741
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17742
 
 
17743
 
       if (alloc_size == 0)
17744
 
        {
17745
 
@@ -440,7 +437,7 @@
17746
 
          return;
17747
 
        }
17748
 
       else
17749
 
-       retarray->base_addr = xmalloc (alloc_size);
17750
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17751
 
     }
17752
 
   else
17753
 
     {
17754
 
Index: libgfortran/generated/sum_i1.c
17755
 
===================================================================
17756
 
--- a/src/libgfortran/generated/sum_i1.c        (.../tags/gcc_4_8_3_release)
17757
 
+++ b/src/libgfortran/generated/sum_i1.c        (.../branches/gcc-4_8-branch)
17758
 
@@ -97,10 +97,9 @@
17759
 
       retarray->offset = 0;
17760
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17761
 
 
17762
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17763
 
-                  * extent[rank-1];
17764
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17765
 
 
17766
 
-      retarray->base_addr = xmalloc (alloc_size);
17767
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17768
 
       if (alloc_size == 0)
17769
 
        {
17770
 
          /* Make sure we have a zero-sized array.  */
17771
 
@@ -272,8 +271,7 @@
17772
 
 
17773
 
        }
17774
 
 
17775
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17776
 
-                  * extent[rank-1];
17777
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17778
 
 
17779
 
       retarray->offset = 0;
17780
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17781
 
@@ -285,7 +283,7 @@
17782
 
          return;
17783
 
        }
17784
 
       else
17785
 
-       retarray->base_addr = xmalloc (alloc_size);
17786
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17787
 
 
17788
 
     }
17789
 
   else
17790
 
@@ -430,8 +428,7 @@
17791
 
       retarray->offset = 0;
17792
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17793
 
 
17794
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17795
 
-                  * extent[rank-1];
17796
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17797
 
 
17798
 
       if (alloc_size == 0)
17799
 
        {
17800
 
@@ -440,7 +437,7 @@
17801
 
          return;
17802
 
        }
17803
 
       else
17804
 
-       retarray->base_addr = xmalloc (alloc_size);
17805
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17806
 
     }
17807
 
   else
17808
 
     {
17809
 
Index: libgfortran/generated/in_pack_i2.c
17810
 
===================================================================
17811
 
--- a/src/libgfortran/generated/in_pack_i2.c    (.../tags/gcc_4_8_3_release)
17812
 
+++ b/src/libgfortran/generated/in_pack_i2.c    (.../branches/gcc-4_8-branch)
17813
 
@@ -76,7 +76,7 @@
17814
 
     return source->base_addr;
17815
 
 
17816
 
   /* Allocate storage for the destination.  */
17817
 
-  destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
17818
 
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
17819
 
   dest = destptr;
17820
 
   src = source->base_addr;
17821
 
   stride0 = stride[0];
17822
 
Index: libgfortran/generated/transpose_r10.c
17823
 
===================================================================
17824
 
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
17825
 
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
17826
 
@@ -60,7 +60,8 @@
17827
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17828
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
17829
 
 
17830
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
17831
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
17832
 
+                                     sizeof (GFC_REAL_10));
17833
 
       ret->offset = 0;
17834
 
     } else if (unlikely (compile_options.bounds_check))
17835
 
     {
17836
 
Index: libgfortran/generated/maxloc1_16_r16.c
17837
 
===================================================================
17838
 
--- a/src/libgfortran/generated/maxloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
17839
 
+++ b/src/libgfortran/generated/maxloc1_16_r16.c        (.../branches/gcc-4_8-branch)
17840
 
@@ -98,10 +98,9 @@
17841
 
       retarray->offset = 0;
17842
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17843
 
 
17844
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17845
 
-                  * extent[rank-1];
17846
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17847
 
 
17848
 
-      retarray->base_addr = xmalloc (alloc_size);
17849
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17850
 
       if (alloc_size == 0)
17851
 
        {
17852
 
          /* Make sure we have a zero-sized array.  */
17853
 
@@ -294,8 +293,7 @@
17854
 
 
17855
 
        }
17856
 
 
17857
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17858
 
-                  * extent[rank-1];
17859
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17860
 
 
17861
 
       retarray->offset = 0;
17862
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17863
 
@@ -307,7 +305,7 @@
17864
 
          return;
17865
 
        }
17866
 
       else
17867
 
-       retarray->base_addr = xmalloc (alloc_size);
17868
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17869
 
 
17870
 
     }
17871
 
   else
17872
 
@@ -485,8 +483,7 @@
17873
 
       retarray->offset = 0;
17874
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17875
 
 
17876
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17877
 
-                  * extent[rank-1];
17878
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17879
 
 
17880
 
       if (alloc_size == 0)
17881
 
        {
17882
 
@@ -495,7 +492,7 @@
17883
 
          return;
17884
 
        }
17885
 
       else
17886
 
-       retarray->base_addr = xmalloc (alloc_size);
17887
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17888
 
     }
17889
 
   else
17890
 
     {
17891
 
Index: libgfortran/generated/maxloc1_16_i4.c
17892
 
===================================================================
17893
 
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
17894
 
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
17895
 
@@ -98,10 +98,9 @@
17896
 
       retarray->offset = 0;
17897
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17898
 
 
17899
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17900
 
-                  * extent[rank-1];
17901
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17902
 
 
17903
 
-      retarray->base_addr = xmalloc (alloc_size);
17904
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17905
 
       if (alloc_size == 0)
17906
 
        {
17907
 
          /* Make sure we have a zero-sized array.  */
17908
 
@@ -294,8 +293,7 @@
17909
 
 
17910
 
        }
17911
 
 
17912
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17913
 
-                  * extent[rank-1];
17914
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17915
 
 
17916
 
       retarray->offset = 0;
17917
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17918
 
@@ -307,7 +305,7 @@
17919
 
          return;
17920
 
        }
17921
 
       else
17922
 
-       retarray->base_addr = xmalloc (alloc_size);
17923
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17924
 
 
17925
 
     }
17926
 
   else
17927
 
@@ -485,8 +483,7 @@
17928
 
       retarray->offset = 0;
17929
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17930
 
 
17931
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17932
 
-                  * extent[rank-1];
17933
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17934
 
 
17935
 
       if (alloc_size == 0)
17936
 
        {
17937
 
@@ -495,7 +492,7 @@
17938
 
          return;
17939
 
        }
17940
 
       else
17941
 
-       retarray->base_addr = xmalloc (alloc_size);
17942
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17943
 
     }
17944
 
   else
17945
 
     {
17946
 
Index: libgfortran/generated/spread_i1.c
17947
 
===================================================================
17948
 
--- a/src/libgfortran/generated/spread_i1.c     (.../tags/gcc_4_8_3_release)
17949
 
+++ b/src/libgfortran/generated/spread_i1.c     (.../branches/gcc-4_8-branch)
17950
 
@@ -101,8 +101,8 @@
17951
 
        }
17952
 
       ret->offset = 0;
17953
 
 
17954
 
-      /* xmalloc allocates a single byte for zero size.  */
17955
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
17956
 
+      /* xmallocarray allocates a single byte for zero size.  */
17957
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
17958
 
       if (rs <= 0)
17959
 
         return;
17960
 
     }
17961
 
@@ -244,7 +244,7 @@
17962
 
 
17963
 
   if (ret->base_addr == NULL)
17964
 
     {
17965
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
17966
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
17967
 
       ret->offset = 0;
17968
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17969
 
     }
17970
 
Index: libgfortran/generated/maxloc0_16_i8.c
17971
 
===================================================================
17972
 
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
17973
 
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
17974
 
@@ -58,7 +58,7 @@
17975
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17976
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17977
 
       retarray->offset = 0;
17978
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17979
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17980
 
     }
17981
 
   else
17982
 
     {
17983
 
@@ -199,7 +199,7 @@
17984
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17985
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17986
 
       retarray->offset = 0;
17987
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17988
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17989
 
     }
17990
 
   else
17991
 
     {
17992
 
@@ -367,7 +367,7 @@
17993
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17994
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17995
 
       retarray->offset = 0;
17996
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17997
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17998
 
     }
17999
 
   else if (unlikely (compile_options.bounds_check))
18000
 
     {
18001
 
Index: libgfortran/generated/maxval_r16.c
18002
 
===================================================================
18003
 
--- a/src/libgfortran/generated/maxval_r16.c    (.../tags/gcc_4_8_3_release)
18004
 
+++ b/src/libgfortran/generated/maxval_r16.c    (.../branches/gcc-4_8-branch)
18005
 
@@ -97,10 +97,9 @@
18006
 
       retarray->offset = 0;
18007
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18008
 
 
18009
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18010
 
-                  * extent[rank-1];
18011
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18012
 
 
18013
 
-      retarray->base_addr = xmalloc (alloc_size);
18014
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18015
 
       if (alloc_size == 0)
18016
 
        {
18017
 
          /* Make sure we have a zero-sized array.  */
18018
 
@@ -286,8 +285,7 @@
18019
 
 
18020
 
        }
18021
 
 
18022
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18023
 
-                  * extent[rank-1];
18024
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18025
 
 
18026
 
       retarray->offset = 0;
18027
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18028
 
@@ -299,7 +297,7 @@
18029
 
          return;
18030
 
        }
18031
 
       else
18032
 
-       retarray->base_addr = xmalloc (alloc_size);
18033
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18034
 
 
18035
 
     }
18036
 
   else
18037
 
@@ -472,8 +470,7 @@
18038
 
       retarray->offset = 0;
18039
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18040
 
 
18041
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18042
 
-                  * extent[rank-1];
18043
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18044
 
 
18045
 
       if (alloc_size == 0)
18046
 
        {
18047
 
@@ -482,7 +479,7 @@
18048
 
          return;
18049
 
        }
18050
 
       else
18051
 
-       retarray->base_addr = xmalloc (alloc_size);
18052
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18053
 
     }
18054
 
   else
18055
 
     {
18056
 
Index: libgfortran/generated/product_c10.c
18057
 
===================================================================
18058
 
--- a/src/libgfortran/generated/product_c10.c   (.../tags/gcc_4_8_3_release)
18059
 
+++ b/src/libgfortran/generated/product_c10.c   (.../branches/gcc-4_8-branch)
18060
 
@@ -97,10 +97,9 @@
18061
 
       retarray->offset = 0;
18062
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18063
 
 
18064
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18065
 
-                  * extent[rank-1];
18066
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18067
 
 
18068
 
-      retarray->base_addr = xmalloc (alloc_size);
18069
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18070
 
       if (alloc_size == 0)
18071
 
        {
18072
 
          /* Make sure we have a zero-sized array.  */
18073
 
@@ -272,8 +271,7 @@
18074
 
 
18075
 
        }
18076
 
 
18077
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18078
 
-                  * extent[rank-1];
18079
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18080
 
 
18081
 
       retarray->offset = 0;
18082
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18083
 
@@ -285,7 +283,7 @@
18084
 
          return;
18085
 
        }
18086
 
       else
18087
 
-       retarray->base_addr = xmalloc (alloc_size);
18088
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18089
 
 
18090
 
     }
18091
 
   else
18092
 
@@ -430,8 +428,7 @@
18093
 
       retarray->offset = 0;
18094
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18095
 
 
18096
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18097
 
-                  * extent[rank-1];
18098
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18099
 
 
18100
 
       if (alloc_size == 0)
18101
 
        {
18102
 
@@ -440,7 +437,7 @@
18103
 
          return;
18104
 
        }
18105
 
       else
18106
 
-       retarray->base_addr = xmalloc (alloc_size);
18107
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18108
 
     }
18109
 
   else
18110
 
     {
18111
 
Index: libgfortran/generated/minloc1_8_i4.c
18112
 
===================================================================
18113
 
--- a/src/libgfortran/generated/minloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
18114
 
+++ b/src/libgfortran/generated/minloc1_8_i4.c  (.../branches/gcc-4_8-branch)
18115
 
@@ -98,10 +98,9 @@
18116
 
       retarray->offset = 0;
18117
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18118
 
 
18119
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18120
 
-                  * extent[rank-1];
18121
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18122
 
 
18123
 
-      retarray->base_addr = xmalloc (alloc_size);
18124
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18125
 
       if (alloc_size == 0)
18126
 
        {
18127
 
          /* Make sure we have a zero-sized array.  */
18128
 
@@ -294,8 +293,7 @@
18129
 
 
18130
 
        }
18131
 
 
18132
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18133
 
-                  * extent[rank-1];
18134
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18135
 
 
18136
 
       retarray->offset = 0;
18137
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18138
 
@@ -307,7 +305,7 @@
18139
 
          return;
18140
 
        }
18141
 
       else
18142
 
-       retarray->base_addr = xmalloc (alloc_size);
18143
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18144
 
 
18145
 
     }
18146
 
   else
18147
 
@@ -485,8 +483,7 @@
18148
 
       retarray->offset = 0;
18149
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18150
 
 
18151
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18152
 
-                  * extent[rank-1];
18153
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18154
 
 
18155
 
       if (alloc_size == 0)
18156
 
        {
18157
 
@@ -495,7 +492,7 @@
18158
 
          return;
18159
 
        }
18160
 
       else
18161
 
-       retarray->base_addr = xmalloc (alloc_size);
18162
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18163
 
     }
18164
 
   else
18165
 
     {
18166
 
Index: libgfortran/generated/minloc0_16_i16.c
18167
 
===================================================================
18168
 
--- a/src/libgfortran/generated/minloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
18169
 
+++ b/src/libgfortran/generated/minloc0_16_i16.c        (.../branches/gcc-4_8-branch)
18170
 
@@ -58,7 +58,7 @@
18171
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18172
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18173
 
       retarray->offset = 0;
18174
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18175
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18176
 
     }
18177
 
   else
18178
 
     {
18179
 
@@ -199,7 +199,7 @@
18180
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18181
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18182
 
       retarray->offset = 0;
18183
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18184
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18185
 
     }
18186
 
   else
18187
 
     {
18188
 
@@ -367,7 +367,7 @@
18189
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18190
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18191
 
       retarray->offset = 0;
18192
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18193
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18194
 
     }
18195
 
   else if (unlikely (compile_options.bounds_check))
18196
 
     {
18197
 
Index: libgfortran/generated/matmul_r16.c
18198
 
===================================================================
18199
 
--- a/src/libgfortran/generated/matmul_r16.c    (.../tags/gcc_4_8_3_release)
18200
 
+++ b/src/libgfortran/generated/matmul_r16.c    (.../branches/gcc-4_8-branch)
18201
 
@@ -124,7 +124,7 @@
18202
 
         }
18203
 
 
18204
 
       retarray->base_addr
18205
 
-       = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
18206
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
18207
 
       retarray->offset = 0;
18208
 
     }
18209
 
     else if (unlikely (compile_options.bounds_check))
18210
 
Index: libgfortran/generated/minloc0_4_r4.c
18211
 
===================================================================
18212
 
--- a/src/libgfortran/generated/minloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
18213
 
+++ b/src/libgfortran/generated/minloc0_4_r4.c  (.../branches/gcc-4_8-branch)
18214
 
@@ -58,7 +58,7 @@
18215
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18216
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18217
 
       retarray->offset = 0;
18218
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18219
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18220
 
     }
18221
 
   else
18222
 
     {
18223
 
@@ -199,7 +199,7 @@
18224
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18225
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18226
 
       retarray->offset = 0;
18227
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18228
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18229
 
     }
18230
 
   else
18231
 
     {
18232
 
@@ -367,7 +367,7 @@
18233
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18234
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18235
 
       retarray->offset = 0;
18236
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18237
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18238
 
     }
18239
 
   else if (unlikely (compile_options.bounds_check))
18240
 
     {
18241
 
Index: libgfortran/generated/iany_i2.c
18242
 
===================================================================
18243
 
--- a/src/libgfortran/generated/iany_i2.c       (.../tags/gcc_4_8_3_release)
18244
 
+++ b/src/libgfortran/generated/iany_i2.c       (.../branches/gcc-4_8-branch)
18245
 
@@ -97,10 +97,9 @@
18246
 
       retarray->offset = 0;
18247
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18248
 
 
18249
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18250
 
-                  * extent[rank-1];
18251
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18252
 
 
18253
 
-      retarray->base_addr = xmalloc (alloc_size);
18254
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18255
 
       if (alloc_size == 0)
18256
 
        {
18257
 
          /* Make sure we have a zero-sized array.  */
18258
 
@@ -272,8 +271,7 @@
18259
 
 
18260
 
        }
18261
 
 
18262
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18263
 
-                  * extent[rank-1];
18264
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18265
 
 
18266
 
       retarray->offset = 0;
18267
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18268
 
@@ -285,7 +283,7 @@
18269
 
          return;
18270
 
        }
18271
 
       else
18272
 
-       retarray->base_addr = xmalloc (alloc_size);
18273
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18274
 
 
18275
 
     }
18276
 
   else
18277
 
@@ -430,8 +428,7 @@
18278
 
       retarray->offset = 0;
18279
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18280
 
 
18281
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18282
 
-                  * extent[rank-1];
18283
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18284
 
 
18285
 
       if (alloc_size == 0)
18286
 
        {
18287
 
@@ -440,7 +437,7 @@
18288
 
          return;
18289
 
        }
18290
 
       else
18291
 
-       retarray->base_addr = xmalloc (alloc_size);
18292
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18293
 
     }
18294
 
   else
18295
 
     {
18296
 
Index: libgfortran/generated/sum_r4.c
18297
 
===================================================================
18298
 
--- a/src/libgfortran/generated/sum_r4.c        (.../tags/gcc_4_8_3_release)
18299
 
+++ b/src/libgfortran/generated/sum_r4.c        (.../branches/gcc-4_8-branch)
18300
 
@@ -97,10 +97,9 @@
18301
 
       retarray->offset = 0;
18302
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18303
 
 
18304
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18305
 
-                  * extent[rank-1];
18306
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18307
 
 
18308
 
-      retarray->base_addr = xmalloc (alloc_size);
18309
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18310
 
       if (alloc_size == 0)
18311
 
        {
18312
 
          /* Make sure we have a zero-sized array.  */
18313
 
@@ -272,8 +271,7 @@
18314
 
 
18315
 
        }
18316
 
 
18317
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18318
 
-                  * extent[rank-1];
18319
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18320
 
 
18321
 
       retarray->offset = 0;
18322
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18323
 
@@ -285,7 +283,7 @@
18324
 
          return;
18325
 
        }
18326
 
       else
18327
 
-       retarray->base_addr = xmalloc (alloc_size);
18328
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18329
 
 
18330
 
     }
18331
 
   else
18332
 
@@ -430,8 +428,7 @@
18333
 
       retarray->offset = 0;
18334
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18335
 
 
18336
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18337
 
-                  * extent[rank-1];
18338
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18339
 
 
18340
 
       if (alloc_size == 0)
18341
 
        {
18342
 
@@ -440,7 +437,7 @@
18343
 
          return;
18344
 
        }
18345
 
       else
18346
 
-       retarray->base_addr = xmalloc (alloc_size);
18347
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18348
 
     }
18349
 
   else
18350
 
     {
18351
 
Index: libgfortran/generated/unpack_c8.c
18352
 
===================================================================
18353
 
--- a/src/libgfortran/generated/unpack_c8.c     (.../tags/gcc_4_8_3_release)
18354
 
+++ b/src/libgfortran/generated/unpack_c8.c     (.../branches/gcc-4_8-branch)
18355
 
@@ -99,7 +99,7 @@
18356
 
          rs *= extent[n];
18357
 
        }
18358
 
       ret->offset = 0;
18359
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
18360
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
18361
 
     }
18362
 
   else
18363
 
     {
18364
 
@@ -244,7 +244,7 @@
18365
 
          rs *= extent[n];
18366
 
        }
18367
 
       ret->offset = 0;
18368
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
18369
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
18370
 
     }
18371
 
   else
18372
 
     {
18373
 
Index: libgfortran/generated/in_pack_c16.c
18374
 
===================================================================
18375
 
--- a/src/libgfortran/generated/in_pack_c16.c   (.../tags/gcc_4_8_3_release)
18376
 
+++ b/src/libgfortran/generated/in_pack_c16.c   (.../branches/gcc-4_8-branch)
18377
 
@@ -76,7 +76,7 @@
18378
 
     return source->base_addr;
18379
 
 
18380
 
   /* Allocate storage for the destination.  */
18381
 
-  destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
18382
 
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
18383
 
   dest = destptr;
18384
 
   src = source->base_addr;
18385
 
   stride0 = stride[0];
18386
 
Index: libgfortran/generated/minloc0_4_i2.c
18387
 
===================================================================
18388
 
--- a/src/libgfortran/generated/minloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
18389
 
+++ b/src/libgfortran/generated/minloc0_4_i2.c  (.../branches/gcc-4_8-branch)
18390
 
@@ -58,7 +58,7 @@
18391
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18392
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18393
 
       retarray->offset = 0;
18394
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18395
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18396
 
     }
18397
 
   else
18398
 
     {
18399
 
@@ -199,7 +199,7 @@
18400
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18401
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18402
 
       retarray->offset = 0;
18403
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18404
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18405
 
     }
18406
 
   else
18407
 
     {
18408
 
@@ -367,7 +367,7 @@
18409
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18410
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18411
 
       retarray->offset = 0;
18412
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18413
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18414
 
     }
18415
 
   else if (unlikely (compile_options.bounds_check))
18416
 
     {
18417
 
Index: libgfortran/generated/spread_c10.c
18418
 
===================================================================
18419
 
--- a/src/libgfortran/generated/spread_c10.c    (.../tags/gcc_4_8_3_release)
18420
 
+++ b/src/libgfortran/generated/spread_c10.c    (.../branches/gcc-4_8-branch)
18421
 
@@ -101,8 +101,8 @@
18422
 
        }
18423
 
       ret->offset = 0;
18424
 
 
18425
 
-      /* xmalloc allocates a single byte for zero size.  */
18426
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
18427
 
+      /* xmallocarray allocates a single byte for zero size.  */
18428
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
18429
 
       if (rs <= 0)
18430
 
         return;
18431
 
     }
18432
 
@@ -244,7 +244,7 @@
18433
 
 
18434
 
   if (ret->base_addr == NULL)
18435
 
     {
18436
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
18437
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
18438
 
       ret->offset = 0;
18439
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18440
 
     }
18441
 
Index: libgfortran/generated/maxloc0_8_i1.c
18442
 
===================================================================
18443
 
--- a/src/libgfortran/generated/maxloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
18444
 
+++ b/src/libgfortran/generated/maxloc0_8_i1.c  (.../branches/gcc-4_8-branch)
18445
 
@@ -58,7 +58,7 @@
18446
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18447
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18448
 
       retarray->offset = 0;
18449
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18450
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18451
 
     }
18452
 
   else
18453
 
     {
18454
 
@@ -199,7 +199,7 @@
18455
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18456
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18457
 
       retarray->offset = 0;
18458
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18459
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18460
 
     }
18461
 
   else
18462
 
     {
18463
 
@@ -367,7 +367,7 @@
18464
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18465
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18466
 
       retarray->offset = 0;
18467
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18468
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18469
 
     }
18470
 
   else if (unlikely (compile_options.bounds_check))
18471
 
     {
18472
 
Index: libgfortran/generated/spread_r4.c
18473
 
===================================================================
18474
 
--- a/src/libgfortran/generated/spread_r4.c     (.../tags/gcc_4_8_3_release)
18475
 
+++ b/src/libgfortran/generated/spread_r4.c     (.../branches/gcc-4_8-branch)
18476
 
@@ -101,8 +101,8 @@
18477
 
        }
18478
 
       ret->offset = 0;
18479
 
 
18480
 
-      /* xmalloc allocates a single byte for zero size.  */
18481
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
18482
 
+      /* xmallocarray allocates a single byte for zero size.  */
18483
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
18484
 
       if (rs <= 0)
18485
 
         return;
18486
 
     }
18487
 
@@ -244,7 +244,7 @@
18488
 
 
18489
 
   if (ret->base_addr == NULL)
18490
 
     {
18491
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
18492
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
18493
 
       ret->offset = 0;
18494
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18495
 
     }
18496
 
Index: libgfortran/generated/minloc0_8_i8.c
18497
 
===================================================================
18498
 
--- a/src/libgfortran/generated/minloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
18499
 
+++ b/src/libgfortran/generated/minloc0_8_i8.c  (.../branches/gcc-4_8-branch)
18500
 
@@ -58,7 +58,7 @@
18501
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18502
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18503
 
       retarray->offset = 0;
18504
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18505
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18506
 
     }
18507
 
   else
18508
 
     {
18509
 
@@ -199,7 +199,7 @@
18510
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18511
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18512
 
       retarray->offset = 0;
18513
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18514
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18515
 
     }
18516
 
   else
18517
 
     {
18518
 
@@ -367,7 +367,7 @@
18519
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18520
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18521
 
       retarray->offset = 0;
18522
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18523
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18524
 
     }
18525
 
   else if (unlikely (compile_options.bounds_check))
18526
 
     {
18527
 
Index: libgfortran/generated/matmul_c8.c
18528
 
===================================================================
18529
 
--- a/src/libgfortran/generated/matmul_c8.c     (.../tags/gcc_4_8_3_release)
18530
 
+++ b/src/libgfortran/generated/matmul_c8.c     (.../branches/gcc-4_8-branch)
18531
 
@@ -124,7 +124,7 @@
18532
 
         }
18533
 
 
18534
 
       retarray->base_addr
18535
 
-       = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
18536
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
18537
 
       retarray->offset = 0;
18538
 
     }
18539
 
     else if (unlikely (compile_options.bounds_check))
18540
 
Index: libgfortran/generated/minloc1_16_r10.c
18541
 
===================================================================
18542
 
--- a/src/libgfortran/generated/minloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
18543
 
+++ b/src/libgfortran/generated/minloc1_16_r10.c        (.../branches/gcc-4_8-branch)
18544
 
@@ -98,10 +98,9 @@
18545
 
       retarray->offset = 0;
18546
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18547
 
 
18548
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18549
 
-                  * extent[rank-1];
18550
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18551
 
 
18552
 
-      retarray->base_addr = xmalloc (alloc_size);
18553
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18554
 
       if (alloc_size == 0)
18555
 
        {
18556
 
          /* Make sure we have a zero-sized array.  */
18557
 
@@ -294,8 +293,7 @@
18558
 
 
18559
 
        }
18560
 
 
18561
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18562
 
-                  * extent[rank-1];
18563
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18564
 
 
18565
 
       retarray->offset = 0;
18566
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18567
 
@@ -307,7 +305,7 @@
18568
 
          return;
18569
 
        }
18570
 
       else
18571
 
-       retarray->base_addr = xmalloc (alloc_size);
18572
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18573
 
 
18574
 
     }
18575
 
   else
18576
 
@@ -485,8 +483,7 @@
18577
 
       retarray->offset = 0;
18578
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18579
 
 
18580
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18581
 
-                  * extent[rank-1];
18582
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18583
 
 
18584
 
       if (alloc_size == 0)
18585
 
        {
18586
 
@@ -495,7 +492,7 @@
18587
 
          return;
18588
 
        }
18589
 
       else
18590
 
-       retarray->base_addr = xmalloc (alloc_size);
18591
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18592
 
     }
18593
 
   else
18594
 
     {
18595
 
Index: libgfortran/generated/sum_i2.c
18596
 
===================================================================
18597
 
--- a/src/libgfortran/generated/sum_i2.c        (.../tags/gcc_4_8_3_release)
18598
 
+++ b/src/libgfortran/generated/sum_i2.c        (.../branches/gcc-4_8-branch)
18599
 
@@ -97,10 +97,9 @@
18600
 
       retarray->offset = 0;
18601
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18602
 
 
18603
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18604
 
-                  * extent[rank-1];
18605
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18606
 
 
18607
 
-      retarray->base_addr = xmalloc (alloc_size);
18608
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18609
 
       if (alloc_size == 0)
18610
 
        {
18611
 
          /* Make sure we have a zero-sized array.  */
18612
 
@@ -272,8 +271,7 @@
18613
 
 
18614
 
        }
18615
 
 
18616
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18617
 
-                  * extent[rank-1];
18618
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18619
 
 
18620
 
       retarray->offset = 0;
18621
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18622
 
@@ -285,7 +283,7 @@
18623
 
          return;
18624
 
        }
18625
 
       else
18626
 
-       retarray->base_addr = xmalloc (alloc_size);
18627
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18628
 
 
18629
 
     }
18630
 
   else
18631
 
@@ -430,8 +428,7 @@
18632
 
       retarray->offset = 0;
18633
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18634
 
 
18635
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18636
 
-                  * extent[rank-1];
18637
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18638
 
 
18639
 
       if (alloc_size == 0)
18640
 
        {
18641
 
@@ -440,7 +437,7 @@
18642
 
          return;
18643
 
        }
18644
 
       else
18645
 
-       retarray->base_addr = xmalloc (alloc_size);
18646
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18647
 
     }
18648
 
   else
18649
 
     {
18650
 
Index: libgfortran/generated/iparity_i16.c
18651
 
===================================================================
18652
 
--- a/src/libgfortran/generated/iparity_i16.c   (.../tags/gcc_4_8_3_release)
18653
 
+++ b/src/libgfortran/generated/iparity_i16.c   (.../branches/gcc-4_8-branch)
18654
 
@@ -97,10 +97,9 @@
18655
 
       retarray->offset = 0;
18656
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18657
 
 
18658
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18659
 
-                  * extent[rank-1];
18660
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18661
 
 
18662
 
-      retarray->base_addr = xmalloc (alloc_size);
18663
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18664
 
       if (alloc_size == 0)
18665
 
        {
18666
 
          /* Make sure we have a zero-sized array.  */
18667
 
@@ -272,8 +271,7 @@
18668
 
 
18669
 
        }
18670
 
 
18671
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18672
 
-                  * extent[rank-1];
18673
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18674
 
 
18675
 
       retarray->offset = 0;
18676
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18677
 
@@ -285,7 +283,7 @@
18678
 
          return;
18679
 
        }
18680
 
       else
18681
 
-       retarray->base_addr = xmalloc (alloc_size);
18682
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18683
 
 
18684
 
     }
18685
 
   else
18686
 
@@ -430,8 +428,7 @@
18687
 
       retarray->offset = 0;
18688
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18689
 
 
18690
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18691
 
-                  * extent[rank-1];
18692
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18693
 
 
18694
 
       if (alloc_size == 0)
18695
 
        {
18696
 
@@ -440,7 +437,7 @@
18697
 
          return;
18698
 
        }
18699
 
       else
18700
 
-       retarray->base_addr = xmalloc (alloc_size);
18701
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18702
 
     }
18703
 
   else
18704
 
     {
18705
 
Index: libgfortran/generated/minloc0_16_i1.c
18706
 
===================================================================
18707
 
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
18708
 
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
18709
 
@@ -58,7 +58,7 @@
18710
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18711
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18712
 
       retarray->offset = 0;
18713
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18714
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18715
 
     }
18716
 
   else
18717
 
     {
18718
 
@@ -199,7 +199,7 @@
18719
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18720
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18721
 
       retarray->offset = 0;
18722
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18723
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18724
 
     }
18725
 
   else
18726
 
     {
18727
 
@@ -367,7 +367,7 @@
18728
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18729
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18730
 
       retarray->offset = 0;
18731
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18732
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18733
 
     }
18734
 
   else if (unlikely (compile_options.bounds_check))
18735
 
     {
18736
 
Index: libgfortran/generated/reshape_c16.c
18737
 
===================================================================
18738
 
--- a/src/libgfortran/generated/reshape_c16.c   (.../tags/gcc_4_8_3_release)
18739
 
+++ b/src/libgfortran/generated/reshape_c16.c   (.../branches/gcc-4_8-branch)
18740
 
@@ -111,11 +111,11 @@
18741
 
       ret->offset = 0;
18742
 
 
18743
 
       if (unlikely (rs < 1))
18744
 
-        alloc_size = 1;
18745
 
+        alloc_size = 0;
18746
 
       else
18747
 
-        alloc_size = rs * sizeof (GFC_COMPLEX_16);
18748
 
+        alloc_size = rs;
18749
 
 
18750
 
-      ret->base_addr = xmalloc (alloc_size);
18751
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18752
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18753
 
     }
18754
 
 
18755
 
Index: libgfortran/generated/pack_c4.c
18756
 
===================================================================
18757
 
--- a/src/libgfortran/generated/pack_c4.c       (.../tags/gcc_4_8_3_release)
18758
 
+++ b/src/libgfortran/generated/pack_c4.c       (.../branches/gcc-4_8-branch)
18759
 
@@ -167,8 +167,8 @@
18760
 
 
18761
 
          ret->offset = 0;
18762
 
 
18763
 
-         /* xmalloc allocates a single byte for zero size.  */
18764
 
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
18765
 
+         /* xmallocarray allocates a single byte for zero size.  */
18766
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
18767
 
 
18768
 
          if (total == 0)
18769
 
            return;
18770
 
Index: libgfortran/generated/parity_l4.c
18771
 
===================================================================
18772
 
--- a/src/libgfortran/generated/parity_l4.c     (.../tags/gcc_4_8_3_release)
18773
 
+++ b/src/libgfortran/generated/parity_l4.c     (.../branches/gcc-4_8-branch)
18774
 
@@ -98,10 +98,9 @@
18775
 
       retarray->offset = 0;
18776
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18777
 
 
18778
 
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18779
 
-                  * extent[rank-1];
18780
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18781
 
 
18782
 
-      retarray->base_addr = xmalloc (alloc_size);
18783
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
18784
 
       if (alloc_size == 0)
18785
 
        {
18786
 
          /* Make sure we have a zero-sized array.  */
18787
 
Index: libgfortran/generated/spread_i2.c
18788
 
===================================================================
18789
 
--- a/src/libgfortran/generated/spread_i2.c     (.../tags/gcc_4_8_3_release)
18790
 
+++ b/src/libgfortran/generated/spread_i2.c     (.../branches/gcc-4_8-branch)
18791
 
@@ -101,8 +101,8 @@
18792
 
        }
18793
 
       ret->offset = 0;
18794
 
 
18795
 
-      /* xmalloc allocates a single byte for zero size.  */
18796
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
18797
 
+      /* xmallocarray allocates a single byte for zero size.  */
18798
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
18799
 
       if (rs <= 0)
18800
 
         return;
18801
 
     }
18802
 
@@ -244,7 +244,7 @@
18803
 
 
18804
 
   if (ret->base_addr == NULL)
18805
 
     {
18806
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
18807
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
18808
 
       ret->offset = 0;
18809
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18810
 
     }
18811
 
Index: libgfortran/generated/any_l4.c
18812
 
===================================================================
18813
 
--- a/src/libgfortran/generated/any_l4.c        (.../tags/gcc_4_8_3_release)
18814
 
+++ b/src/libgfortran/generated/any_l4.c        (.../branches/gcc-4_8-branch)
18815
 
@@ -101,8 +101,7 @@
18816
 
       retarray->offset = 0;
18817
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18818
 
 
18819
 
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18820
 
-                  * extent[rank-1];
18821
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18822
 
 
18823
 
       if (alloc_size == 0)
18824
 
        {
18825
 
@@ -111,7 +110,7 @@
18826
 
          return;
18827
 
        }
18828
 
       else
18829
 
-       retarray->base_addr = xmalloc (alloc_size);
18830
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
18831
 
     }
18832
 
   else
18833
 
     {
18834
 
Index: libgfortran/generated/maxloc1_4_i8.c
18835
 
===================================================================
18836
 
--- a/src/libgfortran/generated/maxloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
18837
 
+++ b/src/libgfortran/generated/maxloc1_4_i8.c  (.../branches/gcc-4_8-branch)
18838
 
@@ -98,10 +98,9 @@
18839
 
       retarray->offset = 0;
18840
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18841
 
 
18842
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18843
 
-                  * extent[rank-1];
18844
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18845
 
 
18846
 
-      retarray->base_addr = xmalloc (alloc_size);
18847
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18848
 
       if (alloc_size == 0)
18849
 
        {
18850
 
          /* Make sure we have a zero-sized array.  */
18851
 
@@ -294,8 +293,7 @@
18852
 
 
18853
 
        }
18854
 
 
18855
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18856
 
-                  * extent[rank-1];
18857
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18858
 
 
18859
 
       retarray->offset = 0;
18860
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18861
 
@@ -307,7 +305,7 @@
18862
 
          return;
18863
 
        }
18864
 
       else
18865
 
-       retarray->base_addr = xmalloc (alloc_size);
18866
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18867
 
 
18868
 
     }
18869
 
   else
18870
 
@@ -485,8 +483,7 @@
18871
 
       retarray->offset = 0;
18872
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18873
 
 
18874
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18875
 
-                  * extent[rank-1];
18876
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18877
 
 
18878
 
       if (alloc_size == 0)
18879
 
        {
18880
 
@@ -495,7 +492,7 @@
18881
 
          return;
18882
 
        }
18883
 
       else
18884
 
-       retarray->base_addr = xmalloc (alloc_size);
18885
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18886
 
     }
18887
 
   else
18888
 
     {
18889
 
Index: libgfortran/generated/maxloc0_8_r4.c
18890
 
===================================================================
18891
 
--- a/src/libgfortran/generated/maxloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
18892
 
+++ b/src/libgfortran/generated/maxloc0_8_r4.c  (.../branches/gcc-4_8-branch)
18893
 
@@ -58,7 +58,7 @@
18894
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18895
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18896
 
       retarray->offset = 0;
18897
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18898
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18899
 
     }
18900
 
   else
18901
 
     {
18902
 
@@ -199,7 +199,7 @@
18903
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18904
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18905
 
       retarray->offset = 0;
18906
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18907
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18908
 
     }
18909
 
   else
18910
 
     {
18911
 
@@ -367,7 +367,7 @@
18912
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18913
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18914
 
       retarray->offset = 0;
18915
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18916
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18917
 
     }
18918
 
   else if (unlikely (compile_options.bounds_check))
18919
 
     {
18920
 
Index: libgfortran/generated/maxloc1_4_i16.c
18921
 
===================================================================
18922
 
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
18923
 
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
18924
 
@@ -98,10 +98,9 @@
18925
 
       retarray->offset = 0;
18926
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18927
 
 
18928
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18929
 
-                  * extent[rank-1];
18930
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18931
 
 
18932
 
-      retarray->base_addr = xmalloc (alloc_size);
18933
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18934
 
       if (alloc_size == 0)
18935
 
        {
18936
 
          /* Make sure we have a zero-sized array.  */
18937
 
@@ -294,8 +293,7 @@
18938
 
 
18939
 
        }
18940
 
 
18941
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18942
 
-                  * extent[rank-1];
18943
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18944
 
 
18945
 
       retarray->offset = 0;
18946
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18947
 
@@ -307,7 +305,7 @@
18948
 
          return;
18949
 
        }
18950
 
       else
18951
 
-       retarray->base_addr = xmalloc (alloc_size);
18952
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18953
 
 
18954
 
     }
18955
 
   else
18956
 
@@ -485,8 +483,7 @@
18957
 
       retarray->offset = 0;
18958
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18959
 
 
18960
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18961
 
-                  * extent[rank-1];
18962
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18963
 
 
18964
 
       if (alloc_size == 0)
18965
 
        {
18966
 
@@ -495,7 +492,7 @@
18967
 
          return;
18968
 
        }
18969
 
       else
18970
 
-       retarray->base_addr = xmalloc (alloc_size);
18971
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18972
 
     }
18973
 
   else
18974
 
     {
18975
 
Index: libgfortran/generated/minloc0_4_r10.c
18976
 
===================================================================
18977
 
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
18978
 
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
18979
 
@@ -58,7 +58,7 @@
18980
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18981
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18982
 
       retarray->offset = 0;
18983
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18984
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18985
 
     }
18986
 
   else
18987
 
     {
18988
 
@@ -199,7 +199,7 @@
18989
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18990
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18991
 
       retarray->offset = 0;
18992
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18993
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18994
 
     }
18995
 
   else
18996
 
     {
18997
 
@@ -367,7 +367,7 @@
18998
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18999
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19000
 
       retarray->offset = 0;
19001
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19002
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19003
 
     }
19004
 
   else if (unlikely (compile_options.bounds_check))
19005
 
     {
19006
 
Index: libgfortran/generated/minloc0_8_i16.c
19007
 
===================================================================
19008
 
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
19009
 
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
19010
 
@@ -58,7 +58,7 @@
19011
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19012
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19013
 
       retarray->offset = 0;
19014
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19015
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19016
 
     }
19017
 
   else
19018
 
     {
19019
 
@@ -199,7 +199,7 @@
19020
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19021
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19022
 
       retarray->offset = 0;
19023
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19024
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19025
 
     }
19026
 
   else
19027
 
     {
19028
 
@@ -367,7 +367,7 @@
19029
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19030
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19031
 
       retarray->offset = 0;
19032
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19033
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19034
 
     }
19035
 
   else if (unlikely (compile_options.bounds_check))
19036
 
     {
19037
 
Index: libgfortran/generated/minloc1_8_r10.c
19038
 
===================================================================
19039
 
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
19040
 
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
19041
 
@@ -98,10 +98,9 @@
19042
 
       retarray->offset = 0;
19043
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19044
 
 
19045
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19046
 
-                  * extent[rank-1];
19047
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19048
 
 
19049
 
-      retarray->base_addr = xmalloc (alloc_size);
19050
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19051
 
       if (alloc_size == 0)
19052
 
        {
19053
 
          /* Make sure we have a zero-sized array.  */
19054
 
@@ -294,8 +293,7 @@
19055
 
 
19056
 
        }
19057
 
 
19058
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19059
 
-                  * extent[rank-1];
19060
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19061
 
 
19062
 
       retarray->offset = 0;
19063
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19064
 
@@ -307,7 +305,7 @@
19065
 
          return;
19066
 
        }
19067
 
       else
19068
 
-       retarray->base_addr = xmalloc (alloc_size);
19069
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19070
 
 
19071
 
     }
19072
 
   else
19073
 
@@ -485,8 +483,7 @@
19074
 
       retarray->offset = 0;
19075
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19076
 
 
19077
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19078
 
-                  * extent[rank-1];
19079
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19080
 
 
19081
 
       if (alloc_size == 0)
19082
 
        {
19083
 
@@ -495,7 +492,7 @@
19084
 
          return;
19085
 
        }
19086
 
       else
19087
 
-       retarray->base_addr = xmalloc (alloc_size);
19088
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19089
 
     }
19090
 
   else
19091
 
     {
19092
 
Index: libgfortran/generated/minloc0_16_r4.c
19093
 
===================================================================
19094
 
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
19095
 
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
19096
 
@@ -58,7 +58,7 @@
19097
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19098
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19099
 
       retarray->offset = 0;
19100
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19101
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19102
 
     }
19103
 
   else
19104
 
     {
19105
 
@@ -199,7 +199,7 @@
19106
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19107
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19108
 
       retarray->offset = 0;
19109
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19110
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19111
 
     }
19112
 
   else
19113
 
     {
19114
 
@@ -367,7 +367,7 @@
19115
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19116
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19117
 
       retarray->offset = 0;
19118
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19119
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19120
 
     }
19121
 
   else if (unlikely (compile_options.bounds_check))
19122
 
     {
19123
 
Index: libgfortran/generated/product_i4.c
19124
 
===================================================================
19125
 
--- a/src/libgfortran/generated/product_i4.c    (.../tags/gcc_4_8_3_release)
19126
 
+++ b/src/libgfortran/generated/product_i4.c    (.../branches/gcc-4_8-branch)
19127
 
@@ -97,10 +97,9 @@
19128
 
       retarray->offset = 0;
19129
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19130
 
 
19131
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19132
 
-                  * extent[rank-1];
19133
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19134
 
 
19135
 
-      retarray->base_addr = xmalloc (alloc_size);
19136
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19137
 
       if (alloc_size == 0)
19138
 
        {
19139
 
          /* Make sure we have a zero-sized array.  */
19140
 
@@ -272,8 +271,7 @@
19141
 
 
19142
 
        }
19143
 
 
19144
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19145
 
-                  * extent[rank-1];
19146
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19147
 
 
19148
 
       retarray->offset = 0;
19149
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19150
 
@@ -285,7 +283,7 @@
19151
 
          return;
19152
 
        }
19153
 
       else
19154
 
-       retarray->base_addr = xmalloc (alloc_size);
19155
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19156
 
 
19157
 
     }
19158
 
   else
19159
 
@@ -430,8 +428,7 @@
19160
 
       retarray->offset = 0;
19161
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19162
 
 
19163
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19164
 
-                  * extent[rank-1];
19165
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19166
 
 
19167
 
       if (alloc_size == 0)
19168
 
        {
19169
 
@@ -440,7 +437,7 @@
19170
 
          return;
19171
 
        }
19172
 
       else
19173
 
-       retarray->base_addr = xmalloc (alloc_size);
19174
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19175
 
     }
19176
 
   else
19177
 
     {
19178
 
Index: libgfortran/generated/sum_c16.c
19179
 
===================================================================
19180
 
--- a/src/libgfortran/generated/sum_c16.c       (.../tags/gcc_4_8_3_release)
19181
 
+++ b/src/libgfortran/generated/sum_c16.c       (.../branches/gcc-4_8-branch)
19182
 
@@ -97,10 +97,9 @@
19183
 
       retarray->offset = 0;
19184
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19185
 
 
19186
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19187
 
-                  * extent[rank-1];
19188
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19189
 
 
19190
 
-      retarray->base_addr = xmalloc (alloc_size);
19191
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19192
 
       if (alloc_size == 0)
19193
 
        {
19194
 
          /* Make sure we have a zero-sized array.  */
19195
 
@@ -272,8 +271,7 @@
19196
 
 
19197
 
        }
19198
 
 
19199
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19200
 
-                  * extent[rank-1];
19201
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19202
 
 
19203
 
       retarray->offset = 0;
19204
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19205
 
@@ -285,7 +283,7 @@
19206
 
          return;
19207
 
        }
19208
 
       else
19209
 
-       retarray->base_addr = xmalloc (alloc_size);
19210
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19211
 
 
19212
 
     }
19213
 
   else
19214
 
@@ -430,8 +428,7 @@
19215
 
       retarray->offset = 0;
19216
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19217
 
 
19218
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19219
 
-                  * extent[rank-1];
19220
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19221
 
 
19222
 
       if (alloc_size == 0)
19223
 
        {
19224
 
@@ -440,7 +437,7 @@
19225
 
          return;
19226
 
        }
19227
 
       else
19228
 
-       retarray->base_addr = xmalloc (alloc_size);
19229
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19230
 
     }
19231
 
   else
19232
 
     {
19233
 
Index: libgfortran/generated/transpose_c10.c
19234
 
===================================================================
19235
 
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
19236
 
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
19237
 
@@ -60,7 +60,8 @@
19238
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19239
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
19240
 
 
19241
 
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
19242
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
19243
 
+                                     sizeof (GFC_COMPLEX_10));
19244
 
       ret->offset = 0;
19245
 
     } else if (unlikely (compile_options.bounds_check))
19246
 
     {
19247
 
Index: libgfortran/generated/maxloc1_16_r8.c
19248
 
===================================================================
19249
 
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
19250
 
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
19251
 
@@ -98,10 +98,9 @@
19252
 
       retarray->offset = 0;
19253
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19254
 
 
19255
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19256
 
-                  * extent[rank-1];
19257
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19258
 
 
19259
 
-      retarray->base_addr = xmalloc (alloc_size);
19260
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19261
 
       if (alloc_size == 0)
19262
 
        {
19263
 
          /* Make sure we have a zero-sized array.  */
19264
 
@@ -294,8 +293,7 @@
19265
 
 
19266
 
        }
19267
 
 
19268
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19269
 
-                  * extent[rank-1];
19270
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19271
 
 
19272
 
       retarray->offset = 0;
19273
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19274
 
@@ -307,7 +305,7 @@
19275
 
          return;
19276
 
        }
19277
 
       else
19278
 
-       retarray->base_addr = xmalloc (alloc_size);
19279
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19280
 
 
19281
 
     }
19282
 
   else
19283
 
@@ -485,8 +483,7 @@
19284
 
       retarray->offset = 0;
19285
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19286
 
 
19287
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19288
 
-                  * extent[rank-1];
19289
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19290
 
 
19291
 
       if (alloc_size == 0)
19292
 
        {
19293
 
@@ -495,7 +492,7 @@
19294
 
          return;
19295
 
        }
19296
 
       else
19297
 
-       retarray->base_addr = xmalloc (alloc_size);
19298
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19299
 
     }
19300
 
   else
19301
 
     {
19302
 
Index: libgfortran/generated/transpose_r4.c
19303
 
===================================================================
19304
 
--- a/src/libgfortran/generated/transpose_r4.c  (.../tags/gcc_4_8_3_release)
19305
 
+++ b/src/libgfortran/generated/transpose_r4.c  (.../branches/gcc-4_8-branch)
19306
 
@@ -60,7 +60,8 @@
19307
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19308
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
19309
 
 
19310
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
19311
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
19312
 
+                                     sizeof (GFC_REAL_4));
19313
 
       ret->offset = 0;
19314
 
     } else if (unlikely (compile_options.bounds_check))
19315
 
     {
19316
 
Index: libgfortran/generated/cshift1_4.c
19317
 
===================================================================
19318
 
--- a/src/libgfortran/generated/cshift1_4.c     (.../tags/gcc_4_8_3_release)
19319
 
+++ b/src/libgfortran/generated/cshift1_4.c     (.../branches/gcc-4_8-branch)
19320
 
@@ -80,7 +80,7 @@
19321
 
     {
19322
 
       int i;
19323
 
 
19324
 
-      ret->base_addr = xmalloc (size * arraysize);
19325
 
+      ret->base_addr = xmallocarray (arraysize, size);
19326
 
       ret->offset = 0;
19327
 
       ret->dtype = array->dtype;
19328
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
19329
 
Index: libgfortran/generated/maxloc0_8_i2.c
19330
 
===================================================================
19331
 
--- a/src/libgfortran/generated/maxloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
19332
 
+++ b/src/libgfortran/generated/maxloc0_8_i2.c  (.../branches/gcc-4_8-branch)
19333
 
@@ -58,7 +58,7 @@
19334
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19335
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19336
 
       retarray->offset = 0;
19337
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19338
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19339
 
     }
19340
 
   else
19341
 
     {
19342
 
@@ -199,7 +199,7 @@
19343
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19344
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19345
 
       retarray->offset = 0;
19346
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19347
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19348
 
     }
19349
 
   else
19350
 
     {
19351
 
@@ -367,7 +367,7 @@
19352
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19353
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19354
 
       retarray->offset = 0;
19355
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19356
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19357
 
     }
19358
 
   else if (unlikely (compile_options.bounds_check))
19359
 
     {
19360
 
Index: libgfortran/generated/count_8_l.c
19361
 
===================================================================
19362
 
--- a/src/libgfortran/generated/count_8_l.c     (.../tags/gcc_4_8_3_release)
19363
 
+++ b/src/libgfortran/generated/count_8_l.c     (.../branches/gcc-4_8-branch)
19364
 
@@ -101,8 +101,7 @@
19365
 
       retarray->offset = 0;
19366
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19367
 
 
19368
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19369
 
-                  * extent[rank-1];
19370
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19371
 
 
19372
 
       if (alloc_size == 0)
19373
 
        {
19374
 
@@ -111,7 +110,7 @@
19375
 
          return;
19376
 
        }
19377
 
       else
19378
 
-       retarray->base_addr = xmalloc (alloc_size);
19379
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19380
 
     }
19381
 
   else
19382
 
     {
19383
 
Index: libgfortran/generated/in_pack_i4.c
19384
 
===================================================================
19385
 
--- a/src/libgfortran/generated/in_pack_i4.c    (.../tags/gcc_4_8_3_release)
19386
 
+++ b/src/libgfortran/generated/in_pack_i4.c    (.../branches/gcc-4_8-branch)
19387
 
@@ -76,7 +76,7 @@
19388
 
     return source->base_addr;
19389
 
 
19390
 
   /* Allocate storage for the destination.  */
19391
 
-  destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
19392
 
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
19393
 
   dest = destptr;
19394
 
   src = source->base_addr;
19395
 
   stride0 = stride[0];
19396
 
Index: libgfortran/generated/minloc0_16_i2.c
19397
 
===================================================================
19398
 
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
19399
 
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
19400
 
@@ -58,7 +58,7 @@
19401
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19402
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19403
 
       retarray->offset = 0;
19404
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19405
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19406
 
     }
19407
 
   else
19408
 
     {
19409
 
@@ -199,7 +199,7 @@
19410
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19411
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19412
 
       retarray->offset = 0;
19413
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19414
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19415
 
     }
19416
 
   else
19417
 
     {
19418
 
@@ -367,7 +367,7 @@
19419
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19420
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19421
 
       retarray->offset = 0;
19422
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19423
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19424
 
     }
19425
 
   else if (unlikely (compile_options.bounds_check))
19426
 
     {
19427
 
Index: libgfortran/generated/minloc1_8_r8.c
19428
 
===================================================================
19429
 
--- a/src/libgfortran/generated/minloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
19430
 
+++ b/src/libgfortran/generated/minloc1_8_r8.c  (.../branches/gcc-4_8-branch)
19431
 
@@ -98,10 +98,9 @@
19432
 
       retarray->offset = 0;
19433
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19434
 
 
19435
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19436
 
-                  * extent[rank-1];
19437
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19438
 
 
19439
 
-      retarray->base_addr = xmalloc (alloc_size);
19440
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19441
 
       if (alloc_size == 0)
19442
 
        {
19443
 
          /* Make sure we have a zero-sized array.  */
19444
 
@@ -294,8 +293,7 @@
19445
 
 
19446
 
        }
19447
 
 
19448
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19449
 
-                  * extent[rank-1];
19450
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19451
 
 
19452
 
       retarray->offset = 0;
19453
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19454
 
@@ -307,7 +305,7 @@
19455
 
          return;
19456
 
        }
19457
 
       else
19458
 
-       retarray->base_addr = xmalloc (alloc_size);
19459
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19460
 
 
19461
 
     }
19462
 
   else
19463
 
@@ -485,8 +483,7 @@
19464
 
       retarray->offset = 0;
19465
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19466
 
 
19467
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19468
 
-                  * extent[rank-1];
19469
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19470
 
 
19471
 
       if (alloc_size == 0)
19472
 
        {
19473
 
@@ -495,7 +492,7 @@
19474
 
          return;
19475
 
        }
19476
 
       else
19477
 
-       retarray->base_addr = xmalloc (alloc_size);
19478
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19479
 
     }
19480
 
   else
19481
 
     {
19482
 
Index: libgfortran/generated/matmul_c16.c
19483
 
===================================================================
19484
 
--- a/src/libgfortran/generated/matmul_c16.c    (.../tags/gcc_4_8_3_release)
19485
 
+++ b/src/libgfortran/generated/matmul_c16.c    (.../branches/gcc-4_8-branch)
19486
 
@@ -124,7 +124,7 @@
19487
 
         }
19488
 
 
19489
 
       retarray->base_addr
19490
 
-       = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
19491
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
19492
 
       retarray->offset = 0;
19493
 
     }
19494
 
     else if (unlikely (compile_options.bounds_check))
19495
 
Index: libgfortran/generated/minval_i1.c
19496
 
===================================================================
19497
 
--- a/src/libgfortran/generated/minval_i1.c     (.../tags/gcc_4_8_3_release)
19498
 
+++ b/src/libgfortran/generated/minval_i1.c     (.../branches/gcc-4_8-branch)
19499
 
@@ -97,10 +97,9 @@
19500
 
       retarray->offset = 0;
19501
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19502
 
 
19503
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19504
 
-                  * extent[rank-1];
19505
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19506
 
 
19507
 
-      retarray->base_addr = xmalloc (alloc_size);
19508
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19509
 
       if (alloc_size == 0)
19510
 
        {
19511
 
          /* Make sure we have a zero-sized array.  */
19512
 
@@ -286,8 +285,7 @@
19513
 
 
19514
 
        }
19515
 
 
19516
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19517
 
-                  * extent[rank-1];
19518
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19519
 
 
19520
 
       retarray->offset = 0;
19521
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19522
 
@@ -299,7 +297,7 @@
19523
 
          return;
19524
 
        }
19525
 
       else
19526
 
-       retarray->base_addr = xmalloc (alloc_size);
19527
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19528
 
 
19529
 
     }
19530
 
   else
19531
 
@@ -472,8 +470,7 @@
19532
 
       retarray->offset = 0;
19533
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19534
 
 
19535
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19536
 
-                  * extent[rank-1];
19537
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19538
 
 
19539
 
       if (alloc_size == 0)
19540
 
        {
19541
 
@@ -482,7 +479,7 @@
19542
 
          return;
19543
 
        }
19544
 
       else
19545
 
-       retarray->base_addr = xmalloc (alloc_size);
19546
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19547
 
     }
19548
 
   else
19549
 
     {
19550
 
Index: libgfortran/generated/shape_i16.c
19551
 
===================================================================
19552
 
--- a/src/libgfortran/generated/shape_i16.c     (.../tags/gcc_4_8_3_release)
19553
 
+++ b/src/libgfortran/generated/shape_i16.c     (.../branches/gcc-4_8-branch)
19554
 
@@ -49,7 +49,7 @@
19555
 
     {
19556
 
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
19557
 
       ret->offset = 0;
19558
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19559
 
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19560
 
     }
19561
 
 
19562
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
19563
 
Index: libgfortran/generated/iany_i4.c
19564
 
===================================================================
19565
 
--- a/src/libgfortran/generated/iany_i4.c       (.../tags/gcc_4_8_3_release)
19566
 
+++ b/src/libgfortran/generated/iany_i4.c       (.../branches/gcc-4_8-branch)
19567
 
@@ -97,10 +97,9 @@
19568
 
       retarray->offset = 0;
19569
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19570
 
 
19571
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19572
 
-                  * extent[rank-1];
19573
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19574
 
 
19575
 
-      retarray->base_addr = xmalloc (alloc_size);
19576
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19577
 
       if (alloc_size == 0)
19578
 
        {
19579
 
          /* Make sure we have a zero-sized array.  */
19580
 
@@ -272,8 +271,7 @@
19581
 
 
19582
 
        }
19583
 
 
19584
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19585
 
-                  * extent[rank-1];
19586
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19587
 
 
19588
 
       retarray->offset = 0;
19589
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19590
 
@@ -285,7 +283,7 @@
19591
 
          return;
19592
 
        }
19593
 
       else
19594
 
-       retarray->base_addr = xmalloc (alloc_size);
19595
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19596
 
 
19597
 
     }
19598
 
   else
19599
 
@@ -430,8 +428,7 @@
19600
 
       retarray->offset = 0;
19601
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19602
 
 
19603
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19604
 
-                  * extent[rank-1];
19605
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19606
 
 
19607
 
       if (alloc_size == 0)
19608
 
        {
19609
 
@@ -440,7 +437,7 @@
19610
 
          return;
19611
 
        }
19612
 
       else
19613
 
-       retarray->base_addr = xmalloc (alloc_size);
19614
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19615
 
     }
19616
 
   else
19617
 
     {
19618
 
Index: libgfortran/generated/minloc0_16_r16.c
19619
 
===================================================================
19620
 
--- a/src/libgfortran/generated/minloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
19621
 
+++ b/src/libgfortran/generated/minloc0_16_r16.c        (.../branches/gcc-4_8-branch)
19622
 
@@ -58,7 +58,7 @@
19623
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19624
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19625
 
       retarray->offset = 0;
19626
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19627
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19628
 
     }
19629
 
   else
19630
 
     {
19631
 
@@ -199,7 +199,7 @@
19632
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19633
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19634
 
       retarray->offset = 0;
19635
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19636
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19637
 
     }
19638
 
   else
19639
 
     {
19640
 
@@ -367,7 +367,7 @@
19641
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19642
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19643
 
       retarray->offset = 0;
19644
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19645
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19646
 
     }
19647
 
   else if (unlikely (compile_options.bounds_check))
19648
 
     {
19649
 
Index: libgfortran/generated/product_i16.c
19650
 
===================================================================
19651
 
--- a/src/libgfortran/generated/product_i16.c   (.../tags/gcc_4_8_3_release)
19652
 
+++ b/src/libgfortran/generated/product_i16.c   (.../branches/gcc-4_8-branch)
19653
 
@@ -97,10 +97,9 @@
19654
 
       retarray->offset = 0;
19655
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19656
 
 
19657
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19658
 
-                  * extent[rank-1];
19659
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19660
 
 
19661
 
-      retarray->base_addr = xmalloc (alloc_size);
19662
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19663
 
       if (alloc_size == 0)
19664
 
        {
19665
 
          /* Make sure we have a zero-sized array.  */
19666
 
@@ -272,8 +271,7 @@
19667
 
 
19668
 
        }
19669
 
 
19670
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19671
 
-                  * extent[rank-1];
19672
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19673
 
 
19674
 
       retarray->offset = 0;
19675
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19676
 
@@ -285,7 +283,7 @@
19677
 
          return;
19678
 
        }
19679
 
       else
19680
 
-       retarray->base_addr = xmalloc (alloc_size);
19681
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19682
 
 
19683
 
     }
19684
 
   else
19685
 
@@ -430,8 +428,7 @@
19686
 
       retarray->offset = 0;
19687
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19688
 
 
19689
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19690
 
-                  * extent[rank-1];
19691
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19692
 
 
19693
 
       if (alloc_size == 0)
19694
 
        {
19695
 
@@ -440,7 +437,7 @@
19696
 
          return;
19697
 
        }
19698
 
       else
19699
 
-       retarray->base_addr = xmalloc (alloc_size);
19700
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19701
 
     }
19702
 
   else
19703
 
     {
19704
 
Index: libgfortran/generated/unpack_i1.c
19705
 
===================================================================
19706
 
--- a/src/libgfortran/generated/unpack_i1.c     (.../tags/gcc_4_8_3_release)
19707
 
+++ b/src/libgfortran/generated/unpack_i1.c     (.../branches/gcc-4_8-branch)
19708
 
@@ -99,7 +99,7 @@
19709
 
          rs *= extent[n];
19710
 
        }
19711
 
       ret->offset = 0;
19712
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
19713
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
19714
 
     }
19715
 
   else
19716
 
     {
19717
 
@@ -244,7 +244,7 @@
19718
 
          rs *= extent[n];
19719
 
        }
19720
 
       ret->offset = 0;
19721
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
19722
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
19723
 
     }
19724
 
   else
19725
 
     {
19726
 
Index: libgfortran/generated/minloc0_4_i4.c
19727
 
===================================================================
19728
 
--- a/src/libgfortran/generated/minloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
19729
 
+++ b/src/libgfortran/generated/minloc0_4_i4.c  (.../branches/gcc-4_8-branch)
19730
 
@@ -58,7 +58,7 @@
19731
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19732
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19733
 
       retarray->offset = 0;
19734
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19735
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19736
 
     }
19737
 
   else
19738
 
     {
19739
 
@@ -199,7 +199,7 @@
19740
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19741
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19742
 
       retarray->offset = 0;
19743
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19744
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19745
 
     }
19746
 
   else
19747
 
     {
19748
 
@@ -367,7 +367,7 @@
19749
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19750
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19751
 
       retarray->offset = 0;
19752
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19753
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19754
 
     }
19755
 
   else if (unlikely (compile_options.bounds_check))
19756
 
     {
19757
 
Index: libgfortran/generated/matmul_i1.c
19758
 
===================================================================
19759
 
--- a/src/libgfortran/generated/matmul_i1.c     (.../tags/gcc_4_8_3_release)
19760
 
+++ b/src/libgfortran/generated/matmul_i1.c     (.../branches/gcc-4_8-branch)
19761
 
@@ -124,7 +124,7 @@
19762
 
         }
19763
 
 
19764
 
       retarray->base_addr
19765
 
-       = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
19766
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
19767
 
       retarray->offset = 0;
19768
 
     }
19769
 
     else if (unlikely (compile_options.bounds_check))
19770
 
Index: libgfortran/generated/minval_r4.c
19771
 
===================================================================
19772
 
--- a/src/libgfortran/generated/minval_r4.c     (.../tags/gcc_4_8_3_release)
19773
 
+++ b/src/libgfortran/generated/minval_r4.c     (.../branches/gcc-4_8-branch)
19774
 
@@ -97,10 +97,9 @@
19775
 
       retarray->offset = 0;
19776
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19777
 
 
19778
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19779
 
-                  * extent[rank-1];
19780
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19781
 
 
19782
 
-      retarray->base_addr = xmalloc (alloc_size);
19783
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19784
 
       if (alloc_size == 0)
19785
 
        {
19786
 
          /* Make sure we have a zero-sized array.  */
19787
 
@@ -286,8 +285,7 @@
19788
 
 
19789
 
        }
19790
 
 
19791
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19792
 
-                  * extent[rank-1];
19793
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19794
 
 
19795
 
       retarray->offset = 0;
19796
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19797
 
@@ -299,7 +297,7 @@
19798
 
          return;
19799
 
        }
19800
 
       else
19801
 
-       retarray->base_addr = xmalloc (alloc_size);
19802
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19803
 
 
19804
 
     }
19805
 
   else
19806
 
@@ -472,8 +470,7 @@
19807
 
       retarray->offset = 0;
19808
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19809
 
 
19810
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19811
 
-                  * extent[rank-1];
19812
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19813
 
 
19814
 
       if (alloc_size == 0)
19815
 
        {
19816
 
@@ -482,7 +479,7 @@
19817
 
          return;
19818
 
        }
19819
 
       else
19820
 
-       retarray->base_addr = xmalloc (alloc_size);
19821
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19822
 
     }
19823
 
   else
19824
 
     {
19825
 
Index: libgfortran/generated/spread_i16.c
19826
 
===================================================================
19827
 
--- a/src/libgfortran/generated/spread_i16.c    (.../tags/gcc_4_8_3_release)
19828
 
+++ b/src/libgfortran/generated/spread_i16.c    (.../branches/gcc-4_8-branch)
19829
 
@@ -101,8 +101,8 @@
19830
 
        }
19831
 
       ret->offset = 0;
19832
 
 
19833
 
-      /* xmalloc allocates a single byte for zero size.  */
19834
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
19835
 
+      /* xmallocarray allocates a single byte for zero size.  */
19836
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
19837
 
       if (rs <= 0)
19838
 
         return;
19839
 
     }
19840
 
@@ -244,7 +244,7 @@
19841
 
 
19842
 
   if (ret->base_addr == NULL)
19843
 
     {
19844
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
19845
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
19846
 
       ret->offset = 0;
19847
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19848
 
     }
19849
 
Index: libgfortran/generated/sum_i4.c
19850
 
===================================================================
19851
 
--- a/src/libgfortran/generated/sum_i4.c        (.../tags/gcc_4_8_3_release)
19852
 
+++ b/src/libgfortran/generated/sum_i4.c        (.../branches/gcc-4_8-branch)
19853
 
@@ -97,10 +97,9 @@
19854
 
       retarray->offset = 0;
19855
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19856
 
 
19857
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19858
 
-                  * extent[rank-1];
19859
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19860
 
 
19861
 
-      retarray->base_addr = xmalloc (alloc_size);
19862
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19863
 
       if (alloc_size == 0)
19864
 
        {
19865
 
          /* Make sure we have a zero-sized array.  */
19866
 
@@ -272,8 +271,7 @@
19867
 
 
19868
 
        }
19869
 
 
19870
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19871
 
-                  * extent[rank-1];
19872
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19873
 
 
19874
 
       retarray->offset = 0;
19875
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19876
 
@@ -285,7 +283,7 @@
19877
 
          return;
19878
 
        }
19879
 
       else
19880
 
-       retarray->base_addr = xmalloc (alloc_size);
19881
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19882
 
 
19883
 
     }
19884
 
   else
19885
 
@@ -430,8 +428,7 @@
19886
 
       retarray->offset = 0;
19887
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19888
 
 
19889
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19890
 
-                  * extent[rank-1];
19891
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19892
 
 
19893
 
       if (alloc_size == 0)
19894
 
        {
19895
 
@@ -440,7 +437,7 @@
19896
 
          return;
19897
 
        }
19898
 
       else
19899
 
-       retarray->base_addr = xmalloc (alloc_size);
19900
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19901
 
     }
19902
 
   else
19903
 
     {
19904
 
Index: libgfortran/generated/unpack_r10.c
19905
 
===================================================================
19906
 
--- a/src/libgfortran/generated/unpack_r10.c    (.../tags/gcc_4_8_3_release)
19907
 
+++ b/src/libgfortran/generated/unpack_r10.c    (.../branches/gcc-4_8-branch)
19908
 
@@ -99,7 +99,7 @@
19909
 
          rs *= extent[n];
19910
 
        }
19911
 
       ret->offset = 0;
19912
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
19913
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
19914
 
     }
19915
 
   else
19916
 
     {
19917
 
@@ -244,7 +244,7 @@
19918
 
          rs *= extent[n];
19919
 
        }
19920
 
       ret->offset = 0;
19921
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
19922
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
19923
 
     }
19924
 
   else
19925
 
     {
19926
 
Index: libgfortran/generated/bessel_r16.c
19927
 
===================================================================
19928
 
--- a/src/libgfortran/generated/bessel_r16.c    (.../tags/gcc_4_8_3_release)
19929
 
+++ b/src/libgfortran/generated/bessel_r16.c    (.../branches/gcc-4_8-branch)
19930
 
@@ -59,7 +59,7 @@
19931
 
     {
19932
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
19933
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19934
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
19935
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
19936
 
       ret->offset = 0;
19937
 
     }
19938
 
 
19939
 
@@ -126,7 +126,7 @@
19940
 
     {
19941
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
19942
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19943
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
19944
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
19945
 
       ret->offset = 0;
19946
 
     }
19947
 
 
19948
 
@@ -166,7 +166,7 @@
19949
 
 
19950
 
   x2rev = GFC_REAL_16_LITERAL(2.)/x;
19951
 
 
19952
 
-  for (i = 2; i <= n1+n2; i++)
19953
 
+  for (i = 2; i <= n2 - n1; i++)
19954
 
     {
19955
 
 #if defined(GFC_REAL_16_INFINITY)
19956
 
       if (unlikely (last2 == -GFC_REAL_16_INFINITY))
19957
 
Index: libgfortran/generated/norm2_r8.c
19958
 
===================================================================
19959
 
--- a/src/libgfortran/generated/norm2_r8.c      (.../tags/gcc_4_8_3_release)
19960
 
+++ b/src/libgfortran/generated/norm2_r8.c      (.../branches/gcc-4_8-branch)
19961
 
@@ -101,10 +101,9 @@
19962
 
       retarray->offset = 0;
19963
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19964
 
 
19965
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19966
 
-                  * extent[rank-1];
19967
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19968
 
 
19969
 
-      retarray->base_addr = xmalloc (alloc_size);
19970
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19971
 
       if (alloc_size == 0)
19972
 
        {
19973
 
          /* Make sure we have a zero-sized array.  */
19974
 
Index: libgfortran/generated/spread_i4.c
19975
 
===================================================================
19976
 
--- a/src/libgfortran/generated/spread_i4.c     (.../tags/gcc_4_8_3_release)
19977
 
+++ b/src/libgfortran/generated/spread_i4.c     (.../branches/gcc-4_8-branch)
19978
 
@@ -101,8 +101,8 @@
19979
 
        }
19980
 
       ret->offset = 0;
19981
 
 
19982
 
-      /* xmalloc allocates a single byte for zero size.  */
19983
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
19984
 
+      /* xmallocarray allocates a single byte for zero size.  */
19985
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
19986
 
       if (rs <= 0)
19987
 
         return;
19988
 
     }
19989
 
@@ -244,7 +244,7 @@
19990
 
 
19991
 
   if (ret->base_addr == NULL)
19992
 
     {
19993
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
19994
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
19995
 
       ret->offset = 0;
19996
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19997
 
     }
19998
 
Index: libgfortran/generated/eoshift3_8.c
19999
 
===================================================================
20000
 
--- a/src/libgfortran/generated/eoshift3_8.c    (.../tags/gcc_4_8_3_release)
20001
 
+++ b/src/libgfortran/generated/eoshift3_8.c    (.../branches/gcc-4_8-branch)
20002
 
@@ -89,7 +89,7 @@
20003
 
     {
20004
 
       int i;
20005
 
 
20006
 
-      ret->base_addr = xmalloc (size * arraysize);
20007
 
+      ret->base_addr = xmallocarray (arraysize, size);
20008
 
       ret->offset = 0;
20009
 
       ret->dtype = array->dtype;
20010
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
20011
 
@@ -107,8 +107,8 @@
20012
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
20013
 
 
20014
 
         }
20015
 
-      /* xmalloc allocates a single byte for zero size.  */
20016
 
-      ret->base_addr = xmalloc (size * arraysize);
20017
 
+      /* xmallocarray allocates a single byte for zero size.  */
20018
 
+      ret->base_addr = xmallocarray (arraysize, size);
20019
 
 
20020
 
     }
20021
 
   else if (unlikely (compile_options.bounds_check))
20022
 
Index: libgfortran/generated/minloc1_4_i1.c
20023
 
===================================================================
20024
 
--- a/src/libgfortran/generated/minloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
20025
 
+++ b/src/libgfortran/generated/minloc1_4_i1.c  (.../branches/gcc-4_8-branch)
20026
 
@@ -98,10 +98,9 @@
20027
 
       retarray->offset = 0;
20028
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20029
 
 
20030
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20031
 
-                  * extent[rank-1];
20032
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20033
 
 
20034
 
-      retarray->base_addr = xmalloc (alloc_size);
20035
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20036
 
       if (alloc_size == 0)
20037
 
        {
20038
 
          /* Make sure we have a zero-sized array.  */
20039
 
@@ -294,8 +293,7 @@
20040
 
 
20041
 
        }
20042
 
 
20043
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20044
 
-                  * extent[rank-1];
20045
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20046
 
 
20047
 
       retarray->offset = 0;
20048
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20049
 
@@ -307,7 +305,7 @@
20050
 
          return;
20051
 
        }
20052
 
       else
20053
 
-       retarray->base_addr = xmalloc (alloc_size);
20054
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20055
 
 
20056
 
     }
20057
 
   else
20058
 
@@ -485,8 +483,7 @@
20059
 
       retarray->offset = 0;
20060
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20061
 
 
20062
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20063
 
-                  * extent[rank-1];
20064
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20065
 
 
20066
 
       if (alloc_size == 0)
20067
 
        {
20068
 
@@ -495,7 +492,7 @@
20069
 
          return;
20070
 
        }
20071
 
       else
20072
 
-       retarray->base_addr = xmalloc (alloc_size);
20073
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20074
 
     }
20075
 
   else
20076
 
     {
20077
 
Index: libgfortran/generated/minval_i2.c
20078
 
===================================================================
20079
 
--- a/src/libgfortran/generated/minval_i2.c     (.../tags/gcc_4_8_3_release)
20080
 
+++ b/src/libgfortran/generated/minval_i2.c     (.../branches/gcc-4_8-branch)
20081
 
@@ -97,10 +97,9 @@
20082
 
       retarray->offset = 0;
20083
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20084
 
 
20085
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20086
 
-                  * extent[rank-1];
20087
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20088
 
 
20089
 
-      retarray->base_addr = xmalloc (alloc_size);
20090
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20091
 
       if (alloc_size == 0)
20092
 
        {
20093
 
          /* Make sure we have a zero-sized array.  */
20094
 
@@ -286,8 +285,7 @@
20095
 
 
20096
 
        }
20097
 
 
20098
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20099
 
-                  * extent[rank-1];
20100
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20101
 
 
20102
 
       retarray->offset = 0;
20103
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20104
 
@@ -299,7 +297,7 @@
20105
 
          return;
20106
 
        }
20107
 
       else
20108
 
-       retarray->base_addr = xmalloc (alloc_size);
20109
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20110
 
 
20111
 
     }
20112
 
   else
20113
 
@@ -472,8 +470,7 @@
20114
 
       retarray->offset = 0;
20115
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20116
 
 
20117
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20118
 
-                  * extent[rank-1];
20119
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20120
 
 
20121
 
       if (alloc_size == 0)
20122
 
        {
20123
 
@@ -482,7 +479,7 @@
20124
 
          return;
20125
 
        }
20126
 
       else
20127
 
-       retarray->base_addr = xmalloc (alloc_size);
20128
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20129
 
     }
20130
 
   else
20131
 
     {
20132
 
Index: libgfortran/generated/bessel_r8.c
20133
 
===================================================================
20134
 
--- a/src/libgfortran/generated/bessel_r8.c     (.../tags/gcc_4_8_3_release)
20135
 
+++ b/src/libgfortran/generated/bessel_r8.c     (.../branches/gcc-4_8-branch)
20136
 
@@ -55,7 +55,7 @@
20137
 
     {
20138
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
20139
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20140
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
20141
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
20142
 
       ret->offset = 0;
20143
 
     }
20144
 
 
20145
 
@@ -122,7 +122,7 @@
20146
 
     {
20147
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
20148
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20149
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
20150
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
20151
 
       ret->offset = 0;
20152
 
     }
20153
 
 
20154
 
@@ -162,7 +162,7 @@
20155
 
 
20156
 
   x2rev = GFC_REAL_8_LITERAL(2.)/x;
20157
 
 
20158
 
-  for (i = 2; i <= n1+n2; i++)
20159
 
+  for (i = 2; i <= n2 - n1; i++)
20160
 
     {
20161
 
 #if defined(GFC_REAL_8_INFINITY)
20162
 
       if (unlikely (last2 == -GFC_REAL_8_INFINITY))
20163
 
Index: libgfortran/generated/unpack_r4.c
20164
 
===================================================================
20165
 
--- a/src/libgfortran/generated/unpack_r4.c     (.../tags/gcc_4_8_3_release)
20166
 
+++ b/src/libgfortran/generated/unpack_r4.c     (.../branches/gcc-4_8-branch)
20167
 
@@ -99,7 +99,7 @@
20168
 
          rs *= extent[n];
20169
 
        }
20170
 
       ret->offset = 0;
20171
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
20172
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
20173
 
     }
20174
 
   else
20175
 
     {
20176
 
@@ -244,7 +244,7 @@
20177
 
          rs *= extent[n];
20178
 
        }
20179
 
       ret->offset = 0;
20180
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
20181
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
20182
 
     }
20183
 
   else
20184
 
     {
20185
 
Index: libgfortran/generated/product_r8.c
20186
 
===================================================================
20187
 
--- a/src/libgfortran/generated/product_r8.c    (.../tags/gcc_4_8_3_release)
20188
 
+++ b/src/libgfortran/generated/product_r8.c    (.../branches/gcc-4_8-branch)
20189
 
@@ -97,10 +97,9 @@
20190
 
       retarray->offset = 0;
20191
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20192
 
 
20193
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20194
 
-                  * extent[rank-1];
20195
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20196
 
 
20197
 
-      retarray->base_addr = xmalloc (alloc_size);
20198
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20199
 
       if (alloc_size == 0)
20200
 
        {
20201
 
          /* Make sure we have a zero-sized array.  */
20202
 
@@ -272,8 +271,7 @@
20203
 
 
20204
 
        }
20205
 
 
20206
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20207
 
-                  * extent[rank-1];
20208
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20209
 
 
20210
 
       retarray->offset = 0;
20211
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20212
 
@@ -285,7 +283,7 @@
20213
 
          return;
20214
 
        }
20215
 
       else
20216
 
-       retarray->base_addr = xmalloc (alloc_size);
20217
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20218
 
 
20219
 
     }
20220
 
   else
20221
 
@@ -430,8 +428,7 @@
20222
 
       retarray->offset = 0;
20223
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20224
 
 
20225
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20226
 
-                  * extent[rank-1];
20227
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20228
 
 
20229
 
       if (alloc_size == 0)
20230
 
        {
20231
 
@@ -440,7 +437,7 @@
20232
 
          return;
20233
 
        }
20234
 
       else
20235
 
-       retarray->base_addr = xmalloc (alloc_size);
20236
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20237
 
     }
20238
 
   else
20239
 
     {
20240
 
Index: libgfortran/generated/matmul_r4.c
20241
 
===================================================================
20242
 
--- a/src/libgfortran/generated/matmul_r4.c     (.../tags/gcc_4_8_3_release)
20243
 
+++ b/src/libgfortran/generated/matmul_r4.c     (.../branches/gcc-4_8-branch)
20244
 
@@ -124,7 +124,7 @@
20245
 
         }
20246
 
 
20247
 
       retarray->base_addr
20248
 
-       = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
20249
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
20250
 
       retarray->offset = 0;
20251
 
     }
20252
 
     else if (unlikely (compile_options.bounds_check))
20253
 
Index: libgfortran/generated/unpack_i2.c
20254
 
===================================================================
20255
 
--- a/src/libgfortran/generated/unpack_i2.c     (.../tags/gcc_4_8_3_release)
20256
 
+++ b/src/libgfortran/generated/unpack_i2.c     (.../branches/gcc-4_8-branch)
20257
 
@@ -99,7 +99,7 @@
20258
 
          rs *= extent[n];
20259
 
        }
20260
 
       ret->offset = 0;
20261
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
20262
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
20263
 
     }
20264
 
   else
20265
 
     {
20266
 
@@ -244,7 +244,7 @@
20267
 
          rs *= extent[n];
20268
 
        }
20269
 
       ret->offset = 0;
20270
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
20271
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
20272
 
     }
20273
 
   else
20274
 
     {
20275
 
Index: libgfortran/generated/in_pack_r8.c
20276
 
===================================================================
20277
 
--- a/src/libgfortran/generated/in_pack_r8.c    (.../tags/gcc_4_8_3_release)
20278
 
+++ b/src/libgfortran/generated/in_pack_r8.c    (.../branches/gcc-4_8-branch)
20279
 
@@ -76,7 +76,7 @@
20280
 
     return source->base_addr;
20281
 
 
20282
 
   /* Allocate storage for the destination.  */
20283
 
-  destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
20284
 
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
20285
 
   dest = destptr;
20286
 
   src = source->base_addr;
20287
 
   stride0 = stride[0];
20288
 
Index: libgfortran/generated/maxloc1_4_r16.c
20289
 
===================================================================
20290
 
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
20291
 
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
20292
 
@@ -98,10 +98,9 @@
20293
 
       retarray->offset = 0;
20294
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20295
 
 
20296
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20297
 
-                  * extent[rank-1];
20298
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20299
 
 
20300
 
-      retarray->base_addr = xmalloc (alloc_size);
20301
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20302
 
       if (alloc_size == 0)
20303
 
        {
20304
 
          /* Make sure we have a zero-sized array.  */
20305
 
@@ -294,8 +293,7 @@
20306
 
 
20307
 
        }
20308
 
 
20309
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20310
 
-                  * extent[rank-1];
20311
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20312
 
 
20313
 
       retarray->offset = 0;
20314
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20315
 
@@ -307,7 +305,7 @@
20316
 
          return;
20317
 
        }
20318
 
       else
20319
 
-       retarray->base_addr = xmalloc (alloc_size);
20320
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20321
 
 
20322
 
     }
20323
 
   else
20324
 
@@ -485,8 +483,7 @@
20325
 
       retarray->offset = 0;
20326
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20327
 
 
20328
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20329
 
-                  * extent[rank-1];
20330
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20331
 
 
20332
 
       if (alloc_size == 0)
20333
 
        {
20334
 
@@ -495,7 +492,7 @@
20335
 
          return;
20336
 
        }
20337
 
       else
20338
 
-       retarray->base_addr = xmalloc (alloc_size);
20339
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20340
 
     }
20341
 
   else
20342
 
     {
20343
 
Index: libgfortran/generated/minloc0_8_r16.c
20344
 
===================================================================
20345
 
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
20346
 
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
20347
 
@@ -58,7 +58,7 @@
20348
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20349
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20350
 
       retarray->offset = 0;
20351
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20352
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20353
 
     }
20354
 
   else
20355
 
     {
20356
 
@@ -199,7 +199,7 @@
20357
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20358
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20359
 
       retarray->offset = 0;
20360
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20361
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20362
 
     }
20363
 
   else
20364
 
     {
20365
 
@@ -367,7 +367,7 @@
20366
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20367
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20368
 
       retarray->offset = 0;
20369
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20370
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20371
 
     }
20372
 
   else if (unlikely (compile_options.bounds_check))
20373
 
     {
20374
 
Index: libgfortran/generated/reshape_c8.c
20375
 
===================================================================
20376
 
--- a/src/libgfortran/generated/reshape_c8.c    (.../tags/gcc_4_8_3_release)
20377
 
+++ b/src/libgfortran/generated/reshape_c8.c    (.../branches/gcc-4_8-branch)
20378
 
@@ -111,11 +111,11 @@
20379
 
       ret->offset = 0;
20380
 
 
20381
 
       if (unlikely (rs < 1))
20382
 
-        alloc_size = 1;
20383
 
+        alloc_size = 0;
20384
 
       else
20385
 
-        alloc_size = rs * sizeof (GFC_COMPLEX_8);
20386
 
+        alloc_size = rs;
20387
 
 
20388
 
-      ret->base_addr = xmalloc (alloc_size);
20389
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
20390
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20391
 
     }
20392
 
 
20393
 
Index: libgfortran/generated/iparity_i8.c
20394
 
===================================================================
20395
 
--- a/src/libgfortran/generated/iparity_i8.c    (.../tags/gcc_4_8_3_release)
20396
 
+++ b/src/libgfortran/generated/iparity_i8.c    (.../branches/gcc-4_8-branch)
20397
 
@@ -97,10 +97,9 @@
20398
 
       retarray->offset = 0;
20399
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20400
 
 
20401
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20402
 
-                  * extent[rank-1];
20403
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20404
 
 
20405
 
-      retarray->base_addr = xmalloc (alloc_size);
20406
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20407
 
       if (alloc_size == 0)
20408
 
        {
20409
 
          /* Make sure we have a zero-sized array.  */
20410
 
@@ -272,8 +271,7 @@
20411
 
 
20412
 
        }
20413
 
 
20414
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20415
 
-                  * extent[rank-1];
20416
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20417
 
 
20418
 
       retarray->offset = 0;
20419
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20420
 
@@ -285,7 +283,7 @@
20421
 
          return;
20422
 
        }
20423
 
       else
20424
 
-       retarray->base_addr = xmalloc (alloc_size);
20425
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20426
 
 
20427
 
     }
20428
 
   else
20429
 
@@ -430,8 +428,7 @@
20430
 
       retarray->offset = 0;
20431
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20432
 
 
20433
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20434
 
-                  * extent[rank-1];
20435
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20436
 
 
20437
 
       if (alloc_size == 0)
20438
 
        {
20439
 
@@ -440,7 +437,7 @@
20440
 
          return;
20441
 
        }
20442
 
       else
20443
 
-       retarray->base_addr = xmalloc (alloc_size);
20444
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20445
 
     }
20446
 
   else
20447
 
     {
20448
 
Index: libgfortran/generated/count_1_l.c
20449
 
===================================================================
20450
 
--- a/src/libgfortran/generated/count_1_l.c     (.../tags/gcc_4_8_3_release)
20451
 
+++ b/src/libgfortran/generated/count_1_l.c     (.../branches/gcc-4_8-branch)
20452
 
@@ -101,8 +101,7 @@
20453
 
       retarray->offset = 0;
20454
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20455
 
 
20456
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20457
 
-                  * extent[rank-1];
20458
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20459
 
 
20460
 
       if (alloc_size == 0)
20461
 
        {
20462
 
@@ -111,7 +110,7 @@
20463
 
          return;
20464
 
        }
20465
 
       else
20466
 
-       retarray->base_addr = xmalloc (alloc_size);
20467
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20468
 
     }
20469
 
   else
20470
 
     {
20471
 
Index: libgfortran/generated/maxloc0_8_i4.c
20472
 
===================================================================
20473
 
--- a/src/libgfortran/generated/maxloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
20474
 
+++ b/src/libgfortran/generated/maxloc0_8_i4.c  (.../branches/gcc-4_8-branch)
20475
 
@@ -58,7 +58,7 @@
20476
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20477
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20478
 
       retarray->offset = 0;
20479
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20480
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20481
 
     }
20482
 
   else
20483
 
     {
20484
 
@@ -199,7 +199,7 @@
20485
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20486
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20487
 
       retarray->offset = 0;
20488
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20489
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20490
 
     }
20491
 
   else
20492
 
     {
20493
 
@@ -367,7 +367,7 @@
20494
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20495
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20496
 
       retarray->offset = 0;
20497
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20498
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20499
 
     }
20500
 
   else if (unlikely (compile_options.bounds_check))
20501
 
     {
20502
 
Index: libgfortran/generated/matmul_i2.c
20503
 
===================================================================
20504
 
--- a/src/libgfortran/generated/matmul_i2.c     (.../tags/gcc_4_8_3_release)
20505
 
+++ b/src/libgfortran/generated/matmul_i2.c     (.../branches/gcc-4_8-branch)
20506
 
@@ -124,7 +124,7 @@
20507
 
         }
20508
 
 
20509
 
       retarray->base_addr
20510
 
-       = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
20511
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
20512
 
       retarray->offset = 0;
20513
 
     }
20514
 
     else if (unlikely (compile_options.bounds_check))
20515
 
Index: libgfortran/generated/minloc1_4_r4.c
20516
 
===================================================================
20517
 
--- a/src/libgfortran/generated/minloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
20518
 
+++ b/src/libgfortran/generated/minloc1_4_r4.c  (.../branches/gcc-4_8-branch)
20519
 
@@ -98,10 +98,9 @@
20520
 
       retarray->offset = 0;
20521
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20522
 
 
20523
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20524
 
-                  * extent[rank-1];
20525
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20526
 
 
20527
 
-      retarray->base_addr = xmalloc (alloc_size);
20528
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20529
 
       if (alloc_size == 0)
20530
 
        {
20531
 
          /* Make sure we have a zero-sized array.  */
20532
 
@@ -294,8 +293,7 @@
20533
 
 
20534
 
        }
20535
 
 
20536
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20537
 
-                  * extent[rank-1];
20538
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20539
 
 
20540
 
       retarray->offset = 0;
20541
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20542
 
@@ -307,7 +305,7 @@
20543
 
          return;
20544
 
        }
20545
 
       else
20546
 
-       retarray->base_addr = xmalloc (alloc_size);
20547
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20548
 
 
20549
 
     }
20550
 
   else
20551
 
@@ -485,8 +483,7 @@
20552
 
       retarray->offset = 0;
20553
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20554
 
 
20555
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20556
 
-                  * extent[rank-1];
20557
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20558
 
 
20559
 
       if (alloc_size == 0)
20560
 
        {
20561
 
@@ -495,7 +492,7 @@
20562
 
          return;
20563
 
        }
20564
 
       else
20565
 
-       retarray->base_addr = xmalloc (alloc_size);
20566
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20567
 
     }
20568
 
   else
20569
 
     {
20570
 
Index: libgfortran/generated/transpose_i16.c
20571
 
===================================================================
20572
 
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
20573
 
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
20574
 
@@ -60,7 +60,8 @@
20575
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20576
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
20577
 
 
20578
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
20579
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
20580
 
+                                     sizeof (GFC_INTEGER_16));
20581
 
       ret->offset = 0;
20582
 
     } else if (unlikely (compile_options.bounds_check))
20583
 
     {
20584
 
Index: libgfortran/generated/minloc0_16_i4.c
20585
 
===================================================================
20586
 
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
20587
 
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
20588
 
@@ -58,7 +58,7 @@
20589
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20590
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20591
 
       retarray->offset = 0;
20592
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20593
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20594
 
     }
20595
 
   else
20596
 
     {
20597
 
@@ -199,7 +199,7 @@
20598
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20599
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20600
 
       retarray->offset = 0;
20601
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20602
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20603
 
     }
20604
 
   else
20605
 
     {
20606
 
@@ -367,7 +367,7 @@
20607
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20608
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20609
 
       retarray->offset = 0;
20610
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20611
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20612
 
     }
20613
 
   else if (unlikely (compile_options.bounds_check))
20614
 
     {
20615
 
Index: libgfortran/generated/transpose_i4.c
20616
 
===================================================================
20617
 
--- a/src/libgfortran/generated/transpose_i4.c  (.../tags/gcc_4_8_3_release)
20618
 
+++ b/src/libgfortran/generated/transpose_i4.c  (.../branches/gcc-4_8-branch)
20619
 
@@ -60,7 +60,8 @@
20620
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20621
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
20622
 
 
20623
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
20624
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
20625
 
+                                     sizeof (GFC_INTEGER_4));
20626
 
       ret->offset = 0;
20627
 
     } else if (unlikely (compile_options.bounds_check))
20628
 
     {
20629
 
Index: libgfortran/generated/maxloc1_16_i8.c
20630
 
===================================================================
20631
 
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
20632
 
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
20633
 
@@ -98,10 +98,9 @@
20634
 
       retarray->offset = 0;
20635
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20636
 
 
20637
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20638
 
-                  * extent[rank-1];
20639
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20640
 
 
20641
 
-      retarray->base_addr = xmalloc (alloc_size);
20642
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20643
 
       if (alloc_size == 0)
20644
 
        {
20645
 
          /* Make sure we have a zero-sized array.  */
20646
 
@@ -294,8 +293,7 @@
20647
 
 
20648
 
        }
20649
 
 
20650
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20651
 
-                  * extent[rank-1];
20652
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20653
 
 
20654
 
       retarray->offset = 0;
20655
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20656
 
@@ -307,7 +305,7 @@
20657
 
          return;
20658
 
        }
20659
 
       else
20660
 
-       retarray->base_addr = xmalloc (alloc_size);
20661
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20662
 
 
20663
 
     }
20664
 
   else
20665
 
@@ -485,8 +483,7 @@
20666
 
       retarray->offset = 0;
20667
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20668
 
 
20669
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20670
 
-                  * extent[rank-1];
20671
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20672
 
 
20673
 
       if (alloc_size == 0)
20674
 
        {
20675
 
@@ -495,7 +492,7 @@
20676
 
          return;
20677
 
        }
20678
 
       else
20679
 
-       retarray->base_addr = xmalloc (alloc_size);
20680
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20681
 
     }
20682
 
   else
20683
 
     {
20684
 
Index: libgfortran/generated/minloc1_4_i2.c
20685
 
===================================================================
20686
 
--- a/src/libgfortran/generated/minloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
20687
 
+++ b/src/libgfortran/generated/minloc1_4_i2.c  (.../branches/gcc-4_8-branch)
20688
 
@@ -98,10 +98,9 @@
20689
 
       retarray->offset = 0;
20690
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20691
 
 
20692
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20693
 
-                  * extent[rank-1];
20694
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20695
 
 
20696
 
-      retarray->base_addr = xmalloc (alloc_size);
20697
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20698
 
       if (alloc_size == 0)
20699
 
        {
20700
 
          /* Make sure we have a zero-sized array.  */
20701
 
@@ -294,8 +293,7 @@
20702
 
 
20703
 
        }
20704
 
 
20705
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20706
 
-                  * extent[rank-1];
20707
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20708
 
 
20709
 
       retarray->offset = 0;
20710
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20711
 
@@ -307,7 +305,7 @@
20712
 
          return;
20713
 
        }
20714
 
       else
20715
 
-       retarray->base_addr = xmalloc (alloc_size);
20716
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20717
 
 
20718
 
     }
20719
 
   else
20720
 
@@ -485,8 +483,7 @@
20721
 
       retarray->offset = 0;
20722
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20723
 
 
20724
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20725
 
-                  * extent[rank-1];
20726
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20727
 
 
20728
 
       if (alloc_size == 0)
20729
 
        {
20730
 
@@ -495,7 +492,7 @@
20731
 
          return;
20732
 
        }
20733
 
       else
20734
 
-       retarray->base_addr = xmalloc (alloc_size);
20735
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20736
 
     }
20737
 
   else
20738
 
     {
20739
 
Index: libgfortran/generated/matmul_l16.c
20740
 
===================================================================
20741
 
--- a/src/libgfortran/generated/matmul_l16.c    (.../tags/gcc_4_8_3_release)
20742
 
+++ b/src/libgfortran/generated/matmul_l16.c    (.../branches/gcc-4_8-branch)
20743
 
@@ -88,7 +88,7 @@
20744
 
         }
20745
 
           
20746
 
       retarray->base_addr
20747
 
-       = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
20748
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
20749
 
       retarray->offset = 0;
20750
 
     }
20751
 
     else if (unlikely (compile_options.bounds_check))
20752
 
Index: libgfortran/generated/maxloc1_8_i1.c
20753
 
===================================================================
20754
 
--- a/src/libgfortran/generated/maxloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
20755
 
+++ b/src/libgfortran/generated/maxloc1_8_i1.c  (.../branches/gcc-4_8-branch)
20756
 
@@ -98,10 +98,9 @@
20757
 
       retarray->offset = 0;
20758
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20759
 
 
20760
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20761
 
-                  * extent[rank-1];
20762
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20763
 
 
20764
 
-      retarray->base_addr = xmalloc (alloc_size);
20765
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20766
 
       if (alloc_size == 0)
20767
 
        {
20768
 
          /* Make sure we have a zero-sized array.  */
20769
 
@@ -294,8 +293,7 @@
20770
 
 
20771
 
        }
20772
 
 
20773
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20774
 
-                  * extent[rank-1];
20775
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20776
 
 
20777
 
       retarray->offset = 0;
20778
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20779
 
@@ -307,7 +305,7 @@
20780
 
          return;
20781
 
        }
20782
 
       else
20783
 
-       retarray->base_addr = xmalloc (alloc_size);
20784
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20785
 
 
20786
 
     }
20787
 
   else
20788
 
@@ -485,8 +483,7 @@
20789
 
       retarray->offset = 0;
20790
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20791
 
 
20792
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20793
 
-                  * extent[rank-1];
20794
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20795
 
 
20796
 
       if (alloc_size == 0)
20797
 
        {
20798
 
@@ -495,7 +492,7 @@
20799
 
          return;
20800
 
        }
20801
 
       else
20802
 
-       retarray->base_addr = xmalloc (alloc_size);
20803
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20804
 
     }
20805
 
   else
20806
 
     {
20807
 
Index: libgfortran/generated/minloc1_8_i8.c
20808
 
===================================================================
20809
 
--- a/src/libgfortran/generated/minloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
20810
 
+++ b/src/libgfortran/generated/minloc1_8_i8.c  (.../branches/gcc-4_8-branch)
20811
 
@@ -98,10 +98,9 @@
20812
 
       retarray->offset = 0;
20813
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20814
 
 
20815
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20816
 
-                  * extent[rank-1];
20817
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20818
 
 
20819
 
-      retarray->base_addr = xmalloc (alloc_size);
20820
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20821
 
       if (alloc_size == 0)
20822
 
        {
20823
 
          /* Make sure we have a zero-sized array.  */
20824
 
@@ -294,8 +293,7 @@
20825
 
 
20826
 
        }
20827
 
 
20828
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20829
 
-                  * extent[rank-1];
20830
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20831
 
 
20832
 
       retarray->offset = 0;
20833
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20834
 
@@ -307,7 +305,7 @@
20835
 
          return;
20836
 
        }
20837
 
       else
20838
 
-       retarray->base_addr = xmalloc (alloc_size);
20839
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20840
 
 
20841
 
     }
20842
 
   else
20843
 
@@ -485,8 +483,7 @@
20844
 
       retarray->offset = 0;
20845
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20846
 
 
20847
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20848
 
-                  * extent[rank-1];
20849
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20850
 
 
20851
 
       if (alloc_size == 0)
20852
 
        {
20853
 
@@ -495,7 +492,7 @@
20854
 
          return;
20855
 
        }
20856
 
       else
20857
 
-       retarray->base_addr = xmalloc (alloc_size);
20858
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20859
 
     }
20860
 
   else
20861
 
     {
20862
 
Index: libgfortran/generated/minloc0_4_r8.c
20863
 
===================================================================
20864
 
--- a/src/libgfortran/generated/minloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
20865
 
+++ b/src/libgfortran/generated/minloc0_4_r8.c  (.../branches/gcc-4_8-branch)
20866
 
@@ -58,7 +58,7 @@
20867
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20868
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20869
 
       retarray->offset = 0;
20870
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20871
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20872
 
     }
20873
 
   else
20874
 
     {
20875
 
@@ -199,7 +199,7 @@
20876
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20877
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20878
 
       retarray->offset = 0;
20879
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20880
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20881
 
     }
20882
 
   else
20883
 
     {
20884
 
@@ -367,7 +367,7 @@
20885
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20886
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20887
 
       retarray->offset = 0;
20888
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20889
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20890
 
     }
20891
 
   else if (unlikely (compile_options.bounds_check))
20892
 
     {
20893
 
Index: libgfortran/generated/product_r16.c
20894
 
===================================================================
20895
 
--- a/src/libgfortran/generated/product_r16.c   (.../tags/gcc_4_8_3_release)
20896
 
+++ b/src/libgfortran/generated/product_r16.c   (.../branches/gcc-4_8-branch)
20897
 
@@ -97,10 +97,9 @@
20898
 
       retarray->offset = 0;
20899
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20900
 
 
20901
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20902
 
-                  * extent[rank-1];
20903
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20904
 
 
20905
 
-      retarray->base_addr = xmalloc (alloc_size);
20906
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20907
 
       if (alloc_size == 0)
20908
 
        {
20909
 
          /* Make sure we have a zero-sized array.  */
20910
 
@@ -272,8 +271,7 @@
20911
 
 
20912
 
        }
20913
 
 
20914
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20915
 
-                  * extent[rank-1];
20916
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20917
 
 
20918
 
       retarray->offset = 0;
20919
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20920
 
@@ -285,7 +283,7 @@
20921
 
          return;
20922
 
        }
20923
 
       else
20924
 
-       retarray->base_addr = xmalloc (alloc_size);
20925
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20926
 
 
20927
 
     }
20928
 
   else
20929
 
@@ -430,8 +428,7 @@
20930
 
       retarray->offset = 0;
20931
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20932
 
 
20933
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20934
 
-                  * extent[rank-1];
20935
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20936
 
 
20937
 
       if (alloc_size == 0)
20938
 
        {
20939
 
@@ -440,7 +437,7 @@
20940
 
          return;
20941
 
        }
20942
 
       else
20943
 
-       retarray->base_addr = xmalloc (alloc_size);
20944
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20945
 
     }
20946
 
   else
20947
 
     {
20948
 
Index: libgfortran/generated/sum_r8.c
20949
 
===================================================================
20950
 
--- a/src/libgfortran/generated/sum_r8.c        (.../tags/gcc_4_8_3_release)
20951
 
+++ b/src/libgfortran/generated/sum_r8.c        (.../branches/gcc-4_8-branch)
20952
 
@@ -97,10 +97,9 @@
20953
 
       retarray->offset = 0;
20954
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20955
 
 
20956
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20957
 
-                  * extent[rank-1];
20958
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20959
 
 
20960
 
-      retarray->base_addr = xmalloc (alloc_size);
20961
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20962
 
       if (alloc_size == 0)
20963
 
        {
20964
 
          /* Make sure we have a zero-sized array.  */
20965
 
@@ -272,8 +271,7 @@
20966
 
 
20967
 
        }
20968
 
 
20969
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20970
 
-                  * extent[rank-1];
20971
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20972
 
 
20973
 
       retarray->offset = 0;
20974
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20975
 
@@ -285,7 +283,7 @@
20976
 
          return;
20977
 
        }
20978
 
       else
20979
 
-       retarray->base_addr = xmalloc (alloc_size);
20980
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20981
 
 
20982
 
     }
20983
 
   else
20984
 
@@ -430,8 +428,7 @@
20985
 
       retarray->offset = 0;
20986
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20987
 
 
20988
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20989
 
-                  * extent[rank-1];
20990
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20991
 
 
20992
 
       if (alloc_size == 0)
20993
 
        {
20994
 
@@ -440,7 +437,7 @@
20995
 
          return;
20996
 
        }
20997
 
       else
20998
 
-       retarray->base_addr = xmalloc (alloc_size);
20999
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21000
 
     }
21001
 
   else
21002
 
     {
21003
 
Index: libgfortran/generated/norm2_r10.c
21004
 
===================================================================
21005
 
--- a/src/libgfortran/generated/norm2_r10.c     (.../tags/gcc_4_8_3_release)
21006
 
+++ b/src/libgfortran/generated/norm2_r10.c     (.../branches/gcc-4_8-branch)
21007
 
@@ -101,10 +101,9 @@
21008
 
       retarray->offset = 0;
21009
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21010
 
 
21011
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21012
 
-                  * extent[rank-1];
21013
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21014
 
 
21015
 
-      retarray->base_addr = xmalloc (alloc_size);
21016
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21017
 
       if (alloc_size == 0)
21018
 
        {
21019
 
          /* Make sure we have a zero-sized array.  */
21020
 
Index: libgfortran/generated/unpack_c10.c
21021
 
===================================================================
21022
 
--- a/src/libgfortran/generated/unpack_c10.c    (.../tags/gcc_4_8_3_release)
21023
 
+++ b/src/libgfortran/generated/unpack_c10.c    (.../branches/gcc-4_8-branch)
21024
 
@@ -99,7 +99,7 @@
21025
 
          rs *= extent[n];
21026
 
        }
21027
 
       ret->offset = 0;
21028
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
21029
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
21030
 
     }
21031
 
   else
21032
 
     {
21033
 
@@ -244,7 +244,7 @@
21034
 
          rs *= extent[n];
21035
 
        }
21036
 
       ret->offset = 0;
21037
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
21038
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
21039
 
     }
21040
 
   else
21041
 
     {
21042
 
Index: libgfortran/generated/spread_r8.c
21043
 
===================================================================
21044
 
--- a/src/libgfortran/generated/spread_r8.c     (.../tags/gcc_4_8_3_release)
21045
 
+++ b/src/libgfortran/generated/spread_r8.c     (.../branches/gcc-4_8-branch)
21046
 
@@ -101,8 +101,8 @@
21047
 
        }
21048
 
       ret->offset = 0;
21049
 
 
21050
 
-      /* xmalloc allocates a single byte for zero size.  */
21051
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
21052
 
+      /* xmallocarray allocates a single byte for zero size.  */
21053
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
21054
 
       if (rs <= 0)
21055
 
         return;
21056
 
     }
21057
 
@@ -244,7 +244,7 @@
21058
 
 
21059
 
   if (ret->base_addr == NULL)
21060
 
     {
21061
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
21062
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
21063
 
       ret->offset = 0;
21064
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21065
 
     }
21066
 
Index: libgfortran/generated/minloc1_16_i16.c
21067
 
===================================================================
21068
 
--- a/src/libgfortran/generated/minloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
21069
 
+++ b/src/libgfortran/generated/minloc1_16_i16.c        (.../branches/gcc-4_8-branch)
21070
 
@@ -98,10 +98,9 @@
21071
 
       retarray->offset = 0;
21072
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21073
 
 
21074
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21075
 
-                  * extent[rank-1];
21076
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21077
 
 
21078
 
-      retarray->base_addr = xmalloc (alloc_size);
21079
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21080
 
       if (alloc_size == 0)
21081
 
        {
21082
 
          /* Make sure we have a zero-sized array.  */
21083
 
@@ -294,8 +293,7 @@
21084
 
 
21085
 
        }
21086
 
 
21087
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21088
 
-                  * extent[rank-1];
21089
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21090
 
 
21091
 
       retarray->offset = 0;
21092
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21093
 
@@ -307,7 +305,7 @@
21094
 
          return;
21095
 
        }
21096
 
       else
21097
 
-       retarray->base_addr = xmalloc (alloc_size);
21098
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21099
 
 
21100
 
     }
21101
 
   else
21102
 
@@ -485,8 +483,7 @@
21103
 
       retarray->offset = 0;
21104
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21105
 
 
21106
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21107
 
-                  * extent[rank-1];
21108
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21109
 
 
21110
 
       if (alloc_size == 0)
21111
 
        {
21112
 
@@ -495,7 +492,7 @@
21113
 
          return;
21114
 
        }
21115
 
       else
21116
 
-       retarray->base_addr = xmalloc (alloc_size);
21117
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21118
 
     }
21119
 
   else
21120
 
     {
21121
 
Index: libgfortran/generated/maxloc1_8_r4.c
21122
 
===================================================================
21123
 
--- a/src/libgfortran/generated/maxloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
21124
 
+++ b/src/libgfortran/generated/maxloc1_8_r4.c  (.../branches/gcc-4_8-branch)
21125
 
@@ -98,10 +98,9 @@
21126
 
       retarray->offset = 0;
21127
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21128
 
 
21129
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21130
 
-                  * extent[rank-1];
21131
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21132
 
 
21133
 
-      retarray->base_addr = xmalloc (alloc_size);
21134
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21135
 
       if (alloc_size == 0)
21136
 
        {
21137
 
          /* Make sure we have a zero-sized array.  */
21138
 
@@ -294,8 +293,7 @@
21139
 
 
21140
 
        }
21141
 
 
21142
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21143
 
-                  * extent[rank-1];
21144
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21145
 
 
21146
 
       retarray->offset = 0;
21147
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21148
 
@@ -307,7 +305,7 @@
21149
 
          return;
21150
 
        }
21151
 
       else
21152
 
-       retarray->base_addr = xmalloc (alloc_size);
21153
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21154
 
 
21155
 
     }
21156
 
   else
21157
 
@@ -485,8 +483,7 @@
21158
 
       retarray->offset = 0;
21159
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21160
 
 
21161
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21162
 
-                  * extent[rank-1];
21163
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21164
 
 
21165
 
       if (alloc_size == 0)
21166
 
        {
21167
 
@@ -495,7 +492,7 @@
21168
 
          return;
21169
 
        }
21170
 
       else
21171
 
-       retarray->base_addr = xmalloc (alloc_size);
21172
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21173
 
     }
21174
 
   else
21175
 
     {
21176
 
Index: libgfortran/generated/minloc1_16_i1.c
21177
 
===================================================================
21178
 
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
21179
 
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
21180
 
@@ -98,10 +98,9 @@
21181
 
       retarray->offset = 0;
21182
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21183
 
 
21184
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21185
 
-                  * extent[rank-1];
21186
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21187
 
 
21188
 
-      retarray->base_addr = xmalloc (alloc_size);
21189
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21190
 
       if (alloc_size == 0)
21191
 
        {
21192
 
          /* Make sure we have a zero-sized array.  */
21193
 
@@ -294,8 +293,7 @@
21194
 
 
21195
 
        }
21196
 
 
21197
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21198
 
-                  * extent[rank-1];
21199
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21200
 
 
21201
 
       retarray->offset = 0;
21202
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21203
 
@@ -307,7 +305,7 @@
21204
 
          return;
21205
 
        }
21206
 
       else
21207
 
-       retarray->base_addr = xmalloc (alloc_size);
21208
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21209
 
 
21210
 
     }
21211
 
   else
21212
 
@@ -485,8 +483,7 @@
21213
 
       retarray->offset = 0;
21214
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21215
 
 
21216
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21217
 
-                  * extent[rank-1];
21218
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21219
 
 
21220
 
       if (alloc_size == 0)
21221
 
        {
21222
 
@@ -495,7 +492,7 @@
21223
 
          return;
21224
 
        }
21225
 
       else
21226
 
-       retarray->base_addr = xmalloc (alloc_size);
21227
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21228
 
     }
21229
 
   else
21230
 
     {
21231
 
Index: libgfortran/generated/spread_r16.c
21232
 
===================================================================
21233
 
--- a/src/libgfortran/generated/spread_r16.c    (.../tags/gcc_4_8_3_release)
21234
 
+++ b/src/libgfortran/generated/spread_r16.c    (.../branches/gcc-4_8-branch)
21235
 
@@ -101,8 +101,8 @@
21236
 
        }
21237
 
       ret->offset = 0;
21238
 
 
21239
 
-      /* xmalloc allocates a single byte for zero size.  */
21240
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
21241
 
+      /* xmallocarray allocates a single byte for zero size.  */
21242
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
21243
 
       if (rs <= 0)
21244
 
         return;
21245
 
     }
21246
 
@@ -244,7 +244,7 @@
21247
 
 
21248
 
   if (ret->base_addr == NULL)
21249
 
     {
21250
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
21251
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
21252
 
       ret->offset = 0;
21253
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21254
 
     }
21255
 
Index: libgfortran/generated/pack_c8.c
21256
 
===================================================================
21257
 
--- a/src/libgfortran/generated/pack_c8.c       (.../tags/gcc_4_8_3_release)
21258
 
+++ b/src/libgfortran/generated/pack_c8.c       (.../branches/gcc-4_8-branch)
21259
 
@@ -167,8 +167,8 @@
21260
 
 
21261
 
          ret->offset = 0;
21262
 
 
21263
 
-         /* xmalloc allocates a single byte for zero size.  */
21264
 
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
21265
 
+         /* xmallocarray allocates a single byte for zero size.  */
21266
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
21267
 
 
21268
 
          if (total == 0)
21269
 
            return;
21270
 
Index: libgfortran/generated/minval_r10.c
21271
 
===================================================================
21272
 
--- a/src/libgfortran/generated/minval_r10.c    (.../tags/gcc_4_8_3_release)
21273
 
+++ b/src/libgfortran/generated/minval_r10.c    (.../branches/gcc-4_8-branch)
21274
 
@@ -97,10 +97,9 @@
21275
 
       retarray->offset = 0;
21276
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21277
 
 
21278
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21279
 
-                  * extent[rank-1];
21280
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21281
 
 
21282
 
-      retarray->base_addr = xmalloc (alloc_size);
21283
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21284
 
       if (alloc_size == 0)
21285
 
        {
21286
 
          /* Make sure we have a zero-sized array.  */
21287
 
@@ -286,8 +285,7 @@
21288
 
 
21289
 
        }
21290
 
 
21291
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21292
 
-                  * extent[rank-1];
21293
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21294
 
 
21295
 
       retarray->offset = 0;
21296
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21297
 
@@ -299,7 +297,7 @@
21298
 
          return;
21299
 
        }
21300
 
       else
21301
 
-       retarray->base_addr = xmalloc (alloc_size);
21302
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21303
 
 
21304
 
     }
21305
 
   else
21306
 
@@ -472,8 +470,7 @@
21307
 
       retarray->offset = 0;
21308
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21309
 
 
21310
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21311
 
-                  * extent[rank-1];
21312
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21313
 
 
21314
 
       if (alloc_size == 0)
21315
 
        {
21316
 
@@ -482,7 +479,7 @@
21317
 
          return;
21318
 
        }
21319
 
       else
21320
 
-       retarray->base_addr = xmalloc (alloc_size);
21321
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21322
 
     }
21323
 
   else
21324
 
     {
21325
 
Index: libgfortran/generated/parity_l8.c
21326
 
===================================================================
21327
 
--- a/src/libgfortran/generated/parity_l8.c     (.../tags/gcc_4_8_3_release)
21328
 
+++ b/src/libgfortran/generated/parity_l8.c     (.../branches/gcc-4_8-branch)
21329
 
@@ -98,10 +98,9 @@
21330
 
       retarray->offset = 0;
21331
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21332
 
 
21333
 
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21334
 
-                  * extent[rank-1];
21335
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21336
 
 
21337
 
-      retarray->base_addr = xmalloc (alloc_size);
21338
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
21339
 
       if (alloc_size == 0)
21340
 
        {
21341
 
          /* Make sure we have a zero-sized array.  */
21342
 
Index: libgfortran/generated/minval_i4.c
21343
 
===================================================================
21344
 
--- a/src/libgfortran/generated/minval_i4.c     (.../tags/gcc_4_8_3_release)
21345
 
+++ b/src/libgfortran/generated/minval_i4.c     (.../branches/gcc-4_8-branch)
21346
 
@@ -97,10 +97,9 @@
21347
 
       retarray->offset = 0;
21348
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21349
 
 
21350
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21351
 
-                  * extent[rank-1];
21352
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21353
 
 
21354
 
-      retarray->base_addr = xmalloc (alloc_size);
21355
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21356
 
       if (alloc_size == 0)
21357
 
        {
21358
 
          /* Make sure we have a zero-sized array.  */
21359
 
@@ -286,8 +285,7 @@
21360
 
 
21361
 
        }
21362
 
 
21363
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21364
 
-                  * extent[rank-1];
21365
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21366
 
 
21367
 
       retarray->offset = 0;
21368
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21369
 
@@ -299,7 +297,7 @@
21370
 
          return;
21371
 
        }
21372
 
       else
21373
 
-       retarray->base_addr = xmalloc (alloc_size);
21374
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21375
 
 
21376
 
     }
21377
 
   else
21378
 
@@ -472,8 +470,7 @@
21379
 
       retarray->offset = 0;
21380
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21381
 
 
21382
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21383
 
-                  * extent[rank-1];
21384
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21385
 
 
21386
 
       if (alloc_size == 0)
21387
 
        {
21388
 
@@ -482,7 +479,7 @@
21389
 
          return;
21390
 
        }
21391
 
       else
21392
 
-       retarray->base_addr = xmalloc (alloc_size);
21393
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21394
 
     }
21395
 
   else
21396
 
     {
21397
 
Index: libgfortran/generated/maxloc1_8_i2.c
21398
 
===================================================================
21399
 
--- a/src/libgfortran/generated/maxloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
21400
 
+++ b/src/libgfortran/generated/maxloc1_8_i2.c  (.../branches/gcc-4_8-branch)
21401
 
@@ -98,10 +98,9 @@
21402
 
       retarray->offset = 0;
21403
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21404
 
 
21405
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21406
 
-                  * extent[rank-1];
21407
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21408
 
 
21409
 
-      retarray->base_addr = xmalloc (alloc_size);
21410
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21411
 
       if (alloc_size == 0)
21412
 
        {
21413
 
          /* Make sure we have a zero-sized array.  */
21414
 
@@ -294,8 +293,7 @@
21415
 
 
21416
 
        }
21417
 
 
21418
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21419
 
-                  * extent[rank-1];
21420
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21421
 
 
21422
 
       retarray->offset = 0;
21423
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21424
 
@@ -307,7 +305,7 @@
21425
 
          return;
21426
 
        }
21427
 
       else
21428
 
-       retarray->base_addr = xmalloc (alloc_size);
21429
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21430
 
 
21431
 
     }
21432
 
   else
21433
 
@@ -485,8 +483,7 @@
21434
 
       retarray->offset = 0;
21435
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21436
 
 
21437
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21438
 
-                  * extent[rank-1];
21439
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21440
 
 
21441
 
       if (alloc_size == 0)
21442
 
        {
21443
 
@@ -495,7 +492,7 @@
21444
 
          return;
21445
 
        }
21446
 
       else
21447
 
-       retarray->base_addr = xmalloc (alloc_size);
21448
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21449
 
     }
21450
 
   else
21451
 
     {
21452
 
Index: libgfortran/generated/any_l8.c
21453
 
===================================================================
21454
 
--- a/src/libgfortran/generated/any_l8.c        (.../tags/gcc_4_8_3_release)
21455
 
+++ b/src/libgfortran/generated/any_l8.c        (.../branches/gcc-4_8-branch)
21456
 
@@ -101,8 +101,7 @@
21457
 
       retarray->offset = 0;
21458
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21459
 
 
21460
 
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21461
 
-                  * extent[rank-1];
21462
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21463
 
 
21464
 
       if (alloc_size == 0)
21465
 
        {
21466
 
@@ -111,7 +110,7 @@
21467
 
          return;
21468
 
        }
21469
 
       else
21470
 
-       retarray->base_addr = xmalloc (alloc_size);
21471
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
21472
 
     }
21473
 
   else
21474
 
     {
21475
 
Index: libgfortran/generated/maxloc0_16_r10.c
21476
 
===================================================================
21477
 
--- a/src/libgfortran/generated/maxloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
21478
 
+++ b/src/libgfortran/generated/maxloc0_16_r10.c        (.../branches/gcc-4_8-branch)
21479
 
@@ -58,7 +58,7 @@
21480
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21481
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21482
 
       retarray->offset = 0;
21483
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21484
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21485
 
     }
21486
 
   else
21487
 
     {
21488
 
@@ -199,7 +199,7 @@
21489
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21490
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21491
 
       retarray->offset = 0;
21492
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21493
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21494
 
     }
21495
 
   else
21496
 
     {
21497
 
@@ -367,7 +367,7 @@
21498
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21499
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21500
 
       retarray->offset = 0;
21501
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21502
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21503
 
     }
21504
 
   else if (unlikely (compile_options.bounds_check))
21505
 
     {
21506
 
Index: libgfortran/generated/minloc0_4_i16.c
21507
 
===================================================================
21508
 
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
21509
 
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
21510
 
@@ -58,7 +58,7 @@
21511
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21512
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21513
 
       retarray->offset = 0;
21514
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21515
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21516
 
     }
21517
 
   else
21518
 
     {
21519
 
@@ -199,7 +199,7 @@
21520
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21521
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21522
 
       retarray->offset = 0;
21523
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21524
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21525
 
     }
21526
 
   else
21527
 
     {
21528
 
@@ -367,7 +367,7 @@
21529
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21530
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21531
 
       retarray->offset = 0;
21532
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21533
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21534
 
     }
21535
 
   else if (unlikely (compile_options.bounds_check))
21536
 
     {
21537
 
Index: libgfortran/generated/maxloc0_8_r8.c
21538
 
===================================================================
21539
 
--- a/src/libgfortran/generated/maxloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
21540
 
+++ b/src/libgfortran/generated/maxloc0_8_r8.c  (.../branches/gcc-4_8-branch)
21541
 
@@ -58,7 +58,7 @@
21542
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21543
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21544
 
       retarray->offset = 0;
21545
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21546
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21547
 
     }
21548
 
   else
21549
 
     {
21550
 
@@ -199,7 +199,7 @@
21551
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21552
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21553
 
       retarray->offset = 0;
21554
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21555
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21556
 
     }
21557
 
   else
21558
 
     {
21559
 
@@ -367,7 +367,7 @@
21560
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21561
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21562
 
       retarray->offset = 0;
21563
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21564
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21565
 
     }
21566
 
   else if (unlikely (compile_options.bounds_check))
21567
 
     {
21568
 
Index: libgfortran/generated/minloc1_4_r10.c
21569
 
===================================================================
21570
 
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
21571
 
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
21572
 
@@ -98,10 +98,9 @@
21573
 
       retarray->offset = 0;
21574
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21575
 
 
21576
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21577
 
-                  * extent[rank-1];
21578
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21579
 
 
21580
 
-      retarray->base_addr = xmalloc (alloc_size);
21581
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21582
 
       if (alloc_size == 0)
21583
 
        {
21584
 
          /* Make sure we have a zero-sized array.  */
21585
 
@@ -294,8 +293,7 @@
21586
 
 
21587
 
        }
21588
 
 
21589
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21590
 
-                  * extent[rank-1];
21591
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21592
 
 
21593
 
       retarray->offset = 0;
21594
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21595
 
@@ -307,7 +305,7 @@
21596
 
          return;
21597
 
        }
21598
 
       else
21599
 
-       retarray->base_addr = xmalloc (alloc_size);
21600
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21601
 
 
21602
 
     }
21603
 
   else
21604
 
@@ -485,8 +483,7 @@
21605
 
       retarray->offset = 0;
21606
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21607
 
 
21608
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21609
 
-                  * extent[rank-1];
21610
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21611
 
 
21612
 
       if (alloc_size == 0)
21613
 
        {
21614
 
@@ -495,7 +492,7 @@
21615
 
          return;
21616
 
        }
21617
 
       else
21618
 
-       retarray->base_addr = xmalloc (alloc_size);
21619
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21620
 
     }
21621
 
   else
21622
 
     {
21623
 
Index: libgfortran/generated/minloc1_8_i16.c
21624
 
===================================================================
21625
 
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
21626
 
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
21627
 
@@ -98,10 +98,9 @@
21628
 
       retarray->offset = 0;
21629
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21630
 
 
21631
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21632
 
-                  * extent[rank-1];
21633
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21634
 
 
21635
 
-      retarray->base_addr = xmalloc (alloc_size);
21636
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21637
 
       if (alloc_size == 0)
21638
 
        {
21639
 
          /* Make sure we have a zero-sized array.  */
21640
 
@@ -294,8 +293,7 @@
21641
 
 
21642
 
        }
21643
 
 
21644
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21645
 
-                  * extent[rank-1];
21646
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21647
 
 
21648
 
       retarray->offset = 0;
21649
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21650
 
@@ -307,7 +305,7 @@
21651
 
          return;
21652
 
        }
21653
 
       else
21654
 
-       retarray->base_addr = xmalloc (alloc_size);
21655
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21656
 
 
21657
 
     }
21658
 
   else
21659
 
@@ -485,8 +483,7 @@
21660
 
       retarray->offset = 0;
21661
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21662
 
 
21663
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21664
 
-                  * extent[rank-1];
21665
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21666
 
 
21667
 
       if (alloc_size == 0)
21668
 
        {
21669
 
@@ -495,7 +492,7 @@
21670
 
          return;
21671
 
        }
21672
 
       else
21673
 
-       retarray->base_addr = xmalloc (alloc_size);
21674
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21675
 
     }
21676
 
   else
21677
 
     {
21678
 
Index: libgfortran/generated/maxloc0_8_r10.c
21679
 
===================================================================
21680
 
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
21681
 
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
21682
 
@@ -58,7 +58,7 @@
21683
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21684
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21685
 
       retarray->offset = 0;
21686
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21687
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21688
 
     }
21689
 
   else
21690
 
     {
21691
 
@@ -199,7 +199,7 @@
21692
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21693
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21694
 
       retarray->offset = 0;
21695
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21696
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21697
 
     }
21698
 
   else
21699
 
     {
21700
 
@@ -367,7 +367,7 @@
21701
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21702
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21703
 
       retarray->offset = 0;
21704
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21705
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21706
 
     }
21707
 
   else if (unlikely (compile_options.bounds_check))
21708
 
     {
21709
 
Index: libgfortran/generated/unpack_i4.c
21710
 
===================================================================
21711
 
--- a/src/libgfortran/generated/unpack_i4.c     (.../tags/gcc_4_8_3_release)
21712
 
+++ b/src/libgfortran/generated/unpack_i4.c     (.../branches/gcc-4_8-branch)
21713
 
@@ -99,7 +99,7 @@
21714
 
          rs *= extent[n];
21715
 
        }
21716
 
       ret->offset = 0;
21717
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
21718
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
21719
 
     }
21720
 
   else
21721
 
     {
21722
 
@@ -244,7 +244,7 @@
21723
 
          rs *= extent[n];
21724
 
        }
21725
 
       ret->offset = 0;
21726
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
21727
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
21728
 
     }
21729
 
   else
21730
 
     {
21731
 
Index: libgfortran/generated/minloc1_16_r4.c
21732
 
===================================================================
21733
 
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
21734
 
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
21735
 
@@ -98,10 +98,9 @@
21736
 
       retarray->offset = 0;
21737
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21738
 
 
21739
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21740
 
-                  * extent[rank-1];
21741
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21742
 
 
21743
 
-      retarray->base_addr = xmalloc (alloc_size);
21744
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21745
 
       if (alloc_size == 0)
21746
 
        {
21747
 
          /* Make sure we have a zero-sized array.  */
21748
 
@@ -294,8 +293,7 @@
21749
 
 
21750
 
        }
21751
 
 
21752
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21753
 
-                  * extent[rank-1];
21754
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21755
 
 
21756
 
       retarray->offset = 0;
21757
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21758
 
@@ -307,7 +305,7 @@
21759
 
          return;
21760
 
        }
21761
 
       else
21762
 
-       retarray->base_addr = xmalloc (alloc_size);
21763
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21764
 
 
21765
 
     }
21766
 
   else
21767
 
@@ -485,8 +483,7 @@
21768
 
       retarray->offset = 0;
21769
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21770
 
 
21771
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21772
 
-                  * extent[rank-1];
21773
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21774
 
 
21775
 
       if (alloc_size == 0)
21776
 
        {
21777
 
@@ -495,7 +492,7 @@
21778
 
          return;
21779
 
        }
21780
 
       else
21781
 
-       retarray->base_addr = xmalloc (alloc_size);
21782
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21783
 
     }
21784
 
   else
21785
 
     {
21786
 
Index: libgfortran/generated/product_i8.c
21787
 
===================================================================
21788
 
--- a/src/libgfortran/generated/product_i8.c    (.../tags/gcc_4_8_3_release)
21789
 
+++ b/src/libgfortran/generated/product_i8.c    (.../branches/gcc-4_8-branch)
21790
 
@@ -97,10 +97,9 @@
21791
 
       retarray->offset = 0;
21792
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21793
 
 
21794
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21795
 
-                  * extent[rank-1];
21796
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21797
 
 
21798
 
-      retarray->base_addr = xmalloc (alloc_size);
21799
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21800
 
       if (alloc_size == 0)
21801
 
        {
21802
 
          /* Make sure we have a zero-sized array.  */
21803
 
@@ -272,8 +271,7 @@
21804
 
 
21805
 
        }
21806
 
 
21807
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21808
 
-                  * extent[rank-1];
21809
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21810
 
 
21811
 
       retarray->offset = 0;
21812
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21813
 
@@ -285,7 +283,7 @@
21814
 
          return;
21815
 
        }
21816
 
       else
21817
 
-       retarray->base_addr = xmalloc (alloc_size);
21818
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21819
 
 
21820
 
     }
21821
 
   else
21822
 
@@ -430,8 +428,7 @@
21823
 
       retarray->offset = 0;
21824
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21825
 
 
21826
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21827
 
-                  * extent[rank-1];
21828
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21829
 
 
21830
 
       if (alloc_size == 0)
21831
 
        {
21832
 
@@ -440,7 +437,7 @@
21833
 
          return;
21834
 
        }
21835
 
       else
21836
 
-       retarray->base_addr = xmalloc (alloc_size);
21837
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21838
 
     }
21839
 
   else
21840
 
     {
21841
 
Index: libgfortran/generated/minloc0_16_r8.c
21842
 
===================================================================
21843
 
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
21844
 
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
21845
 
@@ -58,7 +58,7 @@
21846
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21847
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21848
 
       retarray->offset = 0;
21849
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21850
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21851
 
     }
21852
 
   else
21853
 
     {
21854
 
@@ -199,7 +199,7 @@
21855
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21856
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21857
 
       retarray->offset = 0;
21858
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21859
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21860
 
     }
21861
 
   else
21862
 
     {
21863
 
@@ -367,7 +367,7 @@
21864
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21865
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21866
 
       retarray->offset = 0;
21867
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21868
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21869
 
     }
21870
 
   else if (unlikely (compile_options.bounds_check))
21871
 
     {
21872
 
Index: libgfortran/generated/count_2_l.c
21873
 
===================================================================
21874
 
--- a/src/libgfortran/generated/count_2_l.c     (.../tags/gcc_4_8_3_release)
21875
 
+++ b/src/libgfortran/generated/count_2_l.c     (.../branches/gcc-4_8-branch)
21876
 
@@ -101,8 +101,7 @@
21877
 
       retarray->offset = 0;
21878
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21879
 
 
21880
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21881
 
-                  * extent[rank-1];
21882
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21883
 
 
21884
 
       if (alloc_size == 0)
21885
 
        {
21886
 
@@ -111,7 +110,7 @@
21887
 
          return;
21888
 
        }
21889
 
       else
21890
 
-       retarray->base_addr = xmalloc (alloc_size);
21891
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21892
 
     }
21893
 
   else
21894
 
     {
21895
 
Index: libgfortran/generated/transpose_r8.c
21896
 
===================================================================
21897
 
--- a/src/libgfortran/generated/transpose_r8.c  (.../tags/gcc_4_8_3_release)
21898
 
+++ b/src/libgfortran/generated/transpose_r8.c  (.../branches/gcc-4_8-branch)
21899
 
@@ -60,7 +60,8 @@
21900
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
21901
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
21902
 
 
21903
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
21904
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
21905
 
+                                     sizeof (GFC_REAL_8));
21906
 
       ret->offset = 0;
21907
 
     } else if (unlikely (compile_options.bounds_check))
21908
 
     {
21909
 
Index: libgfortran/generated/cshift1_8.c
21910
 
===================================================================
21911
 
--- a/src/libgfortran/generated/cshift1_8.c     (.../tags/gcc_4_8_3_release)
21912
 
+++ b/src/libgfortran/generated/cshift1_8.c     (.../branches/gcc-4_8-branch)
21913
 
@@ -80,7 +80,7 @@
21914
 
     {
21915
 
       int i;
21916
 
 
21917
 
-      ret->base_addr = xmalloc (size * arraysize);
21918
 
+      ret->base_addr = xmallocarray (arraysize, size);
21919
 
       ret->offset = 0;
21920
 
       ret->dtype = array->dtype;
21921
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
21922
 
Index: libgfortran/generated/matmul_i4.c
21923
 
===================================================================
21924
 
--- a/src/libgfortran/generated/matmul_i4.c     (.../tags/gcc_4_8_3_release)
21925
 
+++ b/src/libgfortran/generated/matmul_i4.c     (.../branches/gcc-4_8-branch)
21926
 
@@ -124,7 +124,7 @@
21927
 
         }
21928
 
 
21929
 
       retarray->base_addr
21930
 
-       = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
21931
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
21932
 
       retarray->offset = 0;
21933
 
     }
21934
 
     else if (unlikely (compile_options.bounds_check))
21935
 
Index: libgfortran/generated/pack_r10.c
21936
 
===================================================================
21937
 
--- a/src/libgfortran/generated/pack_r10.c      (.../tags/gcc_4_8_3_release)
21938
 
+++ b/src/libgfortran/generated/pack_r10.c      (.../branches/gcc-4_8-branch)
21939
 
@@ -167,8 +167,8 @@
21940
 
 
21941
 
          ret->offset = 0;
21942
 
 
21943
 
-         /* xmalloc allocates a single byte for zero size.  */
21944
 
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
21945
 
+         /* xmallocarray allocates a single byte for zero size.  */
21946
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
21947
 
 
21948
 
          if (total == 0)
21949
 
            return;
21950
 
Index: libgfortran/generated/minloc1_16_i2.c
21951
 
===================================================================
21952
 
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
21953
 
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
21954
 
@@ -98,10 +98,9 @@
21955
 
       retarray->offset = 0;
21956
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21957
 
 
21958
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21959
 
-                  * extent[rank-1];
21960
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21961
 
 
21962
 
-      retarray->base_addr = xmalloc (alloc_size);
21963
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21964
 
       if (alloc_size == 0)
21965
 
        {
21966
 
          /* Make sure we have a zero-sized array.  */
21967
 
@@ -294,8 +293,7 @@
21968
 
 
21969
 
        }
21970
 
 
21971
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21972
 
-                  * extent[rank-1];
21973
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21974
 
 
21975
 
       retarray->offset = 0;
21976
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21977
 
@@ -307,7 +305,7 @@
21978
 
          return;
21979
 
        }
21980
 
       else
21981
 
-       retarray->base_addr = xmalloc (alloc_size);
21982
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21983
 
 
21984
 
     }
21985
 
   else
21986
 
@@ -485,8 +483,7 @@
21987
 
       retarray->offset = 0;
21988
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21989
 
 
21990
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21991
 
-                  * extent[rank-1];
21992
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21993
 
 
21994
 
       if (alloc_size == 0)
21995
 
        {
21996
 
@@ -495,7 +492,7 @@
21997
 
          return;
21998
 
        }
21999
 
       else
22000
 
-       retarray->base_addr = xmalloc (alloc_size);
22001
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22002
 
     }
22003
 
   else
22004
 
     {
22005
 
Index: libgfortran/generated/in_pack_i8.c
22006
 
===================================================================
22007
 
--- a/src/libgfortran/generated/in_pack_i8.c    (.../tags/gcc_4_8_3_release)
22008
 
+++ b/src/libgfortran/generated/in_pack_i8.c    (.../branches/gcc-4_8-branch)
22009
 
@@ -76,7 +76,7 @@
22010
 
     return source->base_addr;
22011
 
 
22012
 
   /* Allocate storage for the destination.  */
22013
 
-  destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
22014
 
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
22015
 
   dest = destptr;
22016
 
   src = source->base_addr;
22017
 
   stride0 = stride[0];
22018
 
Index: libgfortran/generated/transpose_r16.c
22019
 
===================================================================
22020
 
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
22021
 
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
22022
 
@@ -60,7 +60,8 @@
22023
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
22024
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
22025
 
 
22026
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
22027
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
22028
 
+                                     sizeof (GFC_REAL_16));
22029
 
       ret->offset = 0;
22030
 
     } else if (unlikely (compile_options.bounds_check))
22031
 
     {
22032
 
Index: libgfortran/generated/minloc1_4_i4.c
22033
 
===================================================================
22034
 
--- a/src/libgfortran/generated/minloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
22035
 
+++ b/src/libgfortran/generated/minloc1_4_i4.c  (.../branches/gcc-4_8-branch)
22036
 
@@ -98,10 +98,9 @@
22037
 
       retarray->offset = 0;
22038
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22039
 
 
22040
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22041
 
-                  * extent[rank-1];
22042
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22043
 
 
22044
 
-      retarray->base_addr = xmalloc (alloc_size);
22045
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22046
 
       if (alloc_size == 0)
22047
 
        {
22048
 
          /* Make sure we have a zero-sized array.  */
22049
 
@@ -294,8 +293,7 @@
22050
 
 
22051
 
        }
22052
 
 
22053
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22054
 
-                  * extent[rank-1];
22055
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22056
 
 
22057
 
       retarray->offset = 0;
22058
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22059
 
@@ -307,7 +305,7 @@
22060
 
          return;
22061
 
        }
22062
 
       else
22063
 
-       retarray->base_addr = xmalloc (alloc_size);
22064
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22065
 
 
22066
 
     }
22067
 
   else
22068
 
@@ -485,8 +483,7 @@
22069
 
       retarray->offset = 0;
22070
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22071
 
 
22072
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22073
 
-                  * extent[rank-1];
22074
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22075
 
 
22076
 
       if (alloc_size == 0)
22077
 
        {
22078
 
@@ -495,7 +492,7 @@
22079
 
          return;
22080
 
        }
22081
 
       else
22082
 
-       retarray->base_addr = xmalloc (alloc_size);
22083
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22084
 
     }
22085
 
   else
22086
 
     {
22087
 
Index: libgfortran/generated/maxval_i1.c
22088
 
===================================================================
22089
 
--- a/src/libgfortran/generated/maxval_i1.c     (.../tags/gcc_4_8_3_release)
22090
 
+++ b/src/libgfortran/generated/maxval_i1.c     (.../branches/gcc-4_8-branch)
22091
 
@@ -97,10 +97,9 @@
22092
 
       retarray->offset = 0;
22093
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22094
 
 
22095
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22096
 
-                  * extent[rank-1];
22097
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22098
 
 
22099
 
-      retarray->base_addr = xmalloc (alloc_size);
22100
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22101
 
       if (alloc_size == 0)
22102
 
        {
22103
 
          /* Make sure we have a zero-sized array.  */
22104
 
@@ -286,8 +285,7 @@
22105
 
 
22106
 
        }
22107
 
 
22108
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22109
 
-                  * extent[rank-1];
22110
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22111
 
 
22112
 
       retarray->offset = 0;
22113
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22114
 
@@ -299,7 +297,7 @@
22115
 
          return;
22116
 
        }
22117
 
       else
22118
 
-       retarray->base_addr = xmalloc (alloc_size);
22119
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22120
 
 
22121
 
     }
22122
 
   else
22123
 
@@ -472,8 +470,7 @@
22124
 
       retarray->offset = 0;
22125
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22126
 
 
22127
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22128
 
-                  * extent[rank-1];
22129
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22130
 
 
22131
 
       if (alloc_size == 0)
22132
 
        {
22133
 
@@ -482,7 +479,7 @@
22134
 
          return;
22135
 
        }
22136
 
       else
22137
 
-       retarray->base_addr = xmalloc (alloc_size);
22138
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22139
 
     }
22140
 
   else
22141
 
     {
22142
 
Index: libgfortran/generated/product_c16.c
22143
 
===================================================================
22144
 
--- a/src/libgfortran/generated/product_c16.c   (.../tags/gcc_4_8_3_release)
22145
 
+++ b/src/libgfortran/generated/product_c16.c   (.../branches/gcc-4_8-branch)
22146
 
@@ -97,10 +97,9 @@
22147
 
       retarray->offset = 0;
22148
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22149
 
 
22150
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22151
 
-                  * extent[rank-1];
22152
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22153
 
 
22154
 
-      retarray->base_addr = xmalloc (alloc_size);
22155
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
22156
 
       if (alloc_size == 0)
22157
 
        {
22158
 
          /* Make sure we have a zero-sized array.  */
22159
 
@@ -272,8 +271,7 @@
22160
 
 
22161
 
        }
22162
 
 
22163
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22164
 
-                  * extent[rank-1];
22165
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22166
 
 
22167
 
       retarray->offset = 0;
22168
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22169
 
@@ -285,7 +283,7 @@
22170
 
          return;
22171
 
        }
22172
 
       else
22173
 
-       retarray->base_addr = xmalloc (alloc_size);
22174
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
22175
 
 
22176
 
     }
22177
 
   else
22178
 
@@ -430,8 +428,7 @@
22179
 
       retarray->offset = 0;
22180
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22181
 
 
22182
 
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22183
 
-                  * extent[rank-1];
22184
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22185
 
 
22186
 
       if (alloc_size == 0)
22187
 
        {
22188
 
@@ -440,7 +437,7 @@
22189
 
          return;
22190
 
        }
22191
 
       else
22192
 
-       retarray->base_addr = xmalloc (alloc_size);
22193
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
22194
 
     }
22195
 
   else
22196
 
     {
22197
 
Index: libgfortran/generated/reshape_r4.c
22198
 
===================================================================
22199
 
--- a/src/libgfortran/generated/reshape_r4.c    (.../tags/gcc_4_8_3_release)
22200
 
+++ b/src/libgfortran/generated/reshape_r4.c    (.../branches/gcc-4_8-branch)
22201
 
@@ -111,11 +111,11 @@
22202
 
       ret->offset = 0;
22203
 
 
22204
 
       if (unlikely (rs < 1))
22205
 
-        alloc_size = 1;
22206
 
+        alloc_size = 0;
22207
 
       else
22208
 
-        alloc_size = rs * sizeof (GFC_REAL_4);
22209
 
+        alloc_size = rs;
22210
 
 
22211
 
-      ret->base_addr = xmalloc (alloc_size);
22212
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22213
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22214
 
     }
22215
 
 
22216
 
Index: libgfortran/generated/iany_i8.c
22217
 
===================================================================
22218
 
--- a/src/libgfortran/generated/iany_i8.c       (.../tags/gcc_4_8_3_release)
22219
 
+++ b/src/libgfortran/generated/iany_i8.c       (.../branches/gcc-4_8-branch)
22220
 
@@ -97,10 +97,9 @@
22221
 
       retarray->offset = 0;
22222
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22223
 
 
22224
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22225
 
-                  * extent[rank-1];
22226
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22227
 
 
22228
 
-      retarray->base_addr = xmalloc (alloc_size);
22229
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22230
 
       if (alloc_size == 0)
22231
 
        {
22232
 
          /* Make sure we have a zero-sized array.  */
22233
 
@@ -272,8 +271,7 @@
22234
 
 
22235
 
        }
22236
 
 
22237
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22238
 
-                  * extent[rank-1];
22239
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22240
 
 
22241
 
       retarray->offset = 0;
22242
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22243
 
@@ -285,7 +283,7 @@
22244
 
          return;
22245
 
        }
22246
 
       else
22247
 
-       retarray->base_addr = xmalloc (alloc_size);
22248
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22249
 
 
22250
 
     }
22251
 
   else
22252
 
@@ -430,8 +428,7 @@
22253
 
       retarray->offset = 0;
22254
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22255
 
 
22256
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22257
 
-                  * extent[rank-1];
22258
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22259
 
 
22260
 
       if (alloc_size == 0)
22261
 
        {
22262
 
@@ -440,7 +437,7 @@
22263
 
          return;
22264
 
        }
22265
 
       else
22266
 
-       retarray->base_addr = xmalloc (alloc_size);
22267
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22268
 
     }
22269
 
   else
22270
 
     {
22271
 
Index: libgfortran/generated/cshift1_16.c
22272
 
===================================================================
22273
 
--- a/src/libgfortran/generated/cshift1_16.c    (.../tags/gcc_4_8_3_release)
22274
 
+++ b/src/libgfortran/generated/cshift1_16.c    (.../branches/gcc-4_8-branch)
22275
 
@@ -80,7 +80,7 @@
22276
 
     {
22277
 
       int i;
22278
 
 
22279
 
-      ret->base_addr = xmalloc (size * arraysize);
22280
 
+      ret->base_addr = xmallocarray (arraysize, size);
22281
 
       ret->offset = 0;
22282
 
       ret->dtype = array->dtype;
22283
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
22284
 
Index: libgfortran/generated/maxloc0_4_i1.c
22285
 
===================================================================
22286
 
--- a/src/libgfortran/generated/maxloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
22287
 
+++ b/src/libgfortran/generated/maxloc0_4_i1.c  (.../branches/gcc-4_8-branch)
22288
 
@@ -58,7 +58,7 @@
22289
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22290
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22291
 
       retarray->offset = 0;
22292
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22293
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22294
 
     }
22295
 
   else
22296
 
     {
22297
 
@@ -199,7 +199,7 @@
22298
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22299
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22300
 
       retarray->offset = 0;
22301
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22302
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22303
 
     }
22304
 
   else
22305
 
     {
22306
 
@@ -367,7 +367,7 @@
22307
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22308
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22309
 
       retarray->offset = 0;
22310
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22311
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22312
 
     }
22313
 
   else if (unlikely (compile_options.bounds_check))
22314
 
     {
22315
 
Index: libgfortran/generated/minloc0_4_i8.c
22316
 
===================================================================
22317
 
--- a/src/libgfortran/generated/minloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
22318
 
+++ b/src/libgfortran/generated/minloc0_4_i8.c  (.../branches/gcc-4_8-branch)
22319
 
@@ -58,7 +58,7 @@
22320
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22321
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22322
 
       retarray->offset = 0;
22323
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22324
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22325
 
     }
22326
 
   else
22327
 
     {
22328
 
@@ -199,7 +199,7 @@
22329
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22330
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22331
 
       retarray->offset = 0;
22332
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22333
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22334
 
     }
22335
 
   else
22336
 
     {
22337
 
@@ -367,7 +367,7 @@
22338
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22339
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22340
 
       retarray->offset = 0;
22341
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22342
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22343
 
     }
22344
 
   else if (unlikely (compile_options.bounds_check))
22345
 
     {
22346
 
Index: libgfortran/generated/spread_c16.c
22347
 
===================================================================
22348
 
--- a/src/libgfortran/generated/spread_c16.c    (.../tags/gcc_4_8_3_release)
22349
 
+++ b/src/libgfortran/generated/spread_c16.c    (.../branches/gcc-4_8-branch)
22350
 
@@ -101,8 +101,8 @@
22351
 
        }
22352
 
       ret->offset = 0;
22353
 
 
22354
 
-      /* xmalloc allocates a single byte for zero size.  */
22355
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
22356
 
+      /* xmallocarray allocates a single byte for zero size.  */
22357
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
22358
 
       if (rs <= 0)
22359
 
         return;
22360
 
     }
22361
 
@@ -244,7 +244,7 @@
22362
 
 
22363
 
   if (ret->base_addr == NULL)
22364
 
     {
22365
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
22366
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
22367
 
       ret->offset = 0;
22368
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
22369
 
     }
22370
 
Index: libgfortran/generated/maxval_r4.c
22371
 
===================================================================
22372
 
--- a/src/libgfortran/generated/maxval_r4.c     (.../tags/gcc_4_8_3_release)
22373
 
+++ b/src/libgfortran/generated/maxval_r4.c     (.../branches/gcc-4_8-branch)
22374
 
@@ -97,10 +97,9 @@
22375
 
       retarray->offset = 0;
22376
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22377
 
 
22378
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22379
 
-                  * extent[rank-1];
22380
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22381
 
 
22382
 
-      retarray->base_addr = xmalloc (alloc_size);
22383
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22384
 
       if (alloc_size == 0)
22385
 
        {
22386
 
          /* Make sure we have a zero-sized array.  */
22387
 
@@ -286,8 +285,7 @@
22388
 
 
22389
 
        }
22390
 
 
22391
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22392
 
-                  * extent[rank-1];
22393
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22394
 
 
22395
 
       retarray->offset = 0;
22396
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22397
 
@@ -299,7 +297,7 @@
22398
 
          return;
22399
 
        }
22400
 
       else
22401
 
-       retarray->base_addr = xmalloc (alloc_size);
22402
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22403
 
 
22404
 
     }
22405
 
   else
22406
 
@@ -472,8 +470,7 @@
22407
 
       retarray->offset = 0;
22408
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22409
 
 
22410
 
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22411
 
-                  * extent[rank-1];
22412
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22413
 
 
22414
 
       if (alloc_size == 0)
22415
 
        {
22416
 
@@ -482,7 +479,7 @@
22417
 
          return;
22418
 
        }
22419
 
       else
22420
 
-       retarray->base_addr = xmalloc (alloc_size);
22421
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22422
 
     }
22423
 
   else
22424
 
     {
22425
 
Index: libgfortran/generated/minval_r8.c
22426
 
===================================================================
22427
 
--- a/src/libgfortran/generated/minval_r8.c     (.../tags/gcc_4_8_3_release)
22428
 
+++ b/src/libgfortran/generated/minval_r8.c     (.../branches/gcc-4_8-branch)
22429
 
@@ -97,10 +97,9 @@
22430
 
       retarray->offset = 0;
22431
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22432
 
 
22433
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22434
 
-                  * extent[rank-1];
22435
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22436
 
 
22437
 
-      retarray->base_addr = xmalloc (alloc_size);
22438
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22439
 
       if (alloc_size == 0)
22440
 
        {
22441
 
          /* Make sure we have a zero-sized array.  */
22442
 
@@ -286,8 +285,7 @@
22443
 
 
22444
 
        }
22445
 
 
22446
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22447
 
-                  * extent[rank-1];
22448
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22449
 
 
22450
 
       retarray->offset = 0;
22451
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22452
 
@@ -299,7 +297,7 @@
22453
 
          return;
22454
 
        }
22455
 
       else
22456
 
-       retarray->base_addr = xmalloc (alloc_size);
22457
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22458
 
 
22459
 
     }
22460
 
   else
22461
 
@@ -472,8 +470,7 @@
22462
 
       retarray->offset = 0;
22463
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22464
 
 
22465
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22466
 
-                  * extent[rank-1];
22467
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22468
 
 
22469
 
       if (alloc_size == 0)
22470
 
        {
22471
 
@@ -482,7 +479,7 @@
22472
 
          return;
22473
 
        }
22474
 
       else
22475
 
-       retarray->base_addr = xmalloc (alloc_size);
22476
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22477
 
     }
22478
 
   else
22479
 
     {
22480
 
Index: libgfortran/generated/minloc1_16_r16.c
22481
 
===================================================================
22482
 
--- a/src/libgfortran/generated/minloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
22483
 
+++ b/src/libgfortran/generated/minloc1_16_r16.c        (.../branches/gcc-4_8-branch)
22484
 
@@ -98,10 +98,9 @@
22485
 
       retarray->offset = 0;
22486
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22487
 
 
22488
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22489
 
-                  * extent[rank-1];
22490
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22491
 
 
22492
 
-      retarray->base_addr = xmalloc (alloc_size);
22493
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22494
 
       if (alloc_size == 0)
22495
 
        {
22496
 
          /* Make sure we have a zero-sized array.  */
22497
 
@@ -294,8 +293,7 @@
22498
 
 
22499
 
        }
22500
 
 
22501
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22502
 
-                  * extent[rank-1];
22503
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22504
 
 
22505
 
       retarray->offset = 0;
22506
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22507
 
@@ -307,7 +305,7 @@
22508
 
          return;
22509
 
        }
22510
 
       else
22511
 
-       retarray->base_addr = xmalloc (alloc_size);
22512
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22513
 
 
22514
 
     }
22515
 
   else
22516
 
@@ -485,8 +483,7 @@
22517
 
       retarray->offset = 0;
22518
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22519
 
 
22520
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22521
 
-                  * extent[rank-1];
22522
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22523
 
 
22524
 
       if (alloc_size == 0)
22525
 
        {
22526
 
@@ -495,7 +492,7 @@
22527
 
          return;
22528
 
        }
22529
 
       else
22530
 
-       retarray->base_addr = xmalloc (alloc_size);
22531
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22532
 
     }
22533
 
   else
22534
 
     {
22535
 
Index: libgfortran/generated/unpack_i16.c
22536
 
===================================================================
22537
 
--- a/src/libgfortran/generated/unpack_i16.c    (.../tags/gcc_4_8_3_release)
22538
 
+++ b/src/libgfortran/generated/unpack_i16.c    (.../branches/gcc-4_8-branch)
22539
 
@@ -99,7 +99,7 @@
22540
 
          rs *= extent[n];
22541
 
        }
22542
 
       ret->offset = 0;
22543
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
22544
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
22545
 
     }
22546
 
   else
22547
 
     {
22548
 
@@ -244,7 +244,7 @@
22549
 
          rs *= extent[n];
22550
 
        }
22551
 
       ret->offset = 0;
22552
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
22553
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
22554
 
     }
22555
 
   else
22556
 
     {
22557
 
Index: libgfortran/generated/sum_i8.c
22558
 
===================================================================
22559
 
--- a/src/libgfortran/generated/sum_i8.c        (.../tags/gcc_4_8_3_release)
22560
 
+++ b/src/libgfortran/generated/sum_i8.c        (.../branches/gcc-4_8-branch)
22561
 
@@ -97,10 +97,9 @@
22562
 
       retarray->offset = 0;
22563
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22564
 
 
22565
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22566
 
-                  * extent[rank-1];
22567
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22568
 
 
22569
 
-      retarray->base_addr = xmalloc (alloc_size);
22570
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22571
 
       if (alloc_size == 0)
22572
 
        {
22573
 
          /* Make sure we have a zero-sized array.  */
22574
 
@@ -272,8 +271,7 @@
22575
 
 
22576
 
        }
22577
 
 
22578
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22579
 
-                  * extent[rank-1];
22580
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22581
 
 
22582
 
       retarray->offset = 0;
22583
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22584
 
@@ -285,7 +283,7 @@
22585
 
          return;
22586
 
        }
22587
 
       else
22588
 
-       retarray->base_addr = xmalloc (alloc_size);
22589
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22590
 
 
22591
 
     }
22592
 
   else
22593
 
@@ -430,8 +428,7 @@
22594
 
       retarray->offset = 0;
22595
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22596
 
 
22597
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22598
 
-                  * extent[rank-1];
22599
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22600
 
 
22601
 
       if (alloc_size == 0)
22602
 
        {
22603
 
@@ -440,7 +437,7 @@
22604
 
          return;
22605
 
        }
22606
 
       else
22607
 
-       retarray->base_addr = xmalloc (alloc_size);
22608
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22609
 
     }
22610
 
   else
22611
 
     {
22612
 
Index: libgfortran/generated/pack_i1.c
22613
 
===================================================================
22614
 
--- a/src/libgfortran/generated/pack_i1.c       (.../tags/gcc_4_8_3_release)
22615
 
+++ b/src/libgfortran/generated/pack_i1.c       (.../branches/gcc-4_8-branch)
22616
 
@@ -167,8 +167,8 @@
22617
 
 
22618
 
          ret->offset = 0;
22619
 
 
22620
 
-         /* xmalloc allocates a single byte for zero size.  */
22621
 
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
22622
 
+         /* xmallocarray allocates a single byte for zero size.  */
22623
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
22624
 
 
22625
 
          if (total == 0)
22626
 
            return;
22627
 
Index: libgfortran/generated/any_l16.c
22628
 
===================================================================
22629
 
--- a/src/libgfortran/generated/any_l16.c       (.../tags/gcc_4_8_3_release)
22630
 
+++ b/src/libgfortran/generated/any_l16.c       (.../branches/gcc-4_8-branch)
22631
 
@@ -101,8 +101,7 @@
22632
 
       retarray->offset = 0;
22633
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22634
 
 
22635
 
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22636
 
-                  * extent[rank-1];
22637
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22638
 
 
22639
 
       if (alloc_size == 0)
22640
 
        {
22641
 
@@ -111,7 +110,7 @@
22642
 
          return;
22643
 
        }
22644
 
       else
22645
 
-       retarray->base_addr = xmalloc (alloc_size);
22646
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
22647
 
     }
22648
 
   else
22649
 
     {
22650
 
Index: libgfortran/generated/spread_i8.c
22651
 
===================================================================
22652
 
--- a/src/libgfortran/generated/spread_i8.c     (.../tags/gcc_4_8_3_release)
22653
 
+++ b/src/libgfortran/generated/spread_i8.c     (.../branches/gcc-4_8-branch)
22654
 
@@ -101,8 +101,8 @@
22655
 
        }
22656
 
       ret->offset = 0;
22657
 
 
22658
 
-      /* xmalloc allocates a single byte for zero size.  */
22659
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
22660
 
+      /* xmallocarray allocates a single byte for zero size.  */
22661
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
22662
 
       if (rs <= 0)
22663
 
         return;
22664
 
     }
22665
 
@@ -244,7 +244,7 @@
22666
 
 
22667
 
   if (ret->base_addr == NULL)
22668
 
     {
22669
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
22670
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
22671
 
       ret->offset = 0;
22672
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
22673
 
     }
22674
 
Index: libgfortran/generated/maxval_i2.c
22675
 
===================================================================
22676
 
--- a/src/libgfortran/generated/maxval_i2.c     (.../tags/gcc_4_8_3_release)
22677
 
+++ b/src/libgfortran/generated/maxval_i2.c     (.../branches/gcc-4_8-branch)
22678
 
@@ -97,10 +97,9 @@
22679
 
       retarray->offset = 0;
22680
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22681
 
 
22682
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22683
 
-                  * extent[rank-1];
22684
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22685
 
 
22686
 
-      retarray->base_addr = xmalloc (alloc_size);
22687
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22688
 
       if (alloc_size == 0)
22689
 
        {
22690
 
          /* Make sure we have a zero-sized array.  */
22691
 
@@ -286,8 +285,7 @@
22692
 
 
22693
 
        }
22694
 
 
22695
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22696
 
-                  * extent[rank-1];
22697
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22698
 
 
22699
 
       retarray->offset = 0;
22700
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22701
 
@@ -299,7 +297,7 @@
22702
 
          return;
22703
 
        }
22704
 
       else
22705
 
-       retarray->base_addr = xmalloc (alloc_size);
22706
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22707
 
 
22708
 
     }
22709
 
   else
22710
 
@@ -472,8 +470,7 @@
22711
 
       retarray->offset = 0;
22712
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22713
 
 
22714
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22715
 
-                  * extent[rank-1];
22716
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22717
 
 
22718
 
       if (alloc_size == 0)
22719
 
        {
22720
 
@@ -482,7 +479,7 @@
22721
 
          return;
22722
 
        }
22723
 
       else
22724
 
-       retarray->base_addr = xmalloc (alloc_size);
22725
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22726
 
     }
22727
 
   else
22728
 
     {
22729
 
Index: libgfortran/generated/maxloc1_8_i4.c
22730
 
===================================================================
22731
 
--- a/src/libgfortran/generated/maxloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
22732
 
+++ b/src/libgfortran/generated/maxloc1_8_i4.c  (.../branches/gcc-4_8-branch)
22733
 
@@ -98,10 +98,9 @@
22734
 
       retarray->offset = 0;
22735
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22736
 
 
22737
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22738
 
-                  * extent[rank-1];
22739
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22740
 
 
22741
 
-      retarray->base_addr = xmalloc (alloc_size);
22742
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22743
 
       if (alloc_size == 0)
22744
 
        {
22745
 
          /* Make sure we have a zero-sized array.  */
22746
 
@@ -294,8 +293,7 @@
22747
 
 
22748
 
        }
22749
 
 
22750
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22751
 
-                  * extent[rank-1];
22752
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22753
 
 
22754
 
       retarray->offset = 0;
22755
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22756
 
@@ -307,7 +305,7 @@
22757
 
          return;
22758
 
        }
22759
 
       else
22760
 
-       retarray->base_addr = xmalloc (alloc_size);
22761
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22762
 
 
22763
 
     }
22764
 
   else
22765
 
@@ -485,8 +483,7 @@
22766
 
       retarray->offset = 0;
22767
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22768
 
 
22769
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22770
 
-                  * extent[rank-1];
22771
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22772
 
 
22773
 
       if (alloc_size == 0)
22774
 
        {
22775
 
@@ -495,7 +492,7 @@
22776
 
          return;
22777
 
        }
22778
 
       else
22779
 
-       retarray->base_addr = xmalloc (alloc_size);
22780
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22781
 
     }
22782
 
   else
22783
 
     {
22784
 
Index: libgfortran/generated/unpack_r8.c
22785
 
===================================================================
22786
 
--- a/src/libgfortran/generated/unpack_r8.c     (.../tags/gcc_4_8_3_release)
22787
 
+++ b/src/libgfortran/generated/unpack_r8.c     (.../branches/gcc-4_8-branch)
22788
 
@@ -99,7 +99,7 @@
22789
 
          rs *= extent[n];
22790
 
        }
22791
 
       ret->offset = 0;
22792
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
22793
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
22794
 
     }
22795
 
   else
22796
 
     {
22797
 
@@ -244,7 +244,7 @@
22798
 
          rs *= extent[n];
22799
 
        }
22800
 
       ret->offset = 0;
22801
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
22802
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
22803
 
     }
22804
 
   else
22805
 
     {
22806
 
Index: libgfortran/generated/maxloc0_4_r4.c
22807
 
===================================================================
22808
 
--- a/src/libgfortran/generated/maxloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
22809
 
+++ b/src/libgfortran/generated/maxloc0_4_r4.c  (.../branches/gcc-4_8-branch)
22810
 
@@ -58,7 +58,7 @@
22811
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22812
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22813
 
       retarray->offset = 0;
22814
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22815
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22816
 
     }
22817
 
   else
22818
 
     {
22819
 
@@ -199,7 +199,7 @@
22820
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22821
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22822
 
       retarray->offset = 0;
22823
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22824
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22825
 
     }
22826
 
   else
22827
 
     {
22828
 
@@ -367,7 +367,7 @@
22829
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22830
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22831
 
       retarray->offset = 0;
22832
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22833
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22834
 
     }
22835
 
   else if (unlikely (compile_options.bounds_check))
22836
 
     {
22837
 
Index: libgfortran/generated/all_l1.c
22838
 
===================================================================
22839
 
--- a/src/libgfortran/generated/all_l1.c        (.../tags/gcc_4_8_3_release)
22840
 
+++ b/src/libgfortran/generated/all_l1.c        (.../branches/gcc-4_8-branch)
22841
 
@@ -101,8 +101,7 @@
22842
 
       retarray->offset = 0;
22843
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22844
 
 
22845
 
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22846
 
-                  * extent[rank-1];
22847
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22848
 
 
22849
 
       if (alloc_size == 0)
22850
 
        {
22851
 
@@ -111,7 +110,7 @@
22852
 
          return;
22853
 
        }
22854
 
       else
22855
 
-       retarray->base_addr = xmalloc (alloc_size);
22856
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
22857
 
     }
22858
 
   else
22859
 
     {
22860
 
Index: libgfortran/generated/matmul_r8.c
22861
 
===================================================================
22862
 
--- a/src/libgfortran/generated/matmul_r8.c     (.../tags/gcc_4_8_3_release)
22863
 
+++ b/src/libgfortran/generated/matmul_r8.c     (.../branches/gcc-4_8-branch)
22864
 
@@ -124,7 +124,7 @@
22865
 
         }
22866
 
 
22867
 
       retarray->base_addr
22868
 
-       = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
22869
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
22870
 
       retarray->offset = 0;
22871
 
     }
22872
 
     else if (unlikely (compile_options.bounds_check))
22873
 
Index: libgfortran/generated/minloc0_4_r16.c
22874
 
===================================================================
22875
 
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
22876
 
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
22877
 
@@ -58,7 +58,7 @@
22878
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22879
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22880
 
       retarray->offset = 0;
22881
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22882
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22883
 
     }
22884
 
   else
22885
 
     {
22886
 
@@ -199,7 +199,7 @@
22887
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22888
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22889
 
       retarray->offset = 0;
22890
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22891
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22892
 
     }
22893
 
   else
22894
 
     {
22895
 
@@ -367,7 +367,7 @@
22896
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22897
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22898
 
       retarray->offset = 0;
22899
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22900
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22901
 
     }
22902
 
   else if (unlikely (compile_options.bounds_check))
22903
 
     {
22904
 
Index: libgfortran/generated/maxloc0_4_i2.c
22905
 
===================================================================
22906
 
--- a/src/libgfortran/generated/maxloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
22907
 
+++ b/src/libgfortran/generated/maxloc0_4_i2.c  (.../branches/gcc-4_8-branch)
22908
 
@@ -58,7 +58,7 @@
22909
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22910
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22911
 
       retarray->offset = 0;
22912
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22913
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22914
 
     }
22915
 
   else
22916
 
     {
22917
 
@@ -199,7 +199,7 @@
22918
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22919
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22920
 
       retarray->offset = 0;
22921
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22922
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22923
 
     }
22924
 
   else
22925
 
     {
22926
 
@@ -367,7 +367,7 @@
22927
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22928
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22929
 
       retarray->offset = 0;
22930
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22931
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22932
 
     }
22933
 
   else if (unlikely (compile_options.bounds_check))
22934
 
     {
22935
 
Index: libgfortran/generated/minloc1_8_r16.c
22936
 
===================================================================
22937
 
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
22938
 
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
22939
 
@@ -98,10 +98,9 @@
22940
 
       retarray->offset = 0;
22941
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22942
 
 
22943
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22944
 
-                  * extent[rank-1];
22945
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22946
 
 
22947
 
-      retarray->base_addr = xmalloc (alloc_size);
22948
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22949
 
       if (alloc_size == 0)
22950
 
        {
22951
 
          /* Make sure we have a zero-sized array.  */
22952
 
@@ -294,8 +293,7 @@
22953
 
 
22954
 
        }
22955
 
 
22956
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22957
 
-                  * extent[rank-1];
22958
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22959
 
 
22960
 
       retarray->offset = 0;
22961
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22962
 
@@ -307,7 +305,7 @@
22963
 
          return;
22964
 
        }
22965
 
       else
22966
 
-       retarray->base_addr = xmalloc (alloc_size);
22967
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22968
 
 
22969
 
     }
22970
 
   else
22971
 
@@ -485,8 +483,7 @@
22972
 
       retarray->offset = 0;
22973
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22974
 
 
22975
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22976
 
-                  * extent[rank-1];
22977
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22978
 
 
22979
 
       if (alloc_size == 0)
22980
 
        {
22981
 
@@ -495,7 +492,7 @@
22982
 
          return;
22983
 
        }
22984
 
       else
22985
 
-       retarray->base_addr = xmalloc (alloc_size);
22986
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22987
 
     }
22988
 
   else
22989
 
     {
22990
 
Index: libgfortran/generated/pack_c10.c
22991
 
===================================================================
22992
 
--- a/src/libgfortran/generated/pack_c10.c      (.../tags/gcc_4_8_3_release)
22993
 
+++ b/src/libgfortran/generated/pack_c10.c      (.../branches/gcc-4_8-branch)
22994
 
@@ -167,8 +167,8 @@
22995
 
 
22996
 
          ret->offset = 0;
22997
 
 
22998
 
-         /* xmalloc allocates a single byte for zero size.  */
22999
 
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
23000
 
+         /* xmallocarray allocates a single byte for zero size.  */
23001
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
23002
 
 
23003
 
          if (total == 0)
23004
 
            return;
23005
 
Index: libgfortran/generated/pack_r4.c
23006
 
===================================================================
23007
 
--- a/src/libgfortran/generated/pack_r4.c       (.../tags/gcc_4_8_3_release)
23008
 
+++ b/src/libgfortran/generated/pack_r4.c       (.../branches/gcc-4_8-branch)
23009
 
@@ -167,8 +167,8 @@
23010
 
 
23011
 
          ret->offset = 0;
23012
 
 
23013
 
-         /* xmalloc allocates a single byte for zero size.  */
23014
 
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
23015
 
+         /* xmallocarray allocates a single byte for zero size.  */
23016
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
23017
 
 
23018
 
          if (total == 0)
23019
 
            return;
23020
 
Index: libgfortran/generated/transpose_c16.c
23021
 
===================================================================
23022
 
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
23023
 
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
23024
 
@@ -60,7 +60,8 @@
23025
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
23026
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
23027
 
 
23028
 
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
23029
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
23030
 
+                                     sizeof (GFC_COMPLEX_16));
23031
 
       ret->offset = 0;
23032
 
     } else if (unlikely (compile_options.bounds_check))
23033
 
     {
23034
 
Index: libgfortran/generated/maxloc0_8_i8.c
23035
 
===================================================================
23036
 
--- a/src/libgfortran/generated/maxloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
23037
 
+++ b/src/libgfortran/generated/maxloc0_8_i8.c  (.../branches/gcc-4_8-branch)
23038
 
@@ -58,7 +58,7 @@
23039
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23040
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23041
 
       retarray->offset = 0;
23042
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23043
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23044
 
     }
23045
 
   else
23046
 
     {
23047
 
@@ -199,7 +199,7 @@
23048
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23049
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23050
 
       retarray->offset = 0;
23051
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23052
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23053
 
     }
23054
 
   else
23055
 
     {
23056
 
@@ -367,7 +367,7 @@
23057
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23058
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23059
 
       retarray->offset = 0;
23060
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23061
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23062
 
     }
23063
 
   else if (unlikely (compile_options.bounds_check))
23064
 
     {
23065
 
Index: libgfortran/generated/minloc1_4_r8.c
23066
 
===================================================================
23067
 
--- a/src/libgfortran/generated/minloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
23068
 
+++ b/src/libgfortran/generated/minloc1_4_r8.c  (.../branches/gcc-4_8-branch)
23069
 
@@ -98,10 +98,9 @@
23070
 
       retarray->offset = 0;
23071
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23072
 
 
23073
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23074
 
-                  * extent[rank-1];
23075
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23076
 
 
23077
 
-      retarray->base_addr = xmalloc (alloc_size);
23078
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23079
 
       if (alloc_size == 0)
23080
 
        {
23081
 
          /* Make sure we have a zero-sized array.  */
23082
 
@@ -294,8 +293,7 @@
23083
 
 
23084
 
        }
23085
 
 
23086
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23087
 
-                  * extent[rank-1];
23088
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23089
 
 
23090
 
       retarray->offset = 0;
23091
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23092
 
@@ -307,7 +305,7 @@
23093
 
          return;
23094
 
        }
23095
 
       else
23096
 
-       retarray->base_addr = xmalloc (alloc_size);
23097
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23098
 
 
23099
 
     }
23100
 
   else
23101
 
@@ -485,8 +483,7 @@
23102
 
       retarray->offset = 0;
23103
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23104
 
 
23105
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23106
 
-                  * extent[rank-1];
23107
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23108
 
 
23109
 
       if (alloc_size == 0)
23110
 
        {
23111
 
@@ -495,7 +492,7 @@
23112
 
          return;
23113
 
        }
23114
 
       else
23115
 
-       retarray->base_addr = xmalloc (alloc_size);
23116
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23117
 
     }
23118
 
   else
23119
 
     {
23120
 
Index: libgfortran/generated/minloc1_16_i4.c
23121
 
===================================================================
23122
 
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
23123
 
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
23124
 
@@ -98,10 +98,9 @@
23125
 
       retarray->offset = 0;
23126
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23127
 
 
23128
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23129
 
-                  * extent[rank-1];
23130
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23131
 
 
23132
 
-      retarray->base_addr = xmalloc (alloc_size);
23133
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23134
 
       if (alloc_size == 0)
23135
 
        {
23136
 
          /* Make sure we have a zero-sized array.  */
23137
 
@@ -294,8 +293,7 @@
23138
 
 
23139
 
        }
23140
 
 
23141
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23142
 
-                  * extent[rank-1];
23143
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23144
 
 
23145
 
       retarray->offset = 0;
23146
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23147
 
@@ -307,7 +305,7 @@
23148
 
          return;
23149
 
        }
23150
 
       else
23151
 
-       retarray->base_addr = xmalloc (alloc_size);
23152
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23153
 
 
23154
 
     }
23155
 
   else
23156
 
@@ -485,8 +483,7 @@
23157
 
       retarray->offset = 0;
23158
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23159
 
 
23160
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23161
 
-                  * extent[rank-1];
23162
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23163
 
 
23164
 
       if (alloc_size == 0)
23165
 
        {
23166
 
@@ -495,7 +492,7 @@
23167
 
          return;
23168
 
        }
23169
 
       else
23170
 
-       retarray->base_addr = xmalloc (alloc_size);
23171
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23172
 
     }
23173
 
   else
23174
 
     {
23175
 
Index: libgfortran/generated/minloc0_16_i8.c
23176
 
===================================================================
23177
 
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
23178
 
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
23179
 
@@ -58,7 +58,7 @@
23180
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23181
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23182
 
       retarray->offset = 0;
23183
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23184
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23185
 
     }
23186
 
   else
23187
 
     {
23188
 
@@ -199,7 +199,7 @@
23189
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23190
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23191
 
       retarray->offset = 0;
23192
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23193
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23194
 
     }
23195
 
   else
23196
 
     {
23197
 
@@ -367,7 +367,7 @@
23198
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23199
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23200
 
       retarray->offset = 0;
23201
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23202
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23203
 
     }
23204
 
   else if (unlikely (compile_options.bounds_check))
23205
 
     {
23206
 
Index: libgfortran/generated/pack_i2.c
23207
 
===================================================================
23208
 
--- a/src/libgfortran/generated/pack_i2.c       (.../tags/gcc_4_8_3_release)
23209
 
+++ b/src/libgfortran/generated/pack_i2.c       (.../branches/gcc-4_8-branch)
23210
 
@@ -167,8 +167,8 @@
23211
 
 
23212
 
          ret->offset = 0;
23213
 
 
23214
 
-         /* xmalloc allocates a single byte for zero size.  */
23215
 
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
23216
 
+         /* xmallocarray allocates a single byte for zero size.  */
23217
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
23218
 
 
23219
 
          if (total == 0)
23220
 
            return;
23221
 
Index: libgfortran/generated/transpose_i8.c
23222
 
===================================================================
23223
 
--- a/src/libgfortran/generated/transpose_i8.c  (.../tags/gcc_4_8_3_release)
23224
 
+++ b/src/libgfortran/generated/transpose_i8.c  (.../branches/gcc-4_8-branch)
23225
 
@@ -60,7 +60,8 @@
23226
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
23227
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
23228
 
 
23229
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
23230
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
23231
 
+                                     sizeof (GFC_INTEGER_8));
23232
 
       ret->offset = 0;
23233
 
     } else if (unlikely (compile_options.bounds_check))
23234
 
     {
23235
 
Index: libgfortran/generated/eoshift1_16.c
23236
 
===================================================================
23237
 
--- a/src/libgfortran/generated/eoshift1_16.c   (.../tags/gcc_4_8_3_release)
23238
 
+++ b/src/libgfortran/generated/eoshift1_16.c   (.../branches/gcc-4_8-branch)
23239
 
@@ -105,8 +105,8 @@
23240
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
23241
 
 
23242
 
         }
23243
 
-      /* xmalloc allocates a single byte for zero size.  */
23244
 
-      ret->base_addr = xmalloc (size * arraysize);
23245
 
+      /* xmallocarray allocates a single byte for zero size.  */
23246
 
+      ret->base_addr = xmallocarray (arraysize, size);
23247
 
 
23248
 
     }
23249
 
   else if (unlikely (compile_options.bounds_check))
23250
 
Index: libgfortran/generated/all_l2.c
23251
 
===================================================================
23252
 
--- a/src/libgfortran/generated/all_l2.c        (.../tags/gcc_4_8_3_release)
23253
 
+++ b/src/libgfortran/generated/all_l2.c        (.../branches/gcc-4_8-branch)
23254
 
@@ -101,8 +101,7 @@
23255
 
       retarray->offset = 0;
23256
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23257
 
 
23258
 
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23259
 
-                  * extent[rank-1];
23260
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23261
 
 
23262
 
       if (alloc_size == 0)
23263
 
        {
23264
 
@@ -111,7 +110,7 @@
23265
 
          return;
23266
 
        }
23267
 
       else
23268
 
-       retarray->base_addr = xmalloc (alloc_size);
23269
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
23270
 
     }
23271
 
   else
23272
 
     {
23273
 
Index: libgfortran/generated/product_c4.c
23274
 
===================================================================
23275
 
--- a/src/libgfortran/generated/product_c4.c    (.../tags/gcc_4_8_3_release)
23276
 
+++ b/src/libgfortran/generated/product_c4.c    (.../branches/gcc-4_8-branch)
23277
 
@@ -97,10 +97,9 @@
23278
 
       retarray->offset = 0;
23279
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23280
 
 
23281
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23282
 
-                  * extent[rank-1];
23283
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23284
 
 
23285
 
-      retarray->base_addr = xmalloc (alloc_size);
23286
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23287
 
       if (alloc_size == 0)
23288
 
        {
23289
 
          /* Make sure we have a zero-sized array.  */
23290
 
@@ -272,8 +271,7 @@
23291
 
 
23292
 
        }
23293
 
 
23294
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23295
 
-                  * extent[rank-1];
23296
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23297
 
 
23298
 
       retarray->offset = 0;
23299
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23300
 
@@ -285,7 +283,7 @@
23301
 
          return;
23302
 
        }
23303
 
       else
23304
 
-       retarray->base_addr = xmalloc (alloc_size);
23305
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23306
 
 
23307
 
     }
23308
 
   else
23309
 
@@ -430,8 +428,7 @@
23310
 
       retarray->offset = 0;
23311
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23312
 
 
23313
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23314
 
-                  * extent[rank-1];
23315
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23316
 
 
23317
 
       if (alloc_size == 0)
23318
 
        {
23319
 
@@ -440,7 +437,7 @@
23320
 
          return;
23321
 
        }
23322
 
       else
23323
 
-       retarray->base_addr = xmalloc (alloc_size);
23324
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23325
 
     }
23326
 
   else
23327
 
     {
23328
 
Index: libgfortran/generated/iall_i1.c
23329
 
===================================================================
23330
 
--- a/src/libgfortran/generated/iall_i1.c       (.../tags/gcc_4_8_3_release)
23331
 
+++ b/src/libgfortran/generated/iall_i1.c       (.../branches/gcc-4_8-branch)
23332
 
@@ -97,10 +97,9 @@
23333
 
       retarray->offset = 0;
23334
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23335
 
 
23336
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23337
 
-                  * extent[rank-1];
23338
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23339
 
 
23340
 
-      retarray->base_addr = xmalloc (alloc_size);
23341
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23342
 
       if (alloc_size == 0)
23343
 
        {
23344
 
          /* Make sure we have a zero-sized array.  */
23345
 
@@ -272,8 +271,7 @@
23346
 
 
23347
 
        }
23348
 
 
23349
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23350
 
-                  * extent[rank-1];
23351
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23352
 
 
23353
 
       retarray->offset = 0;
23354
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23355
 
@@ -285,7 +283,7 @@
23356
 
          return;
23357
 
        }
23358
 
       else
23359
 
-       retarray->base_addr = xmalloc (alloc_size);
23360
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23361
 
 
23362
 
     }
23363
 
   else
23364
 
@@ -430,8 +428,7 @@
23365
 
       retarray->offset = 0;
23366
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23367
 
 
23368
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23369
 
-                  * extent[rank-1];
23370
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23371
 
 
23372
 
       if (alloc_size == 0)
23373
 
        {
23374
 
@@ -440,7 +437,7 @@
23375
 
          return;
23376
 
        }
23377
 
       else
23378
 
-       retarray->base_addr = xmalloc (alloc_size);
23379
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23380
 
     }
23381
 
   else
23382
 
     {
23383
 
Index: libgfortran/generated/reshape_i4.c
23384
 
===================================================================
23385
 
--- a/src/libgfortran/generated/reshape_i4.c    (.../tags/gcc_4_8_3_release)
23386
 
+++ b/src/libgfortran/generated/reshape_i4.c    (.../branches/gcc-4_8-branch)
23387
 
@@ -111,11 +111,11 @@
23388
 
       ret->offset = 0;
23389
 
 
23390
 
       if (unlikely (rs < 1))
23391
 
-        alloc_size = 1;
23392
 
+        alloc_size = 0;
23393
 
       else
23394
 
-        alloc_size = rs * sizeof (GFC_INTEGER_4);
23395
 
+        alloc_size = rs;
23396
 
 
23397
 
-      ret->base_addr = xmalloc (alloc_size);
23398
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23399
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23400
 
     }
23401
 
 
23402
 
Index: libgfortran/generated/in_pack_r10.c
23403
 
===================================================================
23404
 
--- a/src/libgfortran/generated/in_pack_r10.c   (.../tags/gcc_4_8_3_release)
23405
 
+++ b/src/libgfortran/generated/in_pack_r10.c   (.../branches/gcc-4_8-branch)
23406
 
@@ -76,7 +76,7 @@
23407
 
     return source->base_addr;
23408
 
 
23409
 
   /* Allocate storage for the destination.  */
23410
 
-  destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
23411
 
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
23412
 
   dest = destptr;
23413
 
   src = source->base_addr;
23414
 
   stride0 = stride[0];
23415
 
Index: libgfortran/generated/in_pack_c4.c
23416
 
===================================================================
23417
 
--- a/src/libgfortran/generated/in_pack_c4.c    (.../tags/gcc_4_8_3_release)
23418
 
+++ b/src/libgfortran/generated/in_pack_c4.c    (.../branches/gcc-4_8-branch)
23419
 
@@ -76,7 +76,7 @@
23420
 
     return source->base_addr;
23421
 
 
23422
 
   /* Allocate storage for the destination.  */
23423
 
-  destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
23424
 
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
23425
 
   dest = destptr;
23426
 
   src = source->base_addr;
23427
 
   stride0 = stride[0];
23428
 
Index: libgfortran/generated/all_l16.c
23429
 
===================================================================
23430
 
--- a/src/libgfortran/generated/all_l16.c       (.../tags/gcc_4_8_3_release)
23431
 
+++ b/src/libgfortran/generated/all_l16.c       (.../branches/gcc-4_8-branch)
23432
 
@@ -101,8 +101,7 @@
23433
 
       retarray->offset = 0;
23434
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23435
 
 
23436
 
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23437
 
-                  * extent[rank-1];
23438
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23439
 
 
23440
 
       if (alloc_size == 0)
23441
 
        {
23442
 
@@ -111,7 +110,7 @@
23443
 
          return;
23444
 
        }
23445
 
       else
23446
 
-       retarray->base_addr = xmalloc (alloc_size);
23447
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
23448
 
     }
23449
 
   else
23450
 
     {
23451
 
Index: libgfortran/generated/maxloc0_16_i1.c
23452
 
===================================================================
23453
 
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
23454
 
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
23455
 
@@ -58,7 +58,7 @@
23456
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23457
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23458
 
       retarray->offset = 0;
23459
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23460
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23461
 
     }
23462
 
   else
23463
 
     {
23464
 
@@ -199,7 +199,7 @@
23465
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23466
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23467
 
       retarray->offset = 0;
23468
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23469
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23470
 
     }
23471
 
   else
23472
 
     {
23473
 
@@ -367,7 +367,7 @@
23474
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23475
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23476
 
       retarray->offset = 0;
23477
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23478
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23479
 
     }
23480
 
   else if (unlikely (compile_options.bounds_check))
23481
 
     {
23482
 
Index: libgfortran/generated/maxloc1_8_r8.c
23483
 
===================================================================
23484
 
--- a/src/libgfortran/generated/maxloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
23485
 
+++ b/src/libgfortran/generated/maxloc1_8_r8.c  (.../branches/gcc-4_8-branch)
23486
 
@@ -98,10 +98,9 @@
23487
 
       retarray->offset = 0;
23488
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23489
 
 
23490
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23491
 
-                  * extent[rank-1];
23492
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23493
 
 
23494
 
-      retarray->base_addr = xmalloc (alloc_size);
23495
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23496
 
       if (alloc_size == 0)
23497
 
        {
23498
 
          /* Make sure we have a zero-sized array.  */
23499
 
@@ -294,8 +293,7 @@
23500
 
 
23501
 
        }
23502
 
 
23503
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23504
 
-                  * extent[rank-1];
23505
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23506
 
 
23507
 
       retarray->offset = 0;
23508
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23509
 
@@ -307,7 +305,7 @@
23510
 
          return;
23511
 
        }
23512
 
       else
23513
 
-       retarray->base_addr = xmalloc (alloc_size);
23514
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23515
 
 
23516
 
     }
23517
 
   else
23518
 
@@ -485,8 +483,7 @@
23519
 
       retarray->offset = 0;
23520
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23521
 
 
23522
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23523
 
-                  * extent[rank-1];
23524
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23525
 
 
23526
 
       if (alloc_size == 0)
23527
 
        {
23528
 
@@ -495,7 +492,7 @@
23529
 
          return;
23530
 
        }
23531
 
       else
23532
 
-       retarray->base_addr = xmalloc (alloc_size);
23533
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23534
 
     }
23535
 
   else
23536
 
     {
23537
 
Index: libgfortran/generated/minval_i16.c
23538
 
===================================================================
23539
 
--- a/src/libgfortran/generated/minval_i16.c    (.../tags/gcc_4_8_3_release)
23540
 
+++ b/src/libgfortran/generated/minval_i16.c    (.../branches/gcc-4_8-branch)
23541
 
@@ -97,10 +97,9 @@
23542
 
       retarray->offset = 0;
23543
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23544
 
 
23545
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23546
 
-                  * extent[rank-1];
23547
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23548
 
 
23549
 
-      retarray->base_addr = xmalloc (alloc_size);
23550
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23551
 
       if (alloc_size == 0)
23552
 
        {
23553
 
          /* Make sure we have a zero-sized array.  */
23554
 
@@ -286,8 +285,7 @@
23555
 
 
23556
 
        }
23557
 
 
23558
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23559
 
-                  * extent[rank-1];
23560
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23561
 
 
23562
 
       retarray->offset = 0;
23563
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23564
 
@@ -299,7 +297,7 @@
23565
 
          return;
23566
 
        }
23567
 
       else
23568
 
-       retarray->base_addr = xmalloc (alloc_size);
23569
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23570
 
 
23571
 
     }
23572
 
   else
23573
 
@@ -472,8 +470,7 @@
23574
 
       retarray->offset = 0;
23575
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23576
 
 
23577
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23578
 
-                  * extent[rank-1];
23579
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23580
 
 
23581
 
       if (alloc_size == 0)
23582
 
        {
23583
 
@@ -482,7 +479,7 @@
23584
 
          return;
23585
 
        }
23586
 
       else
23587
 
-       retarray->base_addr = xmalloc (alloc_size);
23588
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23589
 
     }
23590
 
   else
23591
 
     {
23592
 
Index: libgfortran/generated/reshape_r10.c
23593
 
===================================================================
23594
 
--- a/src/libgfortran/generated/reshape_r10.c   (.../tags/gcc_4_8_3_release)
23595
 
+++ b/src/libgfortran/generated/reshape_r10.c   (.../branches/gcc-4_8-branch)
23596
 
@@ -111,11 +111,11 @@
23597
 
       ret->offset = 0;
23598
 
 
23599
 
       if (unlikely (rs < 1))
23600
 
-        alloc_size = 1;
23601
 
+        alloc_size = 0;
23602
 
       else
23603
 
-        alloc_size = rs * sizeof (GFC_REAL_10);
23604
 
+        alloc_size = rs;
23605
 
 
23606
 
-      ret->base_addr = xmalloc (alloc_size);
23607
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23608
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23609
 
     }
23610
 
 
23611
 
Index: libgfortran/generated/unpack_r16.c
23612
 
===================================================================
23613
 
--- a/src/libgfortran/generated/unpack_r16.c    (.../tags/gcc_4_8_3_release)
23614
 
+++ b/src/libgfortran/generated/unpack_r16.c    (.../branches/gcc-4_8-branch)
23615
 
@@ -99,7 +99,7 @@
23616
 
          rs *= extent[n];
23617
 
        }
23618
 
       ret->offset = 0;
23619
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
23620
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
23621
 
     }
23622
 
   else
23623
 
     {
23624
 
@@ -244,7 +244,7 @@
23625
 
          rs *= extent[n];
23626
 
        }
23627
 
       ret->offset = 0;
23628
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
23629
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
23630
 
     }
23631
 
   else
23632
 
     {
23633
 
Index: libgfortran/generated/maxval_i4.c
23634
 
===================================================================
23635
 
--- a/src/libgfortran/generated/maxval_i4.c     (.../tags/gcc_4_8_3_release)
23636
 
+++ b/src/libgfortran/generated/maxval_i4.c     (.../branches/gcc-4_8-branch)
23637
 
@@ -97,10 +97,9 @@
23638
 
       retarray->offset = 0;
23639
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23640
 
 
23641
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23642
 
-                  * extent[rank-1];
23643
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23644
 
 
23645
 
-      retarray->base_addr = xmalloc (alloc_size);
23646
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23647
 
       if (alloc_size == 0)
23648
 
        {
23649
 
          /* Make sure we have a zero-sized array.  */
23650
 
@@ -286,8 +285,7 @@
23651
 
 
23652
 
        }
23653
 
 
23654
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23655
 
-                  * extent[rank-1];
23656
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23657
 
 
23658
 
       retarray->offset = 0;
23659
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23660
 
@@ -299,7 +297,7 @@
23661
 
          return;
23662
 
        }
23663
 
       else
23664
 
-       retarray->base_addr = xmalloc (alloc_size);
23665
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23666
 
 
23667
 
     }
23668
 
   else
23669
 
@@ -472,8 +470,7 @@
23670
 
       retarray->offset = 0;
23671
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23672
 
 
23673
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23674
 
-                  * extent[rank-1];
23675
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23676
 
 
23677
 
       if (alloc_size == 0)
23678
 
        {
23679
 
@@ -482,7 +479,7 @@
23680
 
          return;
23681
 
        }
23682
 
       else
23683
 
-       retarray->base_addr = xmalloc (alloc_size);
23684
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23685
 
     }
23686
 
   else
23687
 
     {
23688
 
Index: libgfortran/generated/minval_i8.c
23689
 
===================================================================
23690
 
--- a/src/libgfortran/generated/minval_i8.c     (.../tags/gcc_4_8_3_release)
23691
 
+++ b/src/libgfortran/generated/minval_i8.c     (.../branches/gcc-4_8-branch)
23692
 
@@ -97,10 +97,9 @@
23693
 
       retarray->offset = 0;
23694
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23695
 
 
23696
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23697
 
-                  * extent[rank-1];
23698
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23699
 
 
23700
 
-      retarray->base_addr = xmalloc (alloc_size);
23701
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23702
 
       if (alloc_size == 0)
23703
 
        {
23704
 
          /* Make sure we have a zero-sized array.  */
23705
 
@@ -286,8 +285,7 @@
23706
 
 
23707
 
        }
23708
 
 
23709
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23710
 
-                  * extent[rank-1];
23711
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23712
 
 
23713
 
       retarray->offset = 0;
23714
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23715
 
@@ -299,7 +297,7 @@
23716
 
          return;
23717
 
        }
23718
 
       else
23719
 
-       retarray->base_addr = xmalloc (alloc_size);
23720
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23721
 
 
23722
 
     }
23723
 
   else
23724
 
@@ -472,8 +470,7 @@
23725
 
       retarray->offset = 0;
23726
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23727
 
 
23728
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23729
 
-                  * extent[rank-1];
23730
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23731
 
 
23732
 
       if (alloc_size == 0)
23733
 
        {
23734
 
@@ -482,7 +479,7 @@
23735
 
          return;
23736
 
        }
23737
 
       else
23738
 
-       retarray->base_addr = xmalloc (alloc_size);
23739
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23740
 
     }
23741
 
   else
23742
 
     {
23743
 
Index: libgfortran/generated/maxloc0_16_i16.c
23744
 
===================================================================
23745
 
--- a/src/libgfortran/generated/maxloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
23746
 
+++ b/src/libgfortran/generated/maxloc0_16_i16.c        (.../branches/gcc-4_8-branch)
23747
 
@@ -58,7 +58,7 @@
23748
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23749
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23750
 
       retarray->offset = 0;
23751
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23752
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23753
 
     }
23754
 
   else
23755
 
     {
23756
 
@@ -199,7 +199,7 @@
23757
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23758
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23759
 
       retarray->offset = 0;
23760
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23761
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23762
 
     }
23763
 
   else
23764
 
     {
23765
 
@@ -367,7 +367,7 @@
23766
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23767
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23768
 
       retarray->offset = 0;
23769
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23770
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23771
 
     }
23772
 
   else if (unlikely (compile_options.bounds_check))
23773
 
     {
23774
 
Index: libgfortran/generated/shape_i4.c
23775
 
===================================================================
23776
 
--- a/src/libgfortran/generated/shape_i4.c      (.../tags/gcc_4_8_3_release)
23777
 
+++ b/src/libgfortran/generated/shape_i4.c      (.../branches/gcc-4_8-branch)
23778
 
@@ -49,7 +49,7 @@
23779
 
     {
23780
 
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
23781
 
       ret->offset = 0;
23782
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23783
 
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23784
 
     }
23785
 
 
23786
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
23787
 
Index: libgfortran/generated/minloc1_4_i16.c
23788
 
===================================================================
23789
 
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
23790
 
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
23791
 
@@ -98,10 +98,9 @@
23792
 
       retarray->offset = 0;
23793
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23794
 
 
23795
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23796
 
-                  * extent[rank-1];
23797
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23798
 
 
23799
 
-      retarray->base_addr = xmalloc (alloc_size);
23800
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23801
 
       if (alloc_size == 0)
23802
 
        {
23803
 
          /* Make sure we have a zero-sized array.  */
23804
 
@@ -294,8 +293,7 @@
23805
 
 
23806
 
        }
23807
 
 
23808
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23809
 
-                  * extent[rank-1];
23810
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23811
 
 
23812
 
       retarray->offset = 0;
23813
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23814
 
@@ -307,7 +305,7 @@
23815
 
          return;
23816
 
        }
23817
 
       else
23818
 
-       retarray->base_addr = xmalloc (alloc_size);
23819
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23820
 
 
23821
 
     }
23822
 
   else
23823
 
@@ -485,8 +483,7 @@
23824
 
       retarray->offset = 0;
23825
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23826
 
 
23827
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23828
 
-                  * extent[rank-1];
23829
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23830
 
 
23831
 
       if (alloc_size == 0)
23832
 
        {
23833
 
@@ -495,7 +492,7 @@
23834
 
          return;
23835
 
        }
23836
 
       else
23837
 
-       retarray->base_addr = xmalloc (alloc_size);
23838
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23839
 
     }
23840
 
   else
23841
 
     {
23842
 
Index: libgfortran/generated/maxloc0_4_r10.c
23843
 
===================================================================
23844
 
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
23845
 
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
23846
 
@@ -58,7 +58,7 @@
23847
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23848
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23849
 
       retarray->offset = 0;
23850
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23851
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23852
 
     }
23853
 
   else
23854
 
     {
23855
 
@@ -199,7 +199,7 @@
23856
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23857
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23858
 
       retarray->offset = 0;
23859
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23860
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23861
 
     }
23862
 
   else
23863
 
     {
23864
 
@@ -367,7 +367,7 @@
23865
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23866
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23867
 
       retarray->offset = 0;
23868
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23869
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23870
 
     }
23871
 
   else if (unlikely (compile_options.bounds_check))
23872
 
     {
23873
 
Index: libgfortran/generated/maxloc0_8_i16.c
23874
 
===================================================================
23875
 
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
23876
 
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
23877
 
@@ -58,7 +58,7 @@
23878
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23879
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23880
 
       retarray->offset = 0;
23881
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23882
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23883
 
     }
23884
 
   else
23885
 
     {
23886
 
@@ -199,7 +199,7 @@
23887
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23888
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23889
 
       retarray->offset = 0;
23890
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23891
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23892
 
     }
23893
 
   else
23894
 
     {
23895
 
@@ -367,7 +367,7 @@
23896
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23897
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23898
 
       retarray->offset = 0;
23899
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23900
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23901
 
     }
23902
 
   else if (unlikely (compile_options.bounds_check))
23903
 
     {
23904
 
Index: libgfortran/generated/iall_i2.c
23905
 
===================================================================
23906
 
--- a/src/libgfortran/generated/iall_i2.c       (.../tags/gcc_4_8_3_release)
23907
 
+++ b/src/libgfortran/generated/iall_i2.c       (.../branches/gcc-4_8-branch)
23908
 
@@ -97,10 +97,9 @@
23909
 
       retarray->offset = 0;
23910
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23911
 
 
23912
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23913
 
-                  * extent[rank-1];
23914
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23915
 
 
23916
 
-      retarray->base_addr = xmalloc (alloc_size);
23917
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23918
 
       if (alloc_size == 0)
23919
 
        {
23920
 
          /* Make sure we have a zero-sized array.  */
23921
 
@@ -272,8 +271,7 @@
23922
 
 
23923
 
        }
23924
 
 
23925
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23926
 
-                  * extent[rank-1];
23927
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23928
 
 
23929
 
       retarray->offset = 0;
23930
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23931
 
@@ -285,7 +283,7 @@
23932
 
          return;
23933
 
        }
23934
 
       else
23935
 
-       retarray->base_addr = xmalloc (alloc_size);
23936
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23937
 
 
23938
 
     }
23939
 
   else
23940
 
@@ -430,8 +428,7 @@
23941
 
       retarray->offset = 0;
23942
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23943
 
 
23944
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23945
 
-                  * extent[rank-1];
23946
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23947
 
 
23948
 
       if (alloc_size == 0)
23949
 
        {
23950
 
@@ -440,7 +437,7 @@
23951
 
          return;
23952
 
        }
23953
 
       else
23954
 
-       retarray->base_addr = xmalloc (alloc_size);
23955
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23956
 
     }
23957
 
   else
23958
 
     {
23959
 
Index: libgfortran/generated/maxloc1_8_r10.c
23960
 
===================================================================
23961
 
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
23962
 
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
23963
 
@@ -98,10 +98,9 @@
23964
 
       retarray->offset = 0;
23965
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23966
 
 
23967
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23968
 
-                  * extent[rank-1];
23969
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23970
 
 
23971
 
-      retarray->base_addr = xmalloc (alloc_size);
23972
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23973
 
       if (alloc_size == 0)
23974
 
        {
23975
 
          /* Make sure we have a zero-sized array.  */
23976
 
@@ -294,8 +293,7 @@
23977
 
 
23978
 
        }
23979
 
 
23980
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23981
 
-                  * extent[rank-1];
23982
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23983
 
 
23984
 
       retarray->offset = 0;
23985
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23986
 
@@ -307,7 +305,7 @@
23987
 
          return;
23988
 
        }
23989
 
       else
23990
 
-       retarray->base_addr = xmalloc (alloc_size);
23991
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23992
 
 
23993
 
     }
23994
 
   else
23995
 
@@ -485,8 +483,7 @@
23996
 
       retarray->offset = 0;
23997
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23998
 
 
23999
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24000
 
-                  * extent[rank-1];
24001
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24002
 
 
24003
 
       if (alloc_size == 0)
24004
 
        {
24005
 
@@ -495,7 +492,7 @@
24006
 
          return;
24007
 
        }
24008
 
       else
24009
 
-       retarray->base_addr = xmalloc (alloc_size);
24010
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24011
 
     }
24012
 
   else
24013
 
     {
24014
 
Index: libgfortran/generated/maxloc0_16_r4.c
24015
 
===================================================================
24016
 
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
24017
 
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
24018
 
@@ -58,7 +58,7 @@
24019
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24020
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24021
 
       retarray->offset = 0;
24022
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24023
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24024
 
     }
24025
 
   else
24026
 
     {
24027
 
@@ -199,7 +199,7 @@
24028
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24029
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24030
 
       retarray->offset = 0;
24031
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24032
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24033
 
     }
24034
 
   else
24035
 
     {
24036
 
@@ -367,7 +367,7 @@
24037
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24038
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24039
 
       retarray->offset = 0;
24040
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24041
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24042
 
     }
24043
 
   else if (unlikely (compile_options.bounds_check))
24044
 
     {
24045
 
Index: libgfortran/generated/minloc0_8_i1.c
24046
 
===================================================================
24047
 
--- a/src/libgfortran/generated/minloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
24048
 
+++ b/src/libgfortran/generated/minloc0_8_i1.c  (.../branches/gcc-4_8-branch)
24049
 
@@ -58,7 +58,7 @@
24050
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24051
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24052
 
       retarray->offset = 0;
24053
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24054
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24055
 
     }
24056
 
   else
24057
 
     {
24058
 
@@ -199,7 +199,7 @@
24059
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24060
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24061
 
       retarray->offset = 0;
24062
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24063
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24064
 
     }
24065
 
   else
24066
 
     {
24067
 
@@ -367,7 +367,7 @@
24068
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24069
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24070
 
       retarray->offset = 0;
24071
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24072
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24073
 
     }
24074
 
   else if (unlikely (compile_options.bounds_check))
24075
 
     {
24076
 
Index: libgfortran/generated/minloc1_16_r8.c
24077
 
===================================================================
24078
 
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
24079
 
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
24080
 
@@ -98,10 +98,9 @@
24081
 
       retarray->offset = 0;
24082
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24083
 
 
24084
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24085
 
-                  * extent[rank-1];
24086
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24087
 
 
24088
 
-      retarray->base_addr = xmalloc (alloc_size);
24089
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24090
 
       if (alloc_size == 0)
24091
 
        {
24092
 
          /* Make sure we have a zero-sized array.  */
24093
 
@@ -294,8 +293,7 @@
24094
 
 
24095
 
        }
24096
 
 
24097
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24098
 
-                  * extent[rank-1];
24099
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24100
 
 
24101
 
       retarray->offset = 0;
24102
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24103
 
@@ -307,7 +305,7 @@
24104
 
          return;
24105
 
        }
24106
 
       else
24107
 
-       retarray->base_addr = xmalloc (alloc_size);
24108
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24109
 
 
24110
 
     }
24111
 
   else
24112
 
@@ -485,8 +483,7 @@
24113
 
       retarray->offset = 0;
24114
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24115
 
 
24116
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24117
 
-                  * extent[rank-1];
24118
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24119
 
 
24120
 
       if (alloc_size == 0)
24121
 
        {
24122
 
@@ -495,7 +492,7 @@
24123
 
          return;
24124
 
        }
24125
 
       else
24126
 
-       retarray->base_addr = xmalloc (alloc_size);
24127
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24128
 
     }
24129
 
   else
24130
 
     {
24131
 
Index: libgfortran/generated/unpack_i8.c
24132
 
===================================================================
24133
 
--- a/src/libgfortran/generated/unpack_i8.c     (.../tags/gcc_4_8_3_release)
24134
 
+++ b/src/libgfortran/generated/unpack_i8.c     (.../branches/gcc-4_8-branch)
24135
 
@@ -99,7 +99,7 @@
24136
 
          rs *= extent[n];
24137
 
        }
24138
 
       ret->offset = 0;
24139
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
24140
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
24141
 
     }
24142
 
   else
24143
 
     {
24144
 
@@ -244,7 +244,7 @@
24145
 
          rs *= extent[n];
24146
 
        }
24147
 
       ret->offset = 0;
24148
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
24149
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
24150
 
     }
24151
 
   else
24152
 
     {
24153
 
Index: libgfortran/generated/maxloc0_4_i4.c
24154
 
===================================================================
24155
 
--- a/src/libgfortran/generated/maxloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
24156
 
+++ b/src/libgfortran/generated/maxloc0_4_i4.c  (.../branches/gcc-4_8-branch)
24157
 
@@ -58,7 +58,7 @@
24158
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24159
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24160
 
       retarray->offset = 0;
24161
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24162
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24163
 
     }
24164
 
   else
24165
 
     {
24166
 
@@ -199,7 +199,7 @@
24167
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24168
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24169
 
       retarray->offset = 0;
24170
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24171
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24172
 
     }
24173
 
   else
24174
 
     {
24175
 
@@ -367,7 +367,7 @@
24176
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24177
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24178
 
       retarray->offset = 0;
24179
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24180
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24181
 
     }
24182
 
   else if (unlikely (compile_options.bounds_check))
24183
 
     {
24184
 
Index: libgfortran/generated/count_4_l.c
24185
 
===================================================================
24186
 
--- a/src/libgfortran/generated/count_4_l.c     (.../tags/gcc_4_8_3_release)
24187
 
+++ b/src/libgfortran/generated/count_4_l.c     (.../branches/gcc-4_8-branch)
24188
 
@@ -101,8 +101,7 @@
24189
 
       retarray->offset = 0;
24190
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24191
 
 
24192
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24193
 
-                  * extent[rank-1];
24194
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24195
 
 
24196
 
       if (alloc_size == 0)
24197
 
        {
24198
 
@@ -111,7 +110,7 @@
24199
 
          return;
24200
 
        }
24201
 
       else
24202
 
-       retarray->base_addr = xmalloc (alloc_size);
24203
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24204
 
     }
24205
 
   else
24206
 
     {
24207
 
Index: libgfortran/generated/sum_r10.c
24208
 
===================================================================
24209
 
--- a/src/libgfortran/generated/sum_r10.c       (.../tags/gcc_4_8_3_release)
24210
 
+++ b/src/libgfortran/generated/sum_r10.c       (.../branches/gcc-4_8-branch)
24211
 
@@ -97,10 +97,9 @@
24212
 
       retarray->offset = 0;
24213
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24214
 
 
24215
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24216
 
-                  * extent[rank-1];
24217
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24218
 
 
24219
 
-      retarray->base_addr = xmalloc (alloc_size);
24220
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24221
 
       if (alloc_size == 0)
24222
 
        {
24223
 
          /* Make sure we have a zero-sized array.  */
24224
 
@@ -272,8 +271,7 @@
24225
 
 
24226
 
        }
24227
 
 
24228
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24229
 
-                  * extent[rank-1];
24230
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24231
 
 
24232
 
       retarray->offset = 0;
24233
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24234
 
@@ -285,7 +283,7 @@
24235
 
          return;
24236
 
        }
24237
 
       else
24238
 
-       retarray->base_addr = xmalloc (alloc_size);
24239
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24240
 
 
24241
 
     }
24242
 
   else
24243
 
@@ -430,8 +428,7 @@
24244
 
       retarray->offset = 0;
24245
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24246
 
 
24247
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24248
 
-                  * extent[rank-1];
24249
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24250
 
 
24251
 
       if (alloc_size == 0)
24252
 
        {
24253
 
@@ -440,7 +437,7 @@
24254
 
          return;
24255
 
        }
24256
 
       else
24257
 
-       retarray->base_addr = xmalloc (alloc_size);
24258
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24259
 
     }
24260
 
   else
24261
 
     {
24262
 
Index: libgfortran/generated/sum_c4.c
24263
 
===================================================================
24264
 
--- a/src/libgfortran/generated/sum_c4.c        (.../tags/gcc_4_8_3_release)
24265
 
+++ b/src/libgfortran/generated/sum_c4.c        (.../branches/gcc-4_8-branch)
24266
 
@@ -97,10 +97,9 @@
24267
 
       retarray->offset = 0;
24268
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24269
 
 
24270
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24271
 
-                  * extent[rank-1];
24272
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24273
 
 
24274
 
-      retarray->base_addr = xmalloc (alloc_size);
24275
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24276
 
       if (alloc_size == 0)
24277
 
        {
24278
 
          /* Make sure we have a zero-sized array.  */
24279
 
@@ -272,8 +271,7 @@
24280
 
 
24281
 
        }
24282
 
 
24283
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24284
 
-                  * extent[rank-1];
24285
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24286
 
 
24287
 
       retarray->offset = 0;
24288
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24289
 
@@ -285,7 +283,7 @@
24290
 
          return;
24291
 
        }
24292
 
       else
24293
 
-       retarray->base_addr = xmalloc (alloc_size);
24294
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24295
 
 
24296
 
     }
24297
 
   else
24298
 
@@ -430,8 +428,7 @@
24299
 
       retarray->offset = 0;
24300
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24301
 
 
24302
 
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24303
 
-                  * extent[rank-1];
24304
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24305
 
 
24306
 
       if (alloc_size == 0)
24307
 
        {
24308
 
@@ -440,7 +437,7 @@
24309
 
          return;
24310
 
        }
24311
 
       else
24312
 
-       retarray->base_addr = xmalloc (alloc_size);
24313
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24314
 
     }
24315
 
   else
24316
 
     {
24317
 
Index: libgfortran/generated/maxloc1_16_r10.c
24318
 
===================================================================
24319
 
--- a/src/libgfortran/generated/maxloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
24320
 
+++ b/src/libgfortran/generated/maxloc1_16_r10.c        (.../branches/gcc-4_8-branch)
24321
 
@@ -98,10 +98,9 @@
24322
 
       retarray->offset = 0;
24323
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24324
 
 
24325
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24326
 
-                  * extent[rank-1];
24327
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24328
 
 
24329
 
-      retarray->base_addr = xmalloc (alloc_size);
24330
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24331
 
       if (alloc_size == 0)
24332
 
        {
24333
 
          /* Make sure we have a zero-sized array.  */
24334
 
@@ -294,8 +293,7 @@
24335
 
 
24336
 
        }
24337
 
 
24338
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24339
 
-                  * extent[rank-1];
24340
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24341
 
 
24342
 
       retarray->offset = 0;
24343
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24344
 
@@ -307,7 +305,7 @@
24345
 
          return;
24346
 
        }
24347
 
       else
24348
 
-       retarray->base_addr = xmalloc (alloc_size);
24349
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24350
 
 
24351
 
     }
24352
 
   else
24353
 
@@ -485,8 +483,7 @@
24354
 
       retarray->offset = 0;
24355
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24356
 
 
24357
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24358
 
-                  * extent[rank-1];
24359
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24360
 
 
24361
 
       if (alloc_size == 0)
24362
 
        {
24363
 
@@ -495,7 +492,7 @@
24364
 
          return;
24365
 
        }
24366
 
       else
24367
 
-       retarray->base_addr = xmalloc (alloc_size);
24368
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24369
 
     }
24370
 
   else
24371
 
     {
24372
 
Index: libgfortran/generated/pack_i16.c
24373
 
===================================================================
24374
 
--- a/src/libgfortran/generated/pack_i16.c      (.../tags/gcc_4_8_3_release)
24375
 
+++ b/src/libgfortran/generated/pack_i16.c      (.../branches/gcc-4_8-branch)
24376
 
@@ -167,8 +167,8 @@
24377
 
 
24378
 
          ret->offset = 0;
24379
 
 
24380
 
-         /* xmalloc allocates a single byte for zero size.  */
24381
 
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
24382
 
+         /* xmallocarray allocates a single byte for zero size.  */
24383
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
24384
 
 
24385
 
          if (total == 0)
24386
 
            return;
24387
 
Index: libgfortran/generated/matmul_i8.c
24388
 
===================================================================
24389
 
--- a/src/libgfortran/generated/matmul_i8.c     (.../tags/gcc_4_8_3_release)
24390
 
+++ b/src/libgfortran/generated/matmul_i8.c     (.../branches/gcc-4_8-branch)
24391
 
@@ -124,7 +124,7 @@
24392
 
         }
24393
 
 
24394
 
       retarray->base_addr
24395
 
-       = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
24396
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
24397
 
       retarray->offset = 0;
24398
 
     }
24399
 
     else if (unlikely (compile_options.bounds_check))
24400
 
Index: libgfortran/generated/maxloc0_16_i2.c
24401
 
===================================================================
24402
 
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
24403
 
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
24404
 
@@ -58,7 +58,7 @@
24405
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24406
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24407
 
       retarray->offset = 0;
24408
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24409
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24410
 
     }
24411
 
   else
24412
 
     {
24413
 
@@ -199,7 +199,7 @@
24414
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24415
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24416
 
       retarray->offset = 0;
24417
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24418
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24419
 
     }
24420
 
   else
24421
 
     {
24422
 
@@ -367,7 +367,7 @@
24423
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24424
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24425
 
       retarray->offset = 0;
24426
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24427
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24428
 
     }
24429
 
   else if (unlikely (compile_options.bounds_check))
24430
 
     {
24431
 
Index: libgfortran/generated/spread_c4.c
24432
 
===================================================================
24433
 
--- a/src/libgfortran/generated/spread_c4.c     (.../tags/gcc_4_8_3_release)
24434
 
+++ b/src/libgfortran/generated/spread_c4.c     (.../branches/gcc-4_8-branch)
24435
 
@@ -101,8 +101,8 @@
24436
 
        }
24437
 
       ret->offset = 0;
24438
 
 
24439
 
-      /* xmalloc allocates a single byte for zero size.  */
24440
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
24441
 
+      /* xmallocarray allocates a single byte for zero size.  */
24442
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
24443
 
       if (rs <= 0)
24444
 
         return;
24445
 
     }
24446
 
@@ -244,7 +244,7 @@
24447
 
 
24448
 
   if (ret->base_addr == NULL)
24449
 
     {
24450
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
24451
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
24452
 
       ret->offset = 0;
24453
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
24454
 
     }
24455
 
Index: libgfortran/generated/maxval_r10.c
24456
 
===================================================================
24457
 
--- a/src/libgfortran/generated/maxval_r10.c    (.../tags/gcc_4_8_3_release)
24458
 
+++ b/src/libgfortran/generated/maxval_r10.c    (.../branches/gcc-4_8-branch)
24459
 
@@ -97,10 +97,9 @@
24460
 
       retarray->offset = 0;
24461
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24462
 
 
24463
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24464
 
-                  * extent[rank-1];
24465
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24466
 
 
24467
 
-      retarray->base_addr = xmalloc (alloc_size);
24468
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24469
 
       if (alloc_size == 0)
24470
 
        {
24471
 
          /* Make sure we have a zero-sized array.  */
24472
 
@@ -286,8 +285,7 @@
24473
 
 
24474
 
        }
24475
 
 
24476
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24477
 
-                  * extent[rank-1];
24478
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24479
 
 
24480
 
       retarray->offset = 0;
24481
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24482
 
@@ -299,7 +297,7 @@
24483
 
          return;
24484
 
        }
24485
 
       else
24486
 
-       retarray->base_addr = xmalloc (alloc_size);
24487
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24488
 
 
24489
 
     }
24490
 
   else
24491
 
@@ -472,8 +470,7 @@
24492
 
       retarray->offset = 0;
24493
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24494
 
 
24495
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24496
 
-                  * extent[rank-1];
24497
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24498
 
 
24499
 
       if (alloc_size == 0)
24500
 
        {
24501
 
@@ -482,7 +479,7 @@
24502
 
          return;
24503
 
        }
24504
 
       else
24505
 
-       retarray->base_addr = xmalloc (alloc_size);
24506
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24507
 
     }
24508
 
   else
24509
 
     {
24510
 
Index: libgfortran/generated/pack_i4.c
24511
 
===================================================================
24512
 
--- a/src/libgfortran/generated/pack_i4.c       (.../tags/gcc_4_8_3_release)
24513
 
+++ b/src/libgfortran/generated/pack_i4.c       (.../branches/gcc-4_8-branch)
24514
 
@@ -167,8 +167,8 @@
24515
 
 
24516
 
          ret->offset = 0;
24517
 
 
24518
 
-         /* xmalloc allocates a single byte for zero size.  */
24519
 
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
24520
 
+         /* xmallocarray allocates a single byte for zero size.  */
24521
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
24522
 
 
24523
 
          if (total == 0)
24524
 
            return;
24525
 
Index: libgfortran/generated/maxloc1_4_i1.c
24526
 
===================================================================
24527
 
--- a/src/libgfortran/generated/maxloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
24528
 
+++ b/src/libgfortran/generated/maxloc1_4_i1.c  (.../branches/gcc-4_8-branch)
24529
 
@@ -98,10 +98,9 @@
24530
 
       retarray->offset = 0;
24531
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24532
 
 
24533
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24534
 
-                  * extent[rank-1];
24535
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24536
 
 
24537
 
-      retarray->base_addr = xmalloc (alloc_size);
24538
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24539
 
       if (alloc_size == 0)
24540
 
        {
24541
 
          /* Make sure we have a zero-sized array.  */
24542
 
@@ -294,8 +293,7 @@
24543
 
 
24544
 
        }
24545
 
 
24546
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24547
 
-                  * extent[rank-1];
24548
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24549
 
 
24550
 
       retarray->offset = 0;
24551
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24552
 
@@ -307,7 +305,7 @@
24553
 
          return;
24554
 
        }
24555
 
       else
24556
 
-       retarray->base_addr = xmalloc (alloc_size);
24557
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24558
 
 
24559
 
     }
24560
 
   else
24561
 
@@ -485,8 +483,7 @@
24562
 
       retarray->offset = 0;
24563
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24564
 
 
24565
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24566
 
-                  * extent[rank-1];
24567
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24568
 
 
24569
 
       if (alloc_size == 0)
24570
 
        {
24571
 
@@ -495,7 +492,7 @@
24572
 
          return;
24573
 
        }
24574
 
       else
24575
 
-       retarray->base_addr = xmalloc (alloc_size);
24576
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24577
 
     }
24578
 
   else
24579
 
     {
24580
 
Index: libgfortran/generated/matmul_r10.c
24581
 
===================================================================
24582
 
--- a/src/libgfortran/generated/matmul_r10.c    (.../tags/gcc_4_8_3_release)
24583
 
+++ b/src/libgfortran/generated/matmul_r10.c    (.../branches/gcc-4_8-branch)
24584
 
@@ -124,7 +124,7 @@
24585
 
         }
24586
 
 
24587
 
       retarray->base_addr
24588
 
-       = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
24589
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
24590
 
       retarray->offset = 0;
24591
 
     }
24592
 
     else if (unlikely (compile_options.bounds_check))
24593
 
Index: libgfortran/generated/minloc1_4_i8.c
24594
 
===================================================================
24595
 
--- a/src/libgfortran/generated/minloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
24596
 
+++ b/src/libgfortran/generated/minloc1_4_i8.c  (.../branches/gcc-4_8-branch)
24597
 
@@ -98,10 +98,9 @@
24598
 
       retarray->offset = 0;
24599
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24600
 
 
24601
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24602
 
-                  * extent[rank-1];
24603
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24604
 
 
24605
 
-      retarray->base_addr = xmalloc (alloc_size);
24606
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24607
 
       if (alloc_size == 0)
24608
 
        {
24609
 
          /* Make sure we have a zero-sized array.  */
24610
 
@@ -294,8 +293,7 @@
24611
 
 
24612
 
        }
24613
 
 
24614
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24615
 
-                  * extent[rank-1];
24616
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24617
 
 
24618
 
       retarray->offset = 0;
24619
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24620
 
@@ -307,7 +305,7 @@
24621
 
          return;
24622
 
        }
24623
 
       else
24624
 
-       retarray->base_addr = xmalloc (alloc_size);
24625
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24626
 
 
24627
 
     }
24628
 
   else
24629
 
@@ -485,8 +483,7 @@
24630
 
       retarray->offset = 0;
24631
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24632
 
 
24633
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24634
 
-                  * extent[rank-1];
24635
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24636
 
 
24637
 
       if (alloc_size == 0)
24638
 
        {
24639
 
@@ -495,7 +492,7 @@
24640
 
          return;
24641
 
        }
24642
 
       else
24643
 
-       retarray->base_addr = xmalloc (alloc_size);
24644
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24645
 
     }
24646
 
   else
24647
 
     {
24648
 
Index: libgfortran/generated/minloc0_8_r4.c
24649
 
===================================================================
24650
 
--- a/src/libgfortran/generated/minloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
24651
 
+++ b/src/libgfortran/generated/minloc0_8_r4.c  (.../branches/gcc-4_8-branch)
24652
 
@@ -58,7 +58,7 @@
24653
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24654
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24655
 
       retarray->offset = 0;
24656
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24657
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24658
 
     }
24659
 
   else
24660
 
     {
24661
 
@@ -199,7 +199,7 @@
24662
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24663
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24664
 
       retarray->offset = 0;
24665
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24666
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24667
 
     }
24668
 
   else
24669
 
     {
24670
 
@@ -367,7 +367,7 @@
24671
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24672
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24673
 
       retarray->offset = 0;
24674
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24675
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24676
 
     }
24677
 
   else if (unlikely (compile_options.bounds_check))
24678
 
     {
24679
 
Index: libgfortran/generated/matmul_l4.c
24680
 
===================================================================
24681
 
--- a/src/libgfortran/generated/matmul_l4.c     (.../tags/gcc_4_8_3_release)
24682
 
+++ b/src/libgfortran/generated/matmul_l4.c     (.../branches/gcc-4_8-branch)
24683
 
@@ -88,7 +88,7 @@
24684
 
         }
24685
 
           
24686
 
       retarray->base_addr
24687
 
-       = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
24688
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
24689
 
       retarray->offset = 0;
24690
 
     }
24691
 
     else if (unlikely (compile_options.bounds_check))
24692
 
Index: libgfortran/generated/reshape_r8.c
24693
 
===================================================================
24694
 
--- a/src/libgfortran/generated/reshape_r8.c    (.../tags/gcc_4_8_3_release)
24695
 
+++ b/src/libgfortran/generated/reshape_r8.c    (.../branches/gcc-4_8-branch)
24696
 
@@ -111,11 +111,11 @@
24697
 
       ret->offset = 0;
24698
 
 
24699
 
       if (unlikely (rs < 1))
24700
 
-        alloc_size = 1;
24701
 
+        alloc_size = 0;
24702
 
       else
24703
 
-        alloc_size = rs * sizeof (GFC_REAL_8);
24704
 
+        alloc_size = rs;
24705
 
 
24706
 
-      ret->base_addr = xmalloc (alloc_size);
24707
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24708
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24709
 
     }
24710
 
 
24711
 
Index: libgfortran/generated/in_pack_c10.c
24712
 
===================================================================
24713
 
--- a/src/libgfortran/generated/in_pack_c10.c   (.../tags/gcc_4_8_3_release)
24714
 
+++ b/src/libgfortran/generated/in_pack_c10.c   (.../branches/gcc-4_8-branch)
24715
 
@@ -76,7 +76,7 @@
24716
 
     return source->base_addr;
24717
 
 
24718
 
   /* Allocate storage for the destination.  */
24719
 
-  destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
24720
 
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
24721
 
   dest = destptr;
24722
 
   src = source->base_addr;
24723
 
   stride0 = stride[0];
24724
 
Index: libgfortran/generated/all_l4.c
24725
 
===================================================================
24726
 
--- a/src/libgfortran/generated/all_l4.c        (.../tags/gcc_4_8_3_release)
24727
 
+++ b/src/libgfortran/generated/all_l4.c        (.../branches/gcc-4_8-branch)
24728
 
@@ -101,8 +101,7 @@
24729
 
       retarray->offset = 0;
24730
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24731
 
 
24732
 
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24733
 
-                  * extent[rank-1];
24734
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24735
 
 
24736
 
       if (alloc_size == 0)
24737
 
        {
24738
 
@@ -111,7 +110,7 @@
24739
 
          return;
24740
 
        }
24741
 
       else
24742
 
-       retarray->base_addr = xmalloc (alloc_size);
24743
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
24744
 
     }
24745
 
   else
24746
 
     {
24747
 
Index: libgfortran/generated/minloc0_8_i2.c
24748
 
===================================================================
24749
 
--- a/src/libgfortran/generated/minloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
24750
 
+++ b/src/libgfortran/generated/minloc0_8_i2.c  (.../branches/gcc-4_8-branch)
24751
 
@@ -58,7 +58,7 @@
24752
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24753
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24754
 
       retarray->offset = 0;
24755
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24756
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24757
 
     }
24758
 
   else
24759
 
     {
24760
 
@@ -199,7 +199,7 @@
24761
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24762
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24763
 
       retarray->offset = 0;
24764
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24765
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24766
 
     }
24767
 
   else
24768
 
     {
24769
 
@@ -367,7 +367,7 @@
24770
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24771
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24772
 
       retarray->offset = 0;
24773
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24774
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24775
 
     }
24776
 
   else if (unlikely (compile_options.bounds_check))
24777
 
     {
24778
 
Index: libgfortran/generated/norm2_r16.c
24779
 
===================================================================
24780
 
--- a/src/libgfortran/generated/norm2_r16.c     (.../tags/gcc_4_8_3_release)
24781
 
+++ b/src/libgfortran/generated/norm2_r16.c     (.../branches/gcc-4_8-branch)
24782
 
@@ -105,10 +105,9 @@
24783
 
       retarray->offset = 0;
24784
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24785
 
 
24786
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24787
 
-                  * extent[rank-1];
24788
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24789
 
 
24790
 
-      retarray->base_addr = xmalloc (alloc_size);
24791
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
24792
 
       if (alloc_size == 0)
24793
 
        {
24794
 
          /* Make sure we have a zero-sized array.  */
24795
 
Index: libgfortran/generated/reshape_c10.c
24796
 
===================================================================
24797
 
--- a/src/libgfortran/generated/reshape_c10.c   (.../tags/gcc_4_8_3_release)
24798
 
+++ b/src/libgfortran/generated/reshape_c10.c   (.../branches/gcc-4_8-branch)
24799
 
@@ -111,11 +111,11 @@
24800
 
       ret->offset = 0;
24801
 
 
24802
 
       if (unlikely (rs < 1))
24803
 
-        alloc_size = 1;
24804
 
+        alloc_size = 0;
24805
 
       else
24806
 
-        alloc_size = rs * sizeof (GFC_COMPLEX_10);
24807
 
+        alloc_size = rs;
24808
 
 
24809
 
-      ret->base_addr = xmalloc (alloc_size);
24810
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
24811
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24812
 
     }
24813
 
 
24814
 
Index: libgfortran/generated/unpack_c16.c
24815
 
===================================================================
24816
 
--- a/src/libgfortran/generated/unpack_c16.c    (.../tags/gcc_4_8_3_release)
24817
 
+++ b/src/libgfortran/generated/unpack_c16.c    (.../branches/gcc-4_8-branch)
24818
 
@@ -99,7 +99,7 @@
24819
 
          rs *= extent[n];
24820
 
        }
24821
 
       ret->offset = 0;
24822
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
24823
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
24824
 
     }
24825
 
   else
24826
 
     {
24827
 
@@ -244,7 +244,7 @@
24828
 
          rs *= extent[n];
24829
 
        }
24830
 
       ret->offset = 0;
24831
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
24832
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
24833
 
     }
24834
 
   else
24835
 
     {
24836
 
Index: libgfortran/generated/maxloc1_4_r4.c
24837
 
===================================================================
24838
 
--- a/src/libgfortran/generated/maxloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
24839
 
+++ b/src/libgfortran/generated/maxloc1_4_r4.c  (.../branches/gcc-4_8-branch)
24840
 
@@ -98,10 +98,9 @@
24841
 
       retarray->offset = 0;
24842
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24843
 
 
24844
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24845
 
-                  * extent[rank-1];
24846
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24847
 
 
24848
 
-      retarray->base_addr = xmalloc (alloc_size);
24849
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24850
 
       if (alloc_size == 0)
24851
 
        {
24852
 
          /* Make sure we have a zero-sized array.  */
24853
 
@@ -294,8 +293,7 @@
24854
 
 
24855
 
        }
24856
 
 
24857
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24858
 
-                  * extent[rank-1];
24859
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24860
 
 
24861
 
       retarray->offset = 0;
24862
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24863
 
@@ -307,7 +305,7 @@
24864
 
          return;
24865
 
        }
24866
 
       else
24867
 
-       retarray->base_addr = xmalloc (alloc_size);
24868
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24869
 
 
24870
 
     }
24871
 
   else
24872
 
@@ -485,8 +483,7 @@
24873
 
       retarray->offset = 0;
24874
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24875
 
 
24876
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24877
 
-                  * extent[rank-1];
24878
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24879
 
 
24880
 
       if (alloc_size == 0)
24881
 
        {
24882
 
@@ -495,7 +492,7 @@
24883
 
          return;
24884
 
        }
24885
 
       else
24886
 
-       retarray->base_addr = xmalloc (alloc_size);
24887
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24888
 
     }
24889
 
   else
24890
 
     {
24891
 
Index: libgfortran/generated/maxval_r8.c
24892
 
===================================================================
24893
 
--- a/src/libgfortran/generated/maxval_r8.c     (.../tags/gcc_4_8_3_release)
24894
 
+++ b/src/libgfortran/generated/maxval_r8.c     (.../branches/gcc-4_8-branch)
24895
 
@@ -97,10 +97,9 @@
24896
 
       retarray->offset = 0;
24897
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24898
 
 
24899
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24900
 
-                  * extent[rank-1];
24901
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24902
 
 
24903
 
-      retarray->base_addr = xmalloc (alloc_size);
24904
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24905
 
       if (alloc_size == 0)
24906
 
        {
24907
 
          /* Make sure we have a zero-sized array.  */
24908
 
@@ -286,8 +285,7 @@
24909
 
 
24910
 
        }
24911
 
 
24912
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24913
 
-                  * extent[rank-1];
24914
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24915
 
 
24916
 
       retarray->offset = 0;
24917
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24918
 
@@ -299,7 +297,7 @@
24919
 
          return;
24920
 
        }
24921
 
       else
24922
 
-       retarray->base_addr = xmalloc (alloc_size);
24923
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24924
 
 
24925
 
     }
24926
 
   else
24927
 
@@ -472,8 +470,7 @@
24928
 
       retarray->offset = 0;
24929
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24930
 
 
24931
 
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24932
 
-                  * extent[rank-1];
24933
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24934
 
 
24935
 
       if (alloc_size == 0)
24936
 
        {
24937
 
@@ -482,7 +479,7 @@
24938
 
          return;
24939
 
        }
24940
 
       else
24941
 
-       retarray->base_addr = xmalloc (alloc_size);
24942
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24943
 
     }
24944
 
   else
24945
 
     {
24946
 
Index: libgfortran/generated/transpose_c4.c
24947
 
===================================================================
24948
 
--- a/src/libgfortran/generated/transpose_c4.c  (.../tags/gcc_4_8_3_release)
24949
 
+++ b/src/libgfortran/generated/transpose_c4.c  (.../branches/gcc-4_8-branch)
24950
 
@@ -60,7 +60,8 @@
24951
 
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
24952
 
                        GFC_DESCRIPTOR_EXTENT(source, 1));
24953
 
 
24954
 
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
24955
 
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
24956
 
+                                     sizeof (GFC_COMPLEX_4));
24957
 
       ret->offset = 0;
24958
 
     } else if (unlikely (compile_options.bounds_check))
24959
 
     {
24960
 
Index: libgfortran/generated/eoshift1_4.c
24961
 
===================================================================
24962
 
--- a/src/libgfortran/generated/eoshift1_4.c    (.../tags/gcc_4_8_3_release)
24963
 
+++ b/src/libgfortran/generated/eoshift1_4.c    (.../branches/gcc-4_8-branch)
24964
 
@@ -105,8 +105,8 @@
24965
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
24966
 
 
24967
 
         }
24968
 
-      /* xmalloc allocates a single byte for zero size.  */
24969
 
-      ret->base_addr = xmalloc (size * arraysize);
24970
 
+      /* xmallocarray allocates a single byte for zero size.  */
24971
 
+      ret->base_addr = xmallocarray (arraysize, size);
24972
 
 
24973
 
     }
24974
 
   else if (unlikely (compile_options.bounds_check))
24975
 
Index: libgfortran/generated/minval_r16.c
24976
 
===================================================================
24977
 
--- a/src/libgfortran/generated/minval_r16.c    (.../tags/gcc_4_8_3_release)
24978
 
+++ b/src/libgfortran/generated/minval_r16.c    (.../branches/gcc-4_8-branch)
24979
 
@@ -97,10 +97,9 @@
24980
 
       retarray->offset = 0;
24981
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24982
 
 
24983
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24984
 
-                  * extent[rank-1];
24985
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24986
 
 
24987
 
-      retarray->base_addr = xmalloc (alloc_size);
24988
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
24989
 
       if (alloc_size == 0)
24990
 
        {
24991
 
          /* Make sure we have a zero-sized array.  */
24992
 
@@ -286,8 +285,7 @@
24993
 
 
24994
 
        }
24995
 
 
24996
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24997
 
-                  * extent[rank-1];
24998
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24999
 
 
25000
 
       retarray->offset = 0;
25001
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25002
 
@@ -299,7 +297,7 @@
25003
 
          return;
25004
 
        }
25005
 
       else
25006
 
-       retarray->base_addr = xmalloc (alloc_size);
25007
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
25008
 
 
25009
 
     }
25010
 
   else
25011
 
@@ -472,8 +470,7 @@
25012
 
       retarray->offset = 0;
25013
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25014
 
 
25015
 
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25016
 
-                  * extent[rank-1];
25017
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25018
 
 
25019
 
       if (alloc_size == 0)
25020
 
        {
25021
 
@@ -482,7 +479,7 @@
25022
 
          return;
25023
 
        }
25024
 
       else
25025
 
-       retarray->base_addr = xmalloc (alloc_size);
25026
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
25027
 
     }
25028
 
   else
25029
 
     {
25030
 
Index: libgfortran/generated/iany_i16.c
25031
 
===================================================================
25032
 
--- a/src/libgfortran/generated/iany_i16.c      (.../tags/gcc_4_8_3_release)
25033
 
+++ b/src/libgfortran/generated/iany_i16.c      (.../branches/gcc-4_8-branch)
25034
 
@@ -97,10 +97,9 @@
25035
 
       retarray->offset = 0;
25036
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25037
 
 
25038
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25039
 
-                  * extent[rank-1];
25040
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25041
 
 
25042
 
-      retarray->base_addr = xmalloc (alloc_size);
25043
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25044
 
       if (alloc_size == 0)
25045
 
        {
25046
 
          /* Make sure we have a zero-sized array.  */
25047
 
@@ -272,8 +271,7 @@
25048
 
 
25049
 
        }
25050
 
 
25051
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25052
 
-                  * extent[rank-1];
25053
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25054
 
 
25055
 
       retarray->offset = 0;
25056
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25057
 
@@ -285,7 +283,7 @@
25058
 
          return;
25059
 
        }
25060
 
       else
25061
 
-       retarray->base_addr = xmalloc (alloc_size);
25062
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25063
 
 
25064
 
     }
25065
 
   else
25066
 
@@ -430,8 +428,7 @@
25067
 
       retarray->offset = 0;
25068
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25069
 
 
25070
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25071
 
-                  * extent[rank-1];
25072
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25073
 
 
25074
 
       if (alloc_size == 0)
25075
 
        {
25076
 
@@ -440,7 +437,7 @@
25077
 
          return;
25078
 
        }
25079
 
       else
25080
 
-       retarray->base_addr = xmalloc (alloc_size);
25081
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25082
 
     }
25083
 
   else
25084
 
     {
25085
 
Index: libgfortran/generated/maxloc1_4_i2.c
25086
 
===================================================================
25087
 
--- a/src/libgfortran/generated/maxloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
25088
 
+++ b/src/libgfortran/generated/maxloc1_4_i2.c  (.../branches/gcc-4_8-branch)
25089
 
@@ -98,10 +98,9 @@
25090
 
       retarray->offset = 0;
25091
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25092
 
 
25093
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25094
 
-                  * extent[rank-1];
25095
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25096
 
 
25097
 
-      retarray->base_addr = xmalloc (alloc_size);
25098
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25099
 
       if (alloc_size == 0)
25100
 
        {
25101
 
          /* Make sure we have a zero-sized array.  */
25102
 
@@ -294,8 +293,7 @@
25103
 
 
25104
 
        }
25105
 
 
25106
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25107
 
-                  * extent[rank-1];
25108
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25109
 
 
25110
 
       retarray->offset = 0;
25111
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25112
 
@@ -307,7 +305,7 @@
25113
 
          return;
25114
 
        }
25115
 
       else
25116
 
-       retarray->base_addr = xmalloc (alloc_size);
25117
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25118
 
 
25119
 
     }
25120
 
   else
25121
 
@@ -485,8 +483,7 @@
25122
 
       retarray->offset = 0;
25123
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25124
 
 
25125
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25126
 
-                  * extent[rank-1];
25127
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25128
 
 
25129
 
       if (alloc_size == 0)
25130
 
        {
25131
 
@@ -495,7 +492,7 @@
25132
 
          return;
25133
 
        }
25134
 
       else
25135
 
-       retarray->base_addr = xmalloc (alloc_size);
25136
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25137
 
     }
25138
 
   else
25139
 
     {
25140
 
Index: libgfortran/generated/maxloc1_8_i8.c
25141
 
===================================================================
25142
 
--- a/src/libgfortran/generated/maxloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
25143
 
+++ b/src/libgfortran/generated/maxloc1_8_i8.c  (.../branches/gcc-4_8-branch)
25144
 
@@ -98,10 +98,9 @@
25145
 
       retarray->offset = 0;
25146
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25147
 
 
25148
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25149
 
-                  * extent[rank-1];
25150
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25151
 
 
25152
 
-      retarray->base_addr = xmalloc (alloc_size);
25153
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25154
 
       if (alloc_size == 0)
25155
 
        {
25156
 
          /* Make sure we have a zero-sized array.  */
25157
 
@@ -294,8 +293,7 @@
25158
 
 
25159
 
        }
25160
 
 
25161
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25162
 
-                  * extent[rank-1];
25163
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25164
 
 
25165
 
       retarray->offset = 0;
25166
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25167
 
@@ -307,7 +305,7 @@
25168
 
          return;
25169
 
        }
25170
 
       else
25171
 
-       retarray->base_addr = xmalloc (alloc_size);
25172
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25173
 
 
25174
 
     }
25175
 
   else
25176
 
@@ -485,8 +483,7 @@
25177
 
       retarray->offset = 0;
25178
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25179
 
 
25180
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25181
 
-                  * extent[rank-1];
25182
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25183
 
 
25184
 
       if (alloc_size == 0)
25185
 
        {
25186
 
@@ -495,7 +492,7 @@
25187
 
          return;
25188
 
        }
25189
 
       else
25190
 
-       retarray->base_addr = xmalloc (alloc_size);
25191
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25192
 
     }
25193
 
   else
25194
 
     {
25195
 
Index: libgfortran/generated/maxloc0_4_r8.c
25196
 
===================================================================
25197
 
--- a/src/libgfortran/generated/maxloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
25198
 
+++ b/src/libgfortran/generated/maxloc0_4_r8.c  (.../branches/gcc-4_8-branch)
25199
 
@@ -58,7 +58,7 @@
25200
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25201
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25202
 
       retarray->offset = 0;
25203
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25204
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25205
 
     }
25206
 
   else
25207
 
     {
25208
 
@@ -199,7 +199,7 @@
25209
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25210
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25211
 
       retarray->offset = 0;
25212
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25213
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25214
 
     }
25215
 
   else
25216
 
     {
25217
 
@@ -367,7 +367,7 @@
25218
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25219
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25220
 
       retarray->offset = 0;
25221
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25222
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25223
 
     }
25224
 
   else if (unlikely (compile_options.bounds_check))
25225
 
     {
25226
 
Index: libgfortran/generated/maxloc0_16_r16.c
25227
 
===================================================================
25228
 
--- a/src/libgfortran/generated/maxloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
25229
 
+++ b/src/libgfortran/generated/maxloc0_16_r16.c        (.../branches/gcc-4_8-branch)
25230
 
@@ -58,7 +58,7 @@
25231
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25232
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25233
 
       retarray->offset = 0;
25234
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25235
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25236
 
     }
25237
 
   else
25238
 
     {
25239
 
@@ -199,7 +199,7 @@
25240
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25241
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25242
 
       retarray->offset = 0;
25243
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25244
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25245
 
     }
25246
 
   else
25247
 
     {
25248
 
@@ -367,7 +367,7 @@
25249
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25250
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25251
 
       retarray->offset = 0;
25252
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25253
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25254
 
     }
25255
 
   else if (unlikely (compile_options.bounds_check))
25256
 
     {
25257
 
Index: libgfortran/generated/sum_c10.c
25258
 
===================================================================
25259
 
--- a/src/libgfortran/generated/sum_c10.c       (.../tags/gcc_4_8_3_release)
25260
 
+++ b/src/libgfortran/generated/sum_c10.c       (.../branches/gcc-4_8-branch)
25261
 
@@ -97,10 +97,9 @@
25262
 
       retarray->offset = 0;
25263
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25264
 
 
25265
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25266
 
-                  * extent[rank-1];
25267
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25268
 
 
25269
 
-      retarray->base_addr = xmalloc (alloc_size);
25270
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25271
 
       if (alloc_size == 0)
25272
 
        {
25273
 
          /* Make sure we have a zero-sized array.  */
25274
 
@@ -272,8 +271,7 @@
25275
 
 
25276
 
        }
25277
 
 
25278
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25279
 
-                  * extent[rank-1];
25280
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25281
 
 
25282
 
       retarray->offset = 0;
25283
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25284
 
@@ -285,7 +283,7 @@
25285
 
          return;
25286
 
        }
25287
 
       else
25288
 
-       retarray->base_addr = xmalloc (alloc_size);
25289
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25290
 
 
25291
 
     }
25292
 
   else
25293
 
@@ -430,8 +428,7 @@
25294
 
       retarray->offset = 0;
25295
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25296
 
 
25297
 
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25298
 
-                  * extent[rank-1];
25299
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25300
 
 
25301
 
       if (alloc_size == 0)
25302
 
        {
25303
 
@@ -440,7 +437,7 @@
25304
 
          return;
25305
 
        }
25306
 
       else
25307
 
-       retarray->base_addr = xmalloc (alloc_size);
25308
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25309
 
     }
25310
 
   else
25311
 
     {
25312
 
Index: libgfortran/generated/iall_i4.c
25313
 
===================================================================
25314
 
--- a/src/libgfortran/generated/iall_i4.c       (.../tags/gcc_4_8_3_release)
25315
 
+++ b/src/libgfortran/generated/iall_i4.c       (.../branches/gcc-4_8-branch)
25316
 
@@ -97,10 +97,9 @@
25317
 
       retarray->offset = 0;
25318
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25319
 
 
25320
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25321
 
-                  * extent[rank-1];
25322
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25323
 
 
25324
 
-      retarray->base_addr = xmalloc (alloc_size);
25325
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25326
 
       if (alloc_size == 0)
25327
 
        {
25328
 
          /* Make sure we have a zero-sized array.  */
25329
 
@@ -272,8 +271,7 @@
25330
 
 
25331
 
        }
25332
 
 
25333
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25334
 
-                  * extent[rank-1];
25335
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25336
 
 
25337
 
       retarray->offset = 0;
25338
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25339
 
@@ -285,7 +283,7 @@
25340
 
          return;
25341
 
        }
25342
 
       else
25343
 
-       retarray->base_addr = xmalloc (alloc_size);
25344
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25345
 
 
25346
 
     }
25347
 
   else
25348
 
@@ -430,8 +428,7 @@
25349
 
       retarray->offset = 0;
25350
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25351
 
 
25352
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25353
 
-                  * extent[rank-1];
25354
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25355
 
 
25356
 
       if (alloc_size == 0)
25357
 
        {
25358
 
@@ -440,7 +437,7 @@
25359
 
          return;
25360
 
        }
25361
 
       else
25362
 
-       retarray->base_addr = xmalloc (alloc_size);
25363
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25364
 
     }
25365
 
   else
25366
 
     {
25367
 
Index: libgfortran/generated/minloc1_4_r16.c
25368
 
===================================================================
25369
 
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
25370
 
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
25371
 
@@ -98,10 +98,9 @@
25372
 
       retarray->offset = 0;
25373
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25374
 
 
25375
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25376
 
-                  * extent[rank-1];
25377
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25378
 
 
25379
 
-      retarray->base_addr = xmalloc (alloc_size);
25380
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25381
 
       if (alloc_size == 0)
25382
 
        {
25383
 
          /* Make sure we have a zero-sized array.  */
25384
 
@@ -294,8 +293,7 @@
25385
 
 
25386
 
        }
25387
 
 
25388
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25389
 
-                  * extent[rank-1];
25390
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25391
 
 
25392
 
       retarray->offset = 0;
25393
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25394
 
@@ -307,7 +305,7 @@
25395
 
          return;
25396
 
        }
25397
 
       else
25398
 
-       retarray->base_addr = xmalloc (alloc_size);
25399
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25400
 
 
25401
 
     }
25402
 
   else
25403
 
@@ -485,8 +483,7 @@
25404
 
       retarray->offset = 0;
25405
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25406
 
 
25407
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25408
 
-                  * extent[rank-1];
25409
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25410
 
 
25411
 
       if (alloc_size == 0)
25412
 
        {
25413
 
@@ -495,7 +492,7 @@
25414
 
          return;
25415
 
        }
25416
 
       else
25417
 
-       retarray->base_addr = xmalloc (alloc_size);
25418
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25419
 
     }
25420
 
   else
25421
 
     {
25422
 
Index: libgfortran/generated/maxloc0_8_r16.c
25423
 
===================================================================
25424
 
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
25425
 
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
25426
 
@@ -58,7 +58,7 @@
25427
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25428
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25429
 
       retarray->offset = 0;
25430
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25431
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25432
 
     }
25433
 
   else
25434
 
     {
25435
 
@@ -199,7 +199,7 @@
25436
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25437
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25438
 
       retarray->offset = 0;
25439
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25440
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25441
 
     }
25442
 
   else
25443
 
     {
25444
 
@@ -367,7 +367,7 @@
25445
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25446
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25447
 
       retarray->offset = 0;
25448
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25449
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25450
 
     }
25451
 
   else if (unlikely (compile_options.bounds_check))
25452
 
     {
25453
 
Index: libgfortran/generated/pack_r8.c
25454
 
===================================================================
25455
 
--- a/src/libgfortran/generated/pack_r8.c       (.../tags/gcc_4_8_3_release)
25456
 
+++ b/src/libgfortran/generated/pack_r8.c       (.../branches/gcc-4_8-branch)
25457
 
@@ -167,8 +167,8 @@
25458
 
 
25459
 
          ret->offset = 0;
25460
 
 
25461
 
-         /* xmalloc allocates a single byte for zero size.  */
25462
 
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
25463
 
+         /* xmallocarray allocates a single byte for zero size.  */
25464
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
25465
 
 
25466
 
          if (total == 0)
25467
 
            return;
25468
 
Index: libgfortran/generated/matmul_c10.c
25469
 
===================================================================
25470
 
--- a/src/libgfortran/generated/matmul_c10.c    (.../tags/gcc_4_8_3_release)
25471
 
+++ b/src/libgfortran/generated/matmul_c10.c    (.../branches/gcc-4_8-branch)
25472
 
@@ -124,7 +124,7 @@
25473
 
         }
25474
 
 
25475
 
       retarray->base_addr
25476
 
-       = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
25477
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
25478
 
       retarray->offset = 0;
25479
 
     }
25480
 
     else if (unlikely (compile_options.bounds_check))
25481
 
Index: libgfortran/generated/maxloc0_16_i4.c
25482
 
===================================================================
25483
 
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
25484
 
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
25485
 
@@ -58,7 +58,7 @@
25486
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25487
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25488
 
       retarray->offset = 0;
25489
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25490
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25491
 
     }
25492
 
   else
25493
 
     {
25494
 
@@ -199,7 +199,7 @@
25495
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25496
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25497
 
       retarray->offset = 0;
25498
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25499
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25500
 
     }
25501
 
   else
25502
 
     {
25503
 
@@ -367,7 +367,7 @@
25504
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25505
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25506
 
       retarray->offset = 0;
25507
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25508
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25509
 
     }
25510
 
   else if (unlikely (compile_options.bounds_check))
25511
 
     {
25512
 
Index: libgfortran/generated/pack_r16.c
25513
 
===================================================================
25514
 
--- a/src/libgfortran/generated/pack_r16.c      (.../tags/gcc_4_8_3_release)
25515
 
+++ b/src/libgfortran/generated/pack_r16.c      (.../branches/gcc-4_8-branch)
25516
 
@@ -167,8 +167,8 @@
25517
 
 
25518
 
          ret->offset = 0;
25519
 
 
25520
 
-         /* xmalloc allocates a single byte for zero size.  */
25521
 
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
25522
 
+         /* xmallocarray allocates a single byte for zero size.  */
25523
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
25524
 
 
25525
 
          if (total == 0)
25526
 
            return;
25527
 
Index: libgfortran/generated/minloc1_16_i8.c
25528
 
===================================================================
25529
 
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
25530
 
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
25531
 
@@ -98,10 +98,9 @@
25532
 
       retarray->offset = 0;
25533
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25534
 
 
25535
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25536
 
-                  * extent[rank-1];
25537
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25538
 
 
25539
 
-      retarray->base_addr = xmalloc (alloc_size);
25540
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25541
 
       if (alloc_size == 0)
25542
 
        {
25543
 
          /* Make sure we have a zero-sized array.  */
25544
 
@@ -294,8 +293,7 @@
25545
 
 
25546
 
        }
25547
 
 
25548
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25549
 
-                  * extent[rank-1];
25550
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25551
 
 
25552
 
       retarray->offset = 0;
25553
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25554
 
@@ -307,7 +305,7 @@
25555
 
          return;
25556
 
        }
25557
 
       else
25558
 
-       retarray->base_addr = xmalloc (alloc_size);
25559
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25560
 
 
25561
 
     }
25562
 
   else
25563
 
@@ -485,8 +483,7 @@
25564
 
       retarray->offset = 0;
25565
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25566
 
 
25567
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25568
 
-                  * extent[rank-1];
25569
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25570
 
 
25571
 
       if (alloc_size == 0)
25572
 
        {
25573
 
@@ -495,7 +492,7 @@
25574
 
          return;
25575
 
        }
25576
 
       else
25577
 
-       retarray->base_addr = xmalloc (alloc_size);
25578
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25579
 
     }
25580
 
   else
25581
 
     {
25582
 
Index: libgfortran/generated/minloc0_16_r10.c
25583
 
===================================================================
25584
 
--- a/src/libgfortran/generated/minloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
25585
 
+++ b/src/libgfortran/generated/minloc0_16_r10.c        (.../branches/gcc-4_8-branch)
25586
 
@@ -58,7 +58,7 @@
25587
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25588
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25589
 
       retarray->offset = 0;
25590
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25591
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25592
 
     }
25593
 
   else
25594
 
     {
25595
 
@@ -199,7 +199,7 @@
25596
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25597
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25598
 
       retarray->offset = 0;
25599
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25600
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25601
 
     }
25602
 
   else
25603
 
     {
25604
 
@@ -367,7 +367,7 @@
25605
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25606
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25607
 
       retarray->offset = 0;
25608
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25609
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25610
 
     }
25611
 
   else if (unlikely (compile_options.bounds_check))
25612
 
     {
25613
 
Index: libgfortran/generated/unpack_c4.c
25614
 
===================================================================
25615
 
--- a/src/libgfortran/generated/unpack_c4.c     (.../tags/gcc_4_8_3_release)
25616
 
+++ b/src/libgfortran/generated/unpack_c4.c     (.../branches/gcc-4_8-branch)
25617
 
@@ -99,7 +99,7 @@
25618
 
          rs *= extent[n];
25619
 
        }
25620
 
       ret->offset = 0;
25621
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
25622
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
25623
 
     }
25624
 
   else
25625
 
     {
25626
 
@@ -244,7 +244,7 @@
25627
 
          rs *= extent[n];
25628
 
        }
25629
 
       ret->offset = 0;
25630
 
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
25631
 
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
25632
 
     }
25633
 
   else
25634
 
     {
25635
 
Index: libgfortran/generated/iparity_i1.c
25636
 
===================================================================
25637
 
--- a/src/libgfortran/generated/iparity_i1.c    (.../tags/gcc_4_8_3_release)
25638
 
+++ b/src/libgfortran/generated/iparity_i1.c    (.../branches/gcc-4_8-branch)
25639
 
@@ -97,10 +97,9 @@
25640
 
       retarray->offset = 0;
25641
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25642
 
 
25643
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25644
 
-                  * extent[rank-1];
25645
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25646
 
 
25647
 
-      retarray->base_addr = xmalloc (alloc_size);
25648
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25649
 
       if (alloc_size == 0)
25650
 
        {
25651
 
          /* Make sure we have a zero-sized array.  */
25652
 
@@ -272,8 +271,7 @@
25653
 
 
25654
 
        }
25655
 
 
25656
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25657
 
-                  * extent[rank-1];
25658
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25659
 
 
25660
 
       retarray->offset = 0;
25661
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25662
 
@@ -285,7 +283,7 @@
25663
 
          return;
25664
 
        }
25665
 
       else
25666
 
-       retarray->base_addr = xmalloc (alloc_size);
25667
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25668
 
 
25669
 
     }
25670
 
   else
25671
 
@@ -430,8 +428,7 @@
25672
 
       retarray->offset = 0;
25673
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25674
 
 
25675
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25676
 
-                  * extent[rank-1];
25677
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25678
 
 
25679
 
       if (alloc_size == 0)
25680
 
        {
25681
 
@@ -440,7 +437,7 @@
25682
 
          return;
25683
 
        }
25684
 
       else
25685
 
-       retarray->base_addr = xmalloc (alloc_size);
25686
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25687
 
     }
25688
 
   else
25689
 
     {
25690
 
Index: libgfortran/generated/product_c8.c
25691
 
===================================================================
25692
 
--- a/src/libgfortran/generated/product_c8.c    (.../tags/gcc_4_8_3_release)
25693
 
+++ b/src/libgfortran/generated/product_c8.c    (.../branches/gcc-4_8-branch)
25694
 
@@ -97,10 +97,9 @@
25695
 
       retarray->offset = 0;
25696
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25697
 
 
25698
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25699
 
-                  * extent[rank-1];
25700
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25701
 
 
25702
 
-      retarray->base_addr = xmalloc (alloc_size);
25703
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25704
 
       if (alloc_size == 0)
25705
 
        {
25706
 
          /* Make sure we have a zero-sized array.  */
25707
 
@@ -272,8 +271,7 @@
25708
 
 
25709
 
        }
25710
 
 
25711
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25712
 
-                  * extent[rank-1];
25713
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25714
 
 
25715
 
       retarray->offset = 0;
25716
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25717
 
@@ -285,7 +283,7 @@
25718
 
          return;
25719
 
        }
25720
 
       else
25721
 
-       retarray->base_addr = xmalloc (alloc_size);
25722
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25723
 
 
25724
 
     }
25725
 
   else
25726
 
@@ -430,8 +428,7 @@
25727
 
       retarray->offset = 0;
25728
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25729
 
 
25730
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25731
 
-                  * extent[rank-1];
25732
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25733
 
 
25734
 
       if (alloc_size == 0)
25735
 
        {
25736
 
@@ -440,7 +437,7 @@
25737
 
          return;
25738
 
        }
25739
 
       else
25740
 
-       retarray->base_addr = xmalloc (alloc_size);
25741
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25742
 
     }
25743
 
   else
25744
 
     {
25745
 
Index: libgfortran/generated/in_pack_i16.c
25746
 
===================================================================
25747
 
--- a/src/libgfortran/generated/in_pack_i16.c   (.../tags/gcc_4_8_3_release)
25748
 
+++ b/src/libgfortran/generated/in_pack_i16.c   (.../branches/gcc-4_8-branch)
25749
 
@@ -76,7 +76,7 @@
25750
 
     return source->base_addr;
25751
 
 
25752
 
   /* Allocate storage for the destination.  */
25753
 
-  destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
25754
 
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
25755
 
   dest = destptr;
25756
 
   src = source->base_addr;
25757
 
   stride0 = stride[0];
25758
 
Index: libgfortran/generated/minloc0_8_i4.c
25759
 
===================================================================
25760
 
--- a/src/libgfortran/generated/minloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
25761
 
+++ b/src/libgfortran/generated/minloc0_8_i4.c  (.../branches/gcc-4_8-branch)
25762
 
@@ -58,7 +58,7 @@
25763
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25764
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25765
 
       retarray->offset = 0;
25766
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25767
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25768
 
     }
25769
 
   else
25770
 
     {
25771
 
@@ -199,7 +199,7 @@
25772
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25773
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25774
 
       retarray->offset = 0;
25775
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25776
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25777
 
     }
25778
 
   else
25779
 
     {
25780
 
@@ -367,7 +367,7 @@
25781
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25782
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25783
 
       retarray->offset = 0;
25784
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25785
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25786
 
     }
25787
 
   else if (unlikely (compile_options.bounds_check))
25788
 
     {
25789
 
Index: libgfortran/generated/matmul_c4.c
25790
 
===================================================================
25791
 
--- a/src/libgfortran/generated/matmul_c4.c     (.../tags/gcc_4_8_3_release)
25792
 
+++ b/src/libgfortran/generated/matmul_c4.c     (.../branches/gcc-4_8-branch)
25793
 
@@ -124,7 +124,7 @@
25794
 
         }
25795
 
 
25796
 
       retarray->base_addr
25797
 
-       = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
25798
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
25799
 
       retarray->offset = 0;
25800
 
     }
25801
 
     else if (unlikely (compile_options.bounds_check))
25802
 
Index: libgfortran/generated/reshape_i8.c
25803
 
===================================================================
25804
 
--- a/src/libgfortran/generated/reshape_i8.c    (.../tags/gcc_4_8_3_release)
25805
 
+++ b/src/libgfortran/generated/reshape_i8.c    (.../branches/gcc-4_8-branch)
25806
 
@@ -111,11 +111,11 @@
25807
 
       ret->offset = 0;
25808
 
 
25809
 
       if (unlikely (rs < 1))
25810
 
-        alloc_size = 1;
25811
 
+        alloc_size = 0;
25812
 
       else
25813
 
-        alloc_size = rs * sizeof (GFC_INTEGER_8);
25814
 
+        alloc_size = rs;
25815
 
 
25816
 
-      ret->base_addr = xmalloc (alloc_size);
25817
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25818
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
25819
 
     }
25820
 
 
25821
 
Index: libgfortran/generated/in_pack_c8.c
25822
 
===================================================================
25823
 
--- a/src/libgfortran/generated/in_pack_c8.c    (.../tags/gcc_4_8_3_release)
25824
 
+++ b/src/libgfortran/generated/in_pack_c8.c    (.../branches/gcc-4_8-branch)
25825
 
@@ -76,7 +76,7 @@
25826
 
     return source->base_addr;
25827
 
 
25828
 
   /* Allocate storage for the destination.  */
25829
 
-  destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
25830
 
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
25831
 
   dest = destptr;
25832
 
   src = source->base_addr;
25833
 
   stride0 = stride[0];
25834
 
Index: libgfortran/generated/bessel_r10.c
25835
 
===================================================================
25836
 
--- a/src/libgfortran/generated/bessel_r10.c    (.../tags/gcc_4_8_3_release)
25837
 
+++ b/src/libgfortran/generated/bessel_r10.c    (.../branches/gcc-4_8-branch)
25838
 
@@ -55,7 +55,7 @@
25839
 
     {
25840
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
25841
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
25842
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
25843
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
25844
 
       ret->offset = 0;
25845
 
     }
25846
 
 
25847
 
@@ -122,7 +122,7 @@
25848
 
     {
25849
 
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
25850
 
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
25851
 
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
25852
 
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
25853
 
       ret->offset = 0;
25854
 
     }
25855
 
 
25856
 
@@ -162,7 +162,7 @@
25857
 
 
25858
 
   x2rev = GFC_REAL_10_LITERAL(2.)/x;
25859
 
 
25860
 
-  for (i = 2; i <= n1+n2; i++)
25861
 
+  for (i = 2; i <= n2 - n1; i++)
25862
 
     {
25863
 
 #if defined(GFC_REAL_10_INFINITY)
25864
 
       if (unlikely (last2 == -GFC_REAL_10_INFINITY))
25865
 
Index: libgfortran/generated/iall_i16.c
25866
 
===================================================================
25867
 
--- a/src/libgfortran/generated/iall_i16.c      (.../tags/gcc_4_8_3_release)
25868
 
+++ b/src/libgfortran/generated/iall_i16.c      (.../branches/gcc-4_8-branch)
25869
 
@@ -97,10 +97,9 @@
25870
 
       retarray->offset = 0;
25871
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25872
 
 
25873
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25874
 
-                  * extent[rank-1];
25875
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25876
 
 
25877
 
-      retarray->base_addr = xmalloc (alloc_size);
25878
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25879
 
       if (alloc_size == 0)
25880
 
        {
25881
 
          /* Make sure we have a zero-sized array.  */
25882
 
@@ -272,8 +271,7 @@
25883
 
 
25884
 
        }
25885
 
 
25886
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25887
 
-                  * extent[rank-1];
25888
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25889
 
 
25890
 
       retarray->offset = 0;
25891
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25892
 
@@ -285,7 +283,7 @@
25893
 
          return;
25894
 
        }
25895
 
       else
25896
 
-       retarray->base_addr = xmalloc (alloc_size);
25897
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25898
 
 
25899
 
     }
25900
 
   else
25901
 
@@ -430,8 +428,7 @@
25902
 
       retarray->offset = 0;
25903
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25904
 
 
25905
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25906
 
-                  * extent[rank-1];
25907
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25908
 
 
25909
 
       if (alloc_size == 0)
25910
 
        {
25911
 
@@ -440,7 +437,7 @@
25912
 
          return;
25913
 
        }
25914
 
       else
25915
 
-       retarray->base_addr = xmalloc (alloc_size);
25916
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25917
 
     }
25918
 
   else
25919
 
     {
25920
 
Index: libgfortran/generated/maxloc1_16_i1.c
25921
 
===================================================================
25922
 
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
25923
 
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
25924
 
@@ -98,10 +98,9 @@
25925
 
       retarray->offset = 0;
25926
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25927
 
 
25928
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25929
 
-                  * extent[rank-1];
25930
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25931
 
 
25932
 
-      retarray->base_addr = xmalloc (alloc_size);
25933
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25934
 
       if (alloc_size == 0)
25935
 
        {
25936
 
          /* Make sure we have a zero-sized array.  */
25937
 
@@ -294,8 +293,7 @@
25938
 
 
25939
 
        }
25940
 
 
25941
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25942
 
-                  * extent[rank-1];
25943
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25944
 
 
25945
 
       retarray->offset = 0;
25946
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25947
 
@@ -307,7 +305,7 @@
25948
 
          return;
25949
 
        }
25950
 
       else
25951
 
-       retarray->base_addr = xmalloc (alloc_size);
25952
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25953
 
 
25954
 
     }
25955
 
   else
25956
 
@@ -485,8 +483,7 @@
25957
 
       retarray->offset = 0;
25958
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25959
 
 
25960
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25961
 
-                  * extent[rank-1];
25962
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25963
 
 
25964
 
       if (alloc_size == 0)
25965
 
        {
25966
 
@@ -495,7 +492,7 @@
25967
 
          return;
25968
 
        }
25969
 
       else
25970
 
-       retarray->base_addr = xmalloc (alloc_size);
25971
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25972
 
     }
25973
 
   else
25974
 
     {
25975
 
Index: libgfortran/generated/reshape_i16.c
25976
 
===================================================================
25977
 
--- a/src/libgfortran/generated/reshape_i16.c   (.../tags/gcc_4_8_3_release)
25978
 
+++ b/src/libgfortran/generated/reshape_i16.c   (.../branches/gcc-4_8-branch)
25979
 
@@ -111,11 +111,11 @@
25980
 
       ret->offset = 0;
25981
 
 
25982
 
       if (unlikely (rs < 1))
25983
 
-        alloc_size = 1;
25984
 
+        alloc_size = 0;
25985
 
       else
25986
 
-        alloc_size = rs * sizeof (GFC_INTEGER_16);
25987
 
+        alloc_size = rs;
25988
 
 
25989
 
-      ret->base_addr = xmalloc (alloc_size);
25990
 
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25991
 
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
25992
 
     }
25993
 
 
25994
 
Index: libgfortran/generated/count_16_l.c
25995
 
===================================================================
25996
 
--- a/src/libgfortran/generated/count_16_l.c    (.../tags/gcc_4_8_3_release)
25997
 
+++ b/src/libgfortran/generated/count_16_l.c    (.../branches/gcc-4_8-branch)
25998
 
@@ -101,8 +101,7 @@
25999
 
       retarray->offset = 0;
26000
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26001
 
 
26002
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26003
 
-                  * extent[rank-1];
26004
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26005
 
 
26006
 
       if (alloc_size == 0)
26007
 
        {
26008
 
@@ -111,7 +110,7 @@
26009
 
          return;
26010
 
        }
26011
 
       else
26012
 
-       retarray->base_addr = xmalloc (alloc_size);
26013
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26014
 
     }
26015
 
   else
26016
 
     {
26017
 
Index: libgfortran/generated/minloc1_8_i1.c
26018
 
===================================================================
26019
 
--- a/src/libgfortran/generated/minloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
26020
 
+++ b/src/libgfortran/generated/minloc1_8_i1.c  (.../branches/gcc-4_8-branch)
26021
 
@@ -98,10 +98,9 @@
26022
 
       retarray->offset = 0;
26023
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26024
 
 
26025
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26026
 
-                  * extent[rank-1];
26027
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26028
 
 
26029
 
-      retarray->base_addr = xmalloc (alloc_size);
26030
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26031
 
       if (alloc_size == 0)
26032
 
        {
26033
 
          /* Make sure we have a zero-sized array.  */
26034
 
@@ -294,8 +293,7 @@
26035
 
 
26036
 
        }
26037
 
 
26038
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26039
 
-                  * extent[rank-1];
26040
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26041
 
 
26042
 
       retarray->offset = 0;
26043
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26044
 
@@ -307,7 +305,7 @@
26045
 
          return;
26046
 
        }
26047
 
       else
26048
 
-       retarray->base_addr = xmalloc (alloc_size);
26049
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26050
 
 
26051
 
     }
26052
 
   else
26053
 
@@ -485,8 +483,7 @@
26054
 
       retarray->offset = 0;
26055
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26056
 
 
26057
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26058
 
-                  * extent[rank-1];
26059
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26060
 
 
26061
 
       if (alloc_size == 0)
26062
 
        {
26063
 
@@ -495,7 +492,7 @@
26064
 
          return;
26065
 
        }
26066
 
       else
26067
 
-       retarray->base_addr = xmalloc (alloc_size);
26068
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26069
 
     }
26070
 
   else
26071
 
     {
26072
 
Index: libgfortran/generated/maxloc1_4_i4.c
26073
 
===================================================================
26074
 
--- a/src/libgfortran/generated/maxloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
26075
 
+++ b/src/libgfortran/generated/maxloc1_4_i4.c  (.../branches/gcc-4_8-branch)
26076
 
@@ -98,10 +98,9 @@
26077
 
       retarray->offset = 0;
26078
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26079
 
 
26080
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26081
 
-                  * extent[rank-1];
26082
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26083
 
 
26084
 
-      retarray->base_addr = xmalloc (alloc_size);
26085
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26086
 
       if (alloc_size == 0)
26087
 
        {
26088
 
          /* Make sure we have a zero-sized array.  */
26089
 
@@ -294,8 +293,7 @@
26090
 
 
26091
 
        }
26092
 
 
26093
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26094
 
-                  * extent[rank-1];
26095
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26096
 
 
26097
 
       retarray->offset = 0;
26098
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26099
 
@@ -307,7 +305,7 @@
26100
 
          return;
26101
 
        }
26102
 
       else
26103
 
-       retarray->base_addr = xmalloc (alloc_size);
26104
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26105
 
 
26106
 
     }
26107
 
   else
26108
 
@@ -485,8 +483,7 @@
26109
 
       retarray->offset = 0;
26110
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26111
 
 
26112
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26113
 
-                  * extent[rank-1];
26114
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26115
 
 
26116
 
       if (alloc_size == 0)
26117
 
        {
26118
 
@@ -495,7 +492,7 @@
26119
 
          return;
26120
 
        }
26121
 
       else
26122
 
-       retarray->base_addr = xmalloc (alloc_size);
26123
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26124
 
     }
26125
 
   else
26126
 
     {
26127
 
Index: libgfortran/generated/maxval_i8.c
26128
 
===================================================================
26129
 
--- a/src/libgfortran/generated/maxval_i8.c     (.../tags/gcc_4_8_3_release)
26130
 
+++ b/src/libgfortran/generated/maxval_i8.c     (.../branches/gcc-4_8-branch)
26131
 
@@ -97,10 +97,9 @@
26132
 
       retarray->offset = 0;
26133
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26134
 
 
26135
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26136
 
-                  * extent[rank-1];
26137
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26138
 
 
26139
 
-      retarray->base_addr = xmalloc (alloc_size);
26140
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26141
 
       if (alloc_size == 0)
26142
 
        {
26143
 
          /* Make sure we have a zero-sized array.  */
26144
 
@@ -286,8 +285,7 @@
26145
 
 
26146
 
        }
26147
 
 
26148
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26149
 
-                  * extent[rank-1];
26150
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26151
 
 
26152
 
       retarray->offset = 0;
26153
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26154
 
@@ -299,7 +297,7 @@
26155
 
          return;
26156
 
        }
26157
 
       else
26158
 
-       retarray->base_addr = xmalloc (alloc_size);
26159
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26160
 
 
26161
 
     }
26162
 
   else
26163
 
@@ -472,8 +470,7 @@
26164
 
       retarray->offset = 0;
26165
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26166
 
 
26167
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26168
 
-                  * extent[rank-1];
26169
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26170
 
 
26171
 
       if (alloc_size == 0)
26172
 
        {
26173
 
@@ -482,7 +479,7 @@
26174
 
          return;
26175
 
        }
26176
 
       else
26177
 
-       retarray->base_addr = xmalloc (alloc_size);
26178
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26179
 
     }
26180
 
   else
26181
 
     {
26182
 
Index: libgfortran/generated/eoshift3_16.c
26183
 
===================================================================
26184
 
--- a/src/libgfortran/generated/eoshift3_16.c   (.../tags/gcc_4_8_3_release)
26185
 
+++ b/src/libgfortran/generated/eoshift3_16.c   (.../branches/gcc-4_8-branch)
26186
 
@@ -89,7 +89,7 @@
26187
 
     {
26188
 
       int i;
26189
 
 
26190
 
-      ret->base_addr = xmalloc (size * arraysize);
26191
 
+      ret->base_addr = xmallocarray (arraysize, size);
26192
 
       ret->offset = 0;
26193
 
       ret->dtype = array->dtype;
26194
 
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
26195
 
@@ -107,8 +107,8 @@
26196
 
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
26197
 
 
26198
 
         }
26199
 
-      /* xmalloc allocates a single byte for zero size.  */
26200
 
-      ret->base_addr = xmalloc (size * arraysize);
26201
 
+      /* xmallocarray allocates a single byte for zero size.  */
26202
 
+      ret->base_addr = xmallocarray (arraysize, size);
26203
 
 
26204
 
     }
26205
 
   else if (unlikely (compile_options.bounds_check))
26206
 
Index: libgfortran/generated/shape_i8.c
26207
 
===================================================================
26208
 
--- a/src/libgfortran/generated/shape_i8.c      (.../tags/gcc_4_8_3_release)
26209
 
+++ b/src/libgfortran/generated/shape_i8.c      (.../branches/gcc-4_8-branch)
26210
 
@@ -49,7 +49,7 @@
26211
 
     {
26212
 
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
26213
 
       ret->offset = 0;
26214
 
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26215
 
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26216
 
     }
26217
 
 
26218
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
26219
 
Index: libgfortran/generated/maxloc0_4_i16.c
26220
 
===================================================================
26221
 
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
26222
 
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
26223
 
@@ -58,7 +58,7 @@
26224
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26225
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26226
 
       retarray->offset = 0;
26227
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26228
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26229
 
     }
26230
 
   else
26231
 
     {
26232
 
@@ -199,7 +199,7 @@
26233
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26234
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26235
 
       retarray->offset = 0;
26236
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26237
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26238
 
     }
26239
 
   else
26240
 
     {
26241
 
@@ -367,7 +367,7 @@
26242
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26243
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26244
 
       retarray->offset = 0;
26245
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26246
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26247
 
     }
26248
 
   else if (unlikely (compile_options.bounds_check))
26249
 
     {
26250
 
Index: libgfortran/generated/maxloc1_4_r10.c
26251
 
===================================================================
26252
 
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
26253
 
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
26254
 
@@ -98,10 +98,9 @@
26255
 
       retarray->offset = 0;
26256
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26257
 
 
26258
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26259
 
-                  * extent[rank-1];
26260
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26261
 
 
26262
 
-      retarray->base_addr = xmalloc (alloc_size);
26263
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26264
 
       if (alloc_size == 0)
26265
 
        {
26266
 
          /* Make sure we have a zero-sized array.  */
26267
 
@@ -294,8 +293,7 @@
26268
 
 
26269
 
        }
26270
 
 
26271
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26272
 
-                  * extent[rank-1];
26273
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26274
 
 
26275
 
       retarray->offset = 0;
26276
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26277
 
@@ -307,7 +305,7 @@
26278
 
          return;
26279
 
        }
26280
 
       else
26281
 
-       retarray->base_addr = xmalloc (alloc_size);
26282
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26283
 
 
26284
 
     }
26285
 
   else
26286
 
@@ -485,8 +483,7 @@
26287
 
       retarray->offset = 0;
26288
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26289
 
 
26290
 
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26291
 
-                  * extent[rank-1];
26292
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26293
 
 
26294
 
       if (alloc_size == 0)
26295
 
        {
26296
 
@@ -495,7 +492,7 @@
26297
 
          return;
26298
 
        }
26299
 
       else
26300
 
-       retarray->base_addr = xmalloc (alloc_size);
26301
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26302
 
     }
26303
 
   else
26304
 
     {
26305
 
Index: libgfortran/generated/maxloc1_8_i16.c
26306
 
===================================================================
26307
 
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
26308
 
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
26309
 
@@ -98,10 +98,9 @@
26310
 
       retarray->offset = 0;
26311
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26312
 
 
26313
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26314
 
-                  * extent[rank-1];
26315
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26316
 
 
26317
 
-      retarray->base_addr = xmalloc (alloc_size);
26318
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26319
 
       if (alloc_size == 0)
26320
 
        {
26321
 
          /* Make sure we have a zero-sized array.  */
26322
 
@@ -294,8 +293,7 @@
26323
 
 
26324
 
        }
26325
 
 
26326
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26327
 
-                  * extent[rank-1];
26328
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26329
 
 
26330
 
       retarray->offset = 0;
26331
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26332
 
@@ -307,7 +305,7 @@
26333
 
          return;
26334
 
        }
26335
 
       else
26336
 
-       retarray->base_addr = xmalloc (alloc_size);
26337
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26338
 
 
26339
 
     }
26340
 
   else
26341
 
@@ -485,8 +483,7 @@
26342
 
       retarray->offset = 0;
26343
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26344
 
 
26345
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26346
 
-                  * extent[rank-1];
26347
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26348
 
 
26349
 
       if (alloc_size == 0)
26350
 
        {
26351
 
@@ -495,7 +492,7 @@
26352
 
          return;
26353
 
        }
26354
 
       else
26355
 
-       retarray->base_addr = xmalloc (alloc_size);
26356
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26357
 
     }
26358
 
   else
26359
 
     {
26360
 
Index: libgfortran/generated/minloc0_8_r10.c
26361
 
===================================================================
26362
 
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
26363
 
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
26364
 
@@ -58,7 +58,7 @@
26365
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26366
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26367
 
       retarray->offset = 0;
26368
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26369
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26370
 
     }
26371
 
   else
26372
 
     {
26373
 
@@ -199,7 +199,7 @@
26374
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26375
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26376
 
       retarray->offset = 0;
26377
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26378
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26379
 
     }
26380
 
   else
26381
 
     {
26382
 
@@ -367,7 +367,7 @@
26383
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26384
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26385
 
       retarray->offset = 0;
26386
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26387
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26388
 
     }
26389
 
   else if (unlikely (compile_options.bounds_check))
26390
 
     {
26391
 
Index: libgfortran/generated/iparity_i2.c
26392
 
===================================================================
26393
 
--- a/src/libgfortran/generated/iparity_i2.c    (.../tags/gcc_4_8_3_release)
26394
 
+++ b/src/libgfortran/generated/iparity_i2.c    (.../branches/gcc-4_8-branch)
26395
 
@@ -97,10 +97,9 @@
26396
 
       retarray->offset = 0;
26397
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26398
 
 
26399
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26400
 
-                  * extent[rank-1];
26401
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26402
 
 
26403
 
-      retarray->base_addr = xmalloc (alloc_size);
26404
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26405
 
       if (alloc_size == 0)
26406
 
        {
26407
 
          /* Make sure we have a zero-sized array.  */
26408
 
@@ -272,8 +271,7 @@
26409
 
 
26410
 
        }
26411
 
 
26412
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26413
 
-                  * extent[rank-1];
26414
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26415
 
 
26416
 
       retarray->offset = 0;
26417
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26418
 
@@ -285,7 +283,7 @@
26419
 
          return;
26420
 
        }
26421
 
       else
26422
 
-       retarray->base_addr = xmalloc (alloc_size);
26423
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26424
 
 
26425
 
     }
26426
 
   else
26427
 
@@ -430,8 +428,7 @@
26428
 
       retarray->offset = 0;
26429
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26430
 
 
26431
 
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26432
 
-                  * extent[rank-1];
26433
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26434
 
 
26435
 
       if (alloc_size == 0)
26436
 
        {
26437
 
@@ -440,7 +437,7 @@
26438
 
          return;
26439
 
        }
26440
 
       else
26441
 
-       retarray->base_addr = xmalloc (alloc_size);
26442
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26443
 
     }
26444
 
   else
26445
 
     {
26446
 
Index: libgfortran/generated/maxloc1_16_r4.c
26447
 
===================================================================
26448
 
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
26449
 
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
26450
 
@@ -98,10 +98,9 @@
26451
 
       retarray->offset = 0;
26452
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26453
 
 
26454
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26455
 
-                  * extent[rank-1];
26456
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26457
 
 
26458
 
-      retarray->base_addr = xmalloc (alloc_size);
26459
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26460
 
       if (alloc_size == 0)
26461
 
        {
26462
 
          /* Make sure we have a zero-sized array.  */
26463
 
@@ -294,8 +293,7 @@
26464
 
 
26465
 
        }
26466
 
 
26467
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26468
 
-                  * extent[rank-1];
26469
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26470
 
 
26471
 
       retarray->offset = 0;
26472
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26473
 
@@ -307,7 +305,7 @@
26474
 
          return;
26475
 
        }
26476
 
       else
26477
 
-       retarray->base_addr = xmalloc (alloc_size);
26478
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26479
 
 
26480
 
     }
26481
 
   else
26482
 
@@ -485,8 +483,7 @@
26483
 
       retarray->offset = 0;
26484
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26485
 
 
26486
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26487
 
-                  * extent[rank-1];
26488
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26489
 
 
26490
 
       if (alloc_size == 0)
26491
 
        {
26492
 
@@ -495,7 +492,7 @@
26493
 
          return;
26494
 
        }
26495
 
       else
26496
 
-       retarray->base_addr = xmalloc (alloc_size);
26497
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26498
 
     }
26499
 
   else
26500
 
     {
26501
 
Index: libgfortran/generated/maxloc0_16_r8.c
26502
 
===================================================================
26503
 
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
26504
 
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
26505
 
@@ -58,7 +58,7 @@
26506
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26507
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26508
 
       retarray->offset = 0;
26509
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26510
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26511
 
     }
26512
 
   else
26513
 
     {
26514
 
@@ -199,7 +199,7 @@
26515
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26516
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26517
 
       retarray->offset = 0;
26518
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26519
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26520
 
     }
26521
 
   else
26522
 
     {
26523
 
@@ -367,7 +367,7 @@
26524
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26525
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26526
 
       retarray->offset = 0;
26527
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26528
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26529
 
     }
26530
 
   else if (unlikely (compile_options.bounds_check))
26531
 
     {
26532
 
Index: libgfortran/generated/sum_i16.c
26533
 
===================================================================
26534
 
--- a/src/libgfortran/generated/sum_i16.c       (.../tags/gcc_4_8_3_release)
26535
 
+++ b/src/libgfortran/generated/sum_i16.c       (.../branches/gcc-4_8-branch)
26536
 
@@ -97,10 +97,9 @@
26537
 
       retarray->offset = 0;
26538
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26539
 
 
26540
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26541
 
-                  * extent[rank-1];
26542
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26543
 
 
26544
 
-      retarray->base_addr = xmalloc (alloc_size);
26545
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26546
 
       if (alloc_size == 0)
26547
 
        {
26548
 
          /* Make sure we have a zero-sized array.  */
26549
 
@@ -272,8 +271,7 @@
26550
 
 
26551
 
        }
26552
 
 
26553
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26554
 
-                  * extent[rank-1];
26555
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26556
 
 
26557
 
       retarray->offset = 0;
26558
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26559
 
@@ -285,7 +283,7 @@
26560
 
          return;
26561
 
        }
26562
 
       else
26563
 
-       retarray->base_addr = xmalloc (alloc_size);
26564
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26565
 
 
26566
 
     }
26567
 
   else
26568
 
@@ -430,8 +428,7 @@
26569
 
       retarray->offset = 0;
26570
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26571
 
 
26572
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26573
 
-                  * extent[rank-1];
26574
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26575
 
 
26576
 
       if (alloc_size == 0)
26577
 
        {
26578
 
@@ -440,7 +437,7 @@
26579
 
          return;
26580
 
        }
26581
 
       else
26582
 
-       retarray->base_addr = xmalloc (alloc_size);
26583
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26584
 
     }
26585
 
   else
26586
 
     {
26587
 
Index: libgfortran/generated/maxloc0_4_i8.c
26588
 
===================================================================
26589
 
--- a/src/libgfortran/generated/maxloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
26590
 
+++ b/src/libgfortran/generated/maxloc0_4_i8.c  (.../branches/gcc-4_8-branch)
26591
 
@@ -58,7 +58,7 @@
26592
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26593
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26594
 
       retarray->offset = 0;
26595
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26596
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26597
 
     }
26598
 
   else
26599
 
     {
26600
 
@@ -199,7 +199,7 @@
26601
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26602
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26603
 
       retarray->offset = 0;
26604
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26605
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26606
 
     }
26607
 
   else
26608
 
     {
26609
 
@@ -367,7 +367,7 @@
26610
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26611
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26612
 
       retarray->offset = 0;
26613
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26614
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26615
 
     }
26616
 
   else if (unlikely (compile_options.bounds_check))
26617
 
     {
26618
 
Index: libgfortran/generated/pack_c16.c
26619
 
===================================================================
26620
 
--- a/src/libgfortran/generated/pack_c16.c      (.../tags/gcc_4_8_3_release)
26621
 
+++ b/src/libgfortran/generated/pack_c16.c      (.../branches/gcc-4_8-branch)
26622
 
@@ -167,8 +167,8 @@
26623
 
 
26624
 
          ret->offset = 0;
26625
 
 
26626
 
-         /* xmalloc allocates a single byte for zero size.  */
26627
 
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
26628
 
+         /* xmallocarray allocates a single byte for zero size.  */
26629
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
26630
 
 
26631
 
          if (total == 0)
26632
 
            return;
26633
 
Index: libgfortran/generated/maxloc1_16_i16.c
26634
 
===================================================================
26635
 
--- a/src/libgfortran/generated/maxloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
26636
 
+++ b/src/libgfortran/generated/maxloc1_16_i16.c        (.../branches/gcc-4_8-branch)
26637
 
@@ -98,10 +98,9 @@
26638
 
       retarray->offset = 0;
26639
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26640
 
 
26641
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26642
 
-                  * extent[rank-1];
26643
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26644
 
 
26645
 
-      retarray->base_addr = xmalloc (alloc_size);
26646
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26647
 
       if (alloc_size == 0)
26648
 
        {
26649
 
          /* Make sure we have a zero-sized array.  */
26650
 
@@ -294,8 +293,7 @@
26651
 
 
26652
 
        }
26653
 
 
26654
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26655
 
-                  * extent[rank-1];
26656
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26657
 
 
26658
 
       retarray->offset = 0;
26659
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26660
 
@@ -307,7 +305,7 @@
26661
 
          return;
26662
 
        }
26663
 
       else
26664
 
-       retarray->base_addr = xmalloc (alloc_size);
26665
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26666
 
 
26667
 
     }
26668
 
   else
26669
 
@@ -485,8 +483,7 @@
26670
 
       retarray->offset = 0;
26671
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26672
 
 
26673
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26674
 
-                  * extent[rank-1];
26675
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26676
 
 
26677
 
       if (alloc_size == 0)
26678
 
        {
26679
 
@@ -495,7 +492,7 @@
26680
 
          return;
26681
 
        }
26682
 
       else
26683
 
-       retarray->base_addr = xmalloc (alloc_size);
26684
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26685
 
     }
26686
 
   else
26687
 
     {
26688
 
Index: libgfortran/generated/minloc1_8_r4.c
26689
 
===================================================================
26690
 
--- a/src/libgfortran/generated/minloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
26691
 
+++ b/src/libgfortran/generated/minloc1_8_r4.c  (.../branches/gcc-4_8-branch)
26692
 
@@ -98,10 +98,9 @@
26693
 
       retarray->offset = 0;
26694
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26695
 
 
26696
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26697
 
-                  * extent[rank-1];
26698
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26699
 
 
26700
 
-      retarray->base_addr = xmalloc (alloc_size);
26701
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26702
 
       if (alloc_size == 0)
26703
 
        {
26704
 
          /* Make sure we have a zero-sized array.  */
26705
 
@@ -294,8 +293,7 @@
26706
 
 
26707
 
        }
26708
 
 
26709
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26710
 
-                  * extent[rank-1];
26711
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26712
 
 
26713
 
       retarray->offset = 0;
26714
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26715
 
@@ -307,7 +305,7 @@
26716
 
          return;
26717
 
        }
26718
 
       else
26719
 
-       retarray->base_addr = xmalloc (alloc_size);
26720
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26721
 
 
26722
 
     }
26723
 
   else
26724
 
@@ -485,8 +483,7 @@
26725
 
       retarray->offset = 0;
26726
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26727
 
 
26728
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26729
 
-                  * extent[rank-1];
26730
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26731
 
 
26732
 
       if (alloc_size == 0)
26733
 
        {
26734
 
@@ -495,7 +492,7 @@
26735
 
          return;
26736
 
        }
26737
 
       else
26738
 
-       retarray->base_addr = xmalloc (alloc_size);
26739
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26740
 
     }
26741
 
   else
26742
 
     {
26743
 
Index: libgfortran/generated/sum_c8.c
26744
 
===================================================================
26745
 
--- a/src/libgfortran/generated/sum_c8.c        (.../tags/gcc_4_8_3_release)
26746
 
+++ b/src/libgfortran/generated/sum_c8.c        (.../branches/gcc-4_8-branch)
26747
 
@@ -97,10 +97,9 @@
26748
 
       retarray->offset = 0;
26749
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26750
 
 
26751
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26752
 
-                  * extent[rank-1];
26753
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26754
 
 
26755
 
-      retarray->base_addr = xmalloc (alloc_size);
26756
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26757
 
       if (alloc_size == 0)
26758
 
        {
26759
 
          /* Make sure we have a zero-sized array.  */
26760
 
@@ -272,8 +271,7 @@
26761
 
 
26762
 
        }
26763
 
 
26764
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26765
 
-                  * extent[rank-1];
26766
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26767
 
 
26768
 
       retarray->offset = 0;
26769
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26770
 
@@ -285,7 +283,7 @@
26771
 
          return;
26772
 
        }
26773
 
       else
26774
 
-       retarray->base_addr = xmalloc (alloc_size);
26775
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26776
 
 
26777
 
     }
26778
 
   else
26779
 
@@ -430,8 +428,7 @@
26780
 
       retarray->offset = 0;
26781
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26782
 
 
26783
 
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26784
 
-                  * extent[rank-1];
26785
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26786
 
 
26787
 
       if (alloc_size == 0)
26788
 
        {
26789
 
@@ -440,7 +437,7 @@
26790
 
          return;
26791
 
        }
26792
 
       else
26793
 
-       retarray->base_addr = xmalloc (alloc_size);
26794
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26795
 
     }
26796
 
   else
26797
 
     {
26798
 
Index: libgfortran/generated/maxloc1_16_i2.c
26799
 
===================================================================
26800
 
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
26801
 
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
26802
 
@@ -98,10 +98,9 @@
26803
 
       retarray->offset = 0;
26804
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26805
 
 
26806
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26807
 
-                  * extent[rank-1];
26808
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26809
 
 
26810
 
-      retarray->base_addr = xmalloc (alloc_size);
26811
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26812
 
       if (alloc_size == 0)
26813
 
        {
26814
 
          /* Make sure we have a zero-sized array.  */
26815
 
@@ -294,8 +293,7 @@
26816
 
 
26817
 
        }
26818
 
 
26819
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26820
 
-                  * extent[rank-1];
26821
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26822
 
 
26823
 
       retarray->offset = 0;
26824
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26825
 
@@ -307,7 +305,7 @@
26826
 
          return;
26827
 
        }
26828
 
       else
26829
 
-       retarray->base_addr = xmalloc (alloc_size);
26830
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26831
 
 
26832
 
     }
26833
 
   else
26834
 
@@ -485,8 +483,7 @@
26835
 
       retarray->offset = 0;
26836
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26837
 
 
26838
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26839
 
-                  * extent[rank-1];
26840
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26841
 
 
26842
 
       if (alloc_size == 0)
26843
 
        {
26844
 
@@ -495,7 +492,7 @@
26845
 
          return;
26846
 
        }
26847
 
       else
26848
 
-       retarray->base_addr = xmalloc (alloc_size);
26849
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26850
 
     }
26851
 
   else
26852
 
     {
26853
 
Index: libgfortran/generated/parity_l1.c
26854
 
===================================================================
26855
 
--- a/src/libgfortran/generated/parity_l1.c     (.../tags/gcc_4_8_3_release)
26856
 
+++ b/src/libgfortran/generated/parity_l1.c     (.../branches/gcc-4_8-branch)
26857
 
@@ -98,10 +98,9 @@
26858
 
       retarray->offset = 0;
26859
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26860
 
 
26861
 
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26862
 
-                  * extent[rank-1];
26863
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26864
 
 
26865
 
-      retarray->base_addr = xmalloc (alloc_size);
26866
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
26867
 
       if (alloc_size == 0)
26868
 
        {
26869
 
          /* Make sure we have a zero-sized array.  */
26870
 
Index: libgfortran/generated/maxval_i16.c
26871
 
===================================================================
26872
 
--- a/src/libgfortran/generated/maxval_i16.c    (.../tags/gcc_4_8_3_release)
26873
 
+++ b/src/libgfortran/generated/maxval_i16.c    (.../branches/gcc-4_8-branch)
26874
 
@@ -97,10 +97,9 @@
26875
 
       retarray->offset = 0;
26876
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26877
 
 
26878
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26879
 
-                  * extent[rank-1];
26880
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26881
 
 
26882
 
-      retarray->base_addr = xmalloc (alloc_size);
26883
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26884
 
       if (alloc_size == 0)
26885
 
        {
26886
 
          /* Make sure we have a zero-sized array.  */
26887
 
@@ -286,8 +285,7 @@
26888
 
 
26889
 
        }
26890
 
 
26891
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26892
 
-                  * extent[rank-1];
26893
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26894
 
 
26895
 
       retarray->offset = 0;
26896
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26897
 
@@ -299,7 +297,7 @@
26898
 
          return;
26899
 
        }
26900
 
       else
26901
 
-       retarray->base_addr = xmalloc (alloc_size);
26902
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26903
 
 
26904
 
     }
26905
 
   else
26906
 
@@ -472,8 +470,7 @@
26907
 
       retarray->offset = 0;
26908
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26909
 
 
26910
 
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26911
 
-                  * extent[rank-1];
26912
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26913
 
 
26914
 
       if (alloc_size == 0)
26915
 
        {
26916
 
@@ -482,7 +479,7 @@
26917
 
          return;
26918
 
        }
26919
 
       else
26920
 
-       retarray->base_addr = xmalloc (alloc_size);
26921
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26922
 
     }
26923
 
   else
26924
 
     {
26925
 
Index: libgfortran/generated/spread_c8.c
26926
 
===================================================================
26927
 
--- a/src/libgfortran/generated/spread_c8.c     (.../tags/gcc_4_8_3_release)
26928
 
+++ b/src/libgfortran/generated/spread_c8.c     (.../branches/gcc-4_8-branch)
26929
 
@@ -101,8 +101,8 @@
26930
 
        }
26931
 
       ret->offset = 0;
26932
 
 
26933
 
-      /* xmalloc allocates a single byte for zero size.  */
26934
 
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
26935
 
+      /* xmallocarray allocates a single byte for zero size.  */
26936
 
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
26937
 
       if (rs <= 0)
26938
 
         return;
26939
 
     }
26940
 
@@ -244,7 +244,7 @@
26941
 
 
26942
 
   if (ret->base_addr == NULL)
26943
 
     {
26944
 
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
26945
 
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
26946
 
       ret->offset = 0;
26947
 
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
26948
 
     }
26949
 
Index: libgfortran/generated/matmul_i16.c
26950
 
===================================================================
26951
 
--- a/src/libgfortran/generated/matmul_i16.c    (.../tags/gcc_4_8_3_release)
26952
 
+++ b/src/libgfortran/generated/matmul_i16.c    (.../branches/gcc-4_8-branch)
26953
 
@@ -124,7 +124,7 @@
26954
 
         }
26955
 
 
26956
 
       retarray->base_addr
26957
 
-       = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
26958
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
26959
 
       retarray->offset = 0;
26960
 
     }
26961
 
     else if (unlikely (compile_options.bounds_check))
26962
 
Index: libgfortran/generated/pack_i8.c
26963
 
===================================================================
26964
 
--- a/src/libgfortran/generated/pack_i8.c       (.../tags/gcc_4_8_3_release)
26965
 
+++ b/src/libgfortran/generated/pack_i8.c       (.../branches/gcc-4_8-branch)
26966
 
@@ -167,8 +167,8 @@
26967
 
 
26968
 
          ret->offset = 0;
26969
 
 
26970
 
-         /* xmalloc allocates a single byte for zero size.  */
26971
 
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
26972
 
+         /* xmallocarray allocates a single byte for zero size.  */
26973
 
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
26974
 
 
26975
 
          if (total == 0)
26976
 
            return;
26977
 
Index: libgfortran/generated/any_l1.c
26978
 
===================================================================
26979
 
--- a/src/libgfortran/generated/any_l1.c        (.../tags/gcc_4_8_3_release)
26980
 
+++ b/src/libgfortran/generated/any_l1.c        (.../branches/gcc-4_8-branch)
26981
 
@@ -101,8 +101,7 @@
26982
 
       retarray->offset = 0;
26983
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26984
 
 
26985
 
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26986
 
-                  * extent[rank-1];
26987
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26988
 
 
26989
 
       if (alloc_size == 0)
26990
 
        {
26991
 
@@ -111,7 +110,7 @@
26992
 
          return;
26993
 
        }
26994
 
       else
26995
 
-       retarray->base_addr = xmalloc (alloc_size);
26996
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
26997
 
     }
26998
 
   else
26999
 
     {
27000
 
Index: libgfortran/generated/minloc1_8_i2.c
27001
 
===================================================================
27002
 
--- a/src/libgfortran/generated/minloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
27003
 
+++ b/src/libgfortran/generated/minloc1_8_i2.c  (.../branches/gcc-4_8-branch)
27004
 
@@ -98,10 +98,9 @@
27005
 
       retarray->offset = 0;
27006
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27007
 
 
27008
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27009
 
-                  * extent[rank-1];
27010
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27011
 
 
27012
 
-      retarray->base_addr = xmalloc (alloc_size);
27013
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27014
 
       if (alloc_size == 0)
27015
 
        {
27016
 
          /* Make sure we have a zero-sized array.  */
27017
 
@@ -294,8 +293,7 @@
27018
 
 
27019
 
        }
27020
 
 
27021
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27022
 
-                  * extent[rank-1];
27023
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27024
 
 
27025
 
       retarray->offset = 0;
27026
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27027
 
@@ -307,7 +305,7 @@
27028
 
          return;
27029
 
        }
27030
 
       else
27031
 
-       retarray->base_addr = xmalloc (alloc_size);
27032
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27033
 
 
27034
 
     }
27035
 
   else
27036
 
@@ -485,8 +483,7 @@
27037
 
       retarray->offset = 0;
27038
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27039
 
 
27040
 
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27041
 
-                  * extent[rank-1];
27042
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27043
 
 
27044
 
       if (alloc_size == 0)
27045
 
        {
27046
 
@@ -495,7 +492,7 @@
27047
 
          return;
27048
 
        }
27049
 
       else
27050
 
-       retarray->base_addr = xmalloc (alloc_size);
27051
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27052
 
     }
27053
 
   else
27054
 
     {
27055
 
Index: libgfortran/generated/minloc0_8_r8.c
27056
 
===================================================================
27057
 
--- a/src/libgfortran/generated/minloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
27058
 
+++ b/src/libgfortran/generated/minloc0_8_r8.c  (.../branches/gcc-4_8-branch)
27059
 
@@ -58,7 +58,7 @@
27060
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
27061
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27062
 
       retarray->offset = 0;
27063
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27064
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27065
 
     }
27066
 
   else
27067
 
     {
27068
 
@@ -199,7 +199,7 @@
27069
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
27070
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27071
 
       retarray->offset = 0;
27072
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27073
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27074
 
     }
27075
 
   else
27076
 
     {
27077
 
@@ -367,7 +367,7 @@
27078
 
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
27079
 
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27080
 
       retarray->offset = 0;
27081
 
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27082
 
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27083
 
     }
27084
 
   else if (unlikely (compile_options.bounds_check))
27085
 
     {
27086
 
Index: libgfortran/generated/matmul_l8.c
27087
 
===================================================================
27088
 
--- a/src/libgfortran/generated/matmul_l8.c     (.../tags/gcc_4_8_3_release)
27089
 
+++ b/src/libgfortran/generated/matmul_l8.c     (.../branches/gcc-4_8-branch)
27090
 
@@ -88,7 +88,7 @@
27091
 
         }
27092
 
           
27093
 
       retarray->base_addr
27094
 
-       = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
27095
 
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
27096
 
       retarray->offset = 0;
27097
 
     }
27098
 
     else if (unlikely (compile_options.bounds_check))
27099
 
Index: libgfortran/generated/product_r10.c
27100
 
===================================================================
27101
 
--- a/src/libgfortran/generated/product_r10.c   (.../tags/gcc_4_8_3_release)
27102
 
+++ b/src/libgfortran/generated/product_r10.c   (.../branches/gcc-4_8-branch)
27103
 
@@ -97,10 +97,9 @@
27104
 
       retarray->offset = 0;
27105
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27106
 
 
27107
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27108
 
-                  * extent[rank-1];
27109
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27110
 
 
27111
 
-      retarray->base_addr = xmalloc (alloc_size);
27112
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27113
 
       if (alloc_size == 0)
27114
 
        {
27115
 
          /* Make sure we have a zero-sized array.  */
27116
 
@@ -272,8 +271,7 @@
27117
 
 
27118
 
        }
27119
 
 
27120
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27121
 
-                  * extent[rank-1];
27122
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27123
 
 
27124
 
       retarray->offset = 0;
27125
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27126
 
@@ -285,7 +283,7 @@
27127
 
          return;
27128
 
        }
27129
 
       else
27130
 
-       retarray->base_addr = xmalloc (alloc_size);
27131
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27132
 
 
27133
 
     }
27134
 
   else
27135
 
@@ -430,8 +428,7 @@
27136
 
       retarray->offset = 0;
27137
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27138
 
 
27139
 
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27140
 
-                  * extent[rank-1];
27141
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27142
 
 
27143
 
       if (alloc_size == 0)
27144
 
        {
27145
 
@@ -440,7 +437,7 @@
27146
 
          return;
27147
 
        }
27148
 
       else
27149
 
-       retarray->base_addr = xmalloc (alloc_size);
27150
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27151
 
     }
27152
 
   else
27153
 
     {
27154
 
Index: libgfortran/generated/product_i1.c
27155
 
===================================================================
27156
 
--- a/src/libgfortran/generated/product_i1.c    (.../tags/gcc_4_8_3_release)
27157
 
+++ b/src/libgfortran/generated/product_i1.c    (.../branches/gcc-4_8-branch)
27158
 
@@ -97,10 +97,9 @@
27159
 
       retarray->offset = 0;
27160
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27161
 
 
27162
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27163
 
-                  * extent[rank-1];
27164
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27165
 
 
27166
 
-      retarray->base_addr = xmalloc (alloc_size);
27167
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27168
 
       if (alloc_size == 0)
27169
 
        {
27170
 
          /* Make sure we have a zero-sized array.  */
27171
 
@@ -272,8 +271,7 @@
27172
 
 
27173
 
        }
27174
 
 
27175
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27176
 
-                  * extent[rank-1];
27177
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27178
 
 
27179
 
       retarray->offset = 0;
27180
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27181
 
@@ -285,7 +283,7 @@
27182
 
          return;
27183
 
        }
27184
 
       else
27185
 
-       retarray->base_addr = xmalloc (alloc_size);
27186
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27187
 
 
27188
 
     }
27189
 
   else
27190
 
@@ -430,8 +428,7 @@
27191
 
       retarray->offset = 0;
27192
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27193
 
 
27194
 
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27195
 
-                  * extent[rank-1];
27196
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27197
 
 
27198
 
       if (alloc_size == 0)
27199
 
        {
27200
 
@@ -440,7 +437,7 @@
27201
 
          return;
27202
 
        }
27203
 
       else
27204
 
-       retarray->base_addr = xmalloc (alloc_size);
27205
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27206
 
     }
27207
 
   else
27208
 
     {
27209
 
Index: libgfortran/generated/all_l8.c
27210
 
===================================================================
27211
 
--- a/src/libgfortran/generated/all_l8.c        (.../tags/gcc_4_8_3_release)
27212
 
+++ b/src/libgfortran/generated/all_l8.c        (.../branches/gcc-4_8-branch)
27213
 
@@ -101,8 +101,7 @@
27214
 
       retarray->offset = 0;
27215
 
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27216
 
 
27217
 
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27218
 
-                  * extent[rank-1];
27219
 
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27220
 
 
27221
 
       if (alloc_size == 0)
27222
 
        {
27223
 
@@ -111,7 +110,7 @@
27224
 
          return;
27225
 
        }
27226
 
       else
27227
 
-       retarray->base_addr = xmalloc (alloc_size);
27228
 
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
27229
 
     }
27230
 
   else
27231
 
     {
27232
 
Index: libgfortran/generated/in_pack_r16.c
27233
 
===================================================================
27234
 
--- a/src/libgfortran/generated/in_pack_r16.c   (.../tags/gcc_4_8_3_release)
27235
 
+++ b/src/libgfortran/generated/in_pack_r16.c   (.../branches/gcc-4_8-branch)
27236
 
@@ -76,7 +76,7 @@
27237
 
     return source->base_addr;
27238
 
 
27239
 
   /* Allocate storage for the destination.  */
27240
 
-  destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
27241
 
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
27242
 
   dest = destptr;
27243
 
   src = source->base_addr;
27244
 
   stride0 = stride[0];
27245
 
Index: libgfortran/generated/in_pack_i1.c
27246
 
===================================================================
27247
 
--- a/src/libgfortran/generated/in_pack_i1.c    (.../tags/gcc_4_8_3_release)
27248
 
+++ b/src/libgfortran/generated/in_pack_i1.c    (.../branches/gcc-4_8-branch)
27249
 
@@ -76,7 +76,7 @@
27250
 
     return source->base_addr;
27251
 
 
27252
 
   /* Allocate storage for the destination.  */
27253
 
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
27254
 
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
27255
 
   dest = destptr;
27256
 
   src = source->base_addr;
27257
 
   stride0 = stride[0];
27258
 
Index: libgfortran/libgfortran.h
27259
 
===================================================================
27260
 
--- a/src/libgfortran/libgfortran.h     (.../tags/gcc_4_8_3_release)
27261
 
+++ b/src/libgfortran/libgfortran.h     (.../branches/gcc-4_8-branch)
27262
 
@@ -751,6 +751,9 @@
27263
 
 extern void *xmalloc (size_t) __attribute__ ((malloc));
27264
 
 internal_proto(xmalloc);
27265
 
 
27266
 
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
27267
 
+internal_proto(xmallocarray);
27268
 
+
27269
 
 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
27270
 
 internal_proto(xcalloc);
27271
 
 
27272
 
Index: libgfortran/config.h.in
27273
 
===================================================================
27274
 
--- a/src/libgfortran/config.h.in       (.../tags/gcc_4_8_3_release)
27275
 
+++ b/src/libgfortran/config.h.in       (.../branches/gcc-4_8-branch)
27276
 
@@ -711,6 +711,9 @@
27277
 
 /* Define to 1 if you have the `strtof' function. */
27278
 
 #undef HAVE_STRTOF
27279
 
 
27280
 
+/* Define to 1 if you have the `strtok_r' function. */
27281
 
+#undef HAVE_STRTOK_R
27282
 
+
27283
 
 /* Define to 1 if you have the `strtold' function. */
27284
 
 #undef HAVE_STRTOLD
27285
 
 
27286
 
Index: libgfortran/io/list_read.c
27287
 
===================================================================
27288
 
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_8_3_release)
27289
 
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_8-branch)
27290
 
@@ -2354,7 +2354,7 @@
27291
 
 {
27292
 
   index_type len = strlen (nl->var_name) + 1;
27293
 
   int dim;
27294
 
-  char * ext_name = (char*)xmalloc (len + 1);
27295
 
+  char * ext_name = xmalloc (len + 1);
27296
 
   memcpy (ext_name, nl->var_name, len-1);
27297
 
   memcpy (ext_name + len - 1, "%", 2);
27298
 
   for (nl = nl->next; nl; nl = nl->next)
27299
 
Index: libgfortran/io/unit.c
27300
 
===================================================================
27301
 
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
27302
 
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
27303
 
@@ -455,7 +455,7 @@
27304
 
     {
27305
 
       iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
27306
 
       iunit->ls = (array_loop_spec *)
27307
 
-       xmalloc (iunit->rank * sizeof (array_loop_spec));
27308
 
+       xmallocarray (iunit->rank, sizeof (array_loop_spec));
27309
 
       dtp->internal_unit_len *=
27310
 
        init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
27311
 
 
27312
 
Index: libgfortran/io/unix.c
27313
 
===================================================================
27314
 
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
27315
 
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
27316
 
@@ -407,7 +407,9 @@
27317
 
 {
27318
 
   int retval;
27319
 
   
27320
 
-  if (s->fd != STDOUT_FILENO
27321
 
+  if (s->fd == -1)
27322
 
+    retval = -1;
27323
 
+  else if (s->fd != STDOUT_FILENO
27324
 
       && s->fd != STDERR_FILENO
27325
 
       && s->fd != STDIN_FILENO)
27326
 
     retval = close (s->fd);
27327
 
@@ -983,7 +985,15 @@
27328
 
 
27329
 
   /* Get the current length of the file. */
27330
 
 
27331
 
-  fstat (fd, &statbuf);
27332
 
+  if (fstat (fd, &statbuf) == -1)
27333
 
+    {
27334
 
+      s->st_dev = s->st_ino = -1;
27335
 
+      s->file_length = 0;
27336
 
+      if (errno == EBADF)
27337
 
+       s->fd = -1;
27338
 
+      raw_init (s);
27339
 
+      return (stream *) s;
27340
 
+    }
27341
 
 
27342
 
   s->st_dev = statbuf.st_dev;
27343
 
   s->st_ino = statbuf.st_ino;
27344
 
Index: libgfortran/io/transfer.c
27345
 
===================================================================
27346
 
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_8_3_release)
27347
 
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_8-branch)
27348
 
@@ -3776,9 +3776,9 @@
27349
 
   if (nml->var_rank > 0)
27350
 
     {
27351
 
       nml->dim = (descriptor_dimension*)
27352
 
-                  xmalloc (nml->var_rank * sizeof (descriptor_dimension));
27353
 
+       xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
27354
 
       nml->ls = (array_loop_spec*)
27355
 
-                 xmalloc (nml->var_rank * sizeof (array_loop_spec));
27356
 
+       xmallocarray (nml->var_rank, sizeof (array_loop_spec));
27357
 
     }
27358
 
   else
27359
 
     {
27360
 
Index: libgfortran/io/write.c
27361
 
===================================================================
27362
 
--- a/src/libgfortran/io/write.c        (.../tags/gcc_4_8_3_release)
27363
 
+++ b/src/libgfortran/io/write.c        (.../branches/gcc-4_8-branch)
27364
 
@@ -1863,7 +1863,7 @@
27365
 
              base_var_name_len = base ? strlen (base->var_name) : 0;
27366
 
              ext_name_len = base_name_len + base_var_name_len 
27367
 
                + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
27368
 
-             ext_name = (char*)xmalloc (ext_name_len);
27369
 
+             ext_name = xmalloc (ext_name_len);
27370
 
 
27371
 
              memcpy (ext_name, base_name, base_name_len);
27372
 
              clen = strlen (obj->var_name + base_var_name_len);
27373
 
@@ -1892,7 +1892,7 @@
27374
 
              /* Now obj_name.  */
27375
 
 
27376
 
              obj_name_len = strlen (obj->var_name) + 1;
27377
 
-             obj_name = xmalloc (obj_name_len+1);
27378
 
+             obj_name = xmalloc (obj_name_len + 1);
27379
 
              memcpy (obj_name, obj->var_name, obj_name_len-1);
27380
 
              memcpy (obj_name + obj_name_len-1, "%", 2);
27381
 
 
27382
 
Index: Makefile.def
27383
 
===================================================================
27384
 
--- a/src/Makefile.def  (.../tags/gcc_4_8_3_release)
27385
 
+++ b/src/Makefile.def  (.../branches/gcc-4_8-branch)
27386
 
@@ -292,6 +292,10 @@
27387
 
 // Host modules specific to gcc.
27388
 
 dependencies = { module=configure-gcc; on=configure-intl; };
27389
 
 dependencies = { module=configure-gcc; on=all-gmp; };
27390
 
+dependencies = { module=configure-gcc; on=all-mpfr; };
27391
 
+dependencies = { module=configure-gcc; on=all-mpc; };
27392
 
+dependencies = { module=configure-gcc; on=all-isl; };
27393
 
+dependencies = { module=configure-gcc; on=all-cloog; };
27394
 
 dependencies = { module=configure-gcc; on=all-lto-plugin; };
27395
 
 dependencies = { module=configure-gcc; on=all-binutils; };
27396
 
 dependencies = { module=configure-gcc; on=all-gas; };
27397
 
Index: libada/Makefile.in
27398
 
===================================================================
27399
 
--- a/src/libada/Makefile.in    (.../tags/gcc_4_8_3_release)
27400
 
+++ b/src/libada/Makefile.in    (.../branches/gcc-4_8-branch)
27401
 
@@ -60,7 +60,7 @@
27402
 
 PICFLAG = @PICFLAG@
27403
 
 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
27404
 
 GNATLIBCFLAGS= -g -O2
27405
 
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
27406
 
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
27407
 
        -fexceptions -DIN_RTS @have_getipinfo@
27408
 
 
27409
 
 host_subdir = @host_subdir@
27410
 
Index: libada/ChangeLog
27411
 
===================================================================
27412
 
--- a/src/libada/ChangeLog      (.../tags/gcc_4_8_3_release)
27413
 
+++ b/src/libada/ChangeLog      (.../branches/gcc-4_8-branch)
27414
 
@@ -1,3 +1,7 @@
27415
 
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
27416
 
+
27417
 
+       * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
27418
 
+
27419
 
 2014-05-22  Release Manager
27420
 
 
27421
 
        * GCC 4.8.3 released.
27422
 
Index: libffi/src/powerpc/linux64_closure.S
27423
 
===================================================================
27424
 
--- a/src/libffi/src/powerpc/linux64_closure.S  (.../tags/gcc_4_8_3_release)
27425
 
+++ b/src/libffi/src/powerpc/linux64_closure.S  (.../branches/gcc-4_8-branch)
27426
 
@@ -381,7 +381,8 @@
27427
 
        .align 3
27428
 
 .LEFDE1:
27429
 
 
27430
 
-# if defined __ELF__ && defined __linux__
27431
 
+#endif
27432
 
+
27433
 
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27434
 
        .section        .note.GNU-stack,"",@progbits
27435
 
-# endif
27436
 
 #endif
27437
 
Index: libffi/src/powerpc/linux64.S
27438
 
===================================================================
27439
 
--- a/src/libffi/src/powerpc/linux64.S  (.../tags/gcc_4_8_3_release)
27440
 
+++ b/src/libffi/src/powerpc/linux64.S  (.../branches/gcc-4_8-branch)
27441
 
@@ -254,7 +254,8 @@
27442
 
        .align 3
27443
 
 .LEFDE1:
27444
 
 
27445
 
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27446
 
+#endif
27447
 
+
27448
 
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27449
 
        .section        .note.GNU-stack,"",@progbits
27450
 
-# endif
27451
 
 #endif
27452
 
Index: libffi/ChangeLog
27453
 
===================================================================
27454
 
--- a/src/libffi/ChangeLog      (.../tags/gcc_4_8_3_release)
27455
 
+++ b/src/libffi/ChangeLog      (.../branches/gcc-4_8-branch)
27456
 
@@ -1,3 +1,9 @@
27457
 
+2014-09-11  Jakub Jelinek  <jakub@redhat.com>
27458
 
+
27459
 
+       * src/powerpc/linux64.S: Emit .note.GNU-stack even when
27460
 
+       POWERPC64 is not defined.
27461
 
+       * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.
27462
 
+
27463
 
 2014-05-22  Release Manager
27464
 
 
27465
 
        * GCC 4.8.3 released.
27466
 
Index: libcpp/line-map.c
27467
 
===================================================================
27468
 
--- a/src/libcpp/line-map.c     (.../tags/gcc_4_8_3_release)
27469
 
+++ b/src/libcpp/line-map.c     (.../branches/gcc-4_8-branch)
27470
 
@@ -527,10 +527,10 @@
27471
 
          && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
27472
 
       || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
27473
 
       || (max_column_hint <= 80
27474
 
-         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
27475
 
-    {
27476
 
-      add_map = true;
27477
 
-    }
27478
 
+         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
27479
 
+      || (highest > 0x60000000
27480
 
+         && (set->max_column_hint || highest > 0x70000000)))
27481
 
+    add_map = true;
27482
 
   else
27483
 
     max_column_hint = set->max_column_hint;
27484
 
   if (add_map)
27485
 
@@ -541,7 +541,7 @@
27486
 
          /* If the column number is ridiculous or we've allocated a huge
27487
 
             number of source_locations, give up on column numbers. */
27488
 
          max_column_hint = 0;
27489
 
-         if (highest >0x70000000)
27490
 
+         if (highest > 0x70000000)
27491
 
            return 0;
27492
 
          column_bits = 0;
27493
 
        }
27494
 
Index: libcpp/ChangeLog
27495
 
===================================================================
27496
 
--- a/src/libcpp/ChangeLog      (.../tags/gcc_4_8_3_release)
27497
 
+++ b/src/libcpp/ChangeLog      (.../branches/gcc-4_8-branch)
27498
 
@@ -1,3 +1,24 @@
27499
 
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
27500
 
+
27501
 
+       Backported from mainline
27502
 
+       2014-11-25  Jakub Jelinek  <jakub@redhat.com>
27503
 
+
27504
 
+       PR preprocessor/60436
27505
 
+       * line-map.c (linemap_line_start): If highest is above 0x60000000
27506
 
+       and we are still tracking columns or highest is above 0x70000000,
27507
 
+       force add_map.
27508
 
+
27509
 
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27510
 
+
27511
 
+       Backport from mainline r215873
27512
 
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27513
 
+
27514
 
+       * lex.c (search_line_fast): Add new version to be used for Power8
27515
 
+       and later targets when Altivec is enabled.  Restrict the existing
27516
 
+       Altivec version to big-endian systems so that lvsr is not used on
27517
 
+       little endian, where it is deprecated.  Remove LE-specific code
27518
 
+       from the now-BE-only version.
27519
 
+
27520
 
 2014-05-22  Release Manager
27521
 
 
27522
 
        * GCC 4.8.3 released.
27523
 
Index: libcpp/lex.c
27524
 
===================================================================
27525
 
--- a/src/libcpp/lex.c  (.../tags/gcc_4_8_3_release)
27526
 
+++ b/src/libcpp/lex.c  (.../branches/gcc-4_8-branch)
27527
 
@@ -515,9 +515,111 @@
27528
 
   search_line_fast = impl;
27529
 
 }
27530
 
 
27531
 
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
27532
 
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
27533
 
 
27534
 
-/* A vection of the fast scanner using AltiVec vectorized byte compares.  */
27535
 
+/* A vection of the fast scanner using AltiVec vectorized byte compares
27536
 
+   and VSX unaligned loads (when VSX is available).  This is otherwise
27537
 
+   the same as the pre-GCC 5 version.  */
27538
 
+
27539
 
+static const uchar *
27540
 
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
27541
 
+{
27542
 
+  typedef __attribute__((altivec(vector))) unsigned char vc;
27543
 
+
27544
 
+  const vc repl_nl = {
27545
 
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
27546
 
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
27547
 
+  };
27548
 
+  const vc repl_cr = {
27549
 
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', 
27550
 
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
27551
 
+  };
27552
 
+  const vc repl_bs = {
27553
 
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
27554
 
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
27555
 
+  };
27556
 
+  const vc repl_qm = {
27557
 
+    '?', '?', '?', '?', '?', '?', '?', '?', 
27558
 
+    '?', '?', '?', '?', '?', '?', '?', '?', 
27559
 
+  };
27560
 
+  const vc zero = { 0 };
27561
 
+
27562
 
+  vc data, t;
27563
 
+
27564
 
+  /* Main loop processing 16 bytes at a time.  */
27565
 
+  do
27566
 
+    {
27567
 
+      vc m_nl, m_cr, m_bs, m_qm;
27568
 
+
27569
 
+      data = *((const vc *)s);
27570
 
+      s += 16;
27571
 
+
27572
 
+      m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
27573
 
+      m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
27574
 
+      m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
27575
 
+      m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
27576
 
+      t = (m_nl | m_cr) | (m_bs | m_qm);
27577
 
+
27578
 
+      /* T now contains 0xff in bytes for which we matched one of the relevant
27579
 
+        characters.  We want to exit the loop if any byte in T is non-zero.
27580
 
+        Below is the expansion of vec_any_ne(t, zero).  */
27581
 
+    }
27582
 
+  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
27583
 
+
27584
 
+  /* Restore s to to point to the 16 bytes we just processed.  */
27585
 
+  s -= 16;
27586
 
+
27587
 
+  {
27588
 
+#define N  (sizeof(vc) / sizeof(long))
27589
 
+
27590
 
+    union {
27591
 
+      vc v;
27592
 
+      /* Statically assert that N is 2 or 4.  */
27593
 
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
27594
 
+    } u;
27595
 
+    unsigned long l, i = 0;
27596
 
+
27597
 
+    u.v = t;
27598
 
+
27599
 
+    /* Find the first word of T that is non-zero.  */
27600
 
+    switch (N)
27601
 
+      {
27602
 
+      case 4:
27603
 
+       l = u.l[i++];
27604
 
+       if (l != 0)
27605
 
+         break;
27606
 
+       s += sizeof(unsigned long);
27607
 
+       l = u.l[i++];
27608
 
+       if (l != 0)
27609
 
+         break;
27610
 
+       s += sizeof(unsigned long);
27611
 
+      case 2:
27612
 
+       l = u.l[i++];
27613
 
+       if (l != 0)
27614
 
+         break;
27615
 
+       s += sizeof(unsigned long);
27616
 
+       l = u.l[i];
27617
 
+      }
27618
 
+
27619
 
+    /* L now contains 0xff in bytes for which we matched one of the
27620
 
+       relevant characters.  We can find the byte index by finding
27621
 
+       its bit index and dividing by 8.  */
27622
 
+#ifdef __BIG_ENDIAN__
27623
 
+    l = __builtin_clzl(l) >> 3;
27624
 
+#else
27625
 
+    l = __builtin_ctzl(l) >> 3;
27626
 
+#endif
27627
 
+    return s + l;
27628
 
+
27629
 
+#undef N
27630
 
+  }
27631
 
+}
27632
 
+
27633
 
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
27634
 
+
27635
 
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
27636
 
+   This cannot be used for little endian because vec_lvsl/lvsr are
27637
 
+   deprecated for little endian and the code won't work properly.  */
27638
 
 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
27639
 
    so we can't compile this function without -maltivec on the command line
27640
 
    (or implied by some other switch).  */
27641
 
@@ -559,13 +661,8 @@
27642
 
      beginning with all ones and shifting in zeros according to the
27643
 
      mis-alignment.  The LVSR instruction pulls the exact shift we
27644
 
      want from the address.  */
27645
 
-#ifdef __BIG_ENDIAN__
27646
 
   mask = __builtin_vec_lvsr(0, s);
27647
 
   mask = __builtin_vec_perm(zero, ones, mask);
27648
 
-#else
27649
 
-  mask = __builtin_vec_lvsl(0, s);
27650
 
-  mask = __builtin_vec_perm(ones, zero, mask);
27651
 
-#endif
27652
 
   data &= mask;
27653
 
 
27654
 
   /* While altivec loads mask addresses, we still need to align S so
27655
 
@@ -629,11 +726,7 @@
27656
 
     /* L now contains 0xff in bytes for which we matched one of the
27657
 
        relevant characters.  We can find the byte index by finding
27658
 
        its bit index and dividing by 8.  */
27659
 
-#ifdef __BIG_ENDIAN__
27660
 
     l = __builtin_clzl(l) >> 3;
27661
 
-#else
27662
 
-    l = __builtin_ctzl(l) >> 3;
27663
 
-#endif
27664
 
     return s + l;
27665
 
 
27666
 
 #undef N
27667
 
Index: fixincludes/ChangeLog
27668
 
===================================================================
27669
 
--- a/src/fixincludes/ChangeLog (.../tags/gcc_4_8_3_release)
27670
 
+++ b/src/fixincludes/ChangeLog (.../branches/gcc-4_8-branch)
27671
 
@@ -1,3 +1,12 @@
27672
 
+2014-12-13  David Edelsohn  <dje.gcc@gmail.com>
27673
 
+
27674
 
+       Backport from mainline:
27675
 
+       2013-09-02  David Edelsohn  <dje.gcc@gmail.com>
27676
 
+
27677
 
+       * inclhack.def (aix_assert): New fix.
27678
 
+       * fixincl.x: Regenerate.
27679
 
+       * tests/base/assert.h [AIX_ASSERT_CHECK]: New check.
27680
 
+
27681
 
 2014-05-22  Release Manager
27682
 
 
27683
 
        * GCC 4.8.3 released.
27684
 
Index: fixincludes/tests/base/assert.h
27685
 
===================================================================
27686
 
--- a/src/fixincludes/tests/base/assert.h       (.../tags/gcc_4_8_3_release)
27687
 
+++ b/src/fixincludes/tests/base/assert.h       (.../branches/gcc-4_8-branch)
27688
 
@@ -19,6 +19,13 @@
27689
 
 #include <stdio.h>
27690
 
 
27691
 
 
27692
 
+#if defined( AIX_ASSERT_CHECK )
27693
 
+#ifndef __cplusplus
27694
 
+#define static_assert _Static_assert
27695
 
+#endif
27696
 
+#endif  /* AIX_ASSERT_CHECK */
27697
 
+
27698
 
+
27699
 
 #if defined( ALPHA___ASSERT_CHECK )
27700
 
 extern void __assert(const char *, const char *, int);
27701
 
 #endif  /* ALPHA___ASSERT_CHECK */
27702
 
Index: fixincludes/fixincl.x
27703
 
===================================================================
27704
 
--- a/src/fixincludes/fixincl.x (.../tags/gcc_4_8_3_release)
27705
 
+++ b/src/fixincludes/fixincl.x (.../branches/gcc-4_8-branch)
27706
 
@@ -2,11 +2,11 @@
27707
 
  * 
27708
 
  * DO NOT EDIT THIS FILE   (fixincl.x)
27709
 
  * 
27710
 
- * It has been AutoGen-ed  Thursday May 16, 2013 at 03:34:25 PM MEST
27711
 
+ * It has been AutoGen-ed  December 13, 2014 at 05:31:32 AM by AutoGen 5.12
27712
 
  * From the definitions    inclhack.def
27713
 
  * and the template file   fixincl
27714
 
  */
27715
 
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 16 15:34:25 MEST 2013
27716
 
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Dec 13 05:31:32 PST 2014
27717
 
  *
27718
 
  * You must regenerate it.  Use the ./genfixes script.
27719
 
  *
27720
 
@@ -15,7 +15,7 @@
27721
 
  * certain ANSI-incompatible system header files which are fixed to work
27722
 
  * correctly with ANSI C and placed in a directory that GNU C will search.
27723
 
  *
27724
 
- * This file contains 226 fixup descriptions.
27725
 
+ * This file contains 227 fixup descriptions.
27726
 
  *
27727
 
  * See README for more information.
27728
 
  *
27729
 
@@ -736,6 +736,45 @@
27730
 
 
27731
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
27732
 
  *
27733
 
+ *  Description of Aix_Assert fix
27734
 
+ */
27735
 
+tSCC zAix_AssertName[] =
27736
 
+     "aix_assert";
27737
 
+
27738
 
+/*
27739
 
+ *  File name selection pattern
27740
 
+ */
27741
 
+tSCC zAix_AssertList[] =
27742
 
+  "assert.h\0";
27743
 
+/*
27744
 
+ *  Machine/OS name selection pattern
27745
 
+ */
27746
 
+tSCC* apzAix_AssertMachs[] = {
27747
 
+        "*-*-aix*",
27748
 
+        (const char*)NULL };
27749
 
+
27750
 
+/*
27751
 
+ *  content selection pattern - do fix if pattern found
27752
 
+ */
27753
 
+tSCC zAix_AssertSelect0[] =
27754
 
+       "#define[ \t]static_assert[ \t]_Static_assert";
27755
 
+
27756
 
+#define    AIX_ASSERT_TEST_CT  1
27757
 
+static tTestDesc aAix_AssertTests[] = {
27758
 
+  { TT_EGREP,    zAix_AssertSelect0, (regex_t*)NULL }, };
27759
 
+
27760
 
+/*
27761
 
+ *  Fix Command Arguments for Aix_Assert
27762
 
+ */
27763
 
+static const char* apzAix_AssertPatch[] = {
27764
 
+    "format",
27765
 
+    "#ifndef __cplusplus\n\
27766
 
+%0\n\
27767
 
+#endif",
27768
 
+    (char*)NULL };
27769
 
+
27770
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
27771
 
+ *
27772
 
  *  Description of Aix_Complex fix
27773
 
  */
27774
 
 tSCC zAix_ComplexName[] =
27775
 
@@ -9265,9 +9304,9 @@
27776
 
  *
27777
 
  *  List of all fixes
27778
 
  */
27779
 
-#define REGEX_COUNT          264
27780
 
+#define REGEX_COUNT          265
27781
 
 #define MACH_LIST_SIZE_LIMIT 187
27782
 
-#define FIX_COUNT            226
27783
 
+#define FIX_COUNT            227
27784
 
 
27785
 
 /*
27786
 
  *  Enumerate the fixes
27787
 
@@ -9285,6 +9324,7 @@
27788
 
     AAB_VXWORKS_REGS_VXTYPES_FIXIDX,
27789
 
     AAB_VXWORKS_STDINT_FIXIDX,
27790
 
     AAB_VXWORKS_UNISTD_FIXIDX,
27791
 
+    AIX_ASSERT_FIXIDX,
27792
 
     AIX_COMPLEX_FIXIDX,
27793
 
     AIX_MALLOC_FIXIDX,
27794
 
     AIX_NET_IF_ARP_FIXIDX,
27795
 
@@ -9562,6 +9602,11 @@
27796
 
      AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
27797
 
      aAab_Vxworks_UnistdTests,   apzAab_Vxworks_UnistdPatch, 0 },
27798
 
 
27799
 
+  {  zAix_AssertName,    zAix_AssertList,
27800
 
+     apzAix_AssertMachs,
27801
 
+     AIX_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
27802
 
+     aAix_AssertTests,   apzAix_AssertPatch, 0 },
27803
 
+
27804
 
   {  zAix_ComplexName,    zAix_ComplexList,
27805
 
      apzAix_ComplexMachs,
27806
 
      AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
27807
 
Index: fixincludes/inclhack.def
27808
 
===================================================================
27809
 
--- a/src/fixincludes/inclhack.def      (.../tags/gcc_4_8_3_release)
27810
 
+++ b/src/fixincludes/inclhack.def      (.../branches/gcc-4_8-branch)
27811
 
@@ -574,6 +574,19 @@
27812
 
        _EndOfHeader_;
27813
 
 };
27814
 
 
27815
 
+/*
27816
 
+ * assert.h on AIX 7 redefines static_assert as _Static_assert without
27817
 
+ * protecting C++.
27818
 
+ */
27819
 
+fix = {
27820
 
+    hackname  = aix_assert;
27821
 
+    mach      = "*-*-aix*";
27822
 
+    files     = assert.h;
27823
 
+    select    = "#define[ \t]static_assert[ \t]_Static_assert";
27824
 
+    c_fix     = format;
27825
 
+    c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
27826
 
+    test_text = "#define static_assert _Static_assert";
27827
 
+};
27828
 
 
27829
 
 /*
27830
 
  * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
27831
 
Index: .
27832
 
===================================================================
27833
 
--- a/src/.     (.../tags/gcc_4_8_3_release)
27834
 
+++ b/src/.     (.../branches/gcc-4_8-branch)
27835
 
 
27836
 
Property changes on: .
27837
 
___________________________________________________________________
27838
 
Modified: svn:mergeinfo
27839
 
   Merged /trunk:r211733,215049