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

« back to all changes in this revision

Viewing changes to .svn/pristine/13/13be1359ab66dabac8f92375bbb8cc8cb48431bf.svn-base

  • 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:
 
1
# DP: updates from the 4.8 branch upto 20141208 (r218508).
 
2
 
 
3
last_updated()
 
4
{
 
5
        cat > ${dir}LAST_UPDATED <<EOF
 
6
Tue Dec  9 09:08:20 CET 2014
 
7
Tue Dec  9 08:08:20 UTC 2014 (revision 218508)
 
8
EOF
 
9
}
 
10
 
 
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
 
12
        | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
 
13
        | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
 
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,14 @@
 
2107
+2014-10-26  John David Anglin  <danglin@gcc.gnu.org>
 
2108
+
 
2109
+       * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
 
2110
+       (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
 
2111
+       memory read accesses are ok.
 
2112
+
 
2113
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
2114
+
 
2115
+       * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
 
2116
+       bits not set bits as indicating trapping exceptions.
 
2117
+
 
2118
 2014-05-22  Release Manager
 
2119
 
 
2120
        * GCC 4.8.3 released.
 
2121
Index: libgcc/config/i386/sfp-machine.h
 
2122
===================================================================
 
2123
--- a/src/libgcc/config/i386/sfp-machine.h      (.../tags/gcc_4_8_3_release)
 
2124
+++ b/src/libgcc/config/i386/sfp-machine.h      (.../branches/gcc-4_8-branch)
 
2125
@@ -59,7 +59,7 @@
 
2126
       __sfp_handle_exceptions (_fex);          \
 
2127
   } while (0);
 
2128
 
 
2129
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
2130
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
2131
 
 
2132
 #define FP_ROUNDMODE           (_fcw & FP_RND_MASK)
 
2133
 #endif
 
2134
Index: libgcc/config/pa/linux-unwind.h
 
2135
===================================================================
 
2136
--- a/src/libgcc/config/pa/linux-unwind.h       (.../tags/gcc_4_8_3_release)
 
2137
+++ b/src/libgcc/config/pa/linux-unwind.h       (.../branches/gcc-4_8-branch)
 
2138
@@ -32,6 +32,17 @@
 
2139
 #include <signal.h>
 
2140
 #include <sys/ucontext.h>
 
2141
 
 
2142
+/* Return TRUE if read access to *P is allowed.  */
 
2143
+
 
2144
+static inline long
 
2145
+pa32_read_access_ok (void *p)
 
2146
+{
 
2147
+  long ret;
 
2148
+
 
2149
+  __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
 
2150
+  return ret;
 
2151
+}
 
2152
+
 
2153
 /* Unfortunately, because of various bugs and changes to the kernel,
 
2154
    we have several cases to deal with.
 
2155
 
 
2156
@@ -48,8 +59,13 @@
 
2157
    tell us how to locate the sigcontext structure.
 
2158
 
 
2159
    Note that with a 2.4 64-bit kernel, the signal context is not properly
 
2160
-   passed back to userspace so the unwind will not work correctly.  */
 
2161
+   passed back to userspace so the unwind will not work correctly.
 
2162
 
 
2163
+   There is also a bug in various glibc versions.  The (CONTEXT)->ra
 
2164
+   for the outermost frame is not marked as undefined, so we need to
 
2165
+   check whether read access is allowed for all the accesses used in
 
2166
+   searching for the signal trampoline.  */
 
2167
+
 
2168
 #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
 
2169
 
 
2170
 static _Unwind_Reason_Code
 
2171
@@ -73,14 +89,17 @@
 
2172
      e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
 
2173
      08000240 nop  */
 
2174
 
 
2175
-  if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
 
2176
+  if (pa32_read_access_ok (pc)
 
2177
+      && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
2178
     off = 4*4;
 
2179
-  else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
 
2180
+  else if (pa32_read_access_ok (&pc[4])
 
2181
+          && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
 
2182
     {
 
2183
       pc += 4;
 
2184
       off = 10 * 4;
 
2185
     }
 
2186
-  else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
 
2187
+  else if (pa32_read_access_ok (&pc[5])
 
2188
+          && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
 
2189
     {
 
2190
       pc += 5;
 
2191
       off = 10 * 4;
 
2192
@@ -96,13 +115,16 @@
 
2193
         word boundary and we can then determine the frame offset.  */
 
2194
       sp = (unsigned long)context->ra;
 
2195
       pc = (unsigned int *)sp;
 
2196
-      if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
 
2197
+      if ((sp & 4)
 
2198
+         && pa32_read_access_ok (pc)
 
2199
+         && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
2200
        off = 5 * 4;
 
2201
       else
 
2202
        return _URC_END_OF_STACK;
 
2203
     }
 
2204
 
 
2205
-  if (pc[1] != 0x3414015a
 
2206
+  if (!pa32_read_access_ok (&pc[3])
 
2207
+      || pc[1] != 0x3414015a
 
2208
       || pc[2] != 0xe4008200
 
2209
       || pc[3] != 0x08000240)
 
2210
     return _URC_END_OF_STACK;
 
2211
Index: gcc/tree-ssa-tail-merge.c
 
2212
===================================================================
 
2213
--- a/src/gcc/tree-ssa-tail-merge.c     (.../tags/gcc_4_8_3_release)
 
2214
+++ b/src/gcc/tree-ssa-tail-merge.c     (.../branches/gcc-4_8-branch)
 
2215
@@ -298,7 +298,8 @@
 
2216
   def_operand_p def_p;
 
2217
 
 
2218
   if (gimple_has_side_effects (stmt)
 
2219
-      || gimple_vdef (stmt) != NULL_TREE)
 
2220
+      || gimple_vdef (stmt) != NULL_TREE
 
2221
+      || gimple_vuse (stmt) != NULL_TREE)
 
2222
     return false;
 
2223
 
 
2224
   def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
 
2225
@@ -1060,6 +1061,24 @@
 
2226
     gcc_unreachable ();
 
2227
 }
 
2228
 
 
2229
+/* Return true if gimple operands T1 and T2 have the same value.  */
 
2230
+
 
2231
+static bool
 
2232
+gimple_operand_equal_value_p (tree t1, tree t2)
 
2233
+{
 
2234
+  if (t1 == t2)
 
2235
+    return true;
 
2236
+
 
2237
+  if (t1 == NULL_TREE
 
2238
+      || t2 == NULL_TREE)
 
2239
+    return false;
 
2240
+
 
2241
+  if (operand_equal_p (t1, t2, 0))
 
2242
+    return true;
 
2243
+
 
2244
+  return gvn_uses_equal (t1, t2);
 
2245
+}
 
2246
+
 
2247
 /* Return true if gimple statements S1 and S2 are equal.  Gimple_bb (s1) and
 
2248
    gimple_bb (s2) are members of SAME_SUCC.  */
 
2249
 
 
2250
@@ -1122,11 +1141,13 @@
 
2251
       lhs2 = gimple_get_lhs (s2);
 
2252
       if (TREE_CODE (lhs1) != SSA_NAME
 
2253
          && TREE_CODE (lhs2) != SSA_NAME)
 
2254
-       return (vn_valueize (gimple_vdef (s1))
 
2255
-               == vn_valueize (gimple_vdef (s2)));
 
2256
+       return (operand_equal_p (lhs1, lhs2, 0)
 
2257
+               && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
 
2258
+                                                gimple_assign_rhs1 (s2)));
 
2259
       else if (TREE_CODE (lhs1) == SSA_NAME
 
2260
               && TREE_CODE (lhs2) == SSA_NAME)
 
2261
-       return vn_valueize (lhs1) == vn_valueize (lhs2);
 
2262
+       return operand_equal_p (gimple_assign_rhs1 (s1),
 
2263
+                               gimple_assign_rhs1 (s2), 0);
 
2264
       return false;
 
2265
 
 
2266
     case GIMPLE_COND:
 
2267
Index: gcc/DATESTAMP
 
2268
===================================================================
 
2269
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
 
2270
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
 
2271
@@ -1 +1 @@
 
2272
-20140522
 
2273
+20141209
 
2274
Index: gcc/tree-ssa-strlen.c
 
2275
===================================================================
 
2276
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
 
2277
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
 
2278
@@ -1777,7 +1777,7 @@
 
2279
            break;
 
2280
          }
 
2281
     }
 
2282
-  else if (is_gimple_assign (stmt))
 
2283
+  else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
 
2284
     {
 
2285
       tree lhs = gimple_assign_lhs (stmt);
 
2286
 
 
2287
Index: gcc/tree.c
 
2288
===================================================================
 
2289
--- a/src/gcc/tree.c    (.../tags/gcc_4_8_3_release)
 
2290
+++ b/src/gcc/tree.c    (.../branches/gcc-4_8-branch)
 
2291
@@ -1130,7 +1130,7 @@
 
2292
   const_tree const t = (const_tree) x;
 
2293
 
 
2294
   return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
 
2295
-         ^ htab_hash_pointer (TREE_TYPE (t)));
 
2296
+         ^ TYPE_UID (TREE_TYPE (t)));
 
2297
 }
 
2298
 
 
2299
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
 
2300
Index: gcc/ipa-cp.c
 
2301
===================================================================
 
2302
--- a/src/gcc/ipa-cp.c  (.../tags/gcc_4_8_3_release)
 
2303
+++ b/src/gcc/ipa-cp.c  (.../branches/gcc-4_8-branch)
 
2304
@@ -447,6 +447,8 @@
 
2305
   else if (!opt_for_fn (node->symbol.decl, optimize)
 
2306
           || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
 
2307
     reason = "non-optimized function";
 
2308
+  else if (node->tm_clone)
 
2309
+    reason = "transactional memory clone";
 
2310
 
 
2311
   if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
 
2312
     fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
 
2313
@@ -2902,6 +2904,11 @@
 
2314
                intersect_with_agg_replacements (cs->caller, src_idx,
 
2315
                                                 &inter, 0);
 
2316
            }
 
2317
+         else
 
2318
+           {
 
2319
+             inter.release ();
 
2320
+             return vNULL;
 
2321
+           }
 
2322
        }
 
2323
       else
 
2324
        {
 
2325
@@ -2917,6 +2924,11 @@
 
2326
              else
 
2327
                intersect_with_plats (src_plats, &inter, 0);
 
2328
            }
 
2329
+         else
 
2330
+           {
 
2331
+             inter.release ();
 
2332
+             return vNULL;
 
2333
+           }
 
2334
        }
 
2335
     }
 
2336
   else if (jfunc->type == IPA_JF_ANCESTOR
 
2337
@@ -3000,7 +3012,8 @@
 
2338
                                          vec<cgraph_edge_p> callers)
 
2339
 {
 
2340
   struct ipa_node_params *dest_info = IPA_NODE_REF (node);
 
2341
-  struct ipa_agg_replacement_value *res = NULL;
 
2342
+  struct ipa_agg_replacement_value *res;
 
2343
+  struct ipa_agg_replacement_value **tail = &res;
 
2344
   struct cgraph_edge *cs;
 
2345
   int i, j, count = ipa_get_param_count (dest_info);
 
2346
 
 
2347
@@ -3044,8 +3057,8 @@
 
2348
          v->offset = item->offset;
 
2349
          v->value = item->value;
 
2350
          v->by_ref = plats->aggs_by_ref;
 
2351
-         v->next = res;
 
2352
-         res = v;
 
2353
+         *tail = v;
 
2354
+         tail = &v->next;
 
2355
        }
 
2356
 
 
2357
     next_param:
 
2358
@@ -3052,6 +3065,7 @@
 
2359
       if (inter.exists ())
 
2360
        inter.release ();
 
2361
     }
 
2362
+  *tail = NULL;
 
2363
   return res;
 
2364
 }
 
2365
 
 
2366
@@ -3060,7 +3074,8 @@
 
2367
 static struct ipa_agg_replacement_value *
 
2368
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
 
2369
 {
 
2370
-  struct ipa_agg_replacement_value *res = NULL;
 
2371
+  struct ipa_agg_replacement_value *res;
 
2372
+  struct ipa_agg_replacement_value **tail = &res;
 
2373
   struct ipa_agg_jump_function *aggjf;
 
2374
   struct ipa_agg_jf_item *item;
 
2375
   int i, j;
 
2376
@@ -3074,9 +3089,10 @@
 
2377
        v->offset = item->offset;
 
2378
        v->value = item->value;
 
2379
        v->by_ref = aggjf->by_ref;
 
2380
-       v->next = res;
 
2381
-       res = v;
 
2382
+       *tail = v;
 
2383
+       tail = &v->next;
 
2384
       }
 
2385
+  *tail = NULL;
 
2386
   return res;
 
2387
 }
 
2388
 
 
2389
Index: gcc/configure
 
2390
===================================================================
 
2391
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
 
2392
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
 
2393
@@ -910,6 +910,7 @@
 
2394
 enable_gnu_indirect_function
 
2395
 enable_initfini_array
 
2396
 enable_comdat
 
2397
+enable_fix_cortex_a53_835769
 
2398
 enable_gnu_unique_object
 
2399
 enable_linker_build_id
 
2400
 with_long_double_128
 
2401
@@ -1619,6 +1620,14 @@
 
2402
                           glibc systems
 
2403
   --enable-initfini-array      use .init_array/.fini_array sections
 
2404
   --enable-comdat         enable COMDAT group support
 
2405
+
 
2406
+  --enable-fix-cortex-a53-835769
 
2407
+                          enable workaround for AArch64 Cortex-A53 erratum
 
2408
+                          835769 by default
 
2409
+  --disable-fix-cortex-a53-835769
 
2410
+                          disable workaround for AArch64 Cortex-A53 erratum
 
2411
+                          835769 by default
 
2412
+
 
2413
   --enable-gnu-unique-object
 
2414
                           enable the use of the @gnu_unique_object ELF
 
2415
                           extension on glibc systems
 
2416
@@ -17838,7 +17847,7 @@
 
2417
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
2418
   lt_status=$lt_dlunknown
 
2419
   cat > conftest.$ac_ext <<_LT_EOF
 
2420
-#line 17841 "configure"
 
2421
+#line 17850 "configure"
 
2422
 #include "confdefs.h"
 
2423
 
 
2424
 #if HAVE_DLFCN_H
 
2425
@@ -17944,7 +17953,7 @@
 
2426
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
2427
   lt_status=$lt_dlunknown
 
2428
   cat > conftest.$ac_ext <<_LT_EOF
 
2429
-#line 17947 "configure"
 
2430
+#line 17956 "configure"
 
2431
 #include "confdefs.h"
 
2432
 
 
2433
 #if HAVE_DLFCN_H
 
2434
@@ -23796,6 +23805,28 @@
 
2435
 $as_echo "$gcc_cv_lto_plugin" >&6; }
 
2436
 
 
2437
 case "$target" in
 
2438
+
 
2439
+  aarch64*-*-*)
 
2440
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
2441
+    # Check whether --enable-fix-cortex-a53-835769 was given.
 
2442
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
 
2443
+  enableval=$enable_fix_cortex_a53_835769;
 
2444
+        case $enableval in
 
2445
+          yes)
 
2446
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
2447
+            ;;
 
2448
+          no)
 
2449
+            ;;
 
2450
+          *)
 
2451
+            as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
2452
+  Valid choices are 'yes' and 'no'." "$LINENO" 5
 
2453
+            ;;
 
2454
+
 
2455
+        esac
 
2456
+
 
2457
+fi
 
2458
+
 
2459
+  ;;
 
2460
   # All TARGET_ABI_OSF targets.
 
2461
   alpha*-*-linux* | alpha*-*-*bsd*)
 
2462
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
 
2463
@@ -27281,8 +27312,48 @@
 
2464
 
 
2465
 $as_echo "#define HAVE_cloog 1" >>confdefs.h
 
2466
 
 
2467
+
 
2468
+  # Check whether isl_schedule_constraints_compute_schedule is available;
 
2469
+  # it's new in ISL-0.13.
 
2470
+  saved_CFLAGS="$CFLAGS"
 
2471
+  CFLAGS="$CFLAGS $ISLINC"
 
2472
+  saved_LIBS="$LIBS"
 
2473
+  LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
 
2474
+
 
2475
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
 
2476
+$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
 
2477
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
2478
+/* end confdefs.h.  */
 
2479
+#include <isl/schedule.h>
 
2480
+int
 
2481
+main ()
 
2482
+{
 
2483
+isl_schedule_constraints_compute_schedule (NULL);
 
2484
+  ;
 
2485
+  return 0;
 
2486
+}
 
2487
+_ACEOF
 
2488
+if ac_fn_c_try_link "$LINENO"; then :
 
2489
+  ac_has_isl_schedule_constraints_compute_schedule=yes
 
2490
+else
 
2491
+  ac_has_isl_schedule_constraints_compute_schedule=no
 
2492
 fi
 
2493
+rm -f core conftest.err conftest.$ac_objext \
 
2494
+    conftest$ac_exeext conftest.$ac_ext
 
2495
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
 
2496
+$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
 
2497
 
 
2498
+  LIBS="$saved_LIBS"
 
2499
+  CFLAGS="$saved_CFLAGS"
 
2500
+
 
2501
+  if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
 
2502
+
 
2503
+$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
 
2504
+
 
2505
+  fi
 
2506
+fi
 
2507
+
 
2508
+
 
2509
 # Check for plugin support
 
2510
 # Check whether --enable-plugin was given.
 
2511
 if test "${enable_plugin+set}" = set; then :
 
2512
Index: gcc/fold-const.c
 
2513
===================================================================
 
2514
--- a/src/gcc/fold-const.c      (.../tags/gcc_4_8_3_release)
 
2515
+++ b/src/gcc/fold-const.c      (.../branches/gcc-4_8-branch)
 
2516
@@ -8929,7 +8929,8 @@
 
2517
       /* If the constant operation overflowed this can be
 
2518
         simplified as a comparison against INT_MAX/INT_MIN.  */
 
2519
       if (TREE_CODE (lhs) == INTEGER_CST
 
2520
-         && TREE_OVERFLOW (lhs))
 
2521
+         && TREE_OVERFLOW (lhs)
 
2522
+         && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
 
2523
        {
 
2524
          int const1_sgn = tree_int_cst_sgn (const1);
 
2525
          enum tree_code code2 = code;
 
2526
@@ -9213,7 +9214,7 @@
 
2527
   /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
 
2528
      X CMP Y +- C2 +- C1 for signed X, Y.  This is valid if
 
2529
      the resulting offset is smaller in absolute value than the
 
2530
-     original one.  */
 
2531
+     original one and has the same sign.  */
 
2532
   if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
 
2533
       && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
 
2534
       && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
 
2535
@@ -9232,19 +9233,20 @@
 
2536
                                      "a comparison");
 
2537
 
 
2538
       /* Put the constant on the side where it doesn't overflow and is
 
2539
-        of lower absolute value than before.  */
 
2540
+        of lower absolute value and of same sign than before.  */
 
2541
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
2542
                             ? MINUS_EXPR : PLUS_EXPR,
 
2543
                             const2, const1);
 
2544
       if (!TREE_OVERFLOW (cst)
 
2545
-         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
 
2546
+         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
 
2547
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
 
2548
        {
 
2549
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
2550
          return fold_build2_loc (loc, code, type,
 
2551
-                             variable1,
 
2552
-                             fold_build2_loc (loc,
 
2553
-                                          TREE_CODE (arg1), TREE_TYPE (arg1),
 
2554
-                                          variable2, cst));
 
2555
+                                 variable1,
 
2556
+                                 fold_build2_loc (loc, TREE_CODE (arg1),
 
2557
+                                                  TREE_TYPE (arg1),
 
2558
+                                                  variable2, cst));
 
2559
        }
 
2560
 
 
2561
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
2562
@@ -9251,13 +9253,15 @@
 
2563
                             ? MINUS_EXPR : PLUS_EXPR,
 
2564
                             const1, const2);
 
2565
       if (!TREE_OVERFLOW (cst)
 
2566
-         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
 
2567
+         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
 
2568
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
 
2569
        {
 
2570
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
2571
          return fold_build2_loc (loc, code, type,
 
2572
-                             fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
 
2573
-                                          variable1, cst),
 
2574
-                             variable2);
 
2575
+                                 fold_build2_loc (loc, TREE_CODE (arg0),
 
2576
+                                                  TREE_TYPE (arg0),
 
2577
+                                                  variable1, cst),
 
2578
+                                 variable2);
 
2579
        }
 
2580
     }
 
2581
 
 
2582
@@ -11218,7 +11222,6 @@
 
2583
        {
 
2584
          double_int c1, c2, c3, msk;
 
2585
          int width = TYPE_PRECISION (type), w;
 
2586
-         bool try_simplify = true;
 
2587
 
 
2588
          c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
 
2589
          c2 = tree_to_double_int (arg1);
 
2590
@@ -11255,20 +11258,7 @@
 
2591
                }
 
2592
            }
 
2593
 
 
2594
-         /* If X is a tree of the form (Y * K1) & K2, this might conflict
 
2595
-            with that optimization from the BIT_AND_EXPR optimizations.
 
2596
-            This could end up in an infinite recursion.  */
 
2597
-         if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
 
2598
-             && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
 
2599
-                           == INTEGER_CST)
 
2600
-         {
 
2601
-           tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
 
2602
-           double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
 
2603
-
 
2604
-           try_simplify = (masked != c1);
 
2605
-         }
 
2606
-
 
2607
-         if (try_simplify && c3 != c1)
 
2608
+         if (c3 != c1)
 
2609
            return fold_build2_loc (loc, BIT_IOR_EXPR, type,
 
2610
                                    fold_build2_loc (loc, BIT_AND_EXPR, type,
 
2611
                                                     TREE_OPERAND (arg0, 0),
 
2612
@@ -11658,16 +11648,25 @@
 
2613
          && TREE_CODE (arg0) == MULT_EXPR
 
2614
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
 
2615
        {
 
2616
+         double_int darg1 = tree_to_double_int (arg1);
 
2617
          double_int masked
 
2618
-           = mask_with_tz (type, tree_to_double_int (arg1),
 
2619
+           = mask_with_tz (type, darg1,
 
2620
                            tree_to_double_int (TREE_OPERAND (arg0, 1)));
 
2621
 
 
2622
          if (masked.is_zero ())
 
2623
            return omit_two_operands_loc (loc, type, build_zero_cst (type),
 
2624
                                          arg0, arg1);
 
2625
-         else if (masked != tree_to_double_int (arg1))
 
2626
-           return fold_build2_loc (loc, code, type, op0,
 
2627
-                                   double_int_to_tree (type, masked));
 
2628
+         else if (masked != darg1)
 
2629
+           {
 
2630
+             /* Avoid the transform if arg1 is a mask of some
 
2631
+                mode which allows further optimizations.  */
 
2632
+             int pop = darg1.popcount ();
 
2633
+             if (!(pop >= BITS_PER_UNIT
 
2634
+                   && exact_log2 (pop) != -1
 
2635
+                   && double_int::mask (pop) == darg1))
 
2636
+               return fold_build2_loc (loc, code, type, op0,
 
2637
+                                       double_int_to_tree (type, masked));
 
2638
+           }
 
2639
        }
 
2640
 
 
2641
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
 
2642
@@ -13083,6 +13082,8 @@
 
2643
          tree arg01 = TREE_OPERAND (arg0, 1);
 
2644
          tree itype = TREE_TYPE (arg00);
 
2645
          if (TREE_INT_CST_HIGH (arg01) == 0
 
2646
+             && !(TREE_CODE (itype) == COMPLEX_TYPE
 
2647
+                  || TREE_CODE (itype) == VECTOR_TYPE)
 
2648
              && TREE_INT_CST_LOW (arg01)
 
2649
                 == (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
 
2650
            {
 
2651
Index: gcc/omp-low.c
 
2652
===================================================================
 
2653
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
 
2654
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
 
2655
@@ -128,6 +128,7 @@
 
2656
 static int taskreg_nesting_level;
 
2657
 struct omp_region *root_omp_region;
 
2658
 static bitmap task_shared_vars;
 
2659
+static vec<omp_context *> taskreg_contexts;
 
2660
 
 
2661
 static void scan_omp (gimple_seq *, omp_context *);
 
2662
 static tree scan_omp_1_op (tree *, int *, void *);
 
2663
@@ -1586,7 +1587,6 @@
 
2664
   TREE_STATIC (decl) = 1;
 
2665
   TREE_USED (decl) = 1;
 
2666
   DECL_ARTIFICIAL (decl) = 1;
 
2667
-  DECL_NAMELESS (decl) = 1;
 
2668
   DECL_IGNORED_P (decl) = 0;
 
2669
   TREE_PUBLIC (decl) = 0;
 
2670
   DECL_UNINLINABLE (decl) = 1;
 
2671
@@ -1656,6 +1656,7 @@
 
2672
     }
 
2673
 
 
2674
   ctx = new_omp_context (stmt, outer_ctx);
 
2675
+  taskreg_contexts.safe_push (ctx);
 
2676
   if (taskreg_nesting_level > 1)
 
2677
     ctx->is_nested = true;
 
2678
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
 
2679
@@ -1675,11 +1676,6 @@
 
2680
 
 
2681
   if (TYPE_FIELDS (ctx->record_type) == NULL)
 
2682
     ctx->record_type = ctx->receiver_decl = NULL;
 
2683
-  else
 
2684
-    {
 
2685
-      layout_type (ctx->record_type);
 
2686
-      fixup_child_record_type (ctx);
 
2687
-    }
 
2688
 }
 
2689
 
 
2690
 /* Scan an OpenMP task directive.  */
 
2691
@@ -1690,7 +1686,6 @@
 
2692
   omp_context *ctx;
 
2693
   tree name, t;
 
2694
   gimple stmt = gsi_stmt (*gsi);
 
2695
-  location_t loc = gimple_location (stmt);
 
2696
 
 
2697
   /* Ignore task directives with empty bodies.  */
 
2698
   if (optimize > 0
 
2699
@@ -1701,6 +1696,7 @@
 
2700
     }
 
2701
 
 
2702
   ctx = new_omp_context (stmt, outer_ctx);
 
2703
+  taskreg_contexts.safe_push (ctx);
 
2704
   if (taskreg_nesting_level > 1)
 
2705
     ctx->is_nested = true;
 
2706
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
 
2707
@@ -1738,8 +1734,71 @@
 
2708
       t = build_int_cst (long_integer_type_node, 1);
 
2709
       gimple_omp_task_set_arg_align (stmt, t);
 
2710
     }
 
2711
+}
 
2712
+
 
2713
+
 
2714
+/* If any decls have been made addressable during scan_omp,
 
2715
+   adjust their fields if needed, and layout record types
 
2716
+   of parallel/task constructs.  */
 
2717
+
 
2718
+static void
 
2719
+finish_taskreg_scan (omp_context *ctx)
 
2720
+{
 
2721
+  if (ctx->record_type == NULL_TREE)
 
2722
+    return;
 
2723
+
 
2724
+  /* If any task_shared_vars were needed, verify all
 
2725
+     OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
 
2726
+     statements if use_pointer_for_field hasn't changed
 
2727
+     because of that.  If it did, update field types now.  */
 
2728
+  if (task_shared_vars)
 
2729
+    {
 
2730
+      tree c;
 
2731
+
 
2732
+      for (c = gimple_omp_taskreg_clauses (ctx->stmt);
 
2733
+          c; c = OMP_CLAUSE_CHAIN (c))
 
2734
+       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
 
2735
+         {
 
2736
+           tree decl = OMP_CLAUSE_DECL (c);
 
2737
+
 
2738
+           /* Global variables don't need to be copied,
 
2739
+              the receiver side will use them directly.  */
 
2740
+           if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
 
2741
+             continue;
 
2742
+           if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
 
2743
+               || !use_pointer_for_field (decl, ctx))
 
2744
+             continue;
 
2745
+           tree field = lookup_field (decl, ctx);
 
2746
+           if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
 
2747
+               && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
 
2748
+             continue;
 
2749
+           TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
 
2750
+           TREE_THIS_VOLATILE (field) = 0;
 
2751
+           DECL_USER_ALIGN (field) = 0;
 
2752
+           DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
 
2753
+           if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
 
2754
+             TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
 
2755
+           if (ctx->srecord_type)
 
2756
+             {
 
2757
+               tree sfield = lookup_sfield (decl, ctx);
 
2758
+               TREE_TYPE (sfield) = TREE_TYPE (field);
 
2759
+               TREE_THIS_VOLATILE (sfield) = 0;
 
2760
+               DECL_USER_ALIGN (sfield) = 0;
 
2761
+               DECL_ALIGN (sfield) = DECL_ALIGN (field);
 
2762
+               if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
 
2763
+                 TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
 
2764
+             }
 
2765
+         }
 
2766
+    }
 
2767
+
 
2768
+  if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
 
2769
+    {
 
2770
+      layout_type (ctx->record_type);
 
2771
+      fixup_child_record_type (ctx);
 
2772
+    }
 
2773
   else
 
2774
     {
 
2775
+      location_t loc = gimple_location (ctx->stmt);
 
2776
       tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
 
2777
       /* Move VLA fields to the end.  */
 
2778
       p = &TYPE_FIELDS (ctx->record_type);
 
2779
@@ -1759,12 +1818,12 @@
 
2780
       fixup_child_record_type (ctx);
 
2781
       if (ctx->srecord_type)
 
2782
        layout_type (ctx->srecord_type);
 
2783
-      t = fold_convert_loc (loc, long_integer_type_node,
 
2784
-                       TYPE_SIZE_UNIT (ctx->record_type));
 
2785
-      gimple_omp_task_set_arg_size (stmt, t);
 
2786
+      tree t = fold_convert_loc (loc, long_integer_type_node,
 
2787
+                                TYPE_SIZE_UNIT (ctx->record_type));
 
2788
+      gimple_omp_task_set_arg_size (ctx->stmt, t);
 
2789
       t = build_int_cst (long_integer_type_node,
 
2790
                         TYPE_ALIGN_UNIT (ctx->record_type));
 
2791
-      gimple_omp_task_set_arg_align (stmt, t);
 
2792
+      gimple_omp_task_set_arg_align (ctx->stmt, t);
 
2793
     }
 
2794
 }
 
2795
 
 
2796
@@ -7113,6 +7172,8 @@
 
2797
 execute_lower_omp (void)
 
2798
 {
 
2799
   gimple_seq body;
 
2800
+  int i;
 
2801
+  omp_context *ctx;
 
2802
 
 
2803
   /* This pass always runs, to provide PROP_gimple_lomp.
 
2804
      But there is nothing to do unless -fopenmp is given.  */
 
2805
@@ -7125,6 +7186,9 @@
 
2806
   body = gimple_body (current_function_decl);
 
2807
   scan_omp (&body, NULL);
 
2808
   gcc_assert (taskreg_nesting_level == 0);
 
2809
+  FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
 
2810
+    finish_taskreg_scan (ctx);
 
2811
+  taskreg_contexts.release ();
 
2812
 
 
2813
   if (all_contexts->root)
 
2814
     {
 
2815
Index: gcc/toplev.c
 
2816
===================================================================
 
2817
--- a/src/gcc/toplev.c  (.../tags/gcc_4_8_3_release)
 
2818
+++ b/src/gcc/toplev.c  (.../branches/gcc-4_8-branch)
 
2819
@@ -1036,16 +1036,19 @@
 
2820
 
 
2821
   if (warn_stack_usage >= 0)
 
2822
     {
 
2823
+      const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
 
2824
+
 
2825
       if (stack_usage_kind == DYNAMIC)
 
2826
-       warning (OPT_Wstack_usage_, "stack usage might be unbounded");
 
2827
+       warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
 
2828
       else if (stack_usage > warn_stack_usage)
 
2829
        {
 
2830
          if (stack_usage_kind == DYNAMIC_BOUNDED)
 
2831
-           warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
2832
-                    stack_usage);
 
2833
+           warning_at (loc,
 
2834
+                       OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
2835
+                       stack_usage);
 
2836
          else
 
2837
-           warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
 
2838
-                    stack_usage);
 
2839
+           warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
 
2840
+                       stack_usage);
 
2841
        }
 
2842
     }
 
2843
 }
 
2844
Index: gcc/tree-ssa-sccvn.c
 
2845
===================================================================
 
2846
--- a/src/gcc/tree-ssa-sccvn.c  (.../tags/gcc_4_8_3_release)
 
2847
+++ b/src/gcc/tree-ssa-sccvn.c  (.../branches/gcc-4_8-branch)
 
2848
@@ -3015,33 +3015,12 @@
 
2849
   /* If all value numbered to the same value, the phi node has that
 
2850
      value.  */
 
2851
   if (allsame)
 
2852
-    {
 
2853
-      if (is_gimple_min_invariant (sameval))
 
2854
-       {
 
2855
-         VN_INFO (PHI_RESULT (phi))->has_constants = true;
 
2856
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
2857
-       }
 
2858
-      else
 
2859
-       {
 
2860
-         VN_INFO (PHI_RESULT (phi))->has_constants = false;
 
2861
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
2862
-       }
 
2863
+    return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
2864
 
 
2865
-      if (TREE_CODE (sameval) == SSA_NAME)
 
2866
-       return visit_copy (PHI_RESULT (phi), sameval);
 
2867
-
 
2868
-      return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
2869
-    }
 
2870
-
 
2871
   /* Otherwise, see if it is equivalent to a phi node in this block.  */
 
2872
   result = vn_phi_lookup (phi);
 
2873
   if (result)
 
2874
-    {
 
2875
-      if (TREE_CODE (result) == SSA_NAME)
 
2876
-       changed = visit_copy (PHI_RESULT (phi), result);
 
2877
-      else
 
2878
-       changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
2879
-    }
 
2880
+    changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
2881
   else
 
2882
     {
 
2883
       vn_phi_insert (phi, PHI_RESULT (phi));
 
2884
@@ -3142,24 +3121,18 @@
 
2885
      catch those with constants.  The goal here is to simultaneously
 
2886
      combine constants between expressions, but avoid infinite
 
2887
      expansion of expressions during simplification.  */
 
2888
-  if (TREE_CODE (op0) == SSA_NAME)
 
2889
-    {
 
2890
-      if (VN_INFO (op0)->has_constants
 
2891
+  op0 = vn_valueize (op0);
 
2892
+  if (TREE_CODE (op0) == SSA_NAME
 
2893
+      && (VN_INFO (op0)->has_constants
 
2894
          || TREE_CODE_CLASS (code) == tcc_comparison
 
2895
-         || code == COMPLEX_EXPR)
 
2896
-       op0 = valueize_expr (vn_get_expr_for (op0));
 
2897
-      else
 
2898
-       op0 = vn_valueize (op0);
 
2899
-    }
 
2900
+         || code == COMPLEX_EXPR))
 
2901
+    op0 = valueize_expr (vn_get_expr_for (op0));
 
2902
 
 
2903
-  if (TREE_CODE (op1) == SSA_NAME)
 
2904
-    {
 
2905
-      if (VN_INFO (op1)->has_constants
 
2906
-         || code == COMPLEX_EXPR)
 
2907
-       op1 = valueize_expr (vn_get_expr_for (op1));
 
2908
-      else
 
2909
-       op1 = vn_valueize (op1);
 
2910
-    }
 
2911
+  op1 = vn_valueize (op1);
 
2912
+  if (TREE_CODE (op1) == SSA_NAME
 
2913
+      && (VN_INFO (op1)->has_constants
 
2914
+         || code == COMPLEX_EXPR))
 
2915
+    op1 = valueize_expr (vn_get_expr_for (op1));
 
2916
 
 
2917
   /* Pointer plus constant can be represented as invariant address.
 
2918
      Do so to allow further propatation, see also tree forwprop.  */
 
2919
@@ -3217,27 +3190,31 @@
 
2920
     return NULL_TREE;
 
2921
 
 
2922
   orig_op0 = op0;
 
2923
-  if (VN_INFO (op0)->has_constants)
 
2924
-    op0 = valueize_expr (vn_get_expr_for (op0));
 
2925
-  else if (CONVERT_EXPR_CODE_P (code)
 
2926
-          || code == REALPART_EXPR
 
2927
-          || code == IMAGPART_EXPR
 
2928
-          || code == VIEW_CONVERT_EXPR
 
2929
-          || code == BIT_FIELD_REF)
 
2930
+  op0 = vn_valueize (op0);
 
2931
+  if (TREE_CODE (op0) == SSA_NAME)
 
2932
     {
 
2933
-      /* We want to do tree-combining on conversion-like expressions.
 
2934
-         Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2935
-      tree tem = valueize_expr (vn_get_expr_for (op0));
 
2936
-      if (UNARY_CLASS_P (tem)
 
2937
-         || BINARY_CLASS_P (tem)
 
2938
-         || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2939
-         || TREE_CODE (tem) == SSA_NAME
 
2940
-         || TREE_CODE (tem) == CONSTRUCTOR
 
2941
-         || is_gimple_min_invariant (tem))
 
2942
-       op0 = tem;
 
2943
+      if (VN_INFO (op0)->has_constants)
 
2944
+       op0 = valueize_expr (vn_get_expr_for (op0));
 
2945
+      else if (CONVERT_EXPR_CODE_P (code)
 
2946
+              || code == REALPART_EXPR
 
2947
+              || code == IMAGPART_EXPR
 
2948
+              || code == VIEW_CONVERT_EXPR
 
2949
+              || code == BIT_FIELD_REF)
 
2950
+       {
 
2951
+         /* We want to do tree-combining on conversion-like expressions.
 
2952
+            Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2953
+         tree tem = valueize_expr (vn_get_expr_for (op0));
 
2954
+         if (UNARY_CLASS_P (tem)
 
2955
+             || BINARY_CLASS_P (tem)
 
2956
+             || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2957
+             || TREE_CODE (tem) == SSA_NAME
 
2958
+             || TREE_CODE (tem) == CONSTRUCTOR
 
2959
+             || is_gimple_min_invariant (tem))
 
2960
+           op0 = tem;
 
2961
+       }
 
2962
     }
 
2963
 
 
2964
-  /* Avoid folding if nothing changed, but remember the expression.  */
 
2965
+  /* Avoid folding if nothing changed.  */
 
2966
   if (op0 == orig_op0)
 
2967
     return NULL_TREE;
 
2968
 
 
2969
Index: gcc/cgraphunit.c
 
2970
===================================================================
 
2971
--- a/src/gcc/cgraphunit.c      (.../tags/gcc_4_8_3_release)
 
2972
+++ b/src/gcc/cgraphunit.c      (.../branches/gcc-4_8-branch)
 
2973
@@ -1097,7 +1097,7 @@
 
2974
          /* We use local aliases for C++ thunks to force the tailcall
 
2975
             to bind locally.  This is a hack - to keep it working do
 
2976
             the following (which is not strictly correct).  */
 
2977
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
 
2978
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
 
2979
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
 
2980
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
 
2981
        {
 
2982
Index: gcc/ChangeLog
 
2983
===================================================================
 
2984
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
 
2985
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
 
2986
@@ -1,3 +1,1162 @@
 
2987
+2014-12-08  Richard Biener  <rguenther@suse.de>
 
2988
+
 
2989
+       Backport from 4.9 branch
 
2990
+       * configure.ac
 
2991
+       (ac_has_isl_schedule_constraints_compute_schedule):
 
2992
+       New check.
 
2993
+       * graphite-clast-to-gimple.c: For ISL 0.14, include deprecate headers.
 
2994
+       * graphite-interchange.c: Ditto.
 
2995
+       * graphite-poly.c: Ditto.
 
2996
+       * graphite-sese-to-poly.c: Ditto.
 
2997
+       * graphite-optimize-isl.c (getScheduleForBandList): Ditto.
 
2998
+       Conditionally use ISL 0.13+ functions.
 
2999
+       * config.in: Regenerate.
 
3000
+       * configure: Regenerate.
 
3001
+
 
3002
+2014-12-07  Oleg Endo  <olegendo@gcc.gnu.org>
 
3003
+
 
3004
+       Backport from mainline
 
3005
+       2014-12-07  Oleg Endo  <olegendo@gcc.gnu.org>
 
3006
+
 
3007
+       PR target/50751
 
3008
+       * config/sh/sh.md (extendqihi2): Allow only for TARGET_SH1.
 
3009
+
 
3010
+2014-12-05  H.J. Lu  <hongjiu.lu@intel.com>
 
3011
+
 
3012
+       Backport from mainline
 
3013
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
 
3014
+
 
3015
+       PR rtl-optimization/64037
 
3016
+       * combine.c (setup_incoming_promotions): Pass the argument
 
3017
+       before any promotions happen to promote_function_mode.
 
3018
+
 
3019
+2014-12-04  Shanyao Chen  <chenshanyao@huawei.com>
 
3020
+
 
3021
+       Backport from mainline
 
3022
+       2014-11-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
 
3023
+
 
3024
+       PR target/59593
 
3025
+       * config/arm/arm.md (*movhi_insn): Use right formatting
 
3026
+       for immediate.
 
3027
+
 
3028
+       2014-11-19  Felix Yang  <felix.yang@huawei.com>
 
3029
+                   Shanyao Chen  <chenshanyao@huawei.com>
 
3030
+
 
3031
+       PR target/59593
 
3032
+       * config/arm/arm.md (define_attr "arch"): Add v6t2.
 
3033
+       (define_attr "arch_enabled"): Add test for the above.
 
3034
+       (*movhi_insn_arch4): Add new alternative.
 
3035
+
 
3036
+2014-12-04  Jakub Jelinek  <jakub@redhat.com>
 
3037
+
 
3038
+       PR c++/56493
 
3039
+       * convert.c (convert_to_real, convert_to_expr, convert_to_complex):
 
3040
+       Handle COMPOUND_EXPR.
 
3041
+
 
3042
+2014-12-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3043
+
 
3044
+       PR target/64115
 
3045
+       * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
 
3046
+       invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.
 
3047
+
 
3048
+2014-12-01  Richard Biener  <rguenther@suse.de>
 
3049
+
 
3050
+       PR middle-end/64111
 
3051
+       * tree.c (int_cst_hash_hash): Use TYPE_UID instead of
 
3052
+       htab_hash_pointer to not break PCH.
 
3053
+
 
3054
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
3055
+
 
3056
+       Backported from mainline
 
3057
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
 
3058
+
 
3059
+       PR middle-end/64067
 
3060
+       * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
 
3061
+       Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
 
3062
+       not only if modifier is EXPAND_INITIALIZER, but whenever
 
3063
+       COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
 
3064
+
 
3065
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
 
3066
+
 
3067
+       PR rtl-optimization/63659
 
3068
+       * ree.c (update_reg_equal_equiv_notes): New function.
 
3069
+       (combine_set_extension, transform_ifelse): Use it.
 
3070
+
 
3071
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
3072
+
 
3073
+       PR libgomp/61200
 
3074
+       * omp-low.c (taskreg_contexts): New variable.
 
3075
+       (scan_omp_parallel): Push newly created context into taskreg_contexts
 
3076
+       vector and move record layout code to finish_taskreg_scan.
 
3077
+       (scan_omp_task): Likewise.
 
3078
+       (finish_taskreg_scan): New function.
 
3079
+       (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
 
3080
+       vector elements and release it.
 
3081
+
 
3082
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
3083
+
 
3084
+       Backport from mainline
 
3085
+       2014-10-08  Richard Biener  <rguenther@suse.de>
 
3086
+
 
3087
+       PR tree-optimization/61969
 
3088
+       * tree-nrv.c (pass_nrv::execute): Properly test for automatic
 
3089
+       variables.
 
3090
+
 
3091
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
3092
+
 
3093
+       PR tree-optimization/62031
 
3094
+       * tree-data-ref.c (dr_analyze_indices): Do not set
 
3095
+       DR_UNCONSTRAINED_BASE.
 
3096
+       (dr_may_alias_p): All indirect accesses have to go the
 
3097
+       formerly DR_UNCONSTRAINED_BASE path.
 
3098
+       * tree-data-ref.h (struct indices): Remove
 
3099
+       unconstrained_base member.
 
3100
+       (DR_UNCONSTRAINED_BASE): Remove.
 
3101
+
 
3102
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
3103
+
 
3104
+       PR tree-optimization/63379
 
3105
+       * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
 
3106
+       a neutral operand for min/max when it is not a reduction chain.
 
3107
+
 
3108
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
3109
+
 
3110
+       PR tree-optimization/63605
 
3111
+       * fold-const.c (fold_binary_loc): Properly use element_precision
 
3112
+       for types that may not be scalar.
 
3113
+
 
3114
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
3115
+
 
3116
+       PR middle-end/63665
 
3117
+       * fold-const.c (fold_comparison): Properly guard simplifying
 
3118
+       against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
 
3119
+
 
3120
+2014-11-22  Oleg Endo  <olegendo@gcc.gnu.org>
 
3121
+
 
3122
+       Backport from mainline
 
3123
+       2014-11-20  Segher Boessenkool  <segher@kernel.crashing.org>
 
3124
+
 
3125
+       PR target/60111
 
3126
+       * config/sh/sh.c: Use signed char for signed field.
 
3127
+
 
3128
+2014-11-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3129
+
 
3130
+       PR target/63673
 
3131
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
 
3132
+       the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
 
3133
+       double.
 
3134
+
 
3135
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
3136
+
 
3137
+       PR target/63947
 
3138
+       * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
 
3139
+       Output "b" and "nb" suffix for FP mode.
 
3140
+
 
3141
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
3142
+
 
3143
+       Backport from mainline
 
3144
+       PR tree-optimization/62167
 
3145
+       * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
 
3146
+       conservatively.
 
3147
+       (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
 
3148
+       assigns.
 
3149
+
 
3150
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
3151
+
 
3152
+       Backport from mainline and gcc-4_9 branch.
 
3153
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
3154
+
 
3155
+       PR tree-optimization/63841
 
3156
+       * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
 
3157
+
 
3158
+2014-11-16  Eric Botcazou  <ebotcazou@adacore.com>
 
3159
+
 
3160
+       * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
 
3161
+       * doc/tm.texi: Regenerate.
 
3162
+
 
3163
+       Backport from mainline
 
3164
+       2013-09-16  Andreas Schwab  <schwab@linux-m68k.org>
 
3165
+
 
3166
+       * doc/tm.texi.in (Cond Exec Macros): Remove node.
 
3167
+       (Condition Code): Don't reference it.
 
3168
+       * doc/tm.texi: Regenerate.
 
3169
+
 
3170
+2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>
 
3171
+
 
3172
+       Backport from mainline
 
3173
+       2014-11-02  Michael Collison  <michael.collison@linaro.org>
 
3174
+
 
3175
+       * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
 
3176
+       to support vector modes.
 
3177
+       (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
 
3178
+
 
3179
+2014-11-13  Eric Botcazou  <ebotcazou@adacore.com>
 
3180
+
 
3181
+       * doc/tm.texi.in (SELECT_CC_MODE): Update example.
 
3182
+       (REVERSIBLE_CC_MODE): Fix example.
 
3183
+       (REVERSE_CONDITION): Fix typo.
 
3184
+       * doc/tm.texi: Regenerate.
 
3185
+
 
3186
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
3187
+
 
3188
+       PR ipa/63838
 
3189
+       * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
 
3190
+       chain instead of node->indirect_calls.
 
3191
+
 
3192
+2014-11-10  Daniel Hellstrom  <daniel@gaisler.com>
 
3193
+
 
3194
+       Backport from mainline
 
3195
+       * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
 
3196
+       * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
 
3197
+
 
3198
+2014-11-07  Daniel Hellstrom  <daniel@gaisler.com>
 
3199
+
 
3200
+       * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
 
3201
+       * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
 
3202
+       * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
 
3203
+       leon3v7 as leon3.
 
3204
+       * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
 
3205
+       * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
 
3206
+       * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
 
3207
+       * config/sparc/sparc.md (cpu): Add leon3v7.
 
3208
+       * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
 
3209
+
 
3210
+2014-11-06  John David Anglin  <danglin@gcc.gnu.org>
 
3211
+
 
3212
+       * config/pa/pa.md (trap): New insn.  Add "trap" to attribute type.
 
3213
+       Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
 
3214
+       or in_call_delay.
 
3215
+       
 
3216
+2014-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
3217
+
 
3218
+       * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
 
3219
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
3220
+       * config/aarch64/aarch64-linux.h
 
3221
+       (CA53_ERR_835769_SPEC): Define.
 
3222
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
3223
+
 
3224
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
3225
+
 
3226
+       * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
 
3227
+       recog state after aarch64_prev_real_insn call.
 
3228
+
 
3229
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
3230
+
 
3231
+       * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
 
3232
+       if asked.
 
3233
+       * configure.ac: Add --enable-fix-cortex-a53-835769 option.
 
3234
+       * configure: Regenerate.
 
3235
+       * config/aarch64/aarch64.c (aarch64_override_options): Handle
 
3236
+       TARGET_FIX_ERR_A53_835769_DEFAULT.
 
3237
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
 
3238
+       to 2.
 
3239
+       * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
 
3240
+
 
3241
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
3242
+
 
3243
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
 
3244
+       * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
 
3245
+       (FINAL_PRESCAN_INSN): Likewise.
 
3246
+       * config/aarch64/aarch64.h (is_mem_p): New function.
 
3247
+       (has_memory_op): Likewise.
 
3248
+       (aarch64_prev_real_insn): Likewise.
 
3249
+       (is_madd_op): Likewise.
 
3250
+       (dep_between_memop_and_curr): Likewise.
 
3251
+       (aarch64_madd_needs_nop): Likewise.
 
3252
+       (aarch64_final_prescan_insn): Likewise.
 
3253
+       * doc/invoke.texi (Document new option).
 
3254
+
 
3255
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
3256
+
 
3257
+       * stor-layout.c (self_referential_size): Do not promote arguments.
 
3258
+
 
3259
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3260
+
 
3261
+       Backport from mainline r215880
 
3262
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3263
+
 
3264
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
 
3265
+       Issue a warning message when vec_lvsl or vec_lvsr is used with a
 
3266
+       little endian target.
 
3267
+
 
3268
+       Backport from mainline r215882
 
3269
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3270
+
 
3271
+       * altivec.md (altivec_lvsl): New define_expand.
 
3272
+       (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
 
3273
+       (altivec_lvsr): New define_expand.
 
3274
+       (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
 
3275
+       * rs6000.c (rs6000_expand_builtin): Change to use
 
3276
+       altivec_lvs[lr]_direct; remove commented-out code.
 
3277
+
 
3278
+2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
3279
+
 
3280
+       Backport from mainline
 
3281
+       2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
3282
+
 
3283
+       PR rtl-optimization/57003
 
3284
+       * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
 
3285
+       also check CALL_INSN_FUNCTION_USAGE for clobbers again after
 
3286
+       killing regs_invalidated_by_call.
 
3287
+
 
3288
+2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
3289
+
 
3290
+       Backport from mainline
 
3291
+       2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
3292
+
 
3293
+       PR target/52941
 
3294
+       * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
 
3295
+       atomic_fetch_<fetchop_name>si_hard,
 
3296
+       atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
 
3297
+       atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
 
3298
+       atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
 
3299
+       atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
 
3300
+
 
3301
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
 
3302
+
 
3303
+       PR tree-optimization/63375
 
3304
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
 
3305
+       references.
 
3306
+
 
3307
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
3308
+
 
3309
+       PR debug/63342
 
3310
+       * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
 
3311
+       SSA_NAME.
 
3312
+
 
3313
+       PR target/63428
 
3314
+       * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
 
3315
+       argument to avx2_permv2ti.
 
3316
+
 
3317
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
3318
+
 
3319
+       Backport from mainline
 
3320
+       2014-09-30  Uros Bizjak  <ubizjak@gmail.com>
 
3321
+
 
3322
+       * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
 
3323
+       (fmod<mode>3): Ditto.
 
3324
+       (fpremxf4_i387): Ditto.
 
3325
+       (reminderxf3): Ditto.
 
3326
+       (reminder<mode>3): Ditto.
 
3327
+       (fprem1xf4_i387): Ditto.
 
3328
+
 
3329
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
3330
+
 
3331
+       PR inline-asm/63282
 
3332
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
 
3333
+       or invert_jump_1 if jump isn't any_condjump_p.
 
3334
+
 
3335
+2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
 
3336
+
 
3337
+       Backport from mainline r212303
 
3338
+       PR target/49423
 
3339
+       * config/arm/arm-protos.h (arm_legitimate_address_p,
 
3340
+       arm_is_constant_pool_ref): Add prototypes.
 
3341
+       * config/arm/arm.c (arm_legitimate_address_p): Remove static.
 
3342
+       (arm_is_constant_pool_ref) New function.
 
3343
+       * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
 
3344
+       arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
 
3345
+       (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
 
3346
+       operand and remove pool_range and neg_pool_range attributes.
 
3347
+       (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
 
3348
+       pool_range and neg_pool_range attributes.
 
3349
+       * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
 
3350
+       constant pool references.
 
3351
+
 
3352
+2014-09-28  John David Anglin  <danglin@gcc.gnu.org>
 
3353
+
 
3354
+       * config/pa/pa.c (pa_output_function_epilogue): Only update
 
3355
+       last_address when a nonnote insn is found.
 
3356
+
 
3357
+2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
3358
+
 
3359
+       Backport from mainline
 
3360
+       2014-09-25  Nick Clifton  <nickc@redhat.com>
 
3361
+       2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
3362
+
 
3363
+       PR target/62218
 
3364
+       * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
 
3365
+       atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
 
3366
+
 
3367
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3368
+
 
3369
+       Backport from mainline r215559
 
3370
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3371
+
 
3372
+       PR target/63335
 
3373
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
 
3374
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
 
3375
+
 
3376
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
3377
+
 
3378
+       PR tree-optimization/63341
 
3379
+       * tree-vectorizer.h (vect_create_data_ref_ptr,
 
3380
+       vect_create_addr_base_for_vector_ref): Add another tree argument
 
3381
+       defaulting to NULL_TREE.
 
3382
+       * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
 
3383
+       argument, pass it down to vect_create_addr_base_for_vector_ref.
 
3384
+       (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
 
3385
+       add that to base_offset too if non-NULL.
 
3386
+       * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
 
3387
+       for dr_explicit_realign_optimized set it to vector byte size
 
3388
+       - 1 instead of setting offset, pass byte_offset down to
 
3389
+       vect_create_data_ref_ptr.
 
3390
+
 
3391
+2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3392
+
 
3393
+       Back port from trunk:
 
3394
+       2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3395
+
 
3396
+       * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
 
3397
+       refine the constraints used on 32/64-bit floating point moves.
 
3398
+       (f32_av): Likewise.
 
3399
+       (f64_vsx): Likewise.
 
3400
+       (f64_dm): Likewise.
 
3401
+       (f64_av): Likewise.
 
3402
+       (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
 
3403
+       (BOOL_REGS_OP1): Likewise.
 
3404
+       (BOOL_REGS_OP2): Likewise.
 
3405
+       (BOOL_REGS_UNARY): Likewise.
 
3406
+       (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
 
3407
+       32/64-bit floating point moves.  Do not use wa, instead use ww/ws
 
3408
+       for moves involving VSX registers.  Do not use constraints that
 
3409
+       target VSX registers for decimal types.
 
3410
+       (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
 
3411
+       (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
 
3412
+
 
3413
+2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3414
+
 
3415
+       Back port from trunk:
 
3416
+       2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3417
+
 
3418
+       * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
 
3419
+       for base_reg_operand to be common between LO_SUM and PLUS.
 
3420
+       (fusion_gpr_mem_combo): New predicate to match a fused address
 
3421
+       that combines the addis and memory offset address.
 
3422
+
 
3423
+       * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
 
3424
+       calling signature.
 
3425
+       (emit_fusion_gpr_load): Likewise.
 
3426
+
 
3427
+       * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
 
3428
+       signature to pass each argument separately, rather than
 
3429
+       using an operands array.  Rewrite the insns found by peephole2 to
 
3430
+       be a single insn, rather than hoping the insns will still be
 
3431
+       together when the peephole pass is done.  Drop being called via a
 
3432
+       normal peephole.
 
3433
+       (emit_fusion_gpr_load): Change calling signature to be called from
 
3434
+       the fusion_gpr_load_<mode> insns with a combined memory address
 
3435
+       instead of the peephole pass passing the addis and offset
 
3436
+       separately.
 
3437
+
 
3438
+       * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
 
3439
+       fusion.
 
3440
+       (power8 fusion peephole): Drop support for doing power8 via a
 
3441
+       normal peephole that was created by the peephole2 pass.
 
3442
+       (power8 fusion peephole2): Create a new insn with the fused
 
3443
+       address, so that the fused operation is kept together after
 
3444
+       register allocation is done.
 
3445
+       (fusion_gpr_load_<mode>): Likewise.
 
3446
+
 
3447
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
3448
+
 
3449
+       PR debug/63284
 
3450
+       * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
 
3451
+       if there are only debug stmts after the noreturn call, instead
 
3452
+       remove the debug stmts.
 
3453
+
 
3454
+2014-09-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3455
+
 
3456
+       * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
 
3457
+       V2DF, V4SF, DF, and DI modes.
 
3458
+       (vsx_fmav2df2): Likewise.
 
3459
+       (vsx_float_fix_<mode>2): Likewise.
 
3460
+       (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
 
3461
+
 
3462
+2014-09-10  Alan Modra  <amodra@gmail.com>
 
3463
+
 
3464
+       PR debug/60655
 
3465
+       * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
 
3466
+       can't be output.
 
3467
+
 
3468
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
3469
+
 
3470
+       Backport from mainline
 
3471
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
3472
+
 
3473
+       PR tree-optimization/61452
 
3474
+       * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
 
3475
+       expr and has_constants in case we found a leader.
 
3476
+       (simplify_binary_expression): Always valueize operands first.
 
3477
+       (simplify_unary_expression): Likewise.
 
3478
+
 
3479
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
3480
+
 
3481
+       Backport from mainline
 
3482
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
3483
+
 
3484
+       PR middle-end/61010
 
3485
+       * fold-const.c (fold_binary_loc): Consistently avoid
 
3486
+       canonicalizing X & CST away from a CST that is the mask
 
3487
+       of a mode.
 
3488
+
 
3489
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
3490
+
 
3491
+       PR middle-end/61045
 
3492
+       * fold-const.c (fold_comparison): When folding
 
3493
+       X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
 
3494
+       the sign of the remaining constant operand stays the same.
 
3495
+
 
3496
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
3497
+
 
3498
+       PR tree-optimization/62075
 
3499
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
 
3500
+       handle uses in patterns.
 
3501
+
 
3502
+2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
3503
+
 
3504
+       Backport from mainline.
 
3505
+       2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
3506
+
 
3507
+       * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
 
3508
+       (-mtune): Likewise.
 
3509
+       (-mcpu): Likewise.
 
3510
+
 
3511
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
3512
+
 
3513
+       PR tree-optimization/60196
 
3514
+       PR tree-optimization/63189
 
3515
+       Backported from mainline
 
3516
+       2013-09-17  Cong Hou  <congh@google.com>
 
3517
+
 
3518
+       * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
 
3519
+       when checking the dot production pattern. The type of rhs operand
 
3520
+       of multiply is now checked correctly.
 
3521
+
 
3522
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
3523
+
 
3524
+       Backported from mainline
 
3525
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
3526
+
 
3527
+       PR debug/61923
 
3528
+       * haifa-sched.c (advance_one_cycle): Fix dump.
 
3529
+       (schedule_block): Don't advance cycle if we are already at the
 
3530
+       beginning of the cycle.
 
3531
+
 
3532
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
3533
+
 
3534
+       PR ipa/62015
 
3535
+       * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
 
3536
+       pass-trough jump functions correctly.
 
3537
+
 
3538
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
3539
+
 
3540
+       PR ipa/61986
 
3541
+       * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
 
3542
+       created replacements in ascending order of offsets.
 
3543
+       (known_aggs_to_agg_replacement_list): Likewise.
 
3544
+
 
3545
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
3546
+
 
3547
+       Backport from mainline
 
3548
+       2014-08-21  Marek Polacek  <polacek@redhat.com>
 
3549
+
 
3550
+       PR c/61271
 
3551
+       * expr.c (is_aligning_offset): Remove logical not.
 
3552
+
 
3553
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
3554
+
 
3555
+       Backport from mainline
 
3556
+       2014-08-19  Marek Polacek  <polacek@redhat.com>
 
3557
+
 
3558
+       PR c/61271
 
3559
+       * cgraphunit.c (handle_alias_pairs): Fix condition.
 
3560
+
 
3561
+2014-08-30  John David Anglin  <danglin@gcc.gnu.org>
 
3562
+
 
3563
+       * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
 
3564
+       prefix to function labels when generating fast indirect calls.
 
3565
+
 
3566
+2014-08-26  Joel Sherrill <joel.sherrill@oarcorp.com>
 
3567
+
 
3568
+       * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
 
3569
+
 
3570
+2014-08-26  Marek Polacek  <polacek@redhat.com>
 
3571
+
 
3572
+       Backport from mainline
 
3573
+       2014-08-26  Marek Polacek  <polacek@redhat.com>
 
3574
+
 
3575
+       PR c/61271
 
3576
+       * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
 
3577
+       LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
 
3578
+
 
3579
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
3580
+
 
3581
+       Backport from mainline
 
3582
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
3583
+
 
3584
+       PR target/61996
 
3585
+       * config/sh/sh.opt (musermode): Allow negative form.
 
3586
+       * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
 
3587
+       targets that don't support it.
 
3588
+       * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
 
3589
+       Document -mno-usermode option.
 
3590
+
 
3591
+2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
 
3592
+
 
3593
+       PR target/62038
 
3594
+       * config/pa/pa.c (pa_output_function_epilogue): Don't set
 
3595
+       last_address when the current function is a thunk.
 
3596
+       (pa_asm_output_mi_thunk): When we don't have named sections or they
 
3597
+       are not being used, check that thunk can reach the stub table with a
 
3598
+       short branch.
 
3599
+
 
3600
+2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3601
+
 
3602
+       Backport fro mainline
 
3603
+       2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3604
+
 
3605
+       PR target/62195
 
3606
+       * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
 
3607
+       documentation to state it is only for VSX operations.
 
3608
+
 
3609
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
 
3610
+       constraint only active if VSX.
 
3611
+
 
3612
+       * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
 
3613
+       wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
 
3614
+       (lfiwzx): Likewise.
 
3615
+
 
3616
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
3617
+
 
3618
+       Backport from mainline:
 
3619
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
3620
+
 
3621
+       PR rtl-optimization/62004
 
3622
+       PR rtl-optimization/62030
 
3623
+       * ifcvt.c (rtx_interchangeable_p): New function.
 
3624
+       (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
 
3625
+
 
3626
+       2014-08-05  Richard Biener  <rguenther@suse.de>
 
3627
+
 
3628
+       * emit-rtl.h (mem_attrs_eq_p): Declare.
 
3629
+       * emit-rtl.c (mem_attrs_eq_p): Export.
 
3630
+
 
3631
+2014-08-16  John David Anglin  <danglin@gcc.gnu.org>
 
3632
+
 
3633
+       Backport from trunk:
 
3634
+       2014-04-06  John David Anglin  <danglin@gcc.gnu.org>
 
3635
+
 
3636
+       PR debug/55794
 
3637
+       * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
 
3638
+       size accounting for thunks.
 
3639
+       (pa_asm_output_mi_thunk): Use final_start_function() and
 
3640
+       final_end_function() to output function start and end directives.
 
3641
+
 
3642
+2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
3643
+
 
3644
+       Backport from mainline:
 
3645
+       2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
3646
+
 
3647
+       * doc/invoke.texi (SH options): Document missing processor variant
 
3648
+       options.  Remove references to Hitachi.  Undocument deprecated mspace
 
3649
+       option.
 
3650
+
 
3651
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
3652
+
 
3653
+       PR tree-optimization/62073
 
3654
+       * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
 
3655
+       a basic block.
 
3656
+
 
3657
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3658
+
 
3659
+       Backport from mainline
 
3660
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3661
+
 
3662
+       PR middle-end/62103
 
3663
+       * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
 
3664
+       bitfields, that is when size doesn't match the size of type or the
 
3665
+       size of the constructor.
 
3666
+
 
3667
+2014-08-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3668
+
 
3669
+       Backport patch from mainline
 
3670
+       2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3671
+
 
3672
+       * config/rs6000/constraints.md (wh constraint): New constraint,
 
3673
+       for FP registers if direct move is available.
 
3674
+       (wi constraint): New constraint, for VSX/FP registers that can
 
3675
+       handle 64-bit integers.
 
3676
+       (wj constraint): New constraint for VSX/FP registers that can
 
3677
+       handle 64-bit integers for direct moves.
 
3678
+       (wk constraint): New constraint for VSX/FP registers that can
 
3679
+       handle 64-bit doubles for direct moves.
 
3680
+       (wy constraint): Make documentation match implementation.
 
3681
+
 
3682
+       * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
 
3683
+       scalar_in_vmx_p field to simplify tests of whether SFmode or
 
3684
+       DFmode can go in the Altivec registers.
 
3685
+       (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
 
3686
+       (rs6000_setup_reg_addr_masks): Likewise.
 
3687
+       (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
 
3688
+       field, and wh/wi/wj/wk constraints.
 
3689
+       (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
 
3690
+       the wh/wi/wj/wk constraints.
 
3691
+       (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
 
3692
+       upper registers, prefer VSX registers unless the operation is a
 
3693
+       memory operation with REG+OFFSET addressing.
 
3694
+
 
3695
+       * config/rs6000/vsx.md (VSr mode attribute): Add support for
 
3696
+       DImode.  Change SFmode to use ww constraint instead of d to allow
 
3697
+       SF registers in the upper registers.
 
3698
+       (VSr2): Likewise.
 
3699
+       (VSr3): Likewise.
 
3700
+       (VSr5): Fix thinko in comment.
 
3701
+       (VSa): New mode attribute that is an alternative to wa, that
 
3702
+       returns the VSX register class that a mode can go in, but may not
 
3703
+       be the preferred register class.
 
3704
+       (VS_64dm): New mode attribute for appropriate register classes for
 
3705
+       referencing 64-bit elements of vectors for direct moves and normal
 
3706
+       moves.
 
3707
+       (VS_64reg): Likewise.
 
3708
+       (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
 
3709
+       register allocator to only registers the data type can handle.
 
3710
+       (vsx_le_perm_load_<mode>): Likewise.
 
3711
+       (vsx_le_perm_store_<mode>): Likewise.
 
3712
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
3713
+       (vsx_xxpermdi4_le_<mode>): Likewise.
 
3714
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
3715
+       (vsx_lxvd2x4_le_<mode>): Likewise.
 
3716
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
3717
+       (vsx_add<mode>3): Likewise.
 
3718
+       (vsx_sub<mode>3): Likewise.
 
3719
+       (vsx_mul<mode>3): Likewise.
 
3720
+       (vsx_div<mode>3): Likewise.
 
3721
+       (vsx_tdiv<mode>3_internal): Likewise.
 
3722
+       (vsx_fre<mode>2): Likewise.
 
3723
+       (vsx_neg<mode>2): Likewise.
 
3724
+       (vsx_abs<mode>2): Likewise.
 
3725
+       (vsx_nabs<mode>2): Likewise.
 
3726
+       (vsx_smax<mode>3): Likewise.
 
3727
+       (vsx_smin<mode>3): Likewise.
 
3728
+       (vsx_sqrt<mode>2): Likewise.
 
3729
+       (vsx_rsqrte<mode>2): Likewise.
 
3730
+       (vsx_tsqrt<mode>2_internal): Likewise.
 
3731
+       (vsx_fms<mode>4): Likewise.
 
3732
+       (vsx_nfma<mode>4): Likewise.
 
3733
+       (vsx_eq<mode>): Likewise.
 
3734
+       (vsx_gt<mode>): Likewise.
 
3735
+       (vsx_ge<mode>): Likewise.
 
3736
+       (vsx_eq<mode>_p): Likewise.
 
3737
+       (vsx_gt<mode>_p): Likewise.
 
3738
+       (vsx_ge<mode>_p): Likewise.
 
3739
+       (vsx_xxsel<mode>): Likewise.
 
3740
+       (vsx_xxsel<mode>_uns): Likewise.
 
3741
+       (vsx_copysign<mode>3): Likewise.
 
3742
+       (vsx_float<VSi><mode>2): Likewise.
 
3743
+       (vsx_floatuns<VSi><mode>2): Likewise.
 
3744
+       (vsx_fix_trunc<mode><VSi>2): Likewise.
 
3745
+       (vsx_fixuns_trunc<mode><VSi>2): Likewise.
 
3746
+       (vsx_x<VSv>r<VSs>i): Likewise.
 
3747
+       (vsx_x<VSv>r<VSs>ic): Likewise.
 
3748
+       (vsx_btrunc<mode>2): Likewise.
 
3749
+       (vsx_b2trunc<mode>2): Likewise.
 
3750
+       (vsx_floor<mode>2): Likewise.
 
3751
+       (vsx_ceil<mode>2): Likewise.
 
3752
+       (vsx_<VS_spdp_insn>): Likewise.
 
3753
+       (vsx_xscvspdp): Likewise.
 
3754
+       (vsx_xvcvspuxds): Likewise.
 
3755
+       (vsx_float_fix_<mode>2): Likewise.
 
3756
+       (vsx_set_<mode>): Likewise.
 
3757
+       (vsx_extract_<mode>_internal1): Likewise.
 
3758
+       (vsx_extract_<mode>_internal2): Likewise.
 
3759
+       (vsx_extract_<mode>_load): Likewise.
 
3760
+       (vsx_extract_<mode>_store): Likewise.
 
3761
+       (vsx_splat_<mode>): Likewise.
 
3762
+       (vsx_xxspltw_<mode>): Likewise.
 
3763
+       (vsx_xxspltw_<mode>_direct): Likewise.
 
3764
+       (vsx_xxmrghw_<mode>): Likewise.
 
3765
+       (vsx_xxmrglw_<mode>): Likewise.
 
3766
+       (vsx_xxsldwi_<mode>): Likewise.
 
3767
+       (vsx_xscvdpspn): Tighten constraints to only use register classes
 
3768
+       the types use.
 
3769
+       (vsx_xscvspdpn): Likewise.
 
3770
+       (vsx_xscvdpspn_scalar): Likewise.
 
3771
+
 
3772
+       * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
 
3773
+       wj, and wk constraints.
 
3774
+       (GPR_REG_CLASS_P): New helper macro for register classes targeting
 
3775
+       general purpose registers.
 
3776
+
 
3777
+       * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
 
3778
+       direct moves.
 
3779
+       (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
 
3780
+       DImode instead of wm.  Use wk constraint for direct move of DFmode
 
3781
+       instead of wm.
 
3782
+       (extendsidi2_lfiwax): Likewise.
 
3783
+       (lfiwax): Likewise.
 
3784
+       (lfiwzx): Likewise.
 
3785
+       (movdi_internal64): Likewise.
 
3786
+
 
3787
+       * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
 
3788
+       wk constraints. Make the wy constraint documentation match them
 
3789
+       implementation.
 
3790
+
 
3791
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3792
+
 
3793
+       Backport from mainline
 
3794
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3795
+
 
3796
+       PR tree-optimization/61375
 
3797
+       * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
 
3798
+       symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
 
3799
+       (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
 
3800
+
 
3801
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
3802
+
 
3803
+       PR tree-optimization/61964
 
3804
+       * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
 
3805
+       function merged from trunk.
 
3806
+       (gimple_equal_p): Handle non-SSA LHS solely by structural
 
3807
+       equality.
 
3808
+
 
3809
+2014-07-25  Uros Bizjak  <ubizjak@gmail.com>
 
3810
+
 
3811
+       * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
 
3812
+
 
3813
+2014-07-24  Kyle McMartin  <kyle@redhat.com>
 
3814
+
 
3815
+       * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
 
3816
+
 
3817
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3818
+
 
3819
+       * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
 
3820
+       Add prototype.
 
3821
+       * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
 
3822
+       function.  Issue -Wpsabi warning if future GCC releases will use
 
3823
+       different field alignment rules for this type.
 
3824
+       * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
 
3825
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
 
3826
+       * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
 
3827
+
 
3828
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3829
+
 
3830
+       * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
 
3831
+       -Wpsabi note when encountering a type where future GCC releases
 
3832
+       will apply different alignment requirements.
 
3833
+
 
3834
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3835
+
 
3836
+       * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
 
3837
+       does not fit fully into floating-point registers, and there is still
 
3838
+       space in the register parameter area, issue -Wpsabi note that the ABI
 
3839
+       will change in a future GCC release.
 
3840
+
 
3841
+2014-07-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
3842
+
 
3843
+       * config/arm/t-rtems-eabi: Add
 
3844
+       mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
 
3845
+       mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
 
3846
+       mbig-endian/mthumb/march=armv7-r, and
 
3847
+       mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
3848
+       multilibs.
 
3849
+
 
3850
+2014-07-21  Peter Bergner  <bergner@vnet.ibm.com>
 
3851
+
 
3852
+       * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
 
3853
+       (LIBTSAN_EARLY_SPEC): Likewise.
 
3854
+       (STATIC_LIBASAN_LIBS): Likewise.
 
3855
+       (STATIC_LIBTSAN_LIBS): Likewise.
 
3856
+
 
3857
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
3858
+
 
3859
+       * toplev.c (output_stack_usage): Adjust the location of the warning.
 
3860
+
 
3861
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
 
3862
+
 
3863
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
 
3864
+       (*membar_storeload): Disable for LEON3.
 
3865
+
 
3866
+2014-07-17  Richard Biener  <rguenther@suse.de>
 
3867
+
 
3868
+       PR rtl-optimization/61801
 
3869
+       * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
 
3870
+       ASM_INPUT don't set reg_pending_barrier if it appears in a
 
3871
+       debug-insn.
 
3872
+
 
3873
+2014-07-16  Jakub Jelinek  <jakub@redhat.com>
 
3874
+
 
3875
+       * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
 
3876
+       on the FUNCTION_DECL.
 
3877
+
 
3878
+2014-07-10  Tom G. Christensen  <tgc@jupiterrise.com>
 
3879
+
 
3880
+       * doc/install.texi: Remove links to defunct package providers for
 
3881
+       Solaris.
 
3882
+
 
3883
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
3884
+
 
3885
+       PR middle-end/53590
 
3886
+       * function.c (allocate_struct_function): Revert r188667 change.
 
3887
+
 
3888
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
3889
+
 
3890
+       PR tree-optimization/61684
 
3891
+       * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
 
3892
+       rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
 
3893
+
 
3894
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3895
+
 
3896
+       Backport from Mainline
 
3897
+       2014-06-20  Jakub Jelinek  <jakub@redhat.com>
 
3898
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3899
+
 
3900
+       PR tree-optimization/61306
 
3901
+       * tree-ssa-math-opts.c (struct symbolic_number): Store type of
 
3902
+       expression instead of its size.
 
3903
+       (do_shift_rotate): Adapt to change in struct symbolic_number. Return
 
3904
+       false to prevent optimization when the result is unpredictable due to
 
3905
+       arithmetic right shift of signed type with highest byte is set.
 
3906
+       (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
 
3907
+       (find_bswap_1): Likewise. Return NULL to prevent optimization when the
 
3908
+       result is unpredictable due to sign extension.
 
3909
+       (find_bswap): Adapt to change in struct symbolic_number.
 
3910
+
 
3911
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
3912
+
 
3913
+       Backport from mainline
 
3914
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
3915
+
 
3916
+       PR target/61586
 
3917
+       * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
 
3918
+
 
3919
+2014-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3920
+
 
3921
+       PR target/61542
 
3922
+       * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
 
3923
+       extraction other than index 3.
 
3924
+
 
3925
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
 
3926
+
 
3927
+       PR target/61570
 
3928
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
 
3929
+       model family 6 CPU with has_longmode never use a CPU without
 
3930
+       64-bit support.
 
3931
+
 
3932
+2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
 
3933
+
 
3934
+       Backport from mainline
 
3935
+
 
3936
+       2014-06-20  Julian Brown  <julian@codesourcery.com>
 
3937
+                   Chung-Lin Tang  <cltang@codesourcery.com>
 
3938
+
 
3939
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
 
3940
+       TARGET_THUMB1_ONLY. Add comments.
 
3941
+
 
3942
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
3943
+
 
3944
+       Backport from mainline
 
3945
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
3946
+
 
3947
+       PR target/61423
 
3948
+       * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
 
3949
+       define_insn_and_split pattern, merged from *floatunssi<mode>2_1
 
3950
+       and corresponding splitters.  Zero extend general register
 
3951
+       or memory input operand to XMM temporary.  Enable for
 
3952
+       TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
 
3953
+       (floatunssi<mode>2): Update expander predicate.
 
3954
+
 
3955
+2014-06-18  Richard Henderson  <rth@redhat.com>
 
3956
+
 
3957
+       PR target/61545
 
3958
+       * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
 
3959
+
 
3960
+2014-06-17  Nagaraju Mekala <nagaraju.mekala@xilinx.com>
 
3961
+
 
3962
+       Revert on gcc-4_8-branch.
 
3963
+       * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
 
3964
+       * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
 
3965
+
 
3966
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
3967
+
 
3968
+       Backport from mainline
 
3969
+
 
3970
+       PR target/61483
 
3971
+       * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
 
3972
+       variable 'size'; calculate 'size' right in the front; use
 
3973
+       'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
 
3974
+       pcum->aapcs_stack_words.
 
3975
+
 
3976
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
3977
+
 
3978
+       Backport from mainline
 
3979
+
 
3980
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
3981
+       PR target/61415
 
3982
+       * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
 
3983
+       (BU_MISC_2): Rename to ...
 
3984
+       (BU_LDBL128_2): ... this.
 
3985
+       * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
 
3986
+       (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
 
3987
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
 
3988
+       RS6000_BTM_LDBL128.
 
3989
+       (rs6000_invalid_builtin): Add long double 128-bit builtin support.
 
3990
+       (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
 
3991
+       * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
 
3992
+       (unpacktf_1): Likewise.
 
3993
+       * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
 
3994
+       (__builtin_longdouble_dw1): Likewise.
 
3995
+       * doc/sourcebuild.texi (longdouble128): Document.
 
3996
+
 
3997
+2014-06-13  Jason Merrill  <jason@redhat.com>
 
3998
+
 
3999
+       PR c++/60731
 
4000
+       * common.opt (-fno-gnu-unique): Add.
 
4001
+       * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
 
4002
+
 
4003
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
4004
+
 
4005
+       Backport from 2014-05-09 trunk r210272
 
4006
+
 
4007
+       * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
 
4008
+       unsigned int initializers for regno_in, regno_out.
 
4009
+
 
4010
+       Backport from 2014-05-14 trunk r210418
 
4011
+       * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
 
4012
+       shifted values to avoid build warning.
 
4013
+
 
4014
+       Backport from 2014-06-12 trunk r211491
 
4015
+
 
4016
+       PR target/61443
 
4017
+       * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
 
4018
+       loading from address spaces.
 
4019
+
 
4020
+2014-06-12  Alan Modra  <amodra@gmail.com>
 
4021
+
 
4022
+       PR target/61300
 
4023
+       * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
 
4024
+       * doc/tm.texi: Regenerate.
 
4025
+       * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
 
4026
+       Use throughout in place of REG_PARM_STACK_SPACE.
 
4027
+       * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
 
4028
+       "incoming" param.  Pass to rs6000_function_parms_need_stack.
 
4029
+       (rs6000_function_parms_need_stack): Add "incoming" param, ignore
 
4030
+       prototype_p when incoming.  Use function decl when incoming
 
4031
+       to handle K&R style functions.
 
4032
+       * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
 
4033
+       (INCOMING_REG_PARM_STACK_SPACE): Define.
 
4034
+
 
4035
+2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
4036
+
 
4037
+       Back port from trunk
 
4038
+       2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
4039
+
 
4040
+       PR target/61431
 
4041
+       * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
 
4042
+       iterators, VSX_D that handles 64-bit types, and VSX_LE that
 
4043
+       handles swapping the two 64-bit double words on little endian
 
4044
+       systems.  Include V1TImode and optionally TImode in VSX_LE so that
 
4045
+       these types are properly swapped.  Change all of the insns and
 
4046
+       splits that do the 64-bit swaps to use VSX_LE.
 
4047
+       (vsx_le_perm_load_<mode>): Likewise.
 
4048
+       (vsx_le_perm_store_<mode>): Likewise.
 
4049
+       (splitters for little endian memory operations): Likewise.
 
4050
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
4051
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
4052
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
4053
+
 
4054
+2014-06-05  Martin Jambor  <mjambor@suse.cz>
 
4055
+
 
4056
+       PR ipa/61393
 
4057
+       * ipa-cp.c (determine_versionability): Pretend that tm_clones are
 
4058
+       not versionable.
 
4059
+
 
4060
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
4061
+
 
4062
+       PR tree-optimization/61383
 
4063
+       * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
 
4064
+       stmts can't trap.
 
4065
+
 
4066
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
4067
+
 
4068
+       Backport from mainline
 
4069
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
4070
+
 
4071
+       PR rtl-optimization/60866
 
4072
+       * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
 
4073
+       Default it to -1.  Pass it down to init_simplejump_data.
 
4074
+       (init_simplejump_data): New parameter old_seqno.  Pass it down
 
4075
+       to get_seqno_for_a_jump.
 
4076
+       (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
 
4077
+       initializing new jump seqno as a last resort.  Add comment.
 
4078
+       (sel_redirect_edge_and_branch): Save old seqno of the conditional
 
4079
+       jump and pass it down to sel_init_new_insn.
 
4080
+       (sel_redirect_edge_and_branch_force): Likewise.
 
4081
+
 
4082
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
4083
+
 
4084
+       Backport from mainline
 
4085
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
4086
+
 
4087
+       PR rtl-optimization/60901
 
4088
+       * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
 
4089
+       bb predecessor belongs to the same scheduling region.  Adjust comment.
 
4090
+
 
4091
+2014-06-03  Uros Bizjak  <ubizjak@gmail.com>
 
4092
+
 
4093
+       Backport from mainline
 
4094
+       2014-06-02  Uros Bizjak  <ubizjak@gmail.com>
 
4095
+
 
4096
+       PR target/61239
 
4097
+       * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
 
4098
+       GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
 
4099
+
 
4100
+2014-05-28  Guozhi Wei  <carrot@google.com>
 
4101
+
 
4102
+       PR target/61202
 
4103
+       * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
 
4104
+       constraint.
 
4105
+       (vqdmulhq_n_s16): Likewise.
 
4106
+
 
4107
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
4108
+
 
4109
+       Backport from mainline
 
4110
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
4111
+
 
4112
+       * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
 
4113
+       predicate to detect a negative quotient.
 
4114
+
 
4115
+2014-05-28  Georg-Johann Lay  <avr@gjlay.de>
 
4116
+
 
4117
+       PR target/61044
 
4118
+       * doc/extend.texi (Local Labels): Note that label differences are
 
4119
+       not supported for AVR.
 
4120
+
 
4121
+2014-05-26  Michael Tautschnig  <mt@debian.org>
 
4122
+
 
4123
+       PR target/61249
 
4124
+       * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
 
4125
+       __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
 
4126
+
 
4127
+2014-05-23  Alan Modra  <amodra@gmail.com>
 
4128
+
 
4129
+       PR target/61231
 
4130
+       * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
 
4131
+       * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
 
4132
+       Use "Y" constraint rather than "m".
 
4133
+
 
4134
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
4135
+
 
4136
+       Backport from mainline
 
4137
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
4138
+
 
4139
+       * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
 
4140
+
 
4141
+2014-05-22  Richard Earnshaw  <rearnsha@arm.com>
 
4142
+
 
4143
+       PR target/61208
 
4144
+       * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
 
4145
+
 
4146
 2014-05-22  Release Manager
 
4147
 
 
4148
        * GCC 4.8.3 released.
 
4149
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
 
4150
===================================================================
 
4151
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../tags/gcc_4_8_3_release)
 
4152
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../branches/gcc-4_8-branch)
 
4153
@@ -0,0 +1,14 @@
 
4154
+/* Test for deprecation messages on use of lvsl and lvsr for little endian.  */
 
4155
+
 
4156
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
4157
+/* { dg-options "-O0 -Wdeprecated" } */
 
4158
+
 
4159
+#include <altivec.h>
 
4160
+
 
4161
+float f[20];
 
4162
+
 
4163
+void foo ()
 
4164
+{
 
4165
+  vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
4166
+  vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
4167
+}
 
4168
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
 
4169
===================================================================
 
4170
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../tags/gcc_4_8_3_release)
 
4171
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../branches/gcc-4_8-branch)
 
4172
@@ -0,0 +1,30 @@
 
4173
+/* { dg-do run { target { powerpc64*-*-* } } } */
 
4174
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
4175
+/* { dg-options "-mvsx" } */
 
4176
+
 
4177
+#include <altivec.h>
 
4178
+
 
4179
+void abort (void);
 
4180
+
 
4181
+vector double vec = (vector double) {99.0, 99.0};
 
4182
+
 
4183
+int main() {
 
4184
+
 
4185
+  int actual = vec_all_nge(vec, vec);
 
4186
+  if ( actual != 0)
 
4187
+    abort();
 
4188
+
 
4189
+  actual = vec_all_nle(vec, vec);
 
4190
+  if ( actual != 0)
 
4191
+    abort();
 
4192
+
 
4193
+  actual = vec_any_nge(vec, vec);
 
4194
+  if ( actual != 0)
 
4195
+    abort();
 
4196
+
 
4197
+  actual = vec_any_nle(vec, vec);
 
4198
+  if ( actual != 0)
 
4199
+    abort();
 
4200
+
 
4201
+  return 0;
 
4202
+}
 
4203
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
 
4204
===================================================================
 
4205
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../tags/gcc_4_8_3_release)
 
4206
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../branches/gcc-4_8-branch)
 
4207
@@ -1,7 +1,7 @@
 
4208
 /* { dg-do compile { target { powerpc*-*-* } } } */
 
4209
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
4210
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
4211
-/* { dg-options "-O3 -mcpu=power7" } */
 
4212
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
 
4213
 
 
4214
 /* Test the various load/store varients.  */
 
4215
 
 
4216
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
 
4217
===================================================================
 
4218
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
 
4219
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
 
4220
@@ -1,6 +1,7 @@
 
4221
 /* { dg-do assemble } */
 
4222
 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
 
4223
 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
 
4224
+/* { dg-require-effective-target longdouble128 } */
 
4225
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
 
4226
 
 
4227
 typedef float TFmode __attribute__ ((mode (TF)));
 
4228
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
 
4229
===================================================================
 
4230
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../tags/gcc_4_8_3_release)
 
4231
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../branches/gcc-4_8-branch)
 
4232
@@ -2,6 +2,7 @@
 
4233
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
4234
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 
4235
 /* { dg-require-effective-target powerpc_fprs } */
 
4236
+/* { dg-require-effective-target longdouble128 } */
 
4237
 /* { dg-options "-O2 -mhard-float" } */
 
4238
 
 
4239
 #include <stddef.h>
 
4240
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
 
4241
===================================================================
 
4242
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../tags/gcc_4_8_3_release)
 
4243
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../branches/gcc-4_8-branch)
 
4244
@@ -0,0 +1,12 @@
 
4245
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
4246
+/* { dg-options "-mabi=elfv2" } */
 
4247
+
 
4248
+struct f8
 
4249
+  {
 
4250
+    float x[8];
 
4251
+  };
 
4252
+
 
4253
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
 
4254
+{
 
4255
+}
 
4256
+
 
4257
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
 
4258
===================================================================
 
4259
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../tags/gcc_4_8_3_release)
 
4260
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../branches/gcc-4_8-branch)
 
4261
@@ -0,0 +1,14 @@
 
4262
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
4263
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
4264
+/* { dg-require-effective-target powerpc_htm_ok } */
 
4265
+/* { dg-options "-O2 -mhtm" } */
 
4266
+
 
4267
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
 
4268
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
 
4269
+
 
4270
+#include <htmintrin.h>
 
4271
+long
 
4272
+ttest (void)
 
4273
+{
 
4274
+  return _HTM_STATE(__builtin_ttest());
 
4275
+}
 
4276
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
 
4277
===================================================================
 
4278
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../tags/gcc_4_8_3_release)
 
4279
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../branches/gcc-4_8-branch)
 
4280
@@ -0,0 +1,21 @@
 
4281
+/* Test expected code generation for lvsl and lvsr on little endian.
 
4282
+   Note that lvsl and lvsr are each produced once, but the filename
 
4283
+   causes them to appear twice in the file.  */
 
4284
+
 
4285
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
4286
+/* { dg-options "-O0 -Wno-deprecated" } */
 
4287
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
 
4288
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
 
4289
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
 
4290
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
 
4291
+
 
4292
+
 
4293
+#include <altivec.h>
 
4294
+
 
4295
+float f[20];
 
4296
+
 
4297
+void foo ()
 
4298
+{
 
4299
+  vector unsigned char a = vec_lvsl (4, f);
 
4300
+  vector unsigned char b = vec_lvsr (8, f);
 
4301
+}
 
4302
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
 
4303
===================================================================
 
4304
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../tags/gcc_4_8_3_release)
 
4305
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../branches/gcc-4_8-branch)
 
4306
@@ -0,0 +1,12 @@
 
4307
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
4308
+/* { dg-options "-mno-compat-align-parm" } */
 
4309
+
 
4310
+struct test
 
4311
+  {
 
4312
+    long a __attribute__((aligned (16)));
 
4313
+  };
 
4314
+
 
4315
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
 
4316
+{
 
4317
+}
 
4318
+
 
4319
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
 
4320
===================================================================
 
4321
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../tags/gcc_4_8_3_release)
 
4322
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../branches/gcc-4_8-branch)
 
4323
@@ -0,0 +1,9 @@
 
4324
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
4325
+/* { dg-require-effective-target powerpc_altivec_ok } */
 
4326
+/* { dg-options "-maltivec" } */
 
4327
+
 
4328
+struct test
 
4329
+  {
 
4330
+    int a __attribute__((vector_size (8)));
 
4331
+  }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
 
4332
+
 
4333
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
 
4334
===================================================================
 
4335
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../tags/gcc_4_8_3_release)
 
4336
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../branches/gcc-4_8-branch)
 
4337
@@ -1,6 +1,6 @@
 
4338
 /* { dg-do compile { target powerpc*-*-* } } */
 
4339
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
4340
-/* { dg-options "-maltivec -O0 -Wall" } */
 
4341
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
 
4342
 
 
4343
 #include <altivec.h>
 
4344
 
 
4345
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
 
4346
===================================================================
 
4347
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../tags/gcc_4_8_3_release)
 
4348
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../branches/gcc-4_8-branch)
 
4349
@@ -1,7 +1,7 @@
 
4350
 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
 
4351
 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
 
4352
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
4353
-/* { dg-options "-maltivec -O2" } */
 
4354
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
 
4355
 
 
4356
 #include <altivec.h>
 
4357
 
 
4358
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
 
4359
===================================================================
 
4360
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
 
4361
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
 
4362
@@ -1,5 +1,5 @@
 
4363
 /* { dg-do compile { target powerpc_altivec_ok } } */
 
4364
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
 
4365
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
 
4366
 
 
4367
 #include <altivec.h>
 
4368
 
 
4369
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
 
4370
===================================================================
 
4371
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../tags/gcc_4_8_3_release)
 
4372
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../branches/gcc-4_8-branch)
 
4373
@@ -0,0 +1,10 @@
 
4374
+/* { dg-do compile } */
 
4375
+/* { dg-options "-O2 -mieee" } */
 
4376
+
 
4377
+void foo (int *dimensions, double **params, int hh)
 
4378
+{
 
4379
+  if (params[hh])
 
4380
+    ;
 
4381
+  else if (dimensions[hh] > 0)
 
4382
+    params[hh][0] = 1.0f;
 
4383
+}
 
4384
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
 
4385
===================================================================
 
4386
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../tags/gcc_4_8_3_release)
 
4387
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../branches/gcc-4_8-branch)
 
4388
@@ -0,0 +1,35 @@
 
4389
+/* Test AAPCS64 layout and __builtin_va_start.
 
4390
+
 
4391
+   Pass named HFA/HVA argument on stack.  */
 
4392
+
 
4393
+/* { dg-do run { target aarch64*-*-* } } */
 
4394
+
 
4395
+#ifndef IN_FRAMEWORK
 
4396
+#define AAPCS64_TEST_STDARG
 
4397
+#define TESTFILE "va_arg-14.c"
 
4398
+#include "type-def.h"
 
4399
+
 
4400
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
 
4401
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
 
4402
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
 
4403
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
 
4404
+
 
4405
+#include "abitest.h"
 
4406
+#else
 
4407
+  ARG (float, 1.0f, S0, 0)
 
4408
+  ARG (float, 2.0f, S1, 1)
 
4409
+  ARG (float, 3.0f, S2, 2)
 
4410
+  ARG (float, 4.0f, S3, 3)
 
4411
+  ARG (float, 5.0f, S4, 4)
 
4412
+  ARG (float, 6.0f, S5, 5)
 
4413
+  ARG (float, 7.0f, S6, 6)
 
4414
+  ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
 
4415
+  /* Previous argument size has been rounded up to the nearest multiple of
 
4416
+     8 bytes.  */
 
4417
+  ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
 
4418
+  /* NSAA is rounded up to the nearest natural alignment of float32x4.  */
 
4419
+  ARG (vf4_t, float32x4, STACK + 32, 9)
 
4420
+  ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
 
4421
+  DOTS
 
4422
+  LAST_ANON (double, 123456789.987, STACK + 64, 11)
 
4423
+#endif
 
4424
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
 
4425
===================================================================
 
4426
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../tags/gcc_4_8_3_release)
 
4427
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../branches/gcc-4_8-branch)
 
4428
@@ -34,6 +34,13 @@
 
4429
   float b;
 
4430
 };
 
4431
 
 
4432
+struct hfa_fx3_t
 
4433
+{
 
4434
+  float a;
 
4435
+  float b;
 
4436
+  float c;
 
4437
+};
 
4438
+
 
4439
 struct hfa_dx2_t
 
4440
 {
 
4441
   double a;
 
4442
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
 
4443
===================================================================
 
4444
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../tags/gcc_4_8_3_release)
 
4445
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../branches/gcc-4_8-branch)
 
4446
@@ -0,0 +1,59 @@
 
4447
+/* Test AAPCS64 layout and __builtin_va_start.
 
4448
+
 
4449
+   Pass named HFA/HVA argument on stack.  */
 
4450
+
 
4451
+/* { dg-do run { target aarch64*-*-* } } */
 
4452
+
 
4453
+#ifndef IN_FRAMEWORK
 
4454
+#define AAPCS64_TEST_STDARG
 
4455
+#define TESTFILE "va_arg-13.c"
 
4456
+
 
4457
+struct float_float_t
 
4458
+{
 
4459
+  float a;
 
4460
+  float b;
 
4461
+} float_float;
 
4462
+
 
4463
+union float_int_t
 
4464
+{
 
4465
+  float b8;
 
4466
+  int b5;
 
4467
+} float_int;
 
4468
+
 
4469
+#define HAS_DATA_INIT_FUNC
 
4470
+void
 
4471
+init_data ()
 
4472
+{
 
4473
+  float_float.a = 1.2f;
 
4474
+  float_float.b = 2.2f;
 
4475
+
 
4476
+  float_int.b8 = 4983.80f;
 
4477
+}
 
4478
+
 
4479
+#include "abitest.h"
 
4480
+#else
 
4481
+  ARG (float, 1.0f, S0, 0)
 
4482
+  ARG (float, 2.0f, S1, 1)
 
4483
+  ARG (float, 3.0f, S2, 2)
 
4484
+  ARG (float, 4.0f, S3, 3)
 
4485
+  ARG (float, 5.0f, S4, 4)
 
4486
+  ARG (float, 6.0f, S5, 5)
 
4487
+  ARG (float, 7.0f, S6, 6)
 
4488
+  ARG (struct float_float_t, float_float, STACK, 7)
 
4489
+  ARG (int,  9, W0, 8)
 
4490
+  ARG (int, 10, W1, 9)
 
4491
+  ARG (int, 11, W2, 10)
 
4492
+  ARG (int, 12, W3, 11)
 
4493
+  ARG (int, 13, W4, 12)
 
4494
+  ARG (int, 14, W5, 13)
 
4495
+  ARG (int, 15, W6, LAST_NAMED_ARG_ID)
 
4496
+  DOTS
 
4497
+  /* Note on the reason of using 'X7' instead of 'W7' here:
 
4498
+     Using 'X7' makes sure the test works in the big-endian mode.
 
4499
+     According to PCS rules B.4 and C.10, the size of float_int is rounded
 
4500
+     to 8 bytes and prepared in the register X7 as if loaded via LDR from
 
4501
+     the memory, with the content of the other 4 bytes unspecified.  The
 
4502
+     test framework will only compare the 4 relavent bytes.  */
 
4503
+  ANON (union float_int_t, float_int, X7, 15)
 
4504
+  LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
 
4505
+#endif
 
4506
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
 
4507
===================================================================
 
4508
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../tags/gcc_4_8_3_release)
 
4509
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../branches/gcc-4_8-branch)
 
4510
@@ -0,0 +1,39 @@
 
4511
+/* Test AAPCS64 layout and __builtin_va_start.
 
4512
+
 
4513
+   Pass named __128int argument on stack.  */
 
4514
+
 
4515
+/* { dg-do run { target aarch64*-*-* } } */
 
4516
+
 
4517
+#ifndef IN_FRAMEWORK
 
4518
+#define AAPCS64_TEST_STDARG
 
4519
+#define TESTFILE "va_arg-15.c"
 
4520
+#include "type-def.h"
 
4521
+
 
4522
+union int128_t qword;
 
4523
+
 
4524
+#define HAS_DATA_INIT_FUNC
 
4525
+void
 
4526
+init_data ()
 
4527
+{
 
4528
+  /* Init signed quad-word integer.  */
 
4529
+  qword.l64 = 0xfdb9753102468aceLL;
 
4530
+  qword.h64 = 0xeca8642013579bdfLL;
 
4531
+}
 
4532
+
 
4533
+#include "abitest.h"
 
4534
+#else
 
4535
+  ARG (int, 1, W0, 0)
 
4536
+  ARG (int, 2, W1, 1)
 
4537
+  ARG (int, 3, W2, 2)
 
4538
+  ARG (int, 4, W3, 3)
 
4539
+  ARG (int, 5, W4, 4)
 
4540
+  ARG (int, 6, W5, 5)
 
4541
+  ARG (int, 7, W6, 6)
 
4542
+  ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
 
4543
+  DOTS
 
4544
+#ifndef __AAPCS64_BIG_ENDIAN__
 
4545
+  LAST_ANON (int, 8, STACK + 16, 8)
 
4546
+#else
 
4547
+  LAST_ANON (int, 8, STACK + 20, 8)
 
4548
+#endif
 
4549
+#endif
 
4550
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
 
4551
===================================================================
 
4552
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../tags/gcc_4_8_3_release)
 
4553
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../branches/gcc-4_8-branch)
 
4554
@@ -0,0 +1,14 @@
 
4555
+/* { dg-do assemble } */
 
4556
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
 
4557
+
 
4558
+int
 
4559
+test (int a, double b, int c, int d, int e)
 
4560
+{
 
4561
+  double result;
 
4562
+  __asm__ __volatile ("// %0, %1"
 
4563
+                      : "=w" (result)
 
4564
+                      : "0" (b)
 
4565
+                      :    /* No clobbers */
 
4566
+                      );
 
4567
+  return c * d + e;
 
4568
+}
 
4569
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
 
4570
===================================================================
 
4571
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../tags/gcc_4_8_3_release)
 
4572
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../branches/gcc-4_8-branch)
 
4573
@@ -0,0 +1,134 @@
 
4574
+/* { dg-do run } */
 
4575
+/* { dg-options "-std=gnu99" } */
 
4576
+
 
4577
+#include <stdlib.h>
 
4578
+#include <stdarg.h>
 
4579
+
 
4580
+#define NC __attribute__((noinline,noclone))
 
4581
+
 
4582
+void NC vfun (char n, ...)
 
4583
+{
 
4584
+  va_list ap;
 
4585
+
 
4586
+  va_start (ap, n);
 
4587
+
 
4588
+  switch (n)
 
4589
+    {
 
4590
+    default:
 
4591
+      abort();
 
4592
+    case 1:
 
4593
+      if (11 != va_arg (ap, int))
 
4594
+        abort();
 
4595
+      break;
 
4596
+    case 2:
 
4597
+      if (2222 != va_arg (ap, int))
 
4598
+        abort();
 
4599
+      break;
 
4600
+    case 3:
 
4601
+      if (333333 != va_arg (ap, __int24))
 
4602
+        abort();
 
4603
+      break;
 
4604
+    case 4:
 
4605
+      if (44444444 != va_arg (ap, long))
 
4606
+        abort();
 
4607
+      break;
 
4608
+    case 8:
 
4609
+      if (8888888888888888 != va_arg (ap, long long))
 
4610
+        abort();
 
4611
+      break;
 
4612
+    }
 
4613
+
 
4614
+  va_end (ap);
 
4615
+}
 
4616
+
 
4617
+
 
4618
+void NC boo_qi (const __flash char *p)
 
4619
+{
 
4620
+  vfun (1, *p);
 
4621
+}
 
4622
+
 
4623
+void NC boox_qi (const __memx char *p)
 
4624
+{
 
4625
+  vfun (1, *p);
 
4626
+}
 
4627
+
 
4628
+void NC boo_hi (const __flash int *p)
 
4629
+{
 
4630
+  vfun (2, *p);
 
4631
+}
 
4632
+
 
4633
+void NC boox_hi (const __memx int *p)
 
4634
+{
 
4635
+  vfun (2, *p);
 
4636
+}
 
4637
+
 
4638
+void NC boo_psi (const __flash __int24 *p)
 
4639
+{
 
4640
+  vfun (3, *p);
 
4641
+}
 
4642
+
 
4643
+void NC boox_psi (const __memx __int24 *p)
 
4644
+{
 
4645
+  vfun (3, *p);
 
4646
+}
 
4647
+
 
4648
+void NC boo_si (const __flash long *p)
 
4649
+{
 
4650
+  vfun (4, *p);
 
4651
+}
 
4652
+
 
4653
+void NC boox_si (const __memx long *p)
 
4654
+{
 
4655
+  vfun (4, *p);
 
4656
+}
 
4657
+
 
4658
+void NC boo_di (const __flash long long *p)
 
4659
+{
 
4660
+  vfun (8, *p);
 
4661
+}
 
4662
+
 
4663
+void NC boox_di (const __memx long long *p)
 
4664
+{
 
4665
+  vfun (8, *p);
 
4666
+}
 
4667
+
 
4668
+const __flash char f_qi = 11;
 
4669
+const __flash int f_hi = 2222;
 
4670
+const __flash __int24 f_psi = 333333;
 
4671
+const __flash long f_si = 44444444;
 
4672
+const __flash long long f_di = 8888888888888888;
 
4673
+
 
4674
+const __memx char x_qi = 11;
 
4675
+const __memx int x_hi = 2222;
 
4676
+const __memx __int24 x_psi = 333333;
 
4677
+const __memx long x_si = 44444444;
 
4678
+const __memx long long x_di = 8888888888888888;
 
4679
+
 
4680
+char r_qi = 11;
 
4681
+int r_hi = 2222;
 
4682
+__int24 r_psi = 333333;
 
4683
+long r_si = 44444444;
 
4684
+long long r_di = 8888888888888888;
 
4685
+
 
4686
+int main (void)
 
4687
+{
 
4688
+  boo_qi (&f_qi);
 
4689
+  boo_hi (&f_hi);
 
4690
+  boo_psi (&f_psi);
 
4691
+  boo_si (&f_si);
 
4692
+  boo_di (&f_di);
 
4693
+
 
4694
+  boox_qi (&x_qi);
 
4695
+  boox_hi (&x_hi);
 
4696
+  boox_psi (&x_psi);
 
4697
+  boox_si (&x_si);
 
4698
+  boox_di (&x_di);
 
4699
+
 
4700
+  boox_qi (&r_qi);
 
4701
+  boox_hi (&r_hi);
 
4702
+  boox_psi (&r_psi);
 
4703
+  boox_si (&r_si);
 
4704
+  boox_di (&r_di);
 
4705
+
 
4706
+  exit (0);
 
4707
+}
 
4708
Index: gcc/testsuite/gcc.target/i386/pr61923.c
 
4709
===================================================================
 
4710
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../tags/gcc_4_8_3_release)
 
4711
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../branches/gcc-4_8-branch)
 
4712
@@ -0,0 +1,36 @@
 
4713
+/* PR debug/61923 */
 
4714
+/* { dg-do compile } */
 
4715
+/* { dg-options "-O2 -fcompare-debug" } */
 
4716
+
 
4717
+typedef struct
 
4718
+{
 
4719
+  struct
 
4720
+  {
 
4721
+    struct
 
4722
+    {
 
4723
+      char head;
 
4724
+    } tickets;
 
4725
+  };
 
4726
+} arch_spinlock_t;
 
4727
+struct ext4_map_blocks
 
4728
+{
 
4729
+  int m_lblk;
 
4730
+  int m_len;
 
4731
+  int m_flags;
 
4732
+};
 
4733
+int ext4_da_map_blocks_ei_0;
 
4734
+void fn1 (int p1, struct ext4_map_blocks *p2)
 
4735
+{
 
4736
+  int ret;
 
4737
+  if (p2->m_flags)
 
4738
+    {
 
4739
+      ext4_da_map_blocks_ei_0++;
 
4740
+      arch_spinlock_t *lock;
 
4741
+      switch (sizeof *&lock->tickets.head)
 
4742
+      case 1:
 
4743
+      asm("" : "+m"(*&lock->tickets.head) : ""(0));
 
4744
+      __asm__("");
 
4745
+      ret = 0;
 
4746
+    }
 
4747
+  fn2 (p2->m_lblk, p2->m_len);
 
4748
+}
 
4749
Index: gcc/testsuite/gcc.target/i386/pr61423.c
 
4750
===================================================================
 
4751
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../tags/gcc_4_8_3_release)
 
4752
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../branches/gcc-4_8-branch)
 
4753
@@ -0,0 +1,38 @@
 
4754
+/* PR target/61423 */
 
4755
+/* { dg-do run { target ia32 } } */
 
4756
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
 
4757
+
 
4758
+#define N 1024
 
4759
+static unsigned int A[N];
 
4760
+
 
4761
+double
 
4762
+__attribute__((noinline))
 
4763
+func (void)
 
4764
+{
 
4765
+  unsigned int sum = 0;
 
4766
+  unsigned i;
 
4767
+  double t;
 
4768
+
 
4769
+  for (i = 0; i < N; i++)
 
4770
+    sum += A[i];
 
4771
+
 
4772
+  t = sum;
 
4773
+  return t;
 
4774
+}
 
4775
+
 
4776
+int
 
4777
+main ()
 
4778
+{
 
4779
+  unsigned i;
 
4780
+  double d;
 
4781
+
 
4782
+  for(i = 0; i < N; i++)
 
4783
+    A[i] = 1;
 
4784
+
 
4785
+  d = func();
 
4786
+
 
4787
+  if (d != 1024.0)
 
4788
+    __builtin_abort ();
 
4789
+
 
4790
+  return 0;
 
4791
+}
 
4792
Index: gcc/testsuite/gcc.target/i386/pr60901.c
 
4793
===================================================================
 
4794
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../tags/gcc_4_8_3_release)
 
4795
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../branches/gcc-4_8-branch)
 
4796
@@ -0,0 +1,17 @@
 
4797
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts"  } */
 
4798
+
 
4799
+extern int n;
 
4800
+extern void bar (void);
 
4801
+extern int baz (int);
 
4802
+
 
4803
+void
 
4804
+foo (void)
 
4805
+{
 
4806
+  int i, j;
 
4807
+  for (j = 0; j < n; j++)
 
4808
+    {
 
4809
+      for (i = 1; i < j; i++)
 
4810
+       bar ();
 
4811
+      baz (0);
 
4812
+    }
 
4813
+}
 
4814
Index: gcc/testsuite/gcc.target/i386/pr61801.c
 
4815
===================================================================
 
4816
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../tags/gcc_4_8_3_release)
 
4817
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../branches/gcc-4_8-branch)
 
4818
@@ -0,0 +1,21 @@
 
4819
+/* PR rtl-optimization/61801 */
 
4820
+/* { dg-do compile } */
 
4821
+/* { dg-options "-Os -fcompare-debug" } */
 
4822
+
 
4823
+int a, c;
 
4824
+int bar (void);
 
4825
+void baz (void);
 
4826
+
 
4827
+void
 
4828
+foo (void)
 
4829
+{
 
4830
+  int d;
 
4831
+  if (bar ())
 
4832
+    {
 
4833
+      int e;
 
4834
+      baz ();
 
4835
+      asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
 
4836
+      d = e;
 
4837
+    }
 
4838
+  c = d;
 
4839
+}
 
4840
Index: gcc/testsuite/gcc.target/i386/pr61446.c
 
4841
===================================================================
 
4842
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../tags/gcc_4_8_3_release)
 
4843
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../branches/gcc-4_8-branch)
 
4844
@@ -0,0 +1,14 @@
 
4845
+/* PR rtl-optimization/61446 */
 
4846
+
 
4847
+/* { dg-do compile { target { ia32 } } } */
 
4848
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
 
4849
+
 
4850
+unsigned long long
 
4851
+foo (float a)
 
4852
+{
 
4853
+  const double dfa = a;
 
4854
+  const unsigned int hi = dfa / 0x1p32f;
 
4855
+  const unsigned int lo = dfa - (double) hi * 0x1p32f;
 
4856
+
 
4857
+  return ((unsigned long long) hi << (4 * (8))) | lo;
 
4858
+}
 
4859
Index: gcc/testsuite/gcc.target/i386/pr63947.c
 
4860
===================================================================
 
4861
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../tags/gcc_4_8_3_release)
 
4862
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../branches/gcc-4_8-branch)
 
4863
@@ -0,0 +1,9 @@
 
4864
+/* PR target/63947 */
 
4865
+/* { dg-do assemble } */
 
4866
+/* { dg-options "-Os" } */
 
4867
+/* { dg-additional-options "-march=i686" { target ia32 } } */
 
4868
+
 
4869
+long double foo (unsigned a, unsigned b)
 
4870
+{
 
4871
+  return a + b < a;
 
4872
+}
 
4873
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
 
4874
===================================================================
 
4875
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../tags/gcc_4_8_3_release)
 
4876
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../branches/gcc-4_8-branch)
 
4877
@@ -0,0 +1,50 @@
 
4878
+/* { dg-do run } */
 
4879
+/* { dg-options "-march=octeon" } */
 
4880
+
 
4881
+extern void abort (void);
 
4882
+
 
4883
+struct node
 
4884
+{
 
4885
+  struct node *next;
 
4886
+  struct node *prev;
 
4887
+};
 
4888
+
 
4889
+struct node node;
 
4890
+
 
4891
+struct head
 
4892
+{
 
4893
+  struct node *first;
 
4894
+};
 
4895
+
 
4896
+struct head heads[5];
 
4897
+
 
4898
+int k = 2;
 
4899
+
 
4900
+struct head *head = &heads[2];
 
4901
+
 
4902
+static int __attribute__((noinline))
 
4903
+foo (void)
 
4904
+{
 
4905
+  node.prev = (void *)head;
 
4906
+  head->first = &node;
 
4907
+
 
4908
+  struct node *n = head->first;
 
4909
+  struct head *h = &heads[k];
 
4910
+  struct node *next = n->next;
 
4911
+
 
4912
+  if (n->prev == (void *)h)
 
4913
+    h->first = next;
 
4914
+  else
 
4915
+    n->prev->next = next;
 
4916
+
 
4917
+  n->next = h->first;
 
4918
+  return n->next == &node;
 
4919
+}
 
4920
+
 
4921
+int
 
4922
+main (void)
 
4923
+{
 
4924
+  if (foo ())
 
4925
+    abort ();
 
4926
+  return 0;
 
4927
+}
 
4928
Index: gcc/testsuite/gcc.target/sh/pr61996.c
 
4929
===================================================================
 
4930
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
 
4931
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
 
4932
@@ -0,0 +1,12 @@
 
4933
+/* Check that the option -musermode has no effect on targets that do not
 
4934
+   support user/privileged mode and that it does not interfere with option
 
4935
+   -matomic-model=soft-imask.  */
 
4936
+/* { dg-do compile }  */
 
4937
+/* { dg-options "-matomic-model=soft-imask" }  */
 
4938
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } }  */
 
4939
+
 
4940
+int
 
4941
+test (void)
 
4942
+{
 
4943
+  return 0;
 
4944
+}
 
4945
Index: gcc/testsuite/lib/target-supports.exp
 
4946
===================================================================
 
4947
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
 
4948
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
 
4949
@@ -1790,6 +1790,15 @@
 
4950
     }]
 
4951
 }
 
4952
 
 
4953
+# Return 1 if the target supports long double of 128 bits,
 
4954
+# 0 otherwise.
 
4955
+
 
4956
+proc check_effective_target_longdouble128 { } {
 
4957
+    return [check_no_compiler_messages longdouble128 object {
 
4958
+       int dummy[sizeof(long double) == 16 ? 1 : -1];
 
4959
+    }]
 
4960
+}
 
4961
+
 
4962
 # Return 1 if the target supports double of 64 bits,
 
4963
 # 0 otherwise.
 
4964
 
 
4965
@@ -5329,3 +5338,40 @@
 
4966
        return 0
 
4967
     }
 
4968
 }
 
4969
+
 
4970
+# Return 1 if <fenv.h> is available with all the standard IEEE
 
4971
+# exceptions and floating-point exceptions are raised by arithmetic
 
4972
+# operations.  (If the target requires special options for "inexact"
 
4973
+# exceptions, those need to be specified in the testcases.)
 
4974
+
 
4975
+proc check_effective_target_fenv_exceptions {} {
 
4976
+    return [check_runtime fenv_exceptions {
 
4977
+       #include <fenv.h>
 
4978
+       #include <stdlib.h>
 
4979
+       #ifndef FE_DIVBYZERO
 
4980
+       # error Missing FE_DIVBYZERO
 
4981
+       #endif
 
4982
+       #ifndef FE_INEXACT
 
4983
+       # error Missing FE_INEXACT
 
4984
+       #endif
 
4985
+       #ifndef FE_INVALID
 
4986
+       # error Missing FE_INVALID
 
4987
+       #endif
 
4988
+       #ifndef FE_OVERFLOW
 
4989
+       # error Missing FE_OVERFLOW
 
4990
+       #endif
 
4991
+       #ifndef FE_UNDERFLOW
 
4992
+       # error Missing FE_UNDERFLOW
 
4993
+       #endif
 
4994
+       volatile float a = 0.0f, r;
 
4995
+       int
 
4996
+       main (void)
 
4997
+       {
 
4998
+         r = a / a;
 
4999
+         if (fetestexcept (FE_INVALID))
 
5000
+           exit (0);
 
5001
+         else
 
5002
+           abort ();
 
5003
+       }
 
5004
+    } "-std=gnu99"]
 
5005
+}
 
5006
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
 
5007
===================================================================
 
5008
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../tags/gcc_4_8_3_release)
 
5009
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../branches/gcc-4_8-branch)
 
5010
@@ -1,6 +1,6 @@
 
5011
 ! { dg-require-effective-target fortran_large_real }
 
5012
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
 
5013
-! Test XFAILed on these platforms because the system's printf() lacks
 
5014
+! { dg-do run { xfail powerpc*-apple-darwin* } }
 
5015
+! Test XFAILed on this platform because the system's printf() lacks
 
5016
 ! proper support for denormalized long doubles. See PR24685
 
5017
 !
 
5018
 ! This tests that the default formats for formatted I/O of reals are
 
5019
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
 
5020
===================================================================
 
5021
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../tags/gcc_4_8_3_release)
 
5022
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../branches/gcc-4_8-branch)
 
5023
@@ -0,0 +1,15 @@
 
5024
+! { dg-do compile }
 
5025
+! { dg-options "-fdump-tree-original" }
 
5026
+! PR 61999 - this used to ICE.
 
5027
+! Original test case by A. Kasahara
 
5028
+program main
 
5029
+   use, intrinsic:: iso_fortran_env, only: output_unit
 
5030
+
 
5031
+   implicit none
 
5032
+
 
5033
+   write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
 
5034
+
 
5035
+   stop
 
5036
+end program main
 
5037
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
 
5038
+! { dg-final { cleanup-tree-dump "original" } }
 
5039
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
 
5040
===================================================================
 
5041
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../tags/gcc_4_8_3_release)
 
5042
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../branches/gcc-4_8-branch)
 
5043
@@ -0,0 +1,13 @@
 
5044
+! PR fortran/59488
 
5045
+! { dg-do compile }
 
5046
+! { dg-options "-fopenmp" }
 
5047
+
 
5048
+  implicit none
 
5049
+  integer, parameter :: p(2) = (/ 11, 12 /)
 
5050
+  integer :: r
 
5051
+
 
5052
+  !$omp parallel do default(none)
 
5053
+  do r = 1, 2
 
5054
+    print *, p(r)
 
5055
+  end do
 
5056
+end
 
5057
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
 
5058
===================================================================
 
5059
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../tags/gcc_4_8_3_release)
 
5060
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../branches/gcc-4_8-branch)
 
5061
@@ -0,0 +1,16 @@
 
5062
+! PR fortran/59488
 
5063
+! { dg-do compile }
 
5064
+! { dg-options "-fopenmp" }
 
5065
+
 
5066
+  implicit none
 
5067
+  type t
 
5068
+    integer :: s1, s2, s3
 
5069
+  end type
 
5070
+  integer :: r
 
5071
+  type(t), parameter :: u = t(1, 2, 3)
 
5072
+
 
5073
+  !$omp parallel do default(none)
 
5074
+  do r = 1, 2
 
5075
+    print *, u
 
5076
+  end do
 
5077
+end
 
5078
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
 
5079
===================================================================
 
5080
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../tags/gcc_4_8_3_release)
 
5081
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../branches/gcc-4_8-branch)
 
5082
@@ -0,0 +1,18 @@
 
5083
+! { dg-do run }
 
5084
+! { dg-options "-fcray-pointer" }
 
5085
+!
 
5086
+! PR fortran/45187
 
5087
+!
 
5088
+module foo
 
5089
+  implicit none
 
5090
+  real :: a
 
5091
+  pointer(c_a, a)
 
5092
+end module foo
 
5093
+
 
5094
+program test
 
5095
+  use foo
 
5096
+  real :: z
 
5097
+  c_a = loc(z)
 
5098
+  a = 42
 
5099
+  if (z /= 42) call abort
 
5100
+end program test
 
5101
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
 
5102
===================================================================
 
5103
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../tags/gcc_4_8_3_release)
 
5104
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../branches/gcc-4_8-branch)
 
5105
@@ -0,0 +1,36 @@
 
5106
+! { dg-do run }
 
5107
+! Tests fix for PR61780 in which the loop reversal mechanism was
 
5108
+! not accounting for the first index being an element so that no
 
5109
+! loop in this dimension is created.
 
5110
+!
 
5111
+! Contributed by Manfred Tietze on clf.
 
5112
+!
 
5113
+program prgm3
 
5114
+    implicit none
 
5115
+    integer, parameter :: n = 10, k = 3
 
5116
+    integer :: i, j
 
5117
+    integer, dimension(n,n) :: y
 
5118
+    integer :: res1(n), res2(n)
 
5119
+
 
5120
+1   format(10i5)
 
5121
+
 
5122
+!initialize
 
5123
+    do i=1,n
 
5124
+        do j=1,n
 
5125
+            y(i,j) = n*i + j
 
5126
+        end do
 
5127
+    end do
 
5128
+    res2 = y(k,:)
 
5129
+
 
5130
+!shift right
 
5131
+    y(k,4:n) = y(k,3:n-1)
 
5132
+    y(k,3) = 0
 
5133
+    res1 = y(k,:)
 
5134
+    y(k,:) = res2
 
5135
+    y(k,n:4:-1) = y(k,n-1:3:-1)
 
5136
+    y(k,3) = 0
 
5137
+    res2 = y(k,:)
 
5138
+!    print *, res1
 
5139
+!    print *, res2
 
5140
+    if (any(res1 /= res2)) call abort ()
 
5141
+end program prgm3
 
5142
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
 
5143
===================================================================
 
5144
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../tags/gcc_4_8_3_release)
 
5145
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../branches/gcc-4_8-branch)
 
5146
@@ -0,0 +1,8 @@
 
5147
+C { dg-do compile }
 
5148
+      TYPE T
 
5149
+      INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
 
5150
+      END TYPE
 
5151
+      TYPE S
 
5152
+      INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
 
5153
+      END TYPE
 
5154
+      END
 
5155
Index: gcc/testsuite/gfortran.dg/nint_2.f90
 
5156
===================================================================
 
5157
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../tags/gcc_4_8_3_release)
 
5158
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../branches/gcc-4_8-branch)
 
5159
@@ -4,7 +4,8 @@
 
5160
 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
 
5161
 !
 
5162
 ! { dg-do run }
 
5163
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
5164
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
5165
+! Note that this doesn't fail on powerpc64le-*-linux*.
 
5166
   real(kind=8) :: a
 
5167
   integer(kind=8) :: i1, i2
 
5168
   real :: b
 
5169
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
 
5170
===================================================================
 
5171
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../tags/gcc_4_8_3_release)
 
5172
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../branches/gcc-4_8-branch)
 
5173
@@ -23,7 +23,7 @@
 
5174
     call bar2 (c)
 
5175
     call bar3 (c)
 
5176
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
5177
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
5178
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
 
5179
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
5180
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
5181
   end subroutine
 
5182
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
 
5183
===================================================================
 
5184
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../tags/gcc_4_8_3_release)
 
5185
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../branches/gcc-4_8-branch)
 
5186
@@ -0,0 +1,16 @@
 
5187
+! { dg-do run }
 
5188
+! { dg-options "-ffrontend-optimize" }
 
5189
+! PR 62214 - this used to give the wrong result.
 
5190
+! Original test case by Oliver Fuhrer
 
5191
+PROGRAM test
 
5192
+  IMPLICIT NONE
 
5193
+  CHARACTER(LEN=20)   :: fullNames(2)
 
5194
+  CHARACTER(LEN=255)  :: pathName
 
5195
+  CHARACTER(LEN=5)    :: fileNames(2)
 
5196
+  
 
5197
+  pathName = "/dir1/dir2/"
 
5198
+  fileNames = (/ "file1", "file2" /)
 
5199
+  fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
 
5200
+  if (fullNames(1) /= '/dir1/dir2/file1' .or. &
 
5201
+       & fullnames(2) /= '/dir1/dir2/file2') call abort
 
5202
+END PROGRAM test
 
5203
Index: gcc/testsuite/gfortran.dg/pr45636.f90
 
5204
===================================================================
 
5205
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
 
5206
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
 
5207
@@ -10,5 +10,5 @@
 
5208
   b = y
 
5209
   call sub(a, b)
 
5210
 end program main
 
5211
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
 
5212
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
 
5213
 ! { dg-final { cleanup-tree-dump "forwprop2" } }
 
5214
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
 
5215
===================================================================
 
5216
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../tags/gcc_4_8_3_release)
 
5217
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../branches/gcc-4_8-branch)
 
5218
@@ -0,0 +1,47 @@
 
5219
+! { dg-do run }
 
5220
+! Test the fix for PR61459.
 
5221
+!
 
5222
+! Contributed by John Wingate  <johnww@tds.net>
 
5223
+!
 
5224
+module a
 
5225
+
 
5226
+   implicit none
 
5227
+   private
 
5228
+   public :: f_segfault, f_segfault_plus, f_workaround
 
5229
+   integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
 
5230
+
 
5231
+contains
 
5232
+
 
5233
+   function f_segfault(x)
 
5234
+      real, dimension(:), allocatable :: f_segfault
 
5235
+      real, dimension(:), intent(in)  :: x
 
5236
+      allocate(f_segfault(2))
 
5237
+      f_segfault = matmul(b,x)
 
5238
+   end function f_segfault
 
5239
+
 
5240
+! Sefaulted without the ALLOCATE as well.
 
5241
+   function f_segfault_plus(x)
 
5242
+      real, dimension(:), allocatable :: f_segfault_plus
 
5243
+      real, dimension(:), intent(in)  :: x
 
5244
+      f_segfault_plus = matmul(b,x)
 
5245
+   end function f_segfault_plus
 
5246
+
 
5247
+   function f_workaround(x)
 
5248
+      real, dimension(:), allocatable :: f_workaround
 
5249
+      real, dimension(:), intent(in)  :: x
 
5250
+      real, dimension(:), allocatable :: tmp
 
5251
+      allocate(f_workaround(2),tmp(2))
 
5252
+      tmp = matmul(b,x)
 
5253
+      f_workaround = tmp
 
5254
+   end function f_workaround
 
5255
+
 
5256
+end module a
 
5257
+
 
5258
+program main
 
5259
+   use a
 
5260
+   implicit none
 
5261
+   real, dimension(2) :: x = 1.0, y
 
5262
+   y = f_workaround (x)
 
5263
+   if (any (f_segfault (x) .ne. y)) call abort
 
5264
+   if (any (f_segfault_plus (x) .ne. y)) call abort
 
5265
+end program main
 
5266
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
 
5267
===================================================================
 
5268
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../tags/gcc_4_8_3_release)
 
5269
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../branches/gcc-4_8-branch)
 
5270
@@ -16,7 +16,7 @@
 
5271
 implicit none
 
5272
 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] 
 
5273
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
 
5274
-                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
 
5275
+                  * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
 
5276
 ! The following is sufficient for me - the values above are a bit
 
5277
 ! more tolerant
 
5278
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
 
5279
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
 
5280
===================================================================
 
5281
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
 
5282
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
 
5283
@@ -0,0 +1,29 @@
 
5284
+/* PR rtl-optimization/63659 */
 
5285
+
 
5286
+int a, b, c, *d = &b, g, h, i;
 
5287
+unsigned char e;
 
5288
+char f;
 
5289
+
 
5290
+int
 
5291
+main ()
 
5292
+{
 
5293
+  while (a)
 
5294
+    {
 
5295
+      for (a = 0; a; a++)
 
5296
+       for (; c; c++)
 
5297
+         ;
 
5298
+      if (i)
 
5299
+       break;
 
5300
+    }
 
5301
+
 
5302
+  char j = c, k = -1, l;
 
5303
+  l = g = j >> h;
 
5304
+  f = l == 0 ? k : k % l;
 
5305
+  e = 0 ? 0 : f;
 
5306
+  *d = e;
 
5307
+
 
5308
+  if (b != 255)
 
5309
+    __builtin_abort ();
 
5310
+
 
5311
+  return 0;
 
5312
+}
 
5313
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
 
5314
===================================================================
 
5315
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../tags/gcc_4_8_3_release)
 
5316
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../branches/gcc-4_8-branch)
 
5317
@@ -0,0 +1,39 @@
 
5318
+#ifdef __INT32_TYPE__
 
5319
+typedef __INT32_TYPE__ int32_t;
 
5320
+#else
 
5321
+typedef int int32_t;
 
5322
+#endif
 
5323
+
 
5324
+#ifdef __UINT32_TYPE__
 
5325
+typedef __UINT32_TYPE__ uint32_t;
 
5326
+#else
 
5327
+typedef unsigned uint32_t;
 
5328
+#endif
 
5329
+
 
5330
+#define __fake_const_swab32(x) ((uint32_t)(                  \
 
5331
+       (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |    \
 
5332
+       (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |    \
 
5333
+       (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |    \
 
5334
+       (( (int32_t)(x) &  (int32_t)0xff000000UL) >> 24)))
 
5335
+
 
5336
+/* Previous version of bswap optimization failed to consider sign extension
 
5337
+   and as a result would replace an expression *not* doing a bswap by a
 
5338
+   bswap.  */
 
5339
+
 
5340
+__attribute__ ((noinline, noclone)) uint32_t
 
5341
+fake_bswap32 (uint32_t in)
 
5342
+{
 
5343
+  return __fake_const_swab32 (in);
 
5344
+}
 
5345
+
 
5346
+int
 
5347
+main(void)
 
5348
+{
 
5349
+  if (sizeof (int32_t) * __CHAR_BIT__ != 32)
 
5350
+    return 0;
 
5351
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
5352
+    return 0;
 
5353
+  if (fake_bswap32 (0x87654321) != 0xffffff87)
 
5354
+    __builtin_abort ();
 
5355
+  return 0;
 
5356
+}
 
5357
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
 
5358
===================================================================
 
5359
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
 
5360
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
 
5361
@@ -0,0 +1,2 @@
 
5362
+set additional_flags "-Wno-psabi"
 
5363
+return 0
 
5364
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
 
5365
===================================================================
 
5366
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../tags/gcc_4_8_3_release)
 
5367
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../branches/gcc-4_8-branch)
 
5368
@@ -0,0 +1,23 @@
 
5369
+union U
 
5370
+{
 
5371
+  const int a;
 
5372
+  unsigned b : 20;
 
5373
+};
 
5374
+
 
5375
+static union U u = { 0x12345678 };
 
5376
+
 
5377
+/* Constant folding used to fail to account for endianness when folding a
 
5378
+   union.  */
 
5379
+
 
5380
+int
 
5381
+main (void)
 
5382
+{
 
5383
+#ifdef __BYTE_ORDER__
 
5384
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
5385
+  return u.b - 0x45678;
 
5386
+#else
 
5387
+  return u.b - 0x12345;
 
5388
+#endif
 
5389
+#endif
 
5390
+  return 0;
 
5391
+}
 
5392
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
 
5393
===================================================================
 
5394
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../tags/gcc_4_8_3_release)
 
5395
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../branches/gcc-4_8-branch)
 
5396
@@ -0,0 +1,13 @@
 
5397
+short a = -1;
 
5398
+int b;
 
5399
+char c;
 
5400
+
 
5401
+int
 
5402
+main ()
 
5403
+{
 
5404
+  c = a;
 
5405
+  b = a | c;
 
5406
+  if (b != -1)
 
5407
+    __builtin_abort ();
 
5408
+  return 0;
 
5409
+}
 
5410
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
 
5411
===================================================================
 
5412
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../tags/gcc_4_8_3_release)
 
5413
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../branches/gcc-4_8-branch)
 
5414
@@ -6,4 +6,5 @@
 
5415
        set additional_flags "-mno-mmx"
 
5416
 }
 
5417
 
 
5418
+set additional_flags "-Wno-psabi"
 
5419
 return 0
 
5420
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
 
5421
===================================================================
 
5422
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../tags/gcc_4_8_3_release)
 
5423
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../branches/gcc-4_8-branch)
 
5424
@@ -0,0 +1,40 @@
 
5425
+#ifdef __INT16_TYPE__
 
5426
+typedef __INT16_TYPE__ int16_t;
 
5427
+#else
 
5428
+typedef short int16_t;
 
5429
+#endif
 
5430
+
 
5431
+#ifdef __UINT32_TYPE__
 
5432
+typedef __UINT32_TYPE__ uint32_t;
 
5433
+#else
 
5434
+typedef unsigned uint32_t;
 
5435
+#endif
 
5436
+
 
5437
+#define __fake_const_swab32(x) ((uint32_t)(                          \
 
5438
+       (((uint32_t)         (x) & (uint32_t)0x000000ffUL) << 24) |   \
 
5439
+       (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) <<  8) |   \
 
5440
+       (((uint32_t)         (x) & (uint32_t)0x00ff0000UL) >>  8) |   \
 
5441
+       (((uint32_t)         (x) & (uint32_t)0xff000000UL) >> 24)))
 
5442
+
 
5443
+
 
5444
+/* Previous version of bswap optimization failed to consider sign extension
 
5445
+   and as a result would replace an expression *not* doing a bswap by a
 
5446
+   bswap.  */
 
5447
+
 
5448
+__attribute__ ((noinline, noclone)) uint32_t
 
5449
+fake_bswap32 (uint32_t in)
 
5450
+{
 
5451
+  return __fake_const_swab32 (in);
 
5452
+}
 
5453
+
 
5454
+int
 
5455
+main(void)
 
5456
+{
 
5457
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
5458
+    return 0;
 
5459
+  if (sizeof (int16_t) * __CHAR_BIT__ != 16)
 
5460
+    return 0;
 
5461
+  if (fake_bswap32 (0x81828384) != 0xff838281)
 
5462
+    __builtin_abort ();
 
5463
+  return 0;
 
5464
+}
 
5465
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
 
5466
===================================================================
 
5467
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
 
5468
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
 
5469
@@ -0,0 +1,35 @@
 
5470
+#ifdef __UINT64_TYPE__
 
5471
+typedef __UINT64_TYPE__ uint64_t;
 
5472
+#else
 
5473
+typedef unsigned long long uint64_t;
 
5474
+#endif
 
5475
+
 
5476
+#ifndef __SIZEOF_INT128__
 
5477
+#define __int128 long long
 
5478
+#endif
 
5479
+
 
5480
+/* Some version of bswap optimization would ICE when analyzing a mask constant
 
5481
+   too big for an HOST_WIDE_INT (PR61375).  */
 
5482
+
 
5483
+__attribute__ ((noinline, noclone)) uint64_t
 
5484
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
 
5485
+{
 
5486
+  __int128 mask = (__int128)0xffff << 56;
 
5487
+  return ((in1 & mask) >> 56) | in2;
 
5488
+}
 
5489
+
 
5490
+int
 
5491
+main (int argc)
 
5492
+{
 
5493
+  __int128 in = 1;
 
5494
+#ifdef __SIZEOF_INT128__
 
5495
+  in <<= 64;
 
5496
+#endif
 
5497
+  if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
 
5498
+    return 0;
 
5499
+  if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
 
5500
+    return 0;
 
5501
+  if (uint128_central_bitsi_ior (in, 2) != 0x102)
 
5502
+    __builtin_abort ();
 
5503
+  return 0;
 
5504
+}
 
5505
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
 
5506
===================================================================
 
5507
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../tags/gcc_4_8_3_release)
 
5508
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../branches/gcc-4_8-branch)
 
5509
@@ -4,4 +4,5 @@
 
5510
        return 1
 
5511
 }
 
5512
 
 
5513
+set additional_flags "-Wno-psabi"
 
5514
 return 0;
 
5515
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
 
5516
===================================================================
 
5517
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../tags/gcc_4_8_3_release)
 
5518
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../branches/gcc-4_8-branch)
 
5519
@@ -0,0 +1,2 @@
 
5520
+set additional_flags "-Wno-psabi"
 
5521
+return 0
 
5522
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
 
5523
===================================================================
 
5524
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
 
5525
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
 
5526
@@ -0,0 +1,15 @@
 
5527
+/* PR tree-optimization/61684 */
 
5528
+
 
5529
+int a, c;
 
5530
+static int *b = 0;
 
5531
+short d;
 
5532
+static short **e = 0;
 
5533
+
 
5534
+void
 
5535
+foo ()
 
5536
+{
 
5537
+  for (; c < 1; c++)
 
5538
+    ;
 
5539
+  *e = &d;
 
5540
+  a = d && (c && 1) & *b;
 
5541
+}
 
5542
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
 
5543
===================================================================
 
5544
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
 
5545
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
 
5546
@@ -0,0 +1,10 @@
 
5547
+/* PR middle-end/64067 */
 
5548
+
 
5549
+struct S { int s; };
 
5550
+int *const v[1] = { &((struct S) { .s = 42 }).s };
 
5551
+
 
5552
+int *
 
5553
+foo (void)
 
5554
+{
 
5555
+  return v[0];
 
5556
+}
 
5557
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
 
5558
===================================================================
 
5559
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
 
5560
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
 
5561
@@ -0,0 +1,13 @@
 
5562
+/* PR inline-asm/63282 */
 
5563
+
 
5564
+void bar (void);
 
5565
+
 
5566
+void
 
5567
+foo (void)
 
5568
+{
 
5569
+  asm volatile goto ("" : : : : a, b);
 
5570
+a:
 
5571
+  bar ();
 
5572
+b:
 
5573
+  return;
 
5574
+}
 
5575
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
 
5576
===================================================================
 
5577
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../tags/gcc_4_8_3_release)
 
5578
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../branches/gcc-4_8-branch)
 
5579
@@ -0,0 +1,53 @@
 
5580
+with Ada.Streams; use Ada.Streams;
 
5581
+
 
5582
+package body Opt41_Pkg is
 
5583
+
 
5584
+   type Wstream is new Root_Stream_Type with record
 
5585
+      S : Unbounded_String;
 
5586
+   end record;
 
5587
+
 
5588
+   procedure Read (Stream : in out Wstream;
 
5589
+                   Item   : out Stream_Element_Array;
 
5590
+                   Last   : out Stream_Element_Offset) is null;
 
5591
+
 
5592
+   procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
 
5593
+   begin
 
5594
+      for J in Item'Range loop
 
5595
+         Append (Stream.S, Character'Val (Item (J)));
 
5596
+      end loop;
 
5597
+   end Write;
 
5598
+
 
5599
+   function Rec_Write (R : Rec) return Unbounded_String is
 
5600
+      S : aliased Wstream;
 
5601
+   begin
 
5602
+      Rec'Output (S'Access, R);
 
5603
+      return S.S;
 
5604
+   end Rec_Write;
 
5605
+
 
5606
+   type Rstream is new Root_Stream_Type with record
 
5607
+      S   : String_Access;
 
5608
+      Idx : Integer := 1;
 
5609
+   end record;
 
5610
+
 
5611
+   procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
 
5612
+
 
5613
+   procedure Read (Stream : in out Rstream;
 
5614
+                   Item   : out Stream_Element_Array;
 
5615
+                   Last   : out Stream_Element_Offset) is
 
5616
+   begin
 
5617
+      Last := Stream_Element_Offset'Min
 
5618
+         (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
 
5619
+      for I in Item'First .. Last loop
 
5620
+         Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
 
5621
+         Stream.Idx := Stream.Idx + 1;
 
5622
+      end loop;
 
5623
+   end Read;
 
5624
+
 
5625
+   function Rec_Read (Str : String_Access) return Rec is
 
5626
+      S : aliased Rstream;
 
5627
+   begin
 
5628
+      S.S := Str;
 
5629
+      return Rec'Input (S'Access);
 
5630
+   end Rec_Read;
 
5631
+
 
5632
+end Opt41_Pkg;
 
5633
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
 
5634
===================================================================
 
5635
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../tags/gcc_4_8_3_release)
 
5636
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../branches/gcc-4_8-branch)
 
5637
@@ -0,0 +1,28 @@
 
5638
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
5639
+
 
5640
+package Opt41_Pkg is
 
5641
+
 
5642
+   type Enum is (One, Two, Three, Four, Five, Six);
 
5643
+
 
5644
+   type Rec (D : Enum) is record
 
5645
+      case D is
 
5646
+         when One => 
 
5647
+            I : Integer;
 
5648
+         when Two | Five | Six =>
 
5649
+            S : Unbounded_String;
 
5650
+            case D is
 
5651
+               when Two => B : Boolean;
 
5652
+               when others => null;
 
5653
+            end case;
 
5654
+         when others =>
 
5655
+            null;
 
5656
+      end case;
 
5657
+   end record;
 
5658
+
 
5659
+   type Rec_Ptr is access all Rec;
 
5660
+
 
5661
+   function Rec_Write (R : Rec) return Unbounded_String;
 
5662
+
 
5663
+   function Rec_Read (Str : String_Access) return Rec;
 
5664
+
 
5665
+end Opt41_Pkg;
 
5666
Index: gcc/testsuite/gnat.dg/opt39.adb
 
5667
===================================================================
 
5668
--- a/src/gcc/testsuite/gnat.dg/opt39.adb       (.../tags/gcc_4_8_3_release)
 
5669
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb       (.../branches/gcc-4_8-branch)
 
5670
@@ -0,0 +1,31 @@
 
5671
+-- { dg-do compile }
 
5672
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
 
5673
+
 
5674
+procedure Opt39 (I : Integer) is
 
5675
+
 
5676
+  type Rec is record
 
5677
+    I1 : Integer;
 
5678
+    I2 : Integer;
 
5679
+    I3 : Integer;
 
5680
+    I4 : Integer;
 
5681
+    I5 : Integer;
 
5682
+  end record;
 
5683
+
 
5684
+  procedure Set (A : access Rec; I : Integer) is
 
5685
+    Tmp : Rec := A.all;
 
5686
+  begin
 
5687
+    Tmp.I1 := I;
 
5688
+    A.all := Tmp;
 
5689
+  end;
 
5690
+
 
5691
+  R : aliased Rec;
 
5692
+
 
5693
+begin
 
5694
+  Set (R'Access, I);
 
5695
+  if R.I1 /= I then
 
5696
+    raise Program_Error;
 
5697
+  end if;
 
5698
+end;
 
5699
+
 
5700
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
 
5701
+-- { dg-final { cleanup-tree-dump "optimized" } }
 
5702
Index: gcc/testsuite/gnat.dg/opt41.adb
 
5703
===================================================================
 
5704
--- a/src/gcc/testsuite/gnat.dg/opt41.adb       (.../tags/gcc_4_8_3_release)
 
5705
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb       (.../branches/gcc-4_8-branch)
 
5706
@@ -0,0 +1,15 @@
 
5707
+-- { dg-do run }
 
5708
+-- { dg-options "-Os" }
 
5709
+
 
5710
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
5711
+with Opt41_Pkg;             use Opt41_Pkg;
 
5712
+
 
5713
+procedure Opt41 is
 
5714
+   R  : Rec := (Five, To_Unbounded_String ("CONFIG"));
 
5715
+   SP : String_Access := new String'(To_String (Rec_Write (R)));
 
5716
+   RP : Rec_Ptr := new Rec'(Rec_Read (SP));
 
5717
+begin
 
5718
+   if RP.D /= R.D then
 
5719
+      raise Program_Error;
 
5720
+   end if;
 
5721
+end;
 
5722
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
 
5723
===================================================================
 
5724
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../tags/gcc_4_8_3_release)
 
5725
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../branches/gcc-4_8-branch)
 
5726
@@ -0,0 +1,19 @@
 
5727
+-- { dg-do run }
 
5728
+-- { dg-options "-gnato -O" }
 
5729
+
 
5730
+procedure Overflow_Fixed is
 
5731
+
 
5732
+  type Unsigned_8_Bit is mod 2**8;
 
5733
+
 
5734
+  procedure Fixed_To_Eight (Value : Duration) is
 
5735
+    Item : Unsigned_8_Bit;
 
5736
+  begin
 
5737
+    Item := Unsigned_8_Bit(Value);
 
5738
+    raise Program_Error;
 
5739
+  exception
 
5740
+    when Constraint_Error => null; -- expected case
 
5741
+  end;
 
5742
+
 
5743
+begin
 
5744
+  Fixed_To_Eight (-0.5);
 
5745
+end;
 
5746
Index: gcc/testsuite/gnat.dg/aliasing1.adb
 
5747
===================================================================
 
5748
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../tags/gcc_4_8_3_release)
 
5749
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../branches/gcc-4_8-branch)
 
5750
@@ -18,5 +18,5 @@
 
5751
 
 
5752
 end Aliasing1;
 
5753
 
 
5754
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
 
5755
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
 
5756
 -- { dg-final { cleanup-tree-dump "optimized" } }
 
5757
Index: gcc/testsuite/gcc.dg/pr60866.c
 
5758
===================================================================
 
5759
--- a/src/gcc/testsuite/gcc.dg/pr60866.c        (.../tags/gcc_4_8_3_release)
 
5760
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c        (.../branches/gcc-4_8-branch)
 
5761
@@ -0,0 +1,18 @@
 
5762
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
 
5763
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns"  } */
 
5764
+
 
5765
+int n;
 
5766
+
 
5767
+void
 
5768
+foo (int w, int **dnroot, int **dn)
 
5769
+{
 
5770
+  int *child;
 
5771
+  int *xchild = xchild;
 
5772
+  for (; w < n; w++)
 
5773
+    if (!dnroot)
 
5774
+      {
 
5775
+       dnroot = dn;
 
5776
+       for (child = *dn; child; child = xchild)
 
5777
+         ;
 
5778
+      }
 
5779
+}
 
5780
Index: gcc/testsuite/gcc.dg/pr51879-12.c
 
5781
===================================================================
 
5782
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../tags/gcc_4_8_3_release)
 
5783
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../branches/gcc-4_8-branch)
 
5784
@@ -24,6 +24,6 @@
 
5785
   baz (a);
 
5786
 }
 
5787
 
 
5788
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
 
5789
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
 
5790
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
 
5791
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
 
5792
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
5793
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
 
5794
===================================================================
 
5795
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../tags/gcc_4_8_3_release)
 
5796
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../branches/gcc-4_8-branch)
 
5797
@@ -1,4 +1,5 @@
 
5798
 /* { dg-do compile } */
 
5799
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5800
 #include <altivec.h>
 
5801
 typedef const volatile unsigned int _1;
 
5802
 typedef const  unsigned int _2;
 
5803
Index: gcc/testsuite/gcc.dg/vmx/ops.c
 
5804
===================================================================
 
5805
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../tags/gcc_4_8_3_release)
 
5806
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../branches/gcc-4_8-branch)
 
5807
@@ -1,4 +1,5 @@
 
5808
 /* { dg-do compile } */
 
5809
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5810
 #include <altivec.h>
 
5811
 #include <stdlib.h>
 
5812
 extern char * *var_char_ptr;
 
5813
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
 
5814
===================================================================
 
5815
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
 
5816
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
 
5817
@@ -1,4 +1,5 @@
 
5818
 /* { dg-do compile } */
 
5819
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5820
 
 
5821
 /* Checks from the original ops.c that pass pointers to long or
 
5822
    unsigned long for operations that support that in released versions
 
5823
Index: gcc/testsuite/gcc.dg/pr63665.c
 
5824
===================================================================
 
5825
--- a/src/gcc/testsuite/gcc.dg/pr63665.c        (.../tags/gcc_4_8_3_release)
 
5826
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c        (.../branches/gcc-4_8-branch)
 
5827
@@ -0,0 +1,18 @@
 
5828
+/* { dg-do run } */
 
5829
+/* { dg-require-effective-target int32plus } */
 
5830
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
 
5831
+
 
5832
+static inline int
 
5833
+test5 (int x)
 
5834
+{
 
5835
+  int y = 0x80000000;
 
5836
+  return x + y;
 
5837
+}
 
5838
+
 
5839
+int
 
5840
+main ()
 
5841
+{
 
5842
+  if (test5 (0x80000000) != 0)
 
5843
+    __builtin_abort ();
 
5844
+  return 0;
 
5845
+}
 
5846
Index: gcc/testsuite/gcc.dg/pr63342.c
 
5847
===================================================================
 
5848
--- a/src/gcc/testsuite/gcc.dg/pr63342.c        (.../tags/gcc_4_8_3_release)
 
5849
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c        (.../branches/gcc-4_8-branch)
 
5850
@@ -0,0 +1,26 @@
 
5851
+/* PR debug/63342 */
 
5852
+/* { dg-do compile } */
 
5853
+/* { dg-options "-g -O2" } */
 
5854
+/* { dg-additional-options "-fpic" { target fpic } } */
 
5855
+
 
5856
+static __thread double u[9], v[9];
 
5857
+
 
5858
+void
 
5859
+foo (double **p, double **q)
 
5860
+{
 
5861
+  *p = u;
 
5862
+  *q = v;
 
5863
+}
 
5864
+
 
5865
+double
 
5866
+bar (double x)
 
5867
+{
 
5868
+  int i;
 
5869
+  double s = 0.0;
 
5870
+  for (i = 0; i < 9; i++)
 
5871
+    {
 
5872
+      double a = x + v[i];
 
5873
+      s += u[i] * a * a;
 
5874
+    }
 
5875
+  return s;
 
5876
+}
 
5877
Index: gcc/testsuite/gcc.dg/pr63284.c
 
5878
===================================================================
 
5879
--- a/src/gcc/testsuite/gcc.dg/pr63284.c        (.../tags/gcc_4_8_3_release)
 
5880
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c        (.../branches/gcc-4_8-branch)
 
5881
@@ -0,0 +1,42 @@
 
5882
+/* PR debug/63284 */
 
5883
+/* { dg-do compile } */
 
5884
+/* { dg-options "-O2 -fcompare-debug" } */
 
5885
+
 
5886
+int a[10], *b, *d, c, f;
 
5887
+int fn2 (void);
 
5888
+void fn3 (void);
 
5889
+void fn4 (int);
 
5890
+
 
5891
+static int
 
5892
+fn1 (int x)
 
5893
+{
 
5894
+  int e = a[0];
 
5895
+  if (e)
 
5896
+    return 1;
 
5897
+  if (b)
 
5898
+    switch (x)
 
5899
+      {
 
5900
+      case 1:
 
5901
+        if (d)
 
5902
+          e = fn2 ();
 
5903
+        else
 
5904
+          fn3 ();
 
5905
+        break;
 
5906
+      case 0:
 
5907
+        if (d)
 
5908
+          {
 
5909
+            fn3 ();
 
5910
+            if (c)
 
5911
+              fn4 (1);
 
5912
+          }
 
5913
+        else
 
5914
+          fn4 (0);
 
5915
+      }
 
5916
+  return e;
 
5917
+}
 
5918
+
 
5919
+void
 
5920
+fn6 (void)
 
5921
+{
 
5922
+  f = fn1 (0);
 
5923
+}
 
5924
Index: gcc/testsuite/gcc.dg/pr61045.c
 
5925
===================================================================
 
5926
--- a/src/gcc/testsuite/gcc.dg/pr61045.c        (.../tags/gcc_4_8_3_release)
 
5927
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c        (.../branches/gcc-4_8-branch)
 
5928
@@ -0,0 +1,12 @@
 
5929
+/* { dg-do run } */
 
5930
+/* { dg-options "-fstrict-overflow" } */
 
5931
+
 
5932
+int main ()
 
5933
+{
 
5934
+  int a = 0;
 
5935
+  int b = __INT_MAX__;
 
5936
+  int t = (a - 2) > (b - 1);
 
5937
+  if (t != 0)
 
5938
+    __builtin_abort();
 
5939
+  return 0;
 
5940
+}
 
5941
Index: gcc/testsuite/gcc.dg/pr62167-run.c
 
5942
===================================================================
 
5943
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../tags/gcc_4_8_3_release)
 
5944
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../branches/gcc-4_8-branch)
 
5945
@@ -0,0 +1,47 @@
 
5946
+/* { dg-do run } */
 
5947
+/* { dg-options "-O2 -ftree-tail-merge" } */
 
5948
+
 
5949
+struct node
 
5950
+{
 
5951
+  struct node *next;
 
5952
+  struct node *prev;
 
5953
+};
 
5954
+
 
5955
+struct node node;
 
5956
+
 
5957
+struct head
 
5958
+{
 
5959
+  struct node *first;
 
5960
+};
 
5961
+
 
5962
+struct head heads[5];
 
5963
+
 
5964
+int k = 2;
 
5965
+
 
5966
+struct head *head = &heads[2];
 
5967
+
 
5968
+int
 
5969
+main ()
 
5970
+{
 
5971
+  struct node *p;
 
5972
+
 
5973
+  node.next = (void*)0;
 
5974
+
 
5975
+  node.prev = (void *)head;
 
5976
+
 
5977
+  head->first = &node;
 
5978
+
 
5979
+  struct node *n = head->first;
 
5980
+
 
5981
+  struct head *h = &heads[k];
 
5982
+
 
5983
+  heads[2].first = n->next;
 
5984
+
 
5985
+  if ((void*)n->prev == (void *)h)
 
5986
+    p = h->first;
 
5987
+  else
 
5988
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5989
+    p = n->prev->next;
 
5990
+
 
5991
+  return !(p == (void*)0);
 
5992
+}
 
5993
Index: gcc/testsuite/gcc.dg/pr52769.c
 
5994
===================================================================
 
5995
--- a/src/gcc/testsuite/gcc.dg/pr52769.c        (.../tags/gcc_4_8_3_release)
 
5996
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c        (.../branches/gcc-4_8-branch)
 
5997
@@ -0,0 +1,24 @@
 
5998
+/* PR c/52769 */
 
5999
+/* { dg-do run } */
 
6000
+/* { dg-options "-O3" } */
 
6001
+
 
6002
+typedef struct
 
6003
+{
 
6004
+  int should_be_zero;
 
6005
+  char s[6];
 
6006
+  int x;
 
6007
+} foo_t;
 
6008
+
 
6009
+int
 
6010
+main (void)
 
6011
+{
 
6012
+  volatile foo_t foo = {
 
6013
+    .s = "123456",
 
6014
+    .x = 2
 
6015
+  };
 
6016
+
 
6017
+  if (foo.should_be_zero != 0)
 
6018
+    __builtin_abort ();
 
6019
+
 
6020
+  return 0;
 
6021
+}
 
6022
Index: gcc/testsuite/gcc.dg/pr62167.c
 
6023
===================================================================
 
6024
--- a/src/gcc/testsuite/gcc.dg/pr62167.c        (.../tags/gcc_4_8_3_release)
 
6025
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c        (.../branches/gcc-4_8-branch)
 
6026
@@ -0,0 +1,50 @@
 
6027
+/* { dg-do compile } */
 
6028
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
 
6029
+
 
6030
+struct node
 
6031
+{
 
6032
+  struct node *next;
 
6033
+  struct node *prev;
 
6034
+};
 
6035
+
 
6036
+struct node node;
 
6037
+
 
6038
+struct head
 
6039
+{
 
6040
+  struct node *first;
 
6041
+};
 
6042
+
 
6043
+struct head heads[5];
 
6044
+
 
6045
+int k = 2;
 
6046
+
 
6047
+struct head *head = &heads[2];
 
6048
+
 
6049
+int
 
6050
+main ()
 
6051
+{
 
6052
+  struct node *p;
 
6053
+
 
6054
+  node.next = (void*)0;
 
6055
+
 
6056
+  node.prev = (void *)head;
 
6057
+
 
6058
+  head->first = &node;
 
6059
+
 
6060
+  struct node *n = head->first;
 
6061
+
 
6062
+  struct head *h = &heads[k];
 
6063
+
 
6064
+  heads[2].first = n->next;
 
6065
+
 
6066
+  if ((void*)n->prev == (void *)h)
 
6067
+    p = h->first;
 
6068
+  else
 
6069
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
6070
+    p = n->prev->next;
 
6071
+
 
6072
+  return !(p == (void*)0);
 
6073
+}
 
6074
+
 
6075
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
 
6076
+/* { dg-final { cleanup-tree-dump "pre" } } */
 
6077
Index: gcc/testsuite/gcc.dg/pr62004.c
 
6078
===================================================================
 
6079
--- a/src/gcc/testsuite/gcc.dg/pr62004.c        (.../tags/gcc_4_8_3_release)
 
6080
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c        (.../branches/gcc-4_8-branch)
 
6081
@@ -0,0 +1,47 @@
 
6082
+/* { dg-do run } */
 
6083
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
 
6084
+
 
6085
+struct node
 
6086
+{
 
6087
+  struct node *next;
 
6088
+  struct node *prev;
 
6089
+};
 
6090
+
 
6091
+struct node node;
 
6092
+
 
6093
+struct head
 
6094
+{
 
6095
+  struct node *first;
 
6096
+};
 
6097
+
 
6098
+struct head heads[5];
 
6099
+
 
6100
+int k = 2;
 
6101
+
 
6102
+struct head *head = &heads[2];
 
6103
+
 
6104
+int
 
6105
+main ()
 
6106
+{
 
6107
+  struct node *p;
 
6108
+
 
6109
+  node.next = (void*)0;
 
6110
+
 
6111
+  node.prev = (void *)head;
 
6112
+
 
6113
+  head->first = &node;
 
6114
+
 
6115
+  struct node *n = head->first;
 
6116
+
 
6117
+  struct head *h = &heads[k];
 
6118
+
 
6119
+  heads[2].first = n->next;
 
6120
+
 
6121
+  if ((void*)n->prev == (void *)h)
 
6122
+    p = h->first;
 
6123
+  else
 
6124
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
6125
+    p = n->prev->next;
 
6126
+
 
6127
+  return !(p == (void*)0);
 
6128
+}
 
6129
Index: gcc/testsuite/gcc.dg/pr51879-18.c
 
6130
===================================================================
 
6131
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../tags/gcc_4_8_3_release)
 
6132
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../branches/gcc-4_8-branch)
 
6133
@@ -13,5 +13,5 @@
 
6134
     *q = foo ();
 
6135
 }
 
6136
 
 
6137
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
 
6138
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
 
6139
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
6140
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
 
6141
===================================================================
 
6142
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../tags/gcc_4_8_3_release)
 
6143
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../branches/gcc-4_8-branch)
 
6144
@@ -0,0 +1,33 @@
 
6145
+/* { dg-do run } */
 
6146
+
 
6147
+extern void abort (void);
 
6148
+
 
6149
+struct node { struct node *next, *prev; } node;
 
6150
+struct head { struct node *first; } heads[5];
 
6151
+int k = 2;
 
6152
+struct head *head = &heads[2];
 
6153
+
 
6154
+static int __attribute__((noinline))
 
6155
+foo()
 
6156
+{
 
6157
+  node.prev = (void *)head;
 
6158
+  head->first = &node;
 
6159
+
 
6160
+  struct node *n = head->first;
 
6161
+  struct head *h = &heads[k];
 
6162
+
 
6163
+  if (n->prev == (void *)h)
 
6164
+    h->first = n->next;
 
6165
+  else
 
6166
+    n->prev->next = n->next;
 
6167
+
 
6168
+  n->next = h->first;
 
6169
+  return n->next == &node;
 
6170
+}
 
6171
+
 
6172
+int main()
 
6173
+{
 
6174
+  if (foo ())
 
6175
+    abort ();
 
6176
+  return 0;
 
6177
+}
 
6178
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
 
6179
===================================================================
 
6180
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../tags/gcc_4_8_3_release)
 
6181
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../branches/gcc-4_8-branch)
 
6182
@@ -0,0 +1,8 @@
 
6183
+/* { dg-do compile } */
 
6184
+
 
6185
+int main (void)
 
6186
+{
 
6187
+  int a = 0;
 
6188
+  unsigned b = (a * 64 & 192) | 63U;
 
6189
+  return 0;
 
6190
+}
 
6191
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
 
6192
===================================================================
 
6193
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../tags/gcc_4_8_3_release)
 
6194
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../branches/gcc-4_8-branch)
 
6195
@@ -0,0 +1,31 @@
 
6196
+/* { dg-do run } */
 
6197
+
 
6198
+int a, b;
 
6199
+short c, d;
 
6200
+char e, f;
 
6201
+
 
6202
+int
 
6203
+fn1 (int p1, char p2)
 
6204
+{
 
6205
+  return p1 || p2 ? 0 : p2;
 
6206
+}
 
6207
+
 
6208
+void
 
6209
+fn2 ()
 
6210
+{
 
6211
+  for (; a;)
 
6212
+    {
 
6213
+      int g;
 
6214
+      g = c = e;
 
6215
+      for (; a;)
 
6216
+       b = fn1 (g = d = e, g);
 
6217
+      f = g; 
 
6218
+    }
 
6219
+}
 
6220
+
 
6221
+int
 
6222
+main ()
 
6223
+{
 
6224
+  fn2 (); 
 
6225
+  return 0;
 
6226
+}
 
6227
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
 
6228
===================================================================
 
6229
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../tags/gcc_4_8_3_release)
 
6230
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../branches/gcc-4_8-branch)
 
6231
@@ -0,0 +1,35 @@
 
6232
+/* { dg-do run } */
 
6233
+
 
6234
+int a, b = 1, c, d, e, f, g;
 
6235
+
 
6236
+int
 
6237
+fn1 ()
 
6238
+{
 
6239
+  int h;
 
6240
+  for (;;)
 
6241
+    {
 
6242
+      g = b;
 
6243
+      g = g ? 0 : 1 % g;
 
6244
+      e = a + 1;
 
6245
+      for (; d < 1; d = e)
 
6246
+       {
 
6247
+         if (f == 0)
 
6248
+           h = 0;
 
6249
+         else
 
6250
+           h = 1 % f;
 
6251
+         if (f < 1)
 
6252
+           c = 0;
 
6253
+         else if (h)
 
6254
+           break;
 
6255
+       }
 
6256
+      if (b)
 
6257
+       return 0;
 
6258
+    }
 
6259
+}
 
6260
+
 
6261
+int
 
6262
+main ()
 
6263
+{
 
6264
+  fn1 ();
 
6265
+  return 0;
 
6266
+}
 
6267
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
 
6268
===================================================================
 
6269
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../tags/gcc_4_8_3_release)
 
6270
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../branches/gcc-4_8-branch)
 
6271
@@ -0,0 +1,41 @@
 
6272
+/* Test that exact underflow in __float128 signals the underflow
 
6273
+   exception if trapping is enabled, but does not raise the flag
 
6274
+   otherwise.  */
 
6275
+
 
6276
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
 
6277
+/* { dg-options "-D_GNU_SOURCE" } */
 
6278
+/* { dg-require-effective-target fenv_exceptions } */
 
6279
+
 
6280
+#include <fenv.h>
 
6281
+#include <setjmp.h>
 
6282
+#include <signal.h>
 
6283
+#include <stdlib.h>
 
6284
+
 
6285
+volatile sig_atomic_t caught_sigfpe;
 
6286
+sigjmp_buf buf;
 
6287
+
 
6288
+static void
 
6289
+handle_sigfpe (int sig)
 
6290
+{
 
6291
+  caught_sigfpe = 1;
 
6292
+  siglongjmp (buf, 1);
 
6293
+}
 
6294
+
 
6295
+int
 
6296
+main (void)
 
6297
+{
 
6298
+  volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
 
6299
+  volatile __float128 r;
 
6300
+  r = a * b;
 
6301
+  if (fetestexcept (FE_UNDERFLOW))
 
6302
+    abort ();
 
6303
+  if (r != 0x1p-16384q)
 
6304
+    abort ();
 
6305
+  feenableexcept (FE_UNDERFLOW);
 
6306
+  signal (SIGFPE, handle_sigfpe);
 
6307
+  if (sigsetjmp (buf, 1) == 0)
 
6308
+    r = a * b;
 
6309
+  if (!caught_sigfpe)
 
6310
+    abort ();
 
6311
+  exit (0);
 
6312
+}
 
6313
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
 
6314
===================================================================
 
6315
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../tags/gcc_4_8_3_release)
 
6316
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../branches/gcc-4_8-branch)
 
6317
@@ -0,0 +1,52 @@
 
6318
+/* { dg-do run } */
 
6319
+
 
6320
+#include <stdlib.h>
 
6321
+
 
6322
+#define NUM_OF_STATES 4
 
6323
+typedef unsigned int entry_t[2];
 
6324
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
 
6325
+
 
6326
+void __attribute__((noinline,noclone))
 
6327
+test_00(size_t numOfStates, entries_item_t* p_bm,
 
6328
+       const unsigned int* polyArray,
 
6329
+       size_t polyArraySize)
 
6330
+{
 
6331
+  size_t idx;
 
6332
+  unsigned int hlp0, hlp1;
 
6333
+  for (idx = 0; idx < numOfStates; ++idx)
 
6334
+    {
 
6335
+      size_t idy;
 
6336
+
 
6337
+      hlp0 = (idx << 1) | 0x00;
 
6338
+      hlp1 = (idx << 1) | 0x01;
 
6339
+      p_bm->metricEntries_[idx][0] = 0;
 
6340
+      p_bm->metricEntries_[idx][1] = 0;
 
6341
+      for (idy = 0; idy < polyArraySize; ++idy)
 
6342
+       {
 
6343
+         p_bm->metricEntries_[idx][0]
 
6344
+             |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
 
6345
+         p_bm->metricEntries_[idx][1]
 
6346
+             |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
 
6347
+       }
 
6348
+    }
 
6349
+}
 
6350
+
 
6351
+int main()
 
6352
+{
 
6353
+  unsigned int polyArray[] = { 0x07, 0x05 };
 
6354
+  entries_item_t* pBranchMetrics;
 
6355
+  pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
 
6356
+  test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
 
6357
+         sizeof(polyArray) / sizeof(polyArray[0]));
 
6358
+  if (pBranchMetrics->metricEntries_[0][0] != 0
 
6359
+      || pBranchMetrics->metricEntries_[0][1] != 3
 
6360
+      || pBranchMetrics->metricEntries_[1][0] != 1
 
6361
+      || pBranchMetrics->metricEntries_[1][1] != 2
 
6362
+      || pBranchMetrics->metricEntries_[2][0] != 3
 
6363
+      || pBranchMetrics->metricEntries_[2][1] != 0
 
6364
+      || pBranchMetrics->metricEntries_[3][0] != 2
 
6365
+      || pBranchMetrics->metricEntries_[3][1] != 1)
 
6366
+    abort ();
 
6367
+  free(pBranchMetrics);
 
6368
+  return 0;
 
6369
+}
 
6370
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
 
6371
===================================================================
 
6372
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../tags/gcc_4_8_3_release)
 
6373
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../branches/gcc-4_8-branch)
 
6374
@@ -23,7 +23,8 @@
 
6375
 T (20, 0, 4, 1, 5) \
 
6376
 T (21, 2, 6, 3, 7) \
 
6377
 T (22, 1, 2, 3, 0) \
 
6378
-T (23, 2, 1, 0, 3)
 
6379
+T (23, 2, 1, 0, 3) \
 
6380
+T (24, 2, 5, 6, 3)
 
6381
 #define EXPTESTS \
 
6382
 T (116,        1, 2, 4, 3) \
 
6383
 T (117,        7, 3, 3, 0) \
 
6384
@@ -31,7 +32,6 @@
 
6385
 T (119,        0, 3, 5, 6) \
 
6386
 T (120,        0, 0, 1, 5) \
 
6387
 T (121,        4, 6, 2, 1) \
 
6388
-T (122,        2, 5, 6, 3) \
 
6389
 T (123,        4, 6, 3, 2) \
 
6390
 T (124,        4, 7, 5, 6) \
 
6391
 T (125,        0, 4, 2, 4) \
 
6392
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
 
6393
===================================================================
 
6394
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../tags/gcc_4_8_3_release)
 
6395
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../branches/gcc-4_8-branch)
 
6396
@@ -1,21 +1,21 @@
 
6397
 /* { dg-do compile } */
 
6398
 /* { dg-options "-Wstack-usage=512" } */
 
6399
 
 
6400
-int foo1 (void)
 
6401
+int foo1 (void)  /* { dg-bogus "stack usage" } */
 
6402
 {
 
6403
   char arr[16];
 
6404
   arr[0] = 1;
 
6405
   return 0;
 
6406
-} /* { dg-bogus "stack usage" } */
 
6407
+}
 
6408
 
 
6409
-int foo2 (void)
 
6410
+int foo2 (void)  /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
6411
 {
 
6412
   char arr[1024];
 
6413
   arr[0] = 1;
 
6414
   return 0;
 
6415
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
6416
+}
 
6417
 
 
6418
-int foo3 (void)
 
6419
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
6420
 {
 
6421
   char arr[1024] __attribute__((aligned (512)));
 
6422
   arr[0] = 1;
 
6423
@@ -22,12 +22,11 @@
 
6424
   /* Force dynamic realignment of argument pointer.  */
 
6425
   __builtin_apply ((void (*)()) foo2, 0, 0);
 
6426
   return 0;
 
6427
+}
 
6428
 
 
6429
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
6430
-
 
6431
-int foo4 (int n)
 
6432
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
 
6433
 {
 
6434
   char arr[n];
 
6435
   arr[0] = 1;
 
6436
   return 0;
 
6437
-} /* { dg-warning "stack usage might be unbounded" } */
 
6438
+}
 
6439
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
 
6440
===================================================================
 
6441
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../tags/gcc_4_8_3_release)
 
6442
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../branches/gcc-4_8-branch)
 
6443
@@ -0,0 +1,48 @@
 
6444
+/* { dg-do compile } */
 
6445
+/* { dg-options "-O3" } */
 
6446
+
 
6447
+int a, b, c;
 
6448
+
 
6449
+struct S
 
6450
+{
 
6451
+  int f0;
 
6452
+  int f1;
 
6453
+} d;
 
6454
+
 
6455
+static int fn2 (struct S);
 
6456
+void fn3 (struct S);
 
6457
+
 
6458
+void
 
6459
+fn1 (struct S p)
 
6460
+{
 
6461
+  struct S h = { 0, 0 };
 
6462
+  fn3 (p);
 
6463
+  fn2 (h);
 
6464
+}
 
6465
+
 
6466
+int
 
6467
+fn2 (struct S p)
 
6468
+{
 
6469
+  struct S j = { 0, 0 };
 
6470
+  fn3 (p);
 
6471
+  fn2 (j);
 
6472
+  return 0;
 
6473
+}
 
6474
+
 
6475
+void
 
6476
+fn3 (struct S p)
 
6477
+{
 
6478
+  for (; b; a++)
 
6479
+    c = p.f0;
 
6480
+  fn1 (d);
 
6481
+}
 
6482
+
 
6483
+void
 
6484
+fn4 ()
 
6485
+{
 
6486
+  for (;;)
 
6487
+    {
 
6488
+      struct S f = { 0, 0 };
 
6489
+      fn1 (f);
 
6490
+    }
 
6491
+}
 
6492
Index: gcc/testsuite/gcc.dg/pr62030.c
 
6493
===================================================================
 
6494
--- a/src/gcc/testsuite/gcc.dg/pr62030.c        (.../tags/gcc_4_8_3_release)
 
6495
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c        (.../branches/gcc-4_8-branch)
 
6496
@@ -0,0 +1,50 @@
 
6497
+/* { dg-do run } */
 
6498
+/* { dg-options "-O2" } */
 
6499
+
 
6500
+extern void abort (void);
 
6501
+
 
6502
+struct node
 
6503
+{
 
6504
+  struct node *next;
 
6505
+  struct node *prev;
 
6506
+};
 
6507
+
 
6508
+struct node node;
 
6509
+
 
6510
+struct head
 
6511
+{
 
6512
+  struct node *first;
 
6513
+};
 
6514
+
 
6515
+struct head heads[5];
 
6516
+
 
6517
+int k = 2;
 
6518
+
 
6519
+struct head *head = &heads[2];
 
6520
+
 
6521
+static int __attribute__((noinline))
 
6522
+foo (void)
 
6523
+{
 
6524
+  node.prev = (void *)head;
 
6525
+  head->first = &node;
 
6526
+
 
6527
+  struct node *n = head->first;
 
6528
+  struct head *h = &heads[k];
 
6529
+  struct node *next = n->next;
 
6530
+
 
6531
+  if (n->prev == (void *)h)
 
6532
+    h->first = next;
 
6533
+  else
 
6534
+    n->prev->next = next;
 
6535
+
 
6536
+  n->next = h->first;
 
6537
+  return n->next == &node;
 
6538
+}
 
6539
+
 
6540
+int
 
6541
+main (void)
 
6542
+{
 
6543
+  if (foo ())
 
6544
+    abort ();
 
6545
+  return 0;
 
6546
+}
 
6547
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
 
6548
===================================================================
 
6549
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
 
6550
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
 
6551
@@ -0,0 +1,35 @@
 
6552
+/* PR tree-optimization/63341 */
 
6553
+/* { dg-do run } */
 
6554
+
 
6555
+#include "tree-vect.h"
 
6556
+
 
6557
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
6558
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
6559
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
 
6560
+                 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
 
6561
+                 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
 
6562
+                 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
 
6563
+unsigned short d[32] = { 1 };
 
6564
+
 
6565
+__attribute__((noinline, noclone)) void
 
6566
+foo ()
 
6567
+{
 
6568
+  int i;
 
6569
+  for (i = 0; i < 32; i++)
 
6570
+    d[i] = t.s[i].s + 4;
 
6571
+  for (i = 0; i < 32; i++)
 
6572
+    if (d[i] != t.s[i].s + 4)
 
6573
+      abort ();
 
6574
+    else
 
6575
+      asm volatile ("" : : : "memory");
 
6576
+}
 
6577
+
 
6578
+int
 
6579
+main ()
 
6580
+{
 
6581
+  check_vect ();
 
6582
+  foo ();
 
6583
+  return 0;
 
6584
+}
 
6585
+
 
6586
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6587
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
 
6588
===================================================================
 
6589
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../tags/gcc_4_8_3_release)
 
6590
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../branches/gcc-4_8-branch)
 
6591
@@ -0,0 +1,26 @@
 
6592
+/* PR tree-optimization/63189 */
 
6593
+/* { dg-do run } */
 
6594
+
 
6595
+#include "tree-vect.h"
 
6596
+
 
6597
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
 
6598
+
 
6599
+__attribute__((noinline, noclone)) void
 
6600
+foo (void)
 
6601
+{
 
6602
+  int j, s = 0;
 
6603
+  for (j = 0; j < 8; j++)
 
6604
+    s += d[j] * j;
 
6605
+  if (s != 7)
 
6606
+    abort ();
 
6607
+}
 
6608
+
 
6609
+int
 
6610
+main ()
 
6611
+{
 
6612
+  check_vect ();
 
6613
+  foo ();
 
6614
+  return 0;
 
6615
+}
 
6616
+
 
6617
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6618
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
 
6619
===================================================================
 
6620
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../tags/gcc_4_8_3_release)
 
6621
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../branches/gcc-4_8-branch)
 
6622
@@ -0,0 +1,73 @@
 
6623
+/* { dg-require-effective-target vect_int } */
 
6624
+
 
6625
+#include <stdarg.h>
 
6626
+#include "tree-vect.h"
 
6627
+
 
6628
+#define N 64
 
6629
+#define DOT 43680
 
6630
+
 
6631
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
6632
+signed int   Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
6633
+
 
6634
+/* (short, int)->int->int dot product.
 
6635
+   Not detected as a dot-product pattern.  */
 
6636
+
 
6637
+__attribute__ ((noinline)) int
 
6638
+foo (int len)
 
6639
+{
 
6640
+  int i;
 
6641
+  int result = 0;
 
6642
+
 
6643
+  for (i = 0; i < len; i++)
 
6644
+    {
 
6645
+      result += (X[i] * Y[i]);
 
6646
+    }
 
6647
+  return result;
 
6648
+}
 
6649
+
 
6650
+
 
6651
+/* (int, short)->int->int dot product.
 
6652
+   Not detected as a dot-product pattern.  */
 
6653
+
 
6654
+__attribute__ ((noinline)) int
 
6655
+bar (int len)
 
6656
+{
 
6657
+  int i;
 
6658
+  int result = 0;
 
6659
+
 
6660
+  for (i = 0; i < len; i++)
 
6661
+    {
 
6662
+      result += (Y[i] * X[i]);
 
6663
+    }
 
6664
+  return result;
 
6665
+}
 
6666
+
 
6667
+int
 
6668
+main (void)
 
6669
+{
 
6670
+  int i;
 
6671
+  int dot;
 
6672
+
 
6673
+  check_vect ();
 
6674
+
 
6675
+  for (i = 0; i < N; i++)
 
6676
+    {
 
6677
+      X[i] = i;
 
6678
+      Y[i] = N - i;
 
6679
+      __asm__ volatile ("");
 
6680
+    }
 
6681
+
 
6682
+  dot = foo (N);
 
6683
+  if (dot != DOT)
 
6684
+    abort ();
 
6685
+
 
6686
+  dot = bar (N);
 
6687
+  if (dot != DOT)
 
6688
+    abort ();
 
6689
+
 
6690
+  return 0;
 
6691
+}
 
6692
+
 
6693
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
 
6694
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6695
+
 
6696
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
 
6697
===================================================================
 
6698
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../tags/gcc_4_8_3_release)
 
6699
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../branches/gcc-4_8-branch)
 
6700
@@ -0,0 +1,43 @@
 
6701
+/* PR tree-optimization/63379  */
 
6702
+/* { dg-do run } */
 
6703
+
 
6704
+#include "tree-vect.h"
 
6705
+
 
6706
+extern void abort (void);
 
6707
+
 
6708
+typedef struct {
 
6709
+    int x;
 
6710
+    int y;
 
6711
+} Point;
 
6712
+
 
6713
+Point pt_array[25];
 
6714
+
 
6715
+void __attribute__((noinline,noclone))
 
6716
+generate_array(void)
 
6717
+{
 
6718
+  unsigned int i;
 
6719
+  for (i = 0; i<25; i++)
 
6720
+    {
 
6721
+      pt_array[i].x = i;
 
6722
+      pt_array[i].y = 1000+i;
 
6723
+    }
 
6724
+}
 
6725
+
 
6726
+int main()
 
6727
+{
 
6728
+  check_vect ();
 
6729
+  generate_array ();
 
6730
+  Point min_pt = pt_array[0];
 
6731
+  Point *ptr, *ptr_end;
 
6732
+  for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
 
6733
+    {
 
6734
+      min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
 
6735
+      min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
 
6736
+    }
 
6737
+
 
6738
+  if (min_pt.x != 0 || min_pt.y != 1000)
 
6739
+    abort ();
 
6740
+  return 0;
 
6741
+}
 
6742
+
 
6743
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6744
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
 
6745
===================================================================
 
6746
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../tags/gcc_4_8_3_release)
 
6747
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../branches/gcc-4_8-branch)
 
6748
@@ -0,0 +1,40 @@
 
6749
+/* { dg-do compile } */
 
6750
+/* { dg-additional-options "-O1" } */
 
6751
+
 
6752
+struct S0
 
6753
+{
 
6754
+  int f7;
 
6755
+};
 
6756
+struct S0 g_50;
 
6757
+int g_70;
 
6758
+int g_76;
 
6759
+
 
6760
+int foo (long long p_56, int * p_57)
 
6761
+{
 
6762
+  int *l_77;
 
6763
+  int l_101;
 
6764
+
 
6765
+  for (; g_70;)
 
6766
+    {
 
6767
+      int **l_78 = &l_77;
 
6768
+      if (g_50.f7)
 
6769
+       continue;
 
6770
+      *l_78 = 0;
 
6771
+    }
 
6772
+  for (g_76 = 1; g_76 >= 0; g_76--)
 
6773
+    {
 
6774
+      int *l_90;
 
6775
+      for (l_101 = 4; l_101 >= 0; l_101--)
 
6776
+       if (l_101)
 
6777
+         *l_90 = 0;
 
6778
+       else
 
6779
+         {
 
6780
+           int **l_113 = &l_77;
 
6781
+           *l_113 = p_57;
 
6782
+         }
 
6783
+    }
 
6784
+
 
6785
+  return *l_77;
 
6786
+}
 
6787
+
 
6788
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6789
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
 
6790
===================================================================
 
6791
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
 
6792
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
 
6793
@@ -0,0 +1,34 @@
 
6794
+/* PR tree-optimization/63189 */
 
6795
+/* { dg-additional-options "-fwrapv" } */
 
6796
+/* { dg-do run } */
 
6797
+
 
6798
+#include "tree-vect.h"
 
6799
+
 
6800
+__attribute__((noinline, noclone)) static int
 
6801
+bar (const short *a, int len)
 
6802
+{
 
6803
+  int x;
 
6804
+  int x1 = 0;
 
6805
+
 
6806
+  for (x = 0; x < len; x++)
 
6807
+    x1 += x * a[x];
 
6808
+  return x1;
 
6809
+}
 
6810
+
 
6811
+__attribute__((noinline, noclone)) void
 
6812
+foo (void)
 
6813
+{
 
6814
+  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
 
6815
+  if (bar (stuff, 9) != 36)
 
6816
+    abort ();
 
6817
+}
 
6818
+
 
6819
+int
 
6820
+main ()
 
6821
+{
 
6822
+  check_vect ();
 
6823
+  foo ();
 
6824
+  return 0;
 
6825
+}
 
6826
+
 
6827
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6828
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
 
6829
===================================================================
 
6830
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../tags/gcc_4_8_3_release)
 
6831
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../branches/gcc-4_8-branch)
 
6832
@@ -0,0 +1,22 @@
 
6833
+/* { dg-do compile } */
 
6834
+
 
6835
+int a[16][2];
 
6836
+struct A
 
6837
+{
 
6838
+  int b[16][2];
 
6839
+  int c[16][1];
 
6840
+};
 
6841
+
 
6842
+void
 
6843
+foo (struct A *x)
 
6844
+{
 
6845
+  int i;
 
6846
+  for (i = 0; i < 16; ++i)
 
6847
+    {
 
6848
+      x->b[i][0] = a[i][0];
 
6849
+      x->c[i][0] = 0 != a[i][0];
 
6850
+      x->b[i][1] = a[i][1];
 
6851
+    }
 
6852
+}
 
6853
+
 
6854
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6855
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
 
6856
===================================================================
 
6857
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
 
6858
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
 
6859
@@ -0,0 +1,33 @@
 
6860
+/* PR tree-optimization/63189 */
 
6861
+/* { dg-do run } */
 
6862
+
 
6863
+#include "tree-vect.h"
 
6864
+
 
6865
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
 
6866
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
 
6867
+
 
6868
+__attribute__((noinline, noclone)) static int
 
6869
+bar (void)
 
6870
+{
 
6871
+  int sum = 0, i;
 
6872
+  for (i = 0; i < 8; ++i)
 
6873
+    sum += a[i] * b[i];
 
6874
+  return sum;
 
6875
+}
 
6876
+
 
6877
+__attribute__((noinline, noclone)) void
 
6878
+foo (void)
 
6879
+{
 
6880
+  if (bar () != 0)
 
6881
+    abort ();
 
6882
+}
 
6883
+
 
6884
+int
 
6885
+main ()
 
6886
+{
 
6887
+  check_vect ();
 
6888
+  foo ();
 
6889
+  return 0;
 
6890
+}
 
6891
+
 
6892
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6893
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
 
6894
===================================================================
 
6895
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../tags/gcc_4_8_3_release)
 
6896
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../branches/gcc-4_8-branch)
 
6897
@@ -0,0 +1,22 @@
 
6898
+/* { dg-do run } */
 
6899
+
 
6900
+#include "tree-vect.h"
 
6901
+
 
6902
+extern void abort (void);
 
6903
+
 
6904
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
 
6905
+
 
6906
+int
 
6907
+main ()
 
6908
+{
 
6909
+  int d;
 
6910
+  check_vect ();
 
6911
+  for (; a < 8; a++)
 
6912
+    {
 
6913
+      d = b[a] >> 1;
 
6914
+      c[a] = d != 0;
 
6915
+    }
 
6916
+  if (c[0] != 1)
 
6917
+    abort ();
 
6918
+  return 0;
 
6919
+}
 
6920
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
 
6921
===================================================================
 
6922
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
 
6923
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
 
6924
@@ -0,0 +1,32 @@
 
6925
+/* PR tree-optimization/63341 */
 
6926
+/* { dg-do run } */
 
6927
+
 
6928
+#include "tree-vect.h"
 
6929
+
 
6930
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
6931
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
6932
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
 
6933
+                 {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
 
6934
+                 {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
 
6935
+                 {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
 
6936
+unsigned short d[32] = { 1 };
 
6937
+
 
6938
+__attribute__((noinline, noclone)) void
 
6939
+foo ()
 
6940
+{
 
6941
+  int i;
 
6942
+  for (i = 0; i < 32; i++)
 
6943
+    d[i] = t.s[i].s;
 
6944
+  if (__builtin_memcmp (d, t.s, sizeof d))
 
6945
+    abort ();
 
6946
+}
 
6947
+
 
6948
+int
 
6949
+main ()
 
6950
+{
 
6951
+  check_vect ();
 
6952
+  foo ();
 
6953
+  return 0;
 
6954
+}
 
6955
+
 
6956
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6957
Index: gcc/testsuite/ChangeLog
 
6958
===================================================================
 
6959
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_8_3_release)
 
6960
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_8-branch)
 
6961
@@ -1,3 +1,513 @@
 
6962
+2014-12-05  H.J. Lu  <hongjiu.lu@intel.com>
 
6963
+
 
6964
+       Backport from mainline
 
6965
+       2014-11-28  H.J. Lu  <hongjiu.lu@intel.com>
 
6966
+
 
6967
+       PR rtl-optimization/64037
 
6968
+       * g++.dg/pr64037.C: New test.
 
6969
+
 
6970
+2014-12-04  Jakub Jelinek  <jakub@redhat.com>
 
6971
+
 
6972
+       PR c++/56493
 
6973
+       * c-c++-common/pr56493.c: New test.
 
6974
+
 
6975
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
6976
+
 
6977
+       Backported from mainline
 
6978
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
 
6979
+
 
6980
+       PR middle-end/64067
 
6981
+       * gcc.c-torture/compile/pr64067.c: New test.
 
6982
+
 
6983
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
 
6984
+
 
6985
+       PR rtl-optimization/63659
 
6986
+       * gcc.c-torture/execute/pr63659.c: New test.
 
6987
+
 
6988
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
6989
+
 
6990
+       PR libgomp/61200
 
6991
+       * c-c++-common/gomp/pr61200.c: New test.
 
6992
+
 
6993
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
6994
+
 
6995
+       Backport from mainline
 
6996
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
6997
+
 
6998
+       PR tree-optimization/62031
 
6999
+       * gcc.dg/torture/pr62031.c: New testcase.
 
7000
+
 
7001
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
7002
+
 
7003
+       PR tree-optimization/63379
 
7004
+       * gcc.dg/vect/pr63379.c: New testcase.
 
7005
+
 
7006
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
7007
+
 
7008
+       PR tree-optimization/63605
 
7009
+       * gcc.dg/vect/pr63605.c: New testcase.
 
7010
+
 
7011
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
7012
+
 
7013
+       PR middle-end/63665
 
7014
+       * gcc.dg/pr63665.c: New testcase.
 
7015
+
 
7016
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
7017
+
 
7018
+       PR target/63947
 
7019
+       * gcc.target/i386/pr63947.c: New test.
 
7020
+
 
7021
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
7022
+
 
7023
+       Backport from mainline
 
7024
+       PR tree-optimization/62167
 
7025
+       * gcc.dg/pr51879-12.c: Add xfails.
 
7026
+       * gcc.dg/pr62167-run.c: New test.
 
7027
+       * gcc.dg/pr62167.c: New test.
 
7028
+
 
7029
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
7030
+
 
7031
+       Backport from mainline and gcc-4_9 branch.
 
7032
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
7033
+
 
7034
+       PR tree-optimization/63841
 
7035
+       * g++.dg/tree-ssa/pr63841.C: New test.
 
7036
+
 
7037
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
7038
+
 
7039
+       PR ipa/63838
 
7040
+       * g++.dg/ipa/pr63838.C: New test.
 
7041
+
 
7042
+2014-11-03  Marek Polacek  <polacek@redhat.com>
 
7043
+
 
7044
+       PR c/52769
 
7045
+       * gcc.dg/pr52769.c: New test.
 
7046
+
 
7047
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
7048
+
 
7049
+       * gcc.target/aarch64/madd_after_asm_1.c: New test.
 
7050
+
 
7051
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
7052
+
 
7053
+       * gnat.dg/opt41.adb: New test.
 
7054
+       * gnat.dg/opt41_pkg.ad[sb]: New helper.
 
7055
+
 
7056
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7057
+
 
7058
+       Backport from mainline r215880
 
7059
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7060
+
 
7061
+       * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
 
7062
+       failing with the new warning message.
 
7063
+       * gcc.dg/vmx/3c-01a.c: Likewise.
 
7064
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
7065
+       * gcc.dg/vmx/ops.c: Likewise.
 
7066
+       * gcc.target/powerpc/altivec-20.c: Likewise.
 
7067
+       * gcc.target/powerpc/altivec-6.c: Likewise.
 
7068
+       * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
 
7069
+       * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
 
7070
+       * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
 
7071
+
 
7072
+       Backport from mainline r215882
 
7073
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7074
+
 
7075
+       * gcc.target/powerpc/lvsl-lvsr.c: New test.
 
7076
+
 
7077
+       Backport from mainline r216017
 
7078
+       2014-10-08  Pat Haugen  <pthaugen@us.ibm.com>
 
7079
+
 
7080
+       * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
 
7081
+       * gcc.dg/vmx/ops.c: Likewise.
 
7082
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
7083
+
 
7084
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
7085
+
 
7086
+       PR fortran/59488
 
7087
+       * gfortran.dg/gomp/pr59488-1.f90: New test.
 
7088
+       * gfortran.dg/gomp/pr59488-2.f90: New test.
 
7089
+
 
7090
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
7091
+
 
7092
+       PR debug/63342
 
7093
+       * gcc.dg/pr63342.c: New test.
 
7094
+
 
7095
+       PR target/63428
 
7096
+       * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
 
7097
+       to test 24 in TESTS.
 
7098
+
 
7099
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
7100
+
 
7101
+       Backport from mainline
 
7102
+       2013-11-07  Joseph Myers  <joseph@codesourcery.com>
 
7103
+
 
7104
+       * lib/target-supports.exp
 
7105
+       (check_effective_target_fenv_exceptions): New function.
 
7106
+
 
7107
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
7108
+
 
7109
+       PR inline-asm/63282
 
7110
+       * gcc.c-torture/compile/pr63282.c: New test.
 
7111
+
 
7112
+2014-09-26  Jakub Jelinek  <jakub@redhat.com>
 
7113
+
 
7114
+       * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
 
7115
+       to default options.
 
7116
+
 
7117
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7118
+
 
7119
+       Backport from mainline r215559
 
7120
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7121
+
 
7122
+       PR target/63335
 
7123
+       * gcc.target/powerpc/pr63335.c: New test.
 
7124
+
 
7125
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
7126
+
 
7127
+       PR tree-optimization/63341
 
7128
+       * gcc.dg/vect/pr63341-1.c: New test.
 
7129
+       * gcc.dg/vect/pr63341-2.c: New test.
 
7130
+
 
7131
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
7132
+
 
7133
+       * gcc.dg/torture/float128-exact-underflow.c: New test.
 
7134
+
 
7135
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
7136
+
 
7137
+       PR debug/63284
 
7138
+       * gcc.dg/pr63284.c: New test.
 
7139
+
 
7140
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
7141
+
 
7142
+       Backport from mainline
 
7143
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
7144
+
 
7145
+       PR tree-optimization/61452
 
7146
+       * gcc.dg/torture/pr61452.c: New testcase.
 
7147
+
 
7148
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
7149
+
 
7150
+       Backport from mainline
 
7151
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
7152
+
 
7153
+       PR middle-end/61010
 
7154
+       * gcc.dg/torture/pr61010.c: New testcase.
 
7155
+
 
7156
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
7157
+
 
7158
+       PR middle-end/61045
 
7159
+       * gcc.dg/pr61045.c: New testcase.
 
7160
+
 
7161
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
7162
+
 
7163
+       PR tree-optimization/62075
 
7164
+       * gcc.dg/vect/pr62075.c: New testcase.
 
7165
+
 
7166
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
7167
+
 
7168
+       PR tree-optimization/60196
 
7169
+       PR tree-optimization/63189
 
7170
+       * gcc.dg/vect/pr63189.c: New test.
 
7171
+       * gcc.dg/vect/pr60196-1.c: New test.
 
7172
+       * gcc.dg/vect/pr60196-2.c: New test.
 
7173
+
 
7174
+       Backported from mainline
 
7175
+       2013-09-17  Cong Hou  <congh@google.com>
 
7176
+
 
7177
+       * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product 
 
7178
+       on two arrays with short and int types. This should not be recognized
 
7179
+       as a dot product pattern.
 
7180
+
 
7181
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
7182
+
 
7183
+       Backported from mainline
 
7184
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
7185
+
 
7186
+       PR debug/61923
 
7187
+       * gcc.target/i386/pr61923.c: New test.
 
7188
+
 
7189
+2014-09-06  John David Anglin  <danglin@gcc.gnu.org>
 
7190
+
 
7191
+       PR testsuite/56194
 
7192
+       * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
 
7193
+
 
7194
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
7195
+
 
7196
+       Backport from mainline
 
7197
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
 
7198
+
 
7199
+       PR fortran/62270
 
7200
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
 
7201
+
 
7202
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
7203
+
 
7204
+       PR ipa/62015
 
7205
+       * g++.dg/ipa/pr62015.C: New test.
 
7206
+
 
7207
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
7208
+
 
7209
+       PR ipa/61986
 
7210
+       * gcc.dg/ipa/pr61986.c: New test.
 
7211
+
 
7212
+2014-08-26  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
7213
+
 
7214
+       * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
 
7215
+       failure on s390*-*-linux-gnu.
 
7216
+
 
7217
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
7218
+
 
7219
+       Backport from mainline
 
7220
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
7221
+
 
7222
+       PR target/61996
 
7223
+       * gcc.target/sh/pr61996.c: New.
 
7224
+
 
7225
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
7226
+
 
7227
+       Backport from trunk
 
7228
+       PR fortran/62214
 
7229
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
7230
+
 
7231
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
7232
+
 
7233
+       Backport from mainline:
 
7234
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
7235
+
 
7236
+       PR rtl-optimization/62004
 
7237
+       PR rtl-optimization/62030
 
7238
+       * gcc.dg/pr62004.c: New test.
 
7239
+       * gcc.dg/pr62030.c: Same.
 
7240
+       * gcc.target/mips/pr62030-octeon.c: Same.
 
7241
+
 
7242
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
7243
+
 
7244
+       PR tree-optimization/62073
 
7245
+       * gcc.dg/vect/pr62073.c: New test.
 
7246
+
 
7247
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7248
+
 
7249
+       Backport from mainline
 
7250
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7251
+
 
7252
+       PR middle-end/62103
 
7253
+       * gcc.c-torture/execute/bitfld-6.c: New test.
 
7254
+
 
7255
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
7256
+
 
7257
+       Backport from trunk
 
7258
+       PR fortran/61999
 
7259
+       * gfortran.dg/dot_product_3.f90:  New test case.
 
7260
+
 
7261
+2014-08-07  John David Anglin  <danglin@gcc.gnu.org>
 
7262
+
 
7263
+       PR tree-optimization/60707
 
7264
+       * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
 
7265
+
 
7266
+2014-08-06  Jakub Jelinek  <jakub@redhat.com>
 
7267
+
 
7268
+       PR rtl-optimization/61801
 
7269
+       * gcc.target/i386/pr61801.c: Rewritten.
 
7270
+
 
7271
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7272
+
 
7273
+       Backport from mainline
 
7274
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7275
+
 
7276
+       PR tree-optimization/61375
 
7277
+       * gcc.c-torture/execute/pr61375-1.c: New test.
 
7278
+
 
7279
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
7280
+
 
7281
+       PR tree-optimization/61964
 
7282
+       * gcc.dg/torture/pr61964.c: New testcase.
 
7283
+       * gcc.dg/pr51879-18.c: XFAIL.
 
7284
+
 
7285
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
7286
+
 
7287
+       PR rtl-optimization/61801
 
7288
+       * gcc.target/i386/pr61801.c: Fix testcase.
 
7289
+
 
7290
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
7291
+
 
7292
+       PR rtl-optimization/61801
 
7293
+       * gcc.target/i386/pr61801.c: New testcase.
 
7294
+
 
7295
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7296
+
 
7297
+       Backport from mainline:
 
7298
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7299
+
 
7300
+       * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
 
7301
+
 
7302
+       * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
 
7303
+       * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
 
7304
+       * gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
 
7305
+       * gcc.c-torture/execute/pr23135.x: Likewise.
 
7306
+
 
7307
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7308
+
 
7309
+       Backport from mainline:
 
7310
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7311
+
 
7312
+       * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
 
7313
+
 
7314
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7315
+
 
7316
+       Backport from mainline:
 
7317
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7318
+
 
7319
+       * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
 
7320
+
 
7321
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7322
+
 
7323
+       Backport from mainline:
 
7324
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
7325
+
 
7326
+       * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
 
7327
+
 
7328
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
7329
+
 
7330
+       * gcc.dg/stack-usage-2.c: Adjust.
 
7331
+
 
7332
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
7333
+
 
7334
+       Backport from trunk.
 
7335
+       PR fortran/61780
 
7336
+       * gfortran.dg/dependency_44.f90 : New test
 
7337
+
 
7338
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
7339
+
 
7340
+       * gnat.dg/opt39.adb: New test.
 
7341
+
 
7342
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
7343
+
 
7344
+       PR fortran/61459
 
7345
+       PR fortran/58883
 
7346
+       * gfortran.dg/allocatable_function_8.f90 : New test
 
7347
+
 
7348
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
7349
+
 
7350
+       PR tree-optimization/61684
 
7351
+       * gcc.c-torture/compile/pr61684.c: New test.
 
7352
+
 
7353
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
7354
+           Fritz Reese  <Reese-Fritz@zai.com>
 
7355
+
 
7356
+       * gfortran.dg/oldstyle_5.f: New test.
 
7357
+
 
7358
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7359
+
 
7360
+       Backport from mainline
 
7361
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
7362
+
 
7363
+       PR tree-optimization/61306
 
7364
+       * gcc.c-torture/execute/pr61306-1.c: New test.
 
7365
+       * gcc.c-torture/execute/pr61306-2.c: Likewise.
 
7366
+       * gcc.c-torture/execute/pr61306-3.c: Likewise.
 
7367
+
 
7368
+2014-06-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7369
+
 
7370
+       * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
 
7371
+
 
7372
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
7373
+
 
7374
+       Backport from mainline
 
7375
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
7376
+
 
7377
+       PR target/61586
 
7378
+       * gcc.target/alpha/pr61586.c: New test.
 
7379
+
 
7380
+2014-06-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
7381
+
 
7382
+       * gfortran.dg/default_format_denormal_2.f90:  Remove xfail for
 
7383
+       powerpc*-*-linux*.
 
7384
+
 
7385
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
7386
+
 
7387
+       Backport from mainline
 
7388
+       2014-06-13  Ilya Enkovich  <ilya.enkovich@intel.com>
 
7389
+
 
7390
+       PR rtl-optimization/61094
 
7391
+       PR rtl-optimization/61446
 
7392
+       * gcc.target/i386/pr61446.c : New.
 
7393
+
 
7394
+       Backport from mainline
 
7395
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
7396
+
 
7397
+       PR target/61423
 
7398
+       * gcc.target/i386/pr61423.c: New test.
 
7399
+
 
7400
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
7401
+
 
7402
+       Backport from mainline
 
7403
+
 
7404
+       PR target/61483
 
7405
+       * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
 
7406
+       * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
 
7407
+       * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
 
7408
+       * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
 
7409
+
 
7410
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
7411
+
 
7412
+       Backport from trunk.
 
7413
+       PR fortran/45187
 
7414
+       * gfortran.dg/cray_pointers_10.f90: New file.
 
7415
+
 
7416
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
7417
+
 
7418
+       Backport from mainline
 
7419
+
 
7420
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
7421
+       PR target/61415
 
7422
+       * lib/target-supports.exp (check_effective_target_longdouble128): New.
 
7423
+       * gcc.target/powerpc/pack02.c: Use it.
 
7424
+       * gcc.target/powerpc/tfmode_off.c: Likewise.
 
7425
+
 
7426
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
7427
+
 
7428
+       Backport from 2014-06-12 trunk r211491
 
7429
+
 
7430
+       PR target/61443
 
7431
+       * gcc.target/avr/torture/pr61443.c: New test.
 
7432
+
 
7433
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
7434
+
 
7435
+       PR tree-optimization/61383
 
7436
+       * gcc.dg/torture/pr61383-1.c: New testcase.
 
7437
+
 
7438
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
7439
+
 
7440
+       Backport from mainline
 
7441
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
7442
+
 
7443
+       PR rtl-optimization/60866
 
7444
+       * gcc.dg/pr60866.c: New test.
 
7445
+
 
7446
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
7447
+
 
7448
+       Backport from mainline
 
7449
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
7450
+
 
7451
+       PR rtl-optimization/60901
 
7452
+       * gcc.target/i386/pr60901.c: New test.
 
7453
+
 
7454
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
7455
+
 
7456
+       Backport from mainline
 
7457
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
7458
+
 
7459
+       * gnat.dg/overflow_fixed.adb: New test.
 
7460
+
 
7461
+2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
7462
+
 
7463
+       * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
 
7464
+
 
7465
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
7466
+
 
7467
+       Backport from mainline
 
7468
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
7469
+
 
7470
+       * gcc.target/powerpc/htm-ttest.c: New test.
 
7471
+
 
7472
 2014-05-22  Release Manager
 
7473
 
 
7474
        * GCC 4.8.3 released.
 
7475
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
 
7476
===================================================================
 
7477
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../tags/gcc_4_8_3_release)
 
7478
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../branches/gcc-4_8-branch)
 
7479
@@ -0,0 +1,28 @@
 
7480
+// I think this dynamic_cast has undefined behavior when destroying E::o
 
7481
+// because we're the F period of destruction has started and ap doesn't
 
7482
+// point to the object currently being destroyed--but the reasonable
 
7483
+// options are success or failure, not SEGV.
 
7484
+
 
7485
+// { dg-do run }
 
7486
+
 
7487
+extern "C" void abort();
 
7488
+
 
7489
+struct A { virtual ~A(); };
 
7490
+struct B { virtual ~B() { } };
 
7491
+struct C : B, A { };
 
7492
+struct E : virtual B { A o; };
 
7493
+struct F : virtual C, virtual E { };
 
7494
+
 
7495
+A* ap;
 
7496
+C* cp;
 
7497
+
 
7498
+A::~A() {
 
7499
+  C* cp2 = dynamic_cast<C*>(ap);
 
7500
+  if (cp2 != cp && cp2 != 0)
 
7501
+    abort();
 
7502
+}
 
7503
+
 
7504
+int main() {
 
7505
+  F f;
 
7506
+  ap = cp = &f;
 
7507
+}
 
7508
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
 
7509
===================================================================
 
7510
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../tags/gcc_4_8_3_release)
 
7511
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../branches/gcc-4_8-branch)
 
7512
@@ -1,6 +1,6 @@
 
7513
 /* { dg-do compile { target powerpc*-*-* } } */
 
7514
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
7515
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
 
7516
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
 
7517
 
 
7518
 /* This test checks if AltiVec builtins accept const-qualified
 
7519
    arguments.  */
 
7520
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
 
7521
===================================================================
 
7522
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
 
7523
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
 
7524
@@ -0,0 +1,10 @@
 
7525
+// PR c++/63455
 
7526
+// { dg-options "-std=gnu++11" }
 
7527
+
 
7528
+int main()
 
7529
+{
 
7530
+    int x = 0;
 
7531
+
 
7532
+    // without '+0', gcc 4.6 gives a different error (no ICE though)
 
7533
+    decltype(({ int y = x; y; })+0) v1 = 0;
 
7534
+}
 
7535
Index: gcc/testsuite/g++.dg/expr/cond12.C
 
7536
===================================================================
 
7537
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../tags/gcc_4_8_3_release)
 
7538
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../branches/gcc-4_8-branch)
 
7539
@@ -0,0 +1,12 @@
 
7540
+// PR c++/58714
 
7541
+// { dg-do run }
 
7542
+
 
7543
+struct X {
 
7544
+    X& operator=(const X&){}
 
7545
+    X& operator=(X&){__builtin_abort();}
 
7546
+};
 
7547
+
 
7548
+int main(int argv,char**) {
 
7549
+  X a, b;
 
7550
+  ((argv > 2) ? a : b) = X();
 
7551
+}
 
7552
Index: gcc/testsuite/g++.dg/init/const9.C
 
7553
===================================================================
 
7554
--- a/src/gcc/testsuite/g++.dg/init/const9.C    (.../tags/gcc_4_8_3_release)
 
7555
+++ b/src/gcc/testsuite/g++.dg/init/const9.C    (.../branches/gcc-4_8-branch)
 
7556
@@ -1,5 +1,5 @@
 
7557
 // PR c++/55893
 
7558
-// { dg-final { scan-assembler-not "rodata" } }
 
7559
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
 
7560
 
 
7561
 struct foo
 
7562
 {
 
7563
Index: gcc/testsuite/g++.dg/pr64037.C
 
7564
===================================================================
 
7565
--- a/src/gcc/testsuite/g++.dg/pr64037.C        (.../tags/gcc_4_8_3_release)
 
7566
+++ b/src/gcc/testsuite/g++.dg/pr64037.C        (.../branches/gcc-4_8-branch)
 
7567
@@ -0,0 +1,27 @@
 
7568
+// { dg-do run { target i?86-*-* x86_64-*-* } }
 
7569
+// { dg-options "-std=c++11 -Os" }
 
7570
+
 
7571
+enum class X : unsigned char {
 
7572
+  V = 2,
 
7573
+};
 
7574
+
 
7575
+static void
 
7576
+__attribute__((noinline,noclone))
 
7577
+foo(unsigned &out, unsigned a, X b)
 
7578
+{
 
7579
+  out = static_cast<unsigned>(b);
 
7580
+}
 
7581
+
 
7582
+int main()
 
7583
+{
 
7584
+  unsigned deadbeef = 0xDEADBEEF;
 
7585
+  asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
 
7586
+
 
7587
+  unsigned out;
 
7588
+  foo(out, 2, X::V);
 
7589
+
 
7590
+  if (out != 2)
 
7591
+    __builtin_abort ();
 
7592
+
 
7593
+  return 0;
 
7594
+}
 
7595
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
 
7596
===================================================================
 
7597
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../tags/gcc_4_8_3_release)
 
7598
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../branches/gcc-4_8-branch)
 
7599
@@ -0,0 +1,35 @@
 
7600
+/* { dg-do run } */
 
7601
+/* { dg-options "-O2" } */
 
7602
+
 
7603
+#include <string>
 
7604
+
 
7605
+std::string __attribute__ ((noinline)) comp_test_write() {
 
7606
+  std::string data;
 
7607
+
 
7608
+  for (int i = 0; i < 2; ++i) {
 
7609
+    char b = 1 >> (i * 8);
 
7610
+    data.append(&b, 1);
 
7611
+  }
 
7612
+
 
7613
+  return data;
 
7614
+}
 
7615
+
 
7616
+std::string __attribute__ ((noinline)) comp_test_write_good() {
 
7617
+  std::string data;
 
7618
+
 
7619
+  char b;
 
7620
+  for (int i = 0; i < 2; ++i) {
 
7621
+    b = 1 >> (i * 8);
 
7622
+    data.append(&b, 1);
 
7623
+  }
 
7624
+
 
7625
+  return data;
 
7626
+}
 
7627
+
 
7628
+int main() {
 
7629
+  std::string good = comp_test_write_good();
 
7630
+  std::string bad = comp_test_write();
 
7631
+
 
7632
+  if (good != bad)
 
7633
+    __builtin_abort ();
 
7634
+}
 
7635
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
 
7636
===================================================================
 
7637
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../tags/gcc_4_8_3_release)
 
7638
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../branches/gcc-4_8-branch)
 
7639
@@ -0,0 +1,23 @@
 
7640
+// PR c++/58624
 
7641
+
 
7642
+// { dg-do run { target c++11 } }
 
7643
+// { dg-add-options tls }
 
7644
+// { dg-require-effective-target tls_runtime }
 
7645
+
 
7646
+int i;
 
7647
+
 
7648
+template <typename> struct A
 
7649
+{
 
7650
+  static thread_local int s;
 
7651
+
 
7652
+  A () { i = s; }
 
7653
+};
 
7654
+
 
7655
+int f() { return 42; }
 
7656
+template <typename T> thread_local int A<T>::s = f();
 
7657
+
 
7658
+int main () {
 
7659
+  A<void> a;
 
7660
+  if (i != 42)
 
7661
+    __builtin_abort();
 
7662
+}
 
7663
Index: gcc/testsuite/g++.dg/parse/typename7.C
 
7664
===================================================================
 
7665
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../tags/gcc_4_8_3_release)
 
7666
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../branches/gcc-4_8-branch)
 
7667
@@ -7,10 +7,9 @@
 
7668
 
 
7669
 struct A
 
7670
 {
 
7671
-  template<typename>   void foo(int); // { dg-message "note" }
 
7672
-  template<typename T> void bar(T t) { // { dg-message "note" }
 
7673
+  template<typename>   void foo(int);
 
7674
+  template<typename T> void bar(T t) {
 
7675
     this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
7676
-  // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
 
7677
   template<typename T> void bad(T t) {
 
7678
     foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
7679
 };
 
7680
@@ -20,7 +19,6 @@
 
7681
 {
 
7682
   void bar(T t) {
 
7683
     A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
7684
-  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
 
7685
   void bad(T t) {
 
7686
     B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
 
7687
 };
 
7688
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
 
7689
===================================================================
 
7690
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../tags/gcc_4_8_3_release)
 
7691
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../branches/gcc-4_8-branch)
 
7692
@@ -1,2 +1,2 @@
 
7693
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
 
7694
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
 
7695
 // { dg-prune-output "array bound" }
 
7696
Index: gcc/testsuite/g++.dg/parse/ambig7.C
 
7697
===================================================================
 
7698
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../tags/gcc_4_8_3_release)
 
7699
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../branches/gcc-4_8-branch)
 
7700
@@ -0,0 +1,16 @@
 
7701
+// PR c++/60361
 
7702
+
 
7703
+struct Helper
 
7704
+{
 
7705
+  Helper(int a, void (*pfunc)());
 
7706
+};
 
7707
+
 
7708
+template <int I> void function();
 
7709
+
 
7710
+const int A = 1;
 
7711
+const int B = 2;
 
7712
+
 
7713
+Helper testOk(A, function<A>);
 
7714
+Helper testOk2(int(A), function<B>);
 
7715
+Helper testOk3((int(A)), function<A>);
 
7716
+Helper testFail(int(A), function<A>);
 
7717
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
 
7718
===================================================================
 
7719
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../tags/gcc_4_8_3_release)
 
7720
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../branches/gcc-4_8-branch)
 
7721
@@ -89,6 +89,9 @@
 
7722
 # This must be done after the compat-use-*-compiler definitions.
 
7723
 load_lib compat.exp
 
7724
 
 
7725
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
 
7726
+load_lib g++-dg.exp
 
7727
+
 
7728
 g++_init
 
7729
 
 
7730
 # Save variables for the C++ compiler under test, which each test will
 
7731
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
 
7732
===================================================================
 
7733
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../tags/gcc_4_8_3_release)
 
7734
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../branches/gcc-4_8-branch)
 
7735
@@ -1,5 +1,5 @@
 
7736
 /* Structure layout test generator.
 
7737
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
 
7738
+   Copyright (C) 2004-2014
 
7739
    Free Software Foundation, Inc.
 
7740
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
7741
 
 
7742
@@ -44,7 +44,7 @@
 
7743
 #endif
 
7744
 
 
7745
 const char *dg_options[] = {
 
7746
-"/* { dg-options \"%s-I%s\" } */\n",
 
7747
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 
7748
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 
7749
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 
7750
 "/* { 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",
 
7751
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
 
7752
===================================================================
 
7753
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
 
7754
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
 
7755
@@ -0,0 +1,28 @@
 
7756
+// PR c++/61959
 
7757
+// { dg-do compile { target c++11 } }
 
7758
+
 
7759
+template <class Coord> struct BasePoint
 
7760
+{
 
7761
+  Coord x, y;
 
7762
+  constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
 
7763
+};
 
7764
+template <class T> struct BaseCoord
 
7765
+{
 
7766
+  int value;
 
7767
+  constexpr BaseCoord (T) : value (1) {}
 
7768
+};
 
7769
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
 
7770
+{
 
7771
+  typedef BaseCoord Super;
 
7772
+  constexpr IntCoordTyped (int) : Super (0) {}
 
7773
+};
 
7774
+template <class units>
 
7775
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
 
7776
+{
 
7777
+  typedef BasePoint<IntCoordTyped<units> > Super;
 
7778
+  constexpr IntPointTyped (int, int) : Super (0, 0) {}
 
7779
+};
 
7780
+struct A
 
7781
+{
 
7782
+};
 
7783
+IntPointTyped<A> a (0, 0);
 
7784
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
 
7785
===================================================================
 
7786
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../tags/gcc_4_8_3_release)
 
7787
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../branches/gcc-4_8-branch)
 
7788
@@ -0,0 +1,9 @@
 
7789
+// PR c++/56710
 
7790
+// { dg-options "-std=c++11 -Wall" }
 
7791
+
 
7792
+int main()
 
7793
+{
 
7794
+    int t = 0;
 
7795
+    return [&]() -> int {int __t; __t = t; return __t; }();
 
7796
+    return [&t]() -> int {int __t; __t = t; return __t; }();
 
7797
+}
 
7798
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
 
7799
===================================================================
 
7800
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../tags/gcc_4_8_3_release)
 
7801
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../branches/gcc-4_8-branch)
 
7802
@@ -0,0 +1,24 @@
 
7803
+// PR c++/61134
 
7804
+// { dg-do compile { target c++11 } }
 
7805
+
 
7806
+struct Base { };
 
7807
+
 
7808
+template <typename>
 
7809
+struct Fixed {
 
7810
+  typedef const char* name;
 
7811
+};
 
7812
+
 
7813
+template <typename VT, typename... Fields>
 
7814
+void New(const char* name,
 
7815
+         typename Fixed<Fields>::name... field_names);
 
7816
+
 
7817
+template <typename VT, typename... Fields>
 
7818
+void CreateMetric(const char* name,
 
7819
+                  typename Fixed<Fields>::name... field_names,
 
7820
+                  const Base&) { }
 
7821
+
 
7822
+
 
7823
+void Fn()
 
7824
+{
 
7825
+  CreateMetric<int, const char*>("abcd", "def", Base());
 
7826
+}
 
7827
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
 
7828
===================================================================
 
7829
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../tags/gcc_4_8_3_release)
 
7830
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../branches/gcc-4_8-branch)
 
7831
@@ -0,0 +1,7 @@
 
7832
+// PR c++/63415
 
7833
+// { dg-do compile { target c++11 } }
 
7834
+
 
7835
+template <typename T>
 
7836
+struct A {
 
7837
+  static constexpr int value = int(T{});
 
7838
+};
 
7839
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
 
7840
===================================================================
 
7841
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../tags/gcc_4_8_3_release)
 
7842
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../branches/gcc-4_8-branch)
 
7843
@@ -0,0 +1,49 @@
 
7844
+// PR c++/61539
 
7845
+// { dg-do compile { target c++11 } }
 
7846
+
 
7847
+template <typename _CharT> class A;
 
7848
+template <typename> class B;
 
7849
+template <class charT> class C;
 
7850
+template <> class C<char>
 
7851
+{
 
7852
+  virtual void xparse (int &, const B<A<char> > &) const;
 
7853
+};
 
7854
+template <class T, class charT = char> class G : C<charT>
 
7855
+{
 
7856
+public:
 
7857
+  G (void *) {}
 
7858
+  void default_value (const T &);
 
7859
+  void xparse (int &, const B<A<charT> > &) const;
 
7860
+};
 
7861
+template <class T, class charT>
 
7862
+void validate (int &, const B<A<charT> > &, T *, int);
 
7863
+template <class T, class charT>
 
7864
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
 
7865
+{
 
7866
+  validate (p1, p2, (T *)0, 0);
 
7867
+}
 
7868
+template <class T> G<T> *value (T *) { return new G<T>(0); }
 
7869
+namespace Eigen
 
7870
+{
 
7871
+template <typename T> struct D;
 
7872
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
 
7873
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
 
7874
+          int _MaxCols>
 
7875
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
 
7876
+{
 
7877
+  typedef _Scalar Scalar;
 
7878
+};
 
7879
+template <typename, int, int, int, int, int _MaxCols> class F
 
7880
+{
 
7881
+public:
 
7882
+  typedef typename Eigen::D<F>::Scalar Scalar;
 
7883
+  F (const Scalar &, const Scalar &, const Scalar &);
 
7884
+};
 
7885
+template <class... T>
 
7886
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
 
7887
+}
 
7888
+int main (int, char *[])
 
7889
+{
 
7890
+  Eigen::F<double, 3, 1> a (0, 0, 0);
 
7891
+  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
 
7892
+}
 
7893
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
 
7894
===================================================================
 
7895
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
 
7896
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
 
7897
@@ -0,0 +1,13 @@
 
7898
+// PR c++/58714
 
7899
+// { dg-do compile { target c++11 } }
 
7900
+
 
7901
+struct X {
 
7902
+  X& operator=(const X&) = delete;
 
7903
+  X& operator=(X&& ) = default;
 
7904
+};
 
7905
+
 
7906
+void f(bool t) {
 
7907
+  X a, b;
 
7908
+  *(t ? &a : &b) = X();
 
7909
+  (t ? a : b) = X();
 
7910
+}
 
7911
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
 
7912
===================================================================
 
7913
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../tags/gcc_4_8_3_release)
 
7914
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../branches/gcc-4_8-branch)
 
7915
@@ -0,0 +1,17 @@
 
7916
+// PR c++/59823
 
7917
+// { dg-options "-std=c++11" }
 
7918
+
 
7919
+struct X { };
 
7920
+
 
7921
+void f(X&&);                   // { dg-message "void f" }
 
7922
+
 
7923
+struct wrap
 
7924
+{
 
7925
+  operator const X&() const;
 
7926
+};
 
7927
+
 
7928
+int main()
 
7929
+{
 
7930
+  wrap w;
 
7931
+  f(w);                                // { dg-error "lvalue" }
 
7932
+}
 
7933
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
 
7934
===================================================================
 
7935
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../tags/gcc_4_8_3_release)
 
7936
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../branches/gcc-4_8-branch)
 
7937
@@ -0,0 +1,56 @@
 
7938
+// PR ipa/63838
 
7939
+// { dg-do run }
 
7940
+// { dg-options "-O2 -fdump-ipa-pure-const" }
 
7941
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
 
7942
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
 
7943
+// { dg-final { cleanup-ipa-dump "pure-const" } }
 
7944
+
 
7945
+__attribute__((noinline, noclone)) static void bar (int);
 
7946
+volatile int v;
 
7947
+void (*fn) ();
 
7948
+struct S { S () { v++; } ~S () { v++; } };
 
7949
+
 
7950
+__attribute__((noinline, noclone)) static void
 
7951
+foo (int x)
 
7952
+{
 
7953
+  v++;
 
7954
+  if (x == 5)
 
7955
+    bar (x);
 
7956
+}
 
7957
+
 
7958
+__attribute__((noinline, noclone)) static void
 
7959
+bar (int x)
 
7960
+{
 
7961
+  v++;
 
7962
+  if (x == 6)
 
7963
+    foo (x);
 
7964
+  else if (x == 5)
 
7965
+    fn ();
 
7966
+}
 
7967
+
 
7968
+__attribute__((noinline, noclone)) int
 
7969
+baz (int x)
 
7970
+{
 
7971
+  S s;
 
7972
+  foo (x);
 
7973
+}
 
7974
+
 
7975
+void
 
7976
+throw0 ()
 
7977
+{
 
7978
+  throw 0;
 
7979
+}
 
7980
+
 
7981
+int
 
7982
+main ()
 
7983
+{
 
7984
+  fn = throw0;
 
7985
+  asm volatile ("" : : : "memory");
 
7986
+  try
 
7987
+    {
 
7988
+      baz (5);
 
7989
+    }
 
7990
+  catch (int)
 
7991
+    {
 
7992
+    }
 
7993
+}
 
7994
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
 
7995
===================================================================
 
7996
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../tags/gcc_4_8_3_release)
 
7997
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../branches/gcc-4_8-branch)
 
7998
@@ -0,0 +1,55 @@
 
7999
+/* { dg-do run } */
 
8000
+/* { dg-options "-O3 -std=c++11"  } */
 
8001
+
 
8002
+
 
8003
+extern "C" int printf(const char *fmt, ...);
 
8004
+extern "C" void abort(void);
 
8005
+
 
8006
+struct Side {
 
8007
+    enum _Value { Left, Right, Invalid };
 
8008
+
 
8009
+    constexpr Side() : _value(Invalid) {}
 
8010
+    constexpr Side(_Value value) : _value(value) {}
 
8011
+    operator _Value() const { return (_Value)_value; }
 
8012
+
 
8013
+  private:
 
8014
+    char _value;
 
8015
+};
 
8016
+
 
8017
+struct A {
 
8018
+    void init();
 
8019
+    void adjust(Side side, bool final);
 
8020
+    void move(Side side);
 
8021
+};
 
8022
+
 
8023
+void A::init()
 
8024
+{
 
8025
+    adjust(Side::Invalid, false);
 
8026
+}
 
8027
+
 
8028
+static void __attribute__((noinline))
 
8029
+check (int v, int final)
 
8030
+{
 
8031
+    if (v != 0)
 
8032
+      abort();
 
8033
+}
 
8034
+
 
8035
+
 
8036
+__attribute__((noinline))
 
8037
+void A::adjust(Side side, bool final)
 
8038
+{
 
8039
+  check ((int)side, final);
 
8040
+}
 
8041
+
 
8042
+void A::move(Side side)
 
8043
+{
 
8044
+    adjust(side, false);
 
8045
+    adjust(side, true);
 
8046
+}
 
8047
+
 
8048
+int main()
 
8049
+{
 
8050
+    A t;
 
8051
+    t.move(Side::Left);
 
8052
+    return 0;
 
8053
+}
 
8054
Index: gcc/testsuite/g++.dg/template/local-fn1.C
 
8055
===================================================================
 
8056
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../tags/gcc_4_8_3_release)
 
8057
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../branches/gcc-4_8-branch)
 
8058
@@ -0,0 +1,8 @@
 
8059
+// PR c++/60605
 
8060
+
 
8061
+template <typename T = int>
 
8062
+struct Foo {
 
8063
+    void bar() {
 
8064
+        void bug();
 
8065
+    }
 
8066
+};
 
8067
Index: gcc/testsuite/g++.dg/template/conv14.C
 
8068
===================================================================
 
8069
--- a/src/gcc/testsuite/g++.dg/template/conv14.C        (.../tags/gcc_4_8_3_release)
 
8070
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C        (.../branches/gcc-4_8-branch)
 
8071
@@ -0,0 +1,30 @@
 
8072
+// PR c++/61647
 
8073
+
 
8074
+class XX;
 
8075
+
 
8076
+template<typename Container, typename Key>
 
8077
+struct Accessor;
 
8078
+
 
8079
+template<typename Container, typename Key, typename KeyStore = Key>
 
8080
+class Variant {
 
8081
+protected:
 
8082
+    KeyStore index;
 
8083
+    Container state;
 
8084
+public:
 
8085
+    Variant(Container st, const Key& i) : index(i), state(st) {}
 
8086
+
 
8087
+    template<typename T>
 
8088
+    operator T() const {
 
8089
+        return Accessor<Container, KeyStore>::template get<T>(state, index);
 
8090
+    }
 
8091
+};
 
8092
+
 
8093
+class AutoCleanVariant : public Variant<XX*, int> {
 
8094
+public:
 
8095
+    AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
 
8096
+
 
8097
+    template<typename T>
 
8098
+    operator T() const {
 
8099
+         return Variant<XX*, int>::operator T();
 
8100
+    }
 
8101
+};
 
8102
Index: gcc/testsuite/g++.dg/template/friend55.C
 
8103
===================================================================
 
8104
--- a/src/gcc/testsuite/g++.dg/template/friend55.C      (.../tags/gcc_4_8_3_release)
 
8105
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C      (.../branches/gcc-4_8-branch)
 
8106
@@ -0,0 +1,18 @@
 
8107
+// PR c++/59956
 
8108
+
 
8109
+template <int I> struct A;
 
8110
+template <int I> class B {
 
8111
+  int i;
 
8112
+  template <int A_S> friend void A<A_S>::impl();
 
8113
+};
 
8114
+
 
8115
+B<0> b1;
 
8116
+template<int I>struct A { void impl(); };
 
8117
+B<1> b2;
 
8118
+
 
8119
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
 
8120
+
 
8121
+int main()
 
8122
+{
 
8123
+  A<0>().impl();
 
8124
+}
 
8125
Index: gcc/testsuite/g++.dg/template/memclass5.C
 
8126
===================================================================
 
8127
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../tags/gcc_4_8_3_release)
 
8128
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../branches/gcc-4_8-branch)
 
8129
@@ -0,0 +1,26 @@
 
8130
+// PR c++/60241
 
8131
+
 
8132
+template <typename T>
 
8133
+struct x
 
8134
+{
 
8135
+    template <typename U>
 
8136
+    struct y
 
8137
+    {
 
8138
+        typedef T result2;
 
8139
+    };
 
8140
+
 
8141
+    typedef y<int> zy;
 
8142
+};
 
8143
+
 
8144
+template<>
 
8145
+template<class T>
 
8146
+struct x<int>::y
 
8147
+{
 
8148
+    typedef double result2;
 
8149
+};
 
8150
+
 
8151
+int main()
 
8152
+{
 
8153
+    x<int>::zy::result2 xxx;
 
8154
+    x<int>::y<int>::result2 xxx2;
 
8155
+}
 
8156
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
 
8157
===================================================================
 
8158
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../tags/gcc_4_8_3_release)
 
8159
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../branches/gcc-4_8-branch)
 
8160
@@ -0,0 +1,22 @@
 
8161
+// PR c++/61500
 
8162
+
 
8163
+struct X {
 
8164
+  int i;
 
8165
+  int j;
 
8166
+
 
8167
+  int foo(int X::* ptr);
 
8168
+
 
8169
+  template <int X::* ptr>
 
8170
+  int bar();
 
8171
+};
 
8172
+
 
8173
+int X::foo(int X::* ptr) {
 
8174
+  int* p = &(this->*ptr);  // OK.
 
8175
+  return *p;
 
8176
+}
 
8177
+
 
8178
+template <int X::* ptr>
 
8179
+int X::bar() {
 
8180
+  int* p = &(this->*ptr);  // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
 
8181
+  return *p;
 
8182
+}
 
8183
Index: gcc/testsuite/c-c++-common/pr56493.c
 
8184
===================================================================
 
8185
--- a/src/gcc/testsuite/c-c++-common/pr56493.c  (.../tags/gcc_4_8_3_release)
 
8186
+++ b/src/gcc/testsuite/c-c++-common/pr56493.c  (.../branches/gcc-4_8-branch)
 
8187
@@ -0,0 +1,16 @@
 
8188
+/* PR c++/56493 */
 
8189
+/* { dg-do compile } */
 
8190
+/* { dg-options "-O2 -fdump-tree-gimple" } */
 
8191
+
 
8192
+unsigned long long bar (void);
 
8193
+int x;
 
8194
+
 
8195
+void
 
8196
+foo (void)
 
8197
+{
 
8198
+  x += bar ();
 
8199
+}
 
8200
+
 
8201
+/* Verify we narrow the addition from unsigned long long to unsigned int type.  */
 
8202
+/* { 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 } } } } */
 
8203
+/* { dg-final { cleanup-tree-dump "gimple" } } */
 
8204
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
 
8205
===================================================================
 
8206
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../tags/gcc_4_8_3_release)
 
8207
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../branches/gcc-4_8-branch)
 
8208
@@ -0,0 +1,13 @@
 
8209
+/* PR libgomp/61200 */
 
8210
+
 
8211
+int
 
8212
+main ()
 
8213
+{
 
8214
+  int var = 1;
 
8215
+  #pragma omp parallel
 
8216
+    if (var != 1)
 
8217
+      __builtin_abort ();
 
8218
+  #pragma omp task shared(var)
 
8219
+    var = 2;
 
8220
+  return 0;
 
8221
+}
 
8222
Index: gcc/cp/tree.c
 
8223
===================================================================
 
8224
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
 
8225
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
 
8226
@@ -97,6 +97,16 @@
 
8227
     case IMAGPART_EXPR:
 
8228
       return lvalue_kind (TREE_OPERAND (ref, 0));
 
8229
 
 
8230
+    case MEMBER_REF:
 
8231
+    case DOTSTAR_EXPR:
 
8232
+      if (TREE_CODE (ref) == MEMBER_REF)
 
8233
+       op1_lvalue_kind = clk_ordinary;
 
8234
+      else
 
8235
+       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
8236
+      if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
 
8237
+       op1_lvalue_kind = clk_none;
 
8238
+      return op1_lvalue_kind;
 
8239
+
 
8240
     case COMPONENT_REF:
 
8241
       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
8242
       /* Look at the member designator.  */
 
8243
@@ -3738,6 +3748,10 @@
 
8244
     {
 
8245
       init_expr = get_target_expr (exp);
 
8246
       exp = TARGET_EXPR_SLOT (init_expr);
 
8247
+      if (CLASS_TYPE_P (TREE_TYPE (exp)))
 
8248
+       exp = move (exp);
 
8249
+      else
 
8250
+       exp = rvalue (exp);
 
8251
     }
 
8252
   else
 
8253
     {
 
8254
Index: gcc/cp/ChangeLog
 
8255
===================================================================
 
8256
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
8257
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_8-branch)
 
8258
@@ -1,3 +1,87 @@
 
8259
+2014-10-15  Jason Merrill  <jason@redhat.com>
 
8260
+
 
8261
+       PR c++/63455
 
8262
+       Revert:
 
8263
+       * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
 
8264
+       committed to this tentative parse.
 
8265
+
 
8266
+       PR c++/63415
 
8267
+       * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
 
8268
+       (iterative_hash_template_arg): Likewise.
 
8269
+
 
8270
+       PR c++/56710
 
8271
+       * semantics.c (finish_member_declaration): Don't push closure
 
8272
+       members.
 
8273
+
 
8274
+       PR c++/58624
 
8275
+       * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
 
8276
+       * semantics.c (finish_id_expression): Don't call TLS wrapper in a
 
8277
+       template.
 
8278
+
 
8279
+2014-08-07  Jason Merrill  <jason@redhat.com>
 
8280
+
 
8281
+       PR c++/61959
 
8282
+       * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
 
8283
+
 
8284
+       PR c++/58714
 
8285
+       * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
 
8286
+
 
8287
+2014-01-27  Jason Merrill  <jason@redhat.com>
 
8288
+
 
8289
+       PR c++/59823
 
8290
+       Core DR 1138
 
8291
+       * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
 
8292
+       list-initialization.  A conversion to rvalue ref that involves
 
8293
+       an lvalue-rvalue conversion is bad.
 
8294
+       (convert_like_real): Give helpful error message.
 
8295
+
 
8296
+2014-01-29  Jason Merrill  <jason@redhat.com>
 
8297
+
 
8298
+       PR c++/59956
 
8299
+       * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
 
8300
+       have a friend template in a class template.
 
8301
+       * pt.c (tsubst_friend_function): Look through it.
 
8302
+       (push_template_decl_real): A friend member template is
 
8303
+       primary.
 
8304
+
 
8305
+2014-02-21  Jason Merrill  <jason@redhat.com>
 
8306
+
 
8307
+       PR c++/60241
 
8308
+       * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
 
8309
+       of the partial instantiation, not the most general template.
 
8310
+       (maybe_process_partial_specialization): Reassign everything on
 
8311
+       that list.
 
8312
+
 
8313
+2014-03-05  Jason Merrill  <jason@redhat.com>
 
8314
+
 
8315
+       PR c++/60361
 
8316
+       * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
 
8317
+       if re-parsing might succeed.
 
8318
+       * semantics.c (finish_id_expression): Use of a parameter outside
 
8319
+       the function body is a parse error.
 
8320
+
 
8321
+2014-06-30  Jason Merrill  <jason@redhat.com>
 
8322
+
 
8323
+       PR c++/61647
 
8324
+       * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
 
8325
+
 
8326
+       PR c++/61539
 
8327
+       * pt.c (unify_one_argument): Type/expression mismatch just causes
 
8328
+       deduction failure.
 
8329
+
 
8330
+       PR c++/61500
 
8331
+       * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
 
8332
+
 
8333
+2014-06-17  Jason Merrill  <jason@redhat.com>
 
8334
+
 
8335
+       PR c++/60605
 
8336
+       * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
 
8337
+
 
8338
+2014-06-02  Jason Merrill  <jason@redhat.com>
 
8339
+
 
8340
+       PR c++/61134
 
8341
+       * pt.c (pack_deducible_p): Handle canonicalization.
 
8342
+
 
8343
 2014-05-22  Release Manager
 
8344
 
 
8345
        * GCC 4.8.3 released.
 
8346
Index: gcc/cp/pt.c
 
8347
===================================================================
 
8348
--- a/src/gcc/cp/pt.c   (.../tags/gcc_4_8_3_release)
 
8349
+++ b/src/gcc/cp/pt.c   (.../branches/gcc-4_8-branch)
 
8350
@@ -907,11 +907,13 @@
 
8351
               t; t = TREE_CHAIN (t))
 
8352
            {
 
8353
              tree inst = TREE_VALUE (t);
 
8354
-             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
 
8355
+             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
 
8356
+                 || !COMPLETE_OR_OPEN_TYPE_P (inst))
 
8357
                {
 
8358
                  /* We already have a full specialization of this partial
 
8359
-                    instantiation.  Reassign it to the new member
 
8360
-                    specialization template.  */
 
8361
+                    instantiation, or a full specialization has been
 
8362
+                    looked up but not instantiated.  Reassign it to the
 
8363
+                    new member specialization template.  */
 
8364
                  spec_entry elt;
 
8365
                  spec_entry *entry;
 
8366
                  void **slot;
 
8367
@@ -930,7 +932,7 @@
 
8368
                  *entry = elt;
 
8369
                  *slot = entry;
 
8370
                }
 
8371
-             else if (COMPLETE_OR_OPEN_TYPE_P (inst))
 
8372
+             else
 
8373
                /* But if we've had an implicit instantiation, that's a
 
8374
                   problem ([temp.expl.spec]/6).  */
 
8375
                error ("specialization %qT after instantiation %qT",
 
8376
@@ -1569,6 +1571,7 @@
 
8377
     case CONSTRUCTOR:
 
8378
       {
 
8379
        tree field, value;
 
8380
+       iterative_hash_template_arg (TREE_TYPE (arg), val);
 
8381
        FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
 
8382
          {
 
8383
            val = iterative_hash_template_arg (field, val);
 
8384
@@ -4308,7 +4311,8 @@
 
8385
      in the template-parameter-list of the definition of a member of a
 
8386
      class template.  */
 
8387
 
 
8388
-  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
 
8389
+  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
 
8390
+      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
 
8391
     /* You can't have a function template declaration in a local
 
8392
        scope, nor you can you define a member of a class template in a
 
8393
        local scope.  */
 
8394
@@ -4572,7 +4576,8 @@
 
8395
     DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
 
8396
 
 
8397
   /* See if this is a primary template.  */
 
8398
-  if (is_friend && ctx)
 
8399
+  if (is_friend && ctx
 
8400
+      && uses_template_parms_level (ctx, processing_template_decl))
 
8401
     /* A friend template that specifies a class context, i.e.
 
8402
          template <typename T> friend void A<T>::f();
 
8403
        is not primary.  */
 
8404
@@ -7454,7 +7459,7 @@
 
8405
        }
 
8406
 
 
8407
       /* Let's consider the explicit specialization of a member
 
8408
-         of a class template specialization that is implicitely instantiated,
 
8409
+         of a class template specialization that is implicitly instantiated,
 
8410
         e.g.:
 
8411
             template<class T>
 
8412
             struct S
 
8413
@@ -7552,9 +7557,9 @@
 
8414
 
 
8415
       /* Note this use of the partial instantiation so we can check it
 
8416
         later in maybe_process_partial_specialization.  */
 
8417
-      DECL_TEMPLATE_INSTANTIATIONS (templ)
 
8418
+      DECL_TEMPLATE_INSTANTIATIONS (found)
 
8419
        = tree_cons (arglist, t,
 
8420
-                    DECL_TEMPLATE_INSTANTIATIONS (templ));
 
8421
+                    DECL_TEMPLATE_INSTANTIATIONS (found));
 
8422
 
 
8423
       if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
 
8424
        /* Now that the type has been registered on the instantiations
 
8425
@@ -8289,10 +8294,17 @@
 
8426
 
 
8427
       if (COMPLETE_TYPE_P (context))
 
8428
        {
 
8429
+         tree fn = new_friend;
 
8430
+         /* do_friend adds the TEMPLATE_DECL for any member friend
 
8431
+            template even if it isn't a member template, i.e.
 
8432
+              template <class T> friend A<T>::f();
 
8433
+            Look through it in that case.  */
 
8434
+         if (TREE_CODE (fn) == TEMPLATE_DECL
 
8435
+             && !PRIMARY_TEMPLATE_P (fn))
 
8436
+           fn = DECL_TEMPLATE_RESULT (fn);
 
8437
          /* Check to see that the declaration is really present, and,
 
8438
             possibly obtain an improved declaration.  */
 
8439
-         tree fn = check_classfn (context,
 
8440
-                                  new_friend, NULL_TREE);
 
8441
+         fn = check_classfn (context, fn, NULL_TREE);
 
8442
 
 
8443
          if (fn)
 
8444
            new_friend = fn;
 
8445
@@ -14488,6 +14500,16 @@
 
8446
     case PARM_DECL:
 
8447
       {
 
8448
        tree r = tsubst_copy (t, args, complain, in_decl);
 
8449
+       if (TREE_CODE (r) == VAR_DECL
 
8450
+           && !processing_template_decl
 
8451
+           && !cp_unevaluated_operand
 
8452
+           && DECL_THREAD_LOCAL_P (r))
 
8453
+         {
 
8454
+           if (tree wrap = get_tls_wrapper_fn (r))
 
8455
+             /* Replace an evaluated use of the thread_local variable with
 
8456
+                a call to its wrapper.  */
 
8457
+             r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
 
8458
+         }
 
8459
 
 
8460
        if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
 
8461
          /* If the original type was a reference, we'll be wrapped in
 
8462
@@ -14934,7 +14956,7 @@
 
8463
        continue;
 
8464
       for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
 
8465
           packs; packs = TREE_CHAIN (packs))
 
8466
-       if (TREE_VALUE (packs) == parm)
 
8467
+       if (template_args_equal (TREE_VALUE (packs), parm))
 
8468
          {
 
8469
            /* The template parameter pack is used in a function parameter
 
8470
               pack.  If this is the end of the parameter list, the
 
8471
@@ -15502,8 +15524,9 @@
 
8472
        maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
 
8473
     }
 
8474
   else
 
8475
-    gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
8476
-               == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
 
8477
+    if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
8478
+       != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
 
8479
+      return unify_template_argument_mismatch (explain_p, parm, arg);
 
8480
 
 
8481
   /* For deduction from an init-list we need the actual list.  */
 
8482
   if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
 
8483
@@ -19804,6 +19827,8 @@
 
8484
       {
 
8485
        unsigned ix;
 
8486
        tree val;
 
8487
+       if (dependent_type_p (TREE_TYPE (expression)))
 
8488
+         return true;
 
8489
        FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
 
8490
          if (value_dependent_expression_p (val))
 
8491
            return true;
 
8492
@@ -20009,7 +20034,12 @@
 
8493
        return true;
 
8494
 
 
8495
       if (BASELINK_P (expression))
 
8496
-       expression = BASELINK_FUNCTIONS (expression);
 
8497
+       {
 
8498
+         if (BASELINK_OPTYPE (expression)
 
8499
+             && dependent_type_p (BASELINK_OPTYPE (expression)))
 
8500
+           return true;
 
8501
+         expression = BASELINK_FUNCTIONS (expression);
 
8502
+       }
 
8503
 
 
8504
       if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
 
8505
        {
 
8506
Index: gcc/cp/semantics.c
 
8507
===================================================================
 
8508
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_8_3_release)
 
8509
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_8-branch)
 
8510
@@ -2735,8 +2735,10 @@
 
8511
                                              /*friend_p=*/0);
 
8512
        }
 
8513
     }
 
8514
-  /* Enter the DECL into the scope of the class.  */
 
8515
-  else if (pushdecl_class_level (decl))
 
8516
+  /* Enter the DECL into the scope of the class, if the class
 
8517
+     isn't a closure (whose fields are supposed to be unnamed).  */
 
8518
+  else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
 
8519
+          || pushdecl_class_level (decl))
 
8520
     {
 
8521
       if (TREE_CODE (decl) == USING_DECL)
 
8522
        {
 
8523
@@ -3108,7 +3110,7 @@
 
8524
          && DECL_CONTEXT (decl) == NULL_TREE
 
8525
          && !cp_unevaluated_operand)
 
8526
        {
 
8527
-         error ("use of parameter %qD outside function body", decl);
 
8528
+         *error_msg = "use of parameter outside function body";
 
8529
          return error_mark_node;
 
8530
        }
 
8531
     }
 
8532
@@ -3343,6 +3345,7 @@
 
8533
       tree wrap;
 
8534
       if (TREE_CODE (decl) == VAR_DECL
 
8535
          && !cp_unevaluated_operand
 
8536
+         && !processing_template_decl
 
8537
          && DECL_THREAD_LOCAL_P (decl)
 
8538
          && (wrap = get_tls_wrapper_fn (decl)))
 
8539
        {
 
8540
@@ -7296,7 +7299,9 @@
 
8541
          constructor_elt *inner = base_field_constructor_elt (n, ce->index);
 
8542
          inner->value = elt;
 
8543
        }
 
8544
-      else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
 
8545
+      else if (ce->index
 
8546
+              && (TREE_CODE (ce->index) == NOP_EXPR
 
8547
+                  || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
 
8548
        {
 
8549
          /* This is an initializer for an empty base; now that we've
 
8550
             checked that it's constant, we can ignore it.  */
 
8551
Index: gcc/cp/parser.c
 
8552
===================================================================
 
8553
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_8_3_release)
 
8554
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_8-branch)
 
8555
@@ -12831,7 +12831,12 @@
 
8556
      the effort required to do the parse, nor will we issue duplicate
 
8557
      error messages about problems during instantiation of the
 
8558
      template.  */
 
8559
-  if (start_of_id)
 
8560
+  if (start_of_id
 
8561
+      /* Don't do this if we had a parse error in a declarator; re-parsing
 
8562
+        might succeed if a name changes meaning (60361).  */
 
8563
+      && !(cp_parser_error_occurred (parser)
 
8564
+          && cp_parser_parsing_tentatively (parser)
 
8565
+          && parser->in_declarator_p))
 
8566
     {
 
8567
       cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
 
8568
 
 
8569
@@ -23774,8 +23779,6 @@
 
8570
 static void
 
8571
 cp_parser_abort_tentative_parse (cp_parser* parser)
 
8572
 {
 
8573
-  gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
 
8574
-             || errorcount > 0);
 
8575
   cp_parser_simulate_error (parser);
 
8576
   /* Now, pretend that we want to see if the construct was
 
8577
      successfully parsed.  */
 
8578
Index: gcc/cp/call.c
 
8579
===================================================================
 
8580
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
 
8581
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
 
8582
@@ -1464,7 +1464,7 @@
 
8583
     {
 
8584
       maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
 
8585
       conv = implicit_conversion (to, from, expr, c_cast_p,
 
8586
-                                 flags, complain);
 
8587
+                                 flags|LOOKUP_NO_TEMP_BIND, complain);
 
8588
       if (!CLASS_TYPE_P (to)
 
8589
          && CONSTRUCTOR_NELTS (expr) == 1)
 
8590
        {
 
8591
@@ -1624,9 +1624,9 @@
 
8592
 
 
8593
   /* [dcl.init.ref]
 
8594
 
 
8595
-     Otherwise, the reference shall be to a non-volatile const type.
 
8596
-
 
8597
-     Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
 
8598
+     Otherwise, the reference shall be an lvalue reference to a
 
8599
+     non-volatile const type, or the reference shall be an rvalue
 
8600
+     reference.  */
 
8601
   if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
 
8602
     return NULL;
 
8603
 
 
8604
@@ -1664,7 +1664,16 @@
 
8605
   /* This reference binding, unlike those above, requires the
 
8606
      creation of a temporary.  */
 
8607
   conv->need_temporary_p = true;
 
8608
-  conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
 
8609
+  if (TYPE_REF_IS_RVALUE (rto))
 
8610
+    {
 
8611
+      conv->rvaluedness_matches_p = 1;
 
8612
+      /* In the second case, if the reference is an rvalue reference and
 
8613
+        the second standard conversion sequence of the user-defined
 
8614
+        conversion sequence includes an lvalue-to-rvalue conversion, the
 
8615
+        program is ill-formed.  */
 
8616
+      if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
 
8617
+       conv->bad_p = 1;
 
8618
+    }
 
8619
 
 
8620
   return conv;
 
8621
 }
 
8622
@@ -5811,7 +5820,7 @@
 
8623
       && convs->kind != ck_list
 
8624
       && convs->kind != ck_ambig
 
8625
       && (convs->kind != ck_ref_bind
 
8626
-         || convs->user_conv_p)
 
8627
+         || (convs->user_conv_p && next_conversion (convs)->bad_p))
 
8628
       && (convs->kind != ck_rvalue
 
8629
          || SCALAR_TYPE_P (totype))
 
8630
       && convs->kind != ck_base)
 
8631
@@ -6110,7 +6119,8 @@
 
8632
        if (convs->bad_p && !next_conversion (convs)->bad_p)
 
8633
          {
 
8634
            gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
 
8635
-                       && real_lvalue_p (expr));
 
8636
+                       && (real_lvalue_p (expr)
 
8637
+                           || next_conversion(convs)->kind == ck_rvalue));
 
8638
 
 
8639
            error_at (loc, "cannot bind %qT lvalue to %qT",
 
8640
                      TREE_TYPE (expr), totype);
 
8641
Index: gcc/cp/friend.c
 
8642
===================================================================
 
8643
--- a/src/gcc/cp/friend.c       (.../tags/gcc_4_8_3_release)
 
8644
+++ b/src/gcc/cp/friend.c       (.../branches/gcc-4_8-branch)
 
8645
@@ -502,7 +502,13 @@
 
8646
                                  ? current_template_parms
 
8647
                                  : NULL_TREE);
 
8648
 
 
8649
-         if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
8650
+         if ((template_member_p
 
8651
+              /* Always pull out the TEMPLATE_DECL if we have a friend
 
8652
+                 template in a class template so that it gets tsubsted
 
8653
+                 properly later on (59956).  tsubst_friend_function knows
 
8654
+                 how to tell this apart from a member template.  */
 
8655
+              || (class_template_depth && friend_depth))
 
8656
+             && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
8657
            decl = DECL_TI_TEMPLATE (decl);
 
8658
 
 
8659
          if (decl)
 
8660
Index: gcc/haifa-sched.c
 
8661
===================================================================
 
8662
--- a/src/gcc/haifa-sched.c     (.../tags/gcc_4_8_3_release)
 
8663
+++ b/src/gcc/haifa-sched.c     (.../branches/gcc-4_8-branch)
 
8664
@@ -2931,7 +2931,7 @@
 
8665
 {
 
8666
   advance_state (curr_state);
 
8667
   if (sched_verbose >= 6)
 
8668
-    fprintf (sched_dump, ";;\tAdvanced a state.\n");
 
8669
+    fprintf (sched_dump, ";;\tAdvance the current state.\n");
 
8670
 }
 
8671
 
 
8672
 /* Update register pressure after scheduling INSN.  */
 
8673
@@ -5964,6 +5964,7 @@
 
8674
   modulo_insns_scheduled = 0;
 
8675
 
 
8676
   ls.modulo_epilogue = false;
 
8677
+  ls.first_cycle_insn_p = true;
 
8678
 
 
8679
   /* Loop until all the insns in BB are scheduled.  */
 
8680
   while ((*current_sched_info->schedule_more_p) ())
 
8681
@@ -6034,7 +6035,6 @@
 
8682
       if (must_backtrack)
 
8683
        goto do_backtrack;
 
8684
 
 
8685
-      ls.first_cycle_insn_p = true;
 
8686
       ls.shadows_only_p = false;
 
8687
       cycle_issued_insns = 0;
 
8688
       ls.can_issue_more = issue_rate;
 
8689
@@ -6321,11 +6321,13 @@
 
8690
              break;
 
8691
            }
 
8692
        }
 
8693
+      ls.first_cycle_insn_p = true;
 
8694
     }
 
8695
   if (ls.modulo_epilogue)
 
8696
     success = true;
 
8697
  end_schedule:
 
8698
-  advance_one_cycle ();
 
8699
+  if (!ls.first_cycle_insn_p)
 
8700
+    advance_one_cycle ();
 
8701
   perform_replacements_new_cycle ();
 
8702
   if (modulo_ii > 0)
 
8703
     {
 
8704
Index: gcc/double-int.c
 
8705
===================================================================
 
8706
--- a/src/gcc/double-int.c      (.../tags/gcc_4_8_3_release)
 
8707
+++ b/src/gcc/double-int.c      (.../branches/gcc-4_8-branch)
 
8708
@@ -616,7 +616,7 @@
 
8709
                 == (unsigned HOST_WIDE_INT) htwice)
 
8710
                && (labs_den <= ltwice)))
 
8711
          {
 
8712
-           if (*hquo < 0)
 
8713
+           if (quo_neg)
 
8714
              /* quo = quo - 1;  */
 
8715
              add_double (*lquo, *hquo,
 
8716
                          (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
 
8717
Index: gcc/ipa-pure-const.c
 
8718
===================================================================
 
8719
--- a/src/gcc/ipa-pure-const.c  (.../tags/gcc_4_8_3_release)
 
8720
+++ b/src/gcc/ipa-pure-const.c  (.../branches/gcc-4_8-branch)
 
8721
@@ -1429,7 +1429,7 @@
 
8722
              else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
 
8723
                can_throw = true;
 
8724
            }
 
8725
-          for (ie = node->indirect_calls; ie; ie = ie->next_callee)
 
8726
+          for (ie = w->indirect_calls; ie; ie = ie->next_callee)
 
8727
            if (ie->can_throw_external)
 
8728
              can_throw = true;
 
8729
          w_info = (struct ipa_dfs_info *) w->symbol.aux;
 
8730
Index: gcc/tree-ssa-math-opts.c
 
8731
===================================================================
 
8732
--- a/src/gcc/tree-ssa-math-opts.c      (.../tags/gcc_4_8_3_release)
 
8733
+++ b/src/gcc/tree-ssa-math-opts.c      (.../branches/gcc-4_8-branch)
 
8734
@@ -1537,7 +1537,7 @@
 
8735
 
 
8736
 struct symbolic_number {
 
8737
   unsigned HOST_WIDEST_INT n;
 
8738
-  int size;
 
8739
+  tree type;
 
8740
 };
 
8741
 
 
8742
 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
 
8743
@@ -1549,13 +1549,15 @@
 
8744
                 struct symbolic_number *n,
 
8745
                 int count)
 
8746
 {
 
8747
+  int bitsize = TYPE_PRECISION (n->type);
 
8748
+
 
8749
   if (count % 8 != 0)
 
8750
     return false;
 
8751
 
 
8752
   /* Zero out the extra bits of N in order to avoid them being shifted
 
8753
      into the significant bits.  */
 
8754
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8755
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
8756
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8757
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8758
 
 
8759
   switch (code)
 
8760
     {
 
8761
@@ -1563,20 +1565,24 @@
 
8762
       n->n <<= count;
 
8763
       break;
 
8764
     case RSHIFT_EXPR:
 
8765
+      /* Arithmetic shift of signed type: result is dependent on the value.  */
 
8766
+      if (!TYPE_UNSIGNED (n->type)
 
8767
+         && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
 
8768
+       return false;
 
8769
       n->n >>= count;
 
8770
       break;
 
8771
     case LROTATE_EXPR:
 
8772
-      n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
 
8773
+      n->n = (n->n << count) | (n->n >> (bitsize - count));
 
8774
       break;
 
8775
     case RROTATE_EXPR:
 
8776
-      n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
 
8777
+      n->n = (n->n >> count) | (n->n << (bitsize - count));
 
8778
       break;
 
8779
     default:
 
8780
       return false;
 
8781
     }
 
8782
   /* Zero unused bits for size.  */
 
8783
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8784
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
8785
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8786
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8787
   return true;
 
8788
 }
 
8789
 
 
8790
@@ -1593,7 +1599,7 @@
 
8791
   if (TREE_CODE (lhs_type) != INTEGER_TYPE)
 
8792
     return false;
 
8793
 
 
8794
-  if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
 
8795
+  if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
 
8796
     return false;
 
8797
 
 
8798
   return true;
 
8799
@@ -1650,20 +1656,25 @@
 
8800
         to initialize the symbolic number.  */
 
8801
       if (!source_expr1)
 
8802
        {
 
8803
+         int size;
 
8804
+
 
8805
          /* Set up the symbolic number N by setting each byte to a
 
8806
             value between 1 and the byte size of rhs1.  The highest
 
8807
             order byte is set to n->size and the lowest order
 
8808
             byte to 1.  */
 
8809
-         n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
 
8810
-         if (n->size % BITS_PER_UNIT != 0)
 
8811
+         n->type = TREE_TYPE (rhs1);
 
8812
+         size = TYPE_PRECISION (n->type);
 
8813
+         if (size % BITS_PER_UNIT != 0)
 
8814
            return NULL_TREE;
 
8815
-         n->size /= BITS_PER_UNIT;
 
8816
+         if (size > HOST_BITS_PER_WIDEST_INT)
 
8817
+           return NULL_TREE;
 
8818
+         size /= BITS_PER_UNIT;
 
8819
          n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
 
8820
                  (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
 
8821
 
 
8822
-         if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8823
+         if (size < (int)sizeof (HOST_WIDEST_INT))
 
8824
            n->n &= ((unsigned HOST_WIDEST_INT)1 <<
 
8825
-                    (n->size * BITS_PER_UNIT)) - 1;
 
8826
+                    (size * BITS_PER_UNIT)) - 1;
 
8827
 
 
8828
          source_expr1 = rhs1;
 
8829
        }
 
8830
@@ -1672,12 +1683,12 @@
 
8831
        {
 
8832
        case BIT_AND_EXPR:
 
8833
          {
 
8834
-           int i;
 
8835
+           int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
8836
            unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
 
8837
            unsigned HOST_WIDEST_INT tmp = val;
 
8838
 
 
8839
            /* Only constants masking full bytes are allowed.  */
 
8840
-           for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
 
8841
+           for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
 
8842
              if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
 
8843
                return NULL_TREE;
 
8844
 
 
8845
@@ -1693,12 +1704,24 @@
 
8846
          break;
 
8847
        CASE_CONVERT:
 
8848
          {
 
8849
-           int type_size;
 
8850
+           int type_size, old_type_size;
 
8851
+           tree type;
 
8852
 
 
8853
-           type_size = TYPE_PRECISION (gimple_expr_type (stmt));
 
8854
+           type = gimple_expr_type (stmt);
 
8855
+           type_size = TYPE_PRECISION (type);
 
8856
            if (type_size % BITS_PER_UNIT != 0)
 
8857
              return NULL_TREE;
 
8858
+           if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
 
8859
+             return NULL_TREE;
 
8860
 
 
8861
+           /* Sign extension: result is dependent on the value.  */
 
8862
+           old_type_size = TYPE_PRECISION (n->type);
 
8863
+           if (!TYPE_UNSIGNED (n->type)
 
8864
+               && type_size > old_type_size
 
8865
+               && n->n &
 
8866
+                  ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
 
8867
+             return NULL_TREE;
 
8868
+
 
8869
            if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
 
8870
              {
 
8871
                /* If STMT casts to a smaller type mask out the bits not
 
8872
@@ -1705,7 +1728,7 @@
 
8873
                   belonging to the target type.  */
 
8874
                n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
 
8875
              }
 
8876
-           n->size = type_size / BITS_PER_UNIT;
 
8877
+           n->type = type;
 
8878
          }
 
8879
          break;
 
8880
        default:
 
8881
@@ -1718,7 +1741,7 @@
 
8882
 
 
8883
   if (rhs_class == GIMPLE_BINARY_RHS)
 
8884
     {
 
8885
-      int i;
 
8886
+      int i, size;
 
8887
       struct symbolic_number n1, n2;
 
8888
       unsigned HOST_WIDEST_INT mask;
 
8889
       tree source_expr2;
 
8890
@@ -1742,11 +1765,12 @@
 
8891
          source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
 
8892
 
 
8893
          if (source_expr1 != source_expr2
 
8894
-             || n1.size != n2.size)
 
8895
+             || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
 
8896
            return NULL_TREE;
 
8897
 
 
8898
-         n->size = n1.size;
 
8899
-         for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
 
8900
+         n->type = n1.type;
 
8901
+         size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
8902
+         for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
 
8903
            {
 
8904
              unsigned HOST_WIDEST_INT masked1, masked2;
 
8905
 
 
8906
@@ -1785,7 +1809,7 @@
 
8907
 
 
8908
   struct symbolic_number n;
 
8909
   tree source_expr;
 
8910
-  int limit;
 
8911
+  int limit, bitsize;
 
8912
 
 
8913
   /* The last parameter determines the depth search limit.  It usually
 
8914
      correlates directly to the number of bytes to be touched.  We
 
8915
@@ -1800,13 +1824,14 @@
 
8916
     return NULL_TREE;
 
8917
 
 
8918
   /* Zero out the extra bits of N and CMP.  */
 
8919
-  if (n.size < (int)sizeof (HOST_WIDEST_INT))
 
8920
+  bitsize = TYPE_PRECISION (n.type);
 
8921
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8922
     {
 
8923
       unsigned HOST_WIDEST_INT mask =
 
8924
-       ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
 
8925
+       ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8926
 
 
8927
       n.n &= mask;
 
8928
-      cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
 
8929
+      cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
 
8930
     }
 
8931
 
 
8932
   /* A complete byte swap should make the symbolic number to start
 
8933
@@ -1828,7 +1853,7 @@
 
8934
   bool changed = false;
 
8935
   tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
 
8936
 
 
8937
-  if (BITS_PER_UNIT != 8)
 
8938
+  if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
 
8939
     return 0;
 
8940
 
 
8941
   if (sizeof (HOST_WIDEST_INT) < 8)
 
8942
Index: gcc/tree-nrv.c
 
8943
===================================================================
 
8944
--- a/src/gcc/tree-nrv.c        (.../tags/gcc_4_8_3_release)
 
8945
+++ b/src/gcc/tree-nrv.c        (.../branches/gcc-4_8-branch)
 
8946
@@ -178,8 +178,7 @@
 
8947
                 same type and alignment as the function's result.  */
 
8948
              if (TREE_CODE (found) != VAR_DECL
 
8949
                  || TREE_THIS_VOLATILE (found)
 
8950
-                 || DECL_CONTEXT (found) != current_function_decl
 
8951
-                 || TREE_STATIC (found)
 
8952
+                 || !auto_var_in_fn_p (found, current_function_decl)
 
8953
                  || TREE_ADDRESSABLE (found)
 
8954
                  || DECL_ALIGN (found) > DECL_ALIGN (result)
 
8955
                  || !useless_type_conversion_p (result_type,
 
8956
Index: gcc/config.in
 
8957
===================================================================
 
8958
--- a/src/gcc/config.in (.../tags/gcc_4_8_3_release)
 
8959
+++ b/src/gcc/config.in (.../branches/gcc-4_8-branch)
 
8960
@@ -1175,6 +1175,12 @@
 
8961
 #endif
 
8962
 
 
8963
 
 
8964
+/* Define if isl_schedule_constraints_compute_schedule exists. */
 
8965
+#ifndef USED_FOR_TARGET
 
8966
+#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
8967
+#endif
 
8968
+
 
8969
+
 
8970
 /* Define to 1 if you have the `kill' function. */
 
8971
 #ifndef USED_FOR_TARGET
 
8972
 #undef HAVE_KILL
 
8973
Index: gcc/ifcvt.c
 
8974
===================================================================
 
8975
--- a/src/gcc/ifcvt.c   (.../tags/gcc_4_8_3_release)
 
8976
+++ b/src/gcc/ifcvt.c   (.../branches/gcc-4_8-branch)
 
8977
@@ -294,6 +294,28 @@
 
8978
 
 
8979
   return (e) ? e->dest : NULL_BLOCK;
 
8980
 }
 
8981
+
 
8982
+/* Return true if RTXs A and B can be safely interchanged.  */
 
8983
+
 
8984
+static bool
 
8985
+rtx_interchangeable_p (const_rtx a, const_rtx b)
 
8986
+{
 
8987
+  if (!rtx_equal_p (a, b))
 
8988
+    return false;
 
8989
+
 
8990
+  if (GET_CODE (a) != MEM)
 
8991
+    return true;
 
8992
+
 
8993
+  /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
 
8994
+     reference is not.  Interchanging a dead type-unsafe memory reference with
 
8995
+     a live type-safe one creates a live type-unsafe memory reference, in other
 
8996
+     words, it makes the program illegal.
 
8997
+     We check here conservatively whether the two memory references have equal
 
8998
+     memory attributes.  */
 
8999
+
 
9000
+  return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
 
9001
+}
 
9002
+
 
9003
 
 
9004
 /* Go through a bunch of insns, converting them to conditional
 
9005
    execution format if possible.  Return TRUE if all of the non-note
 
9006
@@ -1014,6 +1036,9 @@
 
9007
       || (rtx_equal_p (if_info->a, XEXP (cond, 1))
 
9008
          && rtx_equal_p (if_info->b, XEXP (cond, 0))))
 
9009
     {
 
9010
+      if (!rtx_interchangeable_p (if_info->a, if_info->b))
 
9011
+       return FALSE;
 
9012
+
 
9013
       y = (code == EQ) ? if_info->a : if_info->b;
 
9014
 
 
9015
       /* Avoid generating the move if the source is the destination.  */
 
9016
@@ -2483,7 +2508,7 @@
 
9017
       if (! insn_b
 
9018
          || insn_b != last_active_insn (else_bb, FALSE)
 
9019
          || (set_b = single_set (insn_b)) == NULL_RTX
 
9020
-         || ! rtx_equal_p (x, SET_DEST (set_b)))
 
9021
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
 
9022
        return FALSE;
 
9023
     }
 
9024
   else
 
9025
@@ -2496,7 +2521,7 @@
 
9026
          || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
 
9027
          || !NONJUMP_INSN_P (insn_b)
 
9028
          || (set_b = single_set (insn_b)) == NULL_RTX
 
9029
-         || ! rtx_equal_p (x, SET_DEST (set_b))
 
9030
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b))
 
9031
          || ! noce_operand_ok (SET_SRC (set_b))
 
9032
          || reg_overlap_mentioned_p (x, SET_SRC (set_b))
 
9033
          || modified_between_p (SET_SRC (set_b), insn_b, jump)
 
9034
@@ -2562,7 +2587,7 @@
 
9035
 
 
9036
   /* Look and see if A and B are really the same.  Avoid creating silly
 
9037
      cmove constructs that no one will fix up later.  */
 
9038
-  if (rtx_equal_p (a, b))
 
9039
+  if (rtx_interchangeable_p (a, b))
 
9040
     {
 
9041
       /* If we have an INSN_B, we don't have to create any new rtl.  Just
 
9042
         move the instruction that we already have.  If we don't have an
 
9043
@@ -4246,6 +4271,9 @@
 
9044
   old_dest = JUMP_LABEL (jump);
 
9045
   if (other_bb != new_dest)
 
9046
     {
 
9047
+      if (!any_condjump_p (jump))
 
9048
+       goto cancel;
 
9049
+
 
9050
       if (JUMP_P (BB_END (dest_edge->src)))
 
9051
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
 
9052
       else if (new_dest == EXIT_BLOCK_PTR)
 
9053
Index: gcc/dwarf2out.c
 
9054
===================================================================
 
9055
--- a/src/gcc/dwarf2out.c       (.../tags/gcc_4_8_3_release)
 
9056
+++ b/src/gcc/dwarf2out.c       (.../branches/gcc-4_8-branch)
 
9057
@@ -12234,7 +12234,7 @@
 
9058
              op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
 
9059
                                        VAR_INIT_STATUS_INITIALIZED);
 
9060
              if (op1 == 0)
 
9061
-               break;
 
9062
+               return NULL;
 
9063
              add_loc_descr (&mem_loc_result, op1);
 
9064
              add_loc_descr (&mem_loc_result,
 
9065
                             new_loc_descr (DW_OP_plus, 0, 0));
 
9066
@@ -13882,6 +13882,10 @@
 
9067
       have_address = 1;
 
9068
       break;
 
9069
 
 
9070
+    case TARGET_MEM_REF:
 
9071
+    case SSA_NAME:
 
9072
+      return NULL;
 
9073
+
 
9074
     case COMPOUND_EXPR:
 
9075
       return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
 
9076
 
 
9077
Index: gcc/expr.c
 
9078
===================================================================
 
9079
--- a/src/gcc/expr.c    (.../tags/gcc_4_8_3_release)
 
9080
+++ b/src/gcc/expr.c    (.../branches/gcc-4_8-branch)
 
9081
@@ -7590,11 +7590,13 @@
 
9082
       break;
 
9083
 
 
9084
     case COMPOUND_LITERAL_EXPR:
 
9085
-      /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
 
9086
-        rtl_for_decl_init is called on DECL_INITIAL with
 
9087
-        COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified.  */
 
9088
-      if (modifier == EXPAND_INITIALIZER
 
9089
-         && COMPOUND_LITERAL_EXPR_DECL (exp))
 
9090
+      /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
 
9091
+        initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
 
9092
+        with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
 
9093
+        array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
 
9094
+        the initializers aren't gimplified.  */
 
9095
+      if (COMPOUND_LITERAL_EXPR_DECL (exp)
 
9096
+         && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
 
9097
        return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
 
9098
                                        target, tmode, modifier, as);
 
9099
       /* FALLTHRU */
 
9100
@@ -10603,7 +10605,7 @@
 
9101
       || !host_integerp (TREE_OPERAND (offset, 1), 1)
 
9102
       || compare_tree_int (TREE_OPERAND (offset, 1),
 
9103
                           BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
 
9104
-      || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
9105
+      || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
9106
     return 0;
 
9107
 
 
9108
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
 
9109
Index: gcc/ada/socket.c
 
9110
===================================================================
 
9111
--- a/src/gcc/ada/socket.c      (.../tags/gcc_4_8_3_release)
 
9112
+++ b/src/gcc/ada/socket.c      (.../branches/gcc-4_8-branch)
 
9113
@@ -212,7 +212,7 @@
 
9114
   struct hostent *rh;
 
9115
   int ri;
 
9116
 
 
9117
-#if defined(__linux__) || defined(__GLIBC__)
 
9118
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
 
9119
   (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
 
9120
 #else
 
9121
   rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
 
9122
Index: gcc/ada/uintp.adb
 
9123
===================================================================
 
9124
--- a/src/gcc/ada/uintp.adb     (.../tags/gcc_4_8_3_release)
 
9125
+++ b/src/gcc/ada/uintp.adb     (.../branches/gcc-4_8-branch)
 
9126
@@ -171,22 +171,6 @@
 
9127
    --  If Discard_Quotient is True, Quotient is set to No_Uint
 
9128
    --  If Discard_Remainder is True, Remainder is set to No_Uint
 
9129
 
 
9130
-   function Vector_To_Uint
 
9131
-     (In_Vec   : UI_Vector;
 
9132
-      Negative : Boolean) return Uint;
 
9133
-   --  Functions that calculate values in UI_Vectors, call this function to
 
9134
-   --  create and return the Uint value. In_Vec contains the multiple precision
 
9135
-   --  (Base) representation of a non-negative value. Leading zeroes are
 
9136
-   --  permitted. Negative is set if the desired result is the negative of the
 
9137
-   --  given value. The result will be either the appropriate directly
 
9138
-   --  represented value, or a table entry in the proper canonical format is
 
9139
-   --  created and returned.
 
9140
-   --
 
9141
-   --  Note that Init_Operand puts a signed value in the result vector, but
 
9142
-   --  Vector_To_Uint is always presented with a non-negative value. The
 
9143
-   --  processing of signs is something that is done by the caller before
 
9144
-   --  calling Vector_To_Uint.
 
9145
-
 
9146
    ------------
 
9147
    -- Direct --
 
9148
    ------------
 
9149
Index: gcc/ada/uintp.ads
 
9150
===================================================================
 
9151
--- a/src/gcc/ada/uintp.ads     (.../tags/gcc_4_8_3_release)
 
9152
+++ b/src/gcc/ada/uintp.ads     (.../branches/gcc-4_8-branch)
 
9153
@@ -90,6 +90,18 @@
 
9154
    Uint_Minus_80  : constant Uint;
 
9155
    Uint_Minus_128 : constant Uint;
 
9156
 
 
9157
+   type UI_Vector is array (Pos range <>) of Int;
 
9158
+   --  Vector containing the integer values of a Uint value
 
9159
+
 
9160
+   --  Note: An earlier version of this package used pointers of arrays of Ints
 
9161
+   --  (dynamically allocated) for the Uint type. The change leads to a few
 
9162
+   --  less natural idioms used throughout this code, but eliminates all uses
 
9163
+   --  of the heap except for the table package itself. For example, Uint
 
9164
+   --  parameters are often converted to UI_Vectors for internal manipulation.
 
9165
+   --  This is done by creating the local UI_Vector using the function N_Digits
 
9166
+   --  on the Uint to find the size needed for the vector, and then calling
 
9167
+   --  Init_Operand to copy the values out of the table into the vector.
 
9168
+
 
9169
    -----------------
 
9170
    -- Subprograms --
 
9171
    -----------------
 
9172
@@ -252,6 +264,22 @@
 
9173
    --  function is used for capacity checks, and it can be one bit off
 
9174
    --  without affecting its usage.
 
9175
 
 
9176
+   function Vector_To_Uint
 
9177
+     (In_Vec   : UI_Vector;
 
9178
+      Negative : Boolean) return Uint;
 
9179
+   --  Functions that calculate values in UI_Vectors, call this function to
 
9180
+   --  create and return the Uint value. In_Vec contains the multiple precision
 
9181
+   --  (Base) representation of a non-negative value. Leading zeroes are
 
9182
+   --  permitted. Negative is set if the desired result is the negative of the
 
9183
+   --  given value. The result will be either the appropriate directly
 
9184
+   --  represented value, or a table entry in the proper canonical format is
 
9185
+   --  created and returned.
 
9186
+   --
 
9187
+   --  Note that Init_Operand puts a signed value in the result vector, but
 
9188
+   --  Vector_To_Uint is always presented with a non-negative value. The
 
9189
+   --  processing of signs is something that is done by the caller before
 
9190
+   --  calling Vector_To_Uint.
 
9191
+
 
9192
    ---------------------
 
9193
    -- Output Routines --
 
9194
    ---------------------
 
9195
@@ -494,18 +522,6 @@
 
9196
    --  UI_Vector is defined for this purpose and some internal subprograms
 
9197
    --  used for converting from one to the other are defined.
 
9198
 
 
9199
-   type UI_Vector is array (Pos range <>) of Int;
 
9200
-   --  Vector containing the integer values of a Uint value
 
9201
-
 
9202
-   --  Note: An earlier version of this package used pointers of arrays of Ints
 
9203
-   --  (dynamically allocated) for the Uint type. The change leads to a few
 
9204
-   --  less natural idioms used throughout this code, but eliminates all uses
 
9205
-   --  of the heap except for the table package itself. For example, Uint
 
9206
-   --  parameters are often converted to UI_Vectors for internal manipulation.
 
9207
-   --  This is done by creating the local UI_Vector using the function N_Digits
 
9208
-   --  on the Uint to find the size needed for the vector, and then calling
 
9209
-   --  Init_Operand to copy the values out of the table into the vector.
 
9210
-
 
9211
    type Uint_Entry is record
 
9212
       Length : Pos;
 
9213
       --  Length of entry in Udigits table in digits (i.e. in words)
 
9214
Index: gcc/ada/ChangeLog
 
9215
===================================================================
 
9216
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_8_3_release)
 
9217
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_8-branch)
 
9218
@@ -1,3 +1,29 @@
 
9219
+2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
 
9220
+
 
9221
+       Backport from mainline
 
9222
+       2014-11-20  Vincent Celier  <celier@adacore.com>
 
9223
+
 
9224
+       PR ada/47500
 
9225
+       * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
 
9226
+       its argument.
 
9227
+
 
9228
+2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
 
9229
+            Alan Modra  <amodra@gmail.com>
 
9230
+
 
9231
+       PR ada/63225
 
9232
+       * uintp.adb (Vector_To_Uint): Move from here to...
 
9233
+       * uintp.ads (UI_Vector): Make public.
 
9234
+       (Vector_To_Uint): ...here.
 
9235
+
 
9236
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
9237
+
 
9238
+       * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
 
9239
+       * gsocket.h Add include of <unistd.h> on RTEMS.
 
9240
+
 
9241
+2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
 
9242
+
 
9243
+       * s-osinte-rtems.adb: Correct formatting of line in license block.
 
9244
+
 
9245
 2014-05-22  Release Manager
 
9246
 
 
9247
        * GCC 4.8.3 released.
 
9248
Index: gcc/ada/s-osinte-rtems.adb
 
9249
===================================================================
 
9250
--- a/src/gcc/ada/s-osinte-rtems.adb    (.../tags/gcc_4_8_3_release)
 
9251
+++ b/src/gcc/ada/s-osinte-rtems.adb    (.../branches/gcc-4_8-branch)
 
9252
@@ -22,7 +22,7 @@
 
9253
 -- You should have received a copy of the GNU General Public License and    --
 
9254
 -- a copy of the GCC Runtime Library Exception along with this program;     --
 
9255
 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
9256
--- <http://www.gnu.org/licenses/>.                                         
 
9257
+-- <http://www.gnu.org/licenses/>.                                          --
 
9258
 --                                                                          --
 
9259
 -- GNARL was developed by the GNARL team at Florida State University. It is --
 
9260
 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
 
9261
Index: gcc/ada/gsocket.h
 
9262
===================================================================
 
9263
--- a/src/gcc/ada/gsocket.h     (.../tags/gcc_4_8_3_release)
 
9264
+++ b/src/gcc/ada/gsocket.h     (.../branches/gcc-4_8-branch)
 
9265
@@ -183,6 +183,11 @@
 
9266
 #include <sys/time.h>
 
9267
 #endif
 
9268
 
 
9269
+#if defined(__rtems__)
 
9270
+#include <unistd.h>
 
9271
+/* Required, for read(), write(), and close() */
 
9272
+#endif
 
9273
+
 
9274
 /*
 
9275
  * RTEMS has these .h files but not until you have built and installed RTEMS.
 
9276
  * When building a C/C++ toolset, you also build the newlib C library, so the
 
9277
Index: gcc/ada/back_end.adb
 
9278
===================================================================
 
9279
--- a/src/gcc/ada/back_end.adb  (.../tags/gcc_4_8_3_release)
 
9280
+++ b/src/gcc/ada/back_end.adb  (.../branches/gcc-4_8-branch)
 
9281
@@ -209,9 +209,10 @@
 
9282
          Last  : constant Natural  := Switch_Last (Switch_Chars);
 
9283
 
 
9284
       begin
 
9285
-         --  Skip -o or internal GCC switches together with their argument
 
9286
+         --  Skip -o, -G or internal GCC switches together with their argument.
 
9287
 
 
9288
          if Switch_Chars (First .. Last) = "o"
 
9289
+           or else Switch_Chars (First .. Last) = "G"
 
9290
            or else Is_Internal_GCC_Switch (Switch_Chars)
 
9291
          then
 
9292
             Next_Arg := Next_Arg + 1;
 
9293
Index: gcc/tree-ssa-ifcombine.c
 
9294
===================================================================
 
9295
--- a/src/gcc/tree-ssa-ifcombine.c      (.../tags/gcc_4_8_3_release)
 
9296
+++ b/src/gcc/tree-ssa-ifcombine.c      (.../branches/gcc-4_8-branch)
 
9297
@@ -105,7 +105,11 @@
 
9298
     {
 
9299
       gimple stmt = gsi_stmt (gsi);
 
9300
 
 
9301
+      if (is_gimple_debug (stmt))
 
9302
+       continue;
 
9303
+
 
9304
       if (gimple_has_side_effects (stmt)
 
9305
+         || gimple_could_trap_p (stmt)
 
9306
          || gimple_vuse (stmt))
 
9307
        return false;
 
9308
     }
 
9309
@@ -197,7 +201,8 @@
 
9310
       while (is_gimple_assign (stmt)
 
9311
             && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
 
9312
                  && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
 
9313
-                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
 
9314
+                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
 
9315
+                 && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
 
9316
                 || gimple_assign_ssa_name_copy_p (stmt)))
 
9317
        stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
 
9318
 
 
9319
Index: gcc/sel-sched-ir.c
 
9320
===================================================================
 
9321
--- a/src/gcc/sel-sched-ir.c    (.../tags/gcc_4_8_3_release)
 
9322
+++ b/src/gcc/sel-sched-ir.c    (.../branches/gcc-4_8-branch)
 
9323
@@ -162,7 +162,7 @@
 
9324
 static void free_av_set (basic_block);
 
9325
 static void invalidate_av_set (basic_block);
 
9326
 static void extend_insn_data (void);
 
9327
-static void sel_init_new_insn (insn_t, int);
 
9328
+static void sel_init_new_insn (insn_t, int, int = -1);
 
9329
 static void finish_insns (void);
 
9330
 
 
9331
 /* Various list functions.  */
 
9332
@@ -4011,9 +4011,10 @@
 
9333
   return seqno;
 
9334
 }
 
9335
 
 
9336
-/* Compute seqno for INSN by its preds or succs.  */
 
9337
+/* Compute seqno for INSN by its preds or succs.  Use OLD_SEQNO to compute
 
9338
+   seqno in corner cases.  */
 
9339
 static int
 
9340
-get_seqno_for_a_jump (insn_t insn)
 
9341
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
 
9342
 {
 
9343
   int seqno;
 
9344
 
 
9345
@@ -4069,8 +4070,16 @@
 
9346
   if (seqno < 0)
 
9347
     seqno = get_seqno_by_succs (insn);
 
9348
 
 
9349
+  if (seqno < 0)
 
9350
+    {
 
9351
+      /* The only case where this could be here legally is that the only
 
9352
+        unscheduled insn was a conditional jump that got removed and turned
 
9353
+        into this unconditional one.  Initialize from the old seqno
 
9354
+        of that jump passed down to here.  */
 
9355
+      seqno = old_seqno;
 
9356
+    }
 
9357
+
 
9358
   gcc_assert (seqno >= 0);
 
9359
-
 
9360
   return seqno;
 
9361
 }
 
9362
 
 
9363
@@ -4250,22 +4259,24 @@
 
9364
 }
 
9365
 
 
9366
 /* This is used to initialize spurious jumps generated by
 
9367
-   sel_redirect_edge ().  */
 
9368
+   sel_redirect_edge ().  OLD_SEQNO is used for initializing seqnos
 
9369
+   in corner cases within get_seqno_for_a_jump.  */
 
9370
 static void
 
9371
-init_simplejump_data (insn_t insn)
 
9372
+init_simplejump_data (insn_t insn, int old_seqno)
 
9373
 {
 
9374
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
 
9375
             REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
 
9376
             vNULL, true, false, false,
 
9377
             false, true);
 
9378
-  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
 
9379
+  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
 
9380
   init_first_time_insn_data (insn);
 
9381
 }
 
9382
 
 
9383
 /* Perform deferred initialization of insns.  This is used to process
 
9384
-   a new jump that may be created by redirect_edge.  */
 
9385
-void
 
9386
-sel_init_new_insn (insn_t insn, int flags)
 
9387
+   a new jump that may be created by redirect_edge.  OLD_SEQNO is used
 
9388
+   for initializing simplejumps in init_simplejump_data.  */
 
9389
+static void
 
9390
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
 
9391
 {
 
9392
   /* We create data structures for bb when the first insn is emitted in it.  */
 
9393
   if (INSN_P (insn)
 
9394
@@ -4292,7 +4303,7 @@
 
9395
   if (flags & INSN_INIT_TODO_SIMPLEJUMP)
 
9396
     {
 
9397
       extend_insn_data ();
 
9398
-      init_simplejump_data (insn);
 
9399
+      init_simplejump_data (insn, old_seqno);
 
9400
     }
 
9401
 
 
9402
   gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
 
9403
@@ -5578,8 +5589,7 @@
 
9404
 }
 
9405
 
 
9406
 /* A wrapper for redirect_edge_and_branch_force, which also initializes
 
9407
-   data structures for possibly created bb and insns.  Returns the newly
 
9408
-   added bb or NULL, when a bb was not needed.  */
 
9409
+   data structures for possibly created bb and insns.  */
 
9410
 void
 
9411
 sel_redirect_edge_and_branch_force (edge e, basic_block to)
 
9412
 {
 
9413
@@ -5586,6 +5596,7 @@
 
9414
   basic_block jump_bb, src, orig_dest = e->dest;
 
9415
   int prev_max_uid;
 
9416
   rtx jump;
 
9417
+  int old_seqno = -1;
 
9418
 
 
9419
   /* This function is now used only for bookkeeping code creation, where
 
9420
      we'll never get the single pred of orig_dest block and thus will not
 
9421
@@ -5594,8 +5605,13 @@
 
9422
               && !single_pred_p (orig_dest));
 
9423
   src = e->src;
 
9424
   prev_max_uid = get_max_uid ();
 
9425
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
9426
+     when the conditional jump being redirected may become unconditional.  */
 
9427
+  if (any_condjump_p (BB_END (src))
 
9428
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
9429
+    old_seqno = INSN_SEQNO (BB_END (src));
 
9430
+
 
9431
   jump_bb = redirect_edge_and_branch_force (e, to);
 
9432
-
 
9433
   if (jump_bb != NULL)
 
9434
     sel_add_bb (jump_bb);
 
9435
 
 
9436
@@ -5607,7 +5623,8 @@
 
9437
 
 
9438
   jump = find_new_jump (src, jump_bb, prev_max_uid);
 
9439
   if (jump)
 
9440
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
9441
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
 
9442
+                      old_seqno);
 
9443
   set_immediate_dominator (CDI_DOMINATORS, to,
 
9444
                           recompute_dominator (CDI_DOMINATORS, to));
 
9445
   set_immediate_dominator (CDI_DOMINATORS, orig_dest,
 
9446
@@ -5626,6 +5643,7 @@
 
9447
   edge redirected;
 
9448
   bool recompute_toporder_p = false;
 
9449
   bool maybe_unreachable = single_pred_p (orig_dest);
 
9450
+  int old_seqno = -1;
 
9451
 
 
9452
   latch_edge_p = (pipelining_p
 
9453
                   && current_loop_nest
 
9454
@@ -5634,6 +5652,12 @@
 
9455
   src = e->src;
 
9456
   prev_max_uid = get_max_uid ();
 
9457
 
 
9458
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
9459
+     when the conditional jump being redirected may become unconditional.  */
 
9460
+  if (any_condjump_p (BB_END (src))
 
9461
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
9462
+    old_seqno = INSN_SEQNO (BB_END (src));
 
9463
+
 
9464
   redirected = redirect_edge_and_branch (e, to);
 
9465
 
 
9466
   gcc_assert (redirected && !last_added_blocks.exists ());
 
9467
@@ -5654,7 +5678,7 @@
 
9468
 
 
9469
   jump = find_new_jump (src, NULL, prev_max_uid);
 
9470
   if (jump)
 
9471
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
9472
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
 
9473
 
 
9474
   /* Only update dominator info when we don't have unreachable blocks.
 
9475
      Otherwise we'll update in maybe_tidy_empty_bb.  */
 
9476
Index: gcc/fortran/interface.c
 
9477
===================================================================
 
9478
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_8_3_release)
 
9479
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_8-branch)
 
9480
@@ -1923,7 +1923,7 @@
 
9481
   /* F2008, 12.5.2.5; IR F08/0073.  */
 
9482
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
 
9483
       && ((CLASS_DATA (formal)->attr.class_pointer
 
9484
-          && !formal->attr.intent == INTENT_IN)
 
9485
+          && formal->attr.intent != INTENT_IN)
 
9486
           || CLASS_DATA (formal)->attr.allocatable))
 
9487
     {
 
9488
       if (actual->ts.type != BT_CLASS)
 
9489
Index: gcc/fortran/trans-expr.c
 
9490
===================================================================
 
9491
--- a/src/gcc/fortran/trans-expr.c      (.../tags/gcc_4_8_3_release)
 
9492
+++ b/src/gcc/fortran/trans-expr.c      (.../branches/gcc-4_8-branch)
 
9493
@@ -7096,7 +7096,7 @@
 
9494
 
 
9495
   res_desc = gfc_evaluate_now (desc, &se->pre);
 
9496
   gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
 
9497
-  se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
 
9498
+  se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
 
9499
 
 
9500
   /* Free the lhs after the function call and copy the result data to
 
9501
      the lhs descriptor.  */
 
9502
Index: gcc/fortran/decl.c
 
9503
===================================================================
 
9504
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_8_3_release)
 
9505
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_8-branch)
 
9506
@@ -1996,6 +1996,13 @@
 
9507
       if (gfc_notify_std (GFC_STD_GNU, "Old-style "
 
9508
                          "initialization at %C") == FAILURE)
 
9509
        return MATCH_ERROR;
 
9510
+      else if (gfc_current_state () == COMP_DERIVED)
 
9511
+       {
 
9512
+         gfc_error ("Invalid old style initialization for derived type "
 
9513
+                    "component at %C");
 
9514
+         m = MATCH_ERROR;
 
9515
+         goto cleanup;
 
9516
+       }
 
9517
 
 
9518
       return match_old_style_init (name);
 
9519
     }
 
9520
Index: gcc/fortran/trans-openmp.c
 
9521
===================================================================
 
9522
--- a/src/gcc/fortran/trans-openmp.c    (.../tags/gcc_4_8_3_release)
 
9523
+++ b/src/gcc/fortran/trans-openmp.c    (.../branches/gcc-4_8-branch)
 
9524
@@ -115,6 +115,16 @@
 
9525
   if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
 
9526
     return OMP_CLAUSE_DEFAULT_SHARED;
 
9527
 
 
9528
+  /* These are either array or derived parameters, or vtables.
 
9529
+     In the former cases, the OpenMP standard doesn't consider them to be
 
9530
+     variables at all (they can't be redefined), but they can nevertheless appear
 
9531
+     in parallel/task regions and for default(none) purposes treat them as shared.
 
9532
+     For vtables likely the same handling is desirable.  */
 
9533
+  if (TREE_CODE (decl) == VAR_DECL
 
9534
+      && TREE_READONLY (decl)
 
9535
+      && TREE_STATIC (decl))
 
9536
+    return OMP_CLAUSE_DEFAULT_SHARED;
 
9537
+
 
9538
   return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
 
9539
 }
 
9540
 
 
9541
@@ -1217,6 +1227,18 @@
 
9542
     }
 
9543
 
 
9544
   lhsaddr = save_expr (lhsaddr);
 
9545
+  if (TREE_CODE (lhsaddr) != SAVE_EXPR
 
9546
+      && (TREE_CODE (lhsaddr) != ADDR_EXPR
 
9547
+         || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
 
9548
+    {
 
9549
+      /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
 
9550
+        it even after unsharing function body.  */
 
9551
+      tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
 
9552
+      DECL_CONTEXT (var) = current_function_decl;
 
9553
+      lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
 
9554
+                       NULL_TREE, NULL_TREE);
 
9555
+    }
 
9556
+
 
9557
   rhs = gfc_evaluate_now (rse.expr, &block);
 
9558
 
 
9559
   if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
 
9560
Index: gcc/fortran/ChangeLog
 
9561
===================================================================
 
9562
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
9563
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
 
9564
@@ -1,3 +1,72 @@
 
9565
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
9566
+
 
9567
+       Backported from mainline
 
9568
+       2014-11-24  Jakub Jelinek  <jakub@redhat.com>
 
9569
+
 
9570
+       PR fortran/63938
 
9571
+       * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
 
9572
+       simple enough for goa_lhs_expr_p.
 
9573
+
 
9574
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
9575
+
 
9576
+       PR fortran/59488
 
9577
+       * trans-openmp.c (gfc_omp_predetermined_sharing): Return
 
9578
+       OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
 
9579
+
 
9580
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
9581
+
 
9582
+       Backport from trunk
 
9583
+       PR fortran/62270
 
9584
+       * interface.c (compare_parameter): Fix condition.
 
9585
+
 
9586
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
9587
+
 
9588
+       Backport from trunk
 
9589
+       PR fortran/62214
 
9590
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
9591
+
 
9592
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
9593
+
 
9594
+       Backport from trunk
 
9595
+       PR fortran/61999
 
9596
+       * simplify.c (gfc_simplify_dot_product): Convert types of
 
9597
+       vectors before calculating the result.
 
9598
+
 
9599
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
9600
+
 
9601
+       Backport from trunk.
 
9602
+       PR fortran/61780
 
9603
+       * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
 
9604
+       that elements are skipped. This then correctly aligns 'reverse'
 
9605
+       with the scalarizer loops.
 
9606
+
 
9607
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
9608
+
 
9609
+       PR fortran/61459
 
9610
+       PR fortran/58883
 
9611
+       * trans-expr.c (fcncall_realloc_result): Use the natural type
 
9612
+       for the address expression of 'res_desc'.
 
9613
+
 
9614
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
9615
+           Fritz Reese  <Reese-Fritz@zai.com>
 
9616
+
 
9617
+       * decl.c (variable_decl): Reject old style initialization
 
9618
+       for derived type components.
 
9619
+
 
9620
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
9621
+
 
9622
+       Backport from trunk.
 
9623
+       PR fortran/45187
 
9624
+       * trans-decl.c (gfc_create_module_variable): Don't create
 
9625
+       Cray-pointee decls twice.
 
9626
+
 
9627
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
9628
+
 
9629
+       Backport from mainline
 
9630
+       PR libfortran/61310
 
9631
+       * intrinsics.texi (CTIME): Remove mention of locale-dependent
 
9632
+       behavior.
 
9633
+
 
9634
 2014-05-22  Release Manager
 
9635
 
 
9636
        * GCC 4.8.3 released.
 
9637
Index: gcc/fortran/frontend-passes.c
 
9638
===================================================================
 
9639
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
 
9640
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
 
9641
@@ -874,6 +874,10 @@
 
9642
            return true;
 
9643
          break;
 
9644
 
 
9645
+       case INTRINSIC_CONCAT:
 
9646
+         /* Do not do string concatenations.  */
 
9647
+         break;
 
9648
+
 
9649
        default:
 
9650
          /* Binary operators.  */
 
9651
          if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
 
9652
Index: gcc/fortran/trans-decl.c
 
9653
===================================================================
 
9654
--- a/src/gcc/fortran/trans-decl.c      (.../tags/gcc_4_8_3_release)
 
9655
+++ b/src/gcc/fortran/trans-decl.c      (.../branches/gcc-4_8-branch)
 
9656
@@ -4084,8 +4084,8 @@
 
9657
     }
 
9658
 
 
9659
   /* Don't generate variables from other modules. Variables from
 
9660
-     COMMONs will already have been generated.  */
 
9661
-  if (sym->attr.use_assoc || sym->attr.in_common)
 
9662
+     COMMONs and Cray pointees will already have been generated.  */
 
9663
+  if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
 
9664
     return;
 
9665
 
 
9666
   /* Equivalenced variables arrive here after creation.  */
 
9667
Index: gcc/fortran/dependency.c
 
9668
===================================================================
 
9669
--- a/src/gcc/fortran/dependency.c      (.../tags/gcc_4_8_3_release)
 
9670
+++ b/src/gcc/fortran/dependency.c      (.../branches/gcc-4_8-branch)
 
9671
@@ -1779,6 +1779,7 @@
 
9672
 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
 
9673
 {
 
9674
   int n;
 
9675
+  int m;
 
9676
   gfc_dependency fin_dep;
 
9677
   gfc_dependency this_dep;
 
9678
 
 
9679
@@ -1828,6 +1829,8 @@
 
9680
              break;
 
9681
            }
 
9682
 
 
9683
+         /* Index for the reverse array.  */
 
9684
+         m = -1;
 
9685
          for (n=0; n < lref->u.ar.dimen; n++)
 
9686
            {
 
9687
              /* Assume dependency when either of array reference is vector
 
9688
@@ -1862,31 +1865,37 @@
 
9689
                 The ability to reverse or not is set by previous conditions
 
9690
                 in this dimension.  If reversal is not activated, the
 
9691
                 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP.  */
 
9692
+
 
9693
+             /* Get the indexing right for the scalarizing loop. If this
 
9694
+                is an element, there is no corresponding loop.  */
 
9695
+             if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
 
9696
+               m++;
 
9697
+
 
9698
              if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
 
9699
                    && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
 
9700
                {
 
9701
                  /* Set reverse if backward dependence and not inhibited.  */
 
9702
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
9703
-                   reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
 
9704
-                                GFC_REVERSE_SET : reverse[n];
 
9705
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
9706
+                   reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
 
9707
+                                GFC_REVERSE_SET : reverse[m];
 
9708
 
 
9709
                  /* Set forward if forward dependence and not inhibited.  */
 
9710
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
9711
-                   reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
 
9712
-                                GFC_FORWARD_SET : reverse[n];
 
9713
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
9714
+                   reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
 
9715
+                                GFC_FORWARD_SET : reverse[m];
 
9716
 
 
9717
                  /* Flag up overlap if dependence not compatible with
 
9718
                     the overall state of the expression.  */
 
9719
-                 if (reverse && reverse[n] == GFC_REVERSE_SET
 
9720
+                 if (reverse && reverse[m] == GFC_REVERSE_SET
 
9721
                        && this_dep == GFC_DEP_FORWARD)
 
9722
                    {
 
9723
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
9724
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
9725
                      this_dep = GFC_DEP_OVERLAP;
 
9726
                    }
 
9727
-                 else if (reverse && reverse[n] == GFC_FORWARD_SET
 
9728
+                 else if (reverse && reverse[m] == GFC_FORWARD_SET
 
9729
                        && this_dep == GFC_DEP_BACKWARD)
 
9730
                    {
 
9731
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
9732
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
9733
                      this_dep = GFC_DEP_OVERLAP;
 
9734
                    }
 
9735
 
 
9736
@@ -1893,7 +1902,7 @@
 
9737
                  /* If no intention of reversing or reversing is explicitly
 
9738
                     inhibited, convert backward dependence to overlap.  */
 
9739
                  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
 
9740
-                     || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
 
9741
+                     || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
 
9742
                    this_dep = GFC_DEP_OVERLAP;
 
9743
                }
 
9744
 
 
9745
Index: gcc/fortran/simplify.c
 
9746
===================================================================
 
9747
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_8_3_release)
 
9748
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_8-branch)
 
9749
@@ -1877,6 +1877,9 @@
 
9750
 gfc_expr*
 
9751
 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
 
9752
 {
 
9753
+
 
9754
+  gfc_expr temp;
 
9755
+
 
9756
   if (!is_constant_array_expr (vector_a)
 
9757
       || !is_constant_array_expr (vector_b))
 
9758
     return NULL;
 
9759
@@ -1883,8 +1886,14 @@
 
9760
 
 
9761
   gcc_assert (vector_a->rank == 1);
 
9762
   gcc_assert (vector_b->rank == 1);
 
9763
-  gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
 
9764
 
 
9765
+  temp.expr_type = EXPR_OP;
 
9766
+  gfc_clear_ts (&temp.ts);
 
9767
+  temp.value.op.op = INTRINSIC_NONE;
 
9768
+  temp.value.op.op1 = vector_a;
 
9769
+  temp.value.op.op2 = vector_b;
 
9770
+  gfc_type_convert_binary (&temp, 1);
 
9771
+
 
9772
   return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
 
9773
 }
 
9774
 
 
9775
Index: gcc/configure.ac
 
9776
===================================================================
 
9777
--- a/src/gcc/configure.ac      (.../tags/gcc_4_8_3_release)
 
9778
+++ b/src/gcc/configure.ac      (.../branches/gcc-4_8-branch)
 
9779
@@ -3443,6 +3443,32 @@
 
9780
 AC_MSG_RESULT($gcc_cv_lto_plugin)
 
9781
 
 
9782
 case "$target" in
 
9783
+
 
9784
+  aarch64*-*-*)
 
9785
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
9786
+    AC_ARG_ENABLE(fix-cortex-a53-835769,
 
9787
+    [
 
9788
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
 
9789
+        [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
9790
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
 
9791
+        [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
9792
+    ],
 
9793
+      [
 
9794
+        case $enableval in
 
9795
+          yes)
 
9796
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
9797
+            ;;
 
9798
+          no)
 
9799
+            ;;
 
9800
+          *)
 
9801
+            AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
9802
+  Valid choices are 'yes' and 'no'.])
 
9803
+            ;;
 
9804
+
 
9805
+        esac
 
9806
+      ],
 
9807
+    [])
 
9808
+  ;;
 
9809
   # All TARGET_ABI_OSF targets.
 
9810
   alpha*-*-linux* | alpha*-*-*bsd*)
 
9811
     gcc_GAS_CHECK_FEATURE([explicit relocation support],
 
9812
@@ -5185,8 +5211,31 @@
 
9813
 AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
 
9814
 if test "x${CLOOGLIBS}" != "x" ; then 
 
9815
    AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
 
9816
+
 
9817
+  # Check whether isl_schedule_constraints_compute_schedule is available;
 
9818
+  # it's new in ISL-0.13.
 
9819
+  saved_CFLAGS="$CFLAGS"
 
9820
+  CFLAGS="$CFLAGS $ISLINC"
 
9821
+  saved_LIBS="$LIBS"
 
9822
+  LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
 
9823
+
 
9824
+  AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
 
9825
+  AC_TRY_LINK([#include <isl/schedule.h>],
 
9826
+              [isl_schedule_constraints_compute_schedule (NULL);],
 
9827
+              [ac_has_isl_schedule_constraints_compute_schedule=yes],
 
9828
+              [ac_has_isl_schedule_constraints_compute_schedule=no])
 
9829
+  AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
 
9830
+
 
9831
+  LIBS="$saved_LIBS"
 
9832
+  CFLAGS="$saved_CFLAGS"
 
9833
+
 
9834
+  if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
 
9835
+     AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
 
9836
+               [Define if isl_schedule_constraints_compute_schedule exists.])
 
9837
+  fi
 
9838
 fi
 
9839
 
 
9840
+
 
9841
 # Check for plugin support
 
9842
 AC_ARG_ENABLE(plugin,
 
9843
 [AS_HELP_STRING([--enable-plugin], [enable plugin support])],
 
9844
Index: gcc/function.c
 
9845
===================================================================
 
9846
--- a/src/gcc/function.c        (.../tags/gcc_4_8_3_release)
 
9847
+++ b/src/gcc/function.c        (.../branches/gcc-4_8-branch)
 
9848
@@ -1354,9 +1354,13 @@
 
9849
 #define STACK_POINTER_OFFSET   0
 
9850
 #endif
 
9851
 
 
9852
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
 
9853
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
 
9854
+#endif
 
9855
+
 
9856
 /* If not defined, pick an appropriate default for the offset of dynamically
 
9857
    allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
 
9858
-   REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
9859
+   INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
9860
 
 
9861
 #ifndef STACK_DYNAMIC_OFFSET
 
9862
 
 
9863
@@ -1368,12 +1372,12 @@
 
9864
    `crtl->outgoing_args_size'.  Nevertheless, we must allow
 
9865
    for it when allocating stack dynamic objects.  */
 
9866
 
 
9867
-#if defined(REG_PARM_STACK_SPACE)
 
9868
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
9869
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
9870
 ((ACCUMULATE_OUTGOING_ARGS                                                   \
 
9871
   ? (crtl->outgoing_args_size                                \
 
9872
      + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
 
9873
-                                              : REG_PARM_STACK_SPACE (FNDECL))) \
 
9874
+                                              : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
 
9875
   : 0) + (STACK_POINTER_OFFSET))
 
9876
 #else
 
9877
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
9878
@@ -2211,8 +2215,9 @@
 
9879
 #endif
 
9880
   all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
 
9881
 
 
9882
-#ifdef REG_PARM_STACK_SPACE
 
9883
-  all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
 
9884
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
9885
+  all->reg_parm_stack_space
 
9886
+    = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
 
9887
 #endif
 
9888
 }
 
9889
 
 
9890
@@ -4518,6 +4523,7 @@
 
9891
       /* ??? This could be set on a per-function basis by the front-end
 
9892
          but is this worth the hassle?  */
 
9893
       cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
 
9894
+      cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
 
9895
     }
 
9896
 }
 
9897
 
 
9898
Index: gcc/tree-vectorizer.h
 
9899
===================================================================
 
9900
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
 
9901
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
 
9902
@@ -324,9 +324,9 @@
 
9903
 #define LOOP_VINFO_OPERANDS_SWAPPED(L)     (L)->operands_swapped
 
9904
 
 
9905
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
 
9906
-(L)->may_misalign_stmts.length () > 0
 
9907
+((L)->may_misalign_stmts.length () > 0)
 
9908
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)     \
 
9909
-(L)->may_alias_ddrs.length () > 0
 
9910
+((L)->may_alias_ddrs.length () > 0)
 
9911
 
 
9912
 #define NITERS_KNOWN_P(n)                     \
 
9913
 (host_integerp ((n),0)                        \
 
9914
@@ -931,7 +931,8 @@
 
9915
 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
 
9916
 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
 
9917
                                      tree *, gimple_stmt_iterator *,
 
9918
-                                     gimple *, bool, bool *);
 
9919
+                                     gimple *, bool, bool *,
 
9920
+                                     tree = NULL_TREE);
 
9921
 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
 
9922
 extern tree vect_create_destination_var (tree, tree);
 
9923
 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
 
9924
@@ -949,7 +950,8 @@
 
9925
 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
 
9926
 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
 
9927
 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
 
9928
-                                                  tree, struct loop *);
 
9929
+                                                 tree, struct loop *,
 
9930
+                                                 tree = NULL_TREE);
 
9931
 
 
9932
 /* In tree-vect-loop.c.  */
 
9933
 /* FORNOW: Used in tree-parloops.c.  */
 
9934
Index: gcc/stor-layout.c
 
9935
===================================================================
 
9936
--- a/src/gcc/stor-layout.c     (.../tags/gcc_4_8_3_release)
 
9937
+++ b/src/gcc/stor-layout.c     (.../branches/gcc-4_8-branch)
 
9938
@@ -234,12 +234,7 @@
 
9939
       param_type = TREE_TYPE (ref);
 
9940
       param_decl
 
9941
        = build_decl (input_location, PARM_DECL, param_name, param_type);
 
9942
-      if (targetm.calls.promote_prototypes (NULL_TREE)
 
9943
-         && INTEGRAL_TYPE_P (param_type)
 
9944
-         && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
 
9945
-       DECL_ARG_TYPE (param_decl) = integer_type_node;
 
9946
-      else
 
9947
-       DECL_ARG_TYPE (param_decl) = param_type;
 
9948
+      DECL_ARG_TYPE (param_decl) = param_type;
 
9949
       DECL_ARTIFICIAL (param_decl) = 1;
 
9950
       TREE_READONLY (param_decl) = 1;
 
9951
 
 
9952
Index: gcc/tree-vect-loop.c
 
9953
===================================================================
 
9954
--- a/src/gcc/tree-vect-loop.c  (.../tags/gcc_4_8_3_release)
 
9955
+++ b/src/gcc/tree-vect-loop.c  (.../branches/gcc-4_8-branch)
 
9956
@@ -2205,7 +2205,8 @@
 
9957
         }
 
9958
 
 
9959
       def1 = SSA_NAME_DEF_STMT (op1);
 
9960
-      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
9961
+      if (gimple_bb (def1)
 
9962
+         && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
9963
           && loop->inner
 
9964
           && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
 
9965
           && is_gimple_assign (def1))
 
9966
Index: gcc/tree-data-ref.c
 
9967
===================================================================
 
9968
--- a/src/gcc/tree-data-ref.c   (.../tags/gcc_4_8_3_release)
 
9969
+++ b/src/gcc/tree-data-ref.c   (.../branches/gcc-4_8-branch)
 
9970
@@ -919,7 +919,6 @@
 
9971
          ref = fold_build2_loc (EXPR_LOCATION (ref),
 
9972
                                 MEM_REF, TREE_TYPE (ref),
 
9973
                                 base, memoff);
 
9974
-         DR_UNCONSTRAINED_BASE (dr) = true;
 
9975
          access_fns.safe_push (access_fn);
 
9976
        }
 
9977
     }
 
9978
@@ -1326,14 +1325,20 @@
 
9979
        return false;
 
9980
     }
 
9981
 
 
9982
-  /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
 
9983
-     the size of the base-object.  So we cannot do any offset/overlap
 
9984
-     based analysis but have to rely on points-to information only.  */
 
9985
+  /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
 
9986
+     do not know the size of the base-object.  So we cannot do any
 
9987
+     offset/overlap based analysis but have to rely on points-to
 
9988
+     information only.  */
 
9989
   if (TREE_CODE (addr_a) == MEM_REF
 
9990
-      && DR_UNCONSTRAINED_BASE (a))
 
9991
+      && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
 
9992
     {
 
9993
-      if (TREE_CODE (addr_b) == MEM_REF
 
9994
-         && DR_UNCONSTRAINED_BASE (b))
 
9995
+      /* For true dependences we can apply TBAA.  */
 
9996
+      if (flag_strict_aliasing
 
9997
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
9998
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
9999
+                                    get_alias_set (DR_REF (b))))
 
10000
+       return false;
 
10001
+      if (TREE_CODE (addr_b) == MEM_REF)
 
10002
        return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
10003
                                       TREE_OPERAND (addr_b, 0));
 
10004
       else
 
10005
@@ -1341,9 +1346,21 @@
 
10006
                                       build_fold_addr_expr (addr_b));
 
10007
     }
 
10008
   else if (TREE_CODE (addr_b) == MEM_REF
 
10009
-          && DR_UNCONSTRAINED_BASE (b))
 
10010
-    return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
10011
-                                  TREE_OPERAND (addr_b, 0));
 
10012
+          && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
 
10013
+    {
 
10014
+      /* For true dependences we can apply TBAA.  */
 
10015
+      if (flag_strict_aliasing
 
10016
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
10017
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
10018
+                                    get_alias_set (DR_REF (b))))
 
10019
+       return false;
 
10020
+      if (TREE_CODE (addr_a) == MEM_REF)
 
10021
+       return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
10022
+                                      TREE_OPERAND (addr_b, 0));
 
10023
+      else
 
10024
+       return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
10025
+                                      TREE_OPERAND (addr_b, 0));
 
10026
+    }
 
10027
 
 
10028
   /* Otherwise DR_BASE_OBJECT is an access that covers the whole object
 
10029
      that is being subsetted in the loop nest.  */
 
10030
Index: gcc/tree-data-ref.h
 
10031
===================================================================
 
10032
--- a/src/gcc/tree-data-ref.h   (.../tags/gcc_4_8_3_release)
 
10033
+++ b/src/gcc/tree-data-ref.h   (.../branches/gcc-4_8-branch)
 
10034
@@ -81,10 +81,6 @@
 
10035
 
 
10036
   /* A list of chrecs.  Access functions of the indices.  */
 
10037
   vec<tree> access_fns;
 
10038
-
 
10039
-  /* Whether BASE_OBJECT is an access representing the whole object
 
10040
-     or whether the access could not be constrained.  */
 
10041
-  bool unconstrained_base;
 
10042
 };
 
10043
 
 
10044
 struct dr_alias
 
10045
@@ -195,7 +191,6 @@
 
10046
 #define DR_STMT(DR)                (DR)->stmt
 
10047
 #define DR_REF(DR)                 (DR)->ref
 
10048
 #define DR_BASE_OBJECT(DR)         (DR)->indices.base_object
 
10049
-#define DR_UNCONSTRAINED_BASE(DR)  (DR)->indices.unconstrained_base
 
10050
 #define DR_ACCESS_FNS(DR)         (DR)->indices.access_fns
 
10051
 #define DR_ACCESS_FN(DR, I)        DR_ACCESS_FNS (DR)[I]
 
10052
 #define DR_NUM_DIMENSIONS(DR)      DR_ACCESS_FNS (DR).length ()
 
10053
Index: gcc/tree-vect-data-refs.c
 
10054
===================================================================
 
10055
--- a/src/gcc/tree-vect-data-refs.c     (.../tags/gcc_4_8_3_release)
 
10056
+++ b/src/gcc/tree-vect-data-refs.c     (.../branches/gcc-4_8-branch)
 
10057
@@ -3553,6 +3553,9 @@
 
10058
            is as follows:
 
10059
            if LOOP=i_loop:     &in             (relative to i_loop)
 
10060
            if LOOP=j_loop:     &in+i*2B        (relative to j_loop)
 
10061
+   BYTE_OFFSET: Optional, defaulted to NULL.  If supplied, it is added to the
 
10062
+           initial address.  Unlike OFFSET, which is number of elements to
 
10063
+           be added, BYTE_OFFSET is measured in bytes.
 
10064
 
 
10065
    Output:
 
10066
    1. Return an SSA_NAME whose value is the address of the memory location of
 
10067
@@ -3566,7 +3569,8 @@
 
10068
 vect_create_addr_base_for_vector_ref (gimple stmt,
 
10069
                                      gimple_seq *new_stmt_list,
 
10070
                                      tree offset,
 
10071
-                                     struct loop *loop)
 
10072
+                                     struct loop *loop,
 
10073
+                                     tree byte_offset)
 
10074
 {
 
10075
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
10076
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
 
10077
@@ -3628,7 +3632,17 @@
 
10078
       base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
10079
       gimple_seq_add_seq (new_stmt_list, seq);
 
10080
     }
 
10081
+  if (byte_offset)
 
10082
+    {
 
10083
+      tree tmp = create_tmp_var (sizetype, "offset");
 
10084
 
 
10085
+      byte_offset = fold_convert (sizetype, byte_offset);
 
10086
+      base_offset = fold_build2 (PLUS_EXPR, sizetype,
 
10087
+                                base_offset, byte_offset);
 
10088
+      base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
10089
+      gimple_seq_add_seq (new_stmt_list, seq);
 
10090
+    }
 
10091
+
 
10092
   /* base + base_offset */
 
10093
   if (loop_vinfo)
 
10094
     addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
 
10095
@@ -3692,6 +3706,10 @@
 
10096
    5. BSI: location where the new stmts are to be placed if there is no loop
 
10097
    6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
 
10098
         pointing to the initial address.
 
10099
+   7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
 
10100
+       to the initial address accessed by the data-ref in STMT.  This is
 
10101
+       similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
 
10102
+       in bytes.
 
10103
 
 
10104
    Output:
 
10105
    1. Declare a new ptr to vector_type, and have it point to the base of the
 
10106
@@ -3705,6 +3723,8 @@
 
10107
          initial_address = &a[init];
 
10108
       if OFFSET is supplied:
 
10109
          initial_address = &a[init + OFFSET];
 
10110
+      if BYTE_OFFSET is supplied:
 
10111
+        initial_address = &a[init] + BYTE_OFFSET;
 
10112
 
 
10113
       Return the initial_address in INITIAL_ADDRESS.
 
10114
 
 
10115
@@ -3722,7 +3742,7 @@
 
10116
 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
 
10117
                          tree offset, tree *initial_address,
 
10118
                          gimple_stmt_iterator *gsi, gimple *ptr_incr,
 
10119
-                         bool only_init, bool *inv_p)
 
10120
+                         bool only_init, bool *inv_p, tree byte_offset)
 
10121
 {
 
10122
   const char *base_name;
 
10123
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
10124
@@ -3881,10 +3901,10 @@
 
10125
   /* (2) Calculate the initial address of the aggregate-pointer, and set
 
10126
      the aggregate-pointer to point to it before the loop.  */
 
10127
 
 
10128
-  /* Create: (&(base[init_val+offset]) in the loop preheader.  */
 
10129
+  /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader.  */
 
10130
 
 
10131
   new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
 
10132
-                                                   offset, loop);
 
10133
+                                                  offset, loop, byte_offset);
 
10134
   if (new_stmt_list)
 
10135
     {
 
10136
       if (pe)
 
10137
Index: gcc/emit-rtl.c
 
10138
===================================================================
 
10139
--- a/src/gcc/emit-rtl.c        (.../tags/gcc_4_8_3_release)
 
10140
+++ b/src/gcc/emit-rtl.c        (.../branches/gcc-4_8-branch)
 
10141
@@ -263,7 +263,7 @@
 
10142
 
 
10143
 /* Return true if the given memory attributes are equal.  */
 
10144
 
 
10145
-static bool
 
10146
+bool
 
10147
 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
 
10148
 {
 
10149
   return (p->alias == q->alias
 
10150
Index: gcc/gimple-fold.c
 
10151
===================================================================
 
10152
--- a/src/gcc/gimple-fold.c     (.../tags/gcc_4_8_3_release)
 
10153
+++ b/src/gcc/gimple-fold.c     (.../branches/gcc-4_8-branch)
 
10154
@@ -2955,8 +2955,8 @@
 
10155
      result.  */
 
10156
   if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
 
10157
       /* VIEW_CONVERT_EXPR is defined only for matching sizes.  */
 
10158
-      && operand_equal_p (TYPE_SIZE (type),
 
10159
-                         TYPE_SIZE (TREE_TYPE (ctor)), 0))
 
10160
+      && !compare_tree_int (TYPE_SIZE (type), size)
 
10161
+      && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
 
10162
     {
 
10163
       ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
 
10164
       ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
 
10165
Index: gcc/emit-rtl.h
 
10166
===================================================================
 
10167
--- a/src/gcc/emit-rtl.h        (.../tags/gcc_4_8_3_release)
 
10168
+++ b/src/gcc/emit-rtl.h        (.../branches/gcc-4_8-branch)
 
10169
@@ -20,6 +20,9 @@
 
10170
 #ifndef GCC_EMIT_RTL_H
 
10171
 #define GCC_EMIT_RTL_H
 
10172
 
 
10173
+/* Return whether two MEM_ATTRs are equal.  */
 
10174
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
 
10175
+
 
10176
 /* Set the alias set of MEM to SET.  */
 
10177
 extern void set_mem_alias_set (rtx, alias_set_type);
 
10178
 
 
10179
Index: gcc/tree-cfgcleanup.c
 
10180
===================================================================
 
10181
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
 
10182
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
 
10183
@@ -498,7 +498,20 @@
 
10184
 
 
10185
   /* First split basic block if stmt is not last.  */
 
10186
   if (stmt != gsi_stmt (gsi_last_bb (bb)))
 
10187
-    split_block (bb, stmt);
 
10188
+    {
 
10189
+      if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
 
10190
+       {
 
10191
+         /* Don't split if there are only debug stmts
 
10192
+            after stmt, that can result in -fcompare-debug
 
10193
+            failures.  Remove the debug stmts instead,
 
10194
+            they should be all unreachable anyway.  */
 
10195
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
 
10196
+         for (gsi_next (&gsi); !gsi_end_p (gsi); )
 
10197
+           gsi_remove (&gsi, true);
 
10198
+       }
 
10199
+      else
 
10200
+       split_block (bb, stmt);
 
10201
+    }
 
10202
 
 
10203
   changed |= remove_fallthru_edge (bb->succs);
 
10204
 
 
10205
Index: gcc/tree-sra.c
 
10206
===================================================================
 
10207
--- a/src/gcc/tree-sra.c        (.../tags/gcc_4_8_3_release)
 
10208
+++ b/src/gcc/tree-sra.c        (.../branches/gcc-4_8-branch)
 
10209
@@ -1030,6 +1030,11 @@
 
10210
                               "component.");
 
10211
       return NULL;
 
10212
     }
 
10213
+  if (TREE_THIS_VOLATILE (expr))
 
10214
+    {
 
10215
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
 
10216
+      return NULL;
 
10217
+    }
 
10218
 
 
10219
   switch (TREE_CODE (expr))
 
10220
     {
 
10221
Index: gcc/graphite-clast-to-gimple.c
 
10222
===================================================================
 
10223
--- a/src/gcc/graphite-clast-to-gimple.c        (.../tags/gcc_4_8_3_release)
 
10224
+++ b/src/gcc/graphite-clast-to-gimple.c        (.../branches/gcc-4_8-branch)
 
10225
@@ -30,7 +30,12 @@
 
10226
 #include <isl/aff.h>
 
10227
 #include <cloog/cloog.h>
 
10228
 #include <cloog/isl/domain.h>
 
10229
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
10230
+#include <isl/deprecated/int.h>
 
10231
+#include <isl/lp.h>
 
10232
+#include <isl/deprecated/ilp_int.h>
 
10233
 #endif
 
10234
+#endif
 
10235
 
 
10236
 #include "system.h"
 
10237
 #include "coretypes.h"
 
10238
Index: gcc/common.opt
 
10239
===================================================================
 
10240
--- a/src/gcc/common.opt        (.../tags/gcc_4_8_3_release)
 
10241
+++ b/src/gcc/common.opt        (.../branches/gcc-4_8-branch)
 
10242
@@ -1226,6 +1226,10 @@
 
10243
 Common Report Var(flag_tm)
 
10244
 Enable support for GNU transactional memory
 
10245
 
 
10246
+fgnu-unique
 
10247
+Common Report Var(flag_gnu_unique) Init(1)
 
10248
+Use STB_GNU_UNIQUE if supported by the assembler
 
10249
+
 
10250
 floop-flatten
 
10251
 Common Ignore
 
10252
 Does nothing. Preserved for backward compatibility.
 
10253
Index: gcc/graphite-optimize-isl.c
 
10254
===================================================================
 
10255
--- a/src/gcc/graphite-optimize-isl.c   (.../tags/gcc_4_8_3_release)
 
10256
+++ b/src/gcc/graphite-optimize-isl.c   (.../branches/gcc-4_8-branch)
 
10257
@@ -28,7 +28,11 @@
 
10258
 #include <isl/band.h>
 
10259
 #include <isl/aff.h>
 
10260
 #include <isl/options.h>
 
10261
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
10262
+#include <isl/deprecated/int.h>
 
10263
+#include <isl/deprecated/aff_int.h>
 
10264
 #endif
 
10265
+#endif
 
10266
 
 
10267
 #include "system.h"
 
10268
 #include "coretypes.h"
 
10269
@@ -365,7 +369,11 @@
 
10270
        {
 
10271
          for (i = ScheduleDimensions - 1 ;  i >= 0 ; i--)
 
10272
            {
 
10273
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
10274
+             if (isl_band_member_is_coincident (Band, i))
 
10275
+#else
 
10276
              if (isl_band_member_is_zero_distance(Band, i))
 
10277
+#endif
 
10278
                {
 
10279
                  isl_map *TileMap;
 
10280
                  isl_union_map *TileUMap;
 
10281
Index: gcc/tree-vect-patterns.c
 
10282
===================================================================
 
10283
--- a/src/gcc/tree-vect-patterns.c      (.../tags/gcc_4_8_3_release)
 
10284
+++ b/src/gcc/tree-vect-patterns.c      (.../branches/gcc-4_8-branch)
 
10285
@@ -395,7 +395,7 @@
 
10286
           || !promotion)
 
10287
         return NULL;
 
10288
       oprnd00 = gimple_assign_rhs1 (def_stmt);
 
10289
-      if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
 
10290
+      if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
 
10291
                                 &promotion)
 
10292
           || !promotion)
 
10293
         return NULL;
 
10294
Index: gcc/sched-deps.c
 
10295
===================================================================
 
10296
--- a/src/gcc/sched-deps.c      (.../tags/gcc_4_8_3_release)
 
10297
+++ b/src/gcc/sched-deps.c      (.../branches/gcc-4_8-branch)
 
10298
@@ -2744,7 +2744,8 @@
 
10299
           Consider for instance a volatile asm that changes the fpu rounding
 
10300
           mode.  An insn should not be moved across this even if it only uses
 
10301
           pseudo-regs because it might give an incorrectly rounded result.  */
 
10302
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
10303
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
10304
+           && !DEBUG_INSN_P (insn))
 
10305
          reg_pending_barrier = TRUE_BARRIER;
 
10306
 
 
10307
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
 
10308
Index: gcc/graphite-poly.c
 
10309
===================================================================
 
10310
--- a/src/gcc/graphite-poly.c   (.../tags/gcc_4_8_3_release)
 
10311
+++ b/src/gcc/graphite-poly.c   (.../branches/gcc-4_8-branch)
 
10312
@@ -30,7 +30,11 @@
 
10313
 #include <isl/aff.h>
 
10314
 #include <cloog/cloog.h>
 
10315
 #include <cloog/isl/domain.h>
 
10316
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
10317
+#include <isl/deprecated/int.h>
 
10318
+#include <isl/deprecated/ilp_int.h>
 
10319
 #endif
 
10320
+#endif
 
10321
 
 
10322
 #include "system.h"
 
10323
 #include "coretypes.h"
 
10324
Index: gcc/tree-vect-stmts.c
 
10325
===================================================================
 
10326
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
 
10327
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
 
10328
@@ -4319,6 +4319,7 @@
 
10329
   int i, j, group_size;
 
10330
   tree msq = NULL_TREE, lsq;
 
10331
   tree offset = NULL_TREE;
 
10332
+  tree byte_offset = NULL_TREE;
 
10333
   tree realignment_token = NULL_TREE;
 
10334
   gimple phi = NULL;
 
10335
   vec<tree> dr_chain = vNULL;
 
10336
@@ -4934,7 +4935,8 @@
 
10337
       if (alignment_support_scheme == dr_explicit_realign_optimized)
 
10338
        {
 
10339
          phi = SSA_NAME_DEF_STMT (msq);
 
10340
-         offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
 
10341
+         byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
 
10342
+                                   size_one_node);
 
10343
        }
 
10344
     }
 
10345
   else
 
10346
@@ -4955,7 +4957,8 @@
 
10347
       if (j == 0)
 
10348
         dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
 
10349
                                                offset, &dummy, gsi,
 
10350
-                                               &ptr_incr, false, &inv_p);
 
10351
+                                               &ptr_incr, false, &inv_p,
 
10352
+                                               byte_offset);
 
10353
       else
 
10354
         dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
 
10355
                                       TYPE_SIZE_UNIT (aggr_type));
 
10356
Index: gcc/graphite-sese-to-poly.c
 
10357
===================================================================
 
10358
--- a/src/gcc/graphite-sese-to-poly.c   (.../tags/gcc_4_8_3_release)
 
10359
+++ b/src/gcc/graphite-sese-to-poly.c   (.../branches/gcc-4_8-branch)
 
10360
@@ -29,7 +29,12 @@
 
10361
 #include <cloog/cloog.h>
 
10362
 #include <cloog/cloog.h>
 
10363
 #include <cloog/isl/domain.h>
 
10364
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
10365
+#include <isl/deprecated/int.h>
 
10366
+#include <isl/deprecated/aff_int.h>
 
10367
+#include <isl/deprecated/constraint_int.h>
 
10368
 #endif
 
10369
+#endif
 
10370
 
 
10371
 #include "system.h"
 
10372
 #include "coretypes.h"
 
10373
Index: gcc/combine.c
 
10374
===================================================================
 
10375
--- a/src/gcc/combine.c (.../tags/gcc_4_8_3_release)
 
10376
+++ b/src/gcc/combine.c (.../branches/gcc-4_8-branch)
 
10377
@@ -1527,8 +1527,8 @@
 
10378
       uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
 
10379
 
 
10380
       /* The mode and signedness of the argument as it is actually passed,
 
10381
-         after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions.  */
 
10382
-      mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
 
10383
+         see assign_parm_setup_reg in function.c.  */
 
10384
+      mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns1,
 
10385
                                     TREE_TYPE (cfun->decl), 0);
 
10386
 
 
10387
       /* The mode of the register in which the argument is being passed.  */
 
10388
Index: gcc/config.gcc
 
10389
===================================================================
 
10390
--- a/src/gcc/config.gcc        (.../tags/gcc_4_8_3_release)
 
10391
+++ b/src/gcc/config.gcc        (.../branches/gcc-4_8-branch)
 
10392
@@ -2466,7 +2466,7 @@
 
10393
        ;;
 
10394
 sparc-*-rtems*)
 
10395
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
 
10396
-       tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
 
10397
+       tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
 
10398
        ;;
 
10399
 sparc-*-linux*)
 
10400
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
 
10401
@@ -2992,6 +2992,9 @@
 
10402
        *-leon[3-9]*)
 
10403
          with_cpu=leon3
 
10404
          ;;
 
10405
+       *-leon[3-9]v7*)
 
10406
+         with_cpu=leon3v7
 
10407
+         ;;
 
10408
        *)
 
10409
          with_cpu="`echo ${target} | sed 's/-.*$//'`"
 
10410
          ;;
 
10411
@@ -3630,7 +3633,7 @@
 
10412
                        case ${val} in
 
10413
                        "" | sparc | sparcv9 | sparc64 \
 
10414
                        | v7 | cypress \
 
10415
-                       | v8 | supersparc | hypersparc | leon | leon3 \
 
10416
+                       | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
 
10417
                        | sparclite | f930 | f934 | sparclite86x \
 
10418
                        | sparclet | tsc701 \
 
10419
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
 
10420
Index: gcc/ree.c
 
10421
===================================================================
 
10422
--- a/src/gcc/ree.c     (.../tags/gcc_4_8_3_release)
 
10423
+++ b/src/gcc/ree.c     (.../branches/gcc-4_8-branch)
 
10424
@@ -261,6 +261,50 @@
 
10425
 
 
10426
 static int max_insn_uid;
 
10427
 
 
10428
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN.  */
 
10429
+
 
10430
+static bool
 
10431
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
 
10432
+                             enum machine_mode old_mode, enum rtx_code code)
 
10433
+{
 
10434
+  rtx *loc = &REG_NOTES (insn);
 
10435
+  while (*loc)
 
10436
+    {
 
10437
+      enum reg_note kind = REG_NOTE_KIND (*loc);
 
10438
+      if (kind == REG_EQUAL || kind == REG_EQUIV)
 
10439
+       {
 
10440
+         rtx orig_src = XEXP (*loc, 0);
 
10441
+         /* Update equivalency constants.  Recall that RTL constants are
 
10442
+            sign-extended.  */
 
10443
+         if (GET_CODE (orig_src) == CONST_INT
 
10444
+             && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
 
10445
+           {
 
10446
+             if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
 
10447
+               /* Nothing needed.  */;
 
10448
+             else
 
10449
+               {
 
10450
+                 /* Zero-extend the negative constant by masking out the
 
10451
+                    bits outside the source mode.  */
 
10452
+                 rtx new_const_int
 
10453
+                   = gen_int_mode (INTVAL (orig_src)
 
10454
+                                   & GET_MODE_MASK (old_mode),
 
10455
+                                   new_mode);
 
10456
+                 if (!validate_change (insn, &XEXP (*loc, 0),
 
10457
+                                       new_const_int, true))
 
10458
+                   return false;
 
10459
+               }
 
10460
+             loc = &XEXP (*loc, 1);
 
10461
+           }
 
10462
+         /* Drop all other notes, they assume a wrong mode.  */
 
10463
+         else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
 
10464
+           return false;
 
10465
+       }
 
10466
+      else
 
10467
+       loc = &XEXP (*loc, 1);
 
10468
+    }
 
10469
+  return true;
 
10470
+}
 
10471
+
 
10472
 /* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
 
10473
    and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
 
10474
    this code modifies the SET rtx to a new SET rtx that extends the
 
10475
@@ -282,6 +326,7 @@
 
10476
 combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
 
10477
 {
 
10478
   rtx orig_src = SET_SRC (*orig_set);
 
10479
+  enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
 
10480
   rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
 
10481
   rtx new_set;
 
10482
 
 
10483
@@ -296,9 +341,8 @@
 
10484
        {
 
10485
          /* Zero-extend the negative constant by masking out the bits outside
 
10486
             the source mode.  */
 
10487
-         enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
 
10488
          rtx new_const_int
 
10489
-           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
 
10490
+           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
 
10491
          new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
 
10492
        }
 
10493
     }
 
10494
@@ -336,7 +380,9 @@
 
10495
 
 
10496
   /* This change is a part of a group of changes.  Hence,
 
10497
      validate_change will not try to commit the change.  */
 
10498
-  if (validate_change (curr_insn, orig_set, new_set, true))
 
10499
+  if (validate_change (curr_insn, orig_set, new_set, true)
 
10500
+      && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
 
10501
+                                      cand->code))
 
10502
     {
 
10503
       if (dump_file)
 
10504
         {
 
10505
@@ -385,7 +431,9 @@
 
10506
   ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
 
10507
   new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
 
10508
 
 
10509
-  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
 
10510
+  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
 
10511
+      && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
 
10512
+                                      cand->code))
 
10513
     {
 
10514
       if (dump_file)
 
10515
         {
 
10516
Index: gcc/config/alpha/elf.h
 
10517
===================================================================
 
10518
--- a/src/gcc/config/alpha/elf.h        (.../tags/gcc_4_8_3_release)
 
10519
+++ b/src/gcc/config/alpha/elf.h        (.../branches/gcc-4_8-branch)
 
10520
@@ -126,6 +126,10 @@
 
10521
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
 
10522
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
10523
 
 
10524
+/* This variable should be set to 'true' if the target ABI requires
 
10525
+   unwinding tables even when exceptions are not used.  */
 
10526
+#define TARGET_UNWIND_TABLES_DEFAULT true
 
10527
+
 
10528
 /* Select a format to encode pointers in exception handling data.  CODE
 
10529
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
 
10530
    true if the symbol may be affected by dynamic relocations.
 
10531
Index: gcc/config/alpha/alpha.c
 
10532
===================================================================
 
10533
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_8_3_release)
 
10534
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_8-branch)
 
10535
@@ -8658,6 +8658,11 @@
 
10536
                        }
 
10537
                      break;
 
10538
 
 
10539
+                   case BARRIER:
 
10540
+                     /* __builtin_unreachable can expand to no code at all,
 
10541
+                        leaving (barrier) RTXes in the instruction stream.  */
 
10542
+                     goto close_shadow_notrapb;
 
10543
+
 
10544
                    case JUMP_INSN:
 
10545
                    case CALL_INSN:
 
10546
                    case CODE_LABEL:
 
10547
@@ -8673,6 +8678,7 @@
 
10548
                  n = emit_insn_before (gen_trapb (), i);
 
10549
                  PUT_MODE (n, TImode);
 
10550
                  PUT_MODE (i, TImode);
 
10551
+               close_shadow_notrapb:
 
10552
                  trap_pending = 0;
 
10553
                  shadow.used.i = 0;
 
10554
                  shadow.used.fp = 0;
 
10555
Index: gcc/config/elfos.h
 
10556
===================================================================
 
10557
--- a/src/gcc/config/elfos.h    (.../tags/gcc_4_8_3_release)
 
10558
+++ b/src/gcc/config/elfos.h    (.../branches/gcc-4_8-branch)
 
10559
@@ -287,7 +287,7 @@
 
10560
 /* Write the extra assembler code needed to declare an object properly.  */
 
10561
 
 
10562
 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
 
10563
-#define USE_GNU_UNIQUE_OBJECT 1
 
10564
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
 
10565
 #else
 
10566
 #define USE_GNU_UNIQUE_OBJECT 0
 
10567
 #endif
 
10568
Index: gcc/config/sparc/t-rtems
 
10569
===================================================================
 
10570
--- a/src/gcc/config/sparc/t-rtems      (.../tags/gcc_4_8_3_release)
 
10571
+++ b/src/gcc/config/sparc/t-rtems      (.../branches/gcc-4_8-branch)
 
10572
@@ -17,6 +17,15 @@
 
10573
 # <http://www.gnu.org/licenses/>.
 
10574
 #
 
10575
 
 
10576
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
 
10577
-MULTILIB_DIRNAMES = soft v8 leon3
 
10578
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
 
10579
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
 
10580
 MULTILIB_MATCHES = msoft-float=mno-fpu
 
10581
+
 
10582
+MULTILIB_EXCEPTIONS = muser-mode
 
10583
+MULTILIB_EXCEPTIONS += mcpu=leon3
 
10584
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
 
10585
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
 
10586
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
 
10587
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
 
10588
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
 
10589
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
 
10590
Index: gcc/config/sparc/sparc.md
 
10591
===================================================================
 
10592
--- a/src/gcc/config/sparc/sparc.md     (.../tags/gcc_4_8_3_release)
 
10593
+++ b/src/gcc/config/sparc/sparc.md     (.../branches/gcc-4_8-branch)
 
10594
@@ -215,6 +215,7 @@
 
10595
    hypersparc,
 
10596
    leon,
 
10597
    leon3,
 
10598
+   leon3v7,
 
10599
    sparclite,
 
10600
    f930,
 
10601
    f934,
 
10602
Index: gcc/config/sparc/sparc.opt
 
10603
===================================================================
 
10604
--- a/src/gcc/config/sparc/sparc.opt    (.../tags/gcc_4_8_3_release)
 
10605
+++ b/src/gcc/config/sparc/sparc.opt    (.../branches/gcc-4_8-branch)
 
10606
@@ -153,6 +153,9 @@
 
10607
 Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
 
10608
 
 
10609
 EnumValue
 
10610
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
 
10611
+
 
10612
+EnumValue
 
10613
 Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
 
10614
 
 
10615
 EnumValue
 
10616
Index: gcc/config/sparc/sync.md
 
10617
===================================================================
 
10618
--- a/src/gcc/config/sparc/sync.md      (.../tags/gcc_4_8_3_release)
 
10619
+++ b/src/gcc/config/sparc/sync.md      (.../branches/gcc-4_8-branch)
 
10620
@@ -64,11 +64,19 @@
 
10621
   "stbar"
 
10622
   [(set_attr "type" "multi")])
 
10623
 
 
10624
+;; For LEON3, STB has the effect of membar #StoreLoad.
 
10625
+(define_insn "*membar_storeload_leon3"
 
10626
+  [(set (match_operand:BLK 0 "" "")
 
10627
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
10628
+  "TARGET_LEON3"
 
10629
+  "stb\t%%g0, [%%sp-1]"
 
10630
+  [(set_attr "type" "store")])
 
10631
+
 
10632
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
 
10633
 (define_insn "*membar_storeload"
 
10634
   [(set (match_operand:BLK 0 "" "")
 
10635
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
10636
-  "TARGET_V8"
 
10637
+  "TARGET_V8 && !TARGET_LEON3"
 
10638
   "ldstub\t[%%sp-1], %%g0"
 
10639
   [(set_attr "type" "multi")])
 
10640
 
 
10641
Index: gcc/config/sparc/sparc-opts.h
 
10642
===================================================================
 
10643
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
 
10644
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
 
10645
@@ -31,6 +31,7 @@
 
10646
   PROCESSOR_HYPERSPARC,
 
10647
   PROCESSOR_LEON,
 
10648
   PROCESSOR_LEON3,
 
10649
+  PROCESSOR_LEON3V7,
 
10650
   PROCESSOR_SPARCLITE,
 
10651
   PROCESSOR_F930,
 
10652
   PROCESSOR_F934,
 
10653
Index: gcc/config/sparc/sparc.c
 
10654
===================================================================
 
10655
--- a/src/gcc/config/sparc/sparc.c      (.../tags/gcc_4_8_3_release)
 
10656
+++ b/src/gcc/config/sparc/sparc.c      (.../branches/gcc-4_8-branch)
 
10657
@@ -1210,6 +1210,7 @@
 
10658
     { TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
 
10659
     { TARGET_CPU_leon, PROCESSOR_LEON },
 
10660
     { TARGET_CPU_leon3, PROCESSOR_LEON3 },
 
10661
+    { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
 
10662
     { TARGET_CPU_sparclite, PROCESSOR_F930 },
 
10663
     { TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
 
10664
     { TARGET_CPU_sparclet, PROCESSOR_TSC701 },
 
10665
@@ -1238,6 +1239,7 @@
 
10666
     { "hypersparc",    MASK_ISA, MASK_V8|MASK_FPU },
 
10667
     { "leon",          MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
 
10668
     { "leon3",         MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
 
10669
+    { "leon3v7",       MASK_ISA, MASK_LEON3|MASK_FPU },
 
10670
     { "sparclite",     MASK_ISA, MASK_SPARCLITE },
 
10671
     /* The Fujitsu MB86930 is the original sparclite chip, with no FPU.  */
 
10672
     { "f930",          MASK_ISA|MASK_FPU, MASK_SPARCLITE },
 
10673
@@ -1490,6 +1492,7 @@
 
10674
       sparc_costs = &leon_costs;
 
10675
       break;
 
10676
     case PROCESSOR_LEON3:
 
10677
+    case PROCESSOR_LEON3V7:
 
10678
       sparc_costs = &leon3_costs;
 
10679
       break;
 
10680
     case PROCESSOR_SPARCLET:
 
10681
Index: gcc/config/sparc/leon.md
 
10682
===================================================================
 
10683
--- a/src/gcc/config/sparc/leon.md      (.../tags/gcc_4_8_3_release)
 
10684
+++ b/src/gcc/config/sparc/leon.md      (.../branches/gcc-4_8-branch)
 
10685
@@ -29,11 +29,11 @@
 
10686
 
 
10687
 ;; Use a double reservation to work around the load pipeline hazard on UT699.
 
10688
 (define_insn_reservation "leon3_load" 1
 
10689
-  (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
 
10690
+  (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
 
10691
   "leon_memory*2")
 
10692
 
 
10693
 (define_insn_reservation "leon_store" 2
 
10694
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
 
10695
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
 
10696
   "leon_memory*2")
 
10697
 
 
10698
 ;; This describes Gaisler Research's FPU
 
10699
@@ -44,21 +44,21 @@
 
10700
 (define_cpu_unit "grfpu_ds" "grfpu")
 
10701
 
 
10702
 (define_insn_reservation "leon_fp_alu" 4
 
10703
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
 
10704
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
 
10705
   "grfpu_alu, nothing*3")
 
10706
 
 
10707
 (define_insn_reservation "leon_fp_divs" 16
 
10708
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
 
10709
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
 
10710
   "grfpu_ds*14, nothing*2")
 
10711
 
 
10712
 (define_insn_reservation "leon_fp_divd" 17
 
10713
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
 
10714
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
 
10715
   "grfpu_ds*15, nothing*2")
 
10716
 
 
10717
 (define_insn_reservation "leon_fp_sqrts" 24
 
10718
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
 
10719
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
 
10720
   "grfpu_ds*22, nothing*2")
 
10721
 
 
10722
 (define_insn_reservation "leon_fp_sqrtd" 25
 
10723
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
 
10724
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
 
10725
   "grfpu_ds*23, nothing*2")
 
10726
Index: gcc/config/sparc/sparc.h
 
10727
===================================================================
 
10728
--- a/src/gcc/config/sparc/sparc.h      (.../tags/gcc_4_8_3_release)
 
10729
+++ b/src/gcc/config/sparc/sparc.h      (.../branches/gcc-4_8-branch)
 
10730
@@ -137,21 +137,22 @@
 
10731
 #define TARGET_CPU_hypersparc  3
 
10732
 #define TARGET_CPU_leon                4
 
10733
 #define TARGET_CPU_leon3       5
 
10734
-#define TARGET_CPU_sparclite   6
 
10735
-#define TARGET_CPU_f930                6       /* alias */
 
10736
-#define TARGET_CPU_f934                6       /* alias */
 
10737
-#define TARGET_CPU_sparclite86x        7
 
10738
-#define TARGET_CPU_sparclet    8
 
10739
-#define TARGET_CPU_tsc701      8       /* alias */
 
10740
-#define TARGET_CPU_v9          9       /* generic v9 implementation */
 
10741
-#define TARGET_CPU_sparcv9     9       /* alias */
 
10742
-#define TARGET_CPU_sparc64     9       /* alias */
 
10743
-#define TARGET_CPU_ultrasparc  10
 
10744
-#define TARGET_CPU_ultrasparc3 11
 
10745
-#define TARGET_CPU_niagara     12
 
10746
-#define TARGET_CPU_niagara2    13
 
10747
-#define TARGET_CPU_niagara3    14
 
10748
-#define TARGET_CPU_niagara4    15
 
10749
+#define TARGET_CPU_leon3v7     6
 
10750
+#define TARGET_CPU_sparclite   7
 
10751
+#define TARGET_CPU_f930                7       /* alias */
 
10752
+#define TARGET_CPU_f934                7       /* alias */
 
10753
+#define TARGET_CPU_sparclite86x        8
 
10754
+#define TARGET_CPU_sparclet    9
 
10755
+#define TARGET_CPU_tsc701      9       /* alias */
 
10756
+#define TARGET_CPU_v9          10      /* generic v9 implementation */
 
10757
+#define TARGET_CPU_sparcv9     10      /* alias */
 
10758
+#define TARGET_CPU_sparc64     10      /* alias */
 
10759
+#define TARGET_CPU_ultrasparc  11
 
10760
+#define TARGET_CPU_ultrasparc3 12
 
10761
+#define TARGET_CPU_niagara     13
 
10762
+#define TARGET_CPU_niagara2    14
 
10763
+#define TARGET_CPU_niagara3    15
 
10764
+#define TARGET_CPU_niagara4    16
 
10765
 
 
10766
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
 
10767
  || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
 
10768
@@ -239,8 +240,13 @@
 
10769
 #define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
 
10770
 #endif
 
10771
 
 
10772
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
 
10773
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
 
10774
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
 
10775
 #endif
 
10776
 
 
10777
+#endif
 
10778
+
 
10779
 #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
 
10780
  #error Unrecognized value in TARGET_CPU_DEFAULT.
 
10781
 #endif
 
10782
@@ -285,6 +291,7 @@
 
10783
 %{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
 
10784
 %{mcpu=leon:-D__leon__ -D__sparc_v8__} \
 
10785
 %{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
 
10786
+%{mcpu=leon3v7:-D__leon__} \
 
10787
 %{mcpu=v9:-D__sparc_v9__} \
 
10788
 %{mcpu=ultrasparc:-D__sparc_v9__} \
 
10789
 %{mcpu=ultrasparc3:-D__sparc_v9__} \
 
10790
@@ -334,6 +341,7 @@
 
10791
 %{mcpu=hypersparc:-Av8} \
 
10792
 %{mcpu=leon:" AS_LEON_FLAG "} \
 
10793
 %{mcpu=leon3:" AS_LEON_FLAG "} \
 
10794
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
 
10795
 %{mv8plus:-Av8plus} \
 
10796
 %{mcpu=v9:-Av9} \
 
10797
 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
 
10798
@@ -1760,8 +1768,10 @@
 
10799
 
 
10800
 #ifdef HAVE_AS_LEON
 
10801
 #define AS_LEON_FLAG "-Aleon"
 
10802
+#define AS_LEONV7_FLAG "-Aleon"
 
10803
 #else
 
10804
 #define AS_LEON_FLAG "-Av8"
 
10805
+#define AS_LEONV7_FLAG "-Av7"
 
10806
 #endif
 
10807
 
 
10808
 /* We use gcc _mcount for profiling.  */
 
10809
Index: gcc/config/i386/i386.md
 
10810
===================================================================
 
10811
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_8_3_release)
 
10812
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_8-branch)
 
10813
@@ -5339,66 +5339,37 @@
 
10814
 
 
10815
 ;; Avoid store forwarding (partial memory) stall penalty by extending
 
10816
 ;; SImode value to DImode through XMM register instead of pushing two
 
10817
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
 
10818
-;; targets benefit from this optimization. Also note that fild
 
10819
-;; loads from memory only.
 
10820
+;; SImode values to stack. Also note that fild loads from memory only.
 
10821
 
 
10822
-(define_insn "*floatunssi<mode>2_1"
 
10823
-  [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
 
10824
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
 
10825
+  [(set (match_operand:X87MODEF 0 "register_operand" "=f")
 
10826
        (unsigned_float:X87MODEF
 
10827
-         (match_operand:SI 1 "nonimmediate_operand" "x,m")))
 
10828
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
 
10829
-   (clobber (match_scratch:SI 3 "=X,x"))]
 
10830
+         (match_operand:SI 1 "nonimmediate_operand" "rm")))
 
10831
+   (clobber (match_scratch:DI 3 "=x"))
 
10832
+   (clobber (match_operand:DI 2 "memory_operand" "=m"))]
 
10833
   "!TARGET_64BIT
 
10834
    && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10835
-   && TARGET_SSE"
 
10836
+   && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
 
10837
   "#"
 
10838
+  "&& reload_completed"
 
10839
+  [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
 
10840
+   (set (match_dup 2) (match_dup 3))
 
10841
+   (set (match_dup 0)
 
10842
+       (float:X87MODEF (match_dup 2)))]
 
10843
+  ""
 
10844
   [(set_attr "type" "multi")
 
10845
    (set_attr "mode" "<MODE>")])
 
10846
 
 
10847
-(define_split
 
10848
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
10849
-       (unsigned_float:X87MODEF
 
10850
-         (match_operand:SI 1 "register_operand")))
 
10851
-   (clobber (match_operand:DI 2 "memory_operand"))
 
10852
-   (clobber (match_scratch:SI 3))]
 
10853
-  "!TARGET_64BIT
 
10854
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10855
-   && TARGET_SSE
 
10856
-   && reload_completed"
 
10857
-  [(set (match_dup 2) (match_dup 1))
 
10858
-   (set (match_dup 0)
 
10859
-       (float:X87MODEF (match_dup 2)))]
 
10860
-  "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
 
10861
-
 
10862
-(define_split
 
10863
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
10864
-       (unsigned_float:X87MODEF
 
10865
-         (match_operand:SI 1 "memory_operand")))
 
10866
-   (clobber (match_operand:DI 2 "memory_operand"))
 
10867
-   (clobber (match_scratch:SI 3))]
 
10868
-  "!TARGET_64BIT
 
10869
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10870
-   && TARGET_SSE
 
10871
-   && reload_completed"
 
10872
-  [(set (match_dup 2) (match_dup 3))
 
10873
-   (set (match_dup 0)
 
10874
-       (float:X87MODEF (match_dup 2)))]
 
10875
-{
 
10876
-  emit_move_insn (operands[3], operands[1]);
 
10877
-  operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
 
10878
-})
 
10879
-
 
10880
 (define_expand "floatunssi<mode>2"
 
10881
   [(parallel
 
10882
      [(set (match_operand:X87MODEF 0 "register_operand")
 
10883
           (unsigned_float:X87MODEF
 
10884
             (match_operand:SI 1 "nonimmediate_operand")))
 
10885
-      (clobber (match_dup 2))
 
10886
-      (clobber (match_scratch:SI 3))])]
 
10887
+      (clobber (match_scratch:DI 3))
 
10888
+      (clobber (match_dup 2))])]
 
10889
   "!TARGET_64BIT
 
10890
    && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10891
-       && TARGET_SSE)
 
10892
+       && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
 
10893
        || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
 
10894
 {
 
10895
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 
10896
@@ -13545,7 +13516,8 @@
 
10897
    (set (reg:CCFP FPSR_REG)
 
10898
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
10899
                     UNSPEC_C2_FLAG))]
 
10900
-  "TARGET_USE_FANCY_MATH_387"
 
10901
+  "TARGET_USE_FANCY_MATH_387
 
10902
+   && flag_finite_math_only"
 
10903
   "fprem"
 
10904
   [(set_attr "type" "fpspc")
 
10905
    (set_attr "mode" "XF")])
 
10906
@@ -13554,7 +13526,8 @@
 
10907
   [(use (match_operand:XF 0 "register_operand"))
 
10908
    (use (match_operand:XF 1 "general_operand"))
 
10909
    (use (match_operand:XF 2 "general_operand"))]
 
10910
-  "TARGET_USE_FANCY_MATH_387"
 
10911
+  "TARGET_USE_FANCY_MATH_387
 
10912
+   && flag_finite_math_only"
 
10913
 {
 
10914
   rtx label = gen_label_rtx ();
 
10915
 
 
10916
@@ -13577,7 +13550,8 @@
 
10917
   [(use (match_operand:MODEF 0 "register_operand"))
 
10918
    (use (match_operand:MODEF 1 "general_operand"))
 
10919
    (use (match_operand:MODEF 2 "general_operand"))]
 
10920
-  "TARGET_USE_FANCY_MATH_387"
 
10921
+  "TARGET_USE_FANCY_MATH_387
 
10922
+   && flag_finite_math_only"
 
10923
 {
 
10924
   rtx (*gen_truncxf) (rtx, rtx);
 
10925
 
 
10926
@@ -13616,7 +13590,8 @@
 
10927
    (set (reg:CCFP FPSR_REG)
 
10928
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
10929
                     UNSPEC_C2_FLAG))]
 
10930
-  "TARGET_USE_FANCY_MATH_387"
 
10931
+  "TARGET_USE_FANCY_MATH_387
 
10932
+   && flag_finite_math_only"
 
10933
   "fprem1"
 
10934
   [(set_attr "type" "fpspc")
 
10935
    (set_attr "mode" "XF")])
 
10936
@@ -13625,7 +13600,8 @@
 
10937
   [(use (match_operand:XF 0 "register_operand"))
 
10938
    (use (match_operand:XF 1 "general_operand"))
 
10939
    (use (match_operand:XF 2 "general_operand"))]
 
10940
-  "TARGET_USE_FANCY_MATH_387"
 
10941
+  "TARGET_USE_FANCY_MATH_387
 
10942
+   && flag_finite_math_only"
 
10943
 {
 
10944
   rtx label = gen_label_rtx ();
 
10945
 
 
10946
@@ -13648,7 +13624,8 @@
 
10947
   [(use (match_operand:MODEF 0 "register_operand"))
 
10948
    (use (match_operand:MODEF 1 "general_operand"))
 
10949
    (use (match_operand:MODEF 2 "general_operand"))]
 
10950
-  "TARGET_USE_FANCY_MATH_387"
 
10951
+  "TARGET_USE_FANCY_MATH_387
 
10952
+   && flag_finite_math_only"
 
10953
 {
 
10954
   rtx (*gen_truncxf) (rtx, rtx);
 
10955
 
 
10956
Index: gcc/config/i386/driver-i386.c
 
10957
===================================================================
 
10958
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
 
10959
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
 
10960
@@ -713,6 +713,11 @@
 
10961
                    /* Assume Core 2.  */
 
10962
                    cpu = "core2";
 
10963
                }
 
10964
+             else if (has_longmode)
 
10965
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
 
10966
+                  -march=native would be unusable for 64-bit compilations,
 
10967
+                  as all the CPUs below are 32-bit only.  */
 
10968
+               cpu = "x86-64";
 
10969
              else if (has_sse3)
 
10970
                /* It is Core Duo.  */
 
10971
                cpu = "pentium-m";
 
10972
Index: gcc/config/i386/i386.c
 
10973
===================================================================
 
10974
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_8_3_release)
 
10975
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_8-branch)
 
10976
@@ -13800,7 +13800,7 @@
 
10977
       if (mode == CCmode)
 
10978
        suffix = "b";
 
10979
       else if (mode == CCCmode)
 
10980
-       suffix = "c";
 
10981
+       suffix = fp ? "b" : "c";
 
10982
       else
 
10983
        gcc_unreachable ();
 
10984
       break;
 
10985
@@ -13823,9 +13823,9 @@
 
10986
       break;
 
10987
     case GEU:
 
10988
       if (mode == CCmode)
 
10989
-       suffix = fp ? "nb" : "ae";
 
10990
+       suffix = "nb";
 
10991
       else if (mode == CCCmode)
 
10992
-       suffix = "nc";
 
10993
+       suffix = fp ? "nb" : "nc";
 
10994
       else
 
10995
        gcc_unreachable ();
 
10996
       break;
 
10997
@@ -20505,7 +20505,7 @@
 
10998
          t1 = gen_reg_rtx (V32QImode);
 
10999
          t2 = gen_reg_rtx (V32QImode);
 
11000
          t3 = gen_reg_rtx (V32QImode);
 
11001
-         vt2 = GEN_INT (128);
 
11002
+         vt2 = GEN_INT (-128);
 
11003
          for (i = 0; i < 32; i++)
 
11004
            vec[i] = vt2;
 
11005
          vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
 
11006
@@ -24640,13 +24640,17 @@
 
11007
              {
 
11008
                edge e;
 
11009
                edge_iterator ei;
 
11010
-               /* Assume that region is SCC, i.e. all immediate predecessors
 
11011
-                  of non-head block are in the same region.  */
 
11012
+
 
11013
+               /* Regions are SCCs with the exception of selective
 
11014
+                  scheduling with pipelining of outer blocks enabled.
 
11015
+                  So also check that immediate predecessors of a non-head
 
11016
+                  block are in the same region.  */
 
11017
                FOR_EACH_EDGE (e, ei, bb->preds)
 
11018
                  {
 
11019
                    /* Avoid creating of loop-carried dependencies through
 
11020
-                      using topological odering in region.  */
 
11021
-                   if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
11022
+                      using topological ordering in the region.  */
 
11023
+                   if (rgn == CONTAINING_RGN (e->src->index)
 
11024
+                       && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
11025
                      add_dependee_for_func_arg (first_arg, e->src); 
 
11026
                  }
 
11027
              }
 
11028
@@ -38807,8 +38811,8 @@
 
11029
              op0 = gen_lowpart (V4DImode, d->op0);
 
11030
              op1 = gen_lowpart (V4DImode, d->op1);
 
11031
              rperm[0]
 
11032
-               = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
 
11033
-                          || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
 
11034
+               = GEN_INT ((d->perm[0] / (nelt / 2))
 
11035
+                          | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
 
11036
              emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
 
11037
              return true;
 
11038
            }
 
11039
Index: gcc/config/sh/sh.c
 
11040
===================================================================
 
11041
--- a/src/gcc/config/sh/sh.c    (.../tags/gcc_4_8_3_release)
 
11042
+++ b/src/gcc/config/sh/sh.c    (.../branches/gcc-4_8-branch)
 
11043
@@ -808,6 +808,12 @@
 
11044
        targetm.asm_out.aligned_op.di = NULL;
 
11045
        targetm.asm_out.unaligned_op.di = NULL;
 
11046
     }
 
11047
+
 
11048
+  /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
 
11049
+     Disable it for everything else.  */
 
11050
+  if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
 
11051
+    TARGET_USERMODE = false;
 
11052
+
 
11053
   if (TARGET_SH1)
 
11054
     {
 
11055
       if (! strcmp (sh_div_str, "call-div1"))
 
11056
@@ -3036,7 +3042,7 @@
 
11057
 struct ashl_lshr_sequence
 
11058
 {
 
11059
   char insn_count;
 
11060
-  char amount[6];
 
11061
+  signed char amount[6];
 
11062
   char clobbers_t;
 
11063
 };
 
11064
 
 
11065
Index: gcc/config/sh/sync.md
 
11066
===================================================================
 
11067
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
 
11068
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
 
11069
@@ -466,6 +466,7 @@
 
11070
    (set (mem:SI (match_dup 1))
 
11071
        (unspec:SI
 
11072
          [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
 
11073
+   (set (reg:SI T_REG) (const_int 1))
 
11074
    (clobber (reg:SI R0_REG))]
 
11075
   "TARGET_ATOMIC_HARD_LLCS
 
11076
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
11077
@@ -484,6 +485,7 @@
 
11078
    (set (mem:QIHI (match_dup 1))
 
11079
        (unspec:QIHI
 
11080
          [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
 
11081
+   (set (reg:SI T_REG) (const_int 1))
 
11082
    (clobber (reg:SI R0_REG))
 
11083
    (clobber (match_scratch:SI 3 "=&r"))
 
11084
    (clobber (match_scratch:SI 4 "=1"))]
 
11085
@@ -617,6 +619,7 @@
 
11086
          [(FETCHOP:SI (mem:SI (match_dup 1))
 
11087
             (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
11088
          UNSPEC_ATOMIC))
 
11089
+   (set (reg:SI T_REG) (const_int 1))
 
11090
    (clobber (reg:SI R0_REG))]
 
11091
   "TARGET_ATOMIC_HARD_LLCS
 
11092
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
11093
@@ -637,6 +640,7 @@
 
11094
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
 
11095
             (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
11096
          UNSPEC_ATOMIC))
 
11097
+   (set (reg:SI T_REG) (const_int 1))
 
11098
    (clobber (reg:SI R0_REG))
 
11099
    (clobber (match_scratch:SI 3 "=&r"))
 
11100
    (clobber (match_scratch:SI 4 "=1"))]
 
11101
@@ -784,6 +788,7 @@
 
11102
          [(not:SI (and:SI (mem:SI (match_dup 1))
 
11103
                   (match_operand:SI 2 "logical_operand" "rK08")))]
 
11104
          UNSPEC_ATOMIC))
 
11105
+   (set (reg:SI T_REG) (const_int 1))
 
11106
    (clobber (reg:SI R0_REG))]
 
11107
   "TARGET_ATOMIC_HARD_LLCS
 
11108
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
11109
@@ -805,6 +810,7 @@
 
11110
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
 
11111
                     (match_operand:QIHI 2 "logical_operand" "rK08")))]
 
11112
          UNSPEC_ATOMIC))
 
11113
+   (set (reg:SI T_REG) (const_int 1))
 
11114
    (clobber (reg:SI R0_REG))
 
11115
    (clobber (match_scratch:SI 3 "=&r"))
 
11116
    (clobber (match_scratch:SI 4 "=1"))]
 
11117
@@ -903,7 +909,7 @@
 
11118
         "      and     %0,%3"                  "\n"
 
11119
         "      not     %3,%3"                  "\n"
 
11120
         "      mov.<bwl>       %3,@%1"         "\n"
 
11121
-        "      stc     %4,sr";
 
11122
+        "      ldc     %4,sr";
 
11123
 }
 
11124
   [(set_attr "length" "20")])
 
11125
 
 
11126
@@ -960,7 +966,8 @@
 
11127
    (set (mem:SI (match_dup 1))
 
11128
        (unspec:SI
 
11129
          [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
 
11130
-         UNSPEC_ATOMIC))]
 
11131
+         UNSPEC_ATOMIC))
 
11132
+   (set (reg:SI T_REG) (const_int 1))]
 
11133
   "TARGET_ATOMIC_HARD_LLCS
 
11134
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
11135
 {
 
11136
@@ -980,6 +987,7 @@
 
11137
        (unspec:QIHI
 
11138
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
 
11139
          UNSPEC_ATOMIC))
 
11140
+   (set (reg:SI T_REG) (const_int 1))
 
11141
    (clobber (reg:SI R0_REG))
 
11142
    (clobber (match_scratch:SI 3 "=&r"))
 
11143
    (clobber (match_scratch:SI 4 "=1"))]
 
11144
@@ -1124,7 +1132,8 @@
 
11145
    (set (mem:SI (match_dup 1))
 
11146
        (unspec:SI
 
11147
          [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
 
11148
-         UNSPEC_ATOMIC))]
 
11149
+         UNSPEC_ATOMIC))
 
11150
+   (set (reg:SI T_REG) (const_int 1))]
 
11151
   "TARGET_ATOMIC_HARD_LLCS
 
11152
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
11153
 {
 
11154
@@ -1145,6 +1154,7 @@
 
11155
        (unspec:QIHI
 
11156
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
 
11157
          UNSPEC_ATOMIC))
 
11158
+   (set (reg:SI T_REG) (const_int 1))
 
11159
    (clobber (reg:SI R0_REG))
 
11160
    (clobber (match_scratch:SI 3 "=&r"))
 
11161
    (clobber (match_scratch:SI 4 "=1"))]
 
11162
@@ -1353,7 +1363,7 @@
 
11163
         "      ldc     r0,sr"          "\n"
 
11164
         "      mov.b   @%0,r0"         "\n"
 
11165
         "      mov.b   %1,@%0"         "\n"
 
11166
-        "      stc     %2,sr"          "\n"
 
11167
+        "      ldc     %2,sr"          "\n"
 
11168
         "      tst     r0,r0";
 
11169
 }
 
11170
   [(set_attr "length" "16")])
 
11171
Index: gcc/config/sh/sh.md
 
11172
===================================================================
 
11173
--- a/src/gcc/config/sh/sh.md   (.../tags/gcc_4_8_3_release)
 
11174
+++ b/src/gcc/config/sh/sh.md   (.../branches/gcc-4_8-branch)
 
11175
@@ -6133,10 +6133,9 @@
 
11176
 })
 
11177
 
 
11178
 (define_expand "extendqihi2"
 
11179
-  [(set (match_operand:HI 0 "arith_reg_dest" "")
 
11180
-       (sign_extend:HI (match_operand:QI 1 "arith_reg_operand" "")))]
 
11181
-  ""
 
11182
-  "")
 
11183
+  [(set (match_operand:HI 0 "arith_reg_dest")
 
11184
+       (sign_extend:HI (match_operand:QI 1 "arith_reg_operand")))]
 
11185
+  "TARGET_SH1")
 
11186
 
 
11187
 (define_insn "*extendqihi2_compact_reg"
 
11188
   [(set (match_operand:HI 0 "arith_reg_dest" "=r")
 
11189
Index: gcc/config/sh/sh.opt
 
11190
===================================================================
 
11191
--- a/src/gcc/config/sh/sh.opt  (.../tags/gcc_4_8_3_release)
 
11192
+++ b/src/gcc/config/sh/sh.opt  (.../branches/gcc-4_8-branch)
 
11193
@@ -343,7 +343,7 @@
 
11194
 Cost to assume for a multiply insn
 
11195
 
 
11196
 musermode
 
11197
-Target Report RejectNegative Var(TARGET_USERMODE)
 
11198
+Target Var(TARGET_USERMODE)
 
11199
 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
 
11200
 
 
11201
 ;; We might want to enable this by default for TARGET_HARD_SH4, because
 
11202
Index: gcc/config/microblaze/predicates.md
 
11203
===================================================================
 
11204
--- a/src/gcc/config/microblaze/predicates.md   (.../tags/gcc_4_8_3_release)
 
11205
+++ b/src/gcc/config/microblaze/predicates.md   (.../branches/gcc-4_8-branch)
 
11206
@@ -85,10 +85,6 @@
 
11207
   (ior (match_operand 0 "const_0_operand")
 
11208
        (match_operand 0 "register_operand")))
 
11209
 
 
11210
-(define_predicate "reg_or_mem_operand"
 
11211
-  (ior (match_operand 0 "memory_operand")
 
11212
-       (match_operand 0 "register_operand")))
 
11213
-
 
11214
 ;;  Return if the operand is either the PC or a label_ref.  
 
11215
 (define_special_predicate "pc_or_label_operand"
 
11216
   (ior (match_code "pc,label_ref")
 
11217
Index: gcc/config/microblaze/microblaze.md
 
11218
===================================================================
 
11219
--- a/src/gcc/config/microblaze/microblaze.md   (.../tags/gcc_4_8_3_release)
 
11220
+++ b/src/gcc/config/microblaze/microblaze.md   (.../branches/gcc-4_8-branch)
 
11221
@@ -1119,18 +1119,6 @@
 
11222
   }
 
11223
 )
 
11224
 
 
11225
-;;Load and store reverse
 
11226
-(define_insn "movsi4_rev"
 
11227
-  [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
 
11228
-        (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
 
11229
-  "TARGET_REORDER"
 
11230
-  "@
 
11231
-   lwr\t%0,%y1,r0
 
11232
-   swr\t%1,%y0,r0"
 
11233
-  [(set_attr "type"     "load,store")
 
11234
-  (set_attr "mode"      "SI")
 
11235
-  (set_attr "length"    "4,4")])
 
11236
-
 
11237
 ;; 32-bit floating point moves
 
11238
 
 
11239
 (define_expand "movsf"
 
11240
Index: gcc/config/avr/avr-fixed.md
 
11241
===================================================================
 
11242
--- a/src/gcc/config/avr/avr-fixed.md   (.../tags/gcc_4_8_3_release)
 
11243
+++ b/src/gcc/config/avr/avr-fixed.md   (.../branches/gcc-4_8-branch)
 
11244
@@ -430,8 +430,8 @@
 
11245
       }
 
11246
 
 
11247
     // Input and output of the libgcc function
 
11248
-    const unsigned int regno_in[]  = { -1, 22, 22, -1, 18 };
 
11249
-    const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
 
11250
+    const unsigned int regno_in[]  = { -1U, 22, 22, -1U, 18 };
 
11251
+    const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
 
11252
 
 
11253
     operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
11254
     operands[4] = gen_rtx_REG (<MODE>mode,  regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
11255
Index: gcc/config/avr/avr.md
 
11256
===================================================================
 
11257
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
 
11258
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
 
11259
@@ -367,6 +367,15 @@
 
11260
   ""
 
11261
   {
 
11262
     int i;
 
11263
+
 
11264
+    // Avoid (subreg (mem)) for non-generic address spaces below.  Because
 
11265
+    // of the poor addressing capabilities of these spaces it's better to
 
11266
+    // load them in one chunk.  And it avoids PR61443.
 
11267
+
 
11268
+    if (MEM_P (operands[0])
 
11269
+        && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
 
11270
+      operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
 
11271
+
 
11272
     for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
 
11273
       {
 
11274
         rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
 
11275
Index: gcc/config/avr/avr.h
 
11276
===================================================================
 
11277
--- a/src/gcc/config/avr/avr.h  (.../tags/gcc_4_8_3_release)
 
11278
+++ b/src/gcc/config/avr/avr.h  (.../branches/gcc-4_8-branch)
 
11279
@@ -250,18 +250,18 @@
 
11280
 #define REG_CLASS_CONTENTS {                                           \
 
11281
   {0x00000000,0x00000000},     /* NO_REGS */                           \
 
11282
   {0x00000001,0x00000000},     /* R0_REG */                            \
 
11283
-  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */                \
 
11284
-  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */                \
 
11285
-  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */                \
 
11286
+  {3u << REG_X,0x00000000},     /* POINTER_X_REGS, r26 - r27 */                \
 
11287
+  {3u << REG_Y,0x00000000},     /* POINTER_Y_REGS, r28 - r29 */                \
 
11288
+  {3u << REG_Z,0x00000000},     /* POINTER_Z_REGS, r30 - r31 */                \
 
11289
   {0x00000000,0x00000003},     /* STACK_REG, STACK */                  \
 
11290
-  {(3 << REG_Y) | (3 << REG_Z),                                                \
 
11291
+  {(3u << REG_Y) | (3u << REG_Z),                                      \
 
11292
      0x00000000},              /* BASE_POINTER_REGS, r28 - r31 */      \
 
11293
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                         \
 
11294
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z),                      \
 
11295
      0x00000000},              /* POINTER_REGS, r26 - r31 */           \
 
11296
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),          \
 
11297
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W),      \
 
11298
      0x00000000},              /* ADDW_REGS, r24 - r31 */              \
 
11299
   {0x00ff0000,0x00000000},     /* SIMPLE_LD_REGS r16 - r23 */          \
 
11300
-  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),   \
 
11301
+  {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
 
11302
      0x00000000},      /* LD_REGS, r16 - r31 */                        \
 
11303
   {0x0000ffff,0x00000000},     /* NO_LD_REGS  r0 - r15 */              \
 
11304
   {0xffffffff,0x00000000},     /* GENERAL_REGS, r0 - r31 */            \
 
11305
Index: gcc/config/aarch64/arm_neon.h
 
11306
===================================================================
 
11307
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
 
11308
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
 
11309
@@ -13815,7 +13815,7 @@
 
11310
   int16x4_t result;
 
11311
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
 
11312
            : "=w"(result)
 
11313
-           : "w"(a), "w"(b)
 
11314
+           : "w"(a), "x"(b)
 
11315
            : /* No clobbers */);
 
11316
   return result;
 
11317
 }
 
11318
@@ -13837,7 +13837,7 @@
 
11319
   int16x8_t result;
 
11320
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
 
11321
            : "=w"(result)
 
11322
-           : "w"(a), "w"(b)
 
11323
+           : "w"(a), "x"(b)
 
11324
            : /* No clobbers */);
 
11325
   return result;
 
11326
 }
 
11327
Index: gcc/config/aarch64/aarch64.md
 
11328
===================================================================
 
11329
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
 
11330
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
 
11331
@@ -3292,6 +3292,7 @@
 
11332
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
 
11333
                   UNSPEC_TLSDESC))
 
11334
    (clobber (reg:DI LR_REGNUM))
 
11335
+   (clobber (reg:CC CC_REGNUM))
 
11336
    (clobber (match_scratch:DI 1 "=r"))]
 
11337
   "TARGET_TLS_DESC"
 
11338
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
 
11339
Index: gcc/config/aarch64/aarch64.opt
 
11340
===================================================================
 
11341
--- a/src/gcc/config/aarch64/aarch64.opt        (.../tags/gcc_4_8_3_release)
 
11342
+++ b/src/gcc/config/aarch64/aarch64.opt        (.../branches/gcc-4_8-branch)
 
11343
@@ -67,6 +67,10 @@
 
11344
 Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
 
11345
 Generate code which uses only the general registers
 
11346
 
 
11347
+mfix-cortex-a53-835769
 
11348
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
 
11349
+Workaround for ARM Cortex-A53 Erratum number 835769
 
11350
+
 
11351
 mlittle-endian
 
11352
 Target Report RejectNegative InverseMask(BIG_END)
 
11353
 Assume target CPU is configured as little endian
 
11354
Index: gcc/config/aarch64/aarch64-protos.h
 
11355
===================================================================
 
11356
--- a/src/gcc/config/aarch64/aarch64-protos.h   (.../tags/gcc_4_8_3_release)
 
11357
+++ b/src/gcc/config/aarch64/aarch64-protos.h   (.../branches/gcc-4_8-branch)
 
11358
@@ -247,6 +247,8 @@
 
11359
 
 
11360
 extern void aarch64_split_combinev16qi (rtx operands[3]);
 
11361
 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
 
11362
+extern bool aarch64_madd_needs_nop (rtx);
 
11363
+extern void aarch64_final_prescan_insn (rtx);
 
11364
 extern bool
 
11365
 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
 
11366
 
 
11367
Index: gcc/config/aarch64/aarch64.c
 
11368
===================================================================
 
11369
--- a/src/gcc/config/aarch64/aarch64.c  (.../tags/gcc_4_8_3_release)
 
11370
+++ b/src/gcc/config/aarch64/aarch64.c  (.../branches/gcc-4_8-branch)
 
11371
@@ -1201,6 +1201,7 @@
 
11372
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
 
11373
   int ncrn, nvrn, nregs;
 
11374
   bool allocate_ncrn, allocate_nvrn;
 
11375
+  HOST_WIDE_INT size;
 
11376
 
 
11377
   /* We need to do this once per argument.  */
 
11378
   if (pcum->aapcs_arg_processed)
 
11379
@@ -1208,6 +1209,11 @@
 
11380
 
 
11381
   pcum->aapcs_arg_processed = true;
 
11382
 
 
11383
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
 
11384
+  size
 
11385
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
 
11386
+                       UNITS_PER_WORD);
 
11387
+
 
11388
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
 
11389
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
 
11390
                                                 mode,
 
11391
@@ -1258,10 +1264,8 @@
 
11392
     }
 
11393
 
 
11394
   ncrn = pcum->aapcs_ncrn;
 
11395
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
 
11396
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
 
11397
+  nregs = size / UNITS_PER_WORD;
 
11398
 
 
11399
-
 
11400
   /* C6 - C9.  though the sign and zero extension semantics are
 
11401
      handled elsewhere.  This is the case where the argument fits
 
11402
      entirely general registers.  */
 
11403
@@ -1309,13 +1313,12 @@
 
11404
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
 
11405
 
 
11406
   /* The argument is passed on stack; record the needed number of words for
 
11407
-     this argument (we can re-use NREGS) and align the total size if
 
11408
-     necessary.  */
 
11409
+     this argument and align the total size if necessary.  */
 
11410
 on_stack:
 
11411
-  pcum->aapcs_stack_words = nregs;
 
11412
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
 
11413
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
 
11414
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
 
11415
-                                              16 / UNITS_PER_WORD) + 1;
 
11416
+                                              16 / UNITS_PER_WORD);
 
11417
   return;
 
11418
 }
 
11419
 
 
11420
@@ -4845,6 +4848,15 @@
 
11421
   aarch64_tune = selected_tune->core;
 
11422
   aarch64_tune_params = selected_tune->tune;
 
11423
 
 
11424
+  if (aarch64_fix_a53_err835769 == 2)
 
11425
+    {
 
11426
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
11427
+      aarch64_fix_a53_err835769 = 1;
 
11428
+#else
 
11429
+      aarch64_fix_a53_err835769 = 0;
 
11430
+#endif
 
11431
+    }
 
11432
+
 
11433
   aarch64_override_options_after_change ();
 
11434
 }
 
11435
 
 
11436
@@ -6037,6 +6049,135 @@
 
11437
   return NULL;
 
11438
 }
 
11439
 
 
11440
+
 
11441
+/* Return true iff X is a MEM rtx.  */
 
11442
+
 
11443
+static int
 
11444
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
 
11445
+{
 
11446
+  return MEM_P (*x);
 
11447
+}
 
11448
+
 
11449
+
 
11450
+/*  Return true if mem_insn contains a MEM RTX somewhere in it.  */
 
11451
+
 
11452
+static bool
 
11453
+has_memory_op (rtx mem_insn)
 
11454
+{
 
11455
+   rtx pattern = PATTERN (mem_insn);
 
11456
+   return for_each_rtx (&pattern, is_mem_p, NULL);
 
11457
+}
 
11458
+
 
11459
+
 
11460
+/* Find the first rtx before insn that will generate an assembly
 
11461
+   instruction.  */
 
11462
+
 
11463
+static rtx
 
11464
+aarch64_prev_real_insn (rtx insn)
 
11465
+{
 
11466
+  if (!insn)
 
11467
+    return NULL;
 
11468
+
 
11469
+  do
 
11470
+    {
 
11471
+      insn = prev_real_insn (insn);
 
11472
+    }
 
11473
+  while (insn && recog_memoized (insn) < 0);
 
11474
+
 
11475
+  return insn;
 
11476
+}
 
11477
+
 
11478
+/*  Return true iff t1 is the v8type of a multiply-accumulate instruction.  */
 
11479
+
 
11480
+static bool
 
11481
+is_madd_op (enum attr_v8type t1)
 
11482
+{
 
11483
+  return t1 == V8TYPE_MADD
 
11484
+         || t1 == V8TYPE_MADDL;
 
11485
+}
 
11486
+
 
11487
+
 
11488
+/* Check if there is a register dependency between a load and the insn
 
11489
+   for which we hold recog_data.  */
 
11490
+
 
11491
+static bool
 
11492
+dep_between_memop_and_curr (rtx memop)
 
11493
+{
 
11494
+  rtx load_reg;
 
11495
+  int opno;
 
11496
+
 
11497
+  gcc_assert (GET_CODE (memop) == SET);
 
11498
+
 
11499
+  if (!REG_P (SET_DEST (memop)))
 
11500
+    return false;
 
11501
+
 
11502
+  load_reg = SET_DEST (memop);
 
11503
+  for (opno = 1; opno < recog_data.n_operands; opno++)
 
11504
+    {
 
11505
+      rtx operand = recog_data.operand[opno];
 
11506
+      if (REG_P (operand)
 
11507
+          && reg_overlap_mentioned_p (load_reg, operand))
 
11508
+        return true;
 
11509
+
 
11510
+    }
 
11511
+  return false;
 
11512
+}
 
11513
+
 
11514
+
 
11515
+
 
11516
+/* When working around the Cortex-A53 erratum 835769,
 
11517
+   given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
 
11518
+   instruction and has a preceding memory instruction such that a NOP
 
11519
+   should be inserted between them.  */
 
11520
+
 
11521
+bool
 
11522
+aarch64_madd_needs_nop (rtx insn)
 
11523
+{
 
11524
+  enum attr_v8type attr_type;
 
11525
+  rtx prev;
 
11526
+  rtx body;
 
11527
+
 
11528
+  if (!aarch64_fix_a53_err835769)
 
11529
+    return false;
 
11530
+
 
11531
+  if (recog_memoized (insn) < 0)
 
11532
+    return false;
 
11533
+
 
11534
+  attr_type = get_attr_v8type (insn);
 
11535
+  if (!is_madd_op (attr_type))
 
11536
+    return false;
 
11537
+
 
11538
+  prev = aarch64_prev_real_insn (insn);
 
11539
+  /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
 
11540
+     Restore recog state to INSN to avoid state corruption.  */
 
11541
+  extract_constrain_insn_cached (insn);
 
11542
+
 
11543
+  if (!prev || !has_memory_op (prev))
 
11544
+    return false;
 
11545
+
 
11546
+  body = single_set (prev);
 
11547
+
 
11548
+  /* If the previous insn is a memory op and there is no dependency between
 
11549
+     it and the madd, emit a nop between them.  If we know it's a memop but
 
11550
+     body is NULL, return true to be safe.  */
 
11551
+  if (GET_MODE (recog_data.operand[0]) == DImode
 
11552
+      && (!body || !dep_between_memop_and_curr (body)))
 
11553
+    return true;
 
11554
+
 
11555
+  return false;
 
11556
+
 
11557
+}
 
11558
+
 
11559
+/* Implement FINAL_PRESCAN_INSN.  */
 
11560
+
 
11561
+void
 
11562
+aarch64_final_prescan_insn (rtx insn)
 
11563
+{
 
11564
+  if (aarch64_madd_needs_nop (insn))
 
11565
+    fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
 
11566
+}
 
11567
+
 
11568
+
 
11569
 /* Return the equivalent letter for size.  */
 
11570
 static unsigned char
 
11571
 sizetochar (int size)
 
11572
Index: gcc/config/aarch64/aarch64-elf-raw.h
 
11573
===================================================================
 
11574
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../tags/gcc_4_8_3_release)
 
11575
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../branches/gcc-4_8-branch)
 
11576
@@ -25,8 +25,17 @@
 
11577
 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
 
11578
 #define ENDFILE_SPEC " crtend%O%s crtn%O%s"
 
11579
 
 
11580
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
11581
+#define CA53_ERR_835769_SPEC \
 
11582
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
11583
+#else
 
11584
+#define CA53_ERR_835769_SPEC \
 
11585
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
11586
+#endif
 
11587
+
 
11588
 #ifndef LINK_SPEC
 
11589
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
 
11590
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
 
11591
+                  CA53_ERR_835769_SPEC
 
11592
 #endif
 
11593
 
 
11594
 #endif /* GCC_AARCH64_ELF_RAW_H */
 
11595
Index: gcc/config/aarch64/aarch64-linux.h
 
11596
===================================================================
 
11597
--- a/src/gcc/config/aarch64/aarch64-linux.h    (.../tags/gcc_4_8_3_release)
 
11598
+++ b/src/gcc/config/aarch64/aarch64-linux.h    (.../branches/gcc-4_8-branch)
 
11599
@@ -34,8 +34,17 @@
 
11600
    -X                                          \
 
11601
    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
 
11602
 
 
11603
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
 
11604
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
11605
+#define CA53_ERR_835769_SPEC \
 
11606
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
11607
+#else
 
11608
+#define CA53_ERR_835769_SPEC \
 
11609
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
11610
+#endif
 
11611
 
 
11612
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
 
11613
+                  CA53_ERR_835769_SPEC
 
11614
+
 
11615
 #define TARGET_OS_CPP_BUILTINS()               \
 
11616
   do                                           \
 
11617
     {                                          \
 
11618
@@ -43,4 +52,6 @@
 
11619
     }                                          \
 
11620
   while (0)
 
11621
 
 
11622
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
11623
+
 
11624
 #endif  /* GCC_AARCH64_LINUX_H */
 
11625
Index: gcc/config/aarch64/aarch64.h
 
11626
===================================================================
 
11627
--- a/src/gcc/config/aarch64/aarch64.h  (.../tags/gcc_4_8_3_release)
 
11628
+++ b/src/gcc/config/aarch64/aarch64.h  (.../branches/gcc-4_8-branch)
 
11629
@@ -465,6 +465,18 @@
 
11630
   (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
 
11631
 #endif
 
11632
 
 
11633
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
 
11634
+   length so that conditional branching code is updated appropriately.  */
 
11635
+#define ADJUST_INSN_LENGTH(insn, length)       \
 
11636
+  do                                           \
 
11637
+    {                                          \
 
11638
+      if (aarch64_madd_needs_nop (insn))       \
 
11639
+        length += 4;                           \
 
11640
+    } while (0)
 
11641
+
 
11642
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)     \
 
11643
+    aarch64_final_prescan_insn (INSN);                 \
 
11644
+
 
11645
 /* The processor for which instructions should be scheduled.  */
 
11646
 extern enum aarch64_processor aarch64_tune;
 
11647
 
 
11648
Index: gcc/config/rs6000/constraints.md
 
11649
===================================================================
 
11650
--- a/src/gcc/config/rs6000/constraints.md      (.../tags/gcc_4_8_3_release)
 
11651
+++ b/src/gcc/config/rs6000/constraints.md      (.../branches/gcc-4_8-branch)
 
11652
@@ -65,6 +65,20 @@
 
11653
 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
 
11654
   "If -mmfpgpr was used, a floating point register or NO_REGS.")
 
11655
 
 
11656
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
 
11657
+  "Floating point register if direct moves are available, or NO_REGS.")
 
11658
+
 
11659
+;; At present, DImode is not allowed in the Altivec registers.  If in the
 
11660
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
 
11661
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
 
11662
+  "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
 
11663
+
 
11664
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
 
11665
+  "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
 
11666
+
 
11667
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
 
11668
+  "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
 
11669
+
 
11670
 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
 
11671
   "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
 
11672
 
 
11673
@@ -98,7 +112,7 @@
 
11674
   "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
 
11675
 
 
11676
 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
 
11677
-  "VSX vector register to hold scalar float values or NO_REGS.")
 
11678
+  "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
 
11679
 
 
11680
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
 
11681
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
 
11682
Index: gcc/config/rs6000/predicates.md
 
11683
===================================================================
 
11684
--- a/src/gcc/config/rs6000/predicates.md       (.../tags/gcc_4_8_3_release)
 
11685
+++ b/src/gcc/config/rs6000/predicates.md       (.../branches/gcc-4_8-branch)
 
11686
@@ -1795,7 +1795,7 @@
 
11687
 (define_predicate "fusion_gpr_mem_load"
 
11688
   (match_code "mem,sign_extend,zero_extend")
 
11689
 {
 
11690
-  rtx addr;
 
11691
+  rtx addr, base, offset;
 
11692
 
 
11693
   /* Handle sign/zero extend.  */
 
11694
   if (GET_CODE (op) == ZERO_EXTEND
 
11695
@@ -1825,24 +1825,79 @@
 
11696
     }
 
11697
 
 
11698
   addr = XEXP (op, 0);
 
11699
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11700
+    return 0;
 
11701
+
 
11702
+  base = XEXP (addr, 0);
 
11703
+  if (!base_reg_operand (base, GET_MODE (base)))
 
11704
+    return 0;
 
11705
+
 
11706
+  offset = XEXP (addr, 1);
 
11707
+
 
11708
   if (GET_CODE (addr) == PLUS)
 
11709
+    return satisfies_constraint_I (offset);
 
11710
+
 
11711
+  else if (GET_CODE (addr) == LO_SUM)
 
11712
     {
 
11713
-      rtx base = XEXP (addr, 0);
 
11714
-      rtx offset = XEXP (addr, 1);
 
11715
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
11716
+       return small_toc_ref (offset, GET_MODE (offset));
 
11717
 
 
11718
-      return (base_reg_operand (base, GET_MODE (base))
 
11719
-             && satisfies_constraint_I (offset));
 
11720
+      else if (TARGET_ELF && !TARGET_POWERPC64)
 
11721
+       return CONSTANT_P (offset);
 
11722
     }
 
11723
 
 
11724
-  else if (GET_CODE (addr) == LO_SUM)
 
11725
+  return 0;
 
11726
+})
 
11727
+
 
11728
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
 
11729
+;; memory field with both the addis and the memory offset.  Sign extension
 
11730
+;; is not handled here, since lha and lwa are not fused.
 
11731
+(define_predicate "fusion_gpr_mem_combo"
 
11732
+  (match_code "mem,zero_extend")
 
11733
+{
 
11734
+  rtx addr, base, offset;
 
11735
+
 
11736
+  /* Handle zero extend.  */
 
11737
+  if (GET_CODE (op) == ZERO_EXTEND)
 
11738
     {
 
11739
-      rtx base = XEXP (addr, 0);
 
11740
-      rtx offset = XEXP (addr, 1);
 
11741
+      op = XEXP (op, 0);
 
11742
+      mode = GET_MODE (op);
 
11743
+    }
 
11744
 
 
11745
-      if (!base_reg_operand (base, GET_MODE (base)))
 
11746
+  if (!MEM_P (op))
 
11747
+    return 0;
 
11748
+
 
11749
+  switch (mode)
 
11750
+    {
 
11751
+    case QImode:
 
11752
+    case HImode:
 
11753
+    case SImode:
 
11754
+      break;
 
11755
+
 
11756
+    case DImode:
 
11757
+      if (!TARGET_POWERPC64)
 
11758
        return 0;
 
11759
+      break;
 
11760
 
 
11761
-      else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
11762
+    default:
 
11763
+      return 0;
 
11764
+    }
 
11765
+
 
11766
+  addr = XEXP (op, 0);
 
11767
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11768
+    return 0;
 
11769
+
 
11770
+  base = XEXP (addr, 0);
 
11771
+  if (!fusion_gpr_addis (base, GET_MODE (base)))
 
11772
+    return 0;
 
11773
+
 
11774
+  offset = XEXP (addr, 1);
 
11775
+  if (GET_CODE (addr) == PLUS)
 
11776
+    return satisfies_constraint_I (offset);
 
11777
+
 
11778
+  else if (GET_CODE (addr) == LO_SUM)
 
11779
+    {
 
11780
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
11781
        return small_toc_ref (offset, GET_MODE (offset));
 
11782
 
 
11783
       else if (TARGET_ELF && !TARGET_POWERPC64)
 
11784
Index: gcc/config/rs6000/htm.md
 
11785
===================================================================
 
11786
--- a/src/gcc/config/rs6000/htm.md      (.../tags/gcc_4_8_3_release)
 
11787
+++ b/src/gcc/config/rs6000/htm.md      (.../branches/gcc-4_8-branch)
 
11788
@@ -179,7 +179,7 @@
 
11789
                             (const_int 0)]
 
11790
                            UNSPECV_HTM_TABORTWCI))
 
11791
    (set (subreg:CC (match_dup 2) 0) (match_dup 1))
 
11792
-   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
 
11793
+   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
 
11794
    (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
 
11795
                   (and:SI (match_dup 3) (const_int 15)))
 
11796
               (clobber (scratch:CC))])]
 
11797
Index: gcc/config/rs6000/freebsd64.h
 
11798
===================================================================
 
11799
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
 
11800
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
 
11801
@@ -367,7 +367,7 @@
 
11802
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
11803
 #undef  ADJUST_FIELD_ALIGN
 
11804
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
11805
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
11806
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
11807
    ? 128                                                                \
 
11808
    : (TARGET_64BIT                                                      \
 
11809
       && TARGET_ALIGN_NATURAL == 0                                      \
 
11810
Index: gcc/config/rs6000/rs6000-protos.h
 
11811
===================================================================
 
11812
--- a/src/gcc/config/rs6000/rs6000-protos.h     (.../tags/gcc_4_8_3_release)
 
11813
+++ b/src/gcc/config/rs6000/rs6000-protos.h     (.../branches/gcc-4_8-branch)
 
11814
@@ -79,9 +79,9 @@
 
11815
 extern bool gpr_or_gpr_p (rtx, rtx);
 
11816
 extern bool direct_move_p (rtx, rtx);
 
11817
 extern bool quad_load_store_p (rtx, rtx);
 
11818
-extern bool fusion_gpr_load_p (rtx *, bool);
 
11819
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
 
11820
 extern void expand_fusion_gpr_load (rtx *);
 
11821
-extern const char *emit_fusion_gpr_load (rtx *);
 
11822
+extern const char *emit_fusion_gpr_load (rtx, rtx);
 
11823
 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
 
11824
                                                            enum reg_class);
 
11825
 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
 
11826
@@ -153,6 +153,7 @@
 
11827
 
 
11828
 #ifdef TREE_CODE
 
11829
 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
 
11830
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
 
11831
 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
 
11832
                                                     unsigned int);
 
11833
 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
 
11834
@@ -161,7 +162,7 @@
 
11835
 extern rtx rs6000_libcall_value (enum machine_mode);
 
11836
 extern rtx rs6000_va_arg (tree, tree);
 
11837
 extern int function_ok_for_sibcall (tree);
 
11838
-extern int rs6000_reg_parm_stack_space (tree);
 
11839
+extern int rs6000_reg_parm_stack_space (tree, bool);
 
11840
 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
 
11841
 extern bool rs6000_elf_in_small_data_p (const_tree);
 
11842
 #ifdef ARGS_SIZE_RTX
 
11843
Index: gcc/config/rs6000/rs6000-builtin.def
 
11844
===================================================================
 
11845
--- a/src/gcc/config/rs6000/rs6000-builtin.def  (.../tags/gcc_4_8_3_release)
 
11846
+++ b/src/gcc/config/rs6000/rs6000-builtin.def  (.../branches/gcc-4_8-branch)
 
11847
@@ -622,20 +622,13 @@
 
11848
                     | RS6000_BTC_TERNARY),                             \
 
11849
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
11850
 
 
11851
-/* Miscellaneous builtins.  */
 
11852
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE)                             \
 
11853
+/* 128-bit long double floating point builtins.  */
 
11854
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE)                          \
 
11855
   RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
11856
                    "__builtin_" NAME,                  /* NAME */      \
 
11857
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
11858
+                   (RS6000_BTM_HARD_FLOAT              /* MASK */      \
 
11859
+                    | RS6000_BTM_LDBL128),                             \
 
11860
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
11861
-                    | RS6000_BTC_UNARY),                               \
 
11862
-                   CODE_FOR_ ## ICODE)                 /* ICODE */
 
11863
-
 
11864
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE)                             \
 
11865
-  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
11866
-                   "__builtin_" NAME,                  /* NAME */      \
 
11867
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
11868
-                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
11869
                     | RS6000_BTC_BINARY),                              \
 
11870
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
11871
 
 
11872
@@ -1593,10 +1586,8 @@
 
11873
 BU_DFP_MISC_2 (PACK_TD,                "pack_dec128",          CONST,  packtd)
 
11874
 BU_DFP_MISC_2 (UNPACK_TD,      "unpack_dec128",        CONST,  unpacktd)
 
11875
 
 
11876
-BU_MISC_2 (PACK_TF,            "pack_longdouble",      CONST,  packtf)
 
11877
-BU_MISC_2 (UNPACK_TF,          "unpack_longdouble",    CONST,  unpacktf)
 
11878
-BU_MISC_1 (UNPACK_TF_0,                "longdouble_dw0",       CONST,  unpacktf_0)
 
11879
-BU_MISC_1 (UNPACK_TF_1,                "longdouble_dw1",       CONST,  unpacktf_1)
 
11880
+BU_LDBL128_2 (PACK_TF,         "pack_longdouble",      CONST,  packtf)
 
11881
+BU_LDBL128_2 (UNPACK_TF,       "unpack_longdouble",    CONST,  unpacktf)
 
11882
 
 
11883
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
 
11884
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
 
11885
Index: gcc/config/rs6000/rs6000-c.c
 
11886
===================================================================
 
11887
--- a/src/gcc/config/rs6000/rs6000-c.c  (.../tags/gcc_4_8_3_release)
 
11888
+++ b/src/gcc/config/rs6000/rs6000-c.c  (.../branches/gcc-4_8-branch)
 
11889
@@ -3265,6 +3265,8 @@
 
11890
 
 
11891
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
11892
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
 
11893
+  { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
11894
+    RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
 
11895
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
11896
     RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
 
11897
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
11898
@@ -3319,6 +3321,8 @@
 
11899
 
 
11900
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
11901
     RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
 
11902
+  { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
11903
+    RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
 
11904
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
11905
     RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
 
11906
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
11907
@@ -4126,7 +4130,8 @@
 
11908
      argument) is reversed.  Patch the arguments here before building
 
11909
      the resolved CALL_EXPR.  */
 
11910
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
 
11911
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
 
11912
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
 
11913
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
 
11914
     {
 
11915
       tree t;
 
11916
       t = args[2], args[2] = args[1], args[1] = t;
 
11917
@@ -4184,6 +4189,14 @@
 
11918
   if (TARGET_DEBUG_BUILTIN)
 
11919
     fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
 
11920
             (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 
11921
 
11922
+  /* vec_lvsl and vec_lvsr are deprecated for use with LE element order.  */
 
11923
+  if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
 
11924
+    warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
 
11925
+assignment for unaligned loads and stores");
 
11926
+  else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
 
11927
+    warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
 
11928
+assignment for unaligned loads and stores");
 
11929
 
 
11930
   /* For now treat vec_splats and vec_promote as the same.  */
 
11931
   if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
 
11932
Index: gcc/config/rs6000/linux64.h
 
11933
===================================================================
 
11934
--- a/src/gcc/config/rs6000/linux64.h   (.../tags/gcc_4_8_3_release)
 
11935
+++ b/src/gcc/config/rs6000/linux64.h   (.../branches/gcc-4_8-branch)
 
11936
@@ -246,7 +246,7 @@
 
11937
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
11938
 #undef  ADJUST_FIELD_ALIGN
 
11939
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
11940
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)    \
 
11941
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
11942
    ? 128                                                               \
 
11943
    : (TARGET_64BIT                                                     \
 
11944
       && TARGET_ALIGN_NATURAL == 0                                     \
 
11945
Index: gcc/config/rs6000/rs6000.c
 
11946
===================================================================
 
11947
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_8_3_release)
 
11948
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_8-branch)
 
11949
@@ -369,6 +369,7 @@
 
11950
   enum insn_code reload_gpr_vsx;       /* INSN to move from GPR to VSX.  */
 
11951
   enum insn_code reload_vsx_gpr;       /* INSN to move from VSX to GPR.  */
 
11952
   addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks.  */
 
11953
+  bool scalar_in_vmx_p;                        /* Scalar value can go in VMX.  */
 
11954
 };
 
11955
 
 
11956
 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
 
11957
@@ -1704,8 +1705,7 @@
 
11958
      asked for it.  */
 
11959
   if (TARGET_VSX && VSX_REGNO_P (regno)
 
11960
       && (VECTOR_MEM_VSX_P (mode)
 
11961
-         || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
 
11962
-         || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
 
11963
+         || reg_addr[mode].scalar_in_vmx_p
 
11964
          || (TARGET_VSX_TIMODE && mode == TImode)
 
11965
          || (TARGET_VADDUQM && mode == V1TImode)))
 
11966
     {
 
11967
@@ -1714,12 +1714,9 @@
 
11968
 
 
11969
       if (ALTIVEC_REGNO_P (regno))
 
11970
        {
 
11971
-         if (mode == SFmode && !TARGET_UPPER_REGS_SF)
 
11972
+         if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
 
11973
            return 0;
 
11974
 
 
11975
-         if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
 
11976
-           return 0;
 
11977
-
 
11978
          return ALTIVEC_REGNO_P (last_regno);
 
11979
        }
 
11980
     }
 
11981
@@ -1897,14 +1894,16 @@
 
11982
   if (rs6000_vector_unit[m] != VECTOR_NONE
 
11983
       || rs6000_vector_mem[m] != VECTOR_NONE
 
11984
       || (reg_addr[m].reload_store != CODE_FOR_nothing)
 
11985
-      || (reg_addr[m].reload_load != CODE_FOR_nothing))
 
11986
+      || (reg_addr[m].reload_load != CODE_FOR_nothing)
 
11987
+      || reg_addr[m].scalar_in_vmx_p)
 
11988
     {
 
11989
       fprintf (stderr,
 
11990
-              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
 
11991
+              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
 
11992
               rs6000_debug_vector_unit (rs6000_vector_unit[m]),
 
11993
               rs6000_debug_vector_unit (rs6000_vector_mem[m]),
 
11994
               (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
 
11995
-              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
 
11996
+              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
 
11997
+              (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
 
11998
     }
 
11999
 
 
12000
   fputs ("\n", stderr);
 
12001
@@ -2021,6 +2020,10 @@
 
12002
           "wd reg_class = %s\n"
 
12003
           "wf reg_class = %s\n"
 
12004
           "wg reg_class = %s\n"
 
12005
+          "wh reg_class = %s\n"
 
12006
+          "wi reg_class = %s\n"
 
12007
+          "wj reg_class = %s\n"
 
12008
+          "wk reg_class = %s\n"
 
12009
           "wl reg_class = %s\n"
 
12010
           "wm reg_class = %s\n"
 
12011
           "wr reg_class = %s\n"
 
12012
@@ -2040,6 +2043,10 @@
 
12013
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
 
12014
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
 
12015
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
 
12016
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
 
12017
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
 
12018
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
 
12019
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
 
12020
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
 
12021
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
 
12022
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
 
12023
@@ -2324,6 +2331,8 @@
 
12024
 
 
12025
   for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
12026
     {
 
12027
+      enum machine_mode m2 = (enum machine_mode)m;
 
12028
+
 
12029
       /* SDmode is special in that we want to access it only via REG+REG
 
12030
         addressing on power7 and above, since we want to use the LFIWZX and
 
12031
         STFIWZX instructions to load it.  */
 
12032
@@ -2358,13 +2367,12 @@
 
12033
 
 
12034
              if (TARGET_UPDATE
 
12035
                  && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
 
12036
-                 && GET_MODE_SIZE (m) <= 8
 
12037
-                 && !VECTOR_MODE_P (m)
 
12038
-                 && !COMPLEX_MODE_P (m)
 
12039
+                 && GET_MODE_SIZE (m2) <= 8
 
12040
+                 && !VECTOR_MODE_P (m2)
 
12041
+                 && !COMPLEX_MODE_P (m2)
 
12042
                  && !indexed_only_p
 
12043
-                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
 
12044
-                 && !(m == DFmode && TARGET_UPPER_REGS_DF)
 
12045
-                 && !(m == SFmode && TARGET_UPPER_REGS_SF))
 
12046
+                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
 
12047
+                 && !reg_addr[m2].scalar_in_vmx_p)
 
12048
                {
 
12049
                  addr_mask |= RELOAD_REG_PRE_INCDEC;
 
12050
 
 
12051
@@ -2595,16 +2603,22 @@
 
12052
        f  - Register class to use with traditional SFmode instructions.
 
12053
        v  - Altivec register.
 
12054
        wa - Any VSX register.
 
12055
+       wc - Reserved to represent individual CR bits (used in LLVM).
 
12056
        wd - Preferred register class for V2DFmode.
 
12057
        wf - Preferred register class for V4SFmode.
 
12058
        wg - Float register for power6x move insns.
 
12059
+       wh - FP register for direct move instructions.
 
12060
+       wi - FP or VSX register to hold 64-bit integers for VSX insns.
 
12061
+       wj - FP or VSX register to hold 64-bit integers for direct moves.
 
12062
+       wk - FP or VSX register to hold 64-bit doubles for direct moves.
 
12063
        wl - Float register if we can do 32-bit signed int loads.
 
12064
        wm - VSX register for ISA 2.07 direct move operations.
 
12065
+       wn - always NO_REGS.
 
12066
        wr - GPR if 64-bit mode is permitted.
 
12067
        ws - Register class to do ISA 2.06 DF operations.
 
12068
+       wt - VSX register for TImode in VSX registers.
 
12069
        wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
 
12070
        wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
 
12071
-       wt - VSX register for TImode in VSX registers.
 
12072
        ww - Register class to do SF conversions in with VSX operations.
 
12073
        wx - Float register if we can do 32-bit int stores.
 
12074
        wy - Register class to do ISA 2.07 SF operations.
 
12075
@@ -2611,21 +2625,22 @@
 
12076
        wz - Float register if we can do 32-bit unsigned int loads.  */
 
12077
 
 
12078
   if (TARGET_HARD_FLOAT && TARGET_FPRS)
 
12079
-    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
 
12080
+    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;      /* SFmode  */
 
12081
 
 
12082
   if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
 
12083
-    rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
 
12084
+    rs6000_constraints[RS6000_CONSTRAINT_d]  = FLOAT_REGS;     /* DFmode  */
 
12085
 
 
12086
   if (TARGET_VSX)
 
12087
     {
 
12088
       rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
 
12089
-      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
 
12090
-      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
 
12091
+      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;     /* V2DFmode  */
 
12092
+      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;     /* V4SFmode  */
 
12093
+      rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS;   /* DImode  */
 
12094
 
 
12095
       if (TARGET_VSX_TIMODE)
 
12096
-       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
 
12097
+       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;    /* TImode  */
 
12098
 
 
12099
-      if (TARGET_UPPER_REGS_DF)
 
12100
+      if (TARGET_UPPER_REGS_DF)                                        /* DFmode  */
 
12101
        {
 
12102
          rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
 
12103
          rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
 
12104
@@ -2639,19 +2654,26 @@
 
12105
   if (TARGET_ALTIVEC)
 
12106
     rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
 
12107
 
 
12108
-  if (TARGET_MFPGPR)
 
12109
+  if (TARGET_MFPGPR)                                           /* DFmode  */
 
12110
     rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
 
12111
 
 
12112
   if (TARGET_LFIWAX)
 
12113
-    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
 
12114
+    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;     /* DImode  */
 
12115
 
 
12116
   if (TARGET_DIRECT_MOVE)
 
12117
-    rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
12118
+    {
 
12119
+      rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
 
12120
+      rs6000_constraints[RS6000_CONSTRAINT_wj]                 /* DImode  */
 
12121
+       = rs6000_constraints[RS6000_CONSTRAINT_wi];
 
12122
+      rs6000_constraints[RS6000_CONSTRAINT_wk]                 /* DFmode  */
 
12123
+       = rs6000_constraints[RS6000_CONSTRAINT_ws];
 
12124
+      rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
12125
+    }
 
12126
 
 
12127
   if (TARGET_POWERPC64)
 
12128
     rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
 
12129
 
 
12130
-  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
 
12131
+  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
 
12132
     {
 
12133
       rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
 
12134
       rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
 
12135
@@ -2666,10 +2688,10 @@
 
12136
     rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
 
12137
 
 
12138
   if (TARGET_STFIWX)
 
12139
-    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
 
12140
+    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;     /* DImode  */
 
12141
 
 
12142
   if (TARGET_LFIWZX)
 
12143
-    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
 
12144
+    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;     /* DImode  */
 
12145
 
 
12146
   /* Set up the reload helper and direct move functions.  */
 
12147
   if (TARGET_VSX || TARGET_ALTIVEC)
 
12148
@@ -2692,10 +2714,11 @@
 
12149
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_di_load;
 
12150
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
12151
            {
 
12152
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_di_store;
 
12153
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_di_load;
 
12154
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_di_store;
 
12155
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_di_load;
 
12156
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_di_store;
 
12157
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_di_load;
 
12158
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
12159
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_di_store;
 
12160
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_di_load;
 
12161
            }
 
12162
          if (TARGET_P8_VECTOR)
 
12163
            {
 
12164
@@ -2703,6 +2726,8 @@
 
12165
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_di_load;
 
12166
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_di_store;
 
12167
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_di_load;
 
12168
+             if (TARGET_UPPER_REGS_SF)
 
12169
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
12170
            }
 
12171
          if (TARGET_VSX_TIMODE)
 
12172
            {
 
12173
@@ -2759,10 +2784,11 @@
 
12174
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_si_load;
 
12175
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
12176
            {
 
12177
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_si_store;
 
12178
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_si_load;
 
12179
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_si_store;
 
12180
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_si_load;
 
12181
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_si_store;
 
12182
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_si_load;
 
12183
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
12184
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_si_store;
 
12185
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_si_load;
 
12186
            }
 
12187
          if (TARGET_P8_VECTOR)
 
12188
            {
 
12189
@@ -2770,6 +2796,8 @@
 
12190
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_si_load;
 
12191
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_si_store;
 
12192
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_si_load;
 
12193
+             if (TARGET_UPPER_REGS_SF)
 
12194
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
12195
            }
 
12196
          if (TARGET_VSX_TIMODE)
 
12197
            {
 
12198
@@ -2810,6 +2838,7 @@
 
12199
 
 
12200
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
12201
        {
 
12202
+         enum machine_mode m2 = (enum machine_mode)m;
 
12203
          int reg_size2 = reg_size;
 
12204
 
 
12205
          /* TFmode/TDmode always takes 2 registers, even in VSX.  */
 
12206
@@ -2818,7 +2847,7 @@
 
12207
            reg_size2 = UNITS_PER_FP_WORD;
 
12208
 
 
12209
          rs6000_class_max_nregs[m][c]
 
12210
-           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
 
12211
+           = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
 
12212
        }
 
12213
     }
 
12214
 
 
12215
@@ -3014,7 +3043,8 @@
 
12216
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
 
12217
          | ((TARGET_HTM)                   ? RS6000_BTM_HTM       : 0)
 
12218
          | ((TARGET_DFP)                   ? RS6000_BTM_DFP       : 0)
 
12219
-         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0));
 
12220
+         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0)
 
12221
+         | ((TARGET_LONG_DOUBLE_128)       ? RS6000_BTM_LDBL128 : 0));
 
12222
 }
 
12223
 
 
12224
 /* Override command line options.  Mostly we process the processor type and
 
12225
@@ -5861,6 +5891,34 @@
 
12226
   return align;
 
12227
 }
 
12228
 
 
12229
+/* Previous GCC releases forced all vector types to have 16-byte alignment.  */
 
12230
+
 
12231
+bool
 
12232
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
 
12233
+{
 
12234
+  if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
 
12235
+    {
 
12236
+      if (computed != 128)
 
12237
+       {
 
12238
+         static bool warned;
 
12239
+         if (!warned && warn_psabi)
 
12240
+           {
 
12241
+             warned = true;
 
12242
+             inform (input_location,
 
12243
+                     "the layout of aggregates containing vectors with"
 
12244
+                     " %d-byte alignment will change in a future GCC release",
 
12245
+                     computed / BITS_PER_UNIT);
 
12246
+           }
 
12247
+       }
 
12248
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
12249
+        keep the special treatment of vector types, but warn if there will
 
12250
+        be differences in future GCC releases.  */
 
12251
+      return true;
 
12252
+    }
 
12253
+
 
12254
+  return false;
 
12255
+}
 
12256
+
 
12257
 /* AIX increases natural record alignment to doubleword if the first
 
12258
    field is an FP double while the FP fields remain word aligned.  */
 
12259
 
 
12260
@@ -6109,7 +6167,8 @@
 
12261
     return false;
 
12262
 
 
12263
   extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
 
12264
-  gcc_assert (extra >= 0);
 
12265
+  if (extra < 0)
 
12266
+    extra = 0;
 
12267
 
 
12268
   if (GET_CODE (addr) == LO_SUM)
 
12269
     /* For lo_sum addresses, we must allow any offset except one that
 
12270
@@ -6818,24 +6877,6 @@
 
12271
   if (GET_CODE (y) == UNSPEC
 
12272
       && XINT (y, 1) == UNSPEC_TOCREL)
 
12273
     {
 
12274
-#ifdef ENABLE_CHECKING
 
12275
-      if (REG_P (XVECEXP (y, 0, 1))
 
12276
-         && REGNO (XVECEXP (y, 0, 1)) == TOC_REGISTER)
 
12277
-       {
 
12278
-         /* All good.  */
 
12279
-       }
 
12280
-      else if (GET_CODE (XVECEXP (y, 0, 1)) == DEBUG_EXPR)
 
12281
-       {
 
12282
-         /* Weirdness alert.  df_note_compute can replace r2 with a
 
12283
-            debug_expr when this unspec is in a debug_insn.
 
12284
-            Seen in gcc.dg/pr51957-1.c  */
 
12285
-       }
 
12286
-      else
 
12287
-       {
 
12288
-         debug_rtx (orig_x);
 
12289
-         abort ();
 
12290
-       }
 
12291
-#endif
 
12292
       y = XVECEXP (y, 0, 0);
 
12293
 
 
12294
 #ifdef HAVE_AS_TLS
 
12295
@@ -9198,14 +9239,51 @@
 
12296
           || (type && TREE_CODE (type) == VECTOR_TYPE
 
12297
               && int_size_in_bytes (type) >= 16))
 
12298
     return 128;
 
12299
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
 
12300
-           || DEFAULT_ABI == ABI_ELFv2
 
12301
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
 
12302
-          && mode == BLKmode
 
12303
-          && type && TYPE_ALIGN (type) > 64)
 
12304
+
 
12305
+  /* Aggregate types that need > 8 byte alignment are quadword-aligned
 
12306
+     in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
 
12307
+     -mcompat-align-parm is used.  */
 
12308
+  if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
 
12309
+       || DEFAULT_ABI == ABI_ELFv2)
 
12310
+      && type && TYPE_ALIGN (type) > 64)
 
12311
+    {
 
12312
+      /* "Aggregate" means any AGGREGATE_TYPE except for single-element
 
12313
+         or homogeneous float/vector aggregates here.  We already handled
 
12314
+         vector aggregates above, but still need to check for float here. */
 
12315
+      bool aggregate_p = (AGGREGATE_TYPE_P (type)
 
12316
+                         && !SCALAR_FLOAT_MODE_P (elt_mode));
 
12317
+
 
12318
+      /* We used to check for BLKmode instead of the above aggregate type
 
12319
+        check.  Warn when this results in any difference to the ABI.  */
 
12320
+      if (aggregate_p != (mode == BLKmode))
 
12321
+       {
 
12322
+         static bool warned;
 
12323
+         if (!warned && warn_psabi)
 
12324
+           {
 
12325
+             warned = true;
 
12326
+             inform (input_location,
 
12327
+                     "the ABI of passing aggregates with %d-byte alignment"
 
12328
+                     " will change in a future GCC release",
 
12329
+                     (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
 
12330
+           }
 
12331
+       }
 
12332
+
 
12333
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
12334
+        keep using the BLKmode check, but warn if there will be differences
 
12335
+        in future GCC releases.  */
 
12336
+      if (mode == BLKmode)
 
12337
+       return 128;
 
12338
+    }
 
12339
+
 
12340
+  /* Similar for the Darwin64 ABI.  Note that for historical reasons we
 
12341
+     implement the "aggregate type" check as a BLKmode check here; this
 
12342
+     means certain aggregate types are in fact not aligned.  */
 
12343
+  if (TARGET_MACHO && rs6000_darwin64_abi
 
12344
+      && mode == BLKmode
 
12345
+      && type && TYPE_ALIGN (type) > 64)
 
12346
     return 128;
 
12347
-  else
 
12348
-    return PARM_BOUNDARY;
 
12349
+
 
12350
+  return PARM_BOUNDARY;
 
12351
 }
 
12352
 
 
12353
 /* The offset in words to the start of the parameter save area.  */
 
12354
@@ -10243,6 +10321,7 @@
 
12355
          rtx r, off;
 
12356
          int i, k = 0;
 
12357
          unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
 
12358
+         int fpr_words;
 
12359
 
 
12360
          /* Do we also need to pass this argument in the parameter
 
12361
             save area?  */
 
12362
@@ -10271,6 +10350,37 @@
 
12363
              rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
 
12364
            }
 
12365
 
 
12366
+         /* If there were not enough FPRs to hold the argument, the rest
 
12367
+            usually goes into memory.  However, if the current position
 
12368
+            is still within the register parameter area, a portion may
 
12369
+            actually have to go into GPRs.
 
12370
+
 
12371
+            Note that it may happen that the portion of the argument
 
12372
+            passed in the first "half" of the first GPR was already
 
12373
+            passed in the last FPR as well.
 
12374
+
 
12375
+            For unnamed arguments, we already set up GPRs to cover the
 
12376
+            whole argument in rs6000_psave_function_arg, so there is
 
12377
+            nothing further to do at this point.
 
12378
+
 
12379
+            GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
 
12380
+            GCC releases.  To avoid any ABI change on the release branch,
 
12381
+            we retain that original implementation here, but warn if we
 
12382
+            encounter a case where the ABI will change in the future.  */
 
12383
+         fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
 
12384
+         if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
 
12385
+             && cum->nargs_prototype > 0)
 
12386
+            {
 
12387
+             static bool warned;
 
12388
+             if (!warned && warn_psabi)
 
12389
+               {
 
12390
+                 warned = true;
 
12391
+                 inform (input_location,
 
12392
+                         "the ABI of passing homogeneous float aggregates"
 
12393
+                         " will change in a future GCC release");
 
12394
+               }
 
12395
+           }
 
12396
+
 
12397
          return rs6000_finish_function_arg (mode, rvec, k);
 
12398
        }
 
12399
       else if (align_words < GP_ARG_NUM_REG)
 
12400
@@ -10497,10 +10607,9 @@
 
12401
    list, or passes any parameter in memory.  */
 
12402
 
 
12403
 static bool
 
12404
-rs6000_function_parms_need_stack (tree fun)
 
12405
+rs6000_function_parms_need_stack (tree fun, bool incoming)
 
12406
 {
 
12407
-  function_args_iterator args_iter;
 
12408
-  tree arg_type;
 
12409
+  tree fntype, result;
 
12410
   CUMULATIVE_ARGS args_so_far_v;
 
12411
   cumulative_args_t args_so_far;
 
12412
 
 
12413
@@ -10507,26 +10616,57 @@
 
12414
   if (!fun)
 
12415
     /* Must be a libcall, all of which only use reg parms.  */
 
12416
     return false;
 
12417
+
 
12418
+  fntype = fun;
 
12419
   if (!TYPE_P (fun))
 
12420
-    fun = TREE_TYPE (fun);
 
12421
+    fntype = TREE_TYPE (fun);
 
12422
 
 
12423
   /* Varargs functions need the parameter save area.  */
 
12424
-  if (!prototype_p (fun) || stdarg_p (fun))
 
12425
+  if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
 
12426
     return true;
 
12427
 
 
12428
-  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
 
12429
+  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
 
12430
   args_so_far = pack_cumulative_args (&args_so_far_v);
 
12431
 
 
12432
-  if (aggregate_value_p (TREE_TYPE (fun), fun))
 
12433
+  /* When incoming, we will have been passed the function decl.
 
12434
+     It is necessary to use the decl to handle K&R style functions,
 
12435
+     where TYPE_ARG_TYPES may not be available.  */
 
12436
+  if (incoming)
 
12437
     {
 
12438
-      tree type = build_pointer_type (TREE_TYPE (fun));
 
12439
-      rs6000_parm_needs_stack (args_so_far, type);
 
12440
+      gcc_assert (DECL_P (fun));
 
12441
+      result = DECL_RESULT (fun);
 
12442
     }
 
12443
+  else
 
12444
+    result = TREE_TYPE (fntype);
 
12445
 
 
12446
-  FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
 
12447
-    if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
12448
-      return true;
 
12449
+  if (result && aggregate_value_p (result, fntype))
 
12450
+    {
 
12451
+      if (!TYPE_P (result))
 
12452
+       result = TREE_TYPE (result);
 
12453
+      result = build_pointer_type (result);
 
12454
+      rs6000_parm_needs_stack (args_so_far, result);
 
12455
+    }
 
12456
 
 
12457
+  if (incoming)
 
12458
+    {
 
12459
+      tree parm;
 
12460
+
 
12461
+      for (parm = DECL_ARGUMENTS (fun);
 
12462
+          parm && parm != void_list_node;
 
12463
+          parm = TREE_CHAIN (parm))
 
12464
+       if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
 
12465
+         return true;
 
12466
+    }
 
12467
+  else
 
12468
+    {
 
12469
+      function_args_iterator args_iter;
 
12470
+      tree arg_type;
 
12471
+
 
12472
+      FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
 
12473
+       if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
12474
+         return true;
 
12475
+    }
 
12476
+
 
12477
   return false;
 
12478
 }
 
12479
 
 
12480
@@ -10537,7 +10677,7 @@
 
12481
    all parameters in registers.  */
 
12482
 
 
12483
 int
 
12484
-rs6000_reg_parm_stack_space (tree fun)
 
12485
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
 
12486
 {
 
12487
   int reg_parm_stack_space;
 
12488
 
 
12489
@@ -10555,7 +10695,7 @@
 
12490
     case ABI_ELFv2:
 
12491
       /* ??? Recomputing this every time is a bit expensive.  Is there
 
12492
         a place to cache this information?  */
 
12493
-      if (rs6000_function_parms_need_stack (fun))
 
12494
+      if (rs6000_function_parms_need_stack (fun, incoming))
 
12495
        reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
 
12496
       else
 
12497
        reg_parm_stack_space = 0;
 
12498
@@ -13544,11 +13684,15 @@
 
12499
   else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
12500
           == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
12501
     error ("Builtin function %s requires the -mhard-dfp and"
 
12502
-          "-mpower8-vector options", name);
 
12503
+          " -mpower8-vector options", name);
 
12504
   else if ((fnmask & RS6000_BTM_DFP) != 0)
 
12505
     error ("Builtin function %s requires the -mhard-dfp option", name);
 
12506
   else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
 
12507
     error ("Builtin function %s requires the -mpower8-vector option", name);
 
12508
+  else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
12509
+          == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
12510
+    error ("Builtin function %s requires the -mhard-float and"
 
12511
+          " -mlong-double-128 options", name);
 
12512
   else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
 
12513
     error ("Builtin function %s requires the -mhard-float option", name);
 
12514
   else
 
12515
@@ -13649,8 +13793,8 @@
 
12516
     case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
 
12517
     case ALTIVEC_BUILTIN_MASK_FOR_STORE:
 
12518
       {
 
12519
-       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
 
12520
-                    : (int) CODE_FOR_altivec_lvsl);
 
12521
+       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
 
12522
+                    : (int) CODE_FOR_altivec_lvsl_direct);
 
12523
        enum machine_mode tmode = insn_data[icode].operand[0].mode;
 
12524
        enum machine_mode mode = insn_data[icode].operand[1].mode;
 
12525
        tree arg;
 
12526
@@ -13678,7 +13822,6 @@
 
12527
            || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
 
12528
          target = gen_reg_rtx (tmode);
 
12529
 
 
12530
-       /*pat = gen_altivec_lvsr (target, op);*/
 
12531
        pat = GEN_FCN (icode) (target, op);
 
12532
        if (!pat)
 
12533
          return 0;
 
12534
@@ -17099,7 +17242,14 @@
 
12535
      prefer Altivec loads..  */
 
12536
   if (rclass == VSX_REGS)
 
12537
     {
 
12538
-      if (GET_MODE_SIZE (mode) <= 8)
 
12539
+      if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
 
12540
+       {
 
12541
+         rtx addr = XEXP (x, 0);
 
12542
+         if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
 
12543
+             || legitimate_lo_sum_address_p (mode, addr, false))
 
12544
+           return FLOAT_REGS;
 
12545
+       }
 
12546
+      else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
 
12547
        return FLOAT_REGS;
 
12548
 
 
12549
       if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
 
12550
@@ -31413,6 +31563,7 @@
 
12551
   { "htm",              RS6000_BTM_HTM,        false, false },
 
12552
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
 
12553
   { "hard-float",       RS6000_BTM_HARD_FLOAT, false, false },
 
12554
+  { "long-double-128",  RS6000_BTM_LDBL128,    false, false },
 
12555
 };
 
12556
 
 
12557
 /* Option variables that we want to support inside attribute((target)) and
 
12558
@@ -32663,25 +32814,14 @@
 
12559
 
 
12560
 /* Return true if the peephole2 can combine a load involving a combination of
 
12561
    an addis instruction and a load with an offset that can be fused together on
 
12562
-   a power8.
 
12563
+   a power8.  */
 
12564
 
 
12565
-   The operands are:
 
12566
-       operands[0]     register set with addis
 
12567
-       operands[1]     value set via addis
 
12568
-       operands[2]     target register being loaded
 
12569
-       operands[3]     D-form memory reference using operands[0].
 
12570
-
 
12571
-   In addition, we are passed a boolean that is true if this is a peephole2,
 
12572
-   and we can use see if the addis_reg is dead after the insn and can be
 
12573
-   replaced by the target register.  */
 
12574
-
 
12575
 bool
 
12576
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
 
12577
+fusion_gpr_load_p (rtx addis_reg,      /* register set via addis.  */
 
12578
+                  rtx addis_value,     /* addis value.  */
 
12579
+                  rtx target,          /* target register that is loaded.  */
 
12580
+                  rtx mem)             /* bottom part of the memory addr. */
 
12581
 {
 
12582
-  rtx addis_reg = operands[0];
 
12583
-  rtx addis_value = operands[1];
 
12584
-  rtx target = operands[2];
 
12585
-  rtx mem = operands[3];
 
12586
   rtx addr;
 
12587
   rtx base_reg;
 
12588
 
 
12589
@@ -32695,9 +32835,6 @@
 
12590
   if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
 
12591
     return false;
 
12592
 
 
12593
-  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
12594
-    return false;
 
12595
-
 
12596
   /* Allow sign/zero extension.  */
 
12597
   if (GET_CODE (mem) == ZERO_EXTEND
 
12598
       || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
 
12599
@@ -32706,22 +32843,22 @@
 
12600
   if (!MEM_P (mem))
 
12601
     return false;
 
12602
 
 
12603
+  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
12604
+    return false;
 
12605
+
 
12606
   addr = XEXP (mem, 0);                        /* either PLUS or LO_SUM.  */
 
12607
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
12608
     return false;
 
12609
 
 
12610
   /* Validate that the register used to load the high value is either the
 
12611
-     register being loaded, or we can safely replace its use in a peephole2.
 
12612
+     register being loaded, or we can safely replace its use.
 
12613
 
 
12614
-     If this is a peephole2, we assume that there are 2 instructions in the
 
12615
-     peephole (addis and load), so we want to check if the target register was
 
12616
-     not used in the memory address and the register to hold the addis result
 
12617
-     is dead after the peephole.  */
 
12618
+     This function is only called from the peephole2 pass and we assume that
 
12619
+     there are 2 instructions in the peephole (addis and load), so we want to
 
12620
+     check if the target register was not used in the memory address and the
 
12621
+     register to hold the addis result is dead after the peephole.  */
 
12622
   if (REGNO (addis_reg) != REGNO (target))
 
12623
     {
 
12624
-      if (!peep2_p)
 
12625
-       return false;
 
12626
-
 
12627
       if (reg_mentioned_p (target, mem))
 
12628
        return false;
 
12629
 
 
12630
@@ -32762,9 +32899,6 @@
 
12631
   enum machine_mode extend_mode = target_mode;
 
12632
   enum machine_mode ptr_mode = Pmode;
 
12633
   enum rtx_code extend = UNKNOWN;
 
12634
-  rtx addis_reg = ((ptr_mode == target_mode)
 
12635
-                  ? target
 
12636
-                  : simplify_subreg (ptr_mode, target, target_mode, 0));
 
12637
 
 
12638
   if (GET_CODE (orig_mem) == ZERO_EXTEND
 
12639
       || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
 
12640
@@ -32781,13 +32915,14 @@
 
12641
   gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
 
12642
 
 
12643
   offset = XEXP (orig_addr, 1);
 
12644
-  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
 
12645
-  new_mem = change_address (orig_mem, target_mode, new_addr);
 
12646
+  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
 
12647
+  new_mem = replace_equiv_address_nv (orig_mem, new_addr);
 
12648
 
 
12649
   if (extend != UNKNOWN)
 
12650
     new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
 
12651
 
 
12652
-  emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
 
12653
+  new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
 
12654
+                           UNSPEC_FUSION_GPR);
 
12655
   emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
 
12656
 
 
12657
   if (extend == SIGN_EXTEND)
 
12658
@@ -32806,55 +32941,40 @@
 
12659
 }
 
12660
 
 
12661
 /* Return a string to fuse an addis instruction with a gpr load to the same
 
12662
-   register that we loaded up the addis instruction.  The code is complicated,
 
12663
-   so we call output_asm_insn directly, and just return "".
 
12664
+   register that we loaded up the addis instruction.  The address that is used
 
12665
+   is the logical address that was formed during peephole2:
 
12666
+       (lo_sum (high) (low-part))
 
12667
 
 
12668
-   The operands are:
 
12669
-       operands[0]     register set with addis (must be same reg as target).
 
12670
-       operands[1]     value set via addis
 
12671
-       operands[2]     target register being loaded
 
12672
-       operands[3]     D-form memory reference using operands[0].  */
 
12673
+   The code is complicated, so we call output_asm_insn directly, and just
 
12674
+   return "".  */
 
12675
 
 
12676
 const char *
 
12677
-emit_fusion_gpr_load (rtx *operands)
 
12678
+emit_fusion_gpr_load (rtx target, rtx mem)
 
12679
 {
 
12680
-  rtx addis_reg = operands[0];
 
12681
-  rtx addis_value = operands[1];
 
12682
-  rtx target = operands[2];
 
12683
-  rtx mem = operands[3];
 
12684
+  rtx addis_value;
 
12685
   rtx fuse_ops[10];
 
12686
   rtx addr;
 
12687
   rtx load_offset;
 
12688
   const char *addis_str = NULL;
 
12689
   const char *load_str = NULL;
 
12690
-  const char *extend_insn = NULL;
 
12691
   const char *mode_name = NULL;
 
12692
   char insn_template[80];
 
12693
   enum machine_mode mode;
 
12694
   const char *comment_str = ASM_COMMENT_START;
 
12695
-  bool sign_p = false;
 
12696
 
 
12697
-  gcc_assert (REG_P (addis_reg) && REG_P (target));
 
12698
-  gcc_assert (REGNO (addis_reg) == REGNO (target));
 
12699
+  if (GET_CODE (mem) == ZERO_EXTEND)
 
12700
+    mem = XEXP (mem, 0);
 
12701
 
 
12702
+  gcc_assert (REG_P (target) && MEM_P (mem));
 
12703
+
 
12704
   if (*comment_str == ' ')
 
12705
     comment_str++;
 
12706
 
 
12707
-  /* Allow sign/zero extension.  */
 
12708
-  if (GET_CODE (mem) == ZERO_EXTEND)
 
12709
-    mem = XEXP (mem, 0);
 
12710
-
 
12711
-  else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
 
12712
-    {
 
12713
-      sign_p = true;
 
12714
-      mem = XEXP (mem, 0);
 
12715
-    }
 
12716
-
 
12717
-  gcc_assert (MEM_P (mem));
 
12718
   addr = XEXP (mem, 0);
 
12719
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
12720
     gcc_unreachable ();
 
12721
 
 
12722
+  addis_value = XEXP (addr, 0);
 
12723
   load_offset = XEXP (addr, 1);
 
12724
 
 
12725
   /* Now emit the load instruction to the same register.  */
 
12726
@@ -32864,29 +32984,22 @@
 
12727
     case QImode:
 
12728
       mode_name = "char";
 
12729
       load_str = "lbz";
 
12730
-      extend_insn = "extsb %0,%0";
 
12731
       break;
 
12732
 
 
12733
     case HImode:
 
12734
       mode_name = "short";
 
12735
       load_str = "lhz";
 
12736
-      extend_insn = "extsh %0,%0";
 
12737
       break;
 
12738
 
 
12739
     case SImode:
 
12740
       mode_name = "int";
 
12741
       load_str = "lwz";
 
12742
-      extend_insn = "extsw %0,%0";
 
12743
       break;
 
12744
 
 
12745
     case DImode:
 
12746
-      if (TARGET_POWERPC64)
 
12747
-       {
 
12748
-         mode_name = "long";
 
12749
-         load_str = "ld";
 
12750
-       }
 
12751
-      else
 
12752
-       gcc_unreachable ();
 
12753
+      gcc_assert (TARGET_POWERPC64);
 
12754
+      mode_name = "long";
 
12755
+      load_str = "ld";
 
12756
       break;
 
12757
 
 
12758
     default:
 
12759
@@ -33030,14 +33143,6 @@
 
12760
   else
 
12761
     fatal_insn ("Unable to generate load offset for fusion", load_offset);
 
12762
 
 
12763
-  /* Handle sign extension.  The peephole2 pass generates this as a separate
 
12764
-     insn, but we handle it just in case it got reattached.  */
 
12765
-  if (sign_p)
 
12766
-    {
 
12767
-      gcc_assert (extend_insn != NULL);
 
12768
-      output_asm_insn (extend_insn, fuse_ops);
 
12769
-    }
 
12770
-
 
12771
   return "";
 
12772
 }
 
12773
 
 
12774
Index: gcc/config/rs6000/vsx.md
 
12775
===================================================================
 
12776
--- a/src/gcc/config/rs6000/vsx.md      (.../tags/gcc_4_8_3_release)
 
12777
+++ b/src/gcc/config/rs6000/vsx.md      (.../branches/gcc-4_8-branch)
 
12778
@@ -24,6 +24,13 @@
 
12779
 ;; Iterator for the 2 64-bit vector types
 
12780
 (define_mode_iterator VSX_D [V2DF V2DI])
 
12781
 
 
12782
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
 
12783
+;; lxvd2x to properly handle swapping words on little endian
 
12784
+(define_mode_iterator VSX_LE [V2DF
 
12785
+                             V2DI
 
12786
+                             V1TI
 
12787
+                             (TI       "VECTOR_MEM_VSX_P (TImode)")])
 
12788
+
 
12789
 ;; Iterator for the 2 32-bit vector types
 
12790
 (define_mode_iterator VSX_W [V4SF V4SI])
 
12791
 
 
12792
@@ -79,19 +86,26 @@
 
12793
                         (V4SF  "wf")
 
12794
                         (V2DI  "wd")
 
12795
                         (V2DF  "wd")
 
12796
+                        (DI    "wi")
 
12797
                         (DF    "ws")
 
12798
-                        (SF    "d")
 
12799
+                        (SF    "ww")
 
12800
                         (V1TI  "v")
 
12801
                         (TI    "wt")])
 
12802
 
 
12803
-;; Map the register class used for float<->int conversions
 
12804
+;; Map the register class used for float<->int conversions (floating point side)
 
12805
+;; VSr2 is the preferred register class, VSr3 is any register class that will
 
12806
+;; hold the data
 
12807
 (define_mode_attr VSr2 [(V2DF  "wd")
 
12808
                         (V4SF  "wf")
 
12809
-                        (DF    "ws")])
 
12810
+                        (DF    "ws")
 
12811
+                        (SF    "ww")
 
12812
+                        (DI    "wi")])
 
12813
 
 
12814
 (define_mode_attr VSr3 [(V2DF  "wa")
 
12815
                         (V4SF  "wa")
 
12816
-                        (DF    "ws")])
 
12817
+                        (DF    "ws")
 
12818
+                        (SF    "ww")
 
12819
+                        (DI    "wi")])
 
12820
 
 
12821
 ;; Map the register class for sp<->dp float conversions, destination
 
12822
 (define_mode_attr VSr4 [(SF    "ws")
 
12823
@@ -99,12 +113,27 @@
 
12824
                         (V2DF  "wd")
 
12825
                         (V4SF  "v")])
 
12826
 
 
12827
-;; Map the register class for sp<->dp float conversions, destination
 
12828
+;; Map the register class for sp<->dp float conversions, source
 
12829
 (define_mode_attr VSr5 [(SF    "ws")
 
12830
                         (DF    "f")
 
12831
                         (V2DF  "v")
 
12832
                         (V4SF  "wd")])
 
12833
 
 
12834
+;; The VSX register class that a type can occupy, even if it is not the
 
12835
+;; preferred register class (VSr is the preferred register class that will get
 
12836
+;; allocated first).
 
12837
+(define_mode_attr VSa  [(V16QI "wa")
 
12838
+                        (V8HI  "wa")
 
12839
+                        (V4SI  "wa")
 
12840
+                        (V4SF  "wa")
 
12841
+                        (V2DI  "wa")
 
12842
+                        (V2DF  "wa")
 
12843
+                        (DI    "wi")
 
12844
+                        (DF    "ws")
 
12845
+                        (SF    "ww")
 
12846
+                        (V1TI  "wa")
 
12847
+                        (TI    "wt")])
 
12848
+
 
12849
 ;; Same size integer type for floating point data
 
12850
 (define_mode_attr VSi [(V4SF  "v4si")
 
12851
                       (V2DF  "v2di")
 
12852
@@ -200,6 +229,16 @@
 
12853
                             (V2DF      "V4DF")
 
12854
                             (V1TI      "V2TI")])
 
12855
 
 
12856
+;; Map register class for 64-bit element in 128-bit vector for direct moves
 
12857
+;; to/from gprs
 
12858
+(define_mode_attr VS_64dm [(V2DF       "wk")
 
12859
+                          (V2DI        "wj")])
 
12860
+
 
12861
+;; Map register class for 64-bit element in 128-bit vector for normal register
 
12862
+;; to register moves
 
12863
+(define_mode_attr VS_64reg [(V2DF      "ws")
 
12864
+                           (V2DI       "wi")])
 
12865
+
 
12866
 ;; Constants for creating unspecs
 
12867
 (define_c_enum "unspec"
 
12868
   [UNSPEC_VSX_CONCAT
 
12869
@@ -228,8 +267,8 @@
 
12870
 ;; The patterns for LE permuted loads and stores come before the general
 
12871
 ;; VSX moves so they match first.
 
12872
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
12873
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
12874
-        (match_operand:VSX_D 1 "memory_operand" "Z"))]
 
12875
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
12876
+        (match_operand:VSX_LE 1 "memory_operand" "Z"))]
 
12877
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12878
   "#"
 
12879
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12880
@@ -251,7 +290,7 @@
 
12881
    (set_attr "length" "8")])
 
12882
 
 
12883
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
12884
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
12885
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
12886
         (match_operand:VSX_W 1 "memory_operand" "Z"))]
 
12887
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12888
   "#"
 
12889
@@ -342,8 +381,8 @@
 
12890
    (set_attr "length" "8")])
 
12891
 
 
12892
 (define_insn "*vsx_le_perm_store_<mode>"
 
12893
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
12894
-        (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
 
12895
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
12896
+        (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
 
12897
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12898
   "#"
 
12899
   [(set_attr "type" "vecstore")
 
12900
@@ -350,8 +389,8 @@
 
12901
    (set_attr "length" "12")])
 
12902
 
 
12903
 (define_split
 
12904
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
12905
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
12906
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
12907
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
12908
   "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
 
12909
   [(set (match_dup 2)
 
12910
         (vec_select:<MODE>
 
12911
@@ -369,8 +408,8 @@
 
12912
 ;; The post-reload split requires that we re-permute the source
 
12913
 ;; register in case it is still live.
 
12914
 (define_split
 
12915
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
12916
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
12917
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
12918
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
12919
   "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
 
12920
   [(set (match_dup 1)
 
12921
         (vec_select:<MODE>
 
12922
@@ -388,7 +427,7 @@
 
12923
 
 
12924
 (define_insn "*vsx_le_perm_store_<mode>"
 
12925
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
12926
-        (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
 
12927
+        (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
 
12928
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12929
   "#"
 
12930
   [(set_attr "type" "vecstore")
 
12931
@@ -578,8 +617,8 @@
 
12932
 
 
12933
 
 
12934
 (define_insn "*vsx_mov<mode>"
 
12935
-  [(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")
 
12936
-       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
12937
+  [(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")
 
12938
+       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
12939
   "VECTOR_MEM_VSX_P (<MODE>mode)
 
12940
    && (register_operand (operands[0], <MODE>mode) 
 
12941
        || register_operand (operands[1], <MODE>mode))"
 
12942
@@ -681,9 +720,9 @@
 
12943
 ;; instructions are now combined with the insn for the traditional floating
 
12944
 ;; point unit.
 
12945
 (define_insn "*vsx_add<mode>3"
 
12946
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12947
-        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12948
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12949
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12950
+        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12951
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12952
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12953
   "xvadd<VSs> %x0,%x1,%x2"
 
12954
   [(set_attr "type" "<VStype_simple>")
 
12955
@@ -690,9 +729,9 @@
 
12956
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12957
 
 
12958
 (define_insn "*vsx_sub<mode>3"
 
12959
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12960
-        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12961
-                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12962
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12963
+        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12964
+                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12965
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12966
   "xvsub<VSs> %x0,%x1,%x2"
 
12967
   [(set_attr "type" "<VStype_simple>")
 
12968
@@ -699,9 +738,9 @@
 
12969
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12970
 
 
12971
 (define_insn "*vsx_mul<mode>3"
 
12972
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12973
-        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12974
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12975
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12976
+        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12977
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12978
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12979
   "xvmul<VSs> %x0,%x1,%x2"
 
12980
   [(set_attr "type" "<VStype_simple>")
 
12981
@@ -708,9 +747,9 @@
 
12982
    (set_attr "fp_type" "<VSfptype_mul>")])
 
12983
 
 
12984
 (define_insn "*vsx_div<mode>3"
 
12985
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12986
-        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12987
-                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12988
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12989
+        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12990
+                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12991
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12992
   "xvdiv<VSs> %x0,%x1,%x2"
 
12993
   [(set_attr "type" "<VStype_div>")
 
12994
@@ -746,8 +785,8 @@
 
12995
 
 
12996
 (define_insn "*vsx_tdiv<mode>3_internal"
 
12997
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
12998
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
 
12999
-                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
 
13000
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13001
+                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
13002
                   UNSPEC_VSX_TDIV))]
 
13003
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13004
   "x<VSv>tdiv<VSs> %0,%x1,%x2"
 
13005
@@ -755,8 +794,8 @@
 
13006
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13007
 
 
13008
 (define_insn "vsx_fre<mode>2"
 
13009
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13010
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
13011
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13012
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13013
                      UNSPEC_FRES))]
 
13014
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13015
   "xvre<VSs> %x0,%x1"
 
13016
@@ -764,8 +803,8 @@
 
13017
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13018
 
 
13019
 (define_insn "*vsx_neg<mode>2"
 
13020
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13021
-        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
13022
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13023
+        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13024
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13025
   "xvneg<VSs> %x0,%x1"
 
13026
   [(set_attr "type" "<VStype_simple>")
 
13027
@@ -772,8 +811,8 @@
 
13028
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13029
 
 
13030
 (define_insn "*vsx_abs<mode>2"
 
13031
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13032
-        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
13033
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13034
+        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13035
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13036
   "xvabs<VSs> %x0,%x1"
 
13037
   [(set_attr "type" "<VStype_simple>")
 
13038
@@ -780,10 +819,10 @@
 
13039
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13040
 
 
13041
 (define_insn "vsx_nabs<mode>2"
 
13042
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13043
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13044
         (neg:VSX_F
 
13045
         (abs:VSX_F
 
13046
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
 
13047
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
 
13048
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13049
   "xvnabs<VSs> %x0,%x1"
 
13050
   [(set_attr "type" "<VStype_simple>")
 
13051
@@ -790,9 +829,9 @@
 
13052
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13053
 
 
13054
 (define_insn "vsx_smax<mode>3"
 
13055
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13056
-        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13057
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
13058
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13059
+        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13060
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13061
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13062
   "xvmax<VSs> %x0,%x1,%x2"
 
13063
   [(set_attr "type" "<VStype_simple>")
 
13064
@@ -799,9 +838,9 @@
 
13065
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13066
 
 
13067
 (define_insn "*vsx_smin<mode>3"
 
13068
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13069
-        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13070
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
13071
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13072
+        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13073
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13074
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13075
   "xvmin<VSs> %x0,%x1,%x2"
 
13076
   [(set_attr "type" "<VStype_simple>")
 
13077
@@ -808,8 +847,8 @@
 
13078
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13079
 
 
13080
 (define_insn "*vsx_sqrt<mode>2"
 
13081
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13082
-        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
13083
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13084
+        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13085
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13086
   "xvsqrt<VSs> %x0,%x1"
 
13087
   [(set_attr "type" "<VStype_sqrt>")
 
13088
@@ -816,8 +855,8 @@
 
13089
    (set_attr "fp_type" "<VSfptype_sqrt>")])
 
13090
 
 
13091
 (define_insn "*vsx_rsqrte<mode>2"
 
13092
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13093
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
13094
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13095
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13096
                      UNSPEC_RSQRT))]
 
13097
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13098
   "xvrsqrte<VSs> %x0,%x1"
 
13099
@@ -852,7 +891,7 @@
 
13100
 
 
13101
 (define_insn "*vsx_tsqrt<mode>2_internal"
 
13102
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
13103
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
13104
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13105
                     UNSPEC_VSX_TSQRT))]
 
13106
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13107
   "x<VSv>tsqrt<VSs> %0,%x1"
 
13108
@@ -865,11 +904,11 @@
 
13109
 ;; multiply.
 
13110
 
 
13111
 (define_insn "*vsx_fmav4sf4"
 
13112
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
 
13113
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
 
13114
        (fma:V4SF
 
13115
-         (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
 
13116
-         (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
 
13117
-         (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
 
13118
+         (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
 
13119
+         (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
 
13120
+         (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
 
13121
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
13122
   "@
 
13123
    xvmaddasp %x0,%x1,%x2
 
13124
@@ -880,11 +919,11 @@
 
13125
   [(set_attr "type" "vecfloat")])
 
13126
 
 
13127
 (define_insn "*vsx_fmav2df4"
 
13128
-  [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
 
13129
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
 
13130
        (fma:V2DF
 
13131
-         (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
 
13132
-         (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
 
13133
-         (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
 
13134
+         (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
 
13135
+         (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
 
13136
+         (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
 
13137
   "VECTOR_UNIT_VSX_P (V2DFmode)"
 
13138
   "@
 
13139
    xvmaddadp %x0,%x1,%x2
 
13140
@@ -894,12 +933,12 @@
 
13141
   [(set_attr "type" "vecdouble")])
 
13142
 
 
13143
 (define_insn "*vsx_fms<mode>4"
 
13144
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
13145
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
13146
        (fma:VSX_F
 
13147
-         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
 
13148
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
13149
+         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
 
13150
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
13151
          (neg:VSX_F
 
13152
-           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
13153
+           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
13154
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13155
   "@
 
13156
    xvmsuba<VSs> %x0,%x1,%x2
 
13157
@@ -909,12 +948,12 @@
 
13158
   [(set_attr "type" "<VStype_mul>")])
 
13159
 
 
13160
 (define_insn "*vsx_nfma<mode>4"
 
13161
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
13162
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
13163
        (neg:VSX_F
 
13164
         (fma:VSX_F
 
13165
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
 
13166
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
13167
-         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
13168
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
 
13169
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
13170
+         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
13171
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13172
   "@
 
13173
    xvnmadda<VSs> %x0,%x1,%x2
 
13174
@@ -959,9 +998,9 @@
 
13175
 
 
13176
 ;; Vector conditional expressions (no scalar version for these instructions)
 
13177
 (define_insn "vsx_eq<mode>"
 
13178
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13179
-       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13180
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
13181
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13182
+       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13183
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13184
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13185
   "xvcmpeq<VSs> %x0,%x1,%x2"
 
13186
   [(set_attr "type" "<VStype_simple>")
 
13187
@@ -968,9 +1007,9 @@
 
13188
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13189
 
 
13190
 (define_insn "vsx_gt<mode>"
 
13191
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13192
-       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13193
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
13194
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13195
+       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13196
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13197
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13198
   "xvcmpgt<VSs> %x0,%x1,%x2"
 
13199
   [(set_attr "type" "<VStype_simple>")
 
13200
@@ -977,9 +1016,9 @@
 
13201
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13202
 
 
13203
 (define_insn "*vsx_ge<mode>"
 
13204
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13205
-       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13206
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
13207
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13208
+       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13209
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13210
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13211
   "xvcmpge<VSs> %x0,%x1,%x2"
 
13212
   [(set_attr "type" "<VStype_simple>")
 
13213
@@ -990,10 +1029,10 @@
 
13214
 (define_insn "*vsx_eq_<mode>_p"
 
13215
   [(set (reg:CC 74)
 
13216
        (unspec:CC
 
13217
-        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
13218
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
13219
+        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
13220
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
13221
         UNSPEC_PREDICATE))
 
13222
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13223
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13224
        (eq:VSX_F (match_dup 1)
 
13225
                  (match_dup 2)))]
 
13226
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13227
@@ -1003,10 +1042,10 @@
 
13228
 (define_insn "*vsx_gt_<mode>_p"
 
13229
   [(set (reg:CC 74)
 
13230
        (unspec:CC
 
13231
-        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
13232
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
13233
+        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
13234
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
13235
         UNSPEC_PREDICATE))
 
13236
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13237
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13238
        (gt:VSX_F (match_dup 1)
 
13239
                  (match_dup 2)))]
 
13240
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13241
@@ -1016,10 +1055,10 @@
 
13242
 (define_insn "*vsx_ge_<mode>_p"
 
13243
   [(set (reg:CC 74)
 
13244
        (unspec:CC
 
13245
-        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
13246
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
13247
+        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
13248
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
13249
         UNSPEC_PREDICATE))
 
13250
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13251
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13252
        (ge:VSX_F (match_dup 1)
 
13253
                  (match_dup 2)))]
 
13254
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13255
@@ -1028,23 +1067,23 @@
 
13256
 
 
13257
 ;; Vector select
 
13258
 (define_insn "*vsx_xxsel<mode>"
 
13259
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
13260
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13261
        (if_then_else:VSX_L
 
13262
-        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
13263
+        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13264
                (match_operand:VSX_L 4 "zero_constant" ""))
 
13265
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
13266
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
13267
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
13268
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13269
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13270
   "xxsel %x0,%x3,%x2,%x1"
 
13271
   [(set_attr "type" "vecperm")])
 
13272
 
 
13273
 (define_insn "*vsx_xxsel<mode>_uns"
 
13274
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
13275
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13276
        (if_then_else:VSX_L
 
13277
-        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
13278
+        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13279
                   (match_operand:VSX_L 4 "zero_constant" ""))
 
13280
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
13281
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
13282
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
13283
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13284
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13285
   "xxsel %x0,%x3,%x2,%x1"
 
13286
   [(set_attr "type" "vecperm")])
 
13287
@@ -1051,10 +1090,10 @@
 
13288
 
 
13289
 ;; Copy sign
 
13290
 (define_insn "vsx_copysign<mode>3"
 
13291
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13292
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13293
        (unspec:VSX_F
 
13294
-        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
13295
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
 
13296
+        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
13297
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
13298
         UNSPEC_COPYSIGN))]
 
13299
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13300
   "xvcpsgn<VSs> %x0,%x2,%x1"
 
13301
@@ -1067,7 +1106,7 @@
 
13302
 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
 
13303
 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
 
13304
 (define_insn "vsx_float<VSi><mode>2"
 
13305
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
13306
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
13307
        (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
13308
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13309
   "x<VSv>cvsx<VSc><VSs> %x0,%x1"
 
13310
@@ -1075,7 +1114,7 @@
 
13311
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13312
 
 
13313
 (define_insn "vsx_floatuns<VSi><mode>2"
 
13314
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
13315
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
13316
        (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
13317
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13318
   "x<VSv>cvux<VSc><VSs> %x0,%x1"
 
13319
@@ -1084,7 +1123,7 @@
 
13320
 
 
13321
 (define_insn "vsx_fix_trunc<mode><VSi>2"
 
13322
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
13323
-       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
13324
+       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
13325
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13326
   "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
 
13327
   [(set_attr "type" "<VStype_simple>")
 
13328
@@ -1092,7 +1131,7 @@
 
13329
 
 
13330
 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
 
13331
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
13332
-       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
13333
+       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
13334
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13335
   "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
 
13336
   [(set_attr "type" "<VStype_simple>")
 
13337
@@ -1100,8 +1139,8 @@
 
13338
 
 
13339
 ;; Math rounding functions
 
13340
 (define_insn "vsx_x<VSv>r<VSs>i"
 
13341
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
13342
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
13343
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13344
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13345
                      UNSPEC_VSX_ROUND_I))]
 
13346
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13347
   "x<VSv>r<VSs>i %x0,%x1"
 
13348
@@ -1109,8 +1148,8 @@
 
13349
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13350
 
 
13351
 (define_insn "vsx_x<VSv>r<VSs>ic"
 
13352
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
13353
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
13354
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13355
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13356
                      UNSPEC_VSX_ROUND_IC))]
 
13357
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13358
   "x<VSv>r<VSs>ic %x0,%x1"
 
13359
@@ -1118,8 +1157,8 @@
 
13360
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13361
 
 
13362
 (define_insn "vsx_btrunc<mode>2"
 
13363
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13364
-       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
13365
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13366
+       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
13367
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13368
   "xvr<VSs>iz %x0,%x1"
 
13369
   [(set_attr "type" "<VStype_simple>")
 
13370
@@ -1126,8 +1165,8 @@
 
13371
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13372
 
 
13373
 (define_insn "*vsx_b2trunc<mode>2"
 
13374
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
13375
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
13376
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13377
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13378
                      UNSPEC_FRIZ))]
 
13379
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13380
   "x<VSv>r<VSs>iz %x0,%x1"
 
13381
@@ -1135,8 +1174,8 @@
 
13382
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13383
 
 
13384
 (define_insn "vsx_floor<mode>2"
 
13385
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13386
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
13387
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13388
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13389
                      UNSPEC_FRIM))]
 
13390
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13391
   "xvr<VSs>im %x0,%x1"
 
13392
@@ -1144,8 +1183,8 @@
 
13393
    (set_attr "fp_type" "<VSfptype_simple>")])
 
13394
 
 
13395
 (define_insn "vsx_ceil<mode>2"
 
13396
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
13397
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
13398
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13399
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
13400
                      UNSPEC_FRIP))]
 
13401
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13402
   "xvr<VSs>ip %x0,%x1"
 
13403
@@ -1160,8 +1199,8 @@
 
13404
 ;; scalar single precision instructions internally use the double format.
 
13405
 ;; Prefer the altivec registers, since we likely will need to do a vperm
 
13406
 (define_insn "vsx_<VS_spdp_insn>"
 
13407
-  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
 
13408
-       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
 
13409
+  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
 
13410
+       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
 
13411
                              UNSPEC_VSX_CVSPDP))]
 
13412
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
13413
   "<VS_spdp_insn> %x0,%x1"
 
13414
@@ -1169,8 +1208,8 @@
 
13415
 
 
13416
 ;; xscvspdp, represent the scalar SF type as V4SF
 
13417
 (define_insn "vsx_xscvspdp"
 
13418
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
13419
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
13420
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
 
13421
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
 
13422
                   UNSPEC_VSX_CVSPDP))]
 
13423
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
13424
   "xscvspdp %x0,%x1"
 
13425
@@ -1197,7 +1236,7 @@
 
13426
 
 
13427
 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
 
13428
 (define_insn "vsx_xscvdpspn"
 
13429
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
 
13430
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
 
13431
        (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
 
13432
                     UNSPEC_VSX_CVDPSPN))]
 
13433
   "TARGET_XSCVDPSPN"
 
13434
@@ -1205,8 +1244,8 @@
 
13435
   [(set_attr "type" "fp")])
 
13436
 
 
13437
 (define_insn "vsx_xscvspdpn"
 
13438
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
13439
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
13440
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
 
13441
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
 
13442
                   UNSPEC_VSX_CVSPDPN))]
 
13443
   "TARGET_XSCVSPDPN"
 
13444
   "xscvspdpn %x0,%x1"
 
13445
@@ -1213,8 +1252,8 @@
 
13446
   [(set_attr "type" "fp")])
 
13447
 
 
13448
 (define_insn "vsx_xscvdpspn_scalar"
 
13449
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
 
13450
-       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
 
13451
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
 
13452
+       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
 
13453
                     UNSPEC_VSX_CVDPSPN))]
 
13454
   "TARGET_XSCVDPSPN"
 
13455
   "xscvdpspn %x0,%x1"
 
13456
@@ -1302,10 +1341,10 @@
 
13457
 ;; since the xsrdpiz instruction does not truncate the value if the floating
 
13458
 ;; point value is < LONG_MIN or > LONG_MAX.
 
13459
 (define_insn "*vsx_float_fix_<mode>2"
 
13460
-  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
 
13461
+  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13462
        (float:VSX_DF
 
13463
         (fix:<VSI>
 
13464
-         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
 
13465
+         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
 
13466
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
13467
    && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
 
13468
    && !flag_trapping_math && TARGET_FRIZ"
 
13469
@@ -1318,10 +1357,10 @@
 
13470
 
 
13471
 ;; Build a V2DF/V2DI vector from two scalars
 
13472
 (define_insn "vsx_concat_<mode>"
 
13473
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
 
13474
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
13475
        (vec_concat:VSX_D
 
13476
-        (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
 
13477
-        (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
 
13478
+        (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
13479
+        (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
 
13480
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13481
 {
 
13482
   if (BYTES_BIG_ENDIAN)
 
13483
@@ -1352,9 +1391,9 @@
 
13484
 ;; xxpermdi for little endian loads and stores.  We need several of
 
13485
 ;; these since the form of the PARALLEL differs by mode.
 
13486
 (define_insn "*vsx_xxpermdi2_le_<mode>"
 
13487
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
13488
-        (vec_select:VSX_D
 
13489
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
13490
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
13491
+        (vec_select:VSX_LE
 
13492
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
13493
           (parallel [(const_int 1) (const_int 0)])))]
 
13494
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
13495
   "xxpermdi %x0,%x1,%x1,2"
 
13496
@@ -1361,9 +1400,9 @@
 
13497
   [(set_attr "type" "vecperm")])
 
13498
 
 
13499
 (define_insn "*vsx_xxpermdi4_le_<mode>"
 
13500
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
13501
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
13502
         (vec_select:VSX_W
 
13503
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
13504
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
13505
           (parallel [(const_int 2) (const_int 3)
 
13506
                      (const_int 0) (const_int 1)])))]
 
13507
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
13508
@@ -1401,9 +1440,9 @@
 
13509
 ;; lxvd2x for little endian loads.  We need several of
 
13510
 ;; these since the form of the PARALLEL differs by mode.
 
13511
 (define_insn "*vsx_lxvd2x2_le_<mode>"
 
13512
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
13513
-        (vec_select:VSX_D
 
13514
-          (match_operand:VSX_D 1 "memory_operand" "Z")
 
13515
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
13516
+        (vec_select:VSX_LE
 
13517
+          (match_operand:VSX_LE 1 "memory_operand" "Z")
 
13518
           (parallel [(const_int 1) (const_int 0)])))]
 
13519
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
13520
   "lxvd2x %x0,%y1"
 
13521
@@ -1410,7 +1449,7 @@
 
13522
   [(set_attr "type" "vecload")])
 
13523
 
 
13524
 (define_insn "*vsx_lxvd2x4_le_<mode>"
 
13525
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
13526
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
13527
         (vec_select:VSX_W
 
13528
           (match_operand:VSX_W 1 "memory_operand" "Z")
 
13529
           (parallel [(const_int 2) (const_int 3)
 
13530
@@ -1450,9 +1489,9 @@
 
13531
 ;; stxvd2x for little endian stores.  We need several of
 
13532
 ;; these since the form of the PARALLEL differs by mode.
 
13533
 (define_insn "*vsx_stxvd2x2_le_<mode>"
 
13534
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
13535
-        (vec_select:VSX_D
 
13536
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
13537
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
13538
+        (vec_select:VSX_LE
 
13539
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
13540
           (parallel [(const_int 1) (const_int 0)])))]
 
13541
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
13542
   "stxvd2x %x1,%y0"
 
13543
@@ -1461,7 +1500,7 @@
 
13544
 (define_insn "*vsx_stxvd2x4_le_<mode>"
 
13545
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
13546
         (vec_select:VSX_W
 
13547
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
13548
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
13549
           (parallel [(const_int 2) (const_int 3)
 
13550
                      (const_int 0) (const_int 1)])))]
 
13551
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
13552
@@ -1513,11 +1552,12 @@
 
13553
 
 
13554
 ;; Set the element of a V2DI/VD2F mode
 
13555
 (define_insn "vsx_set_<mode>"
 
13556
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
 
13557
-       (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
 
13558
-                      (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
 
13559
-                      (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
13560
-                     UNSPEC_VSX_SET))]
 
13561
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
 
13562
+       (unspec:VSX_D
 
13563
+        [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
 
13564
+         (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
13565
+         (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
13566
+        UNSPEC_VSX_SET))]
 
13567
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13568
 {
 
13569
   int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
 
13570
@@ -1582,7 +1622,7 @@
 
13571
 (define_insn_and_split "vsx_extract_v4sf"
 
13572
   [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
 
13573
        (vec_select:SF
 
13574
-        (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
 
13575
+        (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
 
13576
         (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
 
13577
    (clobber (match_scratch:V4SF 3 "=X,0"))]
 
13578
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
13579
@@ -1606,7 +1646,7 @@
 
13580
     {
 
13581
       if (GET_CODE (op3) == SCRATCH)
 
13582
        op3 = gen_reg_rtx (V4SFmode);
 
13583
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
 
13584
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
 
13585
       tmp = op3;
 
13586
     }
 
13587
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
 
13588
@@ -1765,9 +1805,9 @@
 
13589
 
 
13590
 ;; V2DF/V2DI splat
 
13591
 (define_insn "vsx_splat_<mode>"
 
13592
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
 
13593
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
 
13594
        (vec_duplicate:VSX_D
 
13595
-        (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
 
13596
+        (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
 
13597
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13598
   "@
 
13599
    xxpermdi %x0,%x1,%x1,0
 
13600
@@ -1780,10 +1820,10 @@
 
13601
 
 
13602
 ;; V4SF/V4SI splat
 
13603
 (define_insn "vsx_xxspltw_<mode>"
 
13604
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
13605
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
13606
        (vec_duplicate:VSX_W
 
13607
         (vec_select:<VS_scalar>
 
13608
-         (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
13609
+         (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
13610
          (parallel
 
13611
           [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
 
13612
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13613
@@ -1796,8 +1836,8 @@
 
13614
   [(set_attr "type" "vecperm")])
 
13615
 
 
13616
 (define_insn "vsx_xxspltw_<mode>_direct"
 
13617
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
13618
-        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
13619
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
13620
+        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
13621
                        (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
 
13622
                       UNSPEC_VSX_XXSPLTW))]
 
13623
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13624
@@ -1806,11 +1846,11 @@
 
13625
 
 
13626
 ;; V4SF/V4SI interleave
 
13627
 (define_insn "vsx_xxmrghw_<mode>"
 
13628
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
13629
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
13630
         (vec_select:VSX_W
 
13631
          (vec_concat:<VS_double>
 
13632
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
13633
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
 
13634
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
13635
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
 
13636
          (parallel [(const_int 0) (const_int 4)
 
13637
                     (const_int 1) (const_int 5)])))]
 
13638
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13639
@@ -1823,11 +1863,11 @@
 
13640
   [(set_attr "type" "vecperm")])
 
13641
 
 
13642
 (define_insn "vsx_xxmrglw_<mode>"
 
13643
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
13644
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
13645
        (vec_select:VSX_W
 
13646
          (vec_concat:<VS_double>
 
13647
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
13648
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
 
13649
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
13650
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
 
13651
          (parallel [(const_int 2) (const_int 6)
 
13652
                     (const_int 3) (const_int 7)])))]
 
13653
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13654
@@ -1841,9 +1881,9 @@
 
13655
 
 
13656
 ;; Shift left double by word immediate
 
13657
 (define_insn "vsx_xxsldwi_<mode>"
 
13658
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
 
13659
-       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
 
13660
-                      (match_operand:VSX_L 2 "vsx_register_operand" "wa")
 
13661
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
 
13662
+       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
 
13663
+                      (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
 
13664
                       (match_operand:QI 3 "u5bit_cint_operand" "i")]
 
13665
                      UNSPEC_VSX_SLDWI))]
 
13666
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
13667
@@ -1924,7 +1964,7 @@
 
13668
 ;; to the top element of the V2DF array without doing an extract.
 
13669
 
 
13670
 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
 
13671
-  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
 
13672
+  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
 
13673
        (vec_select:DF
 
13674
         (VEC_reduc:V2DF
 
13675
          (vec_concat:V2DF
 
13676
Index: gcc/config/rs6000/rs6000.h
 
13677
===================================================================
 
13678
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_8_3_release)
 
13679
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_8-branch)
 
13680
@@ -1438,6 +1438,10 @@
 
13681
   RS6000_CONSTRAINT_wd,                /* VSX register for V2DF */
 
13682
   RS6000_CONSTRAINT_wf,                /* VSX register for V4SF */
 
13683
   RS6000_CONSTRAINT_wg,                /* FPR register for -mmfpgpr */
 
13684
+  RS6000_CONSTRAINT_wh,                /* FPR register for direct moves.  */
 
13685
+  RS6000_CONSTRAINT_wi,                /* FPR/VSX register to hold DImode */
 
13686
+  RS6000_CONSTRAINT_wj,                /* FPR/VSX register for DImode direct moves. */
 
13687
+  RS6000_CONSTRAINT_wk,                /* FPR/VSX register for DFmode direct moves. */
 
13688
   RS6000_CONSTRAINT_wl,                /* FPR register for LFIWAX */
 
13689
   RS6000_CONSTRAINT_wm,                /* VSX register for direct move */
 
13690
   RS6000_CONSTRAINT_wr,                /* GPR register if 64-bit  */
 
13691
@@ -1462,6 +1466,9 @@
 
13692
 #define VSX_REG_CLASS_P(CLASS)                 \
 
13693
   ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
 
13694
 
 
13695
+/* Return whether a given register class targets general purpose registers.  */
 
13696
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
 
13697
+
 
13698
 /* Given an rtx X being reloaded into a reg required to be
 
13699
    in class CLASS, return the class of reg to actually use.
 
13700
    In general this is just CLASS; but on some machines
 
13701
@@ -1593,8 +1600,15 @@
 
13702
 /* Define this if stack space is still allocated for a parameter passed
 
13703
    in a register.  The value is the number of bytes allocated to this
 
13704
    area.  */
 
13705
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
 
13706
+#define REG_PARM_STACK_SPACE(FNDECL) \
 
13707
+  rs6000_reg_parm_stack_space ((FNDECL), false)
 
13708
 
 
13709
+/* Define this macro if space guaranteed when compiling a function body
 
13710
+   is different to space required when making a call, a situation that
 
13711
+   can arise with K&R style function definitions.  */
 
13712
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
 
13713
+  rs6000_reg_parm_stack_space ((FNDECL), true)
 
13714
+
 
13715
 /* Define this if the above stack space is to be considered part of the
 
13716
    space allocated by the caller.  */
 
13717
 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
 
13718
@@ -2483,8 +2497,8 @@
 
13719
 #define RS6000_BTC_SAT         RS6000_BTC_MISC /* saturate sets VSCR.  */
 
13720
 
 
13721
 /* Builtin targets.  For now, we reuse the masks for those options that are in
 
13722
-   target flags, and pick two random bits for SPE and paired which aren't in
 
13723
-   target_flags.  */
 
13724
+   target flags, and pick three random bits for SPE, paired and ldbl128 which
 
13725
+   aren't in target_flags.  */
 
13726
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
 
13727
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
 
13728
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
 
13729
@@ -2501,6 +2515,7 @@
 
13730
 #define RS6000_BTM_CELL                MASK_FPRND      /* Target is cell powerpc.  */
 
13731
 #define RS6000_BTM_DFP         MASK_DFP        /* Decimal floating point.  */
 
13732
 #define RS6000_BTM_HARD_FLOAT  MASK_SOFT_FLOAT /* Hardware floating point.  */
 
13733
+#define RS6000_BTM_LDBL128     MASK_MULTIPLE   /* 128-bit long double.  */
 
13734
 
 
13735
 #define RS6000_BTM_COMMON      (RS6000_BTM_ALTIVEC                     \
 
13736
                                 | RS6000_BTM_VSX                       \
 
13737
@@ -2514,7 +2529,8 @@
 
13738
                                 | RS6000_BTM_POPCNTD                   \
 
13739
                                 | RS6000_BTM_CELL                      \
 
13740
                                 | RS6000_BTM_DFP                       \
 
13741
-                                | RS6000_BTM_HARD_FLOAT)
 
13742
+                                | RS6000_BTM_HARD_FLOAT                \
 
13743
+                                | RS6000_BTM_LDBL128)
 
13744
 
 
13745
 /* Define builtin enum index.  */
 
13746
 
 
13747
Index: gcc/config/rs6000/altivec.md
 
13748
===================================================================
 
13749
--- a/src/gcc/config/rs6000/altivec.md  (.../tags/gcc_4_8_3_release)
 
13750
+++ b/src/gcc/config/rs6000/altivec.md  (.../branches/gcc-4_8-branch)
 
13751
@@ -2297,7 +2297,31 @@
 
13752
   "dststt %0,%1,%2"
 
13753
   [(set_attr "type" "vecsimple")])
 
13754
 
 
13755
-(define_insn "altivec_lvsl"
 
13756
+(define_expand "altivec_lvsl"
 
13757
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
13758
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
13759
+  "TARGET_ALTIVEC"
 
13760
+{
 
13761
+  if (VECTOR_ELT_ORDER_BIG)
 
13762
+    emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
 
13763
+  else
 
13764
+    {
 
13765
+      int i;
 
13766
+      rtx mask, perm[16], constv, vperm;
 
13767
+      mask = gen_reg_rtx (V16QImode);
 
13768
+      emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
 
13769
+      for (i = 0; i < 16; ++i)
 
13770
+        perm[i] = GEN_INT (i);
 
13771
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
13772
+      constv = force_reg (V16QImode, constv);
 
13773
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
13774
+                              UNSPEC_VPERM);
 
13775
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
13776
+    }
 
13777
+  DONE;
 
13778
+})
 
13779
+
 
13780
+(define_insn "altivec_lvsl_direct"
 
13781
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
13782
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
13783
                      UNSPEC_LVSL))]
 
13784
@@ -2305,7 +2329,31 @@
 
13785
   "lvsl %0,%y1"
 
13786
   [(set_attr "type" "vecload")])
 
13787
 
 
13788
-(define_insn "altivec_lvsr"
 
13789
+(define_expand "altivec_lvsr"
 
13790
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
13791
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
13792
+  "TARGET_ALTIVEC"
 
13793
+{
 
13794
+  if (VECTOR_ELT_ORDER_BIG)
 
13795
+    emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
 
13796
+  else
 
13797
+    {
 
13798
+      int i;
 
13799
+      rtx mask, perm[16], constv, vperm;
 
13800
+      mask = gen_reg_rtx (V16QImode);
 
13801
+      emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
 
13802
+      for (i = 0; i < 16; ++i)
 
13803
+        perm[i] = GEN_INT (i);
 
13804
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
13805
+      constv = force_reg (V16QImode, constv);
 
13806
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
13807
+                              UNSPEC_VPERM);
 
13808
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
13809
+    }
 
13810
+  DONE;
 
13811
+})
 
13812
+
 
13813
+(define_insn "altivec_lvsr_direct"
 
13814
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
13815
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
13816
                      UNSPEC_LVSR))]
 
13817
Index: gcc/config/rs6000/rs6000.md
 
13818
===================================================================
 
13819
--- a/src/gcc/config/rs6000/rs6000.md   (.../tags/gcc_4_8_3_release)
 
13820
+++ b/src/gcc/config/rs6000/rs6000.md   (.../branches/gcc-4_8-branch)
 
13821
@@ -134,6 +134,7 @@
 
13822
    UNSPEC_UNPACK_128BIT
 
13823
    UNSPEC_PACK_128BIT
 
13824
    UNSPEC_LSQ
 
13825
+   UNSPEC_FUSION_GPR
 
13826
   ])
 
13827
 
 
13828
 ;;
 
13829
@@ -317,8 +318,25 @@
 
13830
 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0")  (SD "stxsiwzx %x1,%y0")])
 
13831
 
 
13832
 ; Definitions for 32-bit fpr direct move
 
13833
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
 
13834
+; At present, the decimal modes are not allowed in the traditional altivec
 
13835
+; registers, so restrict the constraints to just the traditional FPRs.
 
13836
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
 
13837
 
 
13838
+; Definitions for 32-bit VSX
 
13839
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
 
13840
+
 
13841
+; Definitions for 32-bit use of altivec registers
 
13842
+(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
 
13843
+
 
13844
+; Definitions for 64-bit VSX
 
13845
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
 
13846
+
 
13847
+; Definitions for 64-bit direct move
 
13848
+(define_mode_attr f64_dm  [(DF "wk") (DD "wh")])
 
13849
+
 
13850
+; Definitions for 64-bit use of altivec registers
 
13851
+(define_mode_attr f64_av  [(DF "wv") (DD "wn")])
 
13852
+
 
13853
 ; These modes do not fit in integer registers in 32-bit mode.
 
13854
 ; but on e500v2, the gpr are 64 bit registers
 
13855
 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
 
13856
@@ -424,7 +442,7 @@
 
13857
 ;; either.
 
13858
 
 
13859
 ;; Mode attribute for boolean operation register constraints for output
 
13860
-(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wa,v")
 
13861
+(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wt,v")
 
13862
                                         (PTI   "&r,r,r")
 
13863
                                         (V16QI "wa,v,&?r,?r,?r")
 
13864
                                         (V8HI  "wa,v,&?r,?r,?r")
 
13865
@@ -435,7 +453,7 @@
 
13866
                                         (V1TI  "wa,v,&?r,?r,?r")])
 
13867
 
 
13868
 ;; Mode attribute for boolean operation register constraints for operand1
 
13869
-(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wa,v")
 
13870
+(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wt,v")
 
13871
                                         (PTI   "r,0,r")
 
13872
                                         (V16QI "wa,v,r,0,r")
 
13873
                                         (V8HI  "wa,v,r,0,r")
 
13874
@@ -446,7 +464,7 @@
 
13875
                                         (V1TI  "wa,v,r,0,r")])
 
13876
 
 
13877
 ;; Mode attribute for boolean operation register constraints for operand2
 
13878
-(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wa,v")
 
13879
+(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wt,v")
 
13880
                                         (PTI   "r,r,0")
 
13881
                                         (V16QI "wa,v,r,r,0")
 
13882
                                         (V8HI  "wa,v,r,r,0")
 
13883
@@ -459,7 +477,7 @@
 
13884
 ;; Mode attribute for boolean operation register constraints for operand1
 
13885
 ;; for one_cmpl.  To simplify things, we repeat the constraint where 0
 
13886
 ;; is used for operand1 or operand2
 
13887
-(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wa,v")
 
13888
+(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wt,v")
 
13889
                                         (PTI   "r,0,0")
 
13890
                                         (V16QI "wa,v,r,0,0")
 
13891
                                         (V8HI  "wa,v,r,0,0")
 
13892
@@ -566,7 +584,7 @@
 
13893
   "")
 
13894
 
 
13895
 (define_insn "*zero_extendsidi2_lfiwzx"
 
13896
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
 
13897
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
 
13898
        (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
 
13899
   "TARGET_POWERPC64 && TARGET_LFIWZX"
 
13900
   "@
 
13901
@@ -736,8 +754,8 @@
 
13902
   "")
 
13903
 
 
13904
 (define_insn "*extendsidi2_lfiwax"
 
13905
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
 
13906
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
 
13907
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
 
13908
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
 
13909
   "TARGET_POWERPC64 && TARGET_LFIWAX"
 
13910
   "@
 
13911
    lwa%U1%X1 %0,%1
 
13912
@@ -760,7 +778,7 @@
 
13913
 
 
13914
 (define_insn "*extendsidi2_nocell"
 
13915
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 
13916
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
 
13917
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
 
13918
   "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
 
13919
   "@
 
13920
    lwa%U1%X1 %0,%1
 
13921
@@ -5614,7 +5632,7 @@
 
13922
 ; We don't define lfiwax/lfiwzx with the normal definition, because we
 
13923
 ; don't want to support putting SImode in FPR registers.
 
13924
 (define_insn "lfiwax"
 
13925
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
13926
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
13927
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
13928
                   UNSPEC_LFIWAX))]
 
13929
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
 
13930
@@ -5694,7 +5712,7 @@
 
13931
    (set_attr "type" "fpload")])
 
13932
 
 
13933
 (define_insn "lfiwzx"
 
13934
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
13935
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
13936
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
13937
                   UNSPEC_LFIWZX))]
 
13938
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
 
13939
@@ -9210,8 +9228,8 @@
 
13940
 }")
 
13941
 
 
13942
 (define_insn "mov<mode>_hardfloat"
 
13943
-  [(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")
 
13944
-       (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"))]
 
13945
+  [(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")
 
13946
+       (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"))]
 
13947
   "(gpc_reg_operand (operands[0], <MODE>mode)
 
13948
    || gpc_reg_operand (operands[1], <MODE>mode))
 
13949
    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
 
13950
@@ -9422,8 +9440,8 @@
 
13951
 ;; reloading.
 
13952
 
 
13953
 (define_insn "*mov<mode>_hardfloat32"
 
13954
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
 
13955
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
 
13956
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
 
13957
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
 
13958
   "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
 
13959
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
13960
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
13961
@@ -9491,8 +9509,8 @@
 
13962
 ; ld/std require word-aligned displacements -> 'Y' constraint.
 
13963
 ; List Y->r and r->Y before r->r for reload.
 
13964
 (define_insn "*mov<mode>_hardfloat64"
 
13965
-  [(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")
 
13966
-       (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"))]
 
13967
+  [(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>")
 
13968
+       (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"))]
 
13969
   "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
13970
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
13971
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
13972
@@ -10272,8 +10290,8 @@
 
13973
 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
 
13974
 
 
13975
 (define_insn "*movdi_internal64"
 
13976
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
 
13977
-       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
 
13978
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
 
13979
+       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
 
13980
   "TARGET_POWERPC64
 
13981
    && (gpc_reg_operand (operands[0], DImode)
 
13982
        || gpc_reg_operand (operands[1], DImode))"
 
13983
@@ -10293,7 +10311,8 @@
 
13984
    mftgpr %0,%1
 
13985
    mffgpr %0,%1
 
13986
    mfvsrd %0,%x1
 
13987
-   mtvsrd %x0,%1"
 
13988
+   mtvsrd %x0,%1
 
13989
+   xxlxor %x0,%x0,%x0"
 
13990
   [(set_attr_alternative "type"
 
13991
       [(if_then_else
 
13992
         (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
 
13993
@@ -10334,8 +10353,9 @@
 
13994
        (const_string "mftgpr")
 
13995
        (const_string "mffgpr")
 
13996
        (const_string "mftgpr")
 
13997
-       (const_string "mffgpr")])
 
13998
-   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
 
13999
+       (const_string "mffgpr")
 
14000
+       (const_string "vecsimple")])
 
14001
+   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
 
14002
 
 
14003
 ;; immediate value valid for a single instruction hiding in a const_double
 
14004
 (define_insn ""
 
14005
@@ -15751,23 +15771,10 @@
 
14006
 ;; a GPR.  The addis instruction must be adjacent to the load, and use the same
 
14007
 ;; register that is being loaded.  The fused ops must be physically adjacent.
 
14008
 
 
14009
-;; We use define_peephole for the actual addis/load, and the register used to
 
14010
-;; hold the addis value must be the same as the register being loaded.  We use
 
14011
-;; define_peephole2 to change the register used for addis to be the register
 
14012
-;; being loaded, since we can look at whether it is dead after the load insn.
 
14013
+;; Find cases where the addis that feeds into a load instruction is either used
 
14014
+;; once or is the same as the target register, and replace it with the fusion
 
14015
+;; insn
 
14016
 
 
14017
-(define_peephole
 
14018
-  [(set (match_operand:P 0 "base_reg_operand" "")
 
14019
-       (match_operand:P 1 "fusion_gpr_addis" ""))
 
14020
-   (set (match_operand:INT1 2 "base_reg_operand" "")
 
14021
-       (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
14022
-  "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
 
14023
-{
 
14024
-  return emit_fusion_gpr_load (operands);
 
14025
-}
 
14026
-  [(set_attr "type" "load")
 
14027
-   (set_attr "length" "8")])
 
14028
-
 
14029
 (define_peephole2
 
14030
   [(set (match_operand:P 0 "base_reg_operand" "")
 
14031
        (match_operand:P 1 "fusion_gpr_addis" ""))
 
14032
@@ -15774,9 +15781,8 @@
 
14033
    (set (match_operand:INT1 2 "base_reg_operand" "")
 
14034
        (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
14035
   "TARGET_P8_FUSION
 
14036
-   && (REGNO (operands[0]) != REGNO (operands[2])
 
14037
-       || GET_CODE (operands[3]) == SIGN_EXTEND)
 
14038
-   && fusion_gpr_load_p (operands, true)"
 
14039
+   && fusion_gpr_load_p (operands[0], operands[1], operands[2],
 
14040
+                        operands[3])"
 
14041
   [(const_int 0)]
 
14042
 {
 
14043
   expand_fusion_gpr_load (operands);
 
14044
@@ -15783,6 +15789,20 @@
 
14045
   DONE;
 
14046
 })
 
14047
 
 
14048
+;; Fusion insn, created by the define_peephole2 above (and eventually by
 
14049
+;; reload)
 
14050
+
 
14051
+(define_insn "fusion_gpr_load_<mode>"
 
14052
+  [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
 
14053
+       (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
 
14054
+                    UNSPEC_FUSION_GPR))]
 
14055
+  "TARGET_P8_FUSION"
 
14056
+{
 
14057
+  return emit_fusion_gpr_load (operands[0], operands[1]);
 
14058
+}
 
14059
+  [(set_attr "type" "load")
 
14060
+   (set_attr "length" "8")])
 
14061
+
 
14062
 
 
14063
 ;; Miscellaneous ISA 2.06 (power7) instructions
 
14064
 (define_insn "addg6s"
 
14065
@@ -15847,26 +15867,6 @@
 
14066
   ""
 
14067
   "")
 
14068
 
 
14069
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
 
14070
-;; and __builtin_longdouble_dw1 to optimize glibc.  Add support for these
 
14071
-;; builtins here.
 
14072
-
 
14073
-(define_expand "unpacktf_0"
 
14074
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
14075
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
14076
-                   (const_int 0)]
 
14077
-        UNSPEC_UNPACK_128BIT))]
 
14078
-  ""
 
14079
-  "")
 
14080
-
 
14081
-(define_expand "unpacktf_1"
 
14082
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
14083
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
14084
-                   (const_int 1)]
 
14085
-        UNSPEC_UNPACK_128BIT))]
 
14086
-  ""
 
14087
-  "")
 
14088
-
 
14089
 (define_insn_and_split "unpack<mode>_dm"
 
14090
   [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
 
14091
        (unspec:<FP128_64>
 
14092
Index: gcc/config/rs6000/sysv4.h
 
14093
===================================================================
 
14094
--- a/src/gcc/config/rs6000/sysv4.h     (.../tags/gcc_4_8_3_release)
 
14095
+++ b/src/gcc/config/rs6000/sysv4.h     (.../branches/gcc-4_8-branch)
 
14096
@@ -292,7 +292,7 @@
 
14097
 /* An expression for the alignment of a structure field FIELD if the
 
14098
    alignment computed in the usual way is COMPUTED.  */
 
14099
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                  \
 
14100
-       ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
14101
+       (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))            \
 
14102
         ? 128 : COMPUTED)
 
14103
 
 
14104
 #undef  BIGGEST_FIELD_ALIGNMENT
 
14105
@@ -949,3 +949,27 @@
 
14106
 #define TARGET_USES_SYSV4_OPT 1
 
14107
 
 
14108
 #undef DBX_REGISTER_NUMBER
 
14109
+
 
14110
+/* Link -lasan early on the command line.  For -static-libasan, don't link
 
14111
+   it for -shared link, the executable should be compiled with -static-libasan
 
14112
+   in that case, and for executable link link with --{,no-}whole-archive around
 
14113
+   it to force everything into the executable.  And similarly for -ltsan.  */
 
14114
+#if defined(HAVE_LD_STATIC_DYNAMIC)
 
14115
+#undef LIBASAN_EARLY_SPEC
 
14116
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
 
14117
+  "%{static-libasan:%{!shared:" \
 
14118
+  LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
 
14119
+  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
 
14120
+#undef LIBTSAN_EARLY_SPEC
 
14121
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
 
14122
+  LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
 
14123
+  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
 
14124
+#endif
 
14125
+
 
14126
+/* Additional libraries needed by -static-libasan.  */
 
14127
+#undef STATIC_LIBASAN_LIBS
 
14128
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
 
14129
+
 
14130
+/* Additional libraries needed by -static-libtsan.  */
 
14131
+#undef STATIC_LIBTSAN_LIBS
 
14132
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
 
14133
Index: gcc/config/arm/arm.c
 
14134
===================================================================
 
14135
--- a/src/gcc/config/arm/arm.c  (.../tags/gcc_4_8_3_release)
 
14136
+++ b/src/gcc/config/arm/arm.c  (.../branches/gcc-4_8-branch)
 
14137
@@ -82,7 +82,6 @@
 
14138
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
 
14139
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
 
14140
 inline static int thumb1_index_register_rtx_p (rtx, int);
 
14141
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
14142
 static int thumb_far_jump_used_p (void);
 
14143
 static bool thumb_force_lr_save (void);
 
14144
 static unsigned arm_size_return_regs (void);
 
14145
@@ -24476,9 +24475,13 @@
 
14146
       fputs (":\n", file);
 
14147
       if (flag_pic)
 
14148
        {
 
14149
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 
14150
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
 
14151
          rtx tem = XEXP (DECL_RTL (function), 0);
 
14152
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
 
14153
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
 
14154
+            pipeline offset is four rather than eight.  Adjust the offset
 
14155
+            accordingly.  */
 
14156
+         tem = plus_constant (GET_MODE (tem), tem,
 
14157
+                              TARGET_THUMB1_ONLY ? -3 : -7);
 
14158
          tem = gen_rtx_MINUS (GET_MODE (tem),
 
14159
                               tem,
 
14160
                               gen_rtx_SYMBOL_REF (Pmode,
 
14161
@@ -27462,4 +27465,13 @@
 
14162
 
 
14163
 }
 
14164
 
 
14165
+/* return TRUE if x is a reference to a value in a constant pool */
 
14166
+extern bool
 
14167
+arm_is_constant_pool_ref (rtx x)
 
14168
+{
 
14169
+  return (MEM_P (x)
 
14170
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
 
14171
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
 
14172
+}
 
14173
+
 
14174
 #include "gt-arm.h"
 
14175
Index: gcc/config/arm/arm.h
 
14176
===================================================================
 
14177
--- a/src/gcc/config/arm/arm.h  (.../tags/gcc_4_8_3_release)
 
14178
+++ b/src/gcc/config/arm/arm.h  (.../branches/gcc-4_8-branch)
 
14179
@@ -2082,9 +2082,10 @@
 
14180
    ? reverse_condition_maybe_unordered (code) \
 
14181
    : reverse_condition (code))
 
14182
 
 
14183
-/* The arm5 clz instruction returns 32.  */
 
14184
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
14185
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
14186
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
14187
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
14188
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
14189
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
14190
 
 
14191
 #define CC_STATUS_INIT \
 
14192
   do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
 
14193
Index: gcc/config/arm/arm-protos.h
 
14194
===================================================================
 
14195
--- a/src/gcc/config/arm/arm-protos.h   (.../tags/gcc_4_8_3_release)
 
14196
+++ b/src/gcc/config/arm/arm-protos.h   (.../branches/gcc-4_8-branch)
 
14197
@@ -55,6 +55,7 @@
 
14198
 extern int legitimate_pic_operand_p (rtx);
 
14199
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 
14200
 extern rtx legitimize_tls_address (rtx, rtx);
 
14201
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
14202
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
 
14203
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
 
14204
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
 
14205
@@ -286,4 +287,6 @@
 
14206
 
 
14207
 extern void arm_emit_eabi_attribute (const char *, int, int);
 
14208
 
 
14209
+extern bool arm_is_constant_pool_ref (rtx);
 
14210
+
 
14211
 #endif /* ! GCC_ARM_PROTOS_H */
 
14212
Index: gcc/config/arm/constraints.md
 
14213
===================================================================
 
14214
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
 
14215
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
 
14216
@@ -36,7 +36,7 @@
 
14217
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
 
14218
 
 
14219
 ;; The following memory constraints have been used:
 
14220
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
 
14221
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
 
14222
 ;; in ARM state: Uq
 
14223
 ;; in Thumb state: Uu, Uw
 
14224
 
 
14225
@@ -310,6 +310,12 @@
 
14226
   An address valid for loading/storing register exclusive"
 
14227
  (match_operand 0 "mem_noofs_operand"))
 
14228
 
 
14229
+(define_memory_constraint "Uh"
 
14230
+ "@internal
 
14231
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
 
14232
+ (and (match_code "mem")
 
14233
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
 
14234
+
 
14235
 (define_memory_constraint "Ut"
 
14236
  "@internal
 
14237
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
 
14238
@@ -356,7 +362,8 @@
 
14239
  (and (match_code "mem")
 
14240
       (match_test "TARGET_ARM
 
14241
                   && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
 
14242
-                                                     SIGN_EXTEND, 0)")))
 
14243
+                                                     SIGN_EXTEND, 0)
 
14244
+                  && !arm_is_constant_pool_ref (op)")))
 
14245
 
 
14246
 (define_memory_constraint "Q"
 
14247
  "@internal
 
14248
Index: gcc/config/arm/arm.md
 
14249
===================================================================
 
14250
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
 
14251
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
 
14252
@@ -92,9 +92,11 @@
 
14253
 ; This can be "a" for ARM, "t" for either of the Thumbs, "32" for
 
14254
 ; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode.  "v6"
 
14255
 ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
 
14256
-; arm_arch6.  This attribute is used to compute attribute "enabled",
 
14257
-; use type "any" to enable an alternative in all cases.
 
14258
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
 
14259
+; arm_arch6.  "v6t2" for Thumb-2 with arm_arch6.  This attribute is
 
14260
+; used to compute attribute "enabled", use type "any" to enable an
 
14261
+; alternative in all cases.
 
14262
+
 
14263
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
 
14264
   (const_string "any"))
 
14265
 
 
14266
 (define_attr "arch_enabled" "no,yes"
 
14267
@@ -129,6 +131,10 @@
 
14268
              (match_test "TARGET_32BIT && !arm_arch6"))
 
14269
         (const_string "yes")
 
14270
 
 
14271
+        (and (eq_attr "arch" "v6t2")
 
14272
+             (match_test "TARGET_32BIT && arm_arch6 && arm_arch_thumb2"))
 
14273
+        (const_string "yes")
 
14274
+
 
14275
         (and (eq_attr "arch" "onlya8")
 
14276
              (eq_attr "tune" "cortexa8"))
 
14277
         (const_string "yes")
 
14278
@@ -4047,7 +4053,7 @@
 
14279
 (define_insn "unaligned_loadhis"
 
14280
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
 
14281
        (sign_extend:SI
 
14282
-         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 
14283
+         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
 
14284
                     UNSPEC_UNALIGNED_LOAD)))]
 
14285
   "unaligned_access && TARGET_32BIT"
 
14286
   "ldr%(sh%)\t%0, %1\t@ unaligned"
 
14287
@@ -4655,7 +4661,7 @@
 
14288
 
 
14289
 (define_insn "*arm_zero_extendhisi2_v6"
 
14290
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
14291
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
14292
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
14293
   "TARGET_ARM && arm_arch6"
 
14294
   "@
 
14295
    uxth%?\\t%0, %1
 
14296
@@ -4748,7 +4754,7 @@
 
14297
 
 
14298
 (define_insn "*arm_zero_extendqisi2_v6"
 
14299
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
14300
-       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
 
14301
+       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
 
14302
   "TARGET_ARM && arm_arch6"
 
14303
   "@
 
14304
    uxtb%(%)\\t%0, %1
 
14305
@@ -4980,7 +4986,7 @@
 
14306
 
 
14307
 (define_insn "*arm_extendhisi2"
 
14308
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
14309
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
14310
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
14311
   "TARGET_ARM && arm_arch4 && !arm_arch6"
 
14312
   "@
 
14313
    #
 
14314
@@ -4987,23 +4993,19 @@
 
14315
    ldr%(sh%)\\t%0, %1"
 
14316
   [(set_attr "length" "8,4")
 
14317
    (set_attr "type" "alu_shift,load_byte")
 
14318
-   (set_attr "predicable" "yes")
 
14319
-   (set_attr "pool_range" "*,256")
 
14320
-   (set_attr "neg_pool_range" "*,244")]
 
14321
+   (set_attr "predicable" "yes")]
 
14322
 )
 
14323
 
 
14324
 ;; ??? Check Thumb-2 pool range
 
14325
 (define_insn "*arm_extendhisi2_v6"
 
14326
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
14327
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
14328
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
14329
   "TARGET_32BIT && arm_arch6"
 
14330
   "@
 
14331
    sxth%?\\t%0, %1
 
14332
    ldr%(sh%)\\t%0, %1"
 
14333
   [(set_attr "type" "simple_alu_shift,load_byte")
 
14334
-   (set_attr "predicable" "yes")
 
14335
-   (set_attr "pool_range" "*,256")
 
14336
-   (set_attr "neg_pool_range" "*,244")]
 
14337
+   (set_attr "predicable" "yes")]
 
14338
 )
 
14339
 
 
14340
 (define_insn "*arm_extendhisi2addsi"
 
14341
@@ -5045,9 +5047,7 @@
 
14342
   "TARGET_ARM && arm_arch4"
 
14343
   "ldr%(sb%)\\t%0, %1"
 
14344
   [(set_attr "type" "load_byte")
 
14345
-   (set_attr "predicable" "yes")
 
14346
-   (set_attr "pool_range" "256")
 
14347
-   (set_attr "neg_pool_range" "244")]
 
14348
+   (set_attr "predicable" "yes")]
 
14349
 )
 
14350
 
 
14351
 (define_expand "extendqisi2"
 
14352
@@ -5087,9 +5087,7 @@
 
14353
    ldr%(sb%)\\t%0, %1"
 
14354
   [(set_attr "length" "8,4")
 
14355
    (set_attr "type" "alu_shift,load_byte")
 
14356
-   (set_attr "predicable" "yes")
 
14357
-   (set_attr "pool_range" "*,256")
 
14358
-   (set_attr "neg_pool_range" "*,244")]
 
14359
+   (set_attr "predicable" "yes")]
 
14360
 )
 
14361
 
 
14362
 (define_insn "*arm_extendqisi_v6"
 
14363
@@ -5101,9 +5099,7 @@
 
14364
    sxtb%?\\t%0, %1
 
14365
    ldr%(sb%)\\t%0, %1"
 
14366
   [(set_attr "type" "simple_alu_shift,load_byte")
 
14367
-   (set_attr "predicable" "yes")
 
14368
-   (set_attr "pool_range" "*,256")
 
14369
-   (set_attr "neg_pool_range" "*,244")]
 
14370
+   (set_attr "predicable" "yes")]
 
14371
 )
 
14372
 
 
14373
 (define_insn "*arm_extendqisi2addsi"
 
14374
@@ -6292,8 +6288,8 @@
 
14375
 
 
14376
 ;; Pattern to recognize insn generated default case above
 
14377
 (define_insn "*movhi_insn_arch4"
 
14378
-  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r")
 
14379
-       (match_operand:HI 1 "general_operand"      "rI,K,r,mi"))]
 
14380
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,r")
 
14381
+       (match_operand:HI 1 "general_operand"      "rI,K,n,r,mi"))]
 
14382
   "TARGET_ARM
 
14383
    && arm_arch4
 
14384
    && (register_operand (operands[0], HImode)
 
14385
@@ -6301,17 +6297,20 @@
 
14386
   "@
 
14387
    mov%?\\t%0, %1\\t%@ movhi
 
14388
    mvn%?\\t%0, #%B1\\t%@ movhi
 
14389
+   movw%?\\t%0, %L1\\t%@ movhi
 
14390
    str%(h%)\\t%1, %0\\t%@ movhi
 
14391
    ldr%(h%)\\t%0, %1\\t%@ movhi"
 
14392
   [(set_attr "predicable" "yes")
 
14393
-   (set_attr "insn" "mov,mvn,*,*")
 
14394
-   (set_attr "pool_range" "*,*,*,256")
 
14395
-   (set_attr "neg_pool_range" "*,*,*,244")
 
14396
+   (set_attr "insn" "mov,mvn,mov,*,*")
 
14397
+   (set_attr "pool_range" "*,*,*,*,256")
 
14398
+   (set_attr "neg_pool_range" "*,*,*,*,244")
 
14399
+   (set_attr "arch" "*,*,v6t2,*,*")
 
14400
    (set_attr_alternative "type"
 
14401
                          [(if_then_else (match_operand 1 "const_int_operand" "")
 
14402
                                         (const_string "simple_alu_imm" )
 
14403
                                         (const_string "*"))
 
14404
                           (const_string "simple_alu_imm")
 
14405
+                          (const_string "simple_alu_imm")
 
14406
                           (const_string "store1")
 
14407
                           (const_string "load1")])]
 
14408
 )
 
14409
@@ -7630,12 +7629,13 @@
 
14410
 
 
14411
 (define_insn "*arm_cmpdi_unsigned"
 
14412
   [(set (reg:CC_CZ CC_REGNUM)
 
14413
-       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
 
14414
-                      (match_operand:DI 1 "arm_di_operand"     "rDi")))]
 
14415
+       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
 
14416
+                      (match_operand:DI 1 "arm_di_operand"     "rDi,rDi")))]
 
14417
   "TARGET_32BIT"
 
14418
   "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
 
14419
   [(set_attr "conds" "set")
 
14420
-   (set_attr "length" "8")]
 
14421
+   (set_attr "arch" "a,t2")
 
14422
+   (set_attr "length" "8,10")]
 
14423
 )
 
14424
 
 
14425
 (define_insn "*arm_cmpdi_zero"
 
14426
Index: gcc/config/arm/t-rtems-eabi
 
14427
===================================================================
 
14428
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_8_3_release)
 
14429
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_8-branch)
 
14430
@@ -1,47 +1,167 @@
 
14431
 # Custom RTEMS EABI multilibs
 
14432
 
 
14433
-MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
 
14434
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
 
14435
+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
 
14436
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
 
14437
 
 
14438
 # Enumeration of multilibs
 
14439
 
 
14440
 MULTILIB_EXCEPTIONS =
 
14441
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
14442
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
 
14443
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14444
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
 
14445
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14446
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
14447
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
 
14448
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
 
14449
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
14450
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
 
14451
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
14452
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
 
14453
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14454
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
14455
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
 
14456
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
 
14457
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
14458
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
 
14459
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
14460
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
 
14461
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14462
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
14463
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
 
14464
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
 
14465
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
14466
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
 
14467
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14468
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
 
14469
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14470
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
14471
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
 
14472
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
 
14473
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
 
14474
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
 
14475
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
14476
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
 
14477
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14478
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
 
14479
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
 
14480
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
 
14481
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
14482
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
 
14483
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14484
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
 
14485
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14486
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
 
14487
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
 
14488
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
 
14489
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
14490
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
 
14491
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
14492
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
 
14493
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14494
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
 
14495
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
 
14496
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
 
14497
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
14498
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
 
14499
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
14500
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
 
14501
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14502
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
 
14503
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
 
14504
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
 
14505
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
14506
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
 
14507
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14508
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
 
14509
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14510
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
 
14511
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
 
14512
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
 
14513
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
 
14514
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
 
14515
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
 
14516
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
 
14517
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14518
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
 
14519
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
 
14520
+MULTILIB_EXCEPTIONS += mbig-endian
 
14521
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
14522
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
 
14523
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14524
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
 
14525
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14526
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
14527
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
 
14528
 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
 
14529
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
14530
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
 
14531
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
14532
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
 
14533
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14534
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
14535
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
 
14536
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
 
14537
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
14538
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
 
14539
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
14540
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
 
14541
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14542
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
14543
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
 
14544
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
 
14545
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
14546
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
 
14547
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14548
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
 
14549
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14550
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
14551
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
 
14552
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
 
14553
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
 
14554
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
 
14555
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
14556
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
 
14557
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14558
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
 
14559
 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
 
14560
 # MULTILIB_EXCEPTIONS += mthumb
 
14561
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
 
14562
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
 
14563
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14564
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
 
14565
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14566
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
 
14567
 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
 
14568
 MULTILIB_EXCEPTIONS += march=armv6-m
 
14569
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
 
14570
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
 
14571
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
14572
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
 
14573
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14574
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
 
14575
 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
 
14576
 MULTILIB_EXCEPTIONS += march=armv7-a
 
14577
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
 
14578
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
 
14579
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
14580
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
 
14581
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14582
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
 
14583
 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
 
14584
 MULTILIB_EXCEPTIONS += march=armv7-r
 
14585
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
 
14586
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
 
14587
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
14588
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
 
14589
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14590
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
 
14591
 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
 
14592
 MULTILIB_EXCEPTIONS += march=armv7-m
 
14593
 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
 
14594
 MULTILIB_EXCEPTIONS += mfpu=neon
 
14595
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
 
14596
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
 
14597
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
 
14598
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
 
14599
 MULTILIB_EXCEPTIONS += mfloat-abi=hard
 
14600
Index: gcc/config/pa/pa.md
 
14601
===================================================================
 
14602
--- a/src/gcc/config/pa/pa.md   (.../tags/gcc_4_8_3_release)
 
14603
+++ b/src/gcc/config/pa/pa.md   (.../branches/gcc-4_8-branch)
 
14604
@@ -123,7 +123,7 @@
 
14605
 ;; type "binary" insns have two input operands (1,2) and one output (0)
 
14606
 
 
14607
 (define_attr "type"
 
14608
-  "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"
 
14609
+  "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"
 
14610
   (const_string "binary"))
 
14611
 
 
14612
 (define_attr "pa_combine_type"
 
14613
@@ -166,7 +166,7 @@
 
14614
 ;; For conditional branches. Frame related instructions are not allowed
 
14615
 ;; because they confuse the unwind support.
 
14616
 (define_attr "in_branch_delay" "false,true"
 
14617
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
14618
+  (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")
 
14619
                     (eq_attr "length" "4")
 
14620
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
14621
                (const_string "true")
 
14622
@@ -175,7 +175,7 @@
 
14623
 ;; Disallow instructions which use the FPU since they will tie up the FPU
 
14624
 ;; even if the instruction is nullified.
 
14625
 (define_attr "in_nullified_branch_delay" "false,true"
 
14626
-  (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")
 
14627
+  (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")
 
14628
                     (eq_attr "length" "4")
 
14629
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
14630
                (const_string "true")
 
14631
@@ -184,7 +184,7 @@
 
14632
 ;; For calls and millicode calls.  Allow unconditional branches in the
 
14633
 ;; delay slot.
 
14634
 (define_attr "in_call_delay" "false,true"
 
14635
-  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
14636
+  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
 
14637
              (eq_attr "length" "4")
 
14638
              (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
14639
           (const_string "true")
 
14640
@@ -5331,6 +5331,15 @@
 
14641
   [(set_attr "type" "binary,binary")
 
14642
    (set_attr "length" "4,4")])
 
14643
 
 
14644
+;; Trap instructions.
 
14645
+
 
14646
+(define_insn "trap"
 
14647
+  [(trap_if (const_int 1) (const_int 0))]
 
14648
+  ""
 
14649
+  "{addit|addi,tc},<> 1,%%r0,%%r0"
 
14650
+  [(set_attr "type" "trap")
 
14651
+   (set_attr "length" "4")])
 
14652
+
 
14653
 ;; Clobbering a "register_operand" instead of a match_scratch
 
14654
 ;; in operand3 of millicode calls avoids spilling %r1 and
 
14655
 ;; produces better code.
 
14656
Index: gcc/config/pa/pa.c
 
14657
===================================================================
 
14658
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_8_3_release)
 
14659
+++ b/src/gcc/config/pa/pa.c    (.../branches/gcc-4_8-branch)
 
14660
@@ -3237,7 +3237,12 @@
 
14661
       && aligned_p
 
14662
       && function_label_operand (x, VOIDmode))
 
14663
     {
 
14664
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
 
14665
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
 
14666
+
 
14667
+      /* We don't want an OPD when generating fast indirect calls.  */
 
14668
+      if (!TARGET_FAST_INDIRECT_CALLS)
 
14669
+       fputs ("P%", asm_out_file);
 
14670
+
 
14671
       output_addr_const (asm_out_file, x);
 
14672
       fputc ('\n', asm_out_file);
 
14673
       return true;
 
14674
@@ -4160,9 +4165,8 @@
 
14675
 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 
14676
 {
 
14677
   rtx insn = get_last_insn ();
 
14678
+  bool extra_nop;
 
14679
 
 
14680
-  last_address = 0;
 
14681
-
 
14682
   /* pa_expand_epilogue does the dirty work now.  We just need
 
14683
      to output the assembler directives which denote the end
 
14684
      of a function.
 
14685
@@ -4185,14 +4189,16 @@
 
14686
   if (insn && GET_CODE (insn) == CALL_INSN)
 
14687
     {
 
14688
       fputs ("\tnop\n", file);
 
14689
-      last_address += 4;
 
14690
+      extra_nop = true;
 
14691
     }
 
14692
+  else
 
14693
+    extra_nop = false;
 
14694
 
 
14695
   fputs ("\t.EXIT\n\t.PROCEND\n", file);
 
14696
 
 
14697
   if (TARGET_SOM && TARGET_GAS)
 
14698
     {
 
14699
-      /* We done with this subspace except possibly for some additional
 
14700
+      /* We are done with this subspace except possibly for some additional
 
14701
         debug information.  Forget that we are in this subspace to ensure
 
14702
         that the next function is output in its own subspace.  */
 
14703
       in_section = NULL;
 
14704
@@ -4199,12 +4205,20 @@
 
14705
       cfun->machine->in_nsubspa = 2;
 
14706
     }
 
14707
 
 
14708
+  /* Thunks do their own insn accounting.  */
 
14709
+  if (cfun->is_thunk)
 
14710
+    return;
 
14711
+
 
14712
   if (INSN_ADDRESSES_SET_P ())
 
14713
     {
 
14714
+      last_address = extra_nop ? 4 : 0;
 
14715
       insn = get_last_nonnote_insn ();
 
14716
-      last_address += INSN_ADDRESSES (INSN_UID (insn));
 
14717
-      if (INSN_P (insn))
 
14718
-       last_address += insn_default_length (insn);
 
14719
+      if (insn)
 
14720
+       {
 
14721
+         last_address += INSN_ADDRESSES (INSN_UID (insn));
 
14722
+         if (INSN_P (insn))
 
14723
+           last_address += insn_default_length (insn);
 
14724
+       }
 
14725
       last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
 
14726
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
 
14727
     }
 
14728
@@ -8270,8 +8284,7 @@
 
14729
   xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
 
14730
   xoperands[2] = GEN_INT (delta);
 
14731
 
 
14732
-  ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
 
14733
-  fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
 
14734
+  final_start_function (emit_barrier (), file, 1);
 
14735
 
 
14736
   /* Output the thunk.  We know that the function is in the same
 
14737
      translation unit (i.e., the same space) as the thunk, and that
 
14738
@@ -8301,12 +8314,16 @@
 
14739
                   || ((DECL_SECTION_NAME (thunk_fndecl)
 
14740
                        == DECL_SECTION_NAME (function))
 
14741
                       && last_address < 262132)))
 
14742
+             /* In this case, we need to be able to reach the start of
 
14743
+                the stub table even though the function is likely closer
 
14744
+                and can be jumped to directly.  */
 
14745
              || (targetm_common.have_named_sections
 
14746
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
 
14747
                  && DECL_SECTION_NAME (function) == NULL
 
14748
-                 && last_address < 262132)
 
14749
+                 && total_code_bytes < MAX_PCREL17F_OFFSET)
 
14750
+             /* Likewise.  */
 
14751
              || (!targetm_common.have_named_sections
 
14752
-                 && last_address < 262132))))
 
14753
+                 && total_code_bytes < MAX_PCREL17F_OFFSET))))
 
14754
     {
 
14755
       if (!val_14)
 
14756
        output_asm_insn ("addil L'%2,%%r26", xoperands);
 
14757
@@ -8477,17 +8494,8 @@
 
14758
        }
 
14759
     }
 
14760
 
 
14761
-  fprintf (file, "\t.EXIT\n\t.PROCEND\n");
 
14762
+  final_end_function ();
 
14763
 
 
14764
-  if (TARGET_SOM && TARGET_GAS)
 
14765
-    {
 
14766
-      /* We done with this subspace except possibly for some additional
 
14767
-        debug information.  Forget that we are in this subspace to ensure
 
14768
-        that the next function is output in its own subspace.  */
 
14769
-      in_section = NULL;
 
14770
-      cfun->machine->in_nsubspa = 2;
 
14771
-    }
 
14772
-
 
14773
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
 
14774
     {
 
14775
       switch_to_section (data_section);
 
14776
Index: gcc/tree-vect-slp.c
 
14777
===================================================================
 
14778
--- a/src/gcc/tree-vect-slp.c   (.../tags/gcc_4_8_3_release)
 
14779
+++ b/src/gcc/tree-vect-slp.c   (.../branches/gcc-4_8-branch)
 
14780
@@ -1837,7 +1837,10 @@
 
14781
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
 
14782
            && !STMT_SLP_TYPE (stmt_vinfo)
 
14783
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
 
14784
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
 
14785
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
 
14786
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
 
14787
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
 
14788
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
 
14789
            && !(gimple_code (use_stmt) == GIMPLE_PHI
 
14790
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
 
14791
                   == vect_reduction_def))
 
14792
@@ -2377,13 +2380,21 @@
 
14793
             neutral_op = build_int_cst (TREE_TYPE (op), -1);
 
14794
             break;
 
14795
 
 
14796
-          case MAX_EXPR:
 
14797
-          case MIN_EXPR:
 
14798
-            def_stmt = SSA_NAME_DEF_STMT (op);
 
14799
-            loop = (gimple_bb (stmt))->loop_father;
 
14800
-            neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
14801
-                                                loop_preheader_edge (loop));
 
14802
-            break;
 
14803
+         /* For MIN/MAX we don't have an easy neutral operand but
 
14804
+            the initial values can be used fine here.  Only for
 
14805
+            a reduction chain we have to force a neutral element.  */
 
14806
+         case MAX_EXPR:
 
14807
+         case MIN_EXPR:
 
14808
+           if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
 
14809
+             neutral_op = NULL;
 
14810
+           else
 
14811
+             {
 
14812
+               def_stmt = SSA_NAME_DEF_STMT (op);
 
14813
+               loop = (gimple_bb (stmt))->loop_father;
 
14814
+               neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
14815
+                                                   loop_preheader_edge (loop));
 
14816
+             }
 
14817
+           break;
 
14818
 
 
14819
           default:
 
14820
             neutral_op = NULL;
 
14821
Index: gcc/convert.c
 
14822
===================================================================
 
14823
--- a/src/gcc/convert.c (.../tags/gcc_4_8_3_release)
 
14824
+++ b/src/gcc/convert.c (.../branches/gcc-4_8-branch)
 
14825
@@ -95,6 +95,15 @@
 
14826
   enum built_in_function fcode = builtin_mathfn_code (expr);
 
14827
   tree itype = TREE_TYPE (expr);
 
14828
 
 
14829
+  if (TREE_CODE (expr) == COMPOUND_EXPR)
 
14830
+    {
 
14831
+      tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
 
14832
+      if (t == TREE_OPERAND (expr, 1))
 
14833
+       return expr;
 
14834
+      return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
 
14835
+                        TREE_OPERAND (expr, 0), t);
 
14836
+    }    
 
14837
+
 
14838
   /* Disable until we figure out how to decide whether the functions are
 
14839
      present in runtime.  */
 
14840
   /* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
 
14841
@@ -366,6 +375,15 @@
 
14842
       return error_mark_node;
 
14843
     }
 
14844
 
 
14845
+  if (ex_form == COMPOUND_EXPR)
 
14846
+    {
 
14847
+      tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
 
14848
+      if (t == TREE_OPERAND (expr, 1))
 
14849
+       return expr;
 
14850
+      return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
 
14851
+                        TREE_OPERAND (expr, 0), t);
 
14852
+    }    
 
14853
+
 
14854
   /* Convert e.g. (long)round(d) -> lround(d).  */
 
14855
   /* If we're converting to char, we may encounter differing behavior
 
14856
      between converting from double->char vs double->long->char.
 
14857
@@ -854,6 +872,14 @@
 
14858
 
 
14859
        if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
 
14860
          return expr;
 
14861
+       else if (TREE_CODE (expr) == COMPOUND_EXPR)
 
14862
+         {
 
14863
+           tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
 
14864
+           if (t == TREE_OPERAND (expr, 1))
 
14865
+             return expr;
 
14866
+           return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
 
14867
+                              TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
 
14868
+         }    
 
14869
        else if (TREE_CODE (expr) == COMPLEX_EXPR)
 
14870
          return fold_build2 (COMPLEX_EXPR, type,
 
14871
                              convert (subtype, TREE_OPERAND (expr, 0)),
 
14872
Index: gcc/regcprop.c
 
14873
===================================================================
 
14874
--- a/src/gcc/regcprop.c        (.../tags/gcc_4_8_3_release)
 
14875
+++ b/src/gcc/regcprop.c        (.../branches/gcc-4_8-branch)
 
14876
@@ -1039,7 +1039,17 @@
 
14877
             but instead among CLOBBERs on the CALL_INSN, we could wrongly
 
14878
             assume the value in it is still live.  */
 
14879
          if (ksvd.ignore_set_reg)
 
14880
-           note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
14881
+           {
 
14882
+             note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
14883
+             for (exp = CALL_INSN_FUNCTION_USAGE (insn);
 
14884
+                  exp;
 
14885
+                  exp = XEXP (exp, 1))
 
14886
+               {
 
14887
+                 rtx x = XEXP (exp, 0);
 
14888
+                 if (GET_CODE (x) == CLOBBER)
 
14889
+                   kill_value (SET_DEST (x), vd);
 
14890
+               }
 
14891
+           }
 
14892
        }
 
14893
 
 
14894
       /* Notice stores.  */
 
14895
Index: gcc/graphite-interchange.c
 
14896
===================================================================
 
14897
--- a/src/gcc/graphite-interchange.c    (.../tags/gcc_4_8_3_release)
 
14898
+++ b/src/gcc/graphite-interchange.c    (.../branches/gcc-4_8-branch)
 
14899
@@ -31,7 +31,13 @@
 
14900
 #include <isl/ilp.h>
 
14901
 #include <cloog/cloog.h>
 
14902
 #include <cloog/isl/domain.h>
 
14903
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
 
14904
+#include <isl/deprecated/int.h>
 
14905
+#include <isl/deprecated/aff_int.h>
 
14906
+#include <isl/deprecated/ilp_int.h>
 
14907
+#include <isl/deprecated/constraint_int.h>
 
14908
 #endif
 
14909
+#endif
 
14910
 
 
14911
 #include "system.h"
 
14912
 #include "coretypes.h"
 
14913
Index: libobjc/encoding.c
 
14914
===================================================================
 
14915
--- a/src/libobjc/encoding.c    (.../tags/gcc_4_8_3_release)
 
14916
+++ b/src/libobjc/encoding.c    (.../branches/gcc-4_8-branch)
 
14917
@@ -192,6 +192,8 @@
 
14918
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
 
14919
    : MAX (COMPUTED, SPECIFIED));})
 
14920
 
 
14921
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
 
14922
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
 
14923
 
 
14924
 /* Skip a variable name, enclosed in quotes (").  */
 
14925
 static inline
 
14926
Index: libobjc/ChangeLog
 
14927
===================================================================
 
14928
--- a/src/libobjc/ChangeLog     (.../tags/gcc_4_8_3_release)
 
14929
+++ b/src/libobjc/ChangeLog     (.../branches/gcc-4_8-branch)
 
14930
@@ -1,3 +1,16 @@
 
14931
+2014-07-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
14932
+
 
14933
+       PR libobjc/61920
 
14934
+       * encoding.c (rs6000_special_adjust_field_align_p): Use definition
 
14935
+       that matches the 4.8 branch ABI.
 
14936
+
 
14937
+2014-07-27  Alan Modra  <amodra@gmail.com>
 
14938
+           Matthias Klose  <doko@ubuntu.com>
 
14939
+
 
14940
+       PR libobjc/61920
 
14941
+
 
14942
+       * encoding.c: Define rs6000_special_adjust_field_align_p.
 
14943
+
 
14944
 2014-05-22  Release Manager
 
14945
 
 
14946
        * GCC 4.8.3 released.
 
14947
Index: libgfortran/m4/in_pack.m4
 
14948
===================================================================
 
14949
--- a/src/libgfortran/m4/in_pack.m4     (.../tags/gcc_4_8_3_release)
 
14950
+++ b/src/libgfortran/m4/in_pack.m4     (.../branches/gcc-4_8-branch)
 
14951
@@ -79,7 +79,7 @@
 
14952
     return source->base_addr;
 
14953
 
 
14954
   /* Allocate storage for the destination.  */
 
14955
-  destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
 
14956
+  destptr = xmallocarray (ssize, sizeof ('rtype_name`));
 
14957
   dest = destptr;
 
14958
   src = source->base_addr;
 
14959
   stride0 = stride[0];
 
14960
Index: libgfortran/m4/pack.m4
 
14961
===================================================================
 
14962
--- a/src/libgfortran/m4/pack.m4        (.../tags/gcc_4_8_3_release)
 
14963
+++ b/src/libgfortran/m4/pack.m4        (.../branches/gcc-4_8-branch)
 
14964
@@ -168,8 +168,8 @@
 
14965
 
 
14966
          ret->offset = 0;
 
14967
 
 
14968
-         /* xmalloc allocates a single byte for zero size.  */
 
14969
-         ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
 
14970
+         /* xmallocarray allocates a single byte for zero size.  */
 
14971
+         ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
 
14972
 
 
14973
          if (total == 0)
 
14974
            return;
 
14975
Index: libgfortran/m4/spread.m4
 
14976
===================================================================
 
14977
--- a/src/libgfortran/m4/spread.m4      (.../tags/gcc_4_8_3_release)
 
14978
+++ b/src/libgfortran/m4/spread.m4      (.../branches/gcc-4_8-branch)
 
14979
@@ -102,8 +102,8 @@
 
14980
        }
 
14981
       ret->offset = 0;
 
14982
 
 
14983
-      /* xmalloc allocates a single byte for zero size.  */
 
14984
-      ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
 
14985
+      /* xmallocarray allocates a single byte for zero size.  */
 
14986
+      ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
 
14987
       if (rs <= 0)
 
14988
         return;
 
14989
     }
 
14990
@@ -245,7 +245,7 @@
 
14991
 
 
14992
   if (ret->base_addr == NULL)
 
14993
     {
 
14994
-      ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
 
14995
+      ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
 
14996
       ret->offset = 0;
 
14997
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14998
     }
 
14999
Index: libgfortran/m4/transpose.m4
 
15000
===================================================================
 
15001
--- a/src/libgfortran/m4/transpose.m4   (.../tags/gcc_4_8_3_release)
 
15002
+++ b/src/libgfortran/m4/transpose.m4   (.../branches/gcc-4_8-branch)
 
15003
@@ -61,7 +61,8 @@
 
15004
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15005
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15006
 
 
15007
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
 
15008
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
15009
+                                     sizeof ('rtype_name`));
 
15010
       ret->offset = 0;
 
15011
     } else if (unlikely (compile_options.bounds_check))
 
15012
     {
 
15013
Index: libgfortran/m4/iforeach.m4
 
15014
===================================================================
 
15015
--- a/src/libgfortran/m4/iforeach.m4    (.../tags/gcc_4_8_3_release)
 
15016
+++ b/src/libgfortran/m4/iforeach.m4    (.../branches/gcc-4_8-branch)
 
15017
@@ -30,7 +30,7 @@
 
15018
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15019
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15020
       retarray->offset = 0;
 
15021
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
15022
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
15023
     }
 
15024
   else
 
15025
     {
 
15026
@@ -133,7 +133,7 @@
 
15027
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15028
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15029
       retarray->offset = 0;
 
15030
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
15031
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
15032
     }
 
15033
   else
 
15034
     {
 
15035
@@ -264,7 +264,7 @@
 
15036
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15037
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15038
       retarray->offset = 0;
 
15039
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
15040
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
15041
     }
 
15042
   else if (unlikely (compile_options.bounds_check))
 
15043
     {
 
15044
Index: libgfortran/m4/eoshift1.m4
 
15045
===================================================================
 
15046
--- a/src/libgfortran/m4/eoshift1.m4    (.../tags/gcc_4_8_3_release)
 
15047
+++ b/src/libgfortran/m4/eoshift1.m4    (.../branches/gcc-4_8-branch)
 
15048
@@ -106,8 +106,8 @@
 
15049
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
15050
 
 
15051
         }
 
15052
-      /* xmalloc allocates a single byte for zero size.  */
 
15053
-      ret->base_addr = xmalloc (size * arraysize);
 
15054
+      /* xmallocarray allocates a single byte for zero size.  */
 
15055
+      ret->base_addr = xmallocarray (arraysize, size);
 
15056
 
 
15057
     }
 
15058
   else if (unlikely (compile_options.bounds_check))
 
15059
Index: libgfortran/m4/eoshift3.m4
 
15060
===================================================================
 
15061
--- a/src/libgfortran/m4/eoshift3.m4    (.../tags/gcc_4_8_3_release)
 
15062
+++ b/src/libgfortran/m4/eoshift3.m4    (.../branches/gcc-4_8-branch)
 
15063
@@ -90,7 +90,7 @@
 
15064
     {
 
15065
       int i;
 
15066
 
 
15067
-      ret->base_addr = xmalloc (size * arraysize);
 
15068
+      ret->base_addr = xmallocarray (arraysize, size);
 
15069
       ret->offset = 0;
 
15070
       ret->dtype = array->dtype;
 
15071
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
15072
@@ -108,8 +108,8 @@
 
15073
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
15074
 
 
15075
         }
 
15076
-      /* xmalloc allocates a single byte for zero size.  */
 
15077
-      ret->base_addr = xmalloc (size * arraysize);
 
15078
+      /* xmallocarray allocates a single byte for zero size.  */
 
15079
+      ret->base_addr = xmallocarray (arraysize, size);
 
15080
 
 
15081
     }
 
15082
   else if (unlikely (compile_options.bounds_check))
 
15083
Index: libgfortran/m4/shape.m4
 
15084
===================================================================
 
15085
--- a/src/libgfortran/m4/shape.m4       (.../tags/gcc_4_8_3_release)
 
15086
+++ b/src/libgfortran/m4/shape.m4       (.../branches/gcc-4_8-branch)
 
15087
@@ -50,7 +50,7 @@
 
15088
     {
 
15089
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
15090
       ret->offset = 0;
 
15091
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
 
15092
+      ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
 
15093
     }
 
15094
 
 
15095
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
15096
Index: libgfortran/m4/cshift1.m4
 
15097
===================================================================
 
15098
--- a/src/libgfortran/m4/cshift1.m4     (.../tags/gcc_4_8_3_release)
 
15099
+++ b/src/libgfortran/m4/cshift1.m4     (.../branches/gcc-4_8-branch)
 
15100
@@ -81,7 +81,7 @@
 
15101
     {
 
15102
       int i;
 
15103
 
 
15104
-      ret->base_addr = xmalloc (size * arraysize);
 
15105
+      ret->base_addr = xmallocarray (arraysize, size);
 
15106
       ret->offset = 0;
 
15107
       ret->dtype = array->dtype;
 
15108
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
15109
Index: libgfortran/m4/matmull.m4
 
15110
===================================================================
 
15111
--- a/src/libgfortran/m4/matmull.m4     (.../tags/gcc_4_8_3_release)
 
15112
+++ b/src/libgfortran/m4/matmull.m4     (.../branches/gcc-4_8-branch)
 
15113
@@ -89,7 +89,7 @@
 
15114
         }
 
15115
           
 
15116
       retarray->base_addr
 
15117
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
15118
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
15119
       retarray->offset = 0;
 
15120
     }
 
15121
     else if (unlikely (compile_options.bounds_check))
 
15122
Index: libgfortran/m4/bessel.m4
 
15123
===================================================================
 
15124
--- a/src/libgfortran/m4/bessel.m4      (.../tags/gcc_4_8_3_release)
 
15125
+++ b/src/libgfortran/m4/bessel.m4      (.../branches/gcc-4_8-branch)
 
15126
@@ -56,7 +56,7 @@
 
15127
     {
 
15128
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15129
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15130
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
15131
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
15132
       ret->offset = 0;
 
15133
     }
 
15134
 
 
15135
@@ -123,7 +123,7 @@
 
15136
     {
 
15137
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15138
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15139
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
15140
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
15141
       ret->offset = 0;
 
15142
     }
 
15143
 
 
15144
@@ -163,7 +163,7 @@
 
15145
 
 
15146
   x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
 
15147
 
 
15148
-  for (i = 2; i <= n1+n2; i++)
 
15149
+  for (i = 2; i <= n2 - n1; i++)
 
15150
     {
 
15151
 #if defined('rtype_name`_INFINITY)
 
15152
       if (unlikely (last2 == -'rtype_name`_INFINITY))
 
15153
Index: libgfortran/m4/unpack.m4
 
15154
===================================================================
 
15155
--- a/src/libgfortran/m4/unpack.m4      (.../tags/gcc_4_8_3_release)
 
15156
+++ b/src/libgfortran/m4/unpack.m4      (.../branches/gcc-4_8-branch)
 
15157
@@ -100,7 +100,7 @@
 
15158
          rs *= extent[n];
 
15159
        }
 
15160
       ret->offset = 0;
 
15161
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
15162
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
15163
     }
 
15164
   else
 
15165
     {
 
15166
@@ -245,7 +245,7 @@
 
15167
          rs *= extent[n];
 
15168
        }
 
15169
       ret->offset = 0;
 
15170
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
15171
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
15172
     }
 
15173
   else
 
15174
     {
 
15175
Index: libgfortran/m4/reshape.m4
 
15176
===================================================================
 
15177
--- a/src/libgfortran/m4/reshape.m4     (.../tags/gcc_4_8_3_release)
 
15178
+++ b/src/libgfortran/m4/reshape.m4     (.../branches/gcc-4_8-branch)
 
15179
@@ -115,11 +115,11 @@
 
15180
       ret->offset = 0;
 
15181
 
 
15182
       if (unlikely (rs < 1))
 
15183
-        alloc_size = 1;
 
15184
+        alloc_size = 0;
 
15185
       else
 
15186
-        alloc_size = rs * sizeof ('rtype_name`);
 
15187
+        alloc_size = rs;
 
15188
 
 
15189
-      ret->base_addr = xmalloc (alloc_size);
 
15190
+      ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
 
15191
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
15192
     }
 
15193
 
 
15194
Index: libgfortran/m4/ifunction_logical.m4
 
15195
===================================================================
 
15196
--- a/src/libgfortran/m4/ifunction_logical.m4   (.../tags/gcc_4_8_3_release)
 
15197
+++ b/src/libgfortran/m4/ifunction_logical.m4   (.../branches/gcc-4_8-branch)
 
15198
@@ -89,8 +89,7 @@
 
15199
       retarray->offset = 0;
 
15200
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15201
 
 
15202
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15203
-                  * extent[rank-1];
 
15204
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15205
 
 
15206
       if (alloc_size == 0)
 
15207
        {
 
15208
@@ -99,7 +98,7 @@
 
15209
          return;
 
15210
        }
 
15211
       else
 
15212
-       retarray->base_addr = xmalloc (alloc_size);
 
15213
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
15214
     }
 
15215
   else
 
15216
     {
 
15217
Index: libgfortran/m4/ifunction.m4
 
15218
===================================================================
 
15219
--- a/src/libgfortran/m4/ifunction.m4   (.../tags/gcc_4_8_3_release)
 
15220
+++ b/src/libgfortran/m4/ifunction.m4   (.../branches/gcc-4_8-branch)
 
15221
@@ -85,10 +85,9 @@
 
15222
       retarray->offset = 0;
 
15223
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15224
 
 
15225
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15226
-                  * extent[rank-1];
 
15227
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15228
 
 
15229
-      retarray->base_addr = xmalloc (alloc_size);
 
15230
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
15231
       if (alloc_size == 0)
 
15232
        {
 
15233
          /* Make sure we have a zero-sized array.  */
 
15234
@@ -260,8 +259,7 @@
 
15235
 
 
15236
        }
 
15237
 
 
15238
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15239
-                  * extent[rank-1];
 
15240
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15241
 
 
15242
       retarray->offset = 0;
 
15243
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15244
@@ -273,7 +271,7 @@
 
15245
          return;
 
15246
        }
 
15247
       else
 
15248
-       retarray->base_addr = xmalloc (alloc_size);
 
15249
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
15250
 
 
15251
     }
 
15252
   else
 
15253
@@ -417,8 +415,7 @@
 
15254
       retarray->offset = 0;
 
15255
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15256
 
 
15257
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15258
-                  * extent[rank-1];
 
15259
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15260
 
 
15261
       if (alloc_size == 0)
 
15262
        {
 
15263
@@ -427,7 +424,7 @@
 
15264
          return;
 
15265
        }
 
15266
       else
 
15267
-       retarray->base_addr = xmalloc (alloc_size);
 
15268
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
15269
     }
 
15270
   else
 
15271
     {
 
15272
Index: libgfortran/m4/matmul.m4
 
15273
===================================================================
 
15274
--- a/src/libgfortran/m4/matmul.m4      (.../tags/gcc_4_8_3_release)
 
15275
+++ b/src/libgfortran/m4/matmul.m4      (.../branches/gcc-4_8-branch)
 
15276
@@ -125,7 +125,7 @@
 
15277
         }
 
15278
 
 
15279
       retarray->base_addr
 
15280
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
15281
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
15282
       retarray->offset = 0;
 
15283
     }
 
15284
     else if (unlikely (compile_options.bounds_check))
 
15285
Index: libgfortran/configure
 
15286
===================================================================
 
15287
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
 
15288
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
 
15289
@@ -2595,6 +2595,7 @@
 
15290
 as_fn_append ac_func_list " getegid"
 
15291
 as_fn_append ac_func_list " secure_getenv"
 
15292
 as_fn_append ac_func_list " __secure_getenv"
 
15293
+as_fn_append ac_func_list " strtok_r"
 
15294
 as_fn_append ac_header_list " math.h"
 
15295
 # Check that the precious variables saved in the cache have kept the same
 
15296
 # value.
 
15297
@@ -12339,7 +12340,7 @@
 
15298
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
15299
   lt_status=$lt_dlunknown
 
15300
   cat > conftest.$ac_ext <<_LT_EOF
 
15301
-#line 12342 "configure"
 
15302
+#line 12343 "configure"
 
15303
 #include "confdefs.h"
 
15304
 
 
15305
 #if HAVE_DLFCN_H
 
15306
@@ -12445,7 +12446,7 @@
 
15307
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
15308
   lt_status=$lt_dlunknown
 
15309
   cat > conftest.$ac_ext <<_LT_EOF
 
15310
-#line 12448 "configure"
 
15311
+#line 12449 "configure"
 
15312
 #include "confdefs.h"
 
15313
 
 
15314
 #if HAVE_DLFCN_H
 
15315
@@ -16506,6 +16507,8 @@
 
15316
 
 
15317
 
 
15318
 
 
15319
+
 
15320
+
 
15321
 
 
15322
 
 
15323
 
 
15324
Index: libgfortran/runtime/in_pack_generic.c
 
15325
===================================================================
 
15326
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
 
15327
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
 
15328
@@ -180,7 +180,7 @@
 
15329
     return source->base_addr;
 
15330
 
 
15331
    /* Allocate storage for the destination.  */
 
15332
-  destptr = xmalloc (ssize * size);
 
15333
+  destptr = xmallocarray (ssize, size);
 
15334
   dest = (char *)destptr;
 
15335
   src = source->base_addr;
 
15336
   stride0 = stride[0] * size;
 
15337
Index: libgfortran/runtime/memory.c
 
15338
===================================================================
 
15339
--- a/src/libgfortran/runtime/memory.c  (.../tags/gcc_4_8_3_release)
 
15340
+++ b/src/libgfortran/runtime/memory.c  (.../branches/gcc-4_8-branch)
 
15341
@@ -25,8 +25,13 @@
 
15342
 
 
15343
 #include "libgfortran.h"
 
15344
 #include <stdlib.h>
 
15345
+#include <errno.h>
 
15346
 
 
15347
+#ifndef SIZE_MAX
 
15348
+#define SIZE_MAX ((size_t)-1)
 
15349
+#endif
 
15350
 
 
15351
+
 
15352
 void *
 
15353
 xmalloc (size_t n)
 
15354
 {
 
15355
@@ -44,12 +49,34 @@
 
15356
 }
 
15357
 
 
15358
 
 
15359
+void *
 
15360
+xmallocarray (size_t nmemb, size_t size)
 
15361
+{
 
15362
+  void *p;
 
15363
+
 
15364
+  if (!nmemb || !size)
 
15365
+    size = nmemb = 1;
 
15366
+  else if (nmemb > SIZE_MAX / size)
 
15367
+    {
 
15368
+      errno = ENOMEM;
 
15369
+      os_error ("Integer overflow in xmallocarray");
 
15370
+    }
 
15371
+
 
15372
+  p = malloc (nmemb * size);
 
15373
+
 
15374
+  if (!p)
 
15375
+    os_error ("Memory allocation failed in xmallocarray");
 
15376
+
 
15377
+  return p;
 
15378
+}
 
15379
+
 
15380
+
 
15381
 /* calloc wrapper that aborts on error.  */
 
15382
 
 
15383
 void *
 
15384
 xcalloc (size_t nmemb, size_t size)
 
15385
 {
 
15386
-  if (nmemb * size == 0)
 
15387
+  if (!nmemb || !size)
 
15388
     nmemb = size = 1;
 
15389
 
 
15390
   void *p = calloc (nmemb, size);
 
15391
Index: libgfortran/runtime/convert_char.c
 
15392
===================================================================
 
15393
--- a/src/libgfortran/runtime/convert_char.c    (.../tags/gcc_4_8_3_release)
 
15394
+++ b/src/libgfortran/runtime/convert_char.c    (.../branches/gcc-4_8-branch)
 
15395
@@ -44,7 +44,7 @@
 
15396
   gfc_charlen_type i, l;
 
15397
 
 
15398
   l = len > 0 ? len : 0;
 
15399
-  *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
 
15400
+  *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
 
15401
 
 
15402
   for (i = 0; i < l; i++)
 
15403
     (*dst)[i] = src[i];
 
15404
@@ -60,7 +60,7 @@
 
15405
   gfc_charlen_type i, l;
 
15406
 
 
15407
   l = len > 0 ? len : 0;
 
15408
-  *dst = xmalloc ((l + 1) * sizeof (unsigned char));
 
15409
+  *dst = xmalloc (l + 1);
 
15410
 
 
15411
   for (i = 0; i < l; i++)
 
15412
     (*dst)[i] = src[i];
 
15413
Index: libgfortran/runtime/environ.c
 
15414
===================================================================
 
15415
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
 
15416
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
 
15417
@@ -833,7 +833,7 @@
 
15418
     }
 
15419
   else
 
15420
     {
 
15421
-      elist = xmalloc (unit_count * sizeof (exception_t));
 
15422
+      elist = xmallocarray (unit_count, sizeof (exception_t));
 
15423
       do_count = 0;
 
15424
       p = val;
 
15425
       do_parse ();
 
15426
Index: libgfortran/runtime/main.c
 
15427
===================================================================
 
15428
--- a/src/libgfortran/runtime/main.c    (.../tags/gcc_4_8_3_release)
 
15429
+++ b/src/libgfortran/runtime/main.c    (.../branches/gcc-4_8-branch)
 
15430
@@ -153,6 +153,16 @@
 
15431
 }
 
15432
 
 
15433
 
 
15434
+#ifndef HAVE_STRTOK_R
 
15435
+static char*
 
15436
+gfstrtok_r (char *str, const char *delim, 
 
15437
+           char **saveptr __attribute__ ((unused)))
 
15438
+{
 
15439
+  return strtok (str, delim);
 
15440
+}
 
15441
+#define strtok_r gfstrtok_r
 
15442
+#endif
 
15443
+
 
15444
 char *addr2line_path;
 
15445
 
 
15446
 /* Find addr2line and store the path.  */
 
15447
@@ -161,30 +171,32 @@
 
15448
 find_addr2line (void)
 
15449
 {
 
15450
 #ifdef HAVE_ACCESS
 
15451
-#define A2L_LEN 10
 
15452
+#define A2L_LEN 11
 
15453
   char *path = secure_getenv ("PATH");
 
15454
   if (!path)
 
15455
     return;
 
15456
+  char *tp = strdup (path);
 
15457
+  if (!tp)
 
15458
+    return;
 
15459
   size_t n = strlen (path);
 
15460
-  char ap[n + 1 + A2L_LEN];
 
15461
-  size_t ai = 0;
 
15462
-  for (size_t i = 0; i < n; i++)
 
15463
+  char *ap = xmalloc (n + A2L_LEN);
 
15464
+  char *saveptr;
 
15465
+  for (char *str = tp;; str = NULL)
 
15466
     {
 
15467
-      if (path[i] != ':')
 
15468
-       ap[ai++] = path[i];
 
15469
-      else
 
15470
+      char *token = strtok_r (str, ":", &saveptr);
 
15471
+      if (!token)
 
15472
+       break;
 
15473
+      size_t toklen = strlen (token);
 
15474
+      memcpy (ap, token, toklen);
 
15475
+      memcpy (ap + toklen, "/addr2line", A2L_LEN);
 
15476
+      if (access (ap, R_OK|X_OK) == 0)
 
15477
        {
 
15478
-         ap[ai++] = '/';
 
15479
-         memcpy (ap + ai, "addr2line", A2L_LEN);
 
15480
-         if (access (ap, R_OK|X_OK) == 0)
 
15481
-           {
 
15482
-             addr2line_path = strdup (ap);
 
15483
-             return;
 
15484
-           }
 
15485
-         else
 
15486
-           ai = 0;
 
15487
+         addr2line_path = strdup (ap);
 
15488
+         break;
 
15489
        }
 
15490
     }
 
15491
+  free (tp);
 
15492
+  free (ap);
 
15493
 #endif
 
15494
 }
 
15495
 
 
15496
Index: libgfortran/intrinsics/string_intrinsics_inc.c
 
15497
===================================================================
 
15498
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../tags/gcc_4_8_3_release)
 
15499
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../branches/gcc-4_8-branch)
 
15500
@@ -164,7 +164,7 @@
 
15501
   else
 
15502
     {
 
15503
       /* Allocate space for result string.  */
 
15504
-      *dest = xmalloc (*len * sizeof (CHARTYPE));
 
15505
+      *dest = xmallocarray (*len, sizeof (CHARTYPE));
 
15506
 
 
15507
       /* Copy string if necessary.  */
 
15508
       memcpy (*dest, src, *len * sizeof (CHARTYPE));
 
15509
@@ -442,7 +442,7 @@
 
15510
     *dest = &zero_length_string;
 
15511
   else
 
15512
     {
 
15513
-      CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
 
15514
+      CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
 
15515
       memcpy (tmp, res, reslen * sizeof (CHARTYPE));
 
15516
       MEMSET (&tmp[reslen], ' ', *rlen - reslen);
 
15517
       *dest = tmp;
 
15518
Index: libgfortran/intrinsics/pack_generic.c
 
15519
===================================================================
 
15520
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
 
15521
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
 
15522
@@ -152,8 +152,8 @@
 
15523
          GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
 
15524
 
 
15525
          ret->offset = 0;
 
15526
-         /* xmalloc allocates a single byte for zero size.  */
 
15527
-         ret->base_addr = xmalloc (size * total);
 
15528
+         /* xmallocarray allocates a single byte for zero size.  */
 
15529
+         ret->base_addr = xmallocarray (total, size);
 
15530
 
 
15531
          if (total == 0)
 
15532
            return;      /* In this case, nothing remains to be done.  */
 
15533
@@ -519,7 +519,7 @@
 
15534
 
 
15535
       ret->offset = 0;
 
15536
 
 
15537
-      ret->base_addr = xmalloc (size * total);
 
15538
+      ret->base_addr = xmallocarray (total, size);
 
15539
 
 
15540
       if (total == 0)
 
15541
        return;
 
15542
Index: libgfortran/intrinsics/transpose_generic.c
 
15543
===================================================================
 
15544
--- a/src/libgfortran/intrinsics/transpose_generic.c    (.../tags/gcc_4_8_3_release)
 
15545
+++ b/src/libgfortran/intrinsics/transpose_generic.c    (.../branches/gcc-4_8-branch)
 
15546
@@ -60,7 +60,7 @@
 
15547
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15548
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15549
 
 
15550
-      ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
 
15551
+      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
 
15552
       ret->offset = 0;
 
15553
     }
 
15554
   else if (unlikely (compile_options.bounds_check))
 
15555
Index: libgfortran/intrinsics/cshift0.c
 
15556
===================================================================
 
15557
--- a/src/libgfortran/intrinsics/cshift0.c      (.../tags/gcc_4_8_3_release)
 
15558
+++ b/src/libgfortran/intrinsics/cshift0.c      (.../branches/gcc-4_8-branch)
 
15559
@@ -79,8 +79,8 @@
 
15560
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
15561
         }
 
15562
 
 
15563
-      /* xmalloc allocates a single byte for zero size.  */
 
15564
-      ret->base_addr = xmalloc (size * arraysize);
 
15565
+      /* xmallocarray allocates a single byte for zero size.  */
 
15566
+      ret->base_addr = xmallocarray (arraysize, size);
 
15567
     }
 
15568
   else if (unlikely (compile_options.bounds_check))
 
15569
     {
 
15570
Index: libgfortran/intrinsics/ctime.c
 
15571
===================================================================
 
15572
--- a/src/libgfortran/intrinsics/ctime.c        (.../tags/gcc_4_8_3_release)
 
15573
+++ b/src/libgfortran/intrinsics/ctime.c        (.../branches/gcc-4_8-branch)
 
15574
@@ -31,31 +31,53 @@
 
15575
 #include <string.h>
 
15576
 
 
15577
 
 
15578
-/* strftime-like function that fills a C string with %c format which
 
15579
-   is identical to ctime in the default locale. As ctime and ctime_r
 
15580
-   are poorly specified and their usage not recommended, the
 
15581
-   implementation instead uses strftime.  */
 
15582
+/* Maximum space a ctime-like string might need. A "normal" ctime
 
15583
+   string is 26 bytes, and in our case 24 bytes as we don't include
 
15584
+   the trailing newline and null. However, the longest possible year
 
15585
+   number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
 
15586
+   32-bit signed integer) so an extra 7 bytes are needed. */
 
15587
+#define CTIME_BUFSZ 31
 
15588
 
 
15589
-static size_t
 
15590
-strctime (char *s, size_t max, const time_t *timep)
 
15591
+
 
15592
+/* Thread-safe ctime-like function that fills a Fortran
 
15593
+   string. ctime_r is a portability headache and marked as obsolescent
 
15594
+   in POSIX 2008, which recommends strftime in its place. However,
 
15595
+   strftime(..., "%c",...)  doesn't produce ctime-like output on
 
15596
+   MinGW, so do it manually with snprintf.  */
 
15597
+
 
15598
+static int
 
15599
+gf_ctime (char *s, size_t max, const time_t timev)
 
15600
 {
 
15601
   struct tm ltm;
 
15602
   int failed;
 
15603
+  char buf[CTIME_BUFSZ + 1];
 
15604
   /* Some targets provide a localtime_r based on a draft of the POSIX
 
15605
      standard where the return type is int rather than the
 
15606
      standardized struct tm*.  */
 
15607
-  __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, &ltm)) 
 
15608
+  __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, &ltm)) 
 
15609
                         == 5,
 
15610
-                        failed = localtime_r (timep, &ltm) == NULL,
 
15611
-                        failed = localtime_r (timep, &ltm) != 0);
 
15612
+                        failed = localtime_r (&timev, &ltm) == NULL,
 
15613
+                        failed = localtime_r (&timev, &ltm) != 0);
 
15614
   if (failed)
 
15615
-    return 0;
 
15616
-  return strftime (s, max, "%c", &ltm);
 
15617
+    goto blank;
 
15618
+  int n = snprintf (buf, sizeof (buf), 
 
15619
+                   "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
 
15620
+                   "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
 
15621
+                   "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
 
15622
+                   ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 
 
15623
+                   1900 + ltm.tm_year);
 
15624
+  if (n < 0)
 
15625
+    goto blank;
 
15626
+  if ((size_t) n <= max)
 
15627
+    {
 
15628
+      cf_strcpy (s, max, buf);
 
15629
+      return n;
 
15630
+    }
 
15631
+ blank:
 
15632
+  memset (s, ' ', max);
 
15633
+  return 0;
 
15634
 }
 
15635
 
 
15636
-/* In the default locale, the date and time representation fits in 26
 
15637
-   bytes. However, other locales might need more space.  */
 
15638
-#define CSZ 100
 
15639
 
 
15640
 extern void fdate (char **, gfc_charlen_type *);
 
15641
 export_proto(fdate);
 
15642
@@ -64,8 +86,8 @@
 
15643
 fdate (char ** date, gfc_charlen_type * date_len)
 
15644
 {
 
15645
   time_t now = time(NULL);
 
15646
-  *date = xmalloc (CSZ);
 
15647
-  *date_len = strctime (*date, CSZ, &now);
 
15648
+  *date = xmalloc (CTIME_BUFSZ);
 
15649
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
15650
 }
 
15651
 
 
15652
 
 
15653
@@ -76,10 +98,7 @@
 
15654
 fdate_sub (char * date, gfc_charlen_type date_len)
 
15655
 {
 
15656
   time_t now = time(NULL);
 
15657
-  char *s = xmalloc (date_len + 1);
 
15658
-  size_t n = strctime (s, date_len + 1, &now);
 
15659
-  fstrcpy (date, date_len, s, n);
 
15660
-  free (s);
 
15661
+  gf_ctime (date, date_len, now);
 
15662
 }
 
15663
 
 
15664
 
 
15665
@@ -91,8 +110,8 @@
 
15666
 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
 
15667
 {
 
15668
   time_t now = t;
 
15669
-  *date = xmalloc (CSZ);
 
15670
-  *date_len = strctime (*date, CSZ, &now);
 
15671
+  *date = xmalloc (CTIME_BUFSZ);
 
15672
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
15673
 }
 
15674
 
 
15675
 
 
15676
@@ -103,8 +122,5 @@
 
15677
 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
 
15678
 {
 
15679
   time_t now = *t;
 
15680
-  char *s = xmalloc (date_len + 1);
 
15681
-  size_t n = strctime (s, date_len + 1, &now);
 
15682
-  fstrcpy (date, date_len, s, n);
 
15683
-  free (s);
 
15684
+  gf_ctime (date, date_len, now);
 
15685
 }
 
15686
Index: libgfortran/intrinsics/spread_generic.c
 
15687
===================================================================
 
15688
--- a/src/libgfortran/intrinsics/spread_generic.c       (.../tags/gcc_4_8_3_release)
 
15689
+++ b/src/libgfortran/intrinsics/spread_generic.c       (.../branches/gcc-4_8-branch)
 
15690
@@ -100,7 +100,7 @@
 
15691
          GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
 
15692
        }
 
15693
       ret->offset = 0;
 
15694
-      ret->base_addr = xmalloc (rs * size);
 
15695
+      ret->base_addr = xmallocarray (rs, size);
 
15696
 
 
15697
       if (rs <= 0)
 
15698
        return;
 
15699
@@ -245,7 +245,7 @@
 
15700
 
 
15701
   if (ret->base_addr == NULL)
 
15702
     {
 
15703
-      ret->base_addr = xmalloc (ncopies * size);
 
15704
+      ret->base_addr = xmallocarray (ncopies, size);
 
15705
       ret->offset = 0;
 
15706
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15707
     }
 
15708
Index: libgfortran/intrinsics/unpack_generic.c
 
15709
===================================================================
 
15710
--- a/src/libgfortran/intrinsics/unpack_generic.c       (.../tags/gcc_4_8_3_release)
 
15711
+++ b/src/libgfortran/intrinsics/unpack_generic.c       (.../branches/gcc-4_8-branch)
 
15712
@@ -125,7 +125,7 @@
 
15713
          rs *= extent[n];
 
15714
        }
 
15715
       ret->offset = 0;
 
15716
-      ret->base_addr = xmalloc (rs * size);
 
15717
+      ret->base_addr = xmallocarray (rs, size);
 
15718
     }
 
15719
   else
 
15720
     {
 
15721
Index: libgfortran/intrinsics/eoshift0.c
 
15722
===================================================================
 
15723
--- a/src/libgfortran/intrinsics/eoshift0.c     (.../tags/gcc_4_8_3_release)
 
15724
+++ b/src/libgfortran/intrinsics/eoshift0.c     (.../branches/gcc-4_8-branch)
 
15725
@@ -86,8 +86,8 @@
 
15726
 
 
15727
         }
 
15728
 
 
15729
-      /* xmalloc allocates a single byte for zero size.  */
 
15730
-      ret->base_addr = xmalloc (size * arraysize);
 
15731
+      /* xmallocarray allocates a single byte for zero size.  */
 
15732
+      ret->base_addr = xmallocarray (arraysize, size);
 
15733
     }
 
15734
   else if (unlikely (compile_options.bounds_check))
 
15735
     {
 
15736
Index: libgfortran/intrinsics/eoshift2.c
 
15737
===================================================================
 
15738
--- a/src/libgfortran/intrinsics/eoshift2.c     (.../tags/gcc_4_8_3_release)
 
15739
+++ b/src/libgfortran/intrinsics/eoshift2.c     (.../branches/gcc-4_8-branch)
 
15740
@@ -78,8 +78,8 @@
 
15741
       ret->offset = 0;
 
15742
       ret->dtype = array->dtype;
 
15743
 
 
15744
-      /* xmalloc allocates a single byte for zero size.  */
 
15745
-      ret->base_addr = xmalloc (size * arraysize);
 
15746
+      /* xmallocarray allocates a single byte for zero size.  */
 
15747
+      ret->base_addr = xmallocarray (arraysize, size);
 
15748
 
 
15749
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
15750
         {
 
15751
Index: libgfortran/intrinsics/reshape_generic.c
 
15752
===================================================================
 
15753
--- a/src/libgfortran/intrinsics/reshape_generic.c      (.../tags/gcc_4_8_3_release)
 
15754
+++ b/src/libgfortran/intrinsics/reshape_generic.c      (.../branches/gcc-4_8-branch)
 
15755
@@ -99,11 +99,11 @@
 
15756
       ret->offset = 0;
 
15757
 
 
15758
       if (unlikely (rs < 1))
 
15759
-       alloc_size = 1;
 
15760
+       alloc_size = 0; /* xmalloc will allocate 1 byte.  */
 
15761
       else
 
15762
-       alloc_size = rs * size;
 
15763
+       alloc_size = rs;
 
15764
 
 
15765
-      ret->base_addr = xmalloc (alloc_size);
 
15766
+      ret->base_addr = xmallocarray (alloc_size, size);
 
15767
 
 
15768
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
15769
     }
 
15770
Index: libgfortran/configure.ac
 
15771
===================================================================
 
15772
--- a/src/libgfortran/configure.ac      (.../tags/gcc_4_8_3_release)
 
15773
+++ b/src/libgfortran/configure.ac      (.../branches/gcc-4_8-branch)
 
15774
@@ -267,7 +267,7 @@
 
15775
 strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
 
15776
 getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
 
15777
 readlink getgid getpid getppid getuid geteuid umask getegid \
 
15778
-secure_getenv __secure_getenv)
 
15779
+secure_getenv __secure_getenv strtok_r)
 
15780
 
 
15781
 # Check strerror_r, cannot be above as versions with two and three arguments exist
 
15782
 LIBGFOR_CHECK_STRERROR_R
 
15783
Index: libgfortran/ChangeLog
 
15784
===================================================================
 
15785
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
15786
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
 
15787
@@ -1,3 +1,94 @@
 
15788
+2014-10-20  Janne Blomqvist  <jb@gcc.gnu.org>
 
15789
+
 
15790
+       PR libfortran/63589
 
15791
+       * configure.ac: Check for strtok_r.
 
15792
+       * runtime/main.c (gfstrtok_r): Fallback implementation of
 
15793
+       strtok_r.
 
15794
+       (find_addr2line): Use strtok_r to split PATH.
 
15795
+       * config.h.in: Regenerated.
 
15796
+       * configure: Regenerated.
 
15797
+
 
15798
+2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
 
15799
+
 
15800
+       PR libgfortran/62188
 
15801
+       * m4/bessel.m4: Avoid indexing off the end of an array.
 
15802
+       * generated/bessel_r10.c: Regenerated.
 
15803
+       * generated/bessel_r16.c: Ditto.
 
15804
+       * generated/bessel_r4.c: Ditto.
 
15805
+       * generated/bessel_r8.c: Ditto.
 
15806
+
 
15807
+2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>
 
15808
+
 
15809
+       Backport from mainline
 
15810
+       CVE-2014-5044
 
15811
+        * libgfortran.h (xmallocarray): New prototype.
 
15812
+        * runtime/memory.c (xmallocarray): New function.
 
15813
+        (xcalloc): Check for nonzero separately instead of multiplying.
 
15814
+        * generated/*.c: Regenerated.
 
15815
+        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
 
15816
+        xmalloc.
 
15817
+        * intrinsics/eoshift0.c (eoshift0): Likewise.
 
15818
+        * intrinsics/eoshift2.c (eoshift2): Likewise.
 
15819
+        * intrinsics/pack_generic.c (pack_internal): Likewise.
 
15820
+        (pack_s_internal): Likewise.
 
15821
+        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
 
15822
+        * intrinsics/spread_generic.c (spread_internal): Likewise.
 
15823
+        (spread_internal_scalar): Likewise.
 
15824
+        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
 
15825
+        (string_minmax): Likewise.
 
15826
+        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
 
15827
+        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
 
15828
+        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
 
15829
+        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
 
15830
+        xmalloc.
 
15831
+        * io/unit.c (get_internal_unit): Likewise.
 
15832
+        (filename_from_unit): Don't cast xmalloc return value.
 
15833
+        * io/write.c (nml_write_obj): Likewise, formatting.
 
15834
+        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
 
15835
+        instead of xmalloc.
 
15836
+        (besse_yn_r'rtype_kind`): Likewise.
 
15837
+        * m4/cshift1.m4 (cshift1): Likewise.
 
15838
+        * m4/eoshift1.m4 (eoshift1): Likewise.
 
15839
+        * m4/eoshift3.m4 (eoshift3): Likewise.
 
15840
+        * m4/iforeach.m4: Likewise.
 
15841
+        * m4/ifunction.m4: Likewise.
 
15842
+        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
 
15843
+        Likewise.
 
15844
+        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
 
15845
+        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
 
15846
+        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
 
15847
+        * m4/pack.m4 (pack_'rtype_code`): Likewise.
 
15848
+        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
 
15849
+        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
 
15850
+        * m4/spread.m4 (spread_'rtype_code`): Likewise.
 
15851
+        (spread_scalar_'rtype_code`): Likewise.
 
15852
+        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
 
15853
+        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
 
15854
+        (unpack1_'rtype_code`): Likewise.
 
15855
+        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
 
15856
+        (convert_char4_to_char1): Simplify.
 
15857
+        * runtime/environ.c (init_unformatted): Call xmallocarray instead
 
15858
+        of xmalloc.
 
15859
+        * runtime/in_pack_generic.c (internal_pack): Likewise.
 
15860
+
 
15861
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
15862
+
 
15863
+       Backport from mainline
 
15864
+       PR libfortran/61310
 
15865
+       * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
 
15866
+       instead of strftime.
 
15867
+       (fdate): Use gf_ctime.
 
15868
+       (fdate_sub): Likewise.
 
15869
+       (ctime): Likewise.
 
15870
+       (ctime_sub): Likewise.
 
15871
+
 
15872
+2014-05-25  Janne Blomqvist  <jb@gcc.gnu.org>
 
15873
+
 
15874
+       Backport from trunk.
 
15875
+       PR libfortran/61187
 
15876
+       * io/unix.c (raw_close): Check if s->fd is -1.
 
15877
+       (fd_to_stream): Check return value of fstat(), handle error.
 
15878
+
 
15879
 2014-05-22  Release Manager
 
15880
 
 
15881
        * GCC 4.8.3 released.
 
15882
Index: libgfortran/generated/spread_r10.c
 
15883
===================================================================
 
15884
--- a/src/libgfortran/generated/spread_r10.c    (.../tags/gcc_4_8_3_release)
 
15885
+++ b/src/libgfortran/generated/spread_r10.c    (.../branches/gcc-4_8-branch)
 
15886
@@ -101,8 +101,8 @@
 
15887
        }
 
15888
       ret->offset = 0;
 
15889
 
 
15890
-      /* xmalloc allocates a single byte for zero size.  */
 
15891
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
 
15892
+      /* xmallocarray allocates a single byte for zero size.  */
 
15893
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
 
15894
       if (rs <= 0)
 
15895
         return;
 
15896
     }
 
15897
@@ -244,7 +244,7 @@
 
15898
 
 
15899
   if (ret->base_addr == NULL)
 
15900
     {
 
15901
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
 
15902
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
 
15903
       ret->offset = 0;
 
15904
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15905
     }
 
15906
Index: libgfortran/generated/maxloc1_4_r8.c
 
15907
===================================================================
 
15908
--- a/src/libgfortran/generated/maxloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
15909
+++ b/src/libgfortran/generated/maxloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
15910
@@ -98,10 +98,9 @@
 
15911
       retarray->offset = 0;
 
15912
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15913
 
 
15914
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15915
-                  * extent[rank-1];
 
15916
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15917
 
 
15918
-      retarray->base_addr = xmalloc (alloc_size);
 
15919
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15920
       if (alloc_size == 0)
 
15921
        {
 
15922
          /* Make sure we have a zero-sized array.  */
 
15923
@@ -294,8 +293,7 @@
 
15924
 
 
15925
        }
 
15926
 
 
15927
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15928
-                  * extent[rank-1];
 
15929
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15930
 
 
15931
       retarray->offset = 0;
 
15932
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15933
@@ -307,7 +305,7 @@
 
15934
          return;
 
15935
        }
 
15936
       else
 
15937
-       retarray->base_addr = xmalloc (alloc_size);
 
15938
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15939
 
 
15940
     }
 
15941
   else
 
15942
@@ -485,8 +483,7 @@
 
15943
       retarray->offset = 0;
 
15944
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15945
 
 
15946
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15947
-                  * extent[rank-1];
 
15948
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15949
 
 
15950
       if (alloc_size == 0)
 
15951
        {
 
15952
@@ -495,7 +492,7 @@
 
15953
          return;
 
15954
        }
 
15955
       else
 
15956
-       retarray->base_addr = xmalloc (alloc_size);
 
15957
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15958
     }
 
15959
   else
 
15960
     {
 
15961
Index: libgfortran/generated/norm2_r4.c
 
15962
===================================================================
 
15963
--- a/src/libgfortran/generated/norm2_r4.c      (.../tags/gcc_4_8_3_release)
 
15964
+++ b/src/libgfortran/generated/norm2_r4.c      (.../branches/gcc-4_8-branch)
 
15965
@@ -101,10 +101,9 @@
 
15966
       retarray->offset = 0;
 
15967
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15968
 
 
15969
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15970
-                  * extent[rank-1];
 
15971
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15972
 
 
15973
-      retarray->base_addr = xmalloc (alloc_size);
 
15974
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15975
       if (alloc_size == 0)
 
15976
        {
 
15977
          /* Make sure we have a zero-sized array.  */
 
15978
Index: libgfortran/generated/parity_l2.c
 
15979
===================================================================
 
15980
--- a/src/libgfortran/generated/parity_l2.c     (.../tags/gcc_4_8_3_release)
 
15981
+++ b/src/libgfortran/generated/parity_l2.c     (.../branches/gcc-4_8-branch)
 
15982
@@ -98,10 +98,9 @@
 
15983
       retarray->offset = 0;
 
15984
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15985
 
 
15986
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15987
-                  * extent[rank-1];
 
15988
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15989
 
 
15990
-      retarray->base_addr = xmalloc (alloc_size);
 
15991
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
15992
       if (alloc_size == 0)
 
15993
        {
 
15994
          /* Make sure we have a zero-sized array.  */
 
15995
Index: libgfortran/generated/eoshift3_4.c
 
15996
===================================================================
 
15997
--- a/src/libgfortran/generated/eoshift3_4.c    (.../tags/gcc_4_8_3_release)
 
15998
+++ b/src/libgfortran/generated/eoshift3_4.c    (.../branches/gcc-4_8-branch)
 
15999
@@ -89,7 +89,7 @@
 
16000
     {
 
16001
       int i;
 
16002
 
 
16003
-      ret->base_addr = xmalloc (size * arraysize);
 
16004
+      ret->base_addr = xmallocarray (arraysize, size);
 
16005
       ret->offset = 0;
 
16006
       ret->dtype = array->dtype;
 
16007
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
16008
@@ -107,8 +107,8 @@
 
16009
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
16010
 
 
16011
         }
 
16012
-      /* xmalloc allocates a single byte for zero size.  */
 
16013
-      ret->base_addr = xmalloc (size * arraysize);
 
16014
+      /* xmallocarray allocates a single byte for zero size.  */
 
16015
+      ret->base_addr = xmallocarray (arraysize, size);
 
16016
 
 
16017
     }
 
16018
   else if (unlikely (compile_options.bounds_check))
 
16019
Index: libgfortran/generated/transpose_c8.c
 
16020
===================================================================
 
16021
--- a/src/libgfortran/generated/transpose_c8.c  (.../tags/gcc_4_8_3_release)
 
16022
+++ b/src/libgfortran/generated/transpose_c8.c  (.../branches/gcc-4_8-branch)
 
16023
@@ -60,7 +60,8 @@
 
16024
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
16025
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
16026
 
 
16027
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
 
16028
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
16029
+                                     sizeof (GFC_COMPLEX_8));
 
16030
       ret->offset = 0;
 
16031
     } else if (unlikely (compile_options.bounds_check))
 
16032
     {
 
16033
Index: libgfortran/generated/eoshift1_8.c
 
16034
===================================================================
 
16035
--- a/src/libgfortran/generated/eoshift1_8.c    (.../tags/gcc_4_8_3_release)
 
16036
+++ b/src/libgfortran/generated/eoshift1_8.c    (.../branches/gcc-4_8-branch)
 
16037
@@ -105,8 +105,8 @@
 
16038
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
16039
 
 
16040
         }
 
16041
-      /* xmalloc allocates a single byte for zero size.  */
 
16042
-      ret->base_addr = xmalloc (size * arraysize);
 
16043
+      /* xmallocarray allocates a single byte for zero size.  */
 
16044
+      ret->base_addr = xmallocarray (arraysize, size);
 
16045
 
 
16046
     }
 
16047
   else if (unlikely (compile_options.bounds_check))
 
16048
Index: libgfortran/generated/reshape_r16.c
 
16049
===================================================================
 
16050
--- a/src/libgfortran/generated/reshape_r16.c   (.../tags/gcc_4_8_3_release)
 
16051
+++ b/src/libgfortran/generated/reshape_r16.c   (.../branches/gcc-4_8-branch)
 
16052
@@ -111,11 +111,11 @@
 
16053
       ret->offset = 0;
 
16054
 
 
16055
       if (unlikely (rs < 1))
 
16056
-        alloc_size = 1;
 
16057
+        alloc_size = 0;
 
16058
       else
 
16059
-        alloc_size = rs * sizeof (GFC_REAL_16);
 
16060
+        alloc_size = rs;
 
16061
 
 
16062
-      ret->base_addr = xmalloc (alloc_size);
 
16063
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16064
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
16065
     }
 
16066
 
 
16067
Index: libgfortran/generated/bessel_r4.c
 
16068
===================================================================
 
16069
--- a/src/libgfortran/generated/bessel_r4.c     (.../tags/gcc_4_8_3_release)
 
16070
+++ b/src/libgfortran/generated/bessel_r4.c     (.../branches/gcc-4_8-branch)
 
16071
@@ -55,7 +55,7 @@
 
16072
     {
 
16073
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
16074
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
16075
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
16076
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
16077
       ret->offset = 0;
 
16078
     }
 
16079
 
 
16080
@@ -122,7 +122,7 @@
 
16081
     {
 
16082
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
16083
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
16084
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
16085
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
16086
       ret->offset = 0;
 
16087
     }
 
16088
 
 
16089
@@ -162,7 +162,7 @@
 
16090
 
 
16091
   x2rev = GFC_REAL_4_LITERAL(2.)/x;
 
16092
 
 
16093
-  for (i = 2; i <= n1+n2; i++)
 
16094
+  for (i = 2; i <= n2 - n1; i++)
 
16095
     {
 
16096
 #if defined(GFC_REAL_4_INFINITY)
 
16097
       if (unlikely (last2 == -GFC_REAL_4_INFINITY))
 
16098
Index: libgfortran/generated/any_l2.c
 
16099
===================================================================
 
16100
--- a/src/libgfortran/generated/any_l2.c        (.../tags/gcc_4_8_3_release)
 
16101
+++ b/src/libgfortran/generated/any_l2.c        (.../branches/gcc-4_8-branch)
 
16102
@@ -101,8 +101,7 @@
 
16103
       retarray->offset = 0;
 
16104
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16105
 
 
16106
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16107
-                  * extent[rank-1];
 
16108
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16109
 
 
16110
       if (alloc_size == 0)
 
16111
        {
 
16112
@@ -111,7 +110,7 @@
 
16113
          return;
 
16114
        }
 
16115
       else
 
16116
-       retarray->base_addr = xmalloc (alloc_size);
 
16117
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
16118
     }
 
16119
   else
 
16120
     {
 
16121
Index: libgfortran/generated/product_r4.c
 
16122
===================================================================
 
16123
--- a/src/libgfortran/generated/product_r4.c    (.../tags/gcc_4_8_3_release)
 
16124
+++ b/src/libgfortran/generated/product_r4.c    (.../branches/gcc-4_8-branch)
 
16125
@@ -97,10 +97,9 @@
 
16126
       retarray->offset = 0;
 
16127
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16128
 
 
16129
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16130
-                  * extent[rank-1];
 
16131
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16132
 
 
16133
-      retarray->base_addr = xmalloc (alloc_size);
 
16134
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
16135
       if (alloc_size == 0)
 
16136
        {
 
16137
          /* Make sure we have a zero-sized array.  */
 
16138
@@ -272,8 +271,7 @@
 
16139
 
 
16140
        }
 
16141
 
 
16142
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16143
-                  * extent[rank-1];
 
16144
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16145
 
 
16146
       retarray->offset = 0;
 
16147
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16148
@@ -285,7 +283,7 @@
 
16149
          return;
 
16150
        }
 
16151
       else
 
16152
-       retarray->base_addr = xmalloc (alloc_size);
 
16153
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
16154
 
 
16155
     }
 
16156
   else
 
16157
@@ -430,8 +428,7 @@
 
16158
       retarray->offset = 0;
 
16159
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16160
 
 
16161
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16162
-                  * extent[rank-1];
 
16163
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16164
 
 
16165
       if (alloc_size == 0)
 
16166
        {
 
16167
@@ -440,7 +437,7 @@
 
16168
          return;
 
16169
        }
 
16170
       else
 
16171
-       retarray->base_addr = xmalloc (alloc_size);
 
16172
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
16173
     }
 
16174
   else
 
16175
     {
 
16176
Index: libgfortran/generated/iany_i1.c
 
16177
===================================================================
 
16178
--- a/src/libgfortran/generated/iany_i1.c       (.../tags/gcc_4_8_3_release)
 
16179
+++ b/src/libgfortran/generated/iany_i1.c       (.../branches/gcc-4_8-branch)
 
16180
@@ -97,10 +97,9 @@
 
16181
       retarray->offset = 0;
 
16182
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16183
 
 
16184
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16185
-                  * extent[rank-1];
 
16186
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16187
 
 
16188
-      retarray->base_addr = xmalloc (alloc_size);
 
16189
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16190
       if (alloc_size == 0)
 
16191
        {
 
16192
          /* Make sure we have a zero-sized array.  */
 
16193
@@ -272,8 +271,7 @@
 
16194
 
 
16195
        }
 
16196
 
 
16197
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16198
-                  * extent[rank-1];
 
16199
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16200
 
 
16201
       retarray->offset = 0;
 
16202
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16203
@@ -285,7 +283,7 @@
 
16204
          return;
 
16205
        }
 
16206
       else
 
16207
-       retarray->base_addr = xmalloc (alloc_size);
 
16208
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16209
 
 
16210
     }
 
16211
   else
 
16212
@@ -430,8 +428,7 @@
 
16213
       retarray->offset = 0;
 
16214
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16215
 
 
16216
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16217
-                  * extent[rank-1];
 
16218
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16219
 
 
16220
       if (alloc_size == 0)
 
16221
        {
 
16222
@@ -440,7 +437,7 @@
 
16223
          return;
 
16224
        }
 
16225
       else
 
16226
-       retarray->base_addr = xmalloc (alloc_size);
 
16227
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16228
     }
 
16229
   else
 
16230
     {
 
16231
Index: libgfortran/generated/parity_l16.c
 
16232
===================================================================
 
16233
--- a/src/libgfortran/generated/parity_l16.c    (.../tags/gcc_4_8_3_release)
 
16234
+++ b/src/libgfortran/generated/parity_l16.c    (.../branches/gcc-4_8-branch)
 
16235
@@ -98,10 +98,9 @@
 
16236
       retarray->offset = 0;
 
16237
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16238
 
 
16239
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16240
-                  * extent[rank-1];
 
16241
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16242
 
 
16243
-      retarray->base_addr = xmalloc (alloc_size);
 
16244
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
16245
       if (alloc_size == 0)
 
16246
        {
 
16247
          /* Make sure we have a zero-sized array.  */
 
16248
Index: libgfortran/generated/in_pack_r4.c
 
16249
===================================================================
 
16250
--- a/src/libgfortran/generated/in_pack_r4.c    (.../tags/gcc_4_8_3_release)
 
16251
+++ b/src/libgfortran/generated/in_pack_r4.c    (.../branches/gcc-4_8-branch)
 
16252
@@ -76,7 +76,7 @@
 
16253
     return source->base_addr;
 
16254
 
 
16255
   /* Allocate storage for the destination.  */
 
16256
-  destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
 
16257
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
 
16258
   dest = destptr;
 
16259
   src = source->base_addr;
 
16260
   stride0 = stride[0];
 
16261
Index: libgfortran/generated/product_i2.c
 
16262
===================================================================
 
16263
--- a/src/libgfortran/generated/product_i2.c    (.../tags/gcc_4_8_3_release)
 
16264
+++ b/src/libgfortran/generated/product_i2.c    (.../branches/gcc-4_8-branch)
 
16265
@@ -97,10 +97,9 @@
 
16266
       retarray->offset = 0;
 
16267
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16268
 
 
16269
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16270
-                  * extent[rank-1];
 
16271
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16272
 
 
16273
-      retarray->base_addr = xmalloc (alloc_size);
 
16274
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16275
       if (alloc_size == 0)
 
16276
        {
 
16277
          /* Make sure we have a zero-sized array.  */
 
16278
@@ -272,8 +271,7 @@
 
16279
 
 
16280
        }
 
16281
 
 
16282
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16283
-                  * extent[rank-1];
 
16284
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16285
 
 
16286
       retarray->offset = 0;
 
16287
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16288
@@ -285,7 +283,7 @@
 
16289
          return;
 
16290
        }
 
16291
       else
 
16292
-       retarray->base_addr = xmalloc (alloc_size);
 
16293
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16294
 
 
16295
     }
 
16296
   else
 
16297
@@ -430,8 +428,7 @@
 
16298
       retarray->offset = 0;
 
16299
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16300
 
 
16301
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16302
-                  * extent[rank-1];
 
16303
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16304
 
 
16305
       if (alloc_size == 0)
 
16306
        {
 
16307
@@ -440,7 +437,7 @@
 
16308
          return;
 
16309
        }
 
16310
       else
 
16311
-       retarray->base_addr = xmalloc (alloc_size);
 
16312
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16313
     }
 
16314
   else
 
16315
     {
 
16316
Index: libgfortran/generated/iparity_i4.c
 
16317
===================================================================
 
16318
--- a/src/libgfortran/generated/iparity_i4.c    (.../tags/gcc_4_8_3_release)
 
16319
+++ b/src/libgfortran/generated/iparity_i4.c    (.../branches/gcc-4_8-branch)
 
16320
@@ -97,10 +97,9 @@
 
16321
       retarray->offset = 0;
 
16322
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16323
 
 
16324
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16325
-                  * extent[rank-1];
 
16326
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16327
 
 
16328
-      retarray->base_addr = xmalloc (alloc_size);
 
16329
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16330
       if (alloc_size == 0)
 
16331
        {
 
16332
          /* Make sure we have a zero-sized array.  */
 
16333
@@ -272,8 +271,7 @@
 
16334
 
 
16335
        }
 
16336
 
 
16337
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16338
-                  * extent[rank-1];
 
16339
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16340
 
 
16341
       retarray->offset = 0;
 
16342
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16343
@@ -285,7 +283,7 @@
 
16344
          return;
 
16345
        }
 
16346
       else
 
16347
-       retarray->base_addr = xmalloc (alloc_size);
 
16348
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16349
 
 
16350
     }
 
16351
   else
 
16352
@@ -430,8 +428,7 @@
 
16353
       retarray->offset = 0;
 
16354
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16355
 
 
16356
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16357
-                  * extent[rank-1];
 
16358
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16359
 
 
16360
       if (alloc_size == 0)
 
16361
        {
 
16362
@@ -440,7 +437,7 @@
 
16363
          return;
 
16364
        }
 
16365
       else
 
16366
-       retarray->base_addr = xmalloc (alloc_size);
 
16367
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16368
     }
 
16369
   else
 
16370
     {
 
16371
Index: libgfortran/generated/minloc0_4_i1.c
 
16372
===================================================================
 
16373
--- a/src/libgfortran/generated/minloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
16374
+++ b/src/libgfortran/generated/minloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
16375
@@ -58,7 +58,7 @@
 
16376
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16377
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16378
       retarray->offset = 0;
 
16379
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16380
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16381
     }
 
16382
   else
 
16383
     {
 
16384
@@ -199,7 +199,7 @@
 
16385
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16386
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16387
       retarray->offset = 0;
 
16388
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16389
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16390
     }
 
16391
   else
 
16392
     {
 
16393
@@ -367,7 +367,7 @@
 
16394
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16395
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16396
       retarray->offset = 0;
 
16397
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16398
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16399
     }
 
16400
   else if (unlikely (compile_options.bounds_check))
 
16401
     {
 
16402
Index: libgfortran/generated/reshape_c4.c
 
16403
===================================================================
 
16404
--- a/src/libgfortran/generated/reshape_c4.c    (.../tags/gcc_4_8_3_release)
 
16405
+++ b/src/libgfortran/generated/reshape_c4.c    (.../branches/gcc-4_8-branch)
 
16406
@@ -111,11 +111,11 @@
 
16407
       ret->offset = 0;
 
16408
 
 
16409
       if (unlikely (rs < 1))
 
16410
-        alloc_size = 1;
 
16411
+        alloc_size = 0;
 
16412
       else
 
16413
-        alloc_size = rs * sizeof (GFC_COMPLEX_4);
 
16414
+        alloc_size = rs;
 
16415
 
 
16416
-      ret->base_addr = xmalloc (alloc_size);
 
16417
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
16418
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
16419
     }
 
16420
 
 
16421
Index: libgfortran/generated/maxloc0_4_r16.c
 
16422
===================================================================
 
16423
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
16424
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
16425
@@ -58,7 +58,7 @@
 
16426
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16427
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16428
       retarray->offset = 0;
 
16429
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16430
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16431
     }
 
16432
   else
 
16433
     {
 
16434
@@ -199,7 +199,7 @@
 
16435
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16436
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16437
       retarray->offset = 0;
 
16438
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16439
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16440
     }
 
16441
   else
 
16442
     {
 
16443
@@ -367,7 +367,7 @@
 
16444
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16445
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16446
       retarray->offset = 0;
 
16447
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16448
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16449
     }
 
16450
   else if (unlikely (compile_options.bounds_check))
 
16451
     {
 
16452
Index: libgfortran/generated/iall_i8.c
 
16453
===================================================================
 
16454
--- a/src/libgfortran/generated/iall_i8.c       (.../tags/gcc_4_8_3_release)
 
16455
+++ b/src/libgfortran/generated/iall_i8.c       (.../branches/gcc-4_8-branch)
 
16456
@@ -97,10 +97,9 @@
 
16457
       retarray->offset = 0;
 
16458
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16459
 
 
16460
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16461
-                  * extent[rank-1];
 
16462
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16463
 
 
16464
-      retarray->base_addr = xmalloc (alloc_size);
 
16465
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16466
       if (alloc_size == 0)
 
16467
        {
 
16468
          /* Make sure we have a zero-sized array.  */
 
16469
@@ -272,8 +271,7 @@
 
16470
 
 
16471
        }
 
16472
 
 
16473
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16474
-                  * extent[rank-1];
 
16475
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16476
 
 
16477
       retarray->offset = 0;
 
16478
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16479
@@ -285,7 +283,7 @@
 
16480
          return;
 
16481
        }
 
16482
       else
 
16483
-       retarray->base_addr = xmalloc (alloc_size);
 
16484
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16485
 
 
16486
     }
 
16487
   else
 
16488
@@ -430,8 +428,7 @@
 
16489
       retarray->offset = 0;
 
16490
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16491
 
 
16492
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16493
-                  * extent[rank-1];
 
16494
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16495
 
 
16496
       if (alloc_size == 0)
 
16497
        {
 
16498
@@ -440,7 +437,7 @@
 
16499
          return;
 
16500
        }
 
16501
       else
 
16502
-       retarray->base_addr = xmalloc (alloc_size);
 
16503
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16504
     }
 
16505
   else
 
16506
     {
 
16507
Index: libgfortran/generated/maxloc1_8_r16.c
 
16508
===================================================================
 
16509
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
16510
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
16511
@@ -98,10 +98,9 @@
 
16512
       retarray->offset = 0;
 
16513
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16514
 
 
16515
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16516
-                  * extent[rank-1];
 
16517
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16518
 
 
16519
-      retarray->base_addr = xmalloc (alloc_size);
 
16520
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16521
       if (alloc_size == 0)
 
16522
        {
 
16523
          /* Make sure we have a zero-sized array.  */
 
16524
@@ -294,8 +293,7 @@
 
16525
 
 
16526
        }
 
16527
 
 
16528
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16529
-                  * extent[rank-1];
 
16530
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16531
 
 
16532
       retarray->offset = 0;
 
16533
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16534
@@ -307,7 +305,7 @@
 
16535
          return;
 
16536
        }
 
16537
       else
 
16538
-       retarray->base_addr = xmalloc (alloc_size);
 
16539
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16540
 
 
16541
     }
 
16542
   else
 
16543
@@ -485,8 +483,7 @@
 
16544
       retarray->offset = 0;
 
16545
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16546
 
 
16547
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16548
-                  * extent[rank-1];
 
16549
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16550
 
 
16551
       if (alloc_size == 0)
 
16552
        {
 
16553
@@ -495,7 +492,7 @@
 
16554
          return;
 
16555
        }
 
16556
       else
 
16557
-       retarray->base_addr = xmalloc (alloc_size);
 
16558
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16559
     }
 
16560
   else
 
16561
     {
 
16562
Index: libgfortran/generated/sum_r16.c
 
16563
===================================================================
 
16564
--- a/src/libgfortran/generated/sum_r16.c       (.../tags/gcc_4_8_3_release)
 
16565
+++ b/src/libgfortran/generated/sum_r16.c       (.../branches/gcc-4_8-branch)
 
16566
@@ -97,10 +97,9 @@
 
16567
       retarray->offset = 0;
 
16568
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16569
 
 
16570
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16571
-                  * extent[rank-1];
 
16572
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16573
 
 
16574
-      retarray->base_addr = xmalloc (alloc_size);
 
16575
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16576
       if (alloc_size == 0)
 
16577
        {
 
16578
          /* Make sure we have a zero-sized array.  */
 
16579
@@ -272,8 +271,7 @@
 
16580
 
 
16581
        }
 
16582
 
 
16583
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16584
-                  * extent[rank-1];
 
16585
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16586
 
 
16587
       retarray->offset = 0;
 
16588
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16589
@@ -285,7 +283,7 @@
 
16590
          return;
 
16591
        }
 
16592
       else
 
16593
-       retarray->base_addr = xmalloc (alloc_size);
 
16594
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16595
 
 
16596
     }
 
16597
   else
 
16598
@@ -430,8 +428,7 @@
 
16599
       retarray->offset = 0;
 
16600
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16601
 
 
16602
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16603
-                  * extent[rank-1];
 
16604
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16605
 
 
16606
       if (alloc_size == 0)
 
16607
        {
 
16608
@@ -440,7 +437,7 @@
 
16609
          return;
 
16610
        }
 
16611
       else
 
16612
-       retarray->base_addr = xmalloc (alloc_size);
 
16613
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16614
     }
 
16615
   else
 
16616
     {
 
16617
Index: libgfortran/generated/sum_i1.c
 
16618
===================================================================
 
16619
--- a/src/libgfortran/generated/sum_i1.c        (.../tags/gcc_4_8_3_release)
 
16620
+++ b/src/libgfortran/generated/sum_i1.c        (.../branches/gcc-4_8-branch)
 
16621
@@ -97,10 +97,9 @@
 
16622
       retarray->offset = 0;
 
16623
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16624
 
 
16625
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16626
-                  * extent[rank-1];
 
16627
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16628
 
 
16629
-      retarray->base_addr = xmalloc (alloc_size);
 
16630
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16631
       if (alloc_size == 0)
 
16632
        {
 
16633
          /* Make sure we have a zero-sized array.  */
 
16634
@@ -272,8 +271,7 @@
 
16635
 
 
16636
        }
 
16637
 
 
16638
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16639
-                  * extent[rank-1];
 
16640
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16641
 
 
16642
       retarray->offset = 0;
 
16643
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16644
@@ -285,7 +283,7 @@
 
16645
          return;
 
16646
        }
 
16647
       else
 
16648
-       retarray->base_addr = xmalloc (alloc_size);
 
16649
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16650
 
 
16651
     }
 
16652
   else
 
16653
@@ -430,8 +428,7 @@
 
16654
       retarray->offset = 0;
 
16655
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16656
 
 
16657
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16658
-                  * extent[rank-1];
 
16659
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16660
 
 
16661
       if (alloc_size == 0)
 
16662
        {
 
16663
@@ -440,7 +437,7 @@
 
16664
          return;
 
16665
        }
 
16666
       else
 
16667
-       retarray->base_addr = xmalloc (alloc_size);
 
16668
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16669
     }
 
16670
   else
 
16671
     {
 
16672
Index: libgfortran/generated/in_pack_i2.c
 
16673
===================================================================
 
16674
--- a/src/libgfortran/generated/in_pack_i2.c    (.../tags/gcc_4_8_3_release)
 
16675
+++ b/src/libgfortran/generated/in_pack_i2.c    (.../branches/gcc-4_8-branch)
 
16676
@@ -76,7 +76,7 @@
 
16677
     return source->base_addr;
 
16678
 
 
16679
   /* Allocate storage for the destination.  */
 
16680
-  destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
 
16681
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
 
16682
   dest = destptr;
 
16683
   src = source->base_addr;
 
16684
   stride0 = stride[0];
 
16685
Index: libgfortran/generated/transpose_r10.c
 
16686
===================================================================
 
16687
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
 
16688
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
 
16689
@@ -60,7 +60,8 @@
 
16690
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
16691
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
16692
 
 
16693
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
 
16694
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
16695
+                                     sizeof (GFC_REAL_10));
 
16696
       ret->offset = 0;
 
16697
     } else if (unlikely (compile_options.bounds_check))
 
16698
     {
 
16699
Index: libgfortran/generated/maxloc1_16_r16.c
 
16700
===================================================================
 
16701
--- a/src/libgfortran/generated/maxloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
16702
+++ b/src/libgfortran/generated/maxloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
16703
@@ -98,10 +98,9 @@
 
16704
       retarray->offset = 0;
 
16705
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16706
 
 
16707
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16708
-                  * extent[rank-1];
 
16709
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16710
 
 
16711
-      retarray->base_addr = xmalloc (alloc_size);
 
16712
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16713
       if (alloc_size == 0)
 
16714
        {
 
16715
          /* Make sure we have a zero-sized array.  */
 
16716
@@ -294,8 +293,7 @@
 
16717
 
 
16718
        }
 
16719
 
 
16720
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16721
-                  * extent[rank-1];
 
16722
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16723
 
 
16724
       retarray->offset = 0;
 
16725
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16726
@@ -307,7 +305,7 @@
 
16727
          return;
 
16728
        }
 
16729
       else
 
16730
-       retarray->base_addr = xmalloc (alloc_size);
 
16731
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16732
 
 
16733
     }
 
16734
   else
 
16735
@@ -485,8 +483,7 @@
 
16736
       retarray->offset = 0;
 
16737
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16738
 
 
16739
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16740
-                  * extent[rank-1];
 
16741
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16742
 
 
16743
       if (alloc_size == 0)
 
16744
        {
 
16745
@@ -495,7 +492,7 @@
 
16746
          return;
 
16747
        }
 
16748
       else
 
16749
-       retarray->base_addr = xmalloc (alloc_size);
 
16750
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16751
     }
 
16752
   else
 
16753
     {
 
16754
Index: libgfortran/generated/maxloc1_16_i4.c
 
16755
===================================================================
 
16756
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
16757
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
16758
@@ -98,10 +98,9 @@
 
16759
       retarray->offset = 0;
 
16760
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16761
 
 
16762
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16763
-                  * extent[rank-1];
 
16764
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16765
 
 
16766
-      retarray->base_addr = xmalloc (alloc_size);
 
16767
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16768
       if (alloc_size == 0)
 
16769
        {
 
16770
          /* Make sure we have a zero-sized array.  */
 
16771
@@ -294,8 +293,7 @@
 
16772
 
 
16773
        }
 
16774
 
 
16775
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16776
-                  * extent[rank-1];
 
16777
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16778
 
 
16779
       retarray->offset = 0;
 
16780
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16781
@@ -307,7 +305,7 @@
 
16782
          return;
 
16783
        }
 
16784
       else
 
16785
-       retarray->base_addr = xmalloc (alloc_size);
 
16786
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16787
 
 
16788
     }
 
16789
   else
 
16790
@@ -485,8 +483,7 @@
 
16791
       retarray->offset = 0;
 
16792
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16793
 
 
16794
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16795
-                  * extent[rank-1];
 
16796
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16797
 
 
16798
       if (alloc_size == 0)
 
16799
        {
 
16800
@@ -495,7 +492,7 @@
 
16801
          return;
 
16802
        }
 
16803
       else
 
16804
-       retarray->base_addr = xmalloc (alloc_size);
 
16805
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16806
     }
 
16807
   else
 
16808
     {
 
16809
Index: libgfortran/generated/spread_i1.c
 
16810
===================================================================
 
16811
--- a/src/libgfortran/generated/spread_i1.c     (.../tags/gcc_4_8_3_release)
 
16812
+++ b/src/libgfortran/generated/spread_i1.c     (.../branches/gcc-4_8-branch)
 
16813
@@ -101,8 +101,8 @@
 
16814
        }
 
16815
       ret->offset = 0;
 
16816
 
 
16817
-      /* xmalloc allocates a single byte for zero size.  */
 
16818
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
 
16819
+      /* xmallocarray allocates a single byte for zero size.  */
 
16820
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
 
16821
       if (rs <= 0)
 
16822
         return;
 
16823
     }
 
16824
@@ -244,7 +244,7 @@
 
16825
 
 
16826
   if (ret->base_addr == NULL)
 
16827
     {
 
16828
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
 
16829
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
 
16830
       ret->offset = 0;
 
16831
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16832
     }
 
16833
Index: libgfortran/generated/maxloc0_16_i8.c
 
16834
===================================================================
 
16835
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
16836
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
16837
@@ -58,7 +58,7 @@
 
16838
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16839
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16840
       retarray->offset = 0;
 
16841
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16842
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16843
     }
 
16844
   else
 
16845
     {
 
16846
@@ -199,7 +199,7 @@
 
16847
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16848
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16849
       retarray->offset = 0;
 
16850
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16851
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16852
     }
 
16853
   else
 
16854
     {
 
16855
@@ -367,7 +367,7 @@
 
16856
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16857
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16858
       retarray->offset = 0;
 
16859
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16860
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16861
     }
 
16862
   else if (unlikely (compile_options.bounds_check))
 
16863
     {
 
16864
Index: libgfortran/generated/maxval_r16.c
 
16865
===================================================================
 
16866
--- a/src/libgfortran/generated/maxval_r16.c    (.../tags/gcc_4_8_3_release)
 
16867
+++ b/src/libgfortran/generated/maxval_r16.c    (.../branches/gcc-4_8-branch)
 
16868
@@ -97,10 +97,9 @@
 
16869
       retarray->offset = 0;
 
16870
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16871
 
 
16872
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16873
-                  * extent[rank-1];
 
16874
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16875
 
 
16876
-      retarray->base_addr = xmalloc (alloc_size);
 
16877
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16878
       if (alloc_size == 0)
 
16879
        {
 
16880
          /* Make sure we have a zero-sized array.  */
 
16881
@@ -286,8 +285,7 @@
 
16882
 
 
16883
        }
 
16884
 
 
16885
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16886
-                  * extent[rank-1];
 
16887
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16888
 
 
16889
       retarray->offset = 0;
 
16890
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16891
@@ -299,7 +297,7 @@
 
16892
          return;
 
16893
        }
 
16894
       else
 
16895
-       retarray->base_addr = xmalloc (alloc_size);
 
16896
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16897
 
 
16898
     }
 
16899
   else
 
16900
@@ -472,8 +470,7 @@
 
16901
       retarray->offset = 0;
 
16902
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16903
 
 
16904
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16905
-                  * extent[rank-1];
 
16906
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16907
 
 
16908
       if (alloc_size == 0)
 
16909
        {
 
16910
@@ -482,7 +479,7 @@
 
16911
          return;
 
16912
        }
 
16913
       else
 
16914
-       retarray->base_addr = xmalloc (alloc_size);
 
16915
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
16916
     }
 
16917
   else
 
16918
     {
 
16919
Index: libgfortran/generated/product_c10.c
 
16920
===================================================================
 
16921
--- a/src/libgfortran/generated/product_c10.c   (.../tags/gcc_4_8_3_release)
 
16922
+++ b/src/libgfortran/generated/product_c10.c   (.../branches/gcc-4_8-branch)
 
16923
@@ -97,10 +97,9 @@
 
16924
       retarray->offset = 0;
 
16925
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16926
 
 
16927
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16928
-                  * extent[rank-1];
 
16929
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16930
 
 
16931
-      retarray->base_addr = xmalloc (alloc_size);
 
16932
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
16933
       if (alloc_size == 0)
 
16934
        {
 
16935
          /* Make sure we have a zero-sized array.  */
 
16936
@@ -272,8 +271,7 @@
 
16937
 
 
16938
        }
 
16939
 
 
16940
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16941
-                  * extent[rank-1];
 
16942
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16943
 
 
16944
       retarray->offset = 0;
 
16945
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16946
@@ -285,7 +283,7 @@
 
16947
          return;
 
16948
        }
 
16949
       else
 
16950
-       retarray->base_addr = xmalloc (alloc_size);
 
16951
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
16952
 
 
16953
     }
 
16954
   else
 
16955
@@ -430,8 +428,7 @@
 
16956
       retarray->offset = 0;
 
16957
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16958
 
 
16959
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16960
-                  * extent[rank-1];
 
16961
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16962
 
 
16963
       if (alloc_size == 0)
 
16964
        {
 
16965
@@ -440,7 +437,7 @@
 
16966
          return;
 
16967
        }
 
16968
       else
 
16969
-       retarray->base_addr = xmalloc (alloc_size);
 
16970
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
16971
     }
 
16972
   else
 
16973
     {
 
16974
Index: libgfortran/generated/minloc1_8_i4.c
 
16975
===================================================================
 
16976
--- a/src/libgfortran/generated/minloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
16977
+++ b/src/libgfortran/generated/minloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
16978
@@ -98,10 +98,9 @@
 
16979
       retarray->offset = 0;
 
16980
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16981
 
 
16982
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16983
-                  * extent[rank-1];
 
16984
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16985
 
 
16986
-      retarray->base_addr = xmalloc (alloc_size);
 
16987
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16988
       if (alloc_size == 0)
 
16989
        {
 
16990
          /* Make sure we have a zero-sized array.  */
 
16991
@@ -294,8 +293,7 @@
 
16992
 
 
16993
        }
 
16994
 
 
16995
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16996
-                  * extent[rank-1];
 
16997
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16998
 
 
16999
       retarray->offset = 0;
 
17000
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17001
@@ -307,7 +305,7 @@
 
17002
          return;
 
17003
        }
 
17004
       else
 
17005
-       retarray->base_addr = xmalloc (alloc_size);
 
17006
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17007
 
 
17008
     }
 
17009
   else
 
17010
@@ -485,8 +483,7 @@
 
17011
       retarray->offset = 0;
 
17012
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17013
 
 
17014
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17015
-                  * extent[rank-1];
 
17016
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17017
 
 
17018
       if (alloc_size == 0)
 
17019
        {
 
17020
@@ -495,7 +492,7 @@
 
17021
          return;
 
17022
        }
 
17023
       else
 
17024
-       retarray->base_addr = xmalloc (alloc_size);
 
17025
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17026
     }
 
17027
   else
 
17028
     {
 
17029
Index: libgfortran/generated/minloc0_16_i16.c
 
17030
===================================================================
 
17031
--- a/src/libgfortran/generated/minloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
17032
+++ b/src/libgfortran/generated/minloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
17033
@@ -58,7 +58,7 @@
 
17034
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17035
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17036
       retarray->offset = 0;
 
17037
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17038
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17039
     }
 
17040
   else
 
17041
     {
 
17042
@@ -199,7 +199,7 @@
 
17043
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17044
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17045
       retarray->offset = 0;
 
17046
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17047
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17048
     }
 
17049
   else
 
17050
     {
 
17051
@@ -367,7 +367,7 @@
 
17052
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17053
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17054
       retarray->offset = 0;
 
17055
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17056
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17057
     }
 
17058
   else if (unlikely (compile_options.bounds_check))
 
17059
     {
 
17060
Index: libgfortran/generated/matmul_r16.c
 
17061
===================================================================
 
17062
--- a/src/libgfortran/generated/matmul_r16.c    (.../tags/gcc_4_8_3_release)
 
17063
+++ b/src/libgfortran/generated/matmul_r16.c    (.../branches/gcc-4_8-branch)
 
17064
@@ -124,7 +124,7 @@
 
17065
         }
 
17066
 
 
17067
       retarray->base_addr
 
17068
-       = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
 
17069
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
 
17070
       retarray->offset = 0;
 
17071
     }
 
17072
     else if (unlikely (compile_options.bounds_check))
 
17073
Index: libgfortran/generated/minloc0_4_r4.c
 
17074
===================================================================
 
17075
--- a/src/libgfortran/generated/minloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
17076
+++ b/src/libgfortran/generated/minloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
17077
@@ -58,7 +58,7 @@
 
17078
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17079
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17080
       retarray->offset = 0;
 
17081
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17082
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17083
     }
 
17084
   else
 
17085
     {
 
17086
@@ -199,7 +199,7 @@
 
17087
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17088
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17089
       retarray->offset = 0;
 
17090
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17091
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17092
     }
 
17093
   else
 
17094
     {
 
17095
@@ -367,7 +367,7 @@
 
17096
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17097
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17098
       retarray->offset = 0;
 
17099
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17100
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17101
     }
 
17102
   else if (unlikely (compile_options.bounds_check))
 
17103
     {
 
17104
Index: libgfortran/generated/iany_i2.c
 
17105
===================================================================
 
17106
--- a/src/libgfortran/generated/iany_i2.c       (.../tags/gcc_4_8_3_release)
 
17107
+++ b/src/libgfortran/generated/iany_i2.c       (.../branches/gcc-4_8-branch)
 
17108
@@ -97,10 +97,9 @@
 
17109
       retarray->offset = 0;
 
17110
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17111
 
 
17112
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17113
-                  * extent[rank-1];
 
17114
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17115
 
 
17116
-      retarray->base_addr = xmalloc (alloc_size);
 
17117
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17118
       if (alloc_size == 0)
 
17119
        {
 
17120
          /* Make sure we have a zero-sized array.  */
 
17121
@@ -272,8 +271,7 @@
 
17122
 
 
17123
        }
 
17124
 
 
17125
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17126
-                  * extent[rank-1];
 
17127
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17128
 
 
17129
       retarray->offset = 0;
 
17130
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17131
@@ -285,7 +283,7 @@
 
17132
          return;
 
17133
        }
 
17134
       else
 
17135
-       retarray->base_addr = xmalloc (alloc_size);
 
17136
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17137
 
 
17138
     }
 
17139
   else
 
17140
@@ -430,8 +428,7 @@
 
17141
       retarray->offset = 0;
 
17142
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17143
 
 
17144
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17145
-                  * extent[rank-1];
 
17146
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17147
 
 
17148
       if (alloc_size == 0)
 
17149
        {
 
17150
@@ -440,7 +437,7 @@
 
17151
          return;
 
17152
        }
 
17153
       else
 
17154
-       retarray->base_addr = xmalloc (alloc_size);
 
17155
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17156
     }
 
17157
   else
 
17158
     {
 
17159
Index: libgfortran/generated/sum_r4.c
 
17160
===================================================================
 
17161
--- a/src/libgfortran/generated/sum_r4.c        (.../tags/gcc_4_8_3_release)
 
17162
+++ b/src/libgfortran/generated/sum_r4.c        (.../branches/gcc-4_8-branch)
 
17163
@@ -97,10 +97,9 @@
 
17164
       retarray->offset = 0;
 
17165
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17166
 
 
17167
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17168
-                  * extent[rank-1];
 
17169
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17170
 
 
17171
-      retarray->base_addr = xmalloc (alloc_size);
 
17172
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17173
       if (alloc_size == 0)
 
17174
        {
 
17175
          /* Make sure we have a zero-sized array.  */
 
17176
@@ -272,8 +271,7 @@
 
17177
 
 
17178
        }
 
17179
 
 
17180
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17181
-                  * extent[rank-1];
 
17182
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17183
 
 
17184
       retarray->offset = 0;
 
17185
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17186
@@ -285,7 +283,7 @@
 
17187
          return;
 
17188
        }
 
17189
       else
 
17190
-       retarray->base_addr = xmalloc (alloc_size);
 
17191
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17192
 
 
17193
     }
 
17194
   else
 
17195
@@ -430,8 +428,7 @@
 
17196
       retarray->offset = 0;
 
17197
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17198
 
 
17199
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17200
-                  * extent[rank-1];
 
17201
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17202
 
 
17203
       if (alloc_size == 0)
 
17204
        {
 
17205
@@ -440,7 +437,7 @@
 
17206
          return;
 
17207
        }
 
17208
       else
 
17209
-       retarray->base_addr = xmalloc (alloc_size);
 
17210
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17211
     }
 
17212
   else
 
17213
     {
 
17214
Index: libgfortran/generated/unpack_c8.c
 
17215
===================================================================
 
17216
--- a/src/libgfortran/generated/unpack_c8.c     (.../tags/gcc_4_8_3_release)
 
17217
+++ b/src/libgfortran/generated/unpack_c8.c     (.../branches/gcc-4_8-branch)
 
17218
@@ -99,7 +99,7 @@
 
17219
          rs *= extent[n];
 
17220
        }
 
17221
       ret->offset = 0;
 
17222
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
17223
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
17224
     }
 
17225
   else
 
17226
     {
 
17227
@@ -244,7 +244,7 @@
 
17228
          rs *= extent[n];
 
17229
        }
 
17230
       ret->offset = 0;
 
17231
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
17232
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
17233
     }
 
17234
   else
 
17235
     {
 
17236
Index: libgfortran/generated/in_pack_c16.c
 
17237
===================================================================
 
17238
--- a/src/libgfortran/generated/in_pack_c16.c   (.../tags/gcc_4_8_3_release)
 
17239
+++ b/src/libgfortran/generated/in_pack_c16.c   (.../branches/gcc-4_8-branch)
 
17240
@@ -76,7 +76,7 @@
 
17241
     return source->base_addr;
 
17242
 
 
17243
   /* Allocate storage for the destination.  */
 
17244
-  destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
 
17245
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
 
17246
   dest = destptr;
 
17247
   src = source->base_addr;
 
17248
   stride0 = stride[0];
 
17249
Index: libgfortran/generated/minloc0_4_i2.c
 
17250
===================================================================
 
17251
--- a/src/libgfortran/generated/minloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
17252
+++ b/src/libgfortran/generated/minloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
17253
@@ -58,7 +58,7 @@
 
17254
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17255
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17256
       retarray->offset = 0;
 
17257
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17258
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17259
     }
 
17260
   else
 
17261
     {
 
17262
@@ -199,7 +199,7 @@
 
17263
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17264
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17265
       retarray->offset = 0;
 
17266
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17267
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17268
     }
 
17269
   else
 
17270
     {
 
17271
@@ -367,7 +367,7 @@
 
17272
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17273
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17274
       retarray->offset = 0;
 
17275
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17276
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17277
     }
 
17278
   else if (unlikely (compile_options.bounds_check))
 
17279
     {
 
17280
Index: libgfortran/generated/spread_c10.c
 
17281
===================================================================
 
17282
--- a/src/libgfortran/generated/spread_c10.c    (.../tags/gcc_4_8_3_release)
 
17283
+++ b/src/libgfortran/generated/spread_c10.c    (.../branches/gcc-4_8-branch)
 
17284
@@ -101,8 +101,8 @@
 
17285
        }
 
17286
       ret->offset = 0;
 
17287
 
 
17288
-      /* xmalloc allocates a single byte for zero size.  */
 
17289
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
 
17290
+      /* xmallocarray allocates a single byte for zero size.  */
 
17291
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
 
17292
       if (rs <= 0)
 
17293
         return;
 
17294
     }
 
17295
@@ -244,7 +244,7 @@
 
17296
 
 
17297
   if (ret->base_addr == NULL)
 
17298
     {
 
17299
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
 
17300
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
 
17301
       ret->offset = 0;
 
17302
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17303
     }
 
17304
Index: libgfortran/generated/maxloc0_8_i1.c
 
17305
===================================================================
 
17306
--- a/src/libgfortran/generated/maxloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
17307
+++ b/src/libgfortran/generated/maxloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
17308
@@ -58,7 +58,7 @@
 
17309
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17310
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17311
       retarray->offset = 0;
 
17312
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17313
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17314
     }
 
17315
   else
 
17316
     {
 
17317
@@ -199,7 +199,7 @@
 
17318
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17319
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17320
       retarray->offset = 0;
 
17321
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17322
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17323
     }
 
17324
   else
 
17325
     {
 
17326
@@ -367,7 +367,7 @@
 
17327
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17328
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17329
       retarray->offset = 0;
 
17330
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17331
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17332
     }
 
17333
   else if (unlikely (compile_options.bounds_check))
 
17334
     {
 
17335
Index: libgfortran/generated/spread_r4.c
 
17336
===================================================================
 
17337
--- a/src/libgfortran/generated/spread_r4.c     (.../tags/gcc_4_8_3_release)
 
17338
+++ b/src/libgfortran/generated/spread_r4.c     (.../branches/gcc-4_8-branch)
 
17339
@@ -101,8 +101,8 @@
 
17340
        }
 
17341
       ret->offset = 0;
 
17342
 
 
17343
-      /* xmalloc allocates a single byte for zero size.  */
 
17344
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
 
17345
+      /* xmallocarray allocates a single byte for zero size.  */
 
17346
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
 
17347
       if (rs <= 0)
 
17348
         return;
 
17349
     }
 
17350
@@ -244,7 +244,7 @@
 
17351
 
 
17352
   if (ret->base_addr == NULL)
 
17353
     {
 
17354
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
 
17355
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
 
17356
       ret->offset = 0;
 
17357
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17358
     }
 
17359
Index: libgfortran/generated/minloc0_8_i8.c
 
17360
===================================================================
 
17361
--- a/src/libgfortran/generated/minloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
17362
+++ b/src/libgfortran/generated/minloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
17363
@@ -58,7 +58,7 @@
 
17364
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17365
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17366
       retarray->offset = 0;
 
17367
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17368
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17369
     }
 
17370
   else
 
17371
     {
 
17372
@@ -199,7 +199,7 @@
 
17373
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17374
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17375
       retarray->offset = 0;
 
17376
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17377
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17378
     }
 
17379
   else
 
17380
     {
 
17381
@@ -367,7 +367,7 @@
 
17382
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17383
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17384
       retarray->offset = 0;
 
17385
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17386
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17387
     }
 
17388
   else if (unlikely (compile_options.bounds_check))
 
17389
     {
 
17390
Index: libgfortran/generated/matmul_c8.c
 
17391
===================================================================
 
17392
--- a/src/libgfortran/generated/matmul_c8.c     (.../tags/gcc_4_8_3_release)
 
17393
+++ b/src/libgfortran/generated/matmul_c8.c     (.../branches/gcc-4_8-branch)
 
17394
@@ -124,7 +124,7 @@
 
17395
         }
 
17396
 
 
17397
       retarray->base_addr
 
17398
-       = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
 
17399
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
 
17400
       retarray->offset = 0;
 
17401
     }
 
17402
     else if (unlikely (compile_options.bounds_check))
 
17403
Index: libgfortran/generated/minloc1_16_r10.c
 
17404
===================================================================
 
17405
--- a/src/libgfortran/generated/minloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
17406
+++ b/src/libgfortran/generated/minloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
17407
@@ -98,10 +98,9 @@
 
17408
       retarray->offset = 0;
 
17409
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17410
 
 
17411
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17412
-                  * extent[rank-1];
 
17413
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17414
 
 
17415
-      retarray->base_addr = xmalloc (alloc_size);
 
17416
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17417
       if (alloc_size == 0)
 
17418
        {
 
17419
          /* Make sure we have a zero-sized array.  */
 
17420
@@ -294,8 +293,7 @@
 
17421
 
 
17422
        }
 
17423
 
 
17424
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17425
-                  * extent[rank-1];
 
17426
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17427
 
 
17428
       retarray->offset = 0;
 
17429
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17430
@@ -307,7 +305,7 @@
 
17431
          return;
 
17432
        }
 
17433
       else
 
17434
-       retarray->base_addr = xmalloc (alloc_size);
 
17435
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17436
 
 
17437
     }
 
17438
   else
 
17439
@@ -485,8 +483,7 @@
 
17440
       retarray->offset = 0;
 
17441
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17442
 
 
17443
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17444
-                  * extent[rank-1];
 
17445
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17446
 
 
17447
       if (alloc_size == 0)
 
17448
        {
 
17449
@@ -495,7 +492,7 @@
 
17450
          return;
 
17451
        }
 
17452
       else
 
17453
-       retarray->base_addr = xmalloc (alloc_size);
 
17454
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17455
     }
 
17456
   else
 
17457
     {
 
17458
Index: libgfortran/generated/sum_i2.c
 
17459
===================================================================
 
17460
--- a/src/libgfortran/generated/sum_i2.c        (.../tags/gcc_4_8_3_release)
 
17461
+++ b/src/libgfortran/generated/sum_i2.c        (.../branches/gcc-4_8-branch)
 
17462
@@ -97,10 +97,9 @@
 
17463
       retarray->offset = 0;
 
17464
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17465
 
 
17466
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17467
-                  * extent[rank-1];
 
17468
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17469
 
 
17470
-      retarray->base_addr = xmalloc (alloc_size);
 
17471
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17472
       if (alloc_size == 0)
 
17473
        {
 
17474
          /* Make sure we have a zero-sized array.  */
 
17475
@@ -272,8 +271,7 @@
 
17476
 
 
17477
        }
 
17478
 
 
17479
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17480
-                  * extent[rank-1];
 
17481
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17482
 
 
17483
       retarray->offset = 0;
 
17484
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17485
@@ -285,7 +283,7 @@
 
17486
          return;
 
17487
        }
 
17488
       else
 
17489
-       retarray->base_addr = xmalloc (alloc_size);
 
17490
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17491
 
 
17492
     }
 
17493
   else
 
17494
@@ -430,8 +428,7 @@
 
17495
       retarray->offset = 0;
 
17496
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17497
 
 
17498
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17499
-                  * extent[rank-1];
 
17500
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17501
 
 
17502
       if (alloc_size == 0)
 
17503
        {
 
17504
@@ -440,7 +437,7 @@
 
17505
          return;
 
17506
        }
 
17507
       else
 
17508
-       retarray->base_addr = xmalloc (alloc_size);
 
17509
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17510
     }
 
17511
   else
 
17512
     {
 
17513
Index: libgfortran/generated/iparity_i16.c
 
17514
===================================================================
 
17515
--- a/src/libgfortran/generated/iparity_i16.c   (.../tags/gcc_4_8_3_release)
 
17516
+++ b/src/libgfortran/generated/iparity_i16.c   (.../branches/gcc-4_8-branch)
 
17517
@@ -97,10 +97,9 @@
 
17518
       retarray->offset = 0;
 
17519
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17520
 
 
17521
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17522
-                  * extent[rank-1];
 
17523
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17524
 
 
17525
-      retarray->base_addr = xmalloc (alloc_size);
 
17526
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17527
       if (alloc_size == 0)
 
17528
        {
 
17529
          /* Make sure we have a zero-sized array.  */
 
17530
@@ -272,8 +271,7 @@
 
17531
 
 
17532
        }
 
17533
 
 
17534
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17535
-                  * extent[rank-1];
 
17536
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17537
 
 
17538
       retarray->offset = 0;
 
17539
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17540
@@ -285,7 +283,7 @@
 
17541
          return;
 
17542
        }
 
17543
       else
 
17544
-       retarray->base_addr = xmalloc (alloc_size);
 
17545
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17546
 
 
17547
     }
 
17548
   else
 
17549
@@ -430,8 +428,7 @@
 
17550
       retarray->offset = 0;
 
17551
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17552
 
 
17553
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17554
-                  * extent[rank-1];
 
17555
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17556
 
 
17557
       if (alloc_size == 0)
 
17558
        {
 
17559
@@ -440,7 +437,7 @@
 
17560
          return;
 
17561
        }
 
17562
       else
 
17563
-       retarray->base_addr = xmalloc (alloc_size);
 
17564
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17565
     }
 
17566
   else
 
17567
     {
 
17568
Index: libgfortran/generated/minloc0_16_i1.c
 
17569
===================================================================
 
17570
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
17571
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
17572
@@ -58,7 +58,7 @@
 
17573
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17574
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17575
       retarray->offset = 0;
 
17576
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17577
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17578
     }
 
17579
   else
 
17580
     {
 
17581
@@ -199,7 +199,7 @@
 
17582
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17583
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17584
       retarray->offset = 0;
 
17585
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17586
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17587
     }
 
17588
   else
 
17589
     {
 
17590
@@ -367,7 +367,7 @@
 
17591
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17592
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17593
       retarray->offset = 0;
 
17594
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17595
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17596
     }
 
17597
   else if (unlikely (compile_options.bounds_check))
 
17598
     {
 
17599
Index: libgfortran/generated/reshape_c16.c
 
17600
===================================================================
 
17601
--- a/src/libgfortran/generated/reshape_c16.c   (.../tags/gcc_4_8_3_release)
 
17602
+++ b/src/libgfortran/generated/reshape_c16.c   (.../branches/gcc-4_8-branch)
 
17603
@@ -111,11 +111,11 @@
 
17604
       ret->offset = 0;
 
17605
 
 
17606
       if (unlikely (rs < 1))
 
17607
-        alloc_size = 1;
 
17608
+        alloc_size = 0;
 
17609
       else
 
17610
-        alloc_size = rs * sizeof (GFC_COMPLEX_16);
 
17611
+        alloc_size = rs;
 
17612
 
 
17613
-      ret->base_addr = xmalloc (alloc_size);
 
17614
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17615
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
17616
     }
 
17617
 
 
17618
Index: libgfortran/generated/pack_c4.c
 
17619
===================================================================
 
17620
--- a/src/libgfortran/generated/pack_c4.c       (.../tags/gcc_4_8_3_release)
 
17621
+++ b/src/libgfortran/generated/pack_c4.c       (.../branches/gcc-4_8-branch)
 
17622
@@ -167,8 +167,8 @@
 
17623
 
 
17624
          ret->offset = 0;
 
17625
 
 
17626
-         /* xmalloc allocates a single byte for zero size.  */
 
17627
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
 
17628
+         /* xmallocarray allocates a single byte for zero size.  */
 
17629
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
 
17630
 
 
17631
          if (total == 0)
 
17632
            return;
 
17633
Index: libgfortran/generated/parity_l4.c
 
17634
===================================================================
 
17635
--- a/src/libgfortran/generated/parity_l4.c     (.../tags/gcc_4_8_3_release)
 
17636
+++ b/src/libgfortran/generated/parity_l4.c     (.../branches/gcc-4_8-branch)
 
17637
@@ -98,10 +98,9 @@
 
17638
       retarray->offset = 0;
 
17639
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17640
 
 
17641
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17642
-                  * extent[rank-1];
 
17643
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17644
 
 
17645
-      retarray->base_addr = xmalloc (alloc_size);
 
17646
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
17647
       if (alloc_size == 0)
 
17648
        {
 
17649
          /* Make sure we have a zero-sized array.  */
 
17650
Index: libgfortran/generated/spread_i2.c
 
17651
===================================================================
 
17652
--- a/src/libgfortran/generated/spread_i2.c     (.../tags/gcc_4_8_3_release)
 
17653
+++ b/src/libgfortran/generated/spread_i2.c     (.../branches/gcc-4_8-branch)
 
17654
@@ -101,8 +101,8 @@
 
17655
        }
 
17656
       ret->offset = 0;
 
17657
 
 
17658
-      /* xmalloc allocates a single byte for zero size.  */
 
17659
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
 
17660
+      /* xmallocarray allocates a single byte for zero size.  */
 
17661
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
 
17662
       if (rs <= 0)
 
17663
         return;
 
17664
     }
 
17665
@@ -244,7 +244,7 @@
 
17666
 
 
17667
   if (ret->base_addr == NULL)
 
17668
     {
 
17669
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
 
17670
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
 
17671
       ret->offset = 0;
 
17672
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17673
     }
 
17674
Index: libgfortran/generated/any_l4.c
 
17675
===================================================================
 
17676
--- a/src/libgfortran/generated/any_l4.c        (.../tags/gcc_4_8_3_release)
 
17677
+++ b/src/libgfortran/generated/any_l4.c        (.../branches/gcc-4_8-branch)
 
17678
@@ -101,8 +101,7 @@
 
17679
       retarray->offset = 0;
 
17680
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17681
 
 
17682
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17683
-                  * extent[rank-1];
 
17684
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17685
 
 
17686
       if (alloc_size == 0)
 
17687
        {
 
17688
@@ -111,7 +110,7 @@
 
17689
          return;
 
17690
        }
 
17691
       else
 
17692
-       retarray->base_addr = xmalloc (alloc_size);
 
17693
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
17694
     }
 
17695
   else
 
17696
     {
 
17697
Index: libgfortran/generated/maxloc1_4_i8.c
 
17698
===================================================================
 
17699
--- a/src/libgfortran/generated/maxloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
17700
+++ b/src/libgfortran/generated/maxloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
17701
@@ -98,10 +98,9 @@
 
17702
       retarray->offset = 0;
 
17703
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17704
 
 
17705
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17706
-                  * extent[rank-1];
 
17707
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17708
 
 
17709
-      retarray->base_addr = xmalloc (alloc_size);
 
17710
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17711
       if (alloc_size == 0)
 
17712
        {
 
17713
          /* Make sure we have a zero-sized array.  */
 
17714
@@ -294,8 +293,7 @@
 
17715
 
 
17716
        }
 
17717
 
 
17718
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17719
-                  * extent[rank-1];
 
17720
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17721
 
 
17722
       retarray->offset = 0;
 
17723
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17724
@@ -307,7 +305,7 @@
 
17725
          return;
 
17726
        }
 
17727
       else
 
17728
-       retarray->base_addr = xmalloc (alloc_size);
 
17729
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17730
 
 
17731
     }
 
17732
   else
 
17733
@@ -485,8 +483,7 @@
 
17734
       retarray->offset = 0;
 
17735
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17736
 
 
17737
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17738
-                  * extent[rank-1];
 
17739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17740
 
 
17741
       if (alloc_size == 0)
 
17742
        {
 
17743
@@ -495,7 +492,7 @@
 
17744
          return;
 
17745
        }
 
17746
       else
 
17747
-       retarray->base_addr = xmalloc (alloc_size);
 
17748
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17749
     }
 
17750
   else
 
17751
     {
 
17752
Index: libgfortran/generated/maxloc0_8_r4.c
 
17753
===================================================================
 
17754
--- a/src/libgfortran/generated/maxloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
17755
+++ b/src/libgfortran/generated/maxloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
17756
@@ -58,7 +58,7 @@
 
17757
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17758
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17759
       retarray->offset = 0;
 
17760
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17761
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17762
     }
 
17763
   else
 
17764
     {
 
17765
@@ -199,7 +199,7 @@
 
17766
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17767
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17768
       retarray->offset = 0;
 
17769
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17770
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17771
     }
 
17772
   else
 
17773
     {
 
17774
@@ -367,7 +367,7 @@
 
17775
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17776
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17777
       retarray->offset = 0;
 
17778
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17779
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17780
     }
 
17781
   else if (unlikely (compile_options.bounds_check))
 
17782
     {
 
17783
Index: libgfortran/generated/maxloc1_4_i16.c
 
17784
===================================================================
 
17785
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
17786
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
17787
@@ -98,10 +98,9 @@
 
17788
       retarray->offset = 0;
 
17789
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17790
 
 
17791
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17792
-                  * extent[rank-1];
 
17793
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17794
 
 
17795
-      retarray->base_addr = xmalloc (alloc_size);
 
17796
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17797
       if (alloc_size == 0)
 
17798
        {
 
17799
          /* Make sure we have a zero-sized array.  */
 
17800
@@ -294,8 +293,7 @@
 
17801
 
 
17802
        }
 
17803
 
 
17804
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17805
-                  * extent[rank-1];
 
17806
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17807
 
 
17808
       retarray->offset = 0;
 
17809
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17810
@@ -307,7 +305,7 @@
 
17811
          return;
 
17812
        }
 
17813
       else
 
17814
-       retarray->base_addr = xmalloc (alloc_size);
 
17815
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17816
 
 
17817
     }
 
17818
   else
 
17819
@@ -485,8 +483,7 @@
 
17820
       retarray->offset = 0;
 
17821
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17822
 
 
17823
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17824
-                  * extent[rank-1];
 
17825
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17826
 
 
17827
       if (alloc_size == 0)
 
17828
        {
 
17829
@@ -495,7 +492,7 @@
 
17830
          return;
 
17831
        }
 
17832
       else
 
17833
-       retarray->base_addr = xmalloc (alloc_size);
 
17834
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17835
     }
 
17836
   else
 
17837
     {
 
17838
Index: libgfortran/generated/minloc0_4_r10.c
 
17839
===================================================================
 
17840
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
17841
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
17842
@@ -58,7 +58,7 @@
 
17843
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17844
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17845
       retarray->offset = 0;
 
17846
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17847
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17848
     }
 
17849
   else
 
17850
     {
 
17851
@@ -199,7 +199,7 @@
 
17852
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17853
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17854
       retarray->offset = 0;
 
17855
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17856
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17857
     }
 
17858
   else
 
17859
     {
 
17860
@@ -367,7 +367,7 @@
 
17861
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17862
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17863
       retarray->offset = 0;
 
17864
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17865
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17866
     }
 
17867
   else if (unlikely (compile_options.bounds_check))
 
17868
     {
 
17869
Index: libgfortran/generated/minloc0_8_i16.c
 
17870
===================================================================
 
17871
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
17872
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
17873
@@ -58,7 +58,7 @@
 
17874
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17875
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17876
       retarray->offset = 0;
 
17877
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17878
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17879
     }
 
17880
   else
 
17881
     {
 
17882
@@ -199,7 +199,7 @@
 
17883
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17884
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17885
       retarray->offset = 0;
 
17886
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17887
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17888
     }
 
17889
   else
 
17890
     {
 
17891
@@ -367,7 +367,7 @@
 
17892
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17893
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17894
       retarray->offset = 0;
 
17895
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17896
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17897
     }
 
17898
   else if (unlikely (compile_options.bounds_check))
 
17899
     {
 
17900
Index: libgfortran/generated/minloc1_8_r10.c
 
17901
===================================================================
 
17902
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
17903
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
17904
@@ -98,10 +98,9 @@
 
17905
       retarray->offset = 0;
 
17906
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17907
 
 
17908
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17909
-                  * extent[rank-1];
 
17910
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17911
 
 
17912
-      retarray->base_addr = xmalloc (alloc_size);
 
17913
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17914
       if (alloc_size == 0)
 
17915
        {
 
17916
          /* Make sure we have a zero-sized array.  */
 
17917
@@ -294,8 +293,7 @@
 
17918
 
 
17919
        }
 
17920
 
 
17921
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17922
-                  * extent[rank-1];
 
17923
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17924
 
 
17925
       retarray->offset = 0;
 
17926
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17927
@@ -307,7 +305,7 @@
 
17928
          return;
 
17929
        }
 
17930
       else
 
17931
-       retarray->base_addr = xmalloc (alloc_size);
 
17932
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17933
 
 
17934
     }
 
17935
   else
 
17936
@@ -485,8 +483,7 @@
 
17937
       retarray->offset = 0;
 
17938
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17939
 
 
17940
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17941
-                  * extent[rank-1];
 
17942
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17943
 
 
17944
       if (alloc_size == 0)
 
17945
        {
 
17946
@@ -495,7 +492,7 @@
 
17947
          return;
 
17948
        }
 
17949
       else
 
17950
-       retarray->base_addr = xmalloc (alloc_size);
 
17951
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17952
     }
 
17953
   else
 
17954
     {
 
17955
Index: libgfortran/generated/minloc0_16_r4.c
 
17956
===================================================================
 
17957
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
17958
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
17959
@@ -58,7 +58,7 @@
 
17960
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17961
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17962
       retarray->offset = 0;
 
17963
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17964
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17965
     }
 
17966
   else
 
17967
     {
 
17968
@@ -199,7 +199,7 @@
 
17969
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17970
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17971
       retarray->offset = 0;
 
17972
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17973
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17974
     }
 
17975
   else
 
17976
     {
 
17977
@@ -367,7 +367,7 @@
 
17978
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17979
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17980
       retarray->offset = 0;
 
17981
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17982
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17983
     }
 
17984
   else if (unlikely (compile_options.bounds_check))
 
17985
     {
 
17986
Index: libgfortran/generated/product_i4.c
 
17987
===================================================================
 
17988
--- a/src/libgfortran/generated/product_i4.c    (.../tags/gcc_4_8_3_release)
 
17989
+++ b/src/libgfortran/generated/product_i4.c    (.../branches/gcc-4_8-branch)
 
17990
@@ -97,10 +97,9 @@
 
17991
       retarray->offset = 0;
 
17992
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17993
 
 
17994
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17995
-                  * extent[rank-1];
 
17996
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17997
 
 
17998
-      retarray->base_addr = xmalloc (alloc_size);
 
17999
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18000
       if (alloc_size == 0)
 
18001
        {
 
18002
          /* Make sure we have a zero-sized array.  */
 
18003
@@ -272,8 +271,7 @@
 
18004
 
 
18005
        }
 
18006
 
 
18007
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18008
-                  * extent[rank-1];
 
18009
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18010
 
 
18011
       retarray->offset = 0;
 
18012
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18013
@@ -285,7 +283,7 @@
 
18014
          return;
 
18015
        }
 
18016
       else
 
18017
-       retarray->base_addr = xmalloc (alloc_size);
 
18018
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18019
 
 
18020
     }
 
18021
   else
 
18022
@@ -430,8 +428,7 @@
 
18023
       retarray->offset = 0;
 
18024
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18025
 
 
18026
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18027
-                  * extent[rank-1];
 
18028
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18029
 
 
18030
       if (alloc_size == 0)
 
18031
        {
 
18032
@@ -440,7 +437,7 @@
 
18033
          return;
 
18034
        }
 
18035
       else
 
18036
-       retarray->base_addr = xmalloc (alloc_size);
 
18037
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18038
     }
 
18039
   else
 
18040
     {
 
18041
Index: libgfortran/generated/sum_c16.c
 
18042
===================================================================
 
18043
--- a/src/libgfortran/generated/sum_c16.c       (.../tags/gcc_4_8_3_release)
 
18044
+++ b/src/libgfortran/generated/sum_c16.c       (.../branches/gcc-4_8-branch)
 
18045
@@ -97,10 +97,9 @@
 
18046
       retarray->offset = 0;
 
18047
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18048
 
 
18049
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18050
-                  * extent[rank-1];
 
18051
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18052
 
 
18053
-      retarray->base_addr = xmalloc (alloc_size);
 
18054
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
18055
       if (alloc_size == 0)
 
18056
        {
 
18057
          /* Make sure we have a zero-sized array.  */
 
18058
@@ -272,8 +271,7 @@
 
18059
 
 
18060
        }
 
18061
 
 
18062
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18063
-                  * extent[rank-1];
 
18064
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18065
 
 
18066
       retarray->offset = 0;
 
18067
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18068
@@ -285,7 +283,7 @@
 
18069
          return;
 
18070
        }
 
18071
       else
 
18072
-       retarray->base_addr = xmalloc (alloc_size);
 
18073
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
18074
 
 
18075
     }
 
18076
   else
 
18077
@@ -430,8 +428,7 @@
 
18078
       retarray->offset = 0;
 
18079
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18080
 
 
18081
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18082
-                  * extent[rank-1];
 
18083
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18084
 
 
18085
       if (alloc_size == 0)
 
18086
        {
 
18087
@@ -440,7 +437,7 @@
 
18088
          return;
 
18089
        }
 
18090
       else
 
18091
-       retarray->base_addr = xmalloc (alloc_size);
 
18092
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
18093
     }
 
18094
   else
 
18095
     {
 
18096
Index: libgfortran/generated/transpose_c10.c
 
18097
===================================================================
 
18098
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
 
18099
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
 
18100
@@ -60,7 +60,8 @@
 
18101
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18102
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18103
 
 
18104
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
 
18105
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18106
+                                     sizeof (GFC_COMPLEX_10));
 
18107
       ret->offset = 0;
 
18108
     } else if (unlikely (compile_options.bounds_check))
 
18109
     {
 
18110
Index: libgfortran/generated/maxloc1_16_r8.c
 
18111
===================================================================
 
18112
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
18113
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
18114
@@ -98,10 +98,9 @@
 
18115
       retarray->offset = 0;
 
18116
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18117
 
 
18118
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18119
-                  * extent[rank-1];
 
18120
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18121
 
 
18122
-      retarray->base_addr = xmalloc (alloc_size);
 
18123
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18124
       if (alloc_size == 0)
 
18125
        {
 
18126
          /* Make sure we have a zero-sized array.  */
 
18127
@@ -294,8 +293,7 @@
 
18128
 
 
18129
        }
 
18130
 
 
18131
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18132
-                  * extent[rank-1];
 
18133
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18134
 
 
18135
       retarray->offset = 0;
 
18136
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18137
@@ -307,7 +305,7 @@
 
18138
          return;
 
18139
        }
 
18140
       else
 
18141
-       retarray->base_addr = xmalloc (alloc_size);
 
18142
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18143
 
 
18144
     }
 
18145
   else
 
18146
@@ -485,8 +483,7 @@
 
18147
       retarray->offset = 0;
 
18148
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18149
 
 
18150
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18151
-                  * extent[rank-1];
 
18152
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18153
 
 
18154
       if (alloc_size == 0)
 
18155
        {
 
18156
@@ -495,7 +492,7 @@
 
18157
          return;
 
18158
        }
 
18159
       else
 
18160
-       retarray->base_addr = xmalloc (alloc_size);
 
18161
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18162
     }
 
18163
   else
 
18164
     {
 
18165
Index: libgfortran/generated/transpose_r4.c
 
18166
===================================================================
 
18167
--- a/src/libgfortran/generated/transpose_r4.c  (.../tags/gcc_4_8_3_release)
 
18168
+++ b/src/libgfortran/generated/transpose_r4.c  (.../branches/gcc-4_8-branch)
 
18169
@@ -60,7 +60,8 @@
 
18170
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18171
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18172
 
 
18173
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
 
18174
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18175
+                                     sizeof (GFC_REAL_4));
 
18176
       ret->offset = 0;
 
18177
     } else if (unlikely (compile_options.bounds_check))
 
18178
     {
 
18179
Index: libgfortran/generated/cshift1_4.c
 
18180
===================================================================
 
18181
--- a/src/libgfortran/generated/cshift1_4.c     (.../tags/gcc_4_8_3_release)
 
18182
+++ b/src/libgfortran/generated/cshift1_4.c     (.../branches/gcc-4_8-branch)
 
18183
@@ -80,7 +80,7 @@
 
18184
     {
 
18185
       int i;
 
18186
 
 
18187
-      ret->base_addr = xmalloc (size * arraysize);
 
18188
+      ret->base_addr = xmallocarray (arraysize, size);
 
18189
       ret->offset = 0;
 
18190
       ret->dtype = array->dtype;
 
18191
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
18192
Index: libgfortran/generated/maxloc0_8_i2.c
 
18193
===================================================================
 
18194
--- a/src/libgfortran/generated/maxloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
18195
+++ b/src/libgfortran/generated/maxloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
18196
@@ -58,7 +58,7 @@
 
18197
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18198
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18199
       retarray->offset = 0;
 
18200
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18201
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18202
     }
 
18203
   else
 
18204
     {
 
18205
@@ -199,7 +199,7 @@
 
18206
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18207
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18208
       retarray->offset = 0;
 
18209
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18210
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18211
     }
 
18212
   else
 
18213
     {
 
18214
@@ -367,7 +367,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_8) * rank);
 
18219
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18220
     }
 
18221
   else if (unlikely (compile_options.bounds_check))
 
18222
     {
 
18223
Index: libgfortran/generated/count_8_l.c
 
18224
===================================================================
 
18225
--- a/src/libgfortran/generated/count_8_l.c     (.../tags/gcc_4_8_3_release)
 
18226
+++ b/src/libgfortran/generated/count_8_l.c     (.../branches/gcc-4_8-branch)
 
18227
@@ -101,8 +101,7 @@
 
18228
       retarray->offset = 0;
 
18229
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18230
 
 
18231
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18232
-                  * extent[rank-1];
 
18233
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18234
 
 
18235
       if (alloc_size == 0)
 
18236
        {
 
18237
@@ -111,7 +110,7 @@
 
18238
          return;
 
18239
        }
 
18240
       else
 
18241
-       retarray->base_addr = xmalloc (alloc_size);
 
18242
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18243
     }
 
18244
   else
 
18245
     {
 
18246
Index: libgfortran/generated/in_pack_i4.c
 
18247
===================================================================
 
18248
--- a/src/libgfortran/generated/in_pack_i4.c    (.../tags/gcc_4_8_3_release)
 
18249
+++ b/src/libgfortran/generated/in_pack_i4.c    (.../branches/gcc-4_8-branch)
 
18250
@@ -76,7 +76,7 @@
 
18251
     return source->base_addr;
 
18252
 
 
18253
   /* Allocate storage for the destination.  */
 
18254
-  destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
 
18255
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
 
18256
   dest = destptr;
 
18257
   src = source->base_addr;
 
18258
   stride0 = stride[0];
 
18259
Index: libgfortran/generated/minloc0_16_i2.c
 
18260
===================================================================
 
18261
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
18262
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
18263
@@ -58,7 +58,7 @@
 
18264
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18265
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18266
       retarray->offset = 0;
 
18267
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18268
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18269
     }
 
18270
   else
 
18271
     {
 
18272
@@ -199,7 +199,7 @@
 
18273
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18274
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18275
       retarray->offset = 0;
 
18276
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18277
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18278
     }
 
18279
   else
 
18280
     {
 
18281
@@ -367,7 +367,7 @@
 
18282
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18283
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18284
       retarray->offset = 0;
 
18285
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18286
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18287
     }
 
18288
   else if (unlikely (compile_options.bounds_check))
 
18289
     {
 
18290
Index: libgfortran/generated/minloc1_8_r8.c
 
18291
===================================================================
 
18292
--- a/src/libgfortran/generated/minloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
18293
+++ b/src/libgfortran/generated/minloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
18294
@@ -98,10 +98,9 @@
 
18295
       retarray->offset = 0;
 
18296
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18297
 
 
18298
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18299
-                  * extent[rank-1];
 
18300
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18301
 
 
18302
-      retarray->base_addr = xmalloc (alloc_size);
 
18303
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18304
       if (alloc_size == 0)
 
18305
        {
 
18306
          /* Make sure we have a zero-sized array.  */
 
18307
@@ -294,8 +293,7 @@
 
18308
 
 
18309
        }
 
18310
 
 
18311
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18312
-                  * extent[rank-1];
 
18313
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18314
 
 
18315
       retarray->offset = 0;
 
18316
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18317
@@ -307,7 +305,7 @@
 
18318
          return;
 
18319
        }
 
18320
       else
 
18321
-       retarray->base_addr = xmalloc (alloc_size);
 
18322
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18323
 
 
18324
     }
 
18325
   else
 
18326
@@ -485,8 +483,7 @@
 
18327
       retarray->offset = 0;
 
18328
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18329
 
 
18330
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18331
-                  * extent[rank-1];
 
18332
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18333
 
 
18334
       if (alloc_size == 0)
 
18335
        {
 
18336
@@ -495,7 +492,7 @@
 
18337
          return;
 
18338
        }
 
18339
       else
 
18340
-       retarray->base_addr = xmalloc (alloc_size);
 
18341
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18342
     }
 
18343
   else
 
18344
     {
 
18345
Index: libgfortran/generated/matmul_c16.c
 
18346
===================================================================
 
18347
--- a/src/libgfortran/generated/matmul_c16.c    (.../tags/gcc_4_8_3_release)
 
18348
+++ b/src/libgfortran/generated/matmul_c16.c    (.../branches/gcc-4_8-branch)
 
18349
@@ -124,7 +124,7 @@
 
18350
         }
 
18351
 
 
18352
       retarray->base_addr
 
18353
-       = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
 
18354
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
 
18355
       retarray->offset = 0;
 
18356
     }
 
18357
     else if (unlikely (compile_options.bounds_check))
 
18358
Index: libgfortran/generated/minval_i1.c
 
18359
===================================================================
 
18360
--- a/src/libgfortran/generated/minval_i1.c     (.../tags/gcc_4_8_3_release)
 
18361
+++ b/src/libgfortran/generated/minval_i1.c     (.../branches/gcc-4_8-branch)
 
18362
@@ -97,10 +97,9 @@
 
18363
       retarray->offset = 0;
 
18364
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18365
 
 
18366
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18367
-                  * extent[rank-1];
 
18368
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18369
 
 
18370
-      retarray->base_addr = xmalloc (alloc_size);
 
18371
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18372
       if (alloc_size == 0)
 
18373
        {
 
18374
          /* Make sure we have a zero-sized array.  */
 
18375
@@ -286,8 +285,7 @@
 
18376
 
 
18377
        }
 
18378
 
 
18379
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18380
-                  * extent[rank-1];
 
18381
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18382
 
 
18383
       retarray->offset = 0;
 
18384
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18385
@@ -299,7 +297,7 @@
 
18386
          return;
 
18387
        }
 
18388
       else
 
18389
-       retarray->base_addr = xmalloc (alloc_size);
 
18390
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18391
 
 
18392
     }
 
18393
   else
 
18394
@@ -472,8 +470,7 @@
 
18395
       retarray->offset = 0;
 
18396
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18397
 
 
18398
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18399
-                  * extent[rank-1];
 
18400
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18401
 
 
18402
       if (alloc_size == 0)
 
18403
        {
 
18404
@@ -482,7 +479,7 @@
 
18405
          return;
 
18406
        }
 
18407
       else
 
18408
-       retarray->base_addr = xmalloc (alloc_size);
 
18409
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18410
     }
 
18411
   else
 
18412
     {
 
18413
Index: libgfortran/generated/shape_i16.c
 
18414
===================================================================
 
18415
--- a/src/libgfortran/generated/shape_i16.c     (.../tags/gcc_4_8_3_release)
 
18416
+++ b/src/libgfortran/generated/shape_i16.c     (.../branches/gcc-4_8-branch)
 
18417
@@ -49,7 +49,7 @@
 
18418
     {
 
18419
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
18420
       ret->offset = 0;
 
18421
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18422
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18423
     }
 
18424
 
 
18425
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
18426
Index: libgfortran/generated/iany_i4.c
 
18427
===================================================================
 
18428
--- a/src/libgfortran/generated/iany_i4.c       (.../tags/gcc_4_8_3_release)
 
18429
+++ b/src/libgfortran/generated/iany_i4.c       (.../branches/gcc-4_8-branch)
 
18430
@@ -97,10 +97,9 @@
 
18431
       retarray->offset = 0;
 
18432
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18433
 
 
18434
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18435
-                  * extent[rank-1];
 
18436
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18437
 
 
18438
-      retarray->base_addr = xmalloc (alloc_size);
 
18439
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18440
       if (alloc_size == 0)
 
18441
        {
 
18442
          /* Make sure we have a zero-sized array.  */
 
18443
@@ -272,8 +271,7 @@
 
18444
 
 
18445
        }
 
18446
 
 
18447
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18448
-                  * extent[rank-1];
 
18449
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18450
 
 
18451
       retarray->offset = 0;
 
18452
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18453
@@ -285,7 +283,7 @@
 
18454
          return;
 
18455
        }
 
18456
       else
 
18457
-       retarray->base_addr = xmalloc (alloc_size);
 
18458
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18459
 
 
18460
     }
 
18461
   else
 
18462
@@ -430,8 +428,7 @@
 
18463
       retarray->offset = 0;
 
18464
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18465
 
 
18466
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18467
-                  * extent[rank-1];
 
18468
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18469
 
 
18470
       if (alloc_size == 0)
 
18471
        {
 
18472
@@ -440,7 +437,7 @@
 
18473
          return;
 
18474
        }
 
18475
       else
 
18476
-       retarray->base_addr = xmalloc (alloc_size);
 
18477
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18478
     }
 
18479
   else
 
18480
     {
 
18481
Index: libgfortran/generated/minloc0_16_r16.c
 
18482
===================================================================
 
18483
--- a/src/libgfortran/generated/minloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
18484
+++ b/src/libgfortran/generated/minloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
18485
@@ -58,7 +58,7 @@
 
18486
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18487
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18488
       retarray->offset = 0;
 
18489
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18490
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18491
     }
 
18492
   else
 
18493
     {
 
18494
@@ -199,7 +199,7 @@
 
18495
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18496
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18497
       retarray->offset = 0;
 
18498
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18499
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18500
     }
 
18501
   else
 
18502
     {
 
18503
@@ -367,7 +367,7 @@
 
18504
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18505
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18506
       retarray->offset = 0;
 
18507
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18508
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18509
     }
 
18510
   else if (unlikely (compile_options.bounds_check))
 
18511
     {
 
18512
Index: libgfortran/generated/product_i16.c
 
18513
===================================================================
 
18514
--- a/src/libgfortran/generated/product_i16.c   (.../tags/gcc_4_8_3_release)
 
18515
+++ b/src/libgfortran/generated/product_i16.c   (.../branches/gcc-4_8-branch)
 
18516
@@ -97,10 +97,9 @@
 
18517
       retarray->offset = 0;
 
18518
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18519
 
 
18520
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18521
-                  * extent[rank-1];
 
18522
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18523
 
 
18524
-      retarray->base_addr = xmalloc (alloc_size);
 
18525
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18526
       if (alloc_size == 0)
 
18527
        {
 
18528
          /* Make sure we have a zero-sized array.  */
 
18529
@@ -272,8 +271,7 @@
 
18530
 
 
18531
        }
 
18532
 
 
18533
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18534
-                  * extent[rank-1];
 
18535
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18536
 
 
18537
       retarray->offset = 0;
 
18538
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18539
@@ -285,7 +283,7 @@
 
18540
          return;
 
18541
        }
 
18542
       else
 
18543
-       retarray->base_addr = xmalloc (alloc_size);
 
18544
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18545
 
 
18546
     }
 
18547
   else
 
18548
@@ -430,8 +428,7 @@
 
18549
       retarray->offset = 0;
 
18550
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18551
 
 
18552
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18553
-                  * extent[rank-1];
 
18554
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18555
 
 
18556
       if (alloc_size == 0)
 
18557
        {
 
18558
@@ -440,7 +437,7 @@
 
18559
          return;
 
18560
        }
 
18561
       else
 
18562
-       retarray->base_addr = xmalloc (alloc_size);
 
18563
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18564
     }
 
18565
   else
 
18566
     {
 
18567
Index: libgfortran/generated/unpack_i1.c
 
18568
===================================================================
 
18569
--- a/src/libgfortran/generated/unpack_i1.c     (.../tags/gcc_4_8_3_release)
 
18570
+++ b/src/libgfortran/generated/unpack_i1.c     (.../branches/gcc-4_8-branch)
 
18571
@@ -99,7 +99,7 @@
 
18572
          rs *= extent[n];
 
18573
        }
 
18574
       ret->offset = 0;
 
18575
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
18576
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
18577
     }
 
18578
   else
 
18579
     {
 
18580
@@ -244,7 +244,7 @@
 
18581
          rs *= extent[n];
 
18582
        }
 
18583
       ret->offset = 0;
 
18584
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
18585
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
18586
     }
 
18587
   else
 
18588
     {
 
18589
Index: libgfortran/generated/minloc0_4_i4.c
 
18590
===================================================================
 
18591
--- a/src/libgfortran/generated/minloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
18592
+++ b/src/libgfortran/generated/minloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
18593
@@ -58,7 +58,7 @@
 
18594
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18595
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18596
       retarray->offset = 0;
 
18597
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18598
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18599
     }
 
18600
   else
 
18601
     {
 
18602
@@ -199,7 +199,7 @@
 
18603
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18604
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18605
       retarray->offset = 0;
 
18606
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18607
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18608
     }
 
18609
   else
 
18610
     {
 
18611
@@ -367,7 +367,7 @@
 
18612
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18613
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18614
       retarray->offset = 0;
 
18615
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18616
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18617
     }
 
18618
   else if (unlikely (compile_options.bounds_check))
 
18619
     {
 
18620
Index: libgfortran/generated/matmul_i1.c
 
18621
===================================================================
 
18622
--- a/src/libgfortran/generated/matmul_i1.c     (.../tags/gcc_4_8_3_release)
 
18623
+++ b/src/libgfortran/generated/matmul_i1.c     (.../branches/gcc-4_8-branch)
 
18624
@@ -124,7 +124,7 @@
 
18625
         }
 
18626
 
 
18627
       retarray->base_addr
 
18628
-       = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
 
18629
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
 
18630
       retarray->offset = 0;
 
18631
     }
 
18632
     else if (unlikely (compile_options.bounds_check))
 
18633
Index: libgfortran/generated/minval_r4.c
 
18634
===================================================================
 
18635
--- a/src/libgfortran/generated/minval_r4.c     (.../tags/gcc_4_8_3_release)
 
18636
+++ b/src/libgfortran/generated/minval_r4.c     (.../branches/gcc-4_8-branch)
 
18637
@@ -97,10 +97,9 @@
 
18638
       retarray->offset = 0;
 
18639
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18640
 
 
18641
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18642
-                  * extent[rank-1];
 
18643
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18644
 
 
18645
-      retarray->base_addr = xmalloc (alloc_size);
 
18646
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
18647
       if (alloc_size == 0)
 
18648
        {
 
18649
          /* Make sure we have a zero-sized array.  */
 
18650
@@ -286,8 +285,7 @@
 
18651
 
 
18652
        }
 
18653
 
 
18654
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18655
-                  * extent[rank-1];
 
18656
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18657
 
 
18658
       retarray->offset = 0;
 
18659
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18660
@@ -299,7 +297,7 @@
 
18661
          return;
 
18662
        }
 
18663
       else
 
18664
-       retarray->base_addr = xmalloc (alloc_size);
 
18665
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
18666
 
 
18667
     }
 
18668
   else
 
18669
@@ -472,8 +470,7 @@
 
18670
       retarray->offset = 0;
 
18671
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18672
 
 
18673
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18674
-                  * extent[rank-1];
 
18675
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18676
 
 
18677
       if (alloc_size == 0)
 
18678
        {
 
18679
@@ -482,7 +479,7 @@
 
18680
          return;
 
18681
        }
 
18682
       else
 
18683
-       retarray->base_addr = xmalloc (alloc_size);
 
18684
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
18685
     }
 
18686
   else
 
18687
     {
 
18688
Index: libgfortran/generated/spread_i16.c
 
18689
===================================================================
 
18690
--- a/src/libgfortran/generated/spread_i16.c    (.../tags/gcc_4_8_3_release)
 
18691
+++ b/src/libgfortran/generated/spread_i16.c    (.../branches/gcc-4_8-branch)
 
18692
@@ -101,8 +101,8 @@
 
18693
        }
 
18694
       ret->offset = 0;
 
18695
 
 
18696
-      /* xmalloc allocates a single byte for zero size.  */
 
18697
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
 
18698
+      /* xmallocarray allocates a single byte for zero size.  */
 
18699
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
 
18700
       if (rs <= 0)
 
18701
         return;
 
18702
     }
 
18703
@@ -244,7 +244,7 @@
 
18704
 
 
18705
   if (ret->base_addr == NULL)
 
18706
     {
 
18707
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
 
18708
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
 
18709
       ret->offset = 0;
 
18710
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
18711
     }
 
18712
Index: libgfortran/generated/sum_i4.c
 
18713
===================================================================
 
18714
--- a/src/libgfortran/generated/sum_i4.c        (.../tags/gcc_4_8_3_release)
 
18715
+++ b/src/libgfortran/generated/sum_i4.c        (.../branches/gcc-4_8-branch)
 
18716
@@ -97,10 +97,9 @@
 
18717
       retarray->offset = 0;
 
18718
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18719
 
 
18720
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18721
-                  * extent[rank-1];
 
18722
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18723
 
 
18724
-      retarray->base_addr = xmalloc (alloc_size);
 
18725
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18726
       if (alloc_size == 0)
 
18727
        {
 
18728
          /* Make sure we have a zero-sized array.  */
 
18729
@@ -272,8 +271,7 @@
 
18730
 
 
18731
        }
 
18732
 
 
18733
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18734
-                  * extent[rank-1];
 
18735
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18736
 
 
18737
       retarray->offset = 0;
 
18738
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18739
@@ -285,7 +283,7 @@
 
18740
          return;
 
18741
        }
 
18742
       else
 
18743
-       retarray->base_addr = xmalloc (alloc_size);
 
18744
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18745
 
 
18746
     }
 
18747
   else
 
18748
@@ -430,8 +428,7 @@
 
18749
       retarray->offset = 0;
 
18750
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18751
 
 
18752
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18753
-                  * extent[rank-1];
 
18754
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18755
 
 
18756
       if (alloc_size == 0)
 
18757
        {
 
18758
@@ -440,7 +437,7 @@
 
18759
          return;
 
18760
        }
 
18761
       else
 
18762
-       retarray->base_addr = xmalloc (alloc_size);
 
18763
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18764
     }
 
18765
   else
 
18766
     {
 
18767
Index: libgfortran/generated/unpack_r10.c
 
18768
===================================================================
 
18769
--- a/src/libgfortran/generated/unpack_r10.c    (.../tags/gcc_4_8_3_release)
 
18770
+++ b/src/libgfortran/generated/unpack_r10.c    (.../branches/gcc-4_8-branch)
 
18771
@@ -99,7 +99,7 @@
 
18772
          rs *= extent[n];
 
18773
        }
 
18774
       ret->offset = 0;
 
18775
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
18776
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
18777
     }
 
18778
   else
 
18779
     {
 
18780
@@ -244,7 +244,7 @@
 
18781
          rs *= extent[n];
 
18782
        }
 
18783
       ret->offset = 0;
 
18784
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
18785
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
18786
     }
 
18787
   else
 
18788
     {
 
18789
Index: libgfortran/generated/bessel_r16.c
 
18790
===================================================================
 
18791
--- a/src/libgfortran/generated/bessel_r16.c    (.../tags/gcc_4_8_3_release)
 
18792
+++ b/src/libgfortran/generated/bessel_r16.c    (.../branches/gcc-4_8-branch)
 
18793
@@ -59,7 +59,7 @@
 
18794
     {
 
18795
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
18796
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
18797
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
18798
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
18799
       ret->offset = 0;
 
18800
     }
 
18801
 
 
18802
@@ -126,7 +126,7 @@
 
18803
     {
 
18804
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
18805
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
18806
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
18807
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
18808
       ret->offset = 0;
 
18809
     }
 
18810
 
 
18811
@@ -166,7 +166,7 @@
 
18812
 
 
18813
   x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
18814
 
 
18815
-  for (i = 2; i <= n1+n2; i++)
 
18816
+  for (i = 2; i <= n2 - n1; i++)
 
18817
     {
 
18818
 #if defined(GFC_REAL_16_INFINITY)
 
18819
       if (unlikely (last2 == -GFC_REAL_16_INFINITY))
 
18820
Index: libgfortran/generated/norm2_r8.c
 
18821
===================================================================
 
18822
--- a/src/libgfortran/generated/norm2_r8.c      (.../tags/gcc_4_8_3_release)
 
18823
+++ b/src/libgfortran/generated/norm2_r8.c      (.../branches/gcc-4_8-branch)
 
18824
@@ -101,10 +101,9 @@
 
18825
       retarray->offset = 0;
 
18826
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18827
 
 
18828
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18829
-                  * extent[rank-1];
 
18830
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18831
 
 
18832
-      retarray->base_addr = xmalloc (alloc_size);
 
18833
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18834
       if (alloc_size == 0)
 
18835
        {
 
18836
          /* Make sure we have a zero-sized array.  */
 
18837
Index: libgfortran/generated/spread_i4.c
 
18838
===================================================================
 
18839
--- a/src/libgfortran/generated/spread_i4.c     (.../tags/gcc_4_8_3_release)
 
18840
+++ b/src/libgfortran/generated/spread_i4.c     (.../branches/gcc-4_8-branch)
 
18841
@@ -101,8 +101,8 @@
 
18842
        }
 
18843
       ret->offset = 0;
 
18844
 
 
18845
-      /* xmalloc allocates a single byte for zero size.  */
 
18846
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
 
18847
+      /* xmallocarray allocates a single byte for zero size.  */
 
18848
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
 
18849
       if (rs <= 0)
 
18850
         return;
 
18851
     }
 
18852
@@ -244,7 +244,7 @@
 
18853
 
 
18854
   if (ret->base_addr == NULL)
 
18855
     {
 
18856
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
 
18857
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
 
18858
       ret->offset = 0;
 
18859
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
18860
     }
 
18861
Index: libgfortran/generated/eoshift3_8.c
 
18862
===================================================================
 
18863
--- a/src/libgfortran/generated/eoshift3_8.c    (.../tags/gcc_4_8_3_release)
 
18864
+++ b/src/libgfortran/generated/eoshift3_8.c    (.../branches/gcc-4_8-branch)
 
18865
@@ -89,7 +89,7 @@
 
18866
     {
 
18867
       int i;
 
18868
 
 
18869
-      ret->base_addr = xmalloc (size * arraysize);
 
18870
+      ret->base_addr = xmallocarray (arraysize, size);
 
18871
       ret->offset = 0;
 
18872
       ret->dtype = array->dtype;
 
18873
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
18874
@@ -107,8 +107,8 @@
 
18875
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
18876
 
 
18877
         }
 
18878
-      /* xmalloc allocates a single byte for zero size.  */
 
18879
-      ret->base_addr = xmalloc (size * arraysize);
 
18880
+      /* xmallocarray allocates a single byte for zero size.  */
 
18881
+      ret->base_addr = xmallocarray (arraysize, size);
 
18882
 
 
18883
     }
 
18884
   else if (unlikely (compile_options.bounds_check))
 
18885
Index: libgfortran/generated/minloc1_4_i1.c
 
18886
===================================================================
 
18887
--- a/src/libgfortran/generated/minloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
18888
+++ b/src/libgfortran/generated/minloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
18889
@@ -98,10 +98,9 @@
 
18890
       retarray->offset = 0;
 
18891
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18892
 
 
18893
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18894
-                  * extent[rank-1];
 
18895
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18896
 
 
18897
-      retarray->base_addr = xmalloc (alloc_size);
 
18898
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18899
       if (alloc_size == 0)
 
18900
        {
 
18901
          /* Make sure we have a zero-sized array.  */
 
18902
@@ -294,8 +293,7 @@
 
18903
 
 
18904
        }
 
18905
 
 
18906
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18907
-                  * extent[rank-1];
 
18908
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18909
 
 
18910
       retarray->offset = 0;
 
18911
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18912
@@ -307,7 +305,7 @@
 
18913
          return;
 
18914
        }
 
18915
       else
 
18916
-       retarray->base_addr = xmalloc (alloc_size);
 
18917
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18918
 
 
18919
     }
 
18920
   else
 
18921
@@ -485,8 +483,7 @@
 
18922
       retarray->offset = 0;
 
18923
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18924
 
 
18925
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18926
-                  * extent[rank-1];
 
18927
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18928
 
 
18929
       if (alloc_size == 0)
 
18930
        {
 
18931
@@ -495,7 +492,7 @@
 
18932
          return;
 
18933
        }
 
18934
       else
 
18935
-       retarray->base_addr = xmalloc (alloc_size);
 
18936
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18937
     }
 
18938
   else
 
18939
     {
 
18940
Index: libgfortran/generated/minval_i2.c
 
18941
===================================================================
 
18942
--- a/src/libgfortran/generated/minval_i2.c     (.../tags/gcc_4_8_3_release)
 
18943
+++ b/src/libgfortran/generated/minval_i2.c     (.../branches/gcc-4_8-branch)
 
18944
@@ -97,10 +97,9 @@
 
18945
       retarray->offset = 0;
 
18946
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18947
 
 
18948
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18949
-                  * extent[rank-1];
 
18950
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18951
 
 
18952
-      retarray->base_addr = xmalloc (alloc_size);
 
18953
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18954
       if (alloc_size == 0)
 
18955
        {
 
18956
          /* Make sure we have a zero-sized array.  */
 
18957
@@ -286,8 +285,7 @@
 
18958
 
 
18959
        }
 
18960
 
 
18961
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18962
-                  * extent[rank-1];
 
18963
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18964
 
 
18965
       retarray->offset = 0;
 
18966
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18967
@@ -299,7 +297,7 @@
 
18968
          return;
 
18969
        }
 
18970
       else
 
18971
-       retarray->base_addr = xmalloc (alloc_size);
 
18972
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18973
 
 
18974
     }
 
18975
   else
 
18976
@@ -472,8 +470,7 @@
 
18977
       retarray->offset = 0;
 
18978
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18979
 
 
18980
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18981
-                  * extent[rank-1];
 
18982
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18983
 
 
18984
       if (alloc_size == 0)
 
18985
        {
 
18986
@@ -482,7 +479,7 @@
 
18987
          return;
 
18988
        }
 
18989
       else
 
18990
-       retarray->base_addr = xmalloc (alloc_size);
 
18991
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18992
     }
 
18993
   else
 
18994
     {
 
18995
Index: libgfortran/generated/bessel_r8.c
 
18996
===================================================================
 
18997
--- a/src/libgfortran/generated/bessel_r8.c     (.../tags/gcc_4_8_3_release)
 
18998
+++ b/src/libgfortran/generated/bessel_r8.c     (.../branches/gcc-4_8-branch)
 
18999
@@ -55,7 +55,7 @@
 
19000
     {
 
19001
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
19002
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
19003
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
19004
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
19005
       ret->offset = 0;
 
19006
     }
 
19007
 
 
19008
@@ -122,7 +122,7 @@
 
19009
     {
 
19010
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
19011
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
19012
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
19013
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
19014
       ret->offset = 0;
 
19015
     }
 
19016
 
 
19017
@@ -162,7 +162,7 @@
 
19018
 
 
19019
   x2rev = GFC_REAL_8_LITERAL(2.)/x;
 
19020
 
 
19021
-  for (i = 2; i <= n1+n2; i++)
 
19022
+  for (i = 2; i <= n2 - n1; i++)
 
19023
     {
 
19024
 #if defined(GFC_REAL_8_INFINITY)
 
19025
       if (unlikely (last2 == -GFC_REAL_8_INFINITY))
 
19026
Index: libgfortran/generated/unpack_r4.c
 
19027
===================================================================
 
19028
--- a/src/libgfortran/generated/unpack_r4.c     (.../tags/gcc_4_8_3_release)
 
19029
+++ b/src/libgfortran/generated/unpack_r4.c     (.../branches/gcc-4_8-branch)
 
19030
@@ -99,7 +99,7 @@
 
19031
          rs *= extent[n];
 
19032
        }
 
19033
       ret->offset = 0;
 
19034
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
19035
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
19036
     }
 
19037
   else
 
19038
     {
 
19039
@@ -244,7 +244,7 @@
 
19040
          rs *= extent[n];
 
19041
        }
 
19042
       ret->offset = 0;
 
19043
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
19044
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
19045
     }
 
19046
   else
 
19047
     {
 
19048
Index: libgfortran/generated/product_r8.c
 
19049
===================================================================
 
19050
--- a/src/libgfortran/generated/product_r8.c    (.../tags/gcc_4_8_3_release)
 
19051
+++ b/src/libgfortran/generated/product_r8.c    (.../branches/gcc-4_8-branch)
 
19052
@@ -97,10 +97,9 @@
 
19053
       retarray->offset = 0;
 
19054
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19055
 
 
19056
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19057
-                  * extent[rank-1];
 
19058
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19059
 
 
19060
-      retarray->base_addr = xmalloc (alloc_size);
 
19061
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19062
       if (alloc_size == 0)
 
19063
        {
 
19064
          /* Make sure we have a zero-sized array.  */
 
19065
@@ -272,8 +271,7 @@
 
19066
 
 
19067
        }
 
19068
 
 
19069
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19070
-                  * extent[rank-1];
 
19071
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19072
 
 
19073
       retarray->offset = 0;
 
19074
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19075
@@ -285,7 +283,7 @@
 
19076
          return;
 
19077
        }
 
19078
       else
 
19079
-       retarray->base_addr = xmalloc (alloc_size);
 
19080
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19081
 
 
19082
     }
 
19083
   else
 
19084
@@ -430,8 +428,7 @@
 
19085
       retarray->offset = 0;
 
19086
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19087
 
 
19088
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19089
-                  * extent[rank-1];
 
19090
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19091
 
 
19092
       if (alloc_size == 0)
 
19093
        {
 
19094
@@ -440,7 +437,7 @@
 
19095
          return;
 
19096
        }
 
19097
       else
 
19098
-       retarray->base_addr = xmalloc (alloc_size);
 
19099
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19100
     }
 
19101
   else
 
19102
     {
 
19103
Index: libgfortran/generated/matmul_r4.c
 
19104
===================================================================
 
19105
--- a/src/libgfortran/generated/matmul_r4.c     (.../tags/gcc_4_8_3_release)
 
19106
+++ b/src/libgfortran/generated/matmul_r4.c     (.../branches/gcc-4_8-branch)
 
19107
@@ -124,7 +124,7 @@
 
19108
         }
 
19109
 
 
19110
       retarray->base_addr
 
19111
-       = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
 
19112
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
 
19113
       retarray->offset = 0;
 
19114
     }
 
19115
     else if (unlikely (compile_options.bounds_check))
 
19116
Index: libgfortran/generated/unpack_i2.c
 
19117
===================================================================
 
19118
--- a/src/libgfortran/generated/unpack_i2.c     (.../tags/gcc_4_8_3_release)
 
19119
+++ b/src/libgfortran/generated/unpack_i2.c     (.../branches/gcc-4_8-branch)
 
19120
@@ -99,7 +99,7 @@
 
19121
          rs *= extent[n];
 
19122
        }
 
19123
       ret->offset = 0;
 
19124
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
19125
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
19126
     }
 
19127
   else
 
19128
     {
 
19129
@@ -244,7 +244,7 @@
 
19130
          rs *= extent[n];
 
19131
        }
 
19132
       ret->offset = 0;
 
19133
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
19134
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
19135
     }
 
19136
   else
 
19137
     {
 
19138
Index: libgfortran/generated/in_pack_r8.c
 
19139
===================================================================
 
19140
--- a/src/libgfortran/generated/in_pack_r8.c    (.../tags/gcc_4_8_3_release)
 
19141
+++ b/src/libgfortran/generated/in_pack_r8.c    (.../branches/gcc-4_8-branch)
 
19142
@@ -76,7 +76,7 @@
 
19143
     return source->base_addr;
 
19144
 
 
19145
   /* Allocate storage for the destination.  */
 
19146
-  destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
 
19147
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
 
19148
   dest = destptr;
 
19149
   src = source->base_addr;
 
19150
   stride0 = stride[0];
 
19151
Index: libgfortran/generated/maxloc1_4_r16.c
 
19152
===================================================================
 
19153
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
19154
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
19155
@@ -98,10 +98,9 @@
 
19156
       retarray->offset = 0;
 
19157
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19158
 
 
19159
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19160
-                  * extent[rank-1];
 
19161
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19162
 
 
19163
-      retarray->base_addr = xmalloc (alloc_size);
 
19164
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19165
       if (alloc_size == 0)
 
19166
        {
 
19167
          /* Make sure we have a zero-sized array.  */
 
19168
@@ -294,8 +293,7 @@
 
19169
 
 
19170
        }
 
19171
 
 
19172
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19173
-                  * extent[rank-1];
 
19174
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19175
 
 
19176
       retarray->offset = 0;
 
19177
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19178
@@ -307,7 +305,7 @@
 
19179
          return;
 
19180
        }
 
19181
       else
 
19182
-       retarray->base_addr = xmalloc (alloc_size);
 
19183
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19184
 
 
19185
     }
 
19186
   else
 
19187
@@ -485,8 +483,7 @@
 
19188
       retarray->offset = 0;
 
19189
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19190
 
 
19191
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19192
-                  * extent[rank-1];
 
19193
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19194
 
 
19195
       if (alloc_size == 0)
 
19196
        {
 
19197
@@ -495,7 +492,7 @@
 
19198
          return;
 
19199
        }
 
19200
       else
 
19201
-       retarray->base_addr = xmalloc (alloc_size);
 
19202
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19203
     }
 
19204
   else
 
19205
     {
 
19206
Index: libgfortran/generated/minloc0_8_r16.c
 
19207
===================================================================
 
19208
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
19209
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
19210
@@ -58,7 +58,7 @@
 
19211
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19212
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19213
       retarray->offset = 0;
 
19214
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19215
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19216
     }
 
19217
   else
 
19218
     {
 
19219
@@ -199,7 +199,7 @@
 
19220
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19221
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19222
       retarray->offset = 0;
 
19223
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19224
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19225
     }
 
19226
   else
 
19227
     {
 
19228
@@ -367,7 +367,7 @@
 
19229
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19230
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19231
       retarray->offset = 0;
 
19232
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19233
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19234
     }
 
19235
   else if (unlikely (compile_options.bounds_check))
 
19236
     {
 
19237
Index: libgfortran/generated/reshape_c8.c
 
19238
===================================================================
 
19239
--- a/src/libgfortran/generated/reshape_c8.c    (.../tags/gcc_4_8_3_release)
 
19240
+++ b/src/libgfortran/generated/reshape_c8.c    (.../branches/gcc-4_8-branch)
 
19241
@@ -111,11 +111,11 @@
 
19242
       ret->offset = 0;
 
19243
 
 
19244
       if (unlikely (rs < 1))
 
19245
-        alloc_size = 1;
 
19246
+        alloc_size = 0;
 
19247
       else
 
19248
-        alloc_size = rs * sizeof (GFC_COMPLEX_8);
 
19249
+        alloc_size = rs;
 
19250
 
 
19251
-      ret->base_addr = xmalloc (alloc_size);
 
19252
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
19253
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
19254
     }
 
19255
 
 
19256
Index: libgfortran/generated/iparity_i8.c
 
19257
===================================================================
 
19258
--- a/src/libgfortran/generated/iparity_i8.c    (.../tags/gcc_4_8_3_release)
 
19259
+++ b/src/libgfortran/generated/iparity_i8.c    (.../branches/gcc-4_8-branch)
 
19260
@@ -97,10 +97,9 @@
 
19261
       retarray->offset = 0;
 
19262
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19263
 
 
19264
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19265
-                  * extent[rank-1];
 
19266
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19267
 
 
19268
-      retarray->base_addr = xmalloc (alloc_size);
 
19269
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19270
       if (alloc_size == 0)
 
19271
        {
 
19272
          /* Make sure we have a zero-sized array.  */
 
19273
@@ -272,8 +271,7 @@
 
19274
 
 
19275
        }
 
19276
 
 
19277
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19278
-                  * extent[rank-1];
 
19279
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19280
 
 
19281
       retarray->offset = 0;
 
19282
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19283
@@ -285,7 +283,7 @@
 
19284
          return;
 
19285
        }
 
19286
       else
 
19287
-       retarray->base_addr = xmalloc (alloc_size);
 
19288
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19289
 
 
19290
     }
 
19291
   else
 
19292
@@ -430,8 +428,7 @@
 
19293
       retarray->offset = 0;
 
19294
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19295
 
 
19296
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19297
-                  * extent[rank-1];
 
19298
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19299
 
 
19300
       if (alloc_size == 0)
 
19301
        {
 
19302
@@ -440,7 +437,7 @@
 
19303
          return;
 
19304
        }
 
19305
       else
 
19306
-       retarray->base_addr = xmalloc (alloc_size);
 
19307
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19308
     }
 
19309
   else
 
19310
     {
 
19311
Index: libgfortran/generated/count_1_l.c
 
19312
===================================================================
 
19313
--- a/src/libgfortran/generated/count_1_l.c     (.../tags/gcc_4_8_3_release)
 
19314
+++ b/src/libgfortran/generated/count_1_l.c     (.../branches/gcc-4_8-branch)
 
19315
@@ -101,8 +101,7 @@
 
19316
       retarray->offset = 0;
 
19317
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19318
 
 
19319
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19320
-                  * extent[rank-1];
 
19321
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19322
 
 
19323
       if (alloc_size == 0)
 
19324
        {
 
19325
@@ -111,7 +110,7 @@
 
19326
          return;
 
19327
        }
 
19328
       else
 
19329
-       retarray->base_addr = xmalloc (alloc_size);
 
19330
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19331
     }
 
19332
   else
 
19333
     {
 
19334
Index: libgfortran/generated/maxloc0_8_i4.c
 
19335
===================================================================
 
19336
--- a/src/libgfortran/generated/maxloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
19337
+++ b/src/libgfortran/generated/maxloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
19338
@@ -58,7 +58,7 @@
 
19339
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19340
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19341
       retarray->offset = 0;
 
19342
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19343
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19344
     }
 
19345
   else
 
19346
     {
 
19347
@@ -199,7 +199,7 @@
 
19348
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19349
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19350
       retarray->offset = 0;
 
19351
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19352
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19353
     }
 
19354
   else
 
19355
     {
 
19356
@@ -367,7 +367,7 @@
 
19357
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19358
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19359
       retarray->offset = 0;
 
19360
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19361
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19362
     }
 
19363
   else if (unlikely (compile_options.bounds_check))
 
19364
     {
 
19365
Index: libgfortran/generated/matmul_i2.c
 
19366
===================================================================
 
19367
--- a/src/libgfortran/generated/matmul_i2.c     (.../tags/gcc_4_8_3_release)
 
19368
+++ b/src/libgfortran/generated/matmul_i2.c     (.../branches/gcc-4_8-branch)
 
19369
@@ -124,7 +124,7 @@
 
19370
         }
 
19371
 
 
19372
       retarray->base_addr
 
19373
-       = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
 
19374
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
 
19375
       retarray->offset = 0;
 
19376
     }
 
19377
     else if (unlikely (compile_options.bounds_check))
 
19378
Index: libgfortran/generated/minloc1_4_r4.c
 
19379
===================================================================
 
19380
--- a/src/libgfortran/generated/minloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
19381
+++ b/src/libgfortran/generated/minloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
19382
@@ -98,10 +98,9 @@
 
19383
       retarray->offset = 0;
 
19384
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19385
 
 
19386
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19387
-                  * extent[rank-1];
 
19388
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19389
 
 
19390
-      retarray->base_addr = xmalloc (alloc_size);
 
19391
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19392
       if (alloc_size == 0)
 
19393
        {
 
19394
          /* Make sure we have a zero-sized array.  */
 
19395
@@ -294,8 +293,7 @@
 
19396
 
 
19397
        }
 
19398
 
 
19399
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19400
-                  * extent[rank-1];
 
19401
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19402
 
 
19403
       retarray->offset = 0;
 
19404
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19405
@@ -307,7 +305,7 @@
 
19406
          return;
 
19407
        }
 
19408
       else
 
19409
-       retarray->base_addr = xmalloc (alloc_size);
 
19410
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19411
 
 
19412
     }
 
19413
   else
 
19414
@@ -485,8 +483,7 @@
 
19415
       retarray->offset = 0;
 
19416
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19417
 
 
19418
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19419
-                  * extent[rank-1];
 
19420
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19421
 
 
19422
       if (alloc_size == 0)
 
19423
        {
 
19424
@@ -495,7 +492,7 @@
 
19425
          return;
 
19426
        }
 
19427
       else
 
19428
-       retarray->base_addr = xmalloc (alloc_size);
 
19429
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19430
     }
 
19431
   else
 
19432
     {
 
19433
Index: libgfortran/generated/transpose_i16.c
 
19434
===================================================================
 
19435
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
 
19436
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
 
19437
@@ -60,7 +60,8 @@
 
19438
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19439
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19440
 
 
19441
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
 
19442
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19443
+                                     sizeof (GFC_INTEGER_16));
 
19444
       ret->offset = 0;
 
19445
     } else if (unlikely (compile_options.bounds_check))
 
19446
     {
 
19447
Index: libgfortran/generated/minloc0_16_i4.c
 
19448
===================================================================
 
19449
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
19450
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
19451
@@ -58,7 +58,7 @@
 
19452
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19453
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19454
       retarray->offset = 0;
 
19455
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19456
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19457
     }
 
19458
   else
 
19459
     {
 
19460
@@ -199,7 +199,7 @@
 
19461
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19462
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19463
       retarray->offset = 0;
 
19464
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19465
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19466
     }
 
19467
   else
 
19468
     {
 
19469
@@ -367,7 +367,7 @@
 
19470
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19471
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19472
       retarray->offset = 0;
 
19473
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19474
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19475
     }
 
19476
   else if (unlikely (compile_options.bounds_check))
 
19477
     {
 
19478
Index: libgfortran/generated/transpose_i4.c
 
19479
===================================================================
 
19480
--- a/src/libgfortran/generated/transpose_i4.c  (.../tags/gcc_4_8_3_release)
 
19481
+++ b/src/libgfortran/generated/transpose_i4.c  (.../branches/gcc-4_8-branch)
 
19482
@@ -60,7 +60,8 @@
 
19483
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19484
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19485
 
 
19486
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
 
19487
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19488
+                                     sizeof (GFC_INTEGER_4));
 
19489
       ret->offset = 0;
 
19490
     } else if (unlikely (compile_options.bounds_check))
 
19491
     {
 
19492
Index: libgfortran/generated/maxloc1_16_i8.c
 
19493
===================================================================
 
19494
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
19495
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
19496
@@ -98,10 +98,9 @@
 
19497
       retarray->offset = 0;
 
19498
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19499
 
 
19500
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19501
-                  * extent[rank-1];
 
19502
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19503
 
 
19504
-      retarray->base_addr = xmalloc (alloc_size);
 
19505
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19506
       if (alloc_size == 0)
 
19507
        {
 
19508
          /* Make sure we have a zero-sized array.  */
 
19509
@@ -294,8 +293,7 @@
 
19510
 
 
19511
        }
 
19512
 
 
19513
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19514
-                  * extent[rank-1];
 
19515
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19516
 
 
19517
       retarray->offset = 0;
 
19518
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19519
@@ -307,7 +305,7 @@
 
19520
          return;
 
19521
        }
 
19522
       else
 
19523
-       retarray->base_addr = xmalloc (alloc_size);
 
19524
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19525
 
 
19526
     }
 
19527
   else
 
19528
@@ -485,8 +483,7 @@
 
19529
       retarray->offset = 0;
 
19530
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19531
 
 
19532
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19533
-                  * extent[rank-1];
 
19534
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19535
 
 
19536
       if (alloc_size == 0)
 
19537
        {
 
19538
@@ -495,7 +492,7 @@
 
19539
          return;
 
19540
        }
 
19541
       else
 
19542
-       retarray->base_addr = xmalloc (alloc_size);
 
19543
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19544
     }
 
19545
   else
 
19546
     {
 
19547
Index: libgfortran/generated/minloc1_4_i2.c
 
19548
===================================================================
 
19549
--- a/src/libgfortran/generated/minloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
19550
+++ b/src/libgfortran/generated/minloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
19551
@@ -98,10 +98,9 @@
 
19552
       retarray->offset = 0;
 
19553
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19554
 
 
19555
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19556
-                  * extent[rank-1];
 
19557
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19558
 
 
19559
-      retarray->base_addr = xmalloc (alloc_size);
 
19560
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19561
       if (alloc_size == 0)
 
19562
        {
 
19563
          /* Make sure we have a zero-sized array.  */
 
19564
@@ -294,8 +293,7 @@
 
19565
 
 
19566
        }
 
19567
 
 
19568
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19569
-                  * extent[rank-1];
 
19570
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19571
 
 
19572
       retarray->offset = 0;
 
19573
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19574
@@ -307,7 +305,7 @@
 
19575
          return;
 
19576
        }
 
19577
       else
 
19578
-       retarray->base_addr = xmalloc (alloc_size);
 
19579
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19580
 
 
19581
     }
 
19582
   else
 
19583
@@ -485,8 +483,7 @@
 
19584
       retarray->offset = 0;
 
19585
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19586
 
 
19587
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19588
-                  * extent[rank-1];
 
19589
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19590
 
 
19591
       if (alloc_size == 0)
 
19592
        {
 
19593
@@ -495,7 +492,7 @@
 
19594
          return;
 
19595
        }
 
19596
       else
 
19597
-       retarray->base_addr = xmalloc (alloc_size);
 
19598
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19599
     }
 
19600
   else
 
19601
     {
 
19602
Index: libgfortran/generated/matmul_l16.c
 
19603
===================================================================
 
19604
--- a/src/libgfortran/generated/matmul_l16.c    (.../tags/gcc_4_8_3_release)
 
19605
+++ b/src/libgfortran/generated/matmul_l16.c    (.../branches/gcc-4_8-branch)
 
19606
@@ -88,7 +88,7 @@
 
19607
         }
 
19608
           
 
19609
       retarray->base_addr
 
19610
-       = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
 
19611
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
 
19612
       retarray->offset = 0;
 
19613
     }
 
19614
     else if (unlikely (compile_options.bounds_check))
 
19615
Index: libgfortran/generated/maxloc1_8_i1.c
 
19616
===================================================================
 
19617
--- a/src/libgfortran/generated/maxloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
19618
+++ b/src/libgfortran/generated/maxloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
19619
@@ -98,10 +98,9 @@
 
19620
       retarray->offset = 0;
 
19621
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19622
 
 
19623
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19624
-                  * extent[rank-1];
 
19625
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19626
 
 
19627
-      retarray->base_addr = xmalloc (alloc_size);
 
19628
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19629
       if (alloc_size == 0)
 
19630
        {
 
19631
          /* Make sure we have a zero-sized array.  */
 
19632
@@ -294,8 +293,7 @@
 
19633
 
 
19634
        }
 
19635
 
 
19636
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19637
-                  * extent[rank-1];
 
19638
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19639
 
 
19640
       retarray->offset = 0;
 
19641
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19642
@@ -307,7 +305,7 @@
 
19643
          return;
 
19644
        }
 
19645
       else
 
19646
-       retarray->base_addr = xmalloc (alloc_size);
 
19647
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19648
 
 
19649
     }
 
19650
   else
 
19651
@@ -485,8 +483,7 @@
 
19652
       retarray->offset = 0;
 
19653
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19654
 
 
19655
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19656
-                  * extent[rank-1];
 
19657
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19658
 
 
19659
       if (alloc_size == 0)
 
19660
        {
 
19661
@@ -495,7 +492,7 @@
 
19662
          return;
 
19663
        }
 
19664
       else
 
19665
-       retarray->base_addr = xmalloc (alloc_size);
 
19666
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19667
     }
 
19668
   else
 
19669
     {
 
19670
Index: libgfortran/generated/minloc1_8_i8.c
 
19671
===================================================================
 
19672
--- a/src/libgfortran/generated/minloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
19673
+++ b/src/libgfortran/generated/minloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
19674
@@ -98,10 +98,9 @@
 
19675
       retarray->offset = 0;
 
19676
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19677
 
 
19678
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19679
-                  * extent[rank-1];
 
19680
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19681
 
 
19682
-      retarray->base_addr = xmalloc (alloc_size);
 
19683
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19684
       if (alloc_size == 0)
 
19685
        {
 
19686
          /* Make sure we have a zero-sized array.  */
 
19687
@@ -294,8 +293,7 @@
 
19688
 
 
19689
        }
 
19690
 
 
19691
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19692
-                  * extent[rank-1];
 
19693
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19694
 
 
19695
       retarray->offset = 0;
 
19696
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19697
@@ -307,7 +305,7 @@
 
19698
          return;
 
19699
        }
 
19700
       else
 
19701
-       retarray->base_addr = xmalloc (alloc_size);
 
19702
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19703
 
 
19704
     }
 
19705
   else
 
19706
@@ -485,8 +483,7 @@
 
19707
       retarray->offset = 0;
 
19708
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19709
 
 
19710
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19711
-                  * extent[rank-1];
 
19712
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19713
 
 
19714
       if (alloc_size == 0)
 
19715
        {
 
19716
@@ -495,7 +492,7 @@
 
19717
          return;
 
19718
        }
 
19719
       else
 
19720
-       retarray->base_addr = xmalloc (alloc_size);
 
19721
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19722
     }
 
19723
   else
 
19724
     {
 
19725
Index: libgfortran/generated/minloc0_4_r8.c
 
19726
===================================================================
 
19727
--- a/src/libgfortran/generated/minloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
19728
+++ b/src/libgfortran/generated/minloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
19729
@@ -58,7 +58,7 @@
 
19730
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19731
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19732
       retarray->offset = 0;
 
19733
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19734
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19735
     }
 
19736
   else
 
19737
     {
 
19738
@@ -199,7 +199,7 @@
 
19739
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19740
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19741
       retarray->offset = 0;
 
19742
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19743
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19744
     }
 
19745
   else
 
19746
     {
 
19747
@@ -367,7 +367,7 @@
 
19748
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19749
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19750
       retarray->offset = 0;
 
19751
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19752
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19753
     }
 
19754
   else if (unlikely (compile_options.bounds_check))
 
19755
     {
 
19756
Index: libgfortran/generated/product_r16.c
 
19757
===================================================================
 
19758
--- a/src/libgfortran/generated/product_r16.c   (.../tags/gcc_4_8_3_release)
 
19759
+++ b/src/libgfortran/generated/product_r16.c   (.../branches/gcc-4_8-branch)
 
19760
@@ -97,10 +97,9 @@
 
19761
       retarray->offset = 0;
 
19762
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19763
 
 
19764
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19765
-                  * extent[rank-1];
 
19766
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19767
 
 
19768
-      retarray->base_addr = xmalloc (alloc_size);
 
19769
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
19770
       if (alloc_size == 0)
 
19771
        {
 
19772
          /* Make sure we have a zero-sized array.  */
 
19773
@@ -272,8 +271,7 @@
 
19774
 
 
19775
        }
 
19776
 
 
19777
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19778
-                  * extent[rank-1];
 
19779
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19780
 
 
19781
       retarray->offset = 0;
 
19782
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19783
@@ -285,7 +283,7 @@
 
19784
          return;
 
19785
        }
 
19786
       else
 
19787
-       retarray->base_addr = xmalloc (alloc_size);
 
19788
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
19789
 
 
19790
     }
 
19791
   else
 
19792
@@ -430,8 +428,7 @@
 
19793
       retarray->offset = 0;
 
19794
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19795
 
 
19796
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19797
-                  * extent[rank-1];
 
19798
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19799
 
 
19800
       if (alloc_size == 0)
 
19801
        {
 
19802
@@ -440,7 +437,7 @@
 
19803
          return;
 
19804
        }
 
19805
       else
 
19806
-       retarray->base_addr = xmalloc (alloc_size);
 
19807
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
19808
     }
 
19809
   else
 
19810
     {
 
19811
Index: libgfortran/generated/sum_r8.c
 
19812
===================================================================
 
19813
--- a/src/libgfortran/generated/sum_r8.c        (.../tags/gcc_4_8_3_release)
 
19814
+++ b/src/libgfortran/generated/sum_r8.c        (.../branches/gcc-4_8-branch)
 
19815
@@ -97,10 +97,9 @@
 
19816
       retarray->offset = 0;
 
19817
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19818
 
 
19819
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19820
-                  * extent[rank-1];
 
19821
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19822
 
 
19823
-      retarray->base_addr = xmalloc (alloc_size);
 
19824
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19825
       if (alloc_size == 0)
 
19826
        {
 
19827
          /* Make sure we have a zero-sized array.  */
 
19828
@@ -272,8 +271,7 @@
 
19829
 
 
19830
        }
 
19831
 
 
19832
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19833
-                  * extent[rank-1];
 
19834
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19835
 
 
19836
       retarray->offset = 0;
 
19837
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19838
@@ -285,7 +283,7 @@
 
19839
          return;
 
19840
        }
 
19841
       else
 
19842
-       retarray->base_addr = xmalloc (alloc_size);
 
19843
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19844
 
 
19845
     }
 
19846
   else
 
19847
@@ -430,8 +428,7 @@
 
19848
       retarray->offset = 0;
 
19849
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19850
 
 
19851
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19852
-                  * extent[rank-1];
 
19853
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19854
 
 
19855
       if (alloc_size == 0)
 
19856
        {
 
19857
@@ -440,7 +437,7 @@
 
19858
          return;
 
19859
        }
 
19860
       else
 
19861
-       retarray->base_addr = xmalloc (alloc_size);
 
19862
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19863
     }
 
19864
   else
 
19865
     {
 
19866
Index: libgfortran/generated/norm2_r10.c
 
19867
===================================================================
 
19868
--- a/src/libgfortran/generated/norm2_r10.c     (.../tags/gcc_4_8_3_release)
 
19869
+++ b/src/libgfortran/generated/norm2_r10.c     (.../branches/gcc-4_8-branch)
 
19870
@@ -101,10 +101,9 @@
 
19871
       retarray->offset = 0;
 
19872
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19873
 
 
19874
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19875
-                  * extent[rank-1];
 
19876
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19877
 
 
19878
-      retarray->base_addr = xmalloc (alloc_size);
 
19879
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19880
       if (alloc_size == 0)
 
19881
        {
 
19882
          /* Make sure we have a zero-sized array.  */
 
19883
Index: libgfortran/generated/unpack_c10.c
 
19884
===================================================================
 
19885
--- a/src/libgfortran/generated/unpack_c10.c    (.../tags/gcc_4_8_3_release)
 
19886
+++ b/src/libgfortran/generated/unpack_c10.c    (.../branches/gcc-4_8-branch)
 
19887
@@ -99,7 +99,7 @@
 
19888
          rs *= extent[n];
 
19889
        }
 
19890
       ret->offset = 0;
 
19891
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
19892
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
19893
     }
 
19894
   else
 
19895
     {
 
19896
@@ -244,7 +244,7 @@
 
19897
          rs *= extent[n];
 
19898
        }
 
19899
       ret->offset = 0;
 
19900
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
19901
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
19902
     }
 
19903
   else
 
19904
     {
 
19905
Index: libgfortran/generated/spread_r8.c
 
19906
===================================================================
 
19907
--- a/src/libgfortran/generated/spread_r8.c     (.../tags/gcc_4_8_3_release)
 
19908
+++ b/src/libgfortran/generated/spread_r8.c     (.../branches/gcc-4_8-branch)
 
19909
@@ -101,8 +101,8 @@
 
19910
        }
 
19911
       ret->offset = 0;
 
19912
 
 
19913
-      /* xmalloc allocates a single byte for zero size.  */
 
19914
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
 
19915
+      /* xmallocarray allocates a single byte for zero size.  */
 
19916
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
 
19917
       if (rs <= 0)
 
19918
         return;
 
19919
     }
 
19920
@@ -244,7 +244,7 @@
 
19921
 
 
19922
   if (ret->base_addr == NULL)
 
19923
     {
 
19924
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
 
19925
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
 
19926
       ret->offset = 0;
 
19927
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
19928
     }
 
19929
Index: libgfortran/generated/minloc1_16_i16.c
 
19930
===================================================================
 
19931
--- a/src/libgfortran/generated/minloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
19932
+++ b/src/libgfortran/generated/minloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
19933
@@ -98,10 +98,9 @@
 
19934
       retarray->offset = 0;
 
19935
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19936
 
 
19937
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19938
-                  * extent[rank-1];
 
19939
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19940
 
 
19941
-      retarray->base_addr = xmalloc (alloc_size);
 
19942
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19943
       if (alloc_size == 0)
 
19944
        {
 
19945
          /* Make sure we have a zero-sized array.  */
 
19946
@@ -294,8 +293,7 @@
 
19947
 
 
19948
        }
 
19949
 
 
19950
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19951
-                  * extent[rank-1];
 
19952
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19953
 
 
19954
       retarray->offset = 0;
 
19955
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19956
@@ -307,7 +305,7 @@
 
19957
          return;
 
19958
        }
 
19959
       else
 
19960
-       retarray->base_addr = xmalloc (alloc_size);
 
19961
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19962
 
 
19963
     }
 
19964
   else
 
19965
@@ -485,8 +483,7 @@
 
19966
       retarray->offset = 0;
 
19967
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19968
 
 
19969
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19970
-                  * extent[rank-1];
 
19971
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19972
 
 
19973
       if (alloc_size == 0)
 
19974
        {
 
19975
@@ -495,7 +492,7 @@
 
19976
          return;
 
19977
        }
 
19978
       else
 
19979
-       retarray->base_addr = xmalloc (alloc_size);
 
19980
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19981
     }
 
19982
   else
 
19983
     {
 
19984
Index: libgfortran/generated/maxloc1_8_r4.c
 
19985
===================================================================
 
19986
--- a/src/libgfortran/generated/maxloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
19987
+++ b/src/libgfortran/generated/maxloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
19988
@@ -98,10 +98,9 @@
 
19989
       retarray->offset = 0;
 
19990
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19991
 
 
19992
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19993
-                  * extent[rank-1];
 
19994
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19995
 
 
19996
-      retarray->base_addr = xmalloc (alloc_size);
 
19997
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19998
       if (alloc_size == 0)
 
19999
        {
 
20000
          /* Make sure we have a zero-sized array.  */
 
20001
@@ -294,8 +293,7 @@
 
20002
 
 
20003
        }
 
20004
 
 
20005
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20006
-                  * extent[rank-1];
 
20007
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20008
 
 
20009
       retarray->offset = 0;
 
20010
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20011
@@ -307,7 +305,7 @@
 
20012
          return;
 
20013
        }
 
20014
       else
 
20015
-       retarray->base_addr = xmalloc (alloc_size);
 
20016
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20017
 
 
20018
     }
 
20019
   else
 
20020
@@ -485,8 +483,7 @@
 
20021
       retarray->offset = 0;
 
20022
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20023
 
 
20024
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20025
-                  * extent[rank-1];
 
20026
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20027
 
 
20028
       if (alloc_size == 0)
 
20029
        {
 
20030
@@ -495,7 +492,7 @@
 
20031
          return;
 
20032
        }
 
20033
       else
 
20034
-       retarray->base_addr = xmalloc (alloc_size);
 
20035
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20036
     }
 
20037
   else
 
20038
     {
 
20039
Index: libgfortran/generated/minloc1_16_i1.c
 
20040
===================================================================
 
20041
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
20042
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
20043
@@ -98,10 +98,9 @@
 
20044
       retarray->offset = 0;
 
20045
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20046
 
 
20047
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20048
-                  * extent[rank-1];
 
20049
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20050
 
 
20051
-      retarray->base_addr = xmalloc (alloc_size);
 
20052
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20053
       if (alloc_size == 0)
 
20054
        {
 
20055
          /* Make sure we have a zero-sized array.  */
 
20056
@@ -294,8 +293,7 @@
 
20057
 
 
20058
        }
 
20059
 
 
20060
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20061
-                  * extent[rank-1];
 
20062
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20063
 
 
20064
       retarray->offset = 0;
 
20065
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20066
@@ -307,7 +305,7 @@
 
20067
          return;
 
20068
        }
 
20069
       else
 
20070
-       retarray->base_addr = xmalloc (alloc_size);
 
20071
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20072
 
 
20073
     }
 
20074
   else
 
20075
@@ -485,8 +483,7 @@
 
20076
       retarray->offset = 0;
 
20077
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20078
 
 
20079
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20080
-                  * extent[rank-1];
 
20081
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20082
 
 
20083
       if (alloc_size == 0)
 
20084
        {
 
20085
@@ -495,7 +492,7 @@
 
20086
          return;
 
20087
        }
 
20088
       else
 
20089
-       retarray->base_addr = xmalloc (alloc_size);
 
20090
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20091
     }
 
20092
   else
 
20093
     {
 
20094
Index: libgfortran/generated/spread_r16.c
 
20095
===================================================================
 
20096
--- a/src/libgfortran/generated/spread_r16.c    (.../tags/gcc_4_8_3_release)
 
20097
+++ b/src/libgfortran/generated/spread_r16.c    (.../branches/gcc-4_8-branch)
 
20098
@@ -101,8 +101,8 @@
 
20099
        }
 
20100
       ret->offset = 0;
 
20101
 
 
20102
-      /* xmalloc allocates a single byte for zero size.  */
 
20103
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
 
20104
+      /* xmallocarray allocates a single byte for zero size.  */
 
20105
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
 
20106
       if (rs <= 0)
 
20107
         return;
 
20108
     }
 
20109
@@ -244,7 +244,7 @@
 
20110
 
 
20111
   if (ret->base_addr == NULL)
 
20112
     {
 
20113
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
 
20114
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
 
20115
       ret->offset = 0;
 
20116
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
20117
     }
 
20118
Index: libgfortran/generated/pack_c8.c
 
20119
===================================================================
 
20120
--- a/src/libgfortran/generated/pack_c8.c       (.../tags/gcc_4_8_3_release)
 
20121
+++ b/src/libgfortran/generated/pack_c8.c       (.../branches/gcc-4_8-branch)
 
20122
@@ -167,8 +167,8 @@
 
20123
 
 
20124
          ret->offset = 0;
 
20125
 
 
20126
-         /* xmalloc allocates a single byte for zero size.  */
 
20127
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
 
20128
+         /* xmallocarray allocates a single byte for zero size.  */
 
20129
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
 
20130
 
 
20131
          if (total == 0)
 
20132
            return;
 
20133
Index: libgfortran/generated/minval_r10.c
 
20134
===================================================================
 
20135
--- a/src/libgfortran/generated/minval_r10.c    (.../tags/gcc_4_8_3_release)
 
20136
+++ b/src/libgfortran/generated/minval_r10.c    (.../branches/gcc-4_8-branch)
 
20137
@@ -97,10 +97,9 @@
 
20138
       retarray->offset = 0;
 
20139
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20140
 
 
20141
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20142
-                  * extent[rank-1];
 
20143
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20144
 
 
20145
-      retarray->base_addr = xmalloc (alloc_size);
 
20146
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
20147
       if (alloc_size == 0)
 
20148
        {
 
20149
          /* Make sure we have a zero-sized array.  */
 
20150
@@ -286,8 +285,7 @@
 
20151
 
 
20152
        }
 
20153
 
 
20154
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20155
-                  * extent[rank-1];
 
20156
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20157
 
 
20158
       retarray->offset = 0;
 
20159
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20160
@@ -299,7 +297,7 @@
 
20161
          return;
 
20162
        }
 
20163
       else
 
20164
-       retarray->base_addr = xmalloc (alloc_size);
 
20165
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
20166
 
 
20167
     }
 
20168
   else
 
20169
@@ -472,8 +470,7 @@
 
20170
       retarray->offset = 0;
 
20171
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20172
 
 
20173
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20174
-                  * extent[rank-1];
 
20175
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20176
 
 
20177
       if (alloc_size == 0)
 
20178
        {
 
20179
@@ -482,7 +479,7 @@
 
20180
          return;
 
20181
        }
 
20182
       else
 
20183
-       retarray->base_addr = xmalloc (alloc_size);
 
20184
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
20185
     }
 
20186
   else
 
20187
     {
 
20188
Index: libgfortran/generated/parity_l8.c
 
20189
===================================================================
 
20190
--- a/src/libgfortran/generated/parity_l8.c     (.../tags/gcc_4_8_3_release)
 
20191
+++ b/src/libgfortran/generated/parity_l8.c     (.../branches/gcc-4_8-branch)
 
20192
@@ -98,10 +98,9 @@
 
20193
       retarray->offset = 0;
 
20194
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20195
 
 
20196
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20197
-                  * extent[rank-1];
 
20198
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20199
 
 
20200
-      retarray->base_addr = xmalloc (alloc_size);
 
20201
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
20202
       if (alloc_size == 0)
 
20203
        {
 
20204
          /* Make sure we have a zero-sized array.  */
 
20205
Index: libgfortran/generated/minval_i4.c
 
20206
===================================================================
 
20207
--- a/src/libgfortran/generated/minval_i4.c     (.../tags/gcc_4_8_3_release)
 
20208
+++ b/src/libgfortran/generated/minval_i4.c     (.../branches/gcc-4_8-branch)
 
20209
@@ -97,10 +97,9 @@
 
20210
       retarray->offset = 0;
 
20211
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20212
 
 
20213
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20214
-                  * extent[rank-1];
 
20215
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20216
 
 
20217
-      retarray->base_addr = xmalloc (alloc_size);
 
20218
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20219
       if (alloc_size == 0)
 
20220
        {
 
20221
          /* Make sure we have a zero-sized array.  */
 
20222
@@ -286,8 +285,7 @@
 
20223
 
 
20224
        }
 
20225
 
 
20226
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20227
-                  * extent[rank-1];
 
20228
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20229
 
 
20230
       retarray->offset = 0;
 
20231
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20232
@@ -299,7 +297,7 @@
 
20233
          return;
 
20234
        }
 
20235
       else
 
20236
-       retarray->base_addr = xmalloc (alloc_size);
 
20237
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20238
 
 
20239
     }
 
20240
   else
 
20241
@@ -472,8 +470,7 @@
 
20242
       retarray->offset = 0;
 
20243
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20244
 
 
20245
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20246
-                  * extent[rank-1];
 
20247
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20248
 
 
20249
       if (alloc_size == 0)
 
20250
        {
 
20251
@@ -482,7 +479,7 @@
 
20252
          return;
 
20253
        }
 
20254
       else
 
20255
-       retarray->base_addr = xmalloc (alloc_size);
 
20256
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20257
     }
 
20258
   else
 
20259
     {
 
20260
Index: libgfortran/generated/maxloc1_8_i2.c
 
20261
===================================================================
 
20262
--- a/src/libgfortran/generated/maxloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
20263
+++ b/src/libgfortran/generated/maxloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
20264
@@ -98,10 +98,9 @@
 
20265
       retarray->offset = 0;
 
20266
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20267
 
 
20268
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20269
-                  * extent[rank-1];
 
20270
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20271
 
 
20272
-      retarray->base_addr = xmalloc (alloc_size);
 
20273
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20274
       if (alloc_size == 0)
 
20275
        {
 
20276
          /* Make sure we have a zero-sized array.  */
 
20277
@@ -294,8 +293,7 @@
 
20278
 
 
20279
        }
 
20280
 
 
20281
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20282
-                  * extent[rank-1];
 
20283
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20284
 
 
20285
       retarray->offset = 0;
 
20286
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20287
@@ -307,7 +305,7 @@
 
20288
          return;
 
20289
        }
 
20290
       else
 
20291
-       retarray->base_addr = xmalloc (alloc_size);
 
20292
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20293
 
 
20294
     }
 
20295
   else
 
20296
@@ -485,8 +483,7 @@
 
20297
       retarray->offset = 0;
 
20298
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20299
 
 
20300
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20301
-                  * extent[rank-1];
 
20302
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20303
 
 
20304
       if (alloc_size == 0)
 
20305
        {
 
20306
@@ -495,7 +492,7 @@
 
20307
          return;
 
20308
        }
 
20309
       else
 
20310
-       retarray->base_addr = xmalloc (alloc_size);
 
20311
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20312
     }
 
20313
   else
 
20314
     {
 
20315
Index: libgfortran/generated/any_l8.c
 
20316
===================================================================
 
20317
--- a/src/libgfortran/generated/any_l8.c        (.../tags/gcc_4_8_3_release)
 
20318
+++ b/src/libgfortran/generated/any_l8.c        (.../branches/gcc-4_8-branch)
 
20319
@@ -101,8 +101,7 @@
 
20320
       retarray->offset = 0;
 
20321
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20322
 
 
20323
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20324
-                  * extent[rank-1];
 
20325
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20326
 
 
20327
       if (alloc_size == 0)
 
20328
        {
 
20329
@@ -111,7 +110,7 @@
 
20330
          return;
 
20331
        }
 
20332
       else
 
20333
-       retarray->base_addr = xmalloc (alloc_size);
 
20334
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
20335
     }
 
20336
   else
 
20337
     {
 
20338
Index: libgfortran/generated/maxloc0_16_r10.c
 
20339
===================================================================
 
20340
--- a/src/libgfortran/generated/maxloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
20341
+++ b/src/libgfortran/generated/maxloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
20342
@@ -58,7 +58,7 @@
 
20343
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20344
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20345
       retarray->offset = 0;
 
20346
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20347
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20348
     }
 
20349
   else
 
20350
     {
 
20351
@@ -199,7 +199,7 @@
 
20352
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20353
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20354
       retarray->offset = 0;
 
20355
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20356
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20357
     }
 
20358
   else
 
20359
     {
 
20360
@@ -367,7 +367,7 @@
 
20361
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20362
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20363
       retarray->offset = 0;
 
20364
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20365
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20366
     }
 
20367
   else if (unlikely (compile_options.bounds_check))
 
20368
     {
 
20369
Index: libgfortran/generated/minloc0_4_i16.c
 
20370
===================================================================
 
20371
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
20372
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
20373
@@ -58,7 +58,7 @@
 
20374
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20375
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20376
       retarray->offset = 0;
 
20377
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20378
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20379
     }
 
20380
   else
 
20381
     {
 
20382
@@ -199,7 +199,7 @@
 
20383
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20384
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20385
       retarray->offset = 0;
 
20386
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20387
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20388
     }
 
20389
   else
 
20390
     {
 
20391
@@ -367,7 +367,7 @@
 
20392
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20393
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20394
       retarray->offset = 0;
 
20395
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20396
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20397
     }
 
20398
   else if (unlikely (compile_options.bounds_check))
 
20399
     {
 
20400
Index: libgfortran/generated/maxloc0_8_r8.c
 
20401
===================================================================
 
20402
--- a/src/libgfortran/generated/maxloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
20403
+++ b/src/libgfortran/generated/maxloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
20404
@@ -58,7 +58,7 @@
 
20405
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20406
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20407
       retarray->offset = 0;
 
20408
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20409
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20410
     }
 
20411
   else
 
20412
     {
 
20413
@@ -199,7 +199,7 @@
 
20414
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20415
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20416
       retarray->offset = 0;
 
20417
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20418
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20419
     }
 
20420
   else
 
20421
     {
 
20422
@@ -367,7 +367,7 @@
 
20423
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20424
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20425
       retarray->offset = 0;
 
20426
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20427
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20428
     }
 
20429
   else if (unlikely (compile_options.bounds_check))
 
20430
     {
 
20431
Index: libgfortran/generated/minloc1_4_r10.c
 
20432
===================================================================
 
20433
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
20434
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
20435
@@ -98,10 +98,9 @@
 
20436
       retarray->offset = 0;
 
20437
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20438
 
 
20439
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20440
-                  * extent[rank-1];
 
20441
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20442
 
 
20443
-      retarray->base_addr = xmalloc (alloc_size);
 
20444
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20445
       if (alloc_size == 0)
 
20446
        {
 
20447
          /* Make sure we have a zero-sized array.  */
 
20448
@@ -294,8 +293,7 @@
 
20449
 
 
20450
        }
 
20451
 
 
20452
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20453
-                  * extent[rank-1];
 
20454
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20455
 
 
20456
       retarray->offset = 0;
 
20457
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20458
@@ -307,7 +305,7 @@
 
20459
          return;
 
20460
        }
 
20461
       else
 
20462
-       retarray->base_addr = xmalloc (alloc_size);
 
20463
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20464
 
 
20465
     }
 
20466
   else
 
20467
@@ -485,8 +483,7 @@
 
20468
       retarray->offset = 0;
 
20469
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20470
 
 
20471
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20472
-                  * extent[rank-1];
 
20473
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20474
 
 
20475
       if (alloc_size == 0)
 
20476
        {
 
20477
@@ -495,7 +492,7 @@
 
20478
          return;
 
20479
        }
 
20480
       else
 
20481
-       retarray->base_addr = xmalloc (alloc_size);
 
20482
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20483
     }
 
20484
   else
 
20485
     {
 
20486
Index: libgfortran/generated/minloc1_8_i16.c
 
20487
===================================================================
 
20488
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
20489
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
20490
@@ -98,10 +98,9 @@
 
20491
       retarray->offset = 0;
 
20492
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20493
 
 
20494
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20495
-                  * extent[rank-1];
 
20496
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20497
 
 
20498
-      retarray->base_addr = xmalloc (alloc_size);
 
20499
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20500
       if (alloc_size == 0)
 
20501
        {
 
20502
          /* Make sure we have a zero-sized array.  */
 
20503
@@ -294,8 +293,7 @@
 
20504
 
 
20505
        }
 
20506
 
 
20507
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20508
-                  * extent[rank-1];
 
20509
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20510
 
 
20511
       retarray->offset = 0;
 
20512
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20513
@@ -307,7 +305,7 @@
 
20514
          return;
 
20515
        }
 
20516
       else
 
20517
-       retarray->base_addr = xmalloc (alloc_size);
 
20518
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20519
 
 
20520
     }
 
20521
   else
 
20522
@@ -485,8 +483,7 @@
 
20523
       retarray->offset = 0;
 
20524
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20525
 
 
20526
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20527
-                  * extent[rank-1];
 
20528
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20529
 
 
20530
       if (alloc_size == 0)
 
20531
        {
 
20532
@@ -495,7 +492,7 @@
 
20533
          return;
 
20534
        }
 
20535
       else
 
20536
-       retarray->base_addr = xmalloc (alloc_size);
 
20537
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20538
     }
 
20539
   else
 
20540
     {
 
20541
Index: libgfortran/generated/maxloc0_8_r10.c
 
20542
===================================================================
 
20543
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
20544
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
20545
@@ -58,7 +58,7 @@
 
20546
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20547
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20548
       retarray->offset = 0;
 
20549
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20550
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20551
     }
 
20552
   else
 
20553
     {
 
20554
@@ -199,7 +199,7 @@
 
20555
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20556
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20557
       retarray->offset = 0;
 
20558
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20559
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20560
     }
 
20561
   else
 
20562
     {
 
20563
@@ -367,7 +367,7 @@
 
20564
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20565
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20566
       retarray->offset = 0;
 
20567
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20568
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20569
     }
 
20570
   else if (unlikely (compile_options.bounds_check))
 
20571
     {
 
20572
Index: libgfortran/generated/unpack_i4.c
 
20573
===================================================================
 
20574
--- a/src/libgfortran/generated/unpack_i4.c     (.../tags/gcc_4_8_3_release)
 
20575
+++ b/src/libgfortran/generated/unpack_i4.c     (.../branches/gcc-4_8-branch)
 
20576
@@ -99,7 +99,7 @@
 
20577
          rs *= extent[n];
 
20578
        }
 
20579
       ret->offset = 0;
 
20580
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
20581
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
20582
     }
 
20583
   else
 
20584
     {
 
20585
@@ -244,7 +244,7 @@
 
20586
          rs *= extent[n];
 
20587
        }
 
20588
       ret->offset = 0;
 
20589
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
20590
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
20591
     }
 
20592
   else
 
20593
     {
 
20594
Index: libgfortran/generated/minloc1_16_r4.c
 
20595
===================================================================
 
20596
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
20597
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
20598
@@ -98,10 +98,9 @@
 
20599
       retarray->offset = 0;
 
20600
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20601
 
 
20602
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20603
-                  * extent[rank-1];
 
20604
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20605
 
 
20606
-      retarray->base_addr = xmalloc (alloc_size);
 
20607
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20608
       if (alloc_size == 0)
 
20609
        {
 
20610
          /* Make sure we have a zero-sized array.  */
 
20611
@@ -294,8 +293,7 @@
 
20612
 
 
20613
        }
 
20614
 
 
20615
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20616
-                  * extent[rank-1];
 
20617
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20618
 
 
20619
       retarray->offset = 0;
 
20620
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20621
@@ -307,7 +305,7 @@
 
20622
          return;
 
20623
        }
 
20624
       else
 
20625
-       retarray->base_addr = xmalloc (alloc_size);
 
20626
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20627
 
 
20628
     }
 
20629
   else
 
20630
@@ -485,8 +483,7 @@
 
20631
       retarray->offset = 0;
 
20632
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20633
 
 
20634
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20635
-                  * extent[rank-1];
 
20636
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20637
 
 
20638
       if (alloc_size == 0)
 
20639
        {
 
20640
@@ -495,7 +492,7 @@
 
20641
          return;
 
20642
        }
 
20643
       else
 
20644
-       retarray->base_addr = xmalloc (alloc_size);
 
20645
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20646
     }
 
20647
   else
 
20648
     {
 
20649
Index: libgfortran/generated/product_i8.c
 
20650
===================================================================
 
20651
--- a/src/libgfortran/generated/product_i8.c    (.../tags/gcc_4_8_3_release)
 
20652
+++ b/src/libgfortran/generated/product_i8.c    (.../branches/gcc-4_8-branch)
 
20653
@@ -97,10 +97,9 @@
 
20654
       retarray->offset = 0;
 
20655
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20656
 
 
20657
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20658
-                  * extent[rank-1];
 
20659
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20660
 
 
20661
-      retarray->base_addr = xmalloc (alloc_size);
 
20662
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20663
       if (alloc_size == 0)
 
20664
        {
 
20665
          /* Make sure we have a zero-sized array.  */
 
20666
@@ -272,8 +271,7 @@
 
20667
 
 
20668
        }
 
20669
 
 
20670
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20671
-                  * extent[rank-1];
 
20672
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20673
 
 
20674
       retarray->offset = 0;
 
20675
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20676
@@ -285,7 +283,7 @@
 
20677
          return;
 
20678
        }
 
20679
       else
 
20680
-       retarray->base_addr = xmalloc (alloc_size);
 
20681
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20682
 
 
20683
     }
 
20684
   else
 
20685
@@ -430,8 +428,7 @@
 
20686
       retarray->offset = 0;
 
20687
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20688
 
 
20689
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20690
-                  * extent[rank-1];
 
20691
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20692
 
 
20693
       if (alloc_size == 0)
 
20694
        {
 
20695
@@ -440,7 +437,7 @@
 
20696
          return;
 
20697
        }
 
20698
       else
 
20699
-       retarray->base_addr = xmalloc (alloc_size);
 
20700
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20701
     }
 
20702
   else
 
20703
     {
 
20704
Index: libgfortran/generated/minloc0_16_r8.c
 
20705
===================================================================
 
20706
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
20707
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
20708
@@ -58,7 +58,7 @@
 
20709
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20710
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20711
       retarray->offset = 0;
 
20712
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20713
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20714
     }
 
20715
   else
 
20716
     {
 
20717
@@ -199,7 +199,7 @@
 
20718
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20719
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20720
       retarray->offset = 0;
 
20721
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20722
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20723
     }
 
20724
   else
 
20725
     {
 
20726
@@ -367,7 +367,7 @@
 
20727
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20728
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20729
       retarray->offset = 0;
 
20730
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20731
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20732
     }
 
20733
   else if (unlikely (compile_options.bounds_check))
 
20734
     {
 
20735
Index: libgfortran/generated/count_2_l.c
 
20736
===================================================================
 
20737
--- a/src/libgfortran/generated/count_2_l.c     (.../tags/gcc_4_8_3_release)
 
20738
+++ b/src/libgfortran/generated/count_2_l.c     (.../branches/gcc-4_8-branch)
 
20739
@@ -101,8 +101,7 @@
 
20740
       retarray->offset = 0;
 
20741
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20742
 
 
20743
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20744
-                  * extent[rank-1];
 
20745
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20746
 
 
20747
       if (alloc_size == 0)
 
20748
        {
 
20749
@@ -111,7 +110,7 @@
 
20750
          return;
 
20751
        }
 
20752
       else
 
20753
-       retarray->base_addr = xmalloc (alloc_size);
 
20754
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
20755
     }
 
20756
   else
 
20757
     {
 
20758
Index: libgfortran/generated/transpose_r8.c
 
20759
===================================================================
 
20760
--- a/src/libgfortran/generated/transpose_r8.c  (.../tags/gcc_4_8_3_release)
 
20761
+++ b/src/libgfortran/generated/transpose_r8.c  (.../branches/gcc-4_8-branch)
 
20762
@@ -60,7 +60,8 @@
 
20763
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
20764
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
20765
 
 
20766
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
 
20767
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
20768
+                                     sizeof (GFC_REAL_8));
 
20769
       ret->offset = 0;
 
20770
     } else if (unlikely (compile_options.bounds_check))
 
20771
     {
 
20772
Index: libgfortran/generated/cshift1_8.c
 
20773
===================================================================
 
20774
--- a/src/libgfortran/generated/cshift1_8.c     (.../tags/gcc_4_8_3_release)
 
20775
+++ b/src/libgfortran/generated/cshift1_8.c     (.../branches/gcc-4_8-branch)
 
20776
@@ -80,7 +80,7 @@
 
20777
     {
 
20778
       int i;
 
20779
 
 
20780
-      ret->base_addr = xmalloc (size * arraysize);
 
20781
+      ret->base_addr = xmallocarray (arraysize, size);
 
20782
       ret->offset = 0;
 
20783
       ret->dtype = array->dtype;
 
20784
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
20785
Index: libgfortran/generated/matmul_i4.c
 
20786
===================================================================
 
20787
--- a/src/libgfortran/generated/matmul_i4.c     (.../tags/gcc_4_8_3_release)
 
20788
+++ b/src/libgfortran/generated/matmul_i4.c     (.../branches/gcc-4_8-branch)
 
20789
@@ -124,7 +124,7 @@
 
20790
         }
 
20791
 
 
20792
       retarray->base_addr
 
20793
-       = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
 
20794
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
 
20795
       retarray->offset = 0;
 
20796
     }
 
20797
     else if (unlikely (compile_options.bounds_check))
 
20798
Index: libgfortran/generated/pack_r10.c
 
20799
===================================================================
 
20800
--- a/src/libgfortran/generated/pack_r10.c      (.../tags/gcc_4_8_3_release)
 
20801
+++ b/src/libgfortran/generated/pack_r10.c      (.../branches/gcc-4_8-branch)
 
20802
@@ -167,8 +167,8 @@
 
20803
 
 
20804
          ret->offset = 0;
 
20805
 
 
20806
-         /* xmalloc allocates a single byte for zero size.  */
 
20807
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
 
20808
+         /* xmallocarray allocates a single byte for zero size.  */
 
20809
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
 
20810
 
 
20811
          if (total == 0)
 
20812
            return;
 
20813
Index: libgfortran/generated/minloc1_16_i2.c
 
20814
===================================================================
 
20815
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
20816
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
20817
@@ -98,10 +98,9 @@
 
20818
       retarray->offset = 0;
 
20819
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20820
 
 
20821
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20822
-                  * extent[rank-1];
 
20823
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20824
 
 
20825
-      retarray->base_addr = xmalloc (alloc_size);
 
20826
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20827
       if (alloc_size == 0)
 
20828
        {
 
20829
          /* Make sure we have a zero-sized array.  */
 
20830
@@ -294,8 +293,7 @@
 
20831
 
 
20832
        }
 
20833
 
 
20834
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20835
-                  * extent[rank-1];
 
20836
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20837
 
 
20838
       retarray->offset = 0;
 
20839
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20840
@@ -307,7 +305,7 @@
 
20841
          return;
 
20842
        }
 
20843
       else
 
20844
-       retarray->base_addr = xmalloc (alloc_size);
 
20845
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20846
 
 
20847
     }
 
20848
   else
 
20849
@@ -485,8 +483,7 @@
 
20850
       retarray->offset = 0;
 
20851
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20852
 
 
20853
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20854
-                  * extent[rank-1];
 
20855
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20856
 
 
20857
       if (alloc_size == 0)
 
20858
        {
 
20859
@@ -495,7 +492,7 @@
 
20860
          return;
 
20861
        }
 
20862
       else
 
20863
-       retarray->base_addr = xmalloc (alloc_size);
 
20864
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20865
     }
 
20866
   else
 
20867
     {
 
20868
Index: libgfortran/generated/in_pack_i8.c
 
20869
===================================================================
 
20870
--- a/src/libgfortran/generated/in_pack_i8.c    (.../tags/gcc_4_8_3_release)
 
20871
+++ b/src/libgfortran/generated/in_pack_i8.c    (.../branches/gcc-4_8-branch)
 
20872
@@ -76,7 +76,7 @@
 
20873
     return source->base_addr;
 
20874
 
 
20875
   /* Allocate storage for the destination.  */
 
20876
-  destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
 
20877
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
 
20878
   dest = destptr;
 
20879
   src = source->base_addr;
 
20880
   stride0 = stride[0];
 
20881
Index: libgfortran/generated/transpose_r16.c
 
20882
===================================================================
 
20883
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
 
20884
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
 
20885
@@ -60,7 +60,8 @@
 
20886
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
20887
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
20888
 
 
20889
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
 
20890
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
20891
+                                     sizeof (GFC_REAL_16));
 
20892
       ret->offset = 0;
 
20893
     } else if (unlikely (compile_options.bounds_check))
 
20894
     {
 
20895
Index: libgfortran/generated/minloc1_4_i4.c
 
20896
===================================================================
 
20897
--- a/src/libgfortran/generated/minloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
20898
+++ b/src/libgfortran/generated/minloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
20899
@@ -98,10 +98,9 @@
 
20900
       retarray->offset = 0;
 
20901
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20902
 
 
20903
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20904
-                  * extent[rank-1];
 
20905
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20906
 
 
20907
-      retarray->base_addr = xmalloc (alloc_size);
 
20908
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20909
       if (alloc_size == 0)
 
20910
        {
 
20911
          /* Make sure we have a zero-sized array.  */
 
20912
@@ -294,8 +293,7 @@
 
20913
 
 
20914
        }
 
20915
 
 
20916
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20917
-                  * extent[rank-1];
 
20918
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20919
 
 
20920
       retarray->offset = 0;
 
20921
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20922
@@ -307,7 +305,7 @@
 
20923
          return;
 
20924
        }
 
20925
       else
 
20926
-       retarray->base_addr = xmalloc (alloc_size);
 
20927
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20928
 
 
20929
     }
 
20930
   else
 
20931
@@ -485,8 +483,7 @@
 
20932
       retarray->offset = 0;
 
20933
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20934
 
 
20935
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20936
-                  * extent[rank-1];
 
20937
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20938
 
 
20939
       if (alloc_size == 0)
 
20940
        {
 
20941
@@ -495,7 +492,7 @@
 
20942
          return;
 
20943
        }
 
20944
       else
 
20945
-       retarray->base_addr = xmalloc (alloc_size);
 
20946
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20947
     }
 
20948
   else
 
20949
     {
 
20950
Index: libgfortran/generated/maxval_i1.c
 
20951
===================================================================
 
20952
--- a/src/libgfortran/generated/maxval_i1.c     (.../tags/gcc_4_8_3_release)
 
20953
+++ b/src/libgfortran/generated/maxval_i1.c     (.../branches/gcc-4_8-branch)
 
20954
@@ -97,10 +97,9 @@
 
20955
       retarray->offset = 0;
 
20956
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20957
 
 
20958
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20959
-                  * extent[rank-1];
 
20960
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20961
 
 
20962
-      retarray->base_addr = xmalloc (alloc_size);
 
20963
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20964
       if (alloc_size == 0)
 
20965
        {
 
20966
          /* Make sure we have a zero-sized array.  */
 
20967
@@ -286,8 +285,7 @@
 
20968
 
 
20969
        }
 
20970
 
 
20971
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20972
-                  * extent[rank-1];
 
20973
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20974
 
 
20975
       retarray->offset = 0;
 
20976
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20977
@@ -299,7 +297,7 @@
 
20978
          return;
 
20979
        }
 
20980
       else
 
20981
-       retarray->base_addr = xmalloc (alloc_size);
 
20982
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20983
 
 
20984
     }
 
20985
   else
 
20986
@@ -472,8 +470,7 @@
 
20987
       retarray->offset = 0;
 
20988
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20989
 
 
20990
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20991
-                  * extent[rank-1];
 
20992
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20993
 
 
20994
       if (alloc_size == 0)
 
20995
        {
 
20996
@@ -482,7 +479,7 @@
 
20997
          return;
 
20998
        }
 
20999
       else
 
21000
-       retarray->base_addr = xmalloc (alloc_size);
 
21001
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
21002
     }
 
21003
   else
 
21004
     {
 
21005
Index: libgfortran/generated/product_c16.c
 
21006
===================================================================
 
21007
--- a/src/libgfortran/generated/product_c16.c   (.../tags/gcc_4_8_3_release)
 
21008
+++ b/src/libgfortran/generated/product_c16.c   (.../branches/gcc-4_8-branch)
 
21009
@@ -97,10 +97,9 @@
 
21010
       retarray->offset = 0;
 
21011
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21012
 
 
21013
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21014
-                  * extent[rank-1];
 
21015
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21016
 
 
21017
-      retarray->base_addr = xmalloc (alloc_size);
 
21018
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
21019
       if (alloc_size == 0)
 
21020
        {
 
21021
          /* Make sure we have a zero-sized array.  */
 
21022
@@ -272,8 +271,7 @@
 
21023
 
 
21024
        }
 
21025
 
 
21026
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21027
-                  * extent[rank-1];
 
21028
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21029
 
 
21030
       retarray->offset = 0;
 
21031
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21032
@@ -285,7 +283,7 @@
 
21033
          return;
 
21034
        }
 
21035
       else
 
21036
-       retarray->base_addr = xmalloc (alloc_size);
 
21037
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
21038
 
 
21039
     }
 
21040
   else
 
21041
@@ -430,8 +428,7 @@
 
21042
       retarray->offset = 0;
 
21043
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21044
 
 
21045
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21046
-                  * extent[rank-1];
 
21047
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21048
 
 
21049
       if (alloc_size == 0)
 
21050
        {
 
21051
@@ -440,7 +437,7 @@
 
21052
          return;
 
21053
        }
 
21054
       else
 
21055
-       retarray->base_addr = xmalloc (alloc_size);
 
21056
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
21057
     }
 
21058
   else
 
21059
     {
 
21060
Index: libgfortran/generated/reshape_r4.c
 
21061
===================================================================
 
21062
--- a/src/libgfortran/generated/reshape_r4.c    (.../tags/gcc_4_8_3_release)
 
21063
+++ b/src/libgfortran/generated/reshape_r4.c    (.../branches/gcc-4_8-branch)
 
21064
@@ -111,11 +111,11 @@
 
21065
       ret->offset = 0;
 
21066
 
 
21067
       if (unlikely (rs < 1))
 
21068
-        alloc_size = 1;
 
21069
+        alloc_size = 0;
 
21070
       else
 
21071
-        alloc_size = rs * sizeof (GFC_REAL_4);
 
21072
+        alloc_size = rs;
 
21073
 
 
21074
-      ret->base_addr = xmalloc (alloc_size);
 
21075
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
21076
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
21077
     }
 
21078
 
 
21079
Index: libgfortran/generated/iany_i8.c
 
21080
===================================================================
 
21081
--- a/src/libgfortran/generated/iany_i8.c       (.../tags/gcc_4_8_3_release)
 
21082
+++ b/src/libgfortran/generated/iany_i8.c       (.../branches/gcc-4_8-branch)
 
21083
@@ -97,10 +97,9 @@
 
21084
       retarray->offset = 0;
 
21085
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21086
 
 
21087
-      alloc_size = sizeof (GFC_INTEGER_8) * 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->base_addr = xmalloc (alloc_size);
 
21092
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21093
       if (alloc_size == 0)
 
21094
        {
 
21095
          /* Make sure we have a zero-sized array.  */
 
21096
@@ -272,8 +271,7 @@
 
21097
 
 
21098
        }
 
21099
 
 
21100
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21101
-                  * extent[rank-1];
 
21102
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21103
 
 
21104
       retarray->offset = 0;
 
21105
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21106
@@ -285,7 +283,7 @@
 
21107
          return;
 
21108
        }
 
21109
       else
 
21110
-       retarray->base_addr = xmalloc (alloc_size);
 
21111
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21112
 
 
21113
     }
 
21114
   else
 
21115
@@ -430,8 +428,7 @@
 
21116
       retarray->offset = 0;
 
21117
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21118
 
 
21119
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21120
-                  * extent[rank-1];
 
21121
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21122
 
 
21123
       if (alloc_size == 0)
 
21124
        {
 
21125
@@ -440,7 +437,7 @@
 
21126
          return;
 
21127
        }
 
21128
       else
 
21129
-       retarray->base_addr = xmalloc (alloc_size);
 
21130
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21131
     }
 
21132
   else
 
21133
     {
 
21134
Index: libgfortran/generated/cshift1_16.c
 
21135
===================================================================
 
21136
--- a/src/libgfortran/generated/cshift1_16.c    (.../tags/gcc_4_8_3_release)
 
21137
+++ b/src/libgfortran/generated/cshift1_16.c    (.../branches/gcc-4_8-branch)
 
21138
@@ -80,7 +80,7 @@
 
21139
     {
 
21140
       int i;
 
21141
 
 
21142
-      ret->base_addr = xmalloc (size * arraysize);
 
21143
+      ret->base_addr = xmallocarray (arraysize, size);
 
21144
       ret->offset = 0;
 
21145
       ret->dtype = array->dtype;
 
21146
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
21147
Index: libgfortran/generated/maxloc0_4_i1.c
 
21148
===================================================================
 
21149
--- a/src/libgfortran/generated/maxloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
21150
+++ b/src/libgfortran/generated/maxloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
21151
@@ -58,7 +58,7 @@
 
21152
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21153
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21154
       retarray->offset = 0;
 
21155
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21156
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21157
     }
 
21158
   else
 
21159
     {
 
21160
@@ -199,7 +199,7 @@
 
21161
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21162
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21163
       retarray->offset = 0;
 
21164
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21165
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21166
     }
 
21167
   else
 
21168
     {
 
21169
@@ -367,7 +367,7 @@
 
21170
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21171
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21172
       retarray->offset = 0;
 
21173
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21174
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21175
     }
 
21176
   else if (unlikely (compile_options.bounds_check))
 
21177
     {
 
21178
Index: libgfortran/generated/minloc0_4_i8.c
 
21179
===================================================================
 
21180
--- a/src/libgfortran/generated/minloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
21181
+++ b/src/libgfortran/generated/minloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
21182
@@ -58,7 +58,7 @@
 
21183
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21184
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21185
       retarray->offset = 0;
 
21186
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21187
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21188
     }
 
21189
   else
 
21190
     {
 
21191
@@ -199,7 +199,7 @@
 
21192
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21193
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21194
       retarray->offset = 0;
 
21195
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21196
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21197
     }
 
21198
   else
 
21199
     {
 
21200
@@ -367,7 +367,7 @@
 
21201
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21202
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21203
       retarray->offset = 0;
 
21204
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21205
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21206
     }
 
21207
   else if (unlikely (compile_options.bounds_check))
 
21208
     {
 
21209
Index: libgfortran/generated/spread_c16.c
 
21210
===================================================================
 
21211
--- a/src/libgfortran/generated/spread_c16.c    (.../tags/gcc_4_8_3_release)
 
21212
+++ b/src/libgfortran/generated/spread_c16.c    (.../branches/gcc-4_8-branch)
 
21213
@@ -101,8 +101,8 @@
 
21214
        }
 
21215
       ret->offset = 0;
 
21216
 
 
21217
-      /* xmalloc allocates a single byte for zero size.  */
 
21218
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
 
21219
+      /* xmallocarray allocates a single byte for zero size.  */
 
21220
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
 
21221
       if (rs <= 0)
 
21222
         return;
 
21223
     }
 
21224
@@ -244,7 +244,7 @@
 
21225
 
 
21226
   if (ret->base_addr == NULL)
 
21227
     {
 
21228
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
 
21229
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
 
21230
       ret->offset = 0;
 
21231
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
21232
     }
 
21233
Index: libgfortran/generated/maxval_r4.c
 
21234
===================================================================
 
21235
--- a/src/libgfortran/generated/maxval_r4.c     (.../tags/gcc_4_8_3_release)
 
21236
+++ b/src/libgfortran/generated/maxval_r4.c     (.../branches/gcc-4_8-branch)
 
21237
@@ -97,10 +97,9 @@
 
21238
       retarray->offset = 0;
 
21239
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21240
 
 
21241
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21242
-                  * extent[rank-1];
 
21243
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21244
 
 
21245
-      retarray->base_addr = xmalloc (alloc_size);
 
21246
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
21247
       if (alloc_size == 0)
 
21248
        {
 
21249
          /* Make sure we have a zero-sized array.  */
 
21250
@@ -286,8 +285,7 @@
 
21251
 
 
21252
        }
 
21253
 
 
21254
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21255
-                  * extent[rank-1];
 
21256
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21257
 
 
21258
       retarray->offset = 0;
 
21259
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21260
@@ -299,7 +297,7 @@
 
21261
          return;
 
21262
        }
 
21263
       else
 
21264
-       retarray->base_addr = xmalloc (alloc_size);
 
21265
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
21266
 
 
21267
     }
 
21268
   else
 
21269
@@ -472,8 +470,7 @@
 
21270
       retarray->offset = 0;
 
21271
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21272
 
 
21273
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21274
-                  * extent[rank-1];
 
21275
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21276
 
 
21277
       if (alloc_size == 0)
 
21278
        {
 
21279
@@ -482,7 +479,7 @@
 
21280
          return;
 
21281
        }
 
21282
       else
 
21283
-       retarray->base_addr = xmalloc (alloc_size);
 
21284
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
21285
     }
 
21286
   else
 
21287
     {
 
21288
Index: libgfortran/generated/minval_r8.c
 
21289
===================================================================
 
21290
--- a/src/libgfortran/generated/minval_r8.c     (.../tags/gcc_4_8_3_release)
 
21291
+++ b/src/libgfortran/generated/minval_r8.c     (.../branches/gcc-4_8-branch)
 
21292
@@ -97,10 +97,9 @@
 
21293
       retarray->offset = 0;
 
21294
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21295
 
 
21296
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21297
-                  * extent[rank-1];
 
21298
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21299
 
 
21300
-      retarray->base_addr = xmalloc (alloc_size);
 
21301
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
21302
       if (alloc_size == 0)
 
21303
        {
 
21304
          /* Make sure we have a zero-sized array.  */
 
21305
@@ -286,8 +285,7 @@
 
21306
 
 
21307
        }
 
21308
 
 
21309
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21310
-                  * extent[rank-1];
 
21311
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21312
 
 
21313
       retarray->offset = 0;
 
21314
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21315
@@ -299,7 +297,7 @@
 
21316
          return;
 
21317
        }
 
21318
       else
 
21319
-       retarray->base_addr = xmalloc (alloc_size);
 
21320
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
21321
 
 
21322
     }
 
21323
   else
 
21324
@@ -472,8 +470,7 @@
 
21325
       retarray->offset = 0;
 
21326
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21327
 
 
21328
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21329
-                  * extent[rank-1];
 
21330
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21331
 
 
21332
       if (alloc_size == 0)
 
21333
        {
 
21334
@@ -482,7 +479,7 @@
 
21335
          return;
 
21336
        }
 
21337
       else
 
21338
-       retarray->base_addr = xmalloc (alloc_size);
 
21339
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
21340
     }
 
21341
   else
 
21342
     {
 
21343
Index: libgfortran/generated/minloc1_16_r16.c
 
21344
===================================================================
 
21345
--- a/src/libgfortran/generated/minloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
21346
+++ b/src/libgfortran/generated/minloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
21347
@@ -98,10 +98,9 @@
 
21348
       retarray->offset = 0;
 
21349
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21350
 
 
21351
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21352
-                  * extent[rank-1];
 
21353
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21354
 
 
21355
-      retarray->base_addr = xmalloc (alloc_size);
 
21356
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21357
       if (alloc_size == 0)
 
21358
        {
 
21359
          /* Make sure we have a zero-sized array.  */
 
21360
@@ -294,8 +293,7 @@
 
21361
 
 
21362
        }
 
21363
 
 
21364
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21365
-                  * extent[rank-1];
 
21366
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21367
 
 
21368
       retarray->offset = 0;
 
21369
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21370
@@ -307,7 +305,7 @@
 
21371
          return;
 
21372
        }
 
21373
       else
 
21374
-       retarray->base_addr = xmalloc (alloc_size);
 
21375
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21376
 
 
21377
     }
 
21378
   else
 
21379
@@ -485,8 +483,7 @@
 
21380
       retarray->offset = 0;
 
21381
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21382
 
 
21383
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21384
-                  * extent[rank-1];
 
21385
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21386
 
 
21387
       if (alloc_size == 0)
 
21388
        {
 
21389
@@ -495,7 +492,7 @@
 
21390
          return;
 
21391
        }
 
21392
       else
 
21393
-       retarray->base_addr = xmalloc (alloc_size);
 
21394
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21395
     }
 
21396
   else
 
21397
     {
 
21398
Index: libgfortran/generated/unpack_i16.c
 
21399
===================================================================
 
21400
--- a/src/libgfortran/generated/unpack_i16.c    (.../tags/gcc_4_8_3_release)
 
21401
+++ b/src/libgfortran/generated/unpack_i16.c    (.../branches/gcc-4_8-branch)
 
21402
@@ -99,7 +99,7 @@
 
21403
          rs *= extent[n];
 
21404
        }
 
21405
       ret->offset = 0;
 
21406
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
21407
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
21408
     }
 
21409
   else
 
21410
     {
 
21411
@@ -244,7 +244,7 @@
 
21412
          rs *= extent[n];
 
21413
        }
 
21414
       ret->offset = 0;
 
21415
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
21416
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
21417
     }
 
21418
   else
 
21419
     {
 
21420
Index: libgfortran/generated/sum_i8.c
 
21421
===================================================================
 
21422
--- a/src/libgfortran/generated/sum_i8.c        (.../tags/gcc_4_8_3_release)
 
21423
+++ b/src/libgfortran/generated/sum_i8.c        (.../branches/gcc-4_8-branch)
 
21424
@@ -97,10 +97,9 @@
 
21425
       retarray->offset = 0;
 
21426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21427
 
 
21428
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21429
-                  * extent[rank-1];
 
21430
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21431
 
 
21432
-      retarray->base_addr = xmalloc (alloc_size);
 
21433
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21434
       if (alloc_size == 0)
 
21435
        {
 
21436
          /* Make sure we have a zero-sized array.  */
 
21437
@@ -272,8 +271,7 @@
 
21438
 
 
21439
        }
 
21440
 
 
21441
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21442
-                  * extent[rank-1];
 
21443
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21444
 
 
21445
       retarray->offset = 0;
 
21446
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21447
@@ -285,7 +283,7 @@
 
21448
          return;
 
21449
        }
 
21450
       else
 
21451
-       retarray->base_addr = xmalloc (alloc_size);
 
21452
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21453
 
 
21454
     }
 
21455
   else
 
21456
@@ -430,8 +428,7 @@
 
21457
       retarray->offset = 0;
 
21458
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21459
 
 
21460
-      alloc_size = sizeof (GFC_INTEGER_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
@@ -440,7 +437,7 @@
 
21467
          return;
 
21468
        }
 
21469
       else
 
21470
-       retarray->base_addr = xmalloc (alloc_size);
 
21471
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21472
     }
 
21473
   else
 
21474
     {
 
21475
Index: libgfortran/generated/pack_i1.c
 
21476
===================================================================
 
21477
--- a/src/libgfortran/generated/pack_i1.c       (.../tags/gcc_4_8_3_release)
 
21478
+++ b/src/libgfortran/generated/pack_i1.c       (.../branches/gcc-4_8-branch)
 
21479
@@ -167,8 +167,8 @@
 
21480
 
 
21481
          ret->offset = 0;
 
21482
 
 
21483
-         /* xmalloc allocates a single byte for zero size.  */
 
21484
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
 
21485
+         /* xmallocarray allocates a single byte for zero size.  */
 
21486
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
 
21487
 
 
21488
          if (total == 0)
 
21489
            return;
 
21490
Index: libgfortran/generated/any_l16.c
 
21491
===================================================================
 
21492
--- a/src/libgfortran/generated/any_l16.c       (.../tags/gcc_4_8_3_release)
 
21493
+++ b/src/libgfortran/generated/any_l16.c       (.../branches/gcc-4_8-branch)
 
21494
@@ -101,8 +101,7 @@
 
21495
       retarray->offset = 0;
 
21496
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21497
 
 
21498
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21499
-                  * extent[rank-1];
 
21500
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21501
 
 
21502
       if (alloc_size == 0)
 
21503
        {
 
21504
@@ -111,7 +110,7 @@
 
21505
          return;
 
21506
        }
 
21507
       else
 
21508
-       retarray->base_addr = xmalloc (alloc_size);
 
21509
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
21510
     }
 
21511
   else
 
21512
     {
 
21513
Index: libgfortran/generated/spread_i8.c
 
21514
===================================================================
 
21515
--- a/src/libgfortran/generated/spread_i8.c     (.../tags/gcc_4_8_3_release)
 
21516
+++ b/src/libgfortran/generated/spread_i8.c     (.../branches/gcc-4_8-branch)
 
21517
@@ -101,8 +101,8 @@
 
21518
        }
 
21519
       ret->offset = 0;
 
21520
 
 
21521
-      /* xmalloc allocates a single byte for zero size.  */
 
21522
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
 
21523
+      /* xmallocarray allocates a single byte for zero size.  */
 
21524
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
 
21525
       if (rs <= 0)
 
21526
         return;
 
21527
     }
 
21528
@@ -244,7 +244,7 @@
 
21529
 
 
21530
   if (ret->base_addr == NULL)
 
21531
     {
 
21532
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
 
21533
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
 
21534
       ret->offset = 0;
 
21535
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
21536
     }
 
21537
Index: libgfortran/generated/maxval_i2.c
 
21538
===================================================================
 
21539
--- a/src/libgfortran/generated/maxval_i2.c     (.../tags/gcc_4_8_3_release)
 
21540
+++ b/src/libgfortran/generated/maxval_i2.c     (.../branches/gcc-4_8-branch)
 
21541
@@ -97,10 +97,9 @@
 
21542
       retarray->offset = 0;
 
21543
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21544
 
 
21545
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21546
-                  * extent[rank-1];
 
21547
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21548
 
 
21549
-      retarray->base_addr = xmalloc (alloc_size);
 
21550
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21551
       if (alloc_size == 0)
 
21552
        {
 
21553
          /* Make sure we have a zero-sized array.  */
 
21554
@@ -286,8 +285,7 @@
 
21555
 
 
21556
        }
 
21557
 
 
21558
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21559
-                  * extent[rank-1];
 
21560
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21561
 
 
21562
       retarray->offset = 0;
 
21563
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21564
@@ -299,7 +297,7 @@
 
21565
          return;
 
21566
        }
 
21567
       else
 
21568
-       retarray->base_addr = xmalloc (alloc_size);
 
21569
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21570
 
 
21571
     }
 
21572
   else
 
21573
@@ -472,8 +470,7 @@
 
21574
       retarray->offset = 0;
 
21575
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21576
 
 
21577
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21578
-                  * extent[rank-1];
 
21579
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21580
 
 
21581
       if (alloc_size == 0)
 
21582
        {
 
21583
@@ -482,7 +479,7 @@
 
21584
          return;
 
21585
        }
 
21586
       else
 
21587
-       retarray->base_addr = xmalloc (alloc_size);
 
21588
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21589
     }
 
21590
   else
 
21591
     {
 
21592
Index: libgfortran/generated/maxloc1_8_i4.c
 
21593
===================================================================
 
21594
--- a/src/libgfortran/generated/maxloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
21595
+++ b/src/libgfortran/generated/maxloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
21596
@@ -98,10 +98,9 @@
 
21597
       retarray->offset = 0;
 
21598
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21599
 
 
21600
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21601
-                  * extent[rank-1];
 
21602
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21603
 
 
21604
-      retarray->base_addr = xmalloc (alloc_size);
 
21605
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21606
       if (alloc_size == 0)
 
21607
        {
 
21608
          /* Make sure we have a zero-sized array.  */
 
21609
@@ -294,8 +293,7 @@
 
21610
 
 
21611
        }
 
21612
 
 
21613
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21614
-                  * extent[rank-1];
 
21615
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21616
 
 
21617
       retarray->offset = 0;
 
21618
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21619
@@ -307,7 +305,7 @@
 
21620
          return;
 
21621
        }
 
21622
       else
 
21623
-       retarray->base_addr = xmalloc (alloc_size);
 
21624
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21625
 
 
21626
     }
 
21627
   else
 
21628
@@ -485,8 +483,7 @@
 
21629
       retarray->offset = 0;
 
21630
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21631
 
 
21632
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21633
-                  * extent[rank-1];
 
21634
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21635
 
 
21636
       if (alloc_size == 0)
 
21637
        {
 
21638
@@ -495,7 +492,7 @@
 
21639
          return;
 
21640
        }
 
21641
       else
 
21642
-       retarray->base_addr = xmalloc (alloc_size);
 
21643
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21644
     }
 
21645
   else
 
21646
     {
 
21647
Index: libgfortran/generated/unpack_r8.c
 
21648
===================================================================
 
21649
--- a/src/libgfortran/generated/unpack_r8.c     (.../tags/gcc_4_8_3_release)
 
21650
+++ b/src/libgfortran/generated/unpack_r8.c     (.../branches/gcc-4_8-branch)
 
21651
@@ -99,7 +99,7 @@
 
21652
          rs *= extent[n];
 
21653
        }
 
21654
       ret->offset = 0;
 
21655
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
21656
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
21657
     }
 
21658
   else
 
21659
     {
 
21660
@@ -244,7 +244,7 @@
 
21661
          rs *= extent[n];
 
21662
        }
 
21663
       ret->offset = 0;
 
21664
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
21665
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
21666
     }
 
21667
   else
 
21668
     {
 
21669
Index: libgfortran/generated/maxloc0_4_r4.c
 
21670
===================================================================
 
21671
--- a/src/libgfortran/generated/maxloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
21672
+++ b/src/libgfortran/generated/maxloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
21673
@@ -58,7 +58,7 @@
 
21674
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21675
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21676
       retarray->offset = 0;
 
21677
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21678
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21679
     }
 
21680
   else
 
21681
     {
 
21682
@@ -199,7 +199,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_4) * rank);
 
21687
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21688
     }
 
21689
   else
 
21690
     {
 
21691
@@ -367,7 +367,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_4) * rank);
 
21696
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21697
     }
 
21698
   else if (unlikely (compile_options.bounds_check))
 
21699
     {
 
21700
Index: libgfortran/generated/all_l1.c
 
21701
===================================================================
 
21702
--- a/src/libgfortran/generated/all_l1.c        (.../tags/gcc_4_8_3_release)
 
21703
+++ b/src/libgfortran/generated/all_l1.c        (.../branches/gcc-4_8-branch)
 
21704
@@ -101,8 +101,7 @@
 
21705
       retarray->offset = 0;
 
21706
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21707
 
 
21708
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21709
-                  * extent[rank-1];
 
21710
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21711
 
 
21712
       if (alloc_size == 0)
 
21713
        {
 
21714
@@ -111,7 +110,7 @@
 
21715
          return;
 
21716
        }
 
21717
       else
 
21718
-       retarray->base_addr = xmalloc (alloc_size);
 
21719
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
21720
     }
 
21721
   else
 
21722
     {
 
21723
Index: libgfortran/generated/matmul_r8.c
 
21724
===================================================================
 
21725
--- a/src/libgfortran/generated/matmul_r8.c     (.../tags/gcc_4_8_3_release)
 
21726
+++ b/src/libgfortran/generated/matmul_r8.c     (.../branches/gcc-4_8-branch)
 
21727
@@ -124,7 +124,7 @@
 
21728
         }
 
21729
 
 
21730
       retarray->base_addr
 
21731
-       = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
 
21732
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
 
21733
       retarray->offset = 0;
 
21734
     }
 
21735
     else if (unlikely (compile_options.bounds_check))
 
21736
Index: libgfortran/generated/minloc0_4_r16.c
 
21737
===================================================================
 
21738
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
21739
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
21740
@@ -58,7 +58,7 @@
 
21741
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21742
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21743
       retarray->offset = 0;
 
21744
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21745
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21746
     }
 
21747
   else
 
21748
     {
 
21749
@@ -199,7 +199,7 @@
 
21750
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21751
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21752
       retarray->offset = 0;
 
21753
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21754
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21755
     }
 
21756
   else
 
21757
     {
 
21758
@@ -367,7 +367,7 @@
 
21759
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21760
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21761
       retarray->offset = 0;
 
21762
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21763
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21764
     }
 
21765
   else if (unlikely (compile_options.bounds_check))
 
21766
     {
 
21767
Index: libgfortran/generated/maxloc0_4_i2.c
 
21768
===================================================================
 
21769
--- a/src/libgfortran/generated/maxloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
21770
+++ b/src/libgfortran/generated/maxloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
21771
@@ -58,7 +58,7 @@
 
21772
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21773
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21774
       retarray->offset = 0;
 
21775
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21776
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21777
     }
 
21778
   else
 
21779
     {
 
21780
@@ -199,7 +199,7 @@
 
21781
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21782
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21783
       retarray->offset = 0;
 
21784
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21785
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21786
     }
 
21787
   else
 
21788
     {
 
21789
@@ -367,7 +367,7 @@
 
21790
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21791
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21792
       retarray->offset = 0;
 
21793
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21794
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21795
     }
 
21796
   else if (unlikely (compile_options.bounds_check))
 
21797
     {
 
21798
Index: libgfortran/generated/minloc1_8_r16.c
 
21799
===================================================================
 
21800
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
21801
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
21802
@@ -98,10 +98,9 @@
 
21803
       retarray->offset = 0;
 
21804
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21805
 
 
21806
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21807
-                  * extent[rank-1];
 
21808
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21809
 
 
21810
-      retarray->base_addr = xmalloc (alloc_size);
 
21811
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21812
       if (alloc_size == 0)
 
21813
        {
 
21814
          /* Make sure we have a zero-sized array.  */
 
21815
@@ -294,8 +293,7 @@
 
21816
 
 
21817
        }
 
21818
 
 
21819
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21820
-                  * extent[rank-1];
 
21821
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21822
 
 
21823
       retarray->offset = 0;
 
21824
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21825
@@ -307,7 +305,7 @@
 
21826
          return;
 
21827
        }
 
21828
       else
 
21829
-       retarray->base_addr = xmalloc (alloc_size);
 
21830
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21831
 
 
21832
     }
 
21833
   else
 
21834
@@ -485,8 +483,7 @@
 
21835
       retarray->offset = 0;
 
21836
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21837
 
 
21838
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21839
-                  * extent[rank-1];
 
21840
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21841
 
 
21842
       if (alloc_size == 0)
 
21843
        {
 
21844
@@ -495,7 +492,7 @@
 
21845
          return;
 
21846
        }
 
21847
       else
 
21848
-       retarray->base_addr = xmalloc (alloc_size);
 
21849
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21850
     }
 
21851
   else
 
21852
     {
 
21853
Index: libgfortran/generated/pack_c10.c
 
21854
===================================================================
 
21855
--- a/src/libgfortran/generated/pack_c10.c      (.../tags/gcc_4_8_3_release)
 
21856
+++ b/src/libgfortran/generated/pack_c10.c      (.../branches/gcc-4_8-branch)
 
21857
@@ -167,8 +167,8 @@
 
21858
 
 
21859
          ret->offset = 0;
 
21860
 
 
21861
-         /* xmalloc allocates a single byte for zero size.  */
 
21862
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
 
21863
+         /* xmallocarray allocates a single byte for zero size.  */
 
21864
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
 
21865
 
 
21866
          if (total == 0)
 
21867
            return;
 
21868
Index: libgfortran/generated/pack_r4.c
 
21869
===================================================================
 
21870
--- a/src/libgfortran/generated/pack_r4.c       (.../tags/gcc_4_8_3_release)
 
21871
+++ b/src/libgfortran/generated/pack_r4.c       (.../branches/gcc-4_8-branch)
 
21872
@@ -167,8 +167,8 @@
 
21873
 
 
21874
          ret->offset = 0;
 
21875
 
 
21876
-         /* xmalloc allocates a single byte for zero size.  */
 
21877
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
 
21878
+         /* xmallocarray allocates a single byte for zero size.  */
 
21879
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
 
21880
 
 
21881
          if (total == 0)
 
21882
            return;
 
21883
Index: libgfortran/generated/transpose_c16.c
 
21884
===================================================================
 
21885
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
 
21886
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
 
21887
@@ -60,7 +60,8 @@
 
21888
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
21889
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
21890
 
 
21891
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
 
21892
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
21893
+                                     sizeof (GFC_COMPLEX_16));
 
21894
       ret->offset = 0;
 
21895
     } else if (unlikely (compile_options.bounds_check))
 
21896
     {
 
21897
Index: libgfortran/generated/maxloc0_8_i8.c
 
21898
===================================================================
 
21899
--- a/src/libgfortran/generated/maxloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
21900
+++ b/src/libgfortran/generated/maxloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
21901
@@ -58,7 +58,7 @@
 
21902
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21903
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21904
       retarray->offset = 0;
 
21905
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21906
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21907
     }
 
21908
   else
 
21909
     {
 
21910
@@ -199,7 +199,7 @@
 
21911
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21912
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21913
       retarray->offset = 0;
 
21914
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21915
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21916
     }
 
21917
   else
 
21918
     {
 
21919
@@ -367,7 +367,7 @@
 
21920
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21921
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21922
       retarray->offset = 0;
 
21923
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21924
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21925
     }
 
21926
   else if (unlikely (compile_options.bounds_check))
 
21927
     {
 
21928
Index: libgfortran/generated/minloc1_4_r8.c
 
21929
===================================================================
 
21930
--- a/src/libgfortran/generated/minloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
21931
+++ b/src/libgfortran/generated/minloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
21932
@@ -98,10 +98,9 @@
 
21933
       retarray->offset = 0;
 
21934
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21935
 
 
21936
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21937
-                  * extent[rank-1];
 
21938
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21939
 
 
21940
-      retarray->base_addr = xmalloc (alloc_size);
 
21941
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21942
       if (alloc_size == 0)
 
21943
        {
 
21944
          /* Make sure we have a zero-sized array.  */
 
21945
@@ -294,8 +293,7 @@
 
21946
 
 
21947
        }
 
21948
 
 
21949
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21950
-                  * extent[rank-1];
 
21951
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21952
 
 
21953
       retarray->offset = 0;
 
21954
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21955
@@ -307,7 +305,7 @@
 
21956
          return;
 
21957
        }
 
21958
       else
 
21959
-       retarray->base_addr = xmalloc (alloc_size);
 
21960
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21961
 
 
21962
     }
 
21963
   else
 
21964
@@ -485,8 +483,7 @@
 
21965
       retarray->offset = 0;
 
21966
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21967
 
 
21968
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21969
-                  * extent[rank-1];
 
21970
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21971
 
 
21972
       if (alloc_size == 0)
 
21973
        {
 
21974
@@ -495,7 +492,7 @@
 
21975
          return;
 
21976
        }
 
21977
       else
 
21978
-       retarray->base_addr = xmalloc (alloc_size);
 
21979
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21980
     }
 
21981
   else
 
21982
     {
 
21983
Index: libgfortran/generated/minloc1_16_i4.c
 
21984
===================================================================
 
21985
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
21986
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
21987
@@ -98,10 +98,9 @@
 
21988
       retarray->offset = 0;
 
21989
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21990
 
 
21991
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21992
-                  * extent[rank-1];
 
21993
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21994
 
 
21995
-      retarray->base_addr = xmalloc (alloc_size);
 
21996
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21997
       if (alloc_size == 0)
 
21998
        {
 
21999
          /* Make sure we have a zero-sized array.  */
 
22000
@@ -294,8 +293,7 @@
 
22001
 
 
22002
        }
 
22003
 
 
22004
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22005
-                  * extent[rank-1];
 
22006
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22007
 
 
22008
       retarray->offset = 0;
 
22009
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22010
@@ -307,7 +305,7 @@
 
22011
          return;
 
22012
        }
 
22013
       else
 
22014
-       retarray->base_addr = xmalloc (alloc_size);
 
22015
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22016
 
 
22017
     }
 
22018
   else
 
22019
@@ -485,8 +483,7 @@
 
22020
       retarray->offset = 0;
 
22021
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22022
 
 
22023
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22024
-                  * extent[rank-1];
 
22025
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22026
 
 
22027
       if (alloc_size == 0)
 
22028
        {
 
22029
@@ -495,7 +492,7 @@
 
22030
          return;
 
22031
        }
 
22032
       else
 
22033
-       retarray->base_addr = xmalloc (alloc_size);
 
22034
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22035
     }
 
22036
   else
 
22037
     {
 
22038
Index: libgfortran/generated/minloc0_16_i8.c
 
22039
===================================================================
 
22040
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
22041
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
22042
@@ -58,7 +58,7 @@
 
22043
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22044
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22045
       retarray->offset = 0;
 
22046
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22047
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22048
     }
 
22049
   else
 
22050
     {
 
22051
@@ -199,7 +199,7 @@
 
22052
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22053
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22054
       retarray->offset = 0;
 
22055
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22056
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22057
     }
 
22058
   else
 
22059
     {
 
22060
@@ -367,7 +367,7 @@
 
22061
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22062
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22063
       retarray->offset = 0;
 
22064
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22065
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22066
     }
 
22067
   else if (unlikely (compile_options.bounds_check))
 
22068
     {
 
22069
Index: libgfortran/generated/pack_i2.c
 
22070
===================================================================
 
22071
--- a/src/libgfortran/generated/pack_i2.c       (.../tags/gcc_4_8_3_release)
 
22072
+++ b/src/libgfortran/generated/pack_i2.c       (.../branches/gcc-4_8-branch)
 
22073
@@ -167,8 +167,8 @@
 
22074
 
 
22075
          ret->offset = 0;
 
22076
 
 
22077
-         /* xmalloc allocates a single byte for zero size.  */
 
22078
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
 
22079
+         /* xmallocarray allocates a single byte for zero size.  */
 
22080
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
 
22081
 
 
22082
          if (total == 0)
 
22083
            return;
 
22084
Index: libgfortran/generated/transpose_i8.c
 
22085
===================================================================
 
22086
--- a/src/libgfortran/generated/transpose_i8.c  (.../tags/gcc_4_8_3_release)
 
22087
+++ b/src/libgfortran/generated/transpose_i8.c  (.../branches/gcc-4_8-branch)
 
22088
@@ -60,7 +60,8 @@
 
22089
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
22090
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
22091
 
 
22092
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
 
22093
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
22094
+                                     sizeof (GFC_INTEGER_8));
 
22095
       ret->offset = 0;
 
22096
     } else if (unlikely (compile_options.bounds_check))
 
22097
     {
 
22098
Index: libgfortran/generated/eoshift1_16.c
 
22099
===================================================================
 
22100
--- a/src/libgfortran/generated/eoshift1_16.c   (.../tags/gcc_4_8_3_release)
 
22101
+++ b/src/libgfortran/generated/eoshift1_16.c   (.../branches/gcc-4_8-branch)
 
22102
@@ -105,8 +105,8 @@
 
22103
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
22104
 
 
22105
         }
 
22106
-      /* xmalloc allocates a single byte for zero size.  */
 
22107
-      ret->base_addr = xmalloc (size * arraysize);
 
22108
+      /* xmallocarray allocates a single byte for zero size.  */
 
22109
+      ret->base_addr = xmallocarray (arraysize, size);
 
22110
 
 
22111
     }
 
22112
   else if (unlikely (compile_options.bounds_check))
 
22113
Index: libgfortran/generated/all_l2.c
 
22114
===================================================================
 
22115
--- a/src/libgfortran/generated/all_l2.c        (.../tags/gcc_4_8_3_release)
 
22116
+++ b/src/libgfortran/generated/all_l2.c        (.../branches/gcc-4_8-branch)
 
22117
@@ -101,8 +101,7 @@
 
22118
       retarray->offset = 0;
 
22119
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22120
 
 
22121
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22122
-                  * extent[rank-1];
 
22123
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22124
 
 
22125
       if (alloc_size == 0)
 
22126
        {
 
22127
@@ -111,7 +110,7 @@
 
22128
          return;
 
22129
        }
 
22130
       else
 
22131
-       retarray->base_addr = xmalloc (alloc_size);
 
22132
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
22133
     }
 
22134
   else
 
22135
     {
 
22136
Index: libgfortran/generated/product_c4.c
 
22137
===================================================================
 
22138
--- a/src/libgfortran/generated/product_c4.c    (.../tags/gcc_4_8_3_release)
 
22139
+++ b/src/libgfortran/generated/product_c4.c    (.../branches/gcc-4_8-branch)
 
22140
@@ -97,10 +97,9 @@
 
22141
       retarray->offset = 0;
 
22142
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22143
 
 
22144
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22145
-                  * extent[rank-1];
 
22146
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22147
 
 
22148
-      retarray->base_addr = xmalloc (alloc_size);
 
22149
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22150
       if (alloc_size == 0)
 
22151
        {
 
22152
          /* Make sure we have a zero-sized array.  */
 
22153
@@ -272,8 +271,7 @@
 
22154
 
 
22155
        }
 
22156
 
 
22157
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22158
-                  * extent[rank-1];
 
22159
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22160
 
 
22161
       retarray->offset = 0;
 
22162
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22163
@@ -285,7 +283,7 @@
 
22164
          return;
 
22165
        }
 
22166
       else
 
22167
-       retarray->base_addr = xmalloc (alloc_size);
 
22168
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22169
 
 
22170
     }
 
22171
   else
 
22172
@@ -430,8 +428,7 @@
 
22173
       retarray->offset = 0;
 
22174
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22175
 
 
22176
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22177
-                  * extent[rank-1];
 
22178
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22179
 
 
22180
       if (alloc_size == 0)
 
22181
        {
 
22182
@@ -440,7 +437,7 @@
 
22183
          return;
 
22184
        }
 
22185
       else
 
22186
-       retarray->base_addr = xmalloc (alloc_size);
 
22187
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22188
     }
 
22189
   else
 
22190
     {
 
22191
Index: libgfortran/generated/iall_i1.c
 
22192
===================================================================
 
22193
--- a/src/libgfortran/generated/iall_i1.c       (.../tags/gcc_4_8_3_release)
 
22194
+++ b/src/libgfortran/generated/iall_i1.c       (.../branches/gcc-4_8-branch)
 
22195
@@ -97,10 +97,9 @@
 
22196
       retarray->offset = 0;
 
22197
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22198
 
 
22199
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22200
-                  * extent[rank-1];
 
22201
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22202
 
 
22203
-      retarray->base_addr = xmalloc (alloc_size);
 
22204
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22205
       if (alloc_size == 0)
 
22206
        {
 
22207
          /* Make sure we have a zero-sized array.  */
 
22208
@@ -272,8 +271,7 @@
 
22209
 
 
22210
        }
 
22211
 
 
22212
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22213
-                  * extent[rank-1];
 
22214
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22215
 
 
22216
       retarray->offset = 0;
 
22217
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22218
@@ -285,7 +283,7 @@
 
22219
          return;
 
22220
        }
 
22221
       else
 
22222
-       retarray->base_addr = xmalloc (alloc_size);
 
22223
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22224
 
 
22225
     }
 
22226
   else
 
22227
@@ -430,8 +428,7 @@
 
22228
       retarray->offset = 0;
 
22229
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22230
 
 
22231
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22232
-                  * extent[rank-1];
 
22233
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22234
 
 
22235
       if (alloc_size == 0)
 
22236
        {
 
22237
@@ -440,7 +437,7 @@
 
22238
          return;
 
22239
        }
 
22240
       else
 
22241
-       retarray->base_addr = xmalloc (alloc_size);
 
22242
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22243
     }
 
22244
   else
 
22245
     {
 
22246
Index: libgfortran/generated/reshape_i4.c
 
22247
===================================================================
 
22248
--- a/src/libgfortran/generated/reshape_i4.c    (.../tags/gcc_4_8_3_release)
 
22249
+++ b/src/libgfortran/generated/reshape_i4.c    (.../branches/gcc-4_8-branch)
 
22250
@@ -111,11 +111,11 @@
 
22251
       ret->offset = 0;
 
22252
 
 
22253
       if (unlikely (rs < 1))
 
22254
-        alloc_size = 1;
 
22255
+        alloc_size = 0;
 
22256
       else
 
22257
-        alloc_size = rs * sizeof (GFC_INTEGER_4);
 
22258
+        alloc_size = rs;
 
22259
 
 
22260
-      ret->base_addr = xmalloc (alloc_size);
 
22261
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22262
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
22263
     }
 
22264
 
 
22265
Index: libgfortran/generated/in_pack_r10.c
 
22266
===================================================================
 
22267
--- a/src/libgfortran/generated/in_pack_r10.c   (.../tags/gcc_4_8_3_release)
 
22268
+++ b/src/libgfortran/generated/in_pack_r10.c   (.../branches/gcc-4_8-branch)
 
22269
@@ -76,7 +76,7 @@
 
22270
     return source->base_addr;
 
22271
 
 
22272
   /* Allocate storage for the destination.  */
 
22273
-  destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
 
22274
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
 
22275
   dest = destptr;
 
22276
   src = source->base_addr;
 
22277
   stride0 = stride[0];
 
22278
Index: libgfortran/generated/in_pack_c4.c
 
22279
===================================================================
 
22280
--- a/src/libgfortran/generated/in_pack_c4.c    (.../tags/gcc_4_8_3_release)
 
22281
+++ b/src/libgfortran/generated/in_pack_c4.c    (.../branches/gcc-4_8-branch)
 
22282
@@ -76,7 +76,7 @@
 
22283
     return source->base_addr;
 
22284
 
 
22285
   /* Allocate storage for the destination.  */
 
22286
-  destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
 
22287
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
 
22288
   dest = destptr;
 
22289
   src = source->base_addr;
 
22290
   stride0 = stride[0];
 
22291
Index: libgfortran/generated/all_l16.c
 
22292
===================================================================
 
22293
--- a/src/libgfortran/generated/all_l16.c       (.../tags/gcc_4_8_3_release)
 
22294
+++ b/src/libgfortran/generated/all_l16.c       (.../branches/gcc-4_8-branch)
 
22295
@@ -101,8 +101,7 @@
 
22296
       retarray->offset = 0;
 
22297
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22298
 
 
22299
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22300
-                  * extent[rank-1];
 
22301
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22302
 
 
22303
       if (alloc_size == 0)
 
22304
        {
 
22305
@@ -111,7 +110,7 @@
 
22306
          return;
 
22307
        }
 
22308
       else
 
22309
-       retarray->base_addr = xmalloc (alloc_size);
 
22310
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
22311
     }
 
22312
   else
 
22313
     {
 
22314
Index: libgfortran/generated/maxloc0_16_i1.c
 
22315
===================================================================
 
22316
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
22317
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
22318
@@ -58,7 +58,7 @@
 
22319
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22320
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22321
       retarray->offset = 0;
 
22322
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22323
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22324
     }
 
22325
   else
 
22326
     {
 
22327
@@ -199,7 +199,7 @@
 
22328
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22329
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22330
       retarray->offset = 0;
 
22331
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22332
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22333
     }
 
22334
   else
 
22335
     {
 
22336
@@ -367,7 +367,7 @@
 
22337
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22338
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22339
       retarray->offset = 0;
 
22340
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22341
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22342
     }
 
22343
   else if (unlikely (compile_options.bounds_check))
 
22344
     {
 
22345
Index: libgfortran/generated/maxloc1_8_r8.c
 
22346
===================================================================
 
22347
--- a/src/libgfortran/generated/maxloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
22348
+++ b/src/libgfortran/generated/maxloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
22349
@@ -98,10 +98,9 @@
 
22350
       retarray->offset = 0;
 
22351
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22352
 
 
22353
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22354
-                  * extent[rank-1];
 
22355
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22356
 
 
22357
-      retarray->base_addr = xmalloc (alloc_size);
 
22358
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22359
       if (alloc_size == 0)
 
22360
        {
 
22361
          /* Make sure we have a zero-sized array.  */
 
22362
@@ -294,8 +293,7 @@
 
22363
 
 
22364
        }
 
22365
 
 
22366
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22367
-                  * extent[rank-1];
 
22368
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22369
 
 
22370
       retarray->offset = 0;
 
22371
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22372
@@ -307,7 +305,7 @@
 
22373
          return;
 
22374
        }
 
22375
       else
 
22376
-       retarray->base_addr = xmalloc (alloc_size);
 
22377
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22378
 
 
22379
     }
 
22380
   else
 
22381
@@ -485,8 +483,7 @@
 
22382
       retarray->offset = 0;
 
22383
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22384
 
 
22385
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22386
-                  * extent[rank-1];
 
22387
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22388
 
 
22389
       if (alloc_size == 0)
 
22390
        {
 
22391
@@ -495,7 +492,7 @@
 
22392
          return;
 
22393
        }
 
22394
       else
 
22395
-       retarray->base_addr = xmalloc (alloc_size);
 
22396
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22397
     }
 
22398
   else
 
22399
     {
 
22400
Index: libgfortran/generated/minval_i16.c
 
22401
===================================================================
 
22402
--- a/src/libgfortran/generated/minval_i16.c    (.../tags/gcc_4_8_3_release)
 
22403
+++ b/src/libgfortran/generated/minval_i16.c    (.../branches/gcc-4_8-branch)
 
22404
@@ -97,10 +97,9 @@
 
22405
       retarray->offset = 0;
 
22406
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22407
 
 
22408
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22409
-                  * extent[rank-1];
 
22410
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22411
 
 
22412
-      retarray->base_addr = xmalloc (alloc_size);
 
22413
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22414
       if (alloc_size == 0)
 
22415
        {
 
22416
          /* Make sure we have a zero-sized array.  */
 
22417
@@ -286,8 +285,7 @@
 
22418
 
 
22419
        }
 
22420
 
 
22421
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22422
-                  * extent[rank-1];
 
22423
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22424
 
 
22425
       retarray->offset = 0;
 
22426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22427
@@ -299,7 +297,7 @@
 
22428
          return;
 
22429
        }
 
22430
       else
 
22431
-       retarray->base_addr = xmalloc (alloc_size);
 
22432
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22433
 
 
22434
     }
 
22435
   else
 
22436
@@ -472,8 +470,7 @@
 
22437
       retarray->offset = 0;
 
22438
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22439
 
 
22440
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22441
-                  * extent[rank-1];
 
22442
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22443
 
 
22444
       if (alloc_size == 0)
 
22445
        {
 
22446
@@ -482,7 +479,7 @@
 
22447
          return;
 
22448
        }
 
22449
       else
 
22450
-       retarray->base_addr = xmalloc (alloc_size);
 
22451
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22452
     }
 
22453
   else
 
22454
     {
 
22455
Index: libgfortran/generated/reshape_r10.c
 
22456
===================================================================
 
22457
--- a/src/libgfortran/generated/reshape_r10.c   (.../tags/gcc_4_8_3_release)
 
22458
+++ b/src/libgfortran/generated/reshape_r10.c   (.../branches/gcc-4_8-branch)
 
22459
@@ -111,11 +111,11 @@
 
22460
       ret->offset = 0;
 
22461
 
 
22462
       if (unlikely (rs < 1))
 
22463
-        alloc_size = 1;
 
22464
+        alloc_size = 0;
 
22465
       else
 
22466
-        alloc_size = rs * sizeof (GFC_REAL_10);
 
22467
+        alloc_size = rs;
 
22468
 
 
22469
-      ret->base_addr = xmalloc (alloc_size);
 
22470
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22471
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
22472
     }
 
22473
 
 
22474
Index: libgfortran/generated/unpack_r16.c
 
22475
===================================================================
 
22476
--- a/src/libgfortran/generated/unpack_r16.c    (.../tags/gcc_4_8_3_release)
 
22477
+++ b/src/libgfortran/generated/unpack_r16.c    (.../branches/gcc-4_8-branch)
 
22478
@@ -99,7 +99,7 @@
 
22479
          rs *= extent[n];
 
22480
        }
 
22481
       ret->offset = 0;
 
22482
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
22483
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
22484
     }
 
22485
   else
 
22486
     {
 
22487
@@ -244,7 +244,7 @@
 
22488
          rs *= extent[n];
 
22489
        }
 
22490
       ret->offset = 0;
 
22491
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
22492
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
22493
     }
 
22494
   else
 
22495
     {
 
22496
Index: libgfortran/generated/maxval_i4.c
 
22497
===================================================================
 
22498
--- a/src/libgfortran/generated/maxval_i4.c     (.../tags/gcc_4_8_3_release)
 
22499
+++ b/src/libgfortran/generated/maxval_i4.c     (.../branches/gcc-4_8-branch)
 
22500
@@ -97,10 +97,9 @@
 
22501
       retarray->offset = 0;
 
22502
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22503
 
 
22504
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22505
-                  * extent[rank-1];
 
22506
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22507
 
 
22508
-      retarray->base_addr = xmalloc (alloc_size);
 
22509
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22510
       if (alloc_size == 0)
 
22511
        {
 
22512
          /* Make sure we have a zero-sized array.  */
 
22513
@@ -286,8 +285,7 @@
 
22514
 
 
22515
        }
 
22516
 
 
22517
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22518
-                  * extent[rank-1];
 
22519
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22520
 
 
22521
       retarray->offset = 0;
 
22522
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22523
@@ -299,7 +297,7 @@
 
22524
          return;
 
22525
        }
 
22526
       else
 
22527
-       retarray->base_addr = xmalloc (alloc_size);
 
22528
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22529
 
 
22530
     }
 
22531
   else
 
22532
@@ -472,8 +470,7 @@
 
22533
       retarray->offset = 0;
 
22534
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22535
 
 
22536
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22537
-                  * extent[rank-1];
 
22538
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22539
 
 
22540
       if (alloc_size == 0)
 
22541
        {
 
22542
@@ -482,7 +479,7 @@
 
22543
          return;
 
22544
        }
 
22545
       else
 
22546
-       retarray->base_addr = xmalloc (alloc_size);
 
22547
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22548
     }
 
22549
   else
 
22550
     {
 
22551
Index: libgfortran/generated/minval_i8.c
 
22552
===================================================================
 
22553
--- a/src/libgfortran/generated/minval_i8.c     (.../tags/gcc_4_8_3_release)
 
22554
+++ b/src/libgfortran/generated/minval_i8.c     (.../branches/gcc-4_8-branch)
 
22555
@@ -97,10 +97,9 @@
 
22556
       retarray->offset = 0;
 
22557
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22558
 
 
22559
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22560
-                  * extent[rank-1];
 
22561
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22562
 
 
22563
-      retarray->base_addr = xmalloc (alloc_size);
 
22564
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22565
       if (alloc_size == 0)
 
22566
        {
 
22567
          /* Make sure we have a zero-sized array.  */
 
22568
@@ -286,8 +285,7 @@
 
22569
 
 
22570
        }
 
22571
 
 
22572
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22573
-                  * extent[rank-1];
 
22574
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22575
 
 
22576
       retarray->offset = 0;
 
22577
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22578
@@ -299,7 +297,7 @@
 
22579
          return;
 
22580
        }
 
22581
       else
 
22582
-       retarray->base_addr = xmalloc (alloc_size);
 
22583
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22584
 
 
22585
     }
 
22586
   else
 
22587
@@ -472,8 +470,7 @@
 
22588
       retarray->offset = 0;
 
22589
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22590
 
 
22591
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22592
-                  * extent[rank-1];
 
22593
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22594
 
 
22595
       if (alloc_size == 0)
 
22596
        {
 
22597
@@ -482,7 +479,7 @@
 
22598
          return;
 
22599
        }
 
22600
       else
 
22601
-       retarray->base_addr = xmalloc (alloc_size);
 
22602
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22603
     }
 
22604
   else
 
22605
     {
 
22606
Index: libgfortran/generated/maxloc0_16_i16.c
 
22607
===================================================================
 
22608
--- a/src/libgfortran/generated/maxloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
22609
+++ b/src/libgfortran/generated/maxloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
22610
@@ -58,7 +58,7 @@
 
22611
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22612
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22613
       retarray->offset = 0;
 
22614
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22615
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22616
     }
 
22617
   else
 
22618
     {
 
22619
@@ -199,7 +199,7 @@
 
22620
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22621
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22622
       retarray->offset = 0;
 
22623
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22624
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22625
     }
 
22626
   else
 
22627
     {
 
22628
@@ -367,7 +367,7 @@
 
22629
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22630
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22631
       retarray->offset = 0;
 
22632
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22633
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22634
     }
 
22635
   else if (unlikely (compile_options.bounds_check))
 
22636
     {
 
22637
Index: libgfortran/generated/shape_i4.c
 
22638
===================================================================
 
22639
--- a/src/libgfortran/generated/shape_i4.c      (.../tags/gcc_4_8_3_release)
 
22640
+++ b/src/libgfortran/generated/shape_i4.c      (.../branches/gcc-4_8-branch)
 
22641
@@ -49,7 +49,7 @@
 
22642
     {
 
22643
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
22644
       ret->offset = 0;
 
22645
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22646
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22647
     }
 
22648
 
 
22649
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
22650
Index: libgfortran/generated/minloc1_4_i16.c
 
22651
===================================================================
 
22652
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
22653
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
22654
@@ -98,10 +98,9 @@
 
22655
       retarray->offset = 0;
 
22656
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22657
 
 
22658
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22659
-                  * extent[rank-1];
 
22660
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22661
 
 
22662
-      retarray->base_addr = xmalloc (alloc_size);
 
22663
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22664
       if (alloc_size == 0)
 
22665
        {
 
22666
          /* Make sure we have a zero-sized array.  */
 
22667
@@ -294,8 +293,7 @@
 
22668
 
 
22669
        }
 
22670
 
 
22671
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22672
-                  * extent[rank-1];
 
22673
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22674
 
 
22675
       retarray->offset = 0;
 
22676
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22677
@@ -307,7 +305,7 @@
 
22678
          return;
 
22679
        }
 
22680
       else
 
22681
-       retarray->base_addr = xmalloc (alloc_size);
 
22682
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22683
 
 
22684
     }
 
22685
   else
 
22686
@@ -485,8 +483,7 @@
 
22687
       retarray->offset = 0;
 
22688
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22689
 
 
22690
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22691
-                  * extent[rank-1];
 
22692
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22693
 
 
22694
       if (alloc_size == 0)
 
22695
        {
 
22696
@@ -495,7 +492,7 @@
 
22697
          return;
 
22698
        }
 
22699
       else
 
22700
-       retarray->base_addr = xmalloc (alloc_size);
 
22701
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22702
     }
 
22703
   else
 
22704
     {
 
22705
Index: libgfortran/generated/maxloc0_4_r10.c
 
22706
===================================================================
 
22707
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
22708
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
22709
@@ -58,7 +58,7 @@
 
22710
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22711
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22712
       retarray->offset = 0;
 
22713
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22714
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22715
     }
 
22716
   else
 
22717
     {
 
22718
@@ -199,7 +199,7 @@
 
22719
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22720
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22721
       retarray->offset = 0;
 
22722
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22723
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22724
     }
 
22725
   else
 
22726
     {
 
22727
@@ -367,7 +367,7 @@
 
22728
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22729
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22730
       retarray->offset = 0;
 
22731
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22732
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22733
     }
 
22734
   else if (unlikely (compile_options.bounds_check))
 
22735
     {
 
22736
Index: libgfortran/generated/maxloc0_8_i16.c
 
22737
===================================================================
 
22738
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
22739
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
22740
@@ -58,7 +58,7 @@
 
22741
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22742
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22743
       retarray->offset = 0;
 
22744
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22745
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22746
     }
 
22747
   else
 
22748
     {
 
22749
@@ -199,7 +199,7 @@
 
22750
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22751
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22752
       retarray->offset = 0;
 
22753
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22754
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22755
     }
 
22756
   else
 
22757
     {
 
22758
@@ -367,7 +367,7 @@
 
22759
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22760
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22761
       retarray->offset = 0;
 
22762
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22763
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22764
     }
 
22765
   else if (unlikely (compile_options.bounds_check))
 
22766
     {
 
22767
Index: libgfortran/generated/iall_i2.c
 
22768
===================================================================
 
22769
--- a/src/libgfortran/generated/iall_i2.c       (.../tags/gcc_4_8_3_release)
 
22770
+++ b/src/libgfortran/generated/iall_i2.c       (.../branches/gcc-4_8-branch)
 
22771
@@ -97,10 +97,9 @@
 
22772
       retarray->offset = 0;
 
22773
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22774
 
 
22775
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22776
-                  * extent[rank-1];
 
22777
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22778
 
 
22779
-      retarray->base_addr = xmalloc (alloc_size);
 
22780
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
22781
       if (alloc_size == 0)
 
22782
        {
 
22783
          /* Make sure we have a zero-sized array.  */
 
22784
@@ -272,8 +271,7 @@
 
22785
 
 
22786
        }
 
22787
 
 
22788
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22789
-                  * extent[rank-1];
 
22790
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22791
 
 
22792
       retarray->offset = 0;
 
22793
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22794
@@ -285,7 +283,7 @@
 
22795
          return;
 
22796
        }
 
22797
       else
 
22798
-       retarray->base_addr = xmalloc (alloc_size);
 
22799
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
22800
 
 
22801
     }
 
22802
   else
 
22803
@@ -430,8 +428,7 @@
 
22804
       retarray->offset = 0;
 
22805
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22806
 
 
22807
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22808
-                  * extent[rank-1];
 
22809
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22810
 
 
22811
       if (alloc_size == 0)
 
22812
        {
 
22813
@@ -440,7 +437,7 @@
 
22814
          return;
 
22815
        }
 
22816
       else
 
22817
-       retarray->base_addr = xmalloc (alloc_size);
 
22818
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
22819
     }
 
22820
   else
 
22821
     {
 
22822
Index: libgfortran/generated/maxloc1_8_r10.c
 
22823
===================================================================
 
22824
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
22825
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
22826
@@ -98,10 +98,9 @@
 
22827
       retarray->offset = 0;
 
22828
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22829
 
 
22830
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22831
-                  * extent[rank-1];
 
22832
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22833
 
 
22834
-      retarray->base_addr = xmalloc (alloc_size);
 
22835
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22836
       if (alloc_size == 0)
 
22837
        {
 
22838
          /* Make sure we have a zero-sized array.  */
 
22839
@@ -294,8 +293,7 @@
 
22840
 
 
22841
        }
 
22842
 
 
22843
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22844
-                  * extent[rank-1];
 
22845
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22846
 
 
22847
       retarray->offset = 0;
 
22848
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22849
@@ -307,7 +305,7 @@
 
22850
          return;
 
22851
        }
 
22852
       else
 
22853
-       retarray->base_addr = xmalloc (alloc_size);
 
22854
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22855
 
 
22856
     }
 
22857
   else
 
22858
@@ -485,8 +483,7 @@
 
22859
       retarray->offset = 0;
 
22860
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22861
 
 
22862
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22863
-                  * extent[rank-1];
 
22864
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22865
 
 
22866
       if (alloc_size == 0)
 
22867
        {
 
22868
@@ -495,7 +492,7 @@
 
22869
          return;
 
22870
        }
 
22871
       else
 
22872
-       retarray->base_addr = xmalloc (alloc_size);
 
22873
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22874
     }
 
22875
   else
 
22876
     {
 
22877
Index: libgfortran/generated/maxloc0_16_r4.c
 
22878
===================================================================
 
22879
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
22880
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
22881
@@ -58,7 +58,7 @@
 
22882
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22883
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22884
       retarray->offset = 0;
 
22885
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22886
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22887
     }
 
22888
   else
 
22889
     {
 
22890
@@ -199,7 +199,7 @@
 
22891
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22892
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22893
       retarray->offset = 0;
 
22894
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22895
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22896
     }
 
22897
   else
 
22898
     {
 
22899
@@ -367,7 +367,7 @@
 
22900
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22901
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22902
       retarray->offset = 0;
 
22903
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22904
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22905
     }
 
22906
   else if (unlikely (compile_options.bounds_check))
 
22907
     {
 
22908
Index: libgfortran/generated/minloc0_8_i1.c
 
22909
===================================================================
 
22910
--- a/src/libgfortran/generated/minloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
22911
+++ b/src/libgfortran/generated/minloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
22912
@@ -58,7 +58,7 @@
 
22913
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22914
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22915
       retarray->offset = 0;
 
22916
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22917
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22918
     }
 
22919
   else
 
22920
     {
 
22921
@@ -199,7 +199,7 @@
 
22922
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22923
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22924
       retarray->offset = 0;
 
22925
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22926
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22927
     }
 
22928
   else
 
22929
     {
 
22930
@@ -367,7 +367,7 @@
 
22931
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22932
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22933
       retarray->offset = 0;
 
22934
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22935
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22936
     }
 
22937
   else if (unlikely (compile_options.bounds_check))
 
22938
     {
 
22939
Index: libgfortran/generated/minloc1_16_r8.c
 
22940
===================================================================
 
22941
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
22942
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
22943
@@ -98,10 +98,9 @@
 
22944
       retarray->offset = 0;
 
22945
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22946
 
 
22947
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22948
-                  * extent[rank-1];
 
22949
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22950
 
 
22951
-      retarray->base_addr = xmalloc (alloc_size);
 
22952
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22953
       if (alloc_size == 0)
 
22954
        {
 
22955
          /* Make sure we have a zero-sized array.  */
 
22956
@@ -294,8 +293,7 @@
 
22957
 
 
22958
        }
 
22959
 
 
22960
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22961
-                  * extent[rank-1];
 
22962
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22963
 
 
22964
       retarray->offset = 0;
 
22965
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22966
@@ -307,7 +305,7 @@
 
22967
          return;
 
22968
        }
 
22969
       else
 
22970
-       retarray->base_addr = xmalloc (alloc_size);
 
22971
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22972
 
 
22973
     }
 
22974
   else
 
22975
@@ -485,8 +483,7 @@
 
22976
       retarray->offset = 0;
 
22977
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22978
 
 
22979
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22980
-                  * extent[rank-1];
 
22981
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22982
 
 
22983
       if (alloc_size == 0)
 
22984
        {
 
22985
@@ -495,7 +492,7 @@
 
22986
          return;
 
22987
        }
 
22988
       else
 
22989
-       retarray->base_addr = xmalloc (alloc_size);
 
22990
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22991
     }
 
22992
   else
 
22993
     {
 
22994
Index: libgfortran/generated/unpack_i8.c
 
22995
===================================================================
 
22996
--- a/src/libgfortran/generated/unpack_i8.c     (.../tags/gcc_4_8_3_release)
 
22997
+++ b/src/libgfortran/generated/unpack_i8.c     (.../branches/gcc-4_8-branch)
 
22998
@@ -99,7 +99,7 @@
 
22999
          rs *= extent[n];
 
23000
        }
 
23001
       ret->offset = 0;
 
23002
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
23003
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
23004
     }
 
23005
   else
 
23006
     {
 
23007
@@ -244,7 +244,7 @@
 
23008
          rs *= extent[n];
 
23009
        }
 
23010
       ret->offset = 0;
 
23011
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
23012
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
23013
     }
 
23014
   else
 
23015
     {
 
23016
Index: libgfortran/generated/maxloc0_4_i4.c
 
23017
===================================================================
 
23018
--- a/src/libgfortran/generated/maxloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
23019
+++ b/src/libgfortran/generated/maxloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
23020
@@ -58,7 +58,7 @@
 
23021
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23022
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23023
       retarray->offset = 0;
 
23024
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23025
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23026
     }
 
23027
   else
 
23028
     {
 
23029
@@ -199,7 +199,7 @@
 
23030
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23031
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23032
       retarray->offset = 0;
 
23033
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23034
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23035
     }
 
23036
   else
 
23037
     {
 
23038
@@ -367,7 +367,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_4) * rank);
 
23043
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23044
     }
 
23045
   else if (unlikely (compile_options.bounds_check))
 
23046
     {
 
23047
Index: libgfortran/generated/count_4_l.c
 
23048
===================================================================
 
23049
--- a/src/libgfortran/generated/count_4_l.c     (.../tags/gcc_4_8_3_release)
 
23050
+++ b/src/libgfortran/generated/count_4_l.c     (.../branches/gcc-4_8-branch)
 
23051
@@ -101,8 +101,7 @@
 
23052
       retarray->offset = 0;
 
23053
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23054
 
 
23055
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23056
-                  * extent[rank-1];
 
23057
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23058
 
 
23059
       if (alloc_size == 0)
 
23060
        {
 
23061
@@ -111,7 +110,7 @@
 
23062
          return;
 
23063
        }
 
23064
       else
 
23065
-       retarray->base_addr = xmalloc (alloc_size);
 
23066
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23067
     }
 
23068
   else
 
23069
     {
 
23070
Index: libgfortran/generated/sum_r10.c
 
23071
===================================================================
 
23072
--- a/src/libgfortran/generated/sum_r10.c       (.../tags/gcc_4_8_3_release)
 
23073
+++ b/src/libgfortran/generated/sum_r10.c       (.../branches/gcc-4_8-branch)
 
23074
@@ -97,10 +97,9 @@
 
23075
       retarray->offset = 0;
 
23076
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23077
 
 
23078
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23079
-                  * extent[rank-1];
 
23080
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23081
 
 
23082
-      retarray->base_addr = xmalloc (alloc_size);
 
23083
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23084
       if (alloc_size == 0)
 
23085
        {
 
23086
          /* Make sure we have a zero-sized array.  */
 
23087
@@ -272,8 +271,7 @@
 
23088
 
 
23089
        }
 
23090
 
 
23091
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23092
-                  * extent[rank-1];
 
23093
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23094
 
 
23095
       retarray->offset = 0;
 
23096
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23097
@@ -285,7 +283,7 @@
 
23098
          return;
 
23099
        }
 
23100
       else
 
23101
-       retarray->base_addr = xmalloc (alloc_size);
 
23102
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23103
 
 
23104
     }
 
23105
   else
 
23106
@@ -430,8 +428,7 @@
 
23107
       retarray->offset = 0;
 
23108
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23109
 
 
23110
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23111
-                  * extent[rank-1];
 
23112
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23113
 
 
23114
       if (alloc_size == 0)
 
23115
        {
 
23116
@@ -440,7 +437,7 @@
 
23117
          return;
 
23118
        }
 
23119
       else
 
23120
-       retarray->base_addr = xmalloc (alloc_size);
 
23121
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23122
     }
 
23123
   else
 
23124
     {
 
23125
Index: libgfortran/generated/sum_c4.c
 
23126
===================================================================
 
23127
--- a/src/libgfortran/generated/sum_c4.c        (.../tags/gcc_4_8_3_release)
 
23128
+++ b/src/libgfortran/generated/sum_c4.c        (.../branches/gcc-4_8-branch)
 
23129
@@ -97,10 +97,9 @@
 
23130
       retarray->offset = 0;
 
23131
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23132
 
 
23133
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23134
-                  * extent[rank-1];
 
23135
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23136
 
 
23137
-      retarray->base_addr = xmalloc (alloc_size);
 
23138
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
23139
       if (alloc_size == 0)
 
23140
        {
 
23141
          /* Make sure we have a zero-sized array.  */
 
23142
@@ -272,8 +271,7 @@
 
23143
 
 
23144
        }
 
23145
 
 
23146
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23147
-                  * extent[rank-1];
 
23148
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23149
 
 
23150
       retarray->offset = 0;
 
23151
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23152
@@ -285,7 +283,7 @@
 
23153
          return;
 
23154
        }
 
23155
       else
 
23156
-       retarray->base_addr = xmalloc (alloc_size);
 
23157
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
23158
 
 
23159
     }
 
23160
   else
 
23161
@@ -430,8 +428,7 @@
 
23162
       retarray->offset = 0;
 
23163
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23164
 
 
23165
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23166
-                  * extent[rank-1];
 
23167
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23168
 
 
23169
       if (alloc_size == 0)
 
23170
        {
 
23171
@@ -440,7 +437,7 @@
 
23172
          return;
 
23173
        }
 
23174
       else
 
23175
-       retarray->base_addr = xmalloc (alloc_size);
 
23176
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
23177
     }
 
23178
   else
 
23179
     {
 
23180
Index: libgfortran/generated/maxloc1_16_r10.c
 
23181
===================================================================
 
23182
--- a/src/libgfortran/generated/maxloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
23183
+++ b/src/libgfortran/generated/maxloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
23184
@@ -98,10 +98,9 @@
 
23185
       retarray->offset = 0;
 
23186
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23187
 
 
23188
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23189
-                  * extent[rank-1];
 
23190
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23191
 
 
23192
-      retarray->base_addr = xmalloc (alloc_size);
 
23193
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23194
       if (alloc_size == 0)
 
23195
        {
 
23196
          /* Make sure we have a zero-sized array.  */
 
23197
@@ -294,8 +293,7 @@
 
23198
 
 
23199
        }
 
23200
 
 
23201
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23202
-                  * extent[rank-1];
 
23203
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23204
 
 
23205
       retarray->offset = 0;
 
23206
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23207
@@ -307,7 +305,7 @@
 
23208
          return;
 
23209
        }
 
23210
       else
 
23211
-       retarray->base_addr = xmalloc (alloc_size);
 
23212
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23213
 
 
23214
     }
 
23215
   else
 
23216
@@ -485,8 +483,7 @@
 
23217
       retarray->offset = 0;
 
23218
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23219
 
 
23220
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23221
-                  * extent[rank-1];
 
23222
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23223
 
 
23224
       if (alloc_size == 0)
 
23225
        {
 
23226
@@ -495,7 +492,7 @@
 
23227
          return;
 
23228
        }
 
23229
       else
 
23230
-       retarray->base_addr = xmalloc (alloc_size);
 
23231
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23232
     }
 
23233
   else
 
23234
     {
 
23235
Index: libgfortran/generated/pack_i16.c
 
23236
===================================================================
 
23237
--- a/src/libgfortran/generated/pack_i16.c      (.../tags/gcc_4_8_3_release)
 
23238
+++ b/src/libgfortran/generated/pack_i16.c      (.../branches/gcc-4_8-branch)
 
23239
@@ -167,8 +167,8 @@
 
23240
 
 
23241
          ret->offset = 0;
 
23242
 
 
23243
-         /* xmalloc allocates a single byte for zero size.  */
 
23244
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
 
23245
+         /* xmallocarray allocates a single byte for zero size.  */
 
23246
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
 
23247
 
 
23248
          if (total == 0)
 
23249
            return;
 
23250
Index: libgfortran/generated/matmul_i8.c
 
23251
===================================================================
 
23252
--- a/src/libgfortran/generated/matmul_i8.c     (.../tags/gcc_4_8_3_release)
 
23253
+++ b/src/libgfortran/generated/matmul_i8.c     (.../branches/gcc-4_8-branch)
 
23254
@@ -124,7 +124,7 @@
 
23255
         }
 
23256
 
 
23257
       retarray->base_addr
 
23258
-       = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
 
23259
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
 
23260
       retarray->offset = 0;
 
23261
     }
 
23262
     else if (unlikely (compile_options.bounds_check))
 
23263
Index: libgfortran/generated/maxloc0_16_i2.c
 
23264
===================================================================
 
23265
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
23266
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
23267
@@ -58,7 +58,7 @@
 
23268
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23269
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23270
       retarray->offset = 0;
 
23271
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23272
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23273
     }
 
23274
   else
 
23275
     {
 
23276
@@ -199,7 +199,7 @@
 
23277
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23278
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23279
       retarray->offset = 0;
 
23280
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23281
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23282
     }
 
23283
   else
 
23284
     {
 
23285
@@ -367,7 +367,7 @@
 
23286
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23287
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23288
       retarray->offset = 0;
 
23289
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23290
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23291
     }
 
23292
   else if (unlikely (compile_options.bounds_check))
 
23293
     {
 
23294
Index: libgfortran/generated/spread_c4.c
 
23295
===================================================================
 
23296
--- a/src/libgfortran/generated/spread_c4.c     (.../tags/gcc_4_8_3_release)
 
23297
+++ b/src/libgfortran/generated/spread_c4.c     (.../branches/gcc-4_8-branch)
 
23298
@@ -101,8 +101,8 @@
 
23299
        }
 
23300
       ret->offset = 0;
 
23301
 
 
23302
-      /* xmalloc allocates a single byte for zero size.  */
 
23303
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
 
23304
+      /* xmallocarray allocates a single byte for zero size.  */
 
23305
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
 
23306
       if (rs <= 0)
 
23307
         return;
 
23308
     }
 
23309
@@ -244,7 +244,7 @@
 
23310
 
 
23311
   if (ret->base_addr == NULL)
 
23312
     {
 
23313
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
 
23314
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
 
23315
       ret->offset = 0;
 
23316
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
23317
     }
 
23318
Index: libgfortran/generated/maxval_r10.c
 
23319
===================================================================
 
23320
--- a/src/libgfortran/generated/maxval_r10.c    (.../tags/gcc_4_8_3_release)
 
23321
+++ b/src/libgfortran/generated/maxval_r10.c    (.../branches/gcc-4_8-branch)
 
23322
@@ -97,10 +97,9 @@
 
23323
       retarray->offset = 0;
 
23324
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23325
 
 
23326
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23327
-                  * extent[rank-1];
 
23328
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23329
 
 
23330
-      retarray->base_addr = xmalloc (alloc_size);
 
23331
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23332
       if (alloc_size == 0)
 
23333
        {
 
23334
          /* Make sure we have a zero-sized array.  */
 
23335
@@ -286,8 +285,7 @@
 
23336
 
 
23337
        }
 
23338
 
 
23339
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23340
-                  * extent[rank-1];
 
23341
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23342
 
 
23343
       retarray->offset = 0;
 
23344
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23345
@@ -299,7 +297,7 @@
 
23346
          return;
 
23347
        }
 
23348
       else
 
23349
-       retarray->base_addr = xmalloc (alloc_size);
 
23350
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23351
 
 
23352
     }
 
23353
   else
 
23354
@@ -472,8 +470,7 @@
 
23355
       retarray->offset = 0;
 
23356
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23357
 
 
23358
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23359
-                  * extent[rank-1];
 
23360
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23361
 
 
23362
       if (alloc_size == 0)
 
23363
        {
 
23364
@@ -482,7 +479,7 @@
 
23365
          return;
 
23366
        }
 
23367
       else
 
23368
-       retarray->base_addr = xmalloc (alloc_size);
 
23369
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
23370
     }
 
23371
   else
 
23372
     {
 
23373
Index: libgfortran/generated/pack_i4.c
 
23374
===================================================================
 
23375
--- a/src/libgfortran/generated/pack_i4.c       (.../tags/gcc_4_8_3_release)
 
23376
+++ b/src/libgfortran/generated/pack_i4.c       (.../branches/gcc-4_8-branch)
 
23377
@@ -167,8 +167,8 @@
 
23378
 
 
23379
          ret->offset = 0;
 
23380
 
 
23381
-         /* xmalloc allocates a single byte for zero size.  */
 
23382
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
 
23383
+         /* xmallocarray allocates a single byte for zero size.  */
 
23384
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
 
23385
 
 
23386
          if (total == 0)
 
23387
            return;
 
23388
Index: libgfortran/generated/maxloc1_4_i1.c
 
23389
===================================================================
 
23390
--- a/src/libgfortran/generated/maxloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
23391
+++ b/src/libgfortran/generated/maxloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
23392
@@ -98,10 +98,9 @@
 
23393
       retarray->offset = 0;
 
23394
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23395
 
 
23396
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23397
-                  * extent[rank-1];
 
23398
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23399
 
 
23400
-      retarray->base_addr = xmalloc (alloc_size);
 
23401
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23402
       if (alloc_size == 0)
 
23403
        {
 
23404
          /* Make sure we have a zero-sized array.  */
 
23405
@@ -294,8 +293,7 @@
 
23406
 
 
23407
        }
 
23408
 
 
23409
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23410
-                  * extent[rank-1];
 
23411
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23412
 
 
23413
       retarray->offset = 0;
 
23414
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23415
@@ -307,7 +305,7 @@
 
23416
          return;
 
23417
        }
 
23418
       else
 
23419
-       retarray->base_addr = xmalloc (alloc_size);
 
23420
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23421
 
 
23422
     }
 
23423
   else
 
23424
@@ -485,8 +483,7 @@
 
23425
       retarray->offset = 0;
 
23426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23427
 
 
23428
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23429
-                  * extent[rank-1];
 
23430
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23431
 
 
23432
       if (alloc_size == 0)
 
23433
        {
 
23434
@@ -495,7 +492,7 @@
 
23435
          return;
 
23436
        }
 
23437
       else
 
23438
-       retarray->base_addr = xmalloc (alloc_size);
 
23439
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23440
     }
 
23441
   else
 
23442
     {
 
23443
Index: libgfortran/generated/matmul_r10.c
 
23444
===================================================================
 
23445
--- a/src/libgfortran/generated/matmul_r10.c    (.../tags/gcc_4_8_3_release)
 
23446
+++ b/src/libgfortran/generated/matmul_r10.c    (.../branches/gcc-4_8-branch)
 
23447
@@ -124,7 +124,7 @@
 
23448
         }
 
23449
 
 
23450
       retarray->base_addr
 
23451
-       = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
 
23452
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
 
23453
       retarray->offset = 0;
 
23454
     }
 
23455
     else if (unlikely (compile_options.bounds_check))
 
23456
Index: libgfortran/generated/minloc1_4_i8.c
 
23457
===================================================================
 
23458
--- a/src/libgfortran/generated/minloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
23459
+++ b/src/libgfortran/generated/minloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
23460
@@ -98,10 +98,9 @@
 
23461
       retarray->offset = 0;
 
23462
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23463
 
 
23464
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23465
-                  * extent[rank-1];
 
23466
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23467
 
 
23468
-      retarray->base_addr = xmalloc (alloc_size);
 
23469
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23470
       if (alloc_size == 0)
 
23471
        {
 
23472
          /* Make sure we have a zero-sized array.  */
 
23473
@@ -294,8 +293,7 @@
 
23474
 
 
23475
        }
 
23476
 
 
23477
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23478
-                  * extent[rank-1];
 
23479
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23480
 
 
23481
       retarray->offset = 0;
 
23482
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23483
@@ -307,7 +305,7 @@
 
23484
          return;
 
23485
        }
 
23486
       else
 
23487
-       retarray->base_addr = xmalloc (alloc_size);
 
23488
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23489
 
 
23490
     }
 
23491
   else
 
23492
@@ -485,8 +483,7 @@
 
23493
       retarray->offset = 0;
 
23494
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23495
 
 
23496
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23497
-                  * extent[rank-1];
 
23498
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23499
 
 
23500
       if (alloc_size == 0)
 
23501
        {
 
23502
@@ -495,7 +492,7 @@
 
23503
          return;
 
23504
        }
 
23505
       else
 
23506
-       retarray->base_addr = xmalloc (alloc_size);
 
23507
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23508
     }
 
23509
   else
 
23510
     {
 
23511
Index: libgfortran/generated/minloc0_8_r4.c
 
23512
===================================================================
 
23513
--- a/src/libgfortran/generated/minloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
23514
+++ b/src/libgfortran/generated/minloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
23515
@@ -58,7 +58,7 @@
 
23516
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23517
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23518
       retarray->offset = 0;
 
23519
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23520
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23521
     }
 
23522
   else
 
23523
     {
 
23524
@@ -199,7 +199,7 @@
 
23525
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23526
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23527
       retarray->offset = 0;
 
23528
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23529
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23530
     }
 
23531
   else
 
23532
     {
 
23533
@@ -367,7 +367,7 @@
 
23534
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23535
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23536
       retarray->offset = 0;
 
23537
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23538
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23539
     }
 
23540
   else if (unlikely (compile_options.bounds_check))
 
23541
     {
 
23542
Index: libgfortran/generated/matmul_l4.c
 
23543
===================================================================
 
23544
--- a/src/libgfortran/generated/matmul_l4.c     (.../tags/gcc_4_8_3_release)
 
23545
+++ b/src/libgfortran/generated/matmul_l4.c     (.../branches/gcc-4_8-branch)
 
23546
@@ -88,7 +88,7 @@
 
23547
         }
 
23548
           
 
23549
       retarray->base_addr
 
23550
-       = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
 
23551
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
 
23552
       retarray->offset = 0;
 
23553
     }
 
23554
     else if (unlikely (compile_options.bounds_check))
 
23555
Index: libgfortran/generated/reshape_r8.c
 
23556
===================================================================
 
23557
--- a/src/libgfortran/generated/reshape_r8.c    (.../tags/gcc_4_8_3_release)
 
23558
+++ b/src/libgfortran/generated/reshape_r8.c    (.../branches/gcc-4_8-branch)
 
23559
@@ -111,11 +111,11 @@
 
23560
       ret->offset = 0;
 
23561
 
 
23562
       if (unlikely (rs < 1))
 
23563
-        alloc_size = 1;
 
23564
+        alloc_size = 0;
 
23565
       else
 
23566
-        alloc_size = rs * sizeof (GFC_REAL_8);
 
23567
+        alloc_size = rs;
 
23568
 
 
23569
-      ret->base_addr = xmalloc (alloc_size);
 
23570
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
23571
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23572
     }
 
23573
 
 
23574
Index: libgfortran/generated/in_pack_c10.c
 
23575
===================================================================
 
23576
--- a/src/libgfortran/generated/in_pack_c10.c   (.../tags/gcc_4_8_3_release)
 
23577
+++ b/src/libgfortran/generated/in_pack_c10.c   (.../branches/gcc-4_8-branch)
 
23578
@@ -76,7 +76,7 @@
 
23579
     return source->base_addr;
 
23580
 
 
23581
   /* Allocate storage for the destination.  */
 
23582
-  destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
 
23583
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
 
23584
   dest = destptr;
 
23585
   src = source->base_addr;
 
23586
   stride0 = stride[0];
 
23587
Index: libgfortran/generated/all_l4.c
 
23588
===================================================================
 
23589
--- a/src/libgfortran/generated/all_l4.c        (.../tags/gcc_4_8_3_release)
 
23590
+++ b/src/libgfortran/generated/all_l4.c        (.../branches/gcc-4_8-branch)
 
23591
@@ -101,8 +101,7 @@
 
23592
       retarray->offset = 0;
 
23593
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23594
 
 
23595
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23596
-                  * extent[rank-1];
 
23597
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23598
 
 
23599
       if (alloc_size == 0)
 
23600
        {
 
23601
@@ -111,7 +110,7 @@
 
23602
          return;
 
23603
        }
 
23604
       else
 
23605
-       retarray->base_addr = xmalloc (alloc_size);
 
23606
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
23607
     }
 
23608
   else
 
23609
     {
 
23610
Index: libgfortran/generated/minloc0_8_i2.c
 
23611
===================================================================
 
23612
--- a/src/libgfortran/generated/minloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
23613
+++ b/src/libgfortran/generated/minloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
23614
@@ -58,7 +58,7 @@
 
23615
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23616
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23617
       retarray->offset = 0;
 
23618
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23619
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23620
     }
 
23621
   else
 
23622
     {
 
23623
@@ -199,7 +199,7 @@
 
23624
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23625
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23626
       retarray->offset = 0;
 
23627
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23628
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23629
     }
 
23630
   else
 
23631
     {
 
23632
@@ -367,7 +367,7 @@
 
23633
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23634
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23635
       retarray->offset = 0;
 
23636
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23637
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23638
     }
 
23639
   else if (unlikely (compile_options.bounds_check))
 
23640
     {
 
23641
Index: libgfortran/generated/norm2_r16.c
 
23642
===================================================================
 
23643
--- a/src/libgfortran/generated/norm2_r16.c     (.../tags/gcc_4_8_3_release)
 
23644
+++ b/src/libgfortran/generated/norm2_r16.c     (.../branches/gcc-4_8-branch)
 
23645
@@ -105,10 +105,9 @@
 
23646
       retarray->offset = 0;
 
23647
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23648
 
 
23649
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23650
-                  * extent[rank-1];
 
23651
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23652
 
 
23653
-      retarray->base_addr = xmalloc (alloc_size);
 
23654
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
23655
       if (alloc_size == 0)
 
23656
        {
 
23657
          /* Make sure we have a zero-sized array.  */
 
23658
Index: libgfortran/generated/reshape_c10.c
 
23659
===================================================================
 
23660
--- a/src/libgfortran/generated/reshape_c10.c   (.../tags/gcc_4_8_3_release)
 
23661
+++ b/src/libgfortran/generated/reshape_c10.c   (.../branches/gcc-4_8-branch)
 
23662
@@ -111,11 +111,11 @@
 
23663
       ret->offset = 0;
 
23664
 
 
23665
       if (unlikely (rs < 1))
 
23666
-        alloc_size = 1;
 
23667
+        alloc_size = 0;
 
23668
       else
 
23669
-        alloc_size = rs * sizeof (GFC_COMPLEX_10);
 
23670
+        alloc_size = rs;
 
23671
 
 
23672
-      ret->base_addr = xmalloc (alloc_size);
 
23673
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
23674
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23675
     }
 
23676
 
 
23677
Index: libgfortran/generated/unpack_c16.c
 
23678
===================================================================
 
23679
--- a/src/libgfortran/generated/unpack_c16.c    (.../tags/gcc_4_8_3_release)
 
23680
+++ b/src/libgfortran/generated/unpack_c16.c    (.../branches/gcc-4_8-branch)
 
23681
@@ -99,7 +99,7 @@
 
23682
          rs *= extent[n];
 
23683
        }
 
23684
       ret->offset = 0;
 
23685
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
23686
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
23687
     }
 
23688
   else
 
23689
     {
 
23690
@@ -244,7 +244,7 @@
 
23691
          rs *= extent[n];
 
23692
        }
 
23693
       ret->offset = 0;
 
23694
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
23695
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
23696
     }
 
23697
   else
 
23698
     {
 
23699
Index: libgfortran/generated/maxloc1_4_r4.c
 
23700
===================================================================
 
23701
--- a/src/libgfortran/generated/maxloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
23702
+++ b/src/libgfortran/generated/maxloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
23703
@@ -98,10 +98,9 @@
 
23704
       retarray->offset = 0;
 
23705
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23706
 
 
23707
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23708
-                  * extent[rank-1];
 
23709
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23710
 
 
23711
-      retarray->base_addr = xmalloc (alloc_size);
 
23712
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23713
       if (alloc_size == 0)
 
23714
        {
 
23715
          /* Make sure we have a zero-sized array.  */
 
23716
@@ -294,8 +293,7 @@
 
23717
 
 
23718
        }
 
23719
 
 
23720
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23721
-                  * extent[rank-1];
 
23722
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23723
 
 
23724
       retarray->offset = 0;
 
23725
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23726
@@ -307,7 +305,7 @@
 
23727
          return;
 
23728
        }
 
23729
       else
 
23730
-       retarray->base_addr = xmalloc (alloc_size);
 
23731
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23732
 
 
23733
     }
 
23734
   else
 
23735
@@ -485,8 +483,7 @@
 
23736
       retarray->offset = 0;
 
23737
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23738
 
 
23739
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23740
-                  * extent[rank-1];
 
23741
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23742
 
 
23743
       if (alloc_size == 0)
 
23744
        {
 
23745
@@ -495,7 +492,7 @@
 
23746
          return;
 
23747
        }
 
23748
       else
 
23749
-       retarray->base_addr = xmalloc (alloc_size);
 
23750
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23751
     }
 
23752
   else
 
23753
     {
 
23754
Index: libgfortran/generated/maxval_r8.c
 
23755
===================================================================
 
23756
--- a/src/libgfortran/generated/maxval_r8.c     (.../tags/gcc_4_8_3_release)
 
23757
+++ b/src/libgfortran/generated/maxval_r8.c     (.../branches/gcc-4_8-branch)
 
23758
@@ -97,10 +97,9 @@
 
23759
       retarray->offset = 0;
 
23760
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23761
 
 
23762
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23763
-                  * extent[rank-1];
 
23764
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23765
 
 
23766
-      retarray->base_addr = xmalloc (alloc_size);
 
23767
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
23768
       if (alloc_size == 0)
 
23769
        {
 
23770
          /* Make sure we have a zero-sized array.  */
 
23771
@@ -286,8 +285,7 @@
 
23772
 
 
23773
        }
 
23774
 
 
23775
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23776
-                  * extent[rank-1];
 
23777
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23778
 
 
23779
       retarray->offset = 0;
 
23780
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23781
@@ -299,7 +297,7 @@
 
23782
          return;
 
23783
        }
 
23784
       else
 
23785
-       retarray->base_addr = xmalloc (alloc_size);
 
23786
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
23787
 
 
23788
     }
 
23789
   else
 
23790
@@ -472,8 +470,7 @@
 
23791
       retarray->offset = 0;
 
23792
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23793
 
 
23794
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23795
-                  * extent[rank-1];
 
23796
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23797
 
 
23798
       if (alloc_size == 0)
 
23799
        {
 
23800
@@ -482,7 +479,7 @@
 
23801
          return;
 
23802
        }
 
23803
       else
 
23804
-       retarray->base_addr = xmalloc (alloc_size);
 
23805
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
23806
     }
 
23807
   else
 
23808
     {
 
23809
Index: libgfortran/generated/transpose_c4.c
 
23810
===================================================================
 
23811
--- a/src/libgfortran/generated/transpose_c4.c  (.../tags/gcc_4_8_3_release)
 
23812
+++ b/src/libgfortran/generated/transpose_c4.c  (.../branches/gcc-4_8-branch)
 
23813
@@ -60,7 +60,8 @@
 
23814
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
23815
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
23816
 
 
23817
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
 
23818
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
23819
+                                     sizeof (GFC_COMPLEX_4));
 
23820
       ret->offset = 0;
 
23821
     } else if (unlikely (compile_options.bounds_check))
 
23822
     {
 
23823
Index: libgfortran/generated/eoshift1_4.c
 
23824
===================================================================
 
23825
--- a/src/libgfortran/generated/eoshift1_4.c    (.../tags/gcc_4_8_3_release)
 
23826
+++ b/src/libgfortran/generated/eoshift1_4.c    (.../branches/gcc-4_8-branch)
 
23827
@@ -105,8 +105,8 @@
 
23828
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
23829
 
 
23830
         }
 
23831
-      /* xmalloc allocates a single byte for zero size.  */
 
23832
-      ret->base_addr = xmalloc (size * arraysize);
 
23833
+      /* xmallocarray allocates a single byte for zero size.  */
 
23834
+      ret->base_addr = xmallocarray (arraysize, size);
 
23835
 
 
23836
     }
 
23837
   else if (unlikely (compile_options.bounds_check))
 
23838
Index: libgfortran/generated/minval_r16.c
 
23839
===================================================================
 
23840
--- a/src/libgfortran/generated/minval_r16.c    (.../tags/gcc_4_8_3_release)
 
23841
+++ b/src/libgfortran/generated/minval_r16.c    (.../branches/gcc-4_8-branch)
 
23842
@@ -97,10 +97,9 @@
 
23843
       retarray->offset = 0;
 
23844
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23845
 
 
23846
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23847
-                  * extent[rank-1];
 
23848
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23849
 
 
23850
-      retarray->base_addr = xmalloc (alloc_size);
 
23851
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
23852
       if (alloc_size == 0)
 
23853
        {
 
23854
          /* Make sure we have a zero-sized array.  */
 
23855
@@ -286,8 +285,7 @@
 
23856
 
 
23857
        }
 
23858
 
 
23859
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23860
-                  * extent[rank-1];
 
23861
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23862
 
 
23863
       retarray->offset = 0;
 
23864
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23865
@@ -299,7 +297,7 @@
 
23866
          return;
 
23867
        }
 
23868
       else
 
23869
-       retarray->base_addr = xmalloc (alloc_size);
 
23870
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
23871
 
 
23872
     }
 
23873
   else
 
23874
@@ -472,8 +470,7 @@
 
23875
       retarray->offset = 0;
 
23876
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23877
 
 
23878
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23879
-                  * extent[rank-1];
 
23880
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23881
 
 
23882
       if (alloc_size == 0)
 
23883
        {
 
23884
@@ -482,7 +479,7 @@
 
23885
          return;
 
23886
        }
 
23887
       else
 
23888
-       retarray->base_addr = xmalloc (alloc_size);
 
23889
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
23890
     }
 
23891
   else
 
23892
     {
 
23893
Index: libgfortran/generated/iany_i16.c
 
23894
===================================================================
 
23895
--- a/src/libgfortran/generated/iany_i16.c      (.../tags/gcc_4_8_3_release)
 
23896
+++ b/src/libgfortran/generated/iany_i16.c      (.../branches/gcc-4_8-branch)
 
23897
@@ -97,10 +97,9 @@
 
23898
       retarray->offset = 0;
 
23899
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23900
 
 
23901
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23902
-                  * extent[rank-1];
 
23903
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23904
 
 
23905
-      retarray->base_addr = xmalloc (alloc_size);
 
23906
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23907
       if (alloc_size == 0)
 
23908
        {
 
23909
          /* Make sure we have a zero-sized array.  */
 
23910
@@ -272,8 +271,7 @@
 
23911
 
 
23912
        }
 
23913
 
 
23914
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23915
-                  * extent[rank-1];
 
23916
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23917
 
 
23918
       retarray->offset = 0;
 
23919
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23920
@@ -285,7 +283,7 @@
 
23921
          return;
 
23922
        }
 
23923
       else
 
23924
-       retarray->base_addr = xmalloc (alloc_size);
 
23925
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23926
 
 
23927
     }
 
23928
   else
 
23929
@@ -430,8 +428,7 @@
 
23930
       retarray->offset = 0;
 
23931
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23932
 
 
23933
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23934
-                  * extent[rank-1];
 
23935
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23936
 
 
23937
       if (alloc_size == 0)
 
23938
        {
 
23939
@@ -440,7 +437,7 @@
 
23940
          return;
 
23941
        }
 
23942
       else
 
23943
-       retarray->base_addr = xmalloc (alloc_size);
 
23944
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23945
     }
 
23946
   else
 
23947
     {
 
23948
Index: libgfortran/generated/maxloc1_4_i2.c
 
23949
===================================================================
 
23950
--- a/src/libgfortran/generated/maxloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
23951
+++ b/src/libgfortran/generated/maxloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
23952
@@ -98,10 +98,9 @@
 
23953
       retarray->offset = 0;
 
23954
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23955
 
 
23956
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23957
-                  * extent[rank-1];
 
23958
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23959
 
 
23960
-      retarray->base_addr = xmalloc (alloc_size);
 
23961
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23962
       if (alloc_size == 0)
 
23963
        {
 
23964
          /* Make sure we have a zero-sized array.  */
 
23965
@@ -294,8 +293,7 @@
 
23966
 
 
23967
        }
 
23968
 
 
23969
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23970
-                  * extent[rank-1];
 
23971
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23972
 
 
23973
       retarray->offset = 0;
 
23974
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23975
@@ -307,7 +305,7 @@
 
23976
          return;
 
23977
        }
 
23978
       else
 
23979
-       retarray->base_addr = xmalloc (alloc_size);
 
23980
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23981
 
 
23982
     }
 
23983
   else
 
23984
@@ -485,8 +483,7 @@
 
23985
       retarray->offset = 0;
 
23986
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23987
 
 
23988
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23989
-                  * extent[rank-1];
 
23990
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23991
 
 
23992
       if (alloc_size == 0)
 
23993
        {
 
23994
@@ -495,7 +492,7 @@
 
23995
          return;
 
23996
        }
 
23997
       else
 
23998
-       retarray->base_addr = xmalloc (alloc_size);
 
23999
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24000
     }
 
24001
   else
 
24002
     {
 
24003
Index: libgfortran/generated/maxloc1_8_i8.c
 
24004
===================================================================
 
24005
--- a/src/libgfortran/generated/maxloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
24006
+++ b/src/libgfortran/generated/maxloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
24007
@@ -98,10 +98,9 @@
 
24008
       retarray->offset = 0;
 
24009
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24010
 
 
24011
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24012
-                  * extent[rank-1];
 
24013
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24014
 
 
24015
-      retarray->base_addr = xmalloc (alloc_size);
 
24016
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24017
       if (alloc_size == 0)
 
24018
        {
 
24019
          /* Make sure we have a zero-sized array.  */
 
24020
@@ -294,8 +293,7 @@
 
24021
 
 
24022
        }
 
24023
 
 
24024
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24025
-                  * extent[rank-1];
 
24026
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24027
 
 
24028
       retarray->offset = 0;
 
24029
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24030
@@ -307,7 +305,7 @@
 
24031
          return;
 
24032
        }
 
24033
       else
 
24034
-       retarray->base_addr = xmalloc (alloc_size);
 
24035
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24036
 
 
24037
     }
 
24038
   else
 
24039
@@ -485,8 +483,7 @@
 
24040
       retarray->offset = 0;
 
24041
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24042
 
 
24043
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24044
-                  * extent[rank-1];
 
24045
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24046
 
 
24047
       if (alloc_size == 0)
 
24048
        {
 
24049
@@ -495,7 +492,7 @@
 
24050
          return;
 
24051
        }
 
24052
       else
 
24053
-       retarray->base_addr = xmalloc (alloc_size);
 
24054
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24055
     }
 
24056
   else
 
24057
     {
 
24058
Index: libgfortran/generated/maxloc0_4_r8.c
 
24059
===================================================================
 
24060
--- a/src/libgfortran/generated/maxloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
24061
+++ b/src/libgfortran/generated/maxloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
24062
@@ -58,7 +58,7 @@
 
24063
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24064
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24065
       retarray->offset = 0;
 
24066
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24067
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24068
     }
 
24069
   else
 
24070
     {
 
24071
@@ -199,7 +199,7 @@
 
24072
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24073
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24074
       retarray->offset = 0;
 
24075
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24076
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24077
     }
 
24078
   else
 
24079
     {
 
24080
@@ -367,7 +367,7 @@
 
24081
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24082
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24083
       retarray->offset = 0;
 
24084
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24085
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24086
     }
 
24087
   else if (unlikely (compile_options.bounds_check))
 
24088
     {
 
24089
Index: libgfortran/generated/maxloc0_16_r16.c
 
24090
===================================================================
 
24091
--- a/src/libgfortran/generated/maxloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
24092
+++ b/src/libgfortran/generated/maxloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
24093
@@ -58,7 +58,7 @@
 
24094
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24095
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24096
       retarray->offset = 0;
 
24097
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24098
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24099
     }
 
24100
   else
 
24101
     {
 
24102
@@ -199,7 +199,7 @@
 
24103
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24104
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24105
       retarray->offset = 0;
 
24106
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24107
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24108
     }
 
24109
   else
 
24110
     {
 
24111
@@ -367,7 +367,7 @@
 
24112
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24113
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24114
       retarray->offset = 0;
 
24115
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24116
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24117
     }
 
24118
   else if (unlikely (compile_options.bounds_check))
 
24119
     {
 
24120
Index: libgfortran/generated/sum_c10.c
 
24121
===================================================================
 
24122
--- a/src/libgfortran/generated/sum_c10.c       (.../tags/gcc_4_8_3_release)
 
24123
+++ b/src/libgfortran/generated/sum_c10.c       (.../branches/gcc-4_8-branch)
 
24124
@@ -97,10 +97,9 @@
 
24125
       retarray->offset = 0;
 
24126
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24127
 
 
24128
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24129
-                  * extent[rank-1];
 
24130
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24131
 
 
24132
-      retarray->base_addr = xmalloc (alloc_size);
 
24133
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
24134
       if (alloc_size == 0)
 
24135
        {
 
24136
          /* Make sure we have a zero-sized array.  */
 
24137
@@ -272,8 +271,7 @@
 
24138
 
 
24139
        }
 
24140
 
 
24141
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24142
-                  * extent[rank-1];
 
24143
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24144
 
 
24145
       retarray->offset = 0;
 
24146
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24147
@@ -285,7 +283,7 @@
 
24148
          return;
 
24149
        }
 
24150
       else
 
24151
-       retarray->base_addr = xmalloc (alloc_size);
 
24152
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
24153
 
 
24154
     }
 
24155
   else
 
24156
@@ -430,8 +428,7 @@
 
24157
       retarray->offset = 0;
 
24158
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24159
 
 
24160
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24161
-                  * extent[rank-1];
 
24162
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24163
 
 
24164
       if (alloc_size == 0)
 
24165
        {
 
24166
@@ -440,7 +437,7 @@
 
24167
          return;
 
24168
        }
 
24169
       else
 
24170
-       retarray->base_addr = xmalloc (alloc_size);
 
24171
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
24172
     }
 
24173
   else
 
24174
     {
 
24175
Index: libgfortran/generated/iall_i4.c
 
24176
===================================================================
 
24177
--- a/src/libgfortran/generated/iall_i4.c       (.../tags/gcc_4_8_3_release)
 
24178
+++ b/src/libgfortran/generated/iall_i4.c       (.../branches/gcc-4_8-branch)
 
24179
@@ -97,10 +97,9 @@
 
24180
       retarray->offset = 0;
 
24181
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24182
 
 
24183
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24184
-                  * extent[rank-1];
 
24185
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24186
 
 
24187
-      retarray->base_addr = xmalloc (alloc_size);
 
24188
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24189
       if (alloc_size == 0)
 
24190
        {
 
24191
          /* Make sure we have a zero-sized array.  */
 
24192
@@ -272,8 +271,7 @@
 
24193
 
 
24194
        }
 
24195
 
 
24196
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24197
-                  * extent[rank-1];
 
24198
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24199
 
 
24200
       retarray->offset = 0;
 
24201
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24202
@@ -285,7 +283,7 @@
 
24203
          return;
 
24204
        }
 
24205
       else
 
24206
-       retarray->base_addr = xmalloc (alloc_size);
 
24207
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24208
 
 
24209
     }
 
24210
   else
 
24211
@@ -430,8 +428,7 @@
 
24212
       retarray->offset = 0;
 
24213
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24214
 
 
24215
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24216
-                  * extent[rank-1];
 
24217
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24218
 
 
24219
       if (alloc_size == 0)
 
24220
        {
 
24221
@@ -440,7 +437,7 @@
 
24222
          return;
 
24223
        }
 
24224
       else
 
24225
-       retarray->base_addr = xmalloc (alloc_size);
 
24226
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24227
     }
 
24228
   else
 
24229
     {
 
24230
Index: libgfortran/generated/minloc1_4_r16.c
 
24231
===================================================================
 
24232
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
24233
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
24234
@@ -98,10 +98,9 @@
 
24235
       retarray->offset = 0;
 
24236
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24237
 
 
24238
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24239
-                  * extent[rank-1];
 
24240
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24241
 
 
24242
-      retarray->base_addr = xmalloc (alloc_size);
 
24243
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24244
       if (alloc_size == 0)
 
24245
        {
 
24246
          /* Make sure we have a zero-sized array.  */
 
24247
@@ -294,8 +293,7 @@
 
24248
 
 
24249
        }
 
24250
 
 
24251
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24252
-                  * extent[rank-1];
 
24253
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24254
 
 
24255
       retarray->offset = 0;
 
24256
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24257
@@ -307,7 +305,7 @@
 
24258
          return;
 
24259
        }
 
24260
       else
 
24261
-       retarray->base_addr = xmalloc (alloc_size);
 
24262
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24263
 
 
24264
     }
 
24265
   else
 
24266
@@ -485,8 +483,7 @@
 
24267
       retarray->offset = 0;
 
24268
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24269
 
 
24270
-      alloc_size = sizeof (GFC_INTEGER_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
       if (alloc_size == 0)
 
24275
        {
 
24276
@@ -495,7 +492,7 @@
 
24277
          return;
 
24278
        }
 
24279
       else
 
24280
-       retarray->base_addr = xmalloc (alloc_size);
 
24281
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24282
     }
 
24283
   else
 
24284
     {
 
24285
Index: libgfortran/generated/maxloc0_8_r16.c
 
24286
===================================================================
 
24287
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
24288
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
24289
@@ -58,7 +58,7 @@
 
24290
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24291
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24292
       retarray->offset = 0;
 
24293
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24294
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24295
     }
 
24296
   else
 
24297
     {
 
24298
@@ -199,7 +199,7 @@
 
24299
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24300
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24301
       retarray->offset = 0;
 
24302
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24303
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24304
     }
 
24305
   else
 
24306
     {
 
24307
@@ -367,7 +367,7 @@
 
24308
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24309
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24310
       retarray->offset = 0;
 
24311
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24312
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24313
     }
 
24314
   else if (unlikely (compile_options.bounds_check))
 
24315
     {
 
24316
Index: libgfortran/generated/pack_r8.c
 
24317
===================================================================
 
24318
--- a/src/libgfortran/generated/pack_r8.c       (.../tags/gcc_4_8_3_release)
 
24319
+++ b/src/libgfortran/generated/pack_r8.c       (.../branches/gcc-4_8-branch)
 
24320
@@ -167,8 +167,8 @@
 
24321
 
 
24322
          ret->offset = 0;
 
24323
 
 
24324
-         /* xmalloc allocates a single byte for zero size.  */
 
24325
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
 
24326
+         /* xmallocarray allocates a single byte for zero size.  */
 
24327
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
 
24328
 
 
24329
          if (total == 0)
 
24330
            return;
 
24331
Index: libgfortran/generated/matmul_c10.c
 
24332
===================================================================
 
24333
--- a/src/libgfortran/generated/matmul_c10.c    (.../tags/gcc_4_8_3_release)
 
24334
+++ b/src/libgfortran/generated/matmul_c10.c    (.../branches/gcc-4_8-branch)
 
24335
@@ -124,7 +124,7 @@
 
24336
         }
 
24337
 
 
24338
       retarray->base_addr
 
24339
-       = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
 
24340
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
 
24341
       retarray->offset = 0;
 
24342
     }
 
24343
     else if (unlikely (compile_options.bounds_check))
 
24344
Index: libgfortran/generated/maxloc0_16_i4.c
 
24345
===================================================================
 
24346
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
24347
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
24348
@@ -58,7 +58,7 @@
 
24349
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24350
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24351
       retarray->offset = 0;
 
24352
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24353
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24354
     }
 
24355
   else
 
24356
     {
 
24357
@@ -199,7 +199,7 @@
 
24358
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24359
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24360
       retarray->offset = 0;
 
24361
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24362
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24363
     }
 
24364
   else
 
24365
     {
 
24366
@@ -367,7 +367,7 @@
 
24367
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24368
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24369
       retarray->offset = 0;
 
24370
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24371
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24372
     }
 
24373
   else if (unlikely (compile_options.bounds_check))
 
24374
     {
 
24375
Index: libgfortran/generated/pack_r16.c
 
24376
===================================================================
 
24377
--- a/src/libgfortran/generated/pack_r16.c      (.../tags/gcc_4_8_3_release)
 
24378
+++ b/src/libgfortran/generated/pack_r16.c      (.../branches/gcc-4_8-branch)
 
24379
@@ -167,8 +167,8 @@
 
24380
 
 
24381
          ret->offset = 0;
 
24382
 
 
24383
-         /* xmalloc allocates a single byte for zero size.  */
 
24384
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
 
24385
+         /* xmallocarray allocates a single byte for zero size.  */
 
24386
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
 
24387
 
 
24388
          if (total == 0)
 
24389
            return;
 
24390
Index: libgfortran/generated/minloc1_16_i8.c
 
24391
===================================================================
 
24392
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
24393
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
24394
@@ -98,10 +98,9 @@
 
24395
       retarray->offset = 0;
 
24396
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24397
 
 
24398
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24399
-                  * extent[rank-1];
 
24400
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24401
 
 
24402
-      retarray->base_addr = xmalloc (alloc_size);
 
24403
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24404
       if (alloc_size == 0)
 
24405
        {
 
24406
          /* Make sure we have a zero-sized array.  */
 
24407
@@ -294,8 +293,7 @@
 
24408
 
 
24409
        }
 
24410
 
 
24411
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24412
-                  * extent[rank-1];
 
24413
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24414
 
 
24415
       retarray->offset = 0;
 
24416
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24417
@@ -307,7 +305,7 @@
 
24418
          return;
 
24419
        }
 
24420
       else
 
24421
-       retarray->base_addr = xmalloc (alloc_size);
 
24422
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24423
 
 
24424
     }
 
24425
   else
 
24426
@@ -485,8 +483,7 @@
 
24427
       retarray->offset = 0;
 
24428
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24429
 
 
24430
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24431
-                  * extent[rank-1];
 
24432
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24433
 
 
24434
       if (alloc_size == 0)
 
24435
        {
 
24436
@@ -495,7 +492,7 @@
 
24437
          return;
 
24438
        }
 
24439
       else
 
24440
-       retarray->base_addr = xmalloc (alloc_size);
 
24441
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24442
     }
 
24443
   else
 
24444
     {
 
24445
Index: libgfortran/generated/minloc0_16_r10.c
 
24446
===================================================================
 
24447
--- a/src/libgfortran/generated/minloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
24448
+++ b/src/libgfortran/generated/minloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
24449
@@ -58,7 +58,7 @@
 
24450
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24451
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24452
       retarray->offset = 0;
 
24453
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24454
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24455
     }
 
24456
   else
 
24457
     {
 
24458
@@ -199,7 +199,7 @@
 
24459
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24460
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24461
       retarray->offset = 0;
 
24462
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24463
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24464
     }
 
24465
   else
 
24466
     {
 
24467
@@ -367,7 +367,7 @@
 
24468
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24469
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24470
       retarray->offset = 0;
 
24471
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24472
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24473
     }
 
24474
   else if (unlikely (compile_options.bounds_check))
 
24475
     {
 
24476
Index: libgfortran/generated/unpack_c4.c
 
24477
===================================================================
 
24478
--- a/src/libgfortran/generated/unpack_c4.c     (.../tags/gcc_4_8_3_release)
 
24479
+++ b/src/libgfortran/generated/unpack_c4.c     (.../branches/gcc-4_8-branch)
 
24480
@@ -99,7 +99,7 @@
 
24481
          rs *= extent[n];
 
24482
        }
 
24483
       ret->offset = 0;
 
24484
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
24485
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
24486
     }
 
24487
   else
 
24488
     {
 
24489
@@ -244,7 +244,7 @@
 
24490
          rs *= extent[n];
 
24491
        }
 
24492
       ret->offset = 0;
 
24493
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
24494
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
24495
     }
 
24496
   else
 
24497
     {
 
24498
Index: libgfortran/generated/iparity_i1.c
 
24499
===================================================================
 
24500
--- a/src/libgfortran/generated/iparity_i1.c    (.../tags/gcc_4_8_3_release)
 
24501
+++ b/src/libgfortran/generated/iparity_i1.c    (.../branches/gcc-4_8-branch)
 
24502
@@ -97,10 +97,9 @@
 
24503
       retarray->offset = 0;
 
24504
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24505
 
 
24506
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24507
-                  * extent[rank-1];
 
24508
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24509
 
 
24510
-      retarray->base_addr = xmalloc (alloc_size);
 
24511
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24512
       if (alloc_size == 0)
 
24513
        {
 
24514
          /* Make sure we have a zero-sized array.  */
 
24515
@@ -272,8 +271,7 @@
 
24516
 
 
24517
        }
 
24518
 
 
24519
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24520
-                  * extent[rank-1];
 
24521
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24522
 
 
24523
       retarray->offset = 0;
 
24524
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24525
@@ -285,7 +283,7 @@
 
24526
          return;
 
24527
        }
 
24528
       else
 
24529
-       retarray->base_addr = xmalloc (alloc_size);
 
24530
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24531
 
 
24532
     }
 
24533
   else
 
24534
@@ -430,8 +428,7 @@
 
24535
       retarray->offset = 0;
 
24536
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24537
 
 
24538
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24539
-                  * extent[rank-1];
 
24540
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24541
 
 
24542
       if (alloc_size == 0)
 
24543
        {
 
24544
@@ -440,7 +437,7 @@
 
24545
          return;
 
24546
        }
 
24547
       else
 
24548
-       retarray->base_addr = xmalloc (alloc_size);
 
24549
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24550
     }
 
24551
   else
 
24552
     {
 
24553
Index: libgfortran/generated/product_c8.c
 
24554
===================================================================
 
24555
--- a/src/libgfortran/generated/product_c8.c    (.../tags/gcc_4_8_3_release)
 
24556
+++ b/src/libgfortran/generated/product_c8.c    (.../branches/gcc-4_8-branch)
 
24557
@@ -97,10 +97,9 @@
 
24558
       retarray->offset = 0;
 
24559
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24560
 
 
24561
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24562
-                  * extent[rank-1];
 
24563
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24564
 
 
24565
-      retarray->base_addr = xmalloc (alloc_size);
 
24566
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24567
       if (alloc_size == 0)
 
24568
        {
 
24569
          /* Make sure we have a zero-sized array.  */
 
24570
@@ -272,8 +271,7 @@
 
24571
 
 
24572
        }
 
24573
 
 
24574
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24575
-                  * extent[rank-1];
 
24576
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24577
 
 
24578
       retarray->offset = 0;
 
24579
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24580
@@ -285,7 +283,7 @@
 
24581
          return;
 
24582
        }
 
24583
       else
 
24584
-       retarray->base_addr = xmalloc (alloc_size);
 
24585
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24586
 
 
24587
     }
 
24588
   else
 
24589
@@ -430,8 +428,7 @@
 
24590
       retarray->offset = 0;
 
24591
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24592
 
 
24593
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24594
-                  * extent[rank-1];
 
24595
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24596
 
 
24597
       if (alloc_size == 0)
 
24598
        {
 
24599
@@ -440,7 +437,7 @@
 
24600
          return;
 
24601
        }
 
24602
       else
 
24603
-       retarray->base_addr = xmalloc (alloc_size);
 
24604
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24605
     }
 
24606
   else
 
24607
     {
 
24608
Index: libgfortran/generated/in_pack_i16.c
 
24609
===================================================================
 
24610
--- a/src/libgfortran/generated/in_pack_i16.c   (.../tags/gcc_4_8_3_release)
 
24611
+++ b/src/libgfortran/generated/in_pack_i16.c   (.../branches/gcc-4_8-branch)
 
24612
@@ -76,7 +76,7 @@
 
24613
     return source->base_addr;
 
24614
 
 
24615
   /* Allocate storage for the destination.  */
 
24616
-  destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
 
24617
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
 
24618
   dest = destptr;
 
24619
   src = source->base_addr;
 
24620
   stride0 = stride[0];
 
24621
Index: libgfortran/generated/minloc0_8_i4.c
 
24622
===================================================================
 
24623
--- a/src/libgfortran/generated/minloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
24624
+++ b/src/libgfortran/generated/minloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
24625
@@ -58,7 +58,7 @@
 
24626
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24627
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24628
       retarray->offset = 0;
 
24629
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24630
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24631
     }
 
24632
   else
 
24633
     {
 
24634
@@ -199,7 +199,7 @@
 
24635
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24636
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24637
       retarray->offset = 0;
 
24638
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24639
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24640
     }
 
24641
   else
 
24642
     {
 
24643
@@ -367,7 +367,7 @@
 
24644
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24645
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24646
       retarray->offset = 0;
 
24647
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24648
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24649
     }
 
24650
   else if (unlikely (compile_options.bounds_check))
 
24651
     {
 
24652
Index: libgfortran/generated/matmul_c4.c
 
24653
===================================================================
 
24654
--- a/src/libgfortran/generated/matmul_c4.c     (.../tags/gcc_4_8_3_release)
 
24655
+++ b/src/libgfortran/generated/matmul_c4.c     (.../branches/gcc-4_8-branch)
 
24656
@@ -124,7 +124,7 @@
 
24657
         }
 
24658
 
 
24659
       retarray->base_addr
 
24660
-       = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
 
24661
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
 
24662
       retarray->offset = 0;
 
24663
     }
 
24664
     else if (unlikely (compile_options.bounds_check))
 
24665
Index: libgfortran/generated/reshape_i8.c
 
24666
===================================================================
 
24667
--- a/src/libgfortran/generated/reshape_i8.c    (.../tags/gcc_4_8_3_release)
 
24668
+++ b/src/libgfortran/generated/reshape_i8.c    (.../branches/gcc-4_8-branch)
 
24669
@@ -111,11 +111,11 @@
 
24670
       ret->offset = 0;
 
24671
 
 
24672
       if (unlikely (rs < 1))
 
24673
-        alloc_size = 1;
 
24674
+        alloc_size = 0;
 
24675
       else
 
24676
-        alloc_size = rs * sizeof (GFC_INTEGER_8);
 
24677
+        alloc_size = rs;
 
24678
 
 
24679
-      ret->base_addr = xmalloc (alloc_size);
 
24680
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24681
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
24682
     }
 
24683
 
 
24684
Index: libgfortran/generated/in_pack_c8.c
 
24685
===================================================================
 
24686
--- a/src/libgfortran/generated/in_pack_c8.c    (.../tags/gcc_4_8_3_release)
 
24687
+++ b/src/libgfortran/generated/in_pack_c8.c    (.../branches/gcc-4_8-branch)
 
24688
@@ -76,7 +76,7 @@
 
24689
     return source->base_addr;
 
24690
 
 
24691
   /* Allocate storage for the destination.  */
 
24692
-  destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
 
24693
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
 
24694
   dest = destptr;
 
24695
   src = source->base_addr;
 
24696
   stride0 = stride[0];
 
24697
Index: libgfortran/generated/bessel_r10.c
 
24698
===================================================================
 
24699
--- a/src/libgfortran/generated/bessel_r10.c    (.../tags/gcc_4_8_3_release)
 
24700
+++ b/src/libgfortran/generated/bessel_r10.c    (.../branches/gcc-4_8-branch)
 
24701
@@ -55,7 +55,7 @@
 
24702
     {
 
24703
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
24704
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
24705
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
24706
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
24707
       ret->offset = 0;
 
24708
     }
 
24709
 
 
24710
@@ -122,7 +122,7 @@
 
24711
     {
 
24712
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
24713
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
24714
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
24715
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
24716
       ret->offset = 0;
 
24717
     }
 
24718
 
 
24719
@@ -162,7 +162,7 @@
 
24720
 
 
24721
   x2rev = GFC_REAL_10_LITERAL(2.)/x;
 
24722
 
 
24723
-  for (i = 2; i <= n1+n2; i++)
 
24724
+  for (i = 2; i <= n2 - n1; i++)
 
24725
     {
 
24726
 #if defined(GFC_REAL_10_INFINITY)
 
24727
       if (unlikely (last2 == -GFC_REAL_10_INFINITY))
 
24728
Index: libgfortran/generated/iall_i16.c
 
24729
===================================================================
 
24730
--- a/src/libgfortran/generated/iall_i16.c      (.../tags/gcc_4_8_3_release)
 
24731
+++ b/src/libgfortran/generated/iall_i16.c      (.../branches/gcc-4_8-branch)
 
24732
@@ -97,10 +97,9 @@
 
24733
       retarray->offset = 0;
 
24734
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24735
 
 
24736
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24737
-                  * extent[rank-1];
 
24738
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24739
 
 
24740
-      retarray->base_addr = xmalloc (alloc_size);
 
24741
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24742
       if (alloc_size == 0)
 
24743
        {
 
24744
          /* Make sure we have a zero-sized array.  */
 
24745
@@ -272,8 +271,7 @@
 
24746
 
 
24747
        }
 
24748
 
 
24749
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24750
-                  * extent[rank-1];
 
24751
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24752
 
 
24753
       retarray->offset = 0;
 
24754
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24755
@@ -285,7 +283,7 @@
 
24756
          return;
 
24757
        }
 
24758
       else
 
24759
-       retarray->base_addr = xmalloc (alloc_size);
 
24760
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24761
 
 
24762
     }
 
24763
   else
 
24764
@@ -430,8 +428,7 @@
 
24765
       retarray->offset = 0;
 
24766
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24767
 
 
24768
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24769
-                  * extent[rank-1];
 
24770
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24771
 
 
24772
       if (alloc_size == 0)
 
24773
        {
 
24774
@@ -440,7 +437,7 @@
 
24775
          return;
 
24776
        }
 
24777
       else
 
24778
-       retarray->base_addr = xmalloc (alloc_size);
 
24779
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24780
     }
 
24781
   else
 
24782
     {
 
24783
Index: libgfortran/generated/maxloc1_16_i1.c
 
24784
===================================================================
 
24785
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
24786
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
24787
@@ -98,10 +98,9 @@
 
24788
       retarray->offset = 0;
 
24789
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24790
 
 
24791
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24792
-                  * extent[rank-1];
 
24793
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24794
 
 
24795
-      retarray->base_addr = xmalloc (alloc_size);
 
24796
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24797
       if (alloc_size == 0)
 
24798
        {
 
24799
          /* Make sure we have a zero-sized array.  */
 
24800
@@ -294,8 +293,7 @@
 
24801
 
 
24802
        }
 
24803
 
 
24804
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24805
-                  * extent[rank-1];
 
24806
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24807
 
 
24808
       retarray->offset = 0;
 
24809
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24810
@@ -307,7 +305,7 @@
 
24811
          return;
 
24812
        }
 
24813
       else
 
24814
-       retarray->base_addr = xmalloc (alloc_size);
 
24815
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24816
 
 
24817
     }
 
24818
   else
 
24819
@@ -485,8 +483,7 @@
 
24820
       retarray->offset = 0;
 
24821
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24822
 
 
24823
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24824
-                  * extent[rank-1];
 
24825
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24826
 
 
24827
       if (alloc_size == 0)
 
24828
        {
 
24829
@@ -495,7 +492,7 @@
 
24830
          return;
 
24831
        }
 
24832
       else
 
24833
-       retarray->base_addr = xmalloc (alloc_size);
 
24834
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24835
     }
 
24836
   else
 
24837
     {
 
24838
Index: libgfortran/generated/reshape_i16.c
 
24839
===================================================================
 
24840
--- a/src/libgfortran/generated/reshape_i16.c   (.../tags/gcc_4_8_3_release)
 
24841
+++ b/src/libgfortran/generated/reshape_i16.c   (.../branches/gcc-4_8-branch)
 
24842
@@ -111,11 +111,11 @@
 
24843
       ret->offset = 0;
 
24844
 
 
24845
       if (unlikely (rs < 1))
 
24846
-        alloc_size = 1;
 
24847
+        alloc_size = 0;
 
24848
       else
 
24849
-        alloc_size = rs * sizeof (GFC_INTEGER_16);
 
24850
+        alloc_size = rs;
 
24851
 
 
24852
-      ret->base_addr = xmalloc (alloc_size);
 
24853
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24854
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
24855
     }
 
24856
 
 
24857
Index: libgfortran/generated/count_16_l.c
 
24858
===================================================================
 
24859
--- a/src/libgfortran/generated/count_16_l.c    (.../tags/gcc_4_8_3_release)
 
24860
+++ b/src/libgfortran/generated/count_16_l.c    (.../branches/gcc-4_8-branch)
 
24861
@@ -101,8 +101,7 @@
 
24862
       retarray->offset = 0;
 
24863
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24864
 
 
24865
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24866
-                  * extent[rank-1];
 
24867
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24868
 
 
24869
       if (alloc_size == 0)
 
24870
        {
 
24871
@@ -111,7 +110,7 @@
 
24872
          return;
 
24873
        }
 
24874
       else
 
24875
-       retarray->base_addr = xmalloc (alloc_size);
 
24876
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24877
     }
 
24878
   else
 
24879
     {
 
24880
Index: libgfortran/generated/minloc1_8_i1.c
 
24881
===================================================================
 
24882
--- a/src/libgfortran/generated/minloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
24883
+++ b/src/libgfortran/generated/minloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
24884
@@ -98,10 +98,9 @@
 
24885
       retarray->offset = 0;
 
24886
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24887
 
 
24888
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24889
-                  * extent[rank-1];
 
24890
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24891
 
 
24892
-      retarray->base_addr = xmalloc (alloc_size);
 
24893
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24894
       if (alloc_size == 0)
 
24895
        {
 
24896
          /* Make sure we have a zero-sized array.  */
 
24897
@@ -294,8 +293,7 @@
 
24898
 
 
24899
        }
 
24900
 
 
24901
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24902
-                  * extent[rank-1];
 
24903
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24904
 
 
24905
       retarray->offset = 0;
 
24906
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24907
@@ -307,7 +305,7 @@
 
24908
          return;
 
24909
        }
 
24910
       else
 
24911
-       retarray->base_addr = xmalloc (alloc_size);
 
24912
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24913
 
 
24914
     }
 
24915
   else
 
24916
@@ -485,8 +483,7 @@
 
24917
       retarray->offset = 0;
 
24918
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24919
 
 
24920
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24921
-                  * extent[rank-1];
 
24922
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24923
 
 
24924
       if (alloc_size == 0)
 
24925
        {
 
24926
@@ -495,7 +492,7 @@
 
24927
          return;
 
24928
        }
 
24929
       else
 
24930
-       retarray->base_addr = xmalloc (alloc_size);
 
24931
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24932
     }
 
24933
   else
 
24934
     {
 
24935
Index: libgfortran/generated/maxloc1_4_i4.c
 
24936
===================================================================
 
24937
--- a/src/libgfortran/generated/maxloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
24938
+++ b/src/libgfortran/generated/maxloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
24939
@@ -98,10 +98,9 @@
 
24940
       retarray->offset = 0;
 
24941
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24942
 
 
24943
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24944
-                  * extent[rank-1];
 
24945
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24946
 
 
24947
-      retarray->base_addr = xmalloc (alloc_size);
 
24948
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24949
       if (alloc_size == 0)
 
24950
        {
 
24951
          /* Make sure we have a zero-sized array.  */
 
24952
@@ -294,8 +293,7 @@
 
24953
 
 
24954
        }
 
24955
 
 
24956
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24957
-                  * extent[rank-1];
 
24958
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24959
 
 
24960
       retarray->offset = 0;
 
24961
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24962
@@ -307,7 +305,7 @@
 
24963
          return;
 
24964
        }
 
24965
       else
 
24966
-       retarray->base_addr = xmalloc (alloc_size);
 
24967
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24968
 
 
24969
     }
 
24970
   else
 
24971
@@ -485,8 +483,7 @@
 
24972
       retarray->offset = 0;
 
24973
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24974
 
 
24975
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24976
-                  * extent[rank-1];
 
24977
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24978
 
 
24979
       if (alloc_size == 0)
 
24980
        {
 
24981
@@ -495,7 +492,7 @@
 
24982
          return;
 
24983
        }
 
24984
       else
 
24985
-       retarray->base_addr = xmalloc (alloc_size);
 
24986
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24987
     }
 
24988
   else
 
24989
     {
 
24990
Index: libgfortran/generated/maxval_i8.c
 
24991
===================================================================
 
24992
--- a/src/libgfortran/generated/maxval_i8.c     (.../tags/gcc_4_8_3_release)
 
24993
+++ b/src/libgfortran/generated/maxval_i8.c     (.../branches/gcc-4_8-branch)
 
24994
@@ -97,10 +97,9 @@
 
24995
       retarray->offset = 0;
 
24996
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24997
 
 
24998
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24999
-                  * extent[rank-1];
 
25000
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25001
 
 
25002
-      retarray->base_addr = xmalloc (alloc_size);
 
25003
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25004
       if (alloc_size == 0)
 
25005
        {
 
25006
          /* Make sure we have a zero-sized array.  */
 
25007
@@ -286,8 +285,7 @@
 
25008
 
 
25009
        }
 
25010
 
 
25011
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25012
-                  * extent[rank-1];
 
25013
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25014
 
 
25015
       retarray->offset = 0;
 
25016
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25017
@@ -299,7 +297,7 @@
 
25018
          return;
 
25019
        }
 
25020
       else
 
25021
-       retarray->base_addr = xmalloc (alloc_size);
 
25022
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25023
 
 
25024
     }
 
25025
   else
 
25026
@@ -472,8 +470,7 @@
 
25027
       retarray->offset = 0;
 
25028
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25029
 
 
25030
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25031
-                  * extent[rank-1];
 
25032
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25033
 
 
25034
       if (alloc_size == 0)
 
25035
        {
 
25036
@@ -482,7 +479,7 @@
 
25037
          return;
 
25038
        }
 
25039
       else
 
25040
-       retarray->base_addr = xmalloc (alloc_size);
 
25041
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25042
     }
 
25043
   else
 
25044
     {
 
25045
Index: libgfortran/generated/eoshift3_16.c
 
25046
===================================================================
 
25047
--- a/src/libgfortran/generated/eoshift3_16.c   (.../tags/gcc_4_8_3_release)
 
25048
+++ b/src/libgfortran/generated/eoshift3_16.c   (.../branches/gcc-4_8-branch)
 
25049
@@ -89,7 +89,7 @@
 
25050
     {
 
25051
       int i;
 
25052
 
 
25053
-      ret->base_addr = xmalloc (size * arraysize);
 
25054
+      ret->base_addr = xmallocarray (arraysize, size);
 
25055
       ret->offset = 0;
 
25056
       ret->dtype = array->dtype;
 
25057
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
25058
@@ -107,8 +107,8 @@
 
25059
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
25060
 
 
25061
         }
 
25062
-      /* xmalloc allocates a single byte for zero size.  */
 
25063
-      ret->base_addr = xmalloc (size * arraysize);
 
25064
+      /* xmallocarray allocates a single byte for zero size.  */
 
25065
+      ret->base_addr = xmallocarray (arraysize, size);
 
25066
 
 
25067
     }
 
25068
   else if (unlikely (compile_options.bounds_check))
 
25069
Index: libgfortran/generated/shape_i8.c
 
25070
===================================================================
 
25071
--- a/src/libgfortran/generated/shape_i8.c      (.../tags/gcc_4_8_3_release)
 
25072
+++ b/src/libgfortran/generated/shape_i8.c      (.../branches/gcc-4_8-branch)
 
25073
@@ -49,7 +49,7 @@
 
25074
     {
 
25075
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
25076
       ret->offset = 0;
 
25077
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25078
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25079
     }
 
25080
 
 
25081
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
25082
Index: libgfortran/generated/maxloc0_4_i16.c
 
25083
===================================================================
 
25084
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
25085
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
25086
@@ -58,7 +58,7 @@
 
25087
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25088
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25089
       retarray->offset = 0;
 
25090
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25091
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25092
     }
 
25093
   else
 
25094
     {
 
25095
@@ -199,7 +199,7 @@
 
25096
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
25097
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25098
       retarray->offset = 0;
 
25099
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25100
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25101
     }
 
25102
   else
 
25103
     {
 
25104
@@ -367,7 +367,7 @@
 
25105
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25106
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25107
       retarray->offset = 0;
 
25108
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25109
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25110
     }
 
25111
   else if (unlikely (compile_options.bounds_check))
 
25112
     {
 
25113
Index: libgfortran/generated/maxloc1_4_r10.c
 
25114
===================================================================
 
25115
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
25116
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
25117
@@ -98,10 +98,9 @@
 
25118
       retarray->offset = 0;
 
25119
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25120
 
 
25121
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25122
-                  * extent[rank-1];
 
25123
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25124
 
 
25125
-      retarray->base_addr = xmalloc (alloc_size);
 
25126
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
25127
       if (alloc_size == 0)
 
25128
        {
 
25129
          /* Make sure we have a zero-sized array.  */
 
25130
@@ -294,8 +293,7 @@
 
25131
 
 
25132
        }
 
25133
 
 
25134
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25135
-                  * extent[rank-1];
 
25136
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25137
 
 
25138
       retarray->offset = 0;
 
25139
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25140
@@ -307,7 +305,7 @@
 
25141
          return;
 
25142
        }
 
25143
       else
 
25144
-       retarray->base_addr = xmalloc (alloc_size);
 
25145
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
25146
 
 
25147
     }
 
25148
   else
 
25149
@@ -485,8 +483,7 @@
 
25150
       retarray->offset = 0;
 
25151
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25152
 
 
25153
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25154
-                  * extent[rank-1];
 
25155
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25156
 
 
25157
       if (alloc_size == 0)
 
25158
        {
 
25159
@@ -495,7 +492,7 @@
 
25160
          return;
 
25161
        }
 
25162
       else
 
25163
-       retarray->base_addr = xmalloc (alloc_size);
 
25164
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
25165
     }
 
25166
   else
 
25167
     {
 
25168
Index: libgfortran/generated/maxloc1_8_i16.c
 
25169
===================================================================
 
25170
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
25171
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
25172
@@ -98,10 +98,9 @@
 
25173
       retarray->offset = 0;
 
25174
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25175
 
 
25176
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25177
-                  * extent[rank-1];
 
25178
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25179
 
 
25180
-      retarray->base_addr = xmalloc (alloc_size);
 
25181
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25182
       if (alloc_size == 0)
 
25183
        {
 
25184
          /* Make sure we have a zero-sized array.  */
 
25185
@@ -294,8 +293,7 @@
 
25186
 
 
25187
        }
 
25188
 
 
25189
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25190
-                  * extent[rank-1];
 
25191
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25192
 
 
25193
       retarray->offset = 0;
 
25194
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25195
@@ -307,7 +305,7 @@
 
25196
          return;
 
25197
        }
 
25198
       else
 
25199
-       retarray->base_addr = xmalloc (alloc_size);
 
25200
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25201
 
 
25202
     }
 
25203
   else
 
25204
@@ -485,8 +483,7 @@
 
25205
       retarray->offset = 0;
 
25206
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25207
 
 
25208
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25209
-                  * extent[rank-1];
 
25210
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25211
 
 
25212
       if (alloc_size == 0)
 
25213
        {
 
25214
@@ -495,7 +492,7 @@
 
25215
          return;
 
25216
        }
 
25217
       else
 
25218
-       retarray->base_addr = xmalloc (alloc_size);
 
25219
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25220
     }
 
25221
   else
 
25222
     {
 
25223
Index: libgfortran/generated/minloc0_8_r10.c
 
25224
===================================================================
 
25225
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
25226
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
25227
@@ -58,7 +58,7 @@
 
25228
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25229
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25230
       retarray->offset = 0;
 
25231
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25232
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25233
     }
 
25234
   else
 
25235
     {
 
25236
@@ -199,7 +199,7 @@
 
25237
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
25238
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25239
       retarray->offset = 0;
 
25240
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25241
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25242
     }
 
25243
   else
 
25244
     {
 
25245
@@ -367,7 +367,7 @@
 
25246
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25247
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25248
       retarray->offset = 0;
 
25249
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25250
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25251
     }
 
25252
   else if (unlikely (compile_options.bounds_check))
 
25253
     {
 
25254
Index: libgfortran/generated/iparity_i2.c
 
25255
===================================================================
 
25256
--- a/src/libgfortran/generated/iparity_i2.c    (.../tags/gcc_4_8_3_release)
 
25257
+++ b/src/libgfortran/generated/iparity_i2.c    (.../branches/gcc-4_8-branch)
 
25258
@@ -97,10 +97,9 @@
 
25259
       retarray->offset = 0;
 
25260
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25261
 
 
25262
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25263
-                  * extent[rank-1];
 
25264
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25265
 
 
25266
-      retarray->base_addr = xmalloc (alloc_size);
 
25267
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
25268
       if (alloc_size == 0)
 
25269
        {
 
25270
          /* Make sure we have a zero-sized array.  */
 
25271
@@ -272,8 +271,7 @@
 
25272
 
 
25273
        }
 
25274
 
 
25275
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25276
-                  * extent[rank-1];
 
25277
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25278
 
 
25279
       retarray->offset = 0;
 
25280
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25281
@@ -285,7 +283,7 @@
 
25282
          return;
 
25283
        }
 
25284
       else
 
25285
-       retarray->base_addr = xmalloc (alloc_size);
 
25286
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
25287
 
 
25288
     }
 
25289
   else
 
25290
@@ -430,8 +428,7 @@
 
25291
       retarray->offset = 0;
 
25292
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25293
 
 
25294
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25295
-                  * extent[rank-1];
 
25296
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25297
 
 
25298
       if (alloc_size == 0)
 
25299
        {
 
25300
@@ -440,7 +437,7 @@
 
25301
          return;
 
25302
        }
 
25303
       else
 
25304
-       retarray->base_addr = xmalloc (alloc_size);
 
25305
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
25306
     }
 
25307
   else
 
25308
     {
 
25309
Index: libgfortran/generated/maxloc1_16_r4.c
 
25310
===================================================================
 
25311
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
25312
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
25313
@@ -98,10 +98,9 @@
 
25314
       retarray->offset = 0;
 
25315
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25316
 
 
25317
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25318
-                  * extent[rank-1];
 
25319
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25320
 
 
25321
-      retarray->base_addr = xmalloc (alloc_size);
 
25322
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25323
       if (alloc_size == 0)
 
25324
        {
 
25325
          /* Make sure we have a zero-sized array.  */
 
25326
@@ -294,8 +293,7 @@
 
25327
 
 
25328
        }
 
25329
 
 
25330
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25331
-                  * extent[rank-1];
 
25332
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25333
 
 
25334
       retarray->offset = 0;
 
25335
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25336
@@ -307,7 +305,7 @@
 
25337
          return;
 
25338
        }
 
25339
       else
 
25340
-       retarray->base_addr = xmalloc (alloc_size);
 
25341
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25342
 
 
25343
     }
 
25344
   else
 
25345
@@ -485,8 +483,7 @@
 
25346
       retarray->offset = 0;
 
25347
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25348
 
 
25349
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25350
-                  * extent[rank-1];
 
25351
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25352
 
 
25353
       if (alloc_size == 0)
 
25354
        {
 
25355
@@ -495,7 +492,7 @@
 
25356
          return;
 
25357
        }
 
25358
       else
 
25359
-       retarray->base_addr = xmalloc (alloc_size);
 
25360
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25361
     }
 
25362
   else
 
25363
     {
 
25364
Index: libgfortran/generated/maxloc0_16_r8.c
 
25365
===================================================================
 
25366
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
25367
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
25368
@@ -58,7 +58,7 @@
 
25369
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25370
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25371
       retarray->offset = 0;
 
25372
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
25373
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
25374
     }
 
25375
   else
 
25376
     {
 
25377
@@ -199,7 +199,7 @@
 
25378
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
25379
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25380
       retarray->offset = 0;
 
25381
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
25382
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
25383
     }
 
25384
   else
 
25385
     {
 
25386
@@ -367,7 +367,7 @@
 
25387
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25388
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25389
       retarray->offset = 0;
 
25390
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
25391
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
25392
     }
 
25393
   else if (unlikely (compile_options.bounds_check))
 
25394
     {
 
25395
Index: libgfortran/generated/sum_i16.c
 
25396
===================================================================
 
25397
--- a/src/libgfortran/generated/sum_i16.c       (.../tags/gcc_4_8_3_release)
 
25398
+++ b/src/libgfortran/generated/sum_i16.c       (.../branches/gcc-4_8-branch)
 
25399
@@ -97,10 +97,9 @@
 
25400
       retarray->offset = 0;
 
25401
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25402
 
 
25403
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25404
-                  * extent[rank-1];
 
25405
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25406
 
 
25407
-      retarray->base_addr = xmalloc (alloc_size);
 
25408
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25409
       if (alloc_size == 0)
 
25410
        {
 
25411
          /* Make sure we have a zero-sized array.  */
 
25412
@@ -272,8 +271,7 @@
 
25413
 
 
25414
        }
 
25415
 
 
25416
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25417
-                  * extent[rank-1];
 
25418
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25419
 
 
25420
       retarray->offset = 0;
 
25421
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25422
@@ -285,7 +283,7 @@
 
25423
          return;
 
25424
        }
 
25425
       else
 
25426
-       retarray->base_addr = xmalloc (alloc_size);
 
25427
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25428
 
 
25429
     }
 
25430
   else
 
25431
@@ -430,8 +428,7 @@
 
25432
       retarray->offset = 0;
 
25433
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25434
 
 
25435
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25436
-                  * extent[rank-1];
 
25437
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25438
 
 
25439
       if (alloc_size == 0)
 
25440
        {
 
25441
@@ -440,7 +437,7 @@
 
25442
          return;
 
25443
        }
 
25444
       else
 
25445
-       retarray->base_addr = xmalloc (alloc_size);
 
25446
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25447
     }
 
25448
   else
 
25449
     {
 
25450
Index: libgfortran/generated/maxloc0_4_i8.c
 
25451
===================================================================
 
25452
--- a/src/libgfortran/generated/maxloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
25453
+++ b/src/libgfortran/generated/maxloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
25454
@@ -58,7 +58,7 @@
 
25455
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25456
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25457
       retarray->offset = 0;
 
25458
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25459
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25460
     }
 
25461
   else
 
25462
     {
 
25463
@@ -199,7 +199,7 @@
 
25464
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
25465
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25466
       retarray->offset = 0;
 
25467
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25468
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25469
     }
 
25470
   else
 
25471
     {
 
25472
@@ -367,7 +367,7 @@
 
25473
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25474
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25475
       retarray->offset = 0;
 
25476
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
25477
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
25478
     }
 
25479
   else if (unlikely (compile_options.bounds_check))
 
25480
     {
 
25481
Index: libgfortran/generated/pack_c16.c
 
25482
===================================================================
 
25483
--- a/src/libgfortran/generated/pack_c16.c      (.../tags/gcc_4_8_3_release)
 
25484
+++ b/src/libgfortran/generated/pack_c16.c      (.../branches/gcc-4_8-branch)
 
25485
@@ -167,8 +167,8 @@
 
25486
 
 
25487
          ret->offset = 0;
 
25488
 
 
25489
-         /* xmalloc allocates a single byte for zero size.  */
 
25490
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
 
25491
+         /* xmallocarray allocates a single byte for zero size.  */
 
25492
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
 
25493
 
 
25494
          if (total == 0)
 
25495
            return;
 
25496
Index: libgfortran/generated/maxloc1_16_i16.c
 
25497
===================================================================
 
25498
--- a/src/libgfortran/generated/maxloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
25499
+++ b/src/libgfortran/generated/maxloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
25500
@@ -98,10 +98,9 @@
 
25501
       retarray->offset = 0;
 
25502
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25503
 
 
25504
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25505
-                  * extent[rank-1];
 
25506
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25507
 
 
25508
-      retarray->base_addr = xmalloc (alloc_size);
 
25509
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25510
       if (alloc_size == 0)
 
25511
        {
 
25512
          /* Make sure we have a zero-sized array.  */
 
25513
@@ -294,8 +293,7 @@
 
25514
 
 
25515
        }
 
25516
 
 
25517
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25518
-                  * extent[rank-1];
 
25519
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25520
 
 
25521
       retarray->offset = 0;
 
25522
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25523
@@ -307,7 +305,7 @@
 
25524
          return;
 
25525
        }
 
25526
       else
 
25527
-       retarray->base_addr = xmalloc (alloc_size);
 
25528
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25529
 
 
25530
     }
 
25531
   else
 
25532
@@ -485,8 +483,7 @@
 
25533
       retarray->offset = 0;
 
25534
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25535
 
 
25536
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25537
-                  * extent[rank-1];
 
25538
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25539
 
 
25540
       if (alloc_size == 0)
 
25541
        {
 
25542
@@ -495,7 +492,7 @@
 
25543
          return;
 
25544
        }
 
25545
       else
 
25546
-       retarray->base_addr = xmalloc (alloc_size);
 
25547
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25548
     }
 
25549
   else
 
25550
     {
 
25551
Index: libgfortran/generated/minloc1_8_r4.c
 
25552
===================================================================
 
25553
--- a/src/libgfortran/generated/minloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
25554
+++ b/src/libgfortran/generated/minloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
25555
@@ -98,10 +98,9 @@
 
25556
       retarray->offset = 0;
 
25557
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25558
 
 
25559
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25560
-                  * extent[rank-1];
 
25561
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25562
 
 
25563
-      retarray->base_addr = xmalloc (alloc_size);
 
25564
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25565
       if (alloc_size == 0)
 
25566
        {
 
25567
          /* Make sure we have a zero-sized array.  */
 
25568
@@ -294,8 +293,7 @@
 
25569
 
 
25570
        }
 
25571
 
 
25572
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25573
-                  * extent[rank-1];
 
25574
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25575
 
 
25576
       retarray->offset = 0;
 
25577
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25578
@@ -307,7 +305,7 @@
 
25579
          return;
 
25580
        }
 
25581
       else
 
25582
-       retarray->base_addr = xmalloc (alloc_size);
 
25583
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25584
 
 
25585
     }
 
25586
   else
 
25587
@@ -485,8 +483,7 @@
 
25588
       retarray->offset = 0;
 
25589
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25590
 
 
25591
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25592
-                  * extent[rank-1];
 
25593
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25594
 
 
25595
       if (alloc_size == 0)
 
25596
        {
 
25597
@@ -495,7 +492,7 @@
 
25598
          return;
 
25599
        }
 
25600
       else
 
25601
-       retarray->base_addr = xmalloc (alloc_size);
 
25602
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25603
     }
 
25604
   else
 
25605
     {
 
25606
Index: libgfortran/generated/sum_c8.c
 
25607
===================================================================
 
25608
--- a/src/libgfortran/generated/sum_c8.c        (.../tags/gcc_4_8_3_release)
 
25609
+++ b/src/libgfortran/generated/sum_c8.c        (.../branches/gcc-4_8-branch)
 
25610
@@ -97,10 +97,9 @@
 
25611
       retarray->offset = 0;
 
25612
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25613
 
 
25614
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25615
-                  * extent[rank-1];
 
25616
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25617
 
 
25618
-      retarray->base_addr = xmalloc (alloc_size);
 
25619
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
25620
       if (alloc_size == 0)
 
25621
        {
 
25622
          /* Make sure we have a zero-sized array.  */
 
25623
@@ -272,8 +271,7 @@
 
25624
 
 
25625
        }
 
25626
 
 
25627
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25628
-                  * extent[rank-1];
 
25629
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25630
 
 
25631
       retarray->offset = 0;
 
25632
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25633
@@ -285,7 +283,7 @@
 
25634
          return;
 
25635
        }
 
25636
       else
 
25637
-       retarray->base_addr = xmalloc (alloc_size);
 
25638
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
25639
 
 
25640
     }
 
25641
   else
 
25642
@@ -430,8 +428,7 @@
 
25643
       retarray->offset = 0;
 
25644
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25645
 
 
25646
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25647
-                  * extent[rank-1];
 
25648
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25649
 
 
25650
       if (alloc_size == 0)
 
25651
        {
 
25652
@@ -440,7 +437,7 @@
 
25653
          return;
 
25654
        }
 
25655
       else
 
25656
-       retarray->base_addr = xmalloc (alloc_size);
 
25657
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
25658
     }
 
25659
   else
 
25660
     {
 
25661
Index: libgfortran/generated/maxloc1_16_i2.c
 
25662
===================================================================
 
25663
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
25664
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
25665
@@ -98,10 +98,9 @@
 
25666
       retarray->offset = 0;
 
25667
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25668
 
 
25669
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25670
-                  * extent[rank-1];
 
25671
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25672
 
 
25673
-      retarray->base_addr = xmalloc (alloc_size);
 
25674
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25675
       if (alloc_size == 0)
 
25676
        {
 
25677
          /* Make sure we have a zero-sized array.  */
 
25678
@@ -294,8 +293,7 @@
 
25679
 
 
25680
        }
 
25681
 
 
25682
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25683
-                  * extent[rank-1];
 
25684
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25685
 
 
25686
       retarray->offset = 0;
 
25687
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25688
@@ -307,7 +305,7 @@
 
25689
          return;
 
25690
        }
 
25691
       else
 
25692
-       retarray->base_addr = xmalloc (alloc_size);
 
25693
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25694
 
 
25695
     }
 
25696
   else
 
25697
@@ -485,8 +483,7 @@
 
25698
       retarray->offset = 0;
 
25699
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25700
 
 
25701
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25702
-                  * extent[rank-1];
 
25703
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25704
 
 
25705
       if (alloc_size == 0)
 
25706
        {
 
25707
@@ -495,7 +492,7 @@
 
25708
          return;
 
25709
        }
 
25710
       else
 
25711
-       retarray->base_addr = xmalloc (alloc_size);
 
25712
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25713
     }
 
25714
   else
 
25715
     {
 
25716
Index: libgfortran/generated/parity_l1.c
 
25717
===================================================================
 
25718
--- a/src/libgfortran/generated/parity_l1.c     (.../tags/gcc_4_8_3_release)
 
25719
+++ b/src/libgfortran/generated/parity_l1.c     (.../branches/gcc-4_8-branch)
 
25720
@@ -98,10 +98,9 @@
 
25721
       retarray->offset = 0;
 
25722
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25723
 
 
25724
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25725
-                  * extent[rank-1];
 
25726
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25727
 
 
25728
-      retarray->base_addr = xmalloc (alloc_size);
 
25729
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
25730
       if (alloc_size == 0)
 
25731
        {
 
25732
          /* Make sure we have a zero-sized array.  */
 
25733
Index: libgfortran/generated/maxval_i16.c
 
25734
===================================================================
 
25735
--- a/src/libgfortran/generated/maxval_i16.c    (.../tags/gcc_4_8_3_release)
 
25736
+++ b/src/libgfortran/generated/maxval_i16.c    (.../branches/gcc-4_8-branch)
 
25737
@@ -97,10 +97,9 @@
 
25738
       retarray->offset = 0;
 
25739
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25740
 
 
25741
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25742
-                  * extent[rank-1];
 
25743
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25744
 
 
25745
-      retarray->base_addr = xmalloc (alloc_size);
 
25746
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25747
       if (alloc_size == 0)
 
25748
        {
 
25749
          /* Make sure we have a zero-sized array.  */
 
25750
@@ -286,8 +285,7 @@
 
25751
 
 
25752
        }
 
25753
 
 
25754
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25755
-                  * extent[rank-1];
 
25756
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25757
 
 
25758
       retarray->offset = 0;
 
25759
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25760
@@ -299,7 +297,7 @@
 
25761
          return;
 
25762
        }
 
25763
       else
 
25764
-       retarray->base_addr = xmalloc (alloc_size);
 
25765
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25766
 
 
25767
     }
 
25768
   else
 
25769
@@ -472,8 +470,7 @@
 
25770
       retarray->offset = 0;
 
25771
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25772
 
 
25773
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25774
-                  * extent[rank-1];
 
25775
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25776
 
 
25777
       if (alloc_size == 0)
 
25778
        {
 
25779
@@ -482,7 +479,7 @@
 
25780
          return;
 
25781
        }
 
25782
       else
 
25783
-       retarray->base_addr = xmalloc (alloc_size);
 
25784
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
25785
     }
 
25786
   else
 
25787
     {
 
25788
Index: libgfortran/generated/spread_c8.c
 
25789
===================================================================
 
25790
--- a/src/libgfortran/generated/spread_c8.c     (.../tags/gcc_4_8_3_release)
 
25791
+++ b/src/libgfortran/generated/spread_c8.c     (.../branches/gcc-4_8-branch)
 
25792
@@ -101,8 +101,8 @@
 
25793
        }
 
25794
       ret->offset = 0;
 
25795
 
 
25796
-      /* xmalloc allocates a single byte for zero size.  */
 
25797
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
 
25798
+      /* xmallocarray allocates a single byte for zero size.  */
 
25799
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
 
25800
       if (rs <= 0)
 
25801
         return;
 
25802
     }
 
25803
@@ -244,7 +244,7 @@
 
25804
 
 
25805
   if (ret->base_addr == NULL)
 
25806
     {
 
25807
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
 
25808
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
 
25809
       ret->offset = 0;
 
25810
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
25811
     }
 
25812
Index: libgfortran/generated/matmul_i16.c
 
25813
===================================================================
 
25814
--- a/src/libgfortran/generated/matmul_i16.c    (.../tags/gcc_4_8_3_release)
 
25815
+++ b/src/libgfortran/generated/matmul_i16.c    (.../branches/gcc-4_8-branch)
 
25816
@@ -124,7 +124,7 @@
 
25817
         }
 
25818
 
 
25819
       retarray->base_addr
 
25820
-       = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
 
25821
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
 
25822
       retarray->offset = 0;
 
25823
     }
 
25824
     else if (unlikely (compile_options.bounds_check))
 
25825
Index: libgfortran/generated/pack_i8.c
 
25826
===================================================================
 
25827
--- a/src/libgfortran/generated/pack_i8.c       (.../tags/gcc_4_8_3_release)
 
25828
+++ b/src/libgfortran/generated/pack_i8.c       (.../branches/gcc-4_8-branch)
 
25829
@@ -167,8 +167,8 @@
 
25830
 
 
25831
          ret->offset = 0;
 
25832
 
 
25833
-         /* xmalloc allocates a single byte for zero size.  */
 
25834
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
 
25835
+         /* xmallocarray allocates a single byte for zero size.  */
 
25836
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
 
25837
 
 
25838
          if (total == 0)
 
25839
            return;
 
25840
Index: libgfortran/generated/any_l1.c
 
25841
===================================================================
 
25842
--- a/src/libgfortran/generated/any_l1.c        (.../tags/gcc_4_8_3_release)
 
25843
+++ b/src/libgfortran/generated/any_l1.c        (.../branches/gcc-4_8-branch)
 
25844
@@ -101,8 +101,7 @@
 
25845
       retarray->offset = 0;
 
25846
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25847
 
 
25848
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25849
-                  * extent[rank-1];
 
25850
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25851
 
 
25852
       if (alloc_size == 0)
 
25853
        {
 
25854
@@ -111,7 +110,7 @@
 
25855
          return;
 
25856
        }
 
25857
       else
 
25858
-       retarray->base_addr = xmalloc (alloc_size);
 
25859
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
25860
     }
 
25861
   else
 
25862
     {
 
25863
Index: libgfortran/generated/minloc1_8_i2.c
 
25864
===================================================================
 
25865
--- a/src/libgfortran/generated/minloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
25866
+++ b/src/libgfortran/generated/minloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
25867
@@ -98,10 +98,9 @@
 
25868
       retarray->offset = 0;
 
25869
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25870
 
 
25871
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25872
-                  * extent[rank-1];
 
25873
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25874
 
 
25875
-      retarray->base_addr = xmalloc (alloc_size);
 
25876
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25877
       if (alloc_size == 0)
 
25878
        {
 
25879
          /* Make sure we have a zero-sized array.  */
 
25880
@@ -294,8 +293,7 @@
 
25881
 
 
25882
        }
 
25883
 
 
25884
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25885
-                  * extent[rank-1];
 
25886
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25887
 
 
25888
       retarray->offset = 0;
 
25889
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25890
@@ -307,7 +305,7 @@
 
25891
          return;
 
25892
        }
 
25893
       else
 
25894
-       retarray->base_addr = xmalloc (alloc_size);
 
25895
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25896
 
 
25897
     }
 
25898
   else
 
25899
@@ -485,8 +483,7 @@
 
25900
       retarray->offset = 0;
 
25901
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25902
 
 
25903
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25904
-                  * extent[rank-1];
 
25905
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25906
 
 
25907
       if (alloc_size == 0)
 
25908
        {
 
25909
@@ -495,7 +492,7 @@
 
25910
          return;
 
25911
        }
 
25912
       else
 
25913
-       retarray->base_addr = xmalloc (alloc_size);
 
25914
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
25915
     }
 
25916
   else
 
25917
     {
 
25918
Index: libgfortran/generated/minloc0_8_r8.c
 
25919
===================================================================
 
25920
--- a/src/libgfortran/generated/minloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
25921
+++ b/src/libgfortran/generated/minloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
25922
@@ -58,7 +58,7 @@
 
25923
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25924
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25925
       retarray->offset = 0;
 
25926
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25927
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25928
     }
 
25929
   else
 
25930
     {
 
25931
@@ -199,7 +199,7 @@
 
25932
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
25933
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25934
       retarray->offset = 0;
 
25935
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25936
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25937
     }
 
25938
   else
 
25939
     {
 
25940
@@ -367,7 +367,7 @@
 
25941
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
25942
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
25943
       retarray->offset = 0;
 
25944
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
25945
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
25946
     }
 
25947
   else if (unlikely (compile_options.bounds_check))
 
25948
     {
 
25949
Index: libgfortran/generated/matmul_l8.c
 
25950
===================================================================
 
25951
--- a/src/libgfortran/generated/matmul_l8.c     (.../tags/gcc_4_8_3_release)
 
25952
+++ b/src/libgfortran/generated/matmul_l8.c     (.../branches/gcc-4_8-branch)
 
25953
@@ -88,7 +88,7 @@
 
25954
         }
 
25955
           
 
25956
       retarray->base_addr
 
25957
-       = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
 
25958
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
 
25959
       retarray->offset = 0;
 
25960
     }
 
25961
     else if (unlikely (compile_options.bounds_check))
 
25962
Index: libgfortran/generated/product_r10.c
 
25963
===================================================================
 
25964
--- a/src/libgfortran/generated/product_r10.c   (.../tags/gcc_4_8_3_release)
 
25965
+++ b/src/libgfortran/generated/product_r10.c   (.../branches/gcc-4_8-branch)
 
25966
@@ -97,10 +97,9 @@
 
25967
       retarray->offset = 0;
 
25968
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25969
 
 
25970
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25971
-                  * extent[rank-1];
 
25972
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25973
 
 
25974
-      retarray->base_addr = xmalloc (alloc_size);
 
25975
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
25976
       if (alloc_size == 0)
 
25977
        {
 
25978
          /* Make sure we have a zero-sized array.  */
 
25979
@@ -272,8 +271,7 @@
 
25980
 
 
25981
        }
 
25982
 
 
25983
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25984
-                  * extent[rank-1];
 
25985
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25986
 
 
25987
       retarray->offset = 0;
 
25988
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25989
@@ -285,7 +283,7 @@
 
25990
          return;
 
25991
        }
 
25992
       else
 
25993
-       retarray->base_addr = xmalloc (alloc_size);
 
25994
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
25995
 
 
25996
     }
 
25997
   else
 
25998
@@ -430,8 +428,7 @@
 
25999
       retarray->offset = 0;
 
26000
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
26001
 
 
26002
-      alloc_size = sizeof (GFC_REAL_10) * 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
@@ -440,7 +437,7 @@
 
26009
          return;
 
26010
        }
 
26011
       else
 
26012
-       retarray->base_addr = xmalloc (alloc_size);
 
26013
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
26014
     }
 
26015
   else
 
26016
     {
 
26017
Index: libgfortran/generated/product_i1.c
 
26018
===================================================================
 
26019
--- a/src/libgfortran/generated/product_i1.c    (.../tags/gcc_4_8_3_release)
 
26020
+++ b/src/libgfortran/generated/product_i1.c    (.../branches/gcc-4_8-branch)
 
26021
@@ -97,10 +97,9 @@
 
26022
       retarray->offset = 0;
 
26023
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
26024
 
 
26025
-      alloc_size = sizeof (GFC_INTEGER_1) * 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_1));
 
26031
       if (alloc_size == 0)
 
26032
        {
 
26033
          /* Make sure we have a zero-sized array.  */
 
26034
@@ -272,8 +271,7 @@
 
26035
 
 
26036
        }
 
26037
 
 
26038
-      alloc_size = sizeof (GFC_INTEGER_1) * 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
@@ -285,7 +283,7 @@
 
26045
          return;
 
26046
        }
 
26047
       else
 
26048
-       retarray->base_addr = xmalloc (alloc_size);
 
26049
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
26050
 
 
26051
     }
 
26052
   else
 
26053
@@ -430,8 +428,7 @@
 
26054
       retarray->offset = 0;
 
26055
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
26056
 
 
26057
-      alloc_size = sizeof (GFC_INTEGER_1) * 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
@@ -440,7 +437,7 @@
 
26064
          return;
 
26065
        }
 
26066
       else
 
26067
-       retarray->base_addr = xmalloc (alloc_size);
 
26068
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
26069
     }
 
26070
   else
 
26071
     {
 
26072
Index: libgfortran/generated/all_l8.c
 
26073
===================================================================
 
26074
--- a/src/libgfortran/generated/all_l8.c        (.../tags/gcc_4_8_3_release)
 
26075
+++ b/src/libgfortran/generated/all_l8.c        (.../branches/gcc-4_8-branch)
 
26076
@@ -101,8 +101,7 @@
 
26077
       retarray->offset = 0;
 
26078
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
26079
 
 
26080
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
26081
-                  * extent[rank-1];
 
26082
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
26083
 
 
26084
       if (alloc_size == 0)
 
26085
        {
 
26086
@@ -111,7 +110,7 @@
 
26087
          return;
 
26088
        }
 
26089
       else
 
26090
-       retarray->base_addr = xmalloc (alloc_size);
 
26091
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
26092
     }
 
26093
   else
 
26094
     {
 
26095
Index: libgfortran/generated/in_pack_r16.c
 
26096
===================================================================
 
26097
--- a/src/libgfortran/generated/in_pack_r16.c   (.../tags/gcc_4_8_3_release)
 
26098
+++ b/src/libgfortran/generated/in_pack_r16.c   (.../branches/gcc-4_8-branch)
 
26099
@@ -76,7 +76,7 @@
 
26100
     return source->base_addr;
 
26101
 
 
26102
   /* Allocate storage for the destination.  */
 
26103
-  destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
 
26104
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
 
26105
   dest = destptr;
 
26106
   src = source->base_addr;
 
26107
   stride0 = stride[0];
 
26108
Index: libgfortran/generated/in_pack_i1.c
 
26109
===================================================================
 
26110
--- a/src/libgfortran/generated/in_pack_i1.c    (.../tags/gcc_4_8_3_release)
 
26111
+++ b/src/libgfortran/generated/in_pack_i1.c    (.../branches/gcc-4_8-branch)
 
26112
@@ -76,7 +76,7 @@
 
26113
     return source->base_addr;
 
26114
 
 
26115
   /* Allocate storage for the destination.  */
 
26116
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
 
26117
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
 
26118
   dest = destptr;
 
26119
   src = source->base_addr;
 
26120
   stride0 = stride[0];
 
26121
Index: libgfortran/libgfortran.h
 
26122
===================================================================
 
26123
--- a/src/libgfortran/libgfortran.h     (.../tags/gcc_4_8_3_release)
 
26124
+++ b/src/libgfortran/libgfortran.h     (.../branches/gcc-4_8-branch)
 
26125
@@ -751,6 +751,9 @@
 
26126
 extern void *xmalloc (size_t) __attribute__ ((malloc));
 
26127
 internal_proto(xmalloc);
 
26128
 
 
26129
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
 
26130
+internal_proto(xmallocarray);
 
26131
+
 
26132
 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
 
26133
 internal_proto(xcalloc);
 
26134
 
 
26135
Index: libgfortran/config.h.in
 
26136
===================================================================
 
26137
--- a/src/libgfortran/config.h.in       (.../tags/gcc_4_8_3_release)
 
26138
+++ b/src/libgfortran/config.h.in       (.../branches/gcc-4_8-branch)
 
26139
@@ -711,6 +711,9 @@
 
26140
 /* Define to 1 if you have the `strtof' function. */
 
26141
 #undef HAVE_STRTOF
 
26142
 
 
26143
+/* Define to 1 if you have the `strtok_r' function. */
 
26144
+#undef HAVE_STRTOK_R
 
26145
+
 
26146
 /* Define to 1 if you have the `strtold' function. */
 
26147
 #undef HAVE_STRTOLD
 
26148
 
 
26149
Index: libgfortran/io/list_read.c
 
26150
===================================================================
 
26151
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_8_3_release)
 
26152
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_8-branch)
 
26153
@@ -2354,7 +2354,7 @@
 
26154
 {
 
26155
   index_type len = strlen (nl->var_name) + 1;
 
26156
   int dim;
 
26157
-  char * ext_name = (char*)xmalloc (len + 1);
 
26158
+  char * ext_name = xmalloc (len + 1);
 
26159
   memcpy (ext_name, nl->var_name, len-1);
 
26160
   memcpy (ext_name + len - 1, "%", 2);
 
26161
   for (nl = nl->next; nl; nl = nl->next)
 
26162
Index: libgfortran/io/unit.c
 
26163
===================================================================
 
26164
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
 
26165
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
 
26166
@@ -455,7 +455,7 @@
 
26167
     {
 
26168
       iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
 
26169
       iunit->ls = (array_loop_spec *)
 
26170
-       xmalloc (iunit->rank * sizeof (array_loop_spec));
 
26171
+       xmallocarray (iunit->rank, sizeof (array_loop_spec));
 
26172
       dtp->internal_unit_len *=
 
26173
        init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
 
26174
 
 
26175
Index: libgfortran/io/unix.c
 
26176
===================================================================
 
26177
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
 
26178
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
 
26179
@@ -407,7 +407,9 @@
 
26180
 {
 
26181
   int retval;
 
26182
   
 
26183
-  if (s->fd != STDOUT_FILENO
 
26184
+  if (s->fd == -1)
 
26185
+    retval = -1;
 
26186
+  else if (s->fd != STDOUT_FILENO
 
26187
       && s->fd != STDERR_FILENO
 
26188
       && s->fd != STDIN_FILENO)
 
26189
     retval = close (s->fd);
 
26190
@@ -983,7 +985,15 @@
 
26191
 
 
26192
   /* Get the current length of the file. */
 
26193
 
 
26194
-  fstat (fd, &statbuf);
 
26195
+  if (fstat (fd, &statbuf) == -1)
 
26196
+    {
 
26197
+      s->st_dev = s->st_ino = -1;
 
26198
+      s->file_length = 0;
 
26199
+      if (errno == EBADF)
 
26200
+       s->fd = -1;
 
26201
+      raw_init (s);
 
26202
+      return (stream *) s;
 
26203
+    }
 
26204
 
 
26205
   s->st_dev = statbuf.st_dev;
 
26206
   s->st_ino = statbuf.st_ino;
 
26207
Index: libgfortran/io/transfer.c
 
26208
===================================================================
 
26209
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_8_3_release)
 
26210
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_8-branch)
 
26211
@@ -3776,9 +3776,9 @@
 
26212
   if (nml->var_rank > 0)
 
26213
     {
 
26214
       nml->dim = (descriptor_dimension*)
 
26215
-                  xmalloc (nml->var_rank * sizeof (descriptor_dimension));
 
26216
+       xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
 
26217
       nml->ls = (array_loop_spec*)
 
26218
-                 xmalloc (nml->var_rank * sizeof (array_loop_spec));
 
26219
+       xmallocarray (nml->var_rank, sizeof (array_loop_spec));
 
26220
     }
 
26221
   else
 
26222
     {
 
26223
Index: libgfortran/io/write.c
 
26224
===================================================================
 
26225
--- a/src/libgfortran/io/write.c        (.../tags/gcc_4_8_3_release)
 
26226
+++ b/src/libgfortran/io/write.c        (.../branches/gcc-4_8-branch)
 
26227
@@ -1863,7 +1863,7 @@
 
26228
              base_var_name_len = base ? strlen (base->var_name) : 0;
 
26229
              ext_name_len = base_name_len + base_var_name_len 
 
26230
                + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
 
26231
-             ext_name = (char*)xmalloc (ext_name_len);
 
26232
+             ext_name = xmalloc (ext_name_len);
 
26233
 
 
26234
              memcpy (ext_name, base_name, base_name_len);
 
26235
              clen = strlen (obj->var_name + base_var_name_len);
 
26236
@@ -1892,7 +1892,7 @@
 
26237
              /* Now obj_name.  */
 
26238
 
 
26239
              obj_name_len = strlen (obj->var_name) + 1;
 
26240
-             obj_name = xmalloc (obj_name_len+1);
 
26241
+             obj_name = xmalloc (obj_name_len + 1);
 
26242
              memcpy (obj_name, obj->var_name, obj_name_len-1);
 
26243
              memcpy (obj_name + obj_name_len-1, "%", 2);
 
26244
 
 
26245
Index: Makefile.def
 
26246
===================================================================
 
26247
--- a/src/Makefile.def  (.../tags/gcc_4_8_3_release)
 
26248
+++ b/src/Makefile.def  (.../branches/gcc-4_8-branch)
 
26249
@@ -292,6 +292,10 @@
 
26250
 // Host modules specific to gcc.
 
26251
 dependencies = { module=configure-gcc; on=configure-intl; };
 
26252
 dependencies = { module=configure-gcc; on=all-gmp; };
 
26253
+dependencies = { module=configure-gcc; on=all-mpfr; };
 
26254
+dependencies = { module=configure-gcc; on=all-mpc; };
 
26255
+dependencies = { module=configure-gcc; on=all-isl; };
 
26256
+dependencies = { module=configure-gcc; on=all-cloog; };
 
26257
 dependencies = { module=configure-gcc; on=all-lto-plugin; };
 
26258
 dependencies = { module=configure-gcc; on=all-binutils; };
 
26259
 dependencies = { module=configure-gcc; on=all-gas; };
 
26260
Index: libada/Makefile.in
 
26261
===================================================================
 
26262
--- a/src/libada/Makefile.in    (.../tags/gcc_4_8_3_release)
 
26263
+++ b/src/libada/Makefile.in    (.../branches/gcc-4_8-branch)
 
26264
@@ -60,7 +60,7 @@
 
26265
 PICFLAG = @PICFLAG@
 
26266
 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
 
26267
 GNATLIBCFLAGS= -g -O2
 
26268
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
 
26269
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
 
26270
        -fexceptions -DIN_RTS @have_getipinfo@
 
26271
 
 
26272
 host_subdir = @host_subdir@
 
26273
Index: libada/ChangeLog
 
26274
===================================================================
 
26275
--- a/src/libada/ChangeLog      (.../tags/gcc_4_8_3_release)
 
26276
+++ b/src/libada/ChangeLog      (.../branches/gcc-4_8-branch)
 
26277
@@ -1,3 +1,7 @@
 
26278
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
26279
+
 
26280
+       * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
 
26281
+
 
26282
 2014-05-22  Release Manager
 
26283
 
 
26284
        * GCC 4.8.3 released.
 
26285
Index: libffi/src/powerpc/linux64_closure.S
 
26286
===================================================================
 
26287
--- a/src/libffi/src/powerpc/linux64_closure.S  (.../tags/gcc_4_8_3_release)
 
26288
+++ b/src/libffi/src/powerpc/linux64_closure.S  (.../branches/gcc-4_8-branch)
 
26289
@@ -381,7 +381,8 @@
 
26290
        .align 3
 
26291
 .LEFDE1:
 
26292
 
 
26293
-# if defined __ELF__ && defined __linux__
 
26294
+#endif
 
26295
+
 
26296
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
26297
        .section        .note.GNU-stack,"",@progbits
 
26298
-# endif
 
26299
 #endif
 
26300
Index: libffi/src/powerpc/linux64.S
 
26301
===================================================================
 
26302
--- a/src/libffi/src/powerpc/linux64.S  (.../tags/gcc_4_8_3_release)
 
26303
+++ b/src/libffi/src/powerpc/linux64.S  (.../branches/gcc-4_8-branch)
 
26304
@@ -254,7 +254,8 @@
 
26305
        .align 3
 
26306
 .LEFDE1:
 
26307
 
 
26308
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
26309
+#endif
 
26310
+
 
26311
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
26312
        .section        .note.GNU-stack,"",@progbits
 
26313
-# endif
 
26314
 #endif
 
26315
Index: libffi/ChangeLog
 
26316
===================================================================
 
26317
--- a/src/libffi/ChangeLog      (.../tags/gcc_4_8_3_release)
 
26318
+++ b/src/libffi/ChangeLog      (.../branches/gcc-4_8-branch)
 
26319
@@ -1,3 +1,9 @@
 
26320
+2014-09-11  Jakub Jelinek  <jakub@redhat.com>
 
26321
+
 
26322
+       * src/powerpc/linux64.S: Emit .note.GNU-stack even when
 
26323
+       POWERPC64 is not defined.
 
26324
+       * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.
 
26325
+
 
26326
 2014-05-22  Release Manager
 
26327
 
 
26328
        * GCC 4.8.3 released.
 
26329
Index: libcpp/line-map.c
 
26330
===================================================================
 
26331
--- a/src/libcpp/line-map.c     (.../tags/gcc_4_8_3_release)
 
26332
+++ b/src/libcpp/line-map.c     (.../branches/gcc-4_8-branch)
 
26333
@@ -527,10 +527,10 @@
 
26334
          && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
 
26335
       || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
 
26336
       || (max_column_hint <= 80
 
26337
-         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
 
26338
-    {
 
26339
-      add_map = true;
 
26340
-    }
 
26341
+         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
 
26342
+      || (highest > 0x60000000
 
26343
+         && (set->max_column_hint || highest > 0x70000000)))
 
26344
+    add_map = true;
 
26345
   else
 
26346
     max_column_hint = set->max_column_hint;
 
26347
   if (add_map)
 
26348
@@ -541,7 +541,7 @@
 
26349
          /* If the column number is ridiculous or we've allocated a huge
 
26350
             number of source_locations, give up on column numbers. */
 
26351
          max_column_hint = 0;
 
26352
-         if (highest >0x70000000)
 
26353
+         if (highest > 0x70000000)
 
26354
            return 0;
 
26355
          column_bits = 0;
 
26356
        }
 
26357
Index: libcpp/ChangeLog
 
26358
===================================================================
 
26359
--- a/src/libcpp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
26360
+++ b/src/libcpp/ChangeLog      (.../branches/gcc-4_8-branch)
 
26361
@@ -1,3 +1,24 @@
 
26362
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
26363
+
 
26364
+       Backported from mainline
 
26365
+       2014-11-25  Jakub Jelinek  <jakub@redhat.com>
 
26366
+
 
26367
+       PR preprocessor/60436
 
26368
+       * line-map.c (linemap_line_start): If highest is above 0x60000000
 
26369
+       and we are still tracking columns or highest is above 0x70000000,
 
26370
+       force add_map.
 
26371
+
 
26372
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
26373
+
 
26374
+       Backport from mainline r215873
 
26375
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
26376
+
 
26377
+       * lex.c (search_line_fast): Add new version to be used for Power8
 
26378
+       and later targets when Altivec is enabled.  Restrict the existing
 
26379
+       Altivec version to big-endian systems so that lvsr is not used on
 
26380
+       little endian, where it is deprecated.  Remove LE-specific code
 
26381
+       from the now-BE-only version.
 
26382
+
 
26383
 2014-05-22  Release Manager
 
26384
 
 
26385
        * GCC 4.8.3 released.
 
26386
Index: libcpp/lex.c
 
26387
===================================================================
 
26388
--- a/src/libcpp/lex.c  (.../tags/gcc_4_8_3_release)
 
26389
+++ b/src/libcpp/lex.c  (.../branches/gcc-4_8-branch)
 
26390
@@ -515,9 +515,111 @@
 
26391
   search_line_fast = impl;
 
26392
 }
 
26393
 
 
26394
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
 
26395
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
 
26396
 
 
26397
-/* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 
26398
+/* A vection of the fast scanner using AltiVec vectorized byte compares
 
26399
+   and VSX unaligned loads (when VSX is available).  This is otherwise
 
26400
+   the same as the pre-GCC 5 version.  */
 
26401
+
 
26402
+static const uchar *
 
26403
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 
26404
+{
 
26405
+  typedef __attribute__((altivec(vector))) unsigned char vc;
 
26406
+
 
26407
+  const vc repl_nl = {
 
26408
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
 
26409
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
 
26410
+  };
 
26411
+  const vc repl_cr = {
 
26412
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', 
 
26413
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
 
26414
+  };
 
26415
+  const vc repl_bs = {
 
26416
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
 
26417
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
 
26418
+  };
 
26419
+  const vc repl_qm = {
 
26420
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
26421
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
26422
+  };
 
26423
+  const vc zero = { 0 };
 
26424
+
 
26425
+  vc data, t;
 
26426
+
 
26427
+  /* Main loop processing 16 bytes at a time.  */
 
26428
+  do
 
26429
+    {
 
26430
+      vc m_nl, m_cr, m_bs, m_qm;
 
26431
+
 
26432
+      data = *((const vc *)s);
 
26433
+      s += 16;
 
26434
+
 
26435
+      m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
 
26436
+      m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
 
26437
+      m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
 
26438
+      m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
 
26439
+      t = (m_nl | m_cr) | (m_bs | m_qm);
 
26440
+
 
26441
+      /* T now contains 0xff in bytes for which we matched one of the relevant
 
26442
+        characters.  We want to exit the loop if any byte in T is non-zero.
 
26443
+        Below is the expansion of vec_any_ne(t, zero).  */
 
26444
+    }
 
26445
+  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
 
26446
+
 
26447
+  /* Restore s to to point to the 16 bytes we just processed.  */
 
26448
+  s -= 16;
 
26449
+
 
26450
+  {
 
26451
+#define N  (sizeof(vc) / sizeof(long))
 
26452
+
 
26453
+    union {
 
26454
+      vc v;
 
26455
+      /* Statically assert that N is 2 or 4.  */
 
26456
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
 
26457
+    } u;
 
26458
+    unsigned long l, i = 0;
 
26459
+
 
26460
+    u.v = t;
 
26461
+
 
26462
+    /* Find the first word of T that is non-zero.  */
 
26463
+    switch (N)
 
26464
+      {
 
26465
+      case 4:
 
26466
+       l = u.l[i++];
 
26467
+       if (l != 0)
 
26468
+         break;
 
26469
+       s += sizeof(unsigned long);
 
26470
+       l = u.l[i++];
 
26471
+       if (l != 0)
 
26472
+         break;
 
26473
+       s += sizeof(unsigned long);
 
26474
+      case 2:
 
26475
+       l = u.l[i++];
 
26476
+       if (l != 0)
 
26477
+         break;
 
26478
+       s += sizeof(unsigned long);
 
26479
+       l = u.l[i];
 
26480
+      }
 
26481
+
 
26482
+    /* L now contains 0xff in bytes for which we matched one of the
 
26483
+       relevant characters.  We can find the byte index by finding
 
26484
+       its bit index and dividing by 8.  */
 
26485
+#ifdef __BIG_ENDIAN__
 
26486
+    l = __builtin_clzl(l) >> 3;
 
26487
+#else
 
26488
+    l = __builtin_ctzl(l) >> 3;
 
26489
+#endif
 
26490
+    return s + l;
 
26491
+
 
26492
+#undef N
 
26493
+  }
 
26494
+}
 
26495
+
 
26496
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
 
26497
+
 
26498
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
 
26499
+   This cannot be used for little endian because vec_lvsl/lvsr are
 
26500
+   deprecated for little endian and the code won't work properly.  */
 
26501
 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
 
26502
    so we can't compile this function without -maltivec on the command line
 
26503
    (or implied by some other switch).  */
 
26504
@@ -559,13 +661,8 @@
 
26505
      beginning with all ones and shifting in zeros according to the
 
26506
      mis-alignment.  The LVSR instruction pulls the exact shift we
 
26507
      want from the address.  */
 
26508
-#ifdef __BIG_ENDIAN__
 
26509
   mask = __builtin_vec_lvsr(0, s);
 
26510
   mask = __builtin_vec_perm(zero, ones, mask);
 
26511
-#else
 
26512
-  mask = __builtin_vec_lvsl(0, s);
 
26513
-  mask = __builtin_vec_perm(ones, zero, mask);
 
26514
-#endif
 
26515
   data &= mask;
 
26516
 
 
26517
   /* While altivec loads mask addresses, we still need to align S so
 
26518
@@ -629,11 +726,7 @@
 
26519
     /* L now contains 0xff in bytes for which we matched one of the
 
26520
        relevant characters.  We can find the byte index by finding
 
26521
        its bit index and dividing by 8.  */
 
26522
-#ifdef __BIG_ENDIAN__
 
26523
     l = __builtin_clzl(l) >> 3;
 
26524
-#else
 
26525
-    l = __builtin_ctzl(l) >> 3;
 
26526
-#endif
 
26527
     return s + l;
 
26528
 
 
26529
 #undef N
 
26530
Index: .
 
26531
===================================================================
 
26532
--- a/src/.     (.../tags/gcc_4_8_3_release)
 
26533
+++ b/src/.     (.../branches/gcc-4_8-branch)
 
26534
 
 
26535
Property changes on: .
 
26536
___________________________________________________________________
 
26537
Modified: svn:mergeinfo
 
26538
   Merged /trunk:r211733,215049