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

« back to all changes in this revision

Viewing changes to .svn/pristine/2a/2af444f014d2b31f3622cac81f7eb3c7c2bbf310.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 20141128 (r218178).
 
2
 
 
3
last_updated()
 
4
{
 
5
        cat > ${dir}LAST_UPDATED <<EOF
 
6
Sat Nov 29 01:59:08 CET 2014
 
7
Sat Nov 29 00:59:08 UTC 2014 (revision 218178)
 
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: libgomp/ChangeLog
 
16
===================================================================
 
17
--- a/src/libgomp/ChangeLog     (.../tags/gcc_4_8_3_release)
 
18
+++ b/src/libgomp/ChangeLog     (.../branches/gcc-4_8-branch)
 
19
@@ -1,3 +1,17 @@
 
20
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
21
+
 
22
+       Backported from mainline
 
23
+       2014-11-24  Jakub Jelinek  <jakub@redhat.com>
 
24
+
 
25
+       PR fortran/63938
 
26
+       * libgomp.fortran/pr63938-1.f90: New test.
 
27
+       * libgomp.fortran/pr63938-2.f90: New test.
 
28
+
 
29
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
30
+
 
31
+       PR libgomp/61200
 
32
+       * testsuite/libgomp.c/pr61200.c: New test.
 
33
+
 
34
 2014-05-22  Release Manager
 
35
 
 
36
        * GCC 4.8.3 released.
 
37
Index: libgomp/testsuite/libgomp.fortran/pr63938-1.f90
 
38
===================================================================
 
39
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90       (.../tags/gcc_4_8_3_release)
 
40
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90       (.../branches/gcc-4_8-branch)
 
41
@@ -0,0 +1,14 @@
 
42
+! PR fortran/63938
 
43
+! { dg-do run }
 
44
+
 
45
+program pr63938_1
 
46
+  integer :: i, x(1)
 
47
+  x(1) = 0
 
48
+!$omp parallel do
 
49
+  do i = 1, 1000
 
50
+    !$omp atomic
 
51
+    x(1) = x(1) + 1
 
52
+  end do
 
53
+!$omp end parallel do
 
54
+  if (x(1) .ne. 1000) call abort
 
55
+end program pr63938_1
 
56
Index: libgomp/testsuite/libgomp.fortran/pr63938-2.f90
 
57
===================================================================
 
58
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90       (.../tags/gcc_4_8_3_release)
 
59
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90       (.../branches/gcc-4_8-branch)
 
60
@@ -0,0 +1,18 @@
 
61
+! PR fortran/63938
 
62
+! { dg-do run }
 
63
+
 
64
+program pr63938_2
 
65
+  type t
 
66
+    integer :: x
 
67
+  end type
 
68
+  integer :: i
 
69
+  type(t) :: x
 
70
+  x%x = 0
 
71
+!$omp parallel do
 
72
+  do i = 1, 1000
 
73
+    !$omp atomic
 
74
+    x%x = x%x + 1
 
75
+  end do
 
76
+!$omp end parallel do
 
77
+  if (x%x .ne. 1000) call abort
 
78
+end program pr63938_2
 
79
Index: libgomp/testsuite/libgomp.c/pr61200.c
 
80
===================================================================
 
81
--- a/src/libgomp/testsuite/libgomp.c/pr61200.c (.../tags/gcc_4_8_3_release)
 
82
+++ b/src/libgomp/testsuite/libgomp.c/pr61200.c (.../branches/gcc-4_8-branch)
 
83
@@ -0,0 +1,87 @@
 
84
+/* PR libgomp/61200 */
 
85
+/* { dg-do run } */
 
86
+
 
87
+#include <omp.h>
 
88
+#include <stdlib.h>
 
89
+#include <unistd.h>
 
90
+
 
91
+volatile int x;
 
92
+
 
93
+void
 
94
+foo ()
 
95
+{
 
96
+  int var = 1;
 
97
+  int i;
 
98
+
 
99
+  for (i = 0; i < 2; i++)
 
100
+    {
 
101
+      if (i == 1)
 
102
+       {
 
103
+         #pragma omp parallel num_threads(2)
 
104
+           if (x)
 
105
+             var++;
 
106
+           else
 
107
+             {
 
108
+               #pragma omp single
 
109
+                 sleep (2);
 
110
+             }
 
111
+       }
 
112
+      else
 
113
+       {
 
114
+         #pragma omp task shared(var)
 
115
+         {
 
116
+           sleep (1);
 
117
+           var = 2;
 
118
+         }
 
119
+       }
 
120
+    }
 
121
+  #pragma omp taskwait
 
122
+  if (var != 2)
 
123
+    abort ();
 
124
+}
 
125
+
 
126
+void
 
127
+bar ()
 
128
+{
 
129
+  int var = 1;
 
130
+  int i;
 
131
+
 
132
+  for (i = 0; i < 2; i++)
 
133
+    {
 
134
+      if (i == 0)
 
135
+       {
 
136
+         #pragma omp task shared(var)
 
137
+         {
 
138
+           sleep (1);
 
139
+           var = 2;
 
140
+         }
 
141
+       }
 
142
+      else
 
143
+       {
 
144
+         #pragma omp parallel num_threads(2)
 
145
+           if (x)
 
146
+             var++;
 
147
+           else
 
148
+             {
 
149
+               #pragma omp single
 
150
+                 sleep (2);
 
151
+             }
 
152
+       }
 
153
+    }
 
154
+  #pragma omp taskwait
 
155
+  if (var != 2)
 
156
+    abort ();
 
157
+}
 
158
+
 
159
+int
 
160
+main ()
 
161
+{
 
162
+  omp_set_nested (1);
 
163
+  #pragma omp parallel num_threads(2)
 
164
+    #pragma omp single
 
165
+      foo ();
 
166
+  #pragma omp parallel num_threads(2)
 
167
+    #pragma omp single
 
168
+      bar ();
 
169
+  return 0;
 
170
+}
 
171
Index: libstdc++-v3/python/libstdcxx/v6/printers.py
 
172
===================================================================
 
173
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../tags/gcc_4_8_3_release)
 
174
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../branches/gcc-4_8-branch)
 
175
@@ -1,4 +1,4 @@
 
176
-# Pretty-printers for libstc++.
 
177
+# Pretty-printers for libstdc++.
 
178
 
 
179
 # Copyright (C) 2008-2013 Free Software Foundation, Inc.
 
180
 
 
181
@@ -18,7 +18,51 @@
 
182
 import gdb
 
183
 import itertools
 
184
 import re
 
185
+import sys
 
186
 
 
187
+### Python 2 + Python 3 compatibility code
 
188
+
 
189
+# Resources about compatibility:
 
190
+#
 
191
+#  * <http://pythonhosted.org/six/>: Documentation of the "six" module
 
192
+
 
193
+# FIXME: The handling of e.g. std::basic_string (at least on char)
 
194
+# probably needs updating to work with Python 3's new string rules.
 
195
+#
 
196
+# In particular, Python 3 has a separate type (called byte) for
 
197
+# bytestrings, and a special b"" syntax for the byte literals; the old
 
198
+# str() type has been redefined to always store Unicode text.
 
199
+#
 
200
+# We probably can't do much about this until this GDB PR is addressed:
 
201
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
 
202
+
 
203
+if sys.version_info[0] > 2:
 
204
+    ### Python 3 stuff
 
205
+    Iterator = object
 
206
+    # Python 3 folds these into the normal functions.
 
207
+    imap = map
 
208
+    izip = zip
 
209
+    # Also, int subsumes long
 
210
+    long = int
 
211
+else:
 
212
+    ### Python 2 stuff
 
213
+    class Iterator:
 
214
+        """Compatibility mixin for iterators
 
215
+
 
216
+        Instead of writing next() methods for iterators, write
 
217
+        __next__() methods and use this mixin to make them work in
 
218
+        Python 2 as well as Python 3.
 
219
+
 
220
+        Idea stolen from the "six" documentation:
 
221
+        <http://pythonhosted.org/six/#six.Iterator>
 
222
+        """
 
223
+
 
224
+        def next(self):
 
225
+            return self.__next__()
 
226
+
 
227
+    # In Python 2, we still need these from itertools
 
228
+    from itertools import imap, izip
 
229
+
 
230
 # Try to use the new-style pretty-printing if available.
 
231
 _use_gdb_pp = True
 
232
 try:
 
233
@@ -51,7 +95,7 @@
 
234
         # anything fancier here.
 
235
         field = typ.fields()[0]
 
236
         if not field.is_base_class:
 
237
-            raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
 
238
+            raise ValueError("Cannot find type %s::%s" % (str(orig), name))
 
239
         typ = field.type
 
240
 
 
241
 class SharedPointerPrinter:
 
242
@@ -87,7 +131,7 @@
 
243
 class StdListPrinter:
 
244
     "Print a std::list"
 
245
 
 
246
-    class _iterator:
 
247
+    class _iterator(Iterator):
 
248
         def __init__(self, nodetype, head):
 
249
             self.nodetype = nodetype
 
250
             self.base = head['_M_next']
 
251
@@ -97,7 +141,7 @@
 
252
         def __iter__(self):
 
253
             return self
 
254
 
 
255
-        def next(self):
 
256
+        def __next__(self):
 
257
             if self.base == self.head:
 
258
                 raise StopIteration
 
259
             elt = self.base.cast(self.nodetype).dereference()
 
260
@@ -135,7 +179,7 @@
 
261
 class StdSlistPrinter:
 
262
     "Print a __gnu_cxx::slist"
 
263
 
 
264
-    class _iterator:
 
265
+    class _iterator(Iterator):
 
266
         def __init__(self, nodetype, head):
 
267
             self.nodetype = nodetype
 
268
             self.base = head['_M_head']['_M_next']
 
269
@@ -144,7 +188,7 @@
 
270
         def __iter__(self):
 
271
             return self
 
272
 
 
273
-        def next(self):
 
274
+        def __next__(self):
 
275
             if self.base == 0:
 
276
                 raise StopIteration
 
277
             elt = self.base.cast(self.nodetype).dereference()
 
278
@@ -180,7 +224,7 @@
 
279
 class StdVectorPrinter:
 
280
     "Print a std::vector"
 
281
 
 
282
-    class _iterator:
 
283
+    class _iterator(Iterator):
 
284
         def __init__ (self, start, finish, bitvec):
 
285
             self.bitvec = bitvec
 
286
             if bitvec:
 
287
@@ -198,7 +242,7 @@
 
288
         def __iter__(self):
 
289
             return self
 
290
 
 
291
-        def next(self):
 
292
+        def __next__(self):
 
293
             count = self.count
 
294
             self.count = self.count + 1
 
295
             if self.bitvec:
 
296
@@ -265,7 +309,7 @@
 
297
 class StdTuplePrinter:
 
298
     "Print a std::tuple"
 
299
 
 
300
-    class _iterator:
 
301
+    class _iterator(Iterator):
 
302
         def __init__ (self, head):
 
303
             self.head = head
 
304
 
 
305
@@ -276,13 +320,13 @@
 
306
                 # Set the actual head to the first pair.
 
307
                 self.head  = self.head.cast (nodes[0].type)
 
308
             elif len (nodes) != 0:
 
309
-                raise ValueError, "Top of tuple tree does not consist of a single node."
 
310
+                raise ValueError("Top of tuple tree does not consist of a single node.")
 
311
             self.count = 0
 
312
 
 
313
         def __iter__ (self):
 
314
             return self
 
315
 
 
316
-        def next (self):
 
317
+        def __next__ (self):
 
318
             nodes = self.head.type.fields ()
 
319
             # Check for further recursions in the inheritance tree.
 
320
             if len (nodes) == 0:
 
321
@@ -289,7 +333,7 @@
 
322
                 raise StopIteration
 
323
             # Check that this iteration has an expected structure.
 
324
             if len (nodes) != 2:
 
325
-                raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
 
326
+                raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
 
327
 
 
328
             # - Left node is the next recursion parent.
 
329
             # - Right node is the actual class contained in the tuple.
 
330
@@ -341,7 +385,7 @@
 
331
             return self.visualizer.display_hint ()
 
332
         return None
 
333
 
 
334
-class RbtreeIterator:
 
335
+class RbtreeIterator(Iterator):
 
336
     def __init__(self, rbtree):
 
337
         self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
 
338
         self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
 
339
@@ -353,7 +397,7 @@
 
340
     def __len__(self):
 
341
         return int (self.size)
 
342
 
 
343
-    def next(self):
 
344
+    def __next__(self):
 
345
         if self.count == self.size:
 
346
             raise StopIteration
 
347
         result = self.node
 
348
@@ -405,7 +449,7 @@
 
349
     "Print a std::map or std::multimap"
 
350
 
 
351
     # Turn an RbtreeIterator into a pretty-print iterator.
 
352
-    class _iter:
 
353
+    class _iter(Iterator):
 
354
         def __init__(self, rbiter, type):
 
355
             self.rbiter = rbiter
 
356
             self.count = 0
 
357
@@ -414,9 +458,9 @@
 
358
         def __iter__(self):
 
359
             return self
 
360
 
 
361
-        def next(self):
 
362
+        def __next__(self):
 
363
             if self.count % 2 == 0:
 
364
-                n = self.rbiter.next()
 
365
+                n = next(self.rbiter)
 
366
                 n = n.cast(self.type).dereference()['_M_value_field']
 
367
                 self.pair = n
 
368
                 item = n['first']
 
369
@@ -447,7 +491,7 @@
 
370
     "Print a std::set or std::multiset"
 
371
 
 
372
     # Turn an RbtreeIterator into a pretty-print iterator.
 
373
-    class _iter:
 
374
+    class _iter(Iterator):
 
375
         def __init__(self, rbiter, type):
 
376
             self.rbiter = rbiter
 
377
             self.count = 0
 
378
@@ -456,8 +500,8 @@
 
379
         def __iter__(self):
 
380
             return self
 
381
 
 
382
-        def next(self):
 
383
-            item = self.rbiter.next()
 
384
+        def __next__(self):
 
385
+            item = next(self.rbiter)
 
386
             item = item.cast(self.type).dereference()['_M_value_field']
 
387
             # FIXME: this is weird ... what to do?
 
388
             # Maybe a 'set' display hint?
 
389
@@ -522,7 +566,7 @@
 
390
 class StdDequePrinter:
 
391
     "Print a std::deque"
 
392
 
 
393
-    class _iter:
 
394
+    class _iter(Iterator):
 
395
         def __init__(self, node, start, end, last, buffer_size):
 
396
             self.node = node
 
397
             self.p = start
 
398
@@ -534,7 +578,7 @@
 
399
         def __iter__(self):
 
400
             return self
 
401
 
 
402
-        def next(self):
 
403
+        def __next__(self):
 
404
             if self.p == self.last:
 
405
                 raise StopIteration
 
406
 
 
407
@@ -619,7 +663,7 @@
 
408
     def display_hint (self):
 
409
         return 'string'
 
410
 
 
411
-class Tr1HashtableIterator:
 
412
+class Tr1HashtableIterator(Iterator):
 
413
     def __init__ (self, hash):
 
414
         self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
 
415
         self.node_type = find_type(hash.type, '__node_type').pointer()
 
416
@@ -627,7 +671,7 @@
 
417
     def __iter__ (self):
 
418
         return self
 
419
 
 
420
-    def next (self):
 
421
+    def __next__ (self):
 
422
         if self.node == 0:
 
423
             raise StopIteration
 
424
         node = self.node.cast(self.node_type)
 
425
@@ -655,8 +699,8 @@
 
426
         return '[%d]' % i
 
427
 
 
428
     def children (self):
 
429
-        counter = itertools.imap (self.format_count, itertools.count())
 
430
-        return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
 
431
+        counter = imap (self.format_count, itertools.count())
 
432
+        return izip (counter, Tr1HashtableIterator (self.hashtable()))
 
433
 
 
434
 class Tr1UnorderedMapPrinter:
 
435
     "Print a tr1::unordered_map"
 
436
@@ -688,11 +732,11 @@
 
437
         return '[%d]' % i
 
438
 
 
439
     def children (self):
 
440
-        counter = itertools.imap (self.format_count, itertools.count())
 
441
+        counter = imap (self.format_count, itertools.count())
 
442
         # Map over the hash table and flatten the result.
 
443
-        data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
 
444
+        data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
 
445
         # Zip the two iterators together.
 
446
-        return itertools.izip (counter, data)
 
447
+        return izip (counter, data)
 
448
 
 
449
     def display_hint (self):
 
450
         return 'map'
 
451
@@ -700,7 +744,7 @@
 
452
 class StdForwardListPrinter:
 
453
     "Print a std::forward_list"
 
454
 
 
455
-    class _iterator:
 
456
+    class _iterator(Iterator):
 
457
         def __init__(self, nodetype, head):
 
458
             self.nodetype = nodetype
 
459
             self.base = head['_M_next']
 
460
@@ -709,7 +753,7 @@
 
461
         def __iter__(self):
 
462
             return self
 
463
 
 
464
-        def next(self):
 
465
+        def __next__(self):
 
466
             if self.base == 0:
 
467
                 raise StopIteration
 
468
             elt = self.base.cast(self.nodetype).dereference()
 
469
@@ -764,7 +808,7 @@
 
470
         # A small sanity check.
 
471
         # FIXME
 
472
         if not self.compiled_rx.match(name + '<>'):
 
473
-            raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
 
474
+            raise ValueError('libstdc++ programming error: "%s" does not match' % name)
 
475
         printer = RxPrinter(name, function)
 
476
         self.subprinters.append(printer)
 
477
         self.lookup[name] = printer
 
478
Index: libstdc++-v3/scripts/run_doxygen
 
479
===================================================================
 
480
--- a/src/libstdc++-v3/scripts/run_doxygen      (.../tags/gcc_4_8_3_release)
 
481
+++ b/src/libstdc++-v3/scripts/run_doxygen      (.../branches/gcc-4_8-branch)
 
482
@@ -193,8 +193,15 @@
 
483
 if $do_latex; then
 
484
     cd ${outdir}/${mode}
 
485
 
 
486
-    # Also drop in the header file and style sheet
 
487
-    doxygen -w latex header.tex doxygen.sty
 
488
+    # Grrr, Doxygen 1.8.x changed the -w latex options.
 
489
+    need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
 
490
+
 
491
+    # Also drop in the header file (maybe footer file) and style sheet
 
492
+    if $need_footer; then
 
493
+      doxygen -w latex header.tex footer.tex doxygen.sty
 
494
+    else
 
495
+      doxygen -w latex header.tex doxygen.sty
 
496
+    fi
 
497
     
 
498
     echo ::
 
499
     echo :: LaTeX pages begin with
 
500
Index: libstdc++-v3/configure.host
 
501
===================================================================
 
502
--- a/src/libstdc++-v3/configure.host   (.../tags/gcc_4_8_3_release)
 
503
+++ b/src/libstdc++-v3/configure.host   (.../branches/gcc-4_8-branch)
 
504
@@ -219,7 +219,6 @@
 
505
     os_include_dir="os/aix"
 
506
     atomicity_dir="os/aix"
 
507
     atomic_word_dir="os/aix"
 
508
-    OPT_LDFLAGS="-Wl,-G"
 
509
     ;;
 
510
   aix4.*)
 
511
     os_include_dir="os/generic"
 
512
Index: libstdc++-v3/doc/xml/manual/containers.xml
 
513
===================================================================
 
514
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../tags/gcc_4_8_3_release)
 
515
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../branches/gcc-4_8-branch)
 
516
@@ -25,8 +25,9 @@
 
517
   <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
 
518
     
 
519
    <para>
 
520
-     Yes it is, and that's okay.  This is a decision that we preserved
 
521
-     when we imported SGI's STL implementation.  The following is
 
522
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
523
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
524
+     preserved when we imported SGI's STL implementation.  The following is
 
525
      quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
 
526
    </para>
 
527
    <blockquote>
 
528
@@ -72,26 +73,6 @@
 
529
   </section>
 
530
 </section>
 
531
 
 
532
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
 
533
-<?dbhtml filename="vector.html"?>
 
534
-  
 
535
-  <para>
 
536
-  </para>
 
537
-  <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
 
538
-    
 
539
-   <para>
 
540
-     In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
 
541
-     message to the list</link>, Daniel Kostecky announced work on an
 
542
-     alternate form of <code>std::vector</code> that would support
 
543
-     hints on the number of elements to be over-allocated.  The design
 
544
-     was also described, along with possible implementation choices.
 
545
-   </para>
 
546
-   <para>
 
547
-     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>
 
548
-     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
 
549
-   </para>
 
550
-
 
551
-  </section></section>
 
552
 </section>
 
553
 
 
554
 <!-- Sect1 02 : Associative -->
 
555
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
 
556
===================================================================
 
557
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../tags/gcc_4_8_3_release)
 
558
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../branches/gcc-4_8-branch)
 
559
@@ -226,10 +226,12 @@
 
560
       <entry/>
 
561
     </row>
 
562
     <row>
 
563
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
564
       <entry>18.8.6</entry>
 
565
       <entry><code>nested_exception</code></entry>
 
566
-      <entry>Y</entry>
 
567
-      <entry/>
 
568
+      <entry>Partial</entry>
 
569
+      <entry>Follows an earlier C++0x draft, not the final specification.
 
570
+      </entry>
 
571
     </row>
 
572
     <row>
 
573
       <entry>18.9</entry>
 
574
@@ -612,10 +614,11 @@
 
575
       <entry/>
 
576
     </row>
 
577
     <row>
 
578
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
579
       <entry>20.6.12.4</entry>
 
580
       <entry><code>uninitialized_fill_n</code></entry>
 
581
-      <entry>Y</entry>
 
582
-      <entry/>
 
583
+      <entry>Partial</entry>
 
584
+      <entry>Returns <code>void</code>.</entry>
 
585
     </row>
 
586
     <row>
 
587
       <entry>20.6.13</entry>
 
588
@@ -1119,10 +1122,13 @@
 
589
       <entry/>
 
590
     </row>
 
591
     <row>
 
592
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
593
       <entry>21.4</entry>
 
594
       <entry>Class template <code>basic_string</code></entry>
 
595
-      <entry>Y</entry>
 
596
-      <entry/>
 
597
+      <entry>Partial</entry>
 
598
+      <entry>Non-conforming Copy-On-Write implementation.
 
599
+             Missing <code>getline</code> overloads for rvalue streams.
 
600
+      </entry>
 
601
     </row>
 
602
     <row>
 
603
       <entry>21.5</entry>
 
604
@@ -1190,10 +1196,11 @@
 
605
       <entry/>
 
606
     </row>
 
607
     <row>
 
608
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
609
       <entry>22.3.3.1</entry>
 
610
       <entry>Character classification</entry>
 
611
-      <entry>Y</entry>
 
612
-      <entry/>
 
613
+      <entry>Partial</entry>
 
614
+      <entry>Missing <code>isblank</code>.</entry>
 
615
     </row>
 
616
     <row>
 
617
       <entry>22.3.3.2</entry>
 
618
@@ -1272,16 +1279,18 @@
 
619
       <entry/>
 
620
     </row>
 
621
     <row>
 
622
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
623
       <entry>22.4.5.1</entry>
 
624
       <entry>Class template <code>time_get</code></entry>
 
625
-      <entry>Y</entry>
 
626
-      <entry/>
 
627
+      <entry>Partial</entry>
 
628
+      <entry>Missing <code>get</code> and <code>do_get</code></entry>
 
629
     </row>
 
630
     <row>
 
631
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
632
       <entry>22.4.5.2</entry>
 
633
       <entry>Class template <code>time_get_byname</code></entry>
 
634
-      <entry>Y</entry>
 
635
-      <entry/>
 
636
+      <entry>Partial</entry>
 
637
+      <entry>Likewise</entry>
 
638
     </row>
 
639
     <row>
 
640
       <entry>22.4.5.3</entry>
 
641
@@ -1434,8 +1443,10 @@
 
642
       <entry>23.3.5</entry>
 
643
       <entry>Class template <code>list</code></entry>
 
644
       <entry>Partial</entry>
 
645
-      <entry><code>insert</code> and <code>erase</code> members do not
 
646
-             take <code>const_iterator</code> arguments (N2350).</entry>
 
647
+      <entry>O(N) size.
 
648
+             <code>insert</code> and <code>erase</code> members do not
 
649
+             take <code>const_iterator</code> arguments (N2350).
 
650
+      </entry>
 
651
     </row>
 
652
     <row>
 
653
       <?dbhtml bgcolor="#B0B0B0" ?>
 
654
@@ -1650,10 +1661,11 @@
 
655
       <entry/>
 
656
     </row>
 
657
     <row>
 
658
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
659
       <entry>25.3</entry>
 
660
       <entry>Mutating sequence operations</entry>
 
661
-      <entry>Y</entry>
 
662
-      <entry/>
 
663
+      <entry>Partial</entry>
 
664
+      <entry><code>rotate</code> returns <code>void</code>.</entry>
 
665
     </row>
 
666
     <row>
 
667
       <entry>25.4</entry>
 
668
@@ -2060,10 +2072,13 @@
 
669
       <entry/>
 
670
     </row>
 
671
     <row>
 
672
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
673
       <entry>26.8</entry>
 
674
       <entry>C Library</entry>
 
675
-      <entry>Y</entry>
 
676
-      <entry/>
 
677
+      <entry>Partial</entry>
 
678
+      <entry><code>&lt;ctgmath&gt;</code> doesn't include
 
679
+       <code>&lt;ccomplex&gt;</code>
 
680
+      </entry>
 
681
     </row>
 
682
     <row>
 
683
       <entry>
 
684
@@ -2143,6 +2158,7 @@
 
685
         Missing move and swap operations on <code>basic_ios</code>.
 
686
         Missing <code>io_errc</code> and <code>iostream_category</code>.
 
687
         <code>ios_base::failure</code> is not derived from <code>system_error</code>.
 
688
+       Missing <code>ios_base::hexfloat</code>.
 
689
       </entry>
 
690
     </row>
 
691
     <row>
 
692
Index: libstdc++-v3/doc/html/index.html
 
693
===================================================================
 
694
--- a/src/libstdc++-v3/doc/html/index.html      (.../tags/gcc_4_8_3_release)
 
695
+++ b/src/libstdc++-v3/doc/html/index.html      (.../branches/gcc-4_8-branch)
 
696
@@ -43,7 +43,7 @@
 
697
 </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. 
 
698
   Containers
 
699
   
 
700
-</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. 
 
701
+</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. 
 
702
   Iterators
 
703
   
 
704
 </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. 
 
705
@@ -162,4 +162,4 @@
 
706
   
 
707
 </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D. 
 
708
     <acronym class="acronym">GNU</acronym> General Public License version 3
 
709
-  </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>
 
710
\ No newline at end of file
 
711
+  </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>
 
712
Index: libstdc++-v3/doc/html/manual/status.html
 
713
===================================================================
 
714
--- a/src/libstdc++-v3/doc/html/manual/status.html      (.../tags/gcc_4_8_3_release)
 
715
+++ b/src/libstdc++-v3/doc/html/manual/status.html      (.../branches/gcc-4_8-branch)
 
716
@@ -165,7 +165,8 @@
 
717
              <code class="code">set_new_handler</code> is not thread-safe.
 
718
       </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>.
 
719
              <code class="code">set_terminate</code> is not thread-safe.
 
720
-      </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">
 
721
+      </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.
 
722
+      </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">
 
723
        <span class="emphasis"><em>19</em></span>
 
724
       </td><td colspan="3" align="left">
 
725
        <span class="emphasis"><em>Diagnostics</em></span>
 
726
@@ -173,7 +174,7 @@
 
727
        <span class="emphasis"><em>20</em></span>
 
728
       </td><td colspan="3" align="left">
 
729
        <span class="emphasis"><em>General utilities</em></span>
 
730
-      </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">
 
731
+      </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">
 
732
        <p>
 
733
          Uses code from
 
734
          <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
 
735
@@ -187,14 +188,16 @@
 
736
        <span class="emphasis"><em>21</em></span>
 
737
       </td><td colspan="3" align="left">
 
738
        <span class="emphasis"><em>Strings</em></span>
 
739
-      </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.
 
740
+      </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.
 
741
+             Missing <code class="code">getline</code> overloads for rvalue streams.
 
742
+      </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.
 
743
       Missing <code class="filename">&lt;cuchar&gt;</code>
 
744
       </td></tr><tr><td align="left">
 
745
        <span class="emphasis"><em>22</em></span>
 
746
       </td><td colspan="3" align="left">
 
747
        <span class="emphasis"><em>Localization</em></span>
 
748
-      </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
 
749
-             <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">
 
750
+      </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
 
751
+             <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">
 
752
        <span class="emphasis"><em>23</em></span>
 
753
       </td><td colspan="3" align="left">
 
754
        <span class="emphasis"><em>Containers</em></span>
 
755
@@ -201,8 +204,10 @@
 
756
       </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>
 
757
              meet the requirements
 
758
              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
 
759
-             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
 
760
-             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
 
761
+             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.
 
762
+             <code class="code">insert</code> and <code class="code">erase</code> members do not
 
763
+             take <code class="code">const_iterator</code> arguments (N2350).
 
764
+      </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
 
765
              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
 
766
              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">
 
767
        <span class="emphasis"><em>24</em></span>
 
768
@@ -212,11 +217,13 @@
 
769
        <span class="emphasis"><em>25</em></span>
 
770
       </td><td colspan="3" align="left">
 
771
        <span class="emphasis"><em>Algorithms</em></span>
 
772
-      </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">
 
773
+      </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">
 
774
       <span class="emphasis"><em>26</em></span>
 
775
       </td><td colspan="3" align="left">
 
776
        <span class="emphasis"><em>Numerics</em></span>
 
777
-      </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">
 
778
+      </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
 
779
+       <code class="code">&lt;ccomplex&gt;</code>
 
780
+      </td></tr><tr><td align="left">
 
781
        <span class="emphasis"><em>27</em></span>
 
782
       </td><td colspan="3" align="left">
 
783
        <span class="emphasis"><em>Input/output library</em></span>
 
784
@@ -224,6 +231,7 @@
 
785
         Missing move and swap operations on <code class="code">basic_ios</code>.
 
786
         Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
 
787
         <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
 
788
+       Missing <code class="code">ios_base::hexfloat</code>.
 
789
       </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">
 
790
         Missing move and swap operations
 
791
         Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
 
792
Index: libstdc++-v3/doc/html/manual/abi.html
 
793
===================================================================
 
794
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
 
795
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
 
796
@@ -96,7 +96,7 @@
 
797
    definitions, where the version definition is the maximum for a
 
798
    particular release. Labels are cumulative. If a particular release
 
799
    is not listed, it has the same version labels as the preceding
 
800
-   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>
 
801
+   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>
 
802
        Release versioning on the libstdc++.so binary, implemented in
 
803
        the same way as the libgcc_s.so binary above. Listed is the
 
804
        filename: <code class="constant">DT_SONAME</code> can be deduced from
 
805
@@ -111,7 +111,7 @@
 
806
        has the same filename and <code class="constant">DT_SONAME</code> as the
 
807
        preceding release.
 
808
       </p><p>It is versioned as follows:
 
809
-    </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>
 
810
+    </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>
 
811
       Note 1: Error should be libstdc++.so.3.0.3.
 
812
     </p><p>
 
813
       Note 2: Not strictly required.
 
814
@@ -129,7 +129,7 @@
 
815
    GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
 
816
    release.) If a particular release is not listed, it has the same
 
817
    version labels as the preceding release.
 
818
-   </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,
 
819
+   </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,
 
820
     __GXX_ABI_VERSION. This macro is defined as the version of the
 
821
     compiler v3 ABI, with g++ 3.0 being version 100. This macro will
 
822
     be automatically defined whenever g++ is used (the curious can
 
823
Index: libstdc++-v3/doc/html/manual/std_contents.html
 
824
===================================================================
 
825
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../tags/gcc_4_8_3_release)
 
826
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../branches/gcc-4_8-branch)
 
827
@@ -21,7 +21,7 @@
 
828
 </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. 
 
829
   Containers
 
830
   
 
831
-</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. 
 
832
+</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. 
 
833
   Iterators
 
834
   
 
835
 </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. 
 
836
@@ -42,4 +42,4 @@
 
837
 </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. 
 
838
   Support
 
839
   
 
840
-</td></tr></table></div></body></html>
 
841
\ No newline at end of file
 
842
+</td></tr></table></div></body></html>
 
843
Index: libstdc++-v3/doc/html/manual/containers.html
 
844
===================================================================
 
845
--- a/src/libstdc++-v3/doc/html/manual/containers.html  (.../tags/gcc_4_8_3_release)
 
846
+++ b/src/libstdc++-v3/doc/html/manual/containers.html  (.../branches/gcc-4_8-branch)
 
847
@@ -7,9 +7,10 @@
 
848
   </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. 
 
849
   Containers
 
850
   <a id="idm269999493408" class="indexterm"></a>
 
851
-</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>
 
852
-     Yes it is, and that's okay.  This is a decision that we preserved
 
853
-     when we imported SGI's STL implementation.  The following is
 
854
+</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>
 
855
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
856
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
857
+     preserved when we imported SGI's STL implementation.  The following is
 
858
      quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
 
859
    </p><div class="blockquote"><blockquote class="blockquote"><p>
 
860
        The size() member function, for list and slist, takes time
 
861
@@ -41,14 +42,4 @@
 
862
         </p><pre class="programlisting">
 
863
         if (L.empty())
 
864
             ...
 
865
-        </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>
 
866
-  </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>
 
867
-     In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
 
868
-     message to the list</a>, Daniel Kostecky announced work on an
 
869
-     alternate form of <code class="code">std::vector</code> that would support
 
870
-     hints on the number of elements to be over-allocated.  The design
 
871
-     was also described, along with possible implementation choices.
 
872
-   </p><p>
 
873
-     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>
 
874
-     and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
 
875
-   </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>
 
876
\ No newline at end of file
 
877
+        </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>
 
878
Index: libstdc++-v3/doc/html/manual/index.html
 
879
===================================================================
 
880
--- a/src/libstdc++-v3/doc/html/manual/index.html       (.../tags/gcc_4_8_3_release)
 
881
+++ b/src/libstdc++-v3/doc/html/manual/index.html       (.../branches/gcc-4_8-branch)
 
882
@@ -24,7 +24,7 @@
 
883
 </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. 
 
884
   Containers
 
885
   
 
886
-</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. 
 
887
+</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. 
 
888
   Iterators
 
889
   
 
890
 </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. 
 
891
@@ -160,4 +160,4 @@
 
892
              </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. 
 
893
   Introduction
 
894
   
 
895
-</td></tr></table></div></body></html>
 
896
\ No newline at end of file
 
897
+</td></tr></table></div></body></html>
 
898
Index: libstdc++-v3/include/std/future
 
899
===================================================================
 
900
--- a/src/libstdc++-v3/include/std/future       (.../tags/gcc_4_8_3_release)
 
901
+++ b/src/libstdc++-v3/include/std/future       (.../branches/gcc-4_8-branch)
 
902
@@ -351,12 +351,14 @@
 
903
       void
 
904
       _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
 
905
       {
 
906
-        bool __set = __ignore_failure;
 
907
+        bool __set = false;
 
908
         // all calls to this function are serialized,
 
909
         // side-effects of invoking __res only happen once
 
910
         call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
 
911
             ref(__set));
 
912
-        if (!__set)
 
913
+       if (__set)
 
914
+         _M_cond.notify_all();
 
915
+       else if (!__ignore_failure)
 
916
           __throw_future_error(int(future_errc::promise_already_satisfied));
 
917
       }
 
918
 
 
919
@@ -471,7 +473,6 @@
 
920
           lock_guard<mutex> __lock(_M_mutex);
 
921
           _M_result.swap(__res);
 
922
         }
 
923
-        _M_cond.notify_all();
 
924
         __set = true;
 
925
       }
 
926
 
 
927
@@ -983,22 +984,25 @@
 
928
       void
 
929
       set_value(const _Res& __r)
 
930
       {
 
931
+       auto __future = _M_future;
 
932
         auto __setter = _State::__setter(this, __r);
 
933
-        _M_future->_M_set_result(std::move(__setter));
 
934
+        __future->_M_set_result(std::move(__setter));
 
935
       }
 
936
 
 
937
       void
 
938
       set_value(_Res&& __r)
 
939
       {
 
940
+       auto __future = _M_future;
 
941
         auto __setter = _State::__setter(this, std::move(__r));
 
942
-        _M_future->_M_set_result(std::move(__setter));
 
943
+        __future->_M_set_result(std::move(__setter));
 
944
       }
 
945
 
 
946
       void
 
947
       set_exception(exception_ptr __p)
 
948
       {
 
949
+       auto __future = _M_future;
 
950
         auto __setter = _State::__setter(__p, this);
 
951
-        _M_future->_M_set_result(std::move(__setter));
 
952
+        __future->_M_set_result(std::move(__setter));
 
953
       }
 
954
     };
 
955
 
 
956
@@ -1081,15 +1085,17 @@
 
957
       void
 
958
       set_value(_Res& __r)
 
959
       {
 
960
+       auto __future = _M_future;
 
961
         auto __setter = _State::__setter(this, __r);
 
962
-        _M_future->_M_set_result(std::move(__setter));
 
963
+        __future->_M_set_result(std::move(__setter));
 
964
       }
 
965
 
 
966
       void
 
967
       set_exception(exception_ptr __p)
 
968
       {
 
969
+       auto __future = _M_future;
 
970
         auto __setter = _State::__setter(__p, this);
 
971
-        _M_future->_M_set_result(std::move(__setter));
 
972
+        __future->_M_set_result(std::move(__setter));
 
973
       }
 
974
     };
 
975
 
 
976
@@ -1166,8 +1172,9 @@
 
977
       void
 
978
       set_exception(exception_ptr __p)
 
979
       {
 
980
+       auto __future = _M_future;
 
981
         auto __setter = _State::__setter(__p, this);
 
982
-        _M_future->_M_set_result(std::move(__setter));
 
983
+        __future->_M_set_result(std::move(__setter));
 
984
       }
 
985
     };
 
986
 
 
987
@@ -1193,8 +1200,9 @@
 
988
   inline void
 
989
   promise<void>::set_value()
 
990
   {
 
991
+    auto __future = _M_future;
 
992
     auto __setter = _State::__setter(this);
 
993
-    _M_future->_M_set_result(std::move(__setter));
 
994
+    __future->_M_set_result(std::move(__setter));
 
995
   }
 
996
 
 
997
 
 
998
Index: libstdc++-v3/include/ext/rope
 
999
===================================================================
 
1000
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
 
1001
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
 
1002
@@ -1544,7 +1544,7 @@
 
1003
       typedef typename _Base::allocator_type allocator_type;
 
1004
       using _Base::_M_tree_ptr;
 
1005
       using _Base::get_allocator;
 
1006
-      using _Base::_M_get_allocator;      
 
1007
+      using _Base::_M_get_allocator;
 
1008
       typedef __GC_CONST _CharT* _Cstrptr;
 
1009
       
 
1010
       static _CharT _S_empty_c_str[1];
 
1011
@@ -1876,8 +1876,9 @@
 
1012
           const allocator_type& __a = allocator_type())
 
1013
       : _Base(__a)
 
1014
       {
 
1015
-       this->_M_tree_ptr = (0 == __len) ?
 
1016
-         0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
 
1017
+       this->_M_tree_ptr = (0 == __len)
 
1018
+         ? 0
 
1019
+         : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
 
1020
       }
 
1021
 
 
1022
       rope(const rope& __x, const allocator_type& __a = allocator_type())
 
1023
Index: libstdc++-v3/include/bits/stl_tree.h
 
1024
===================================================================
 
1025
--- a/src/libstdc++-v3/include/bits/stl_tree.h  (.../tags/gcc_4_8_3_release)
 
1026
+++ b/src/libstdc++-v3/include/bits/stl_tree.h  (.../branches/gcc-4_8-branch)
 
1027
@@ -510,11 +510,11 @@
 
1028
 
 
1029
       _Link_type
 
1030
       _M_end()
 
1031
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
 
1032
+      { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
 
1033
 
 
1034
       _Const_Link_type
 
1035
       _M_end() const
 
1036
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
1037
+      { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
1038
 
 
1039
       static const_reference
 
1040
       _S_value(_Const_Link_type __x)
 
1041
Index: libstdc++-v3/include/tr2/bool_set
 
1042
===================================================================
 
1043
--- a/src/libstdc++-v3/include/tr2/bool_set     (.../tags/gcc_4_8_3_release)
 
1044
+++ b/src/libstdc++-v3/include/tr2/bool_set     (.../branches/gcc-4_8-branch)
 
1045
@@ -44,7 +44,7 @@
 
1046
    *  bool_set
 
1047
    *
 
1048
    *  See N2136, Bool_set: multi-valued logic
 
1049
-   *  by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
 
1050
+   *  by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
 
1051
    *
 
1052
    *  The implicit conversion to bool is slippery!  I may use the new
 
1053
    *  explicit conversion.  This has been specialized in the language
 
1054
Index: libstdc++-v3/ChangeLog
 
1055
===================================================================
 
1056
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_8_3_release)
 
1057
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_8-branch)
 
1058
@@ -1,3 +1,113 @@
 
1059
+2014-11-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
1060
+
 
1061
+       Backport from mainline
 
1062
+       2014-09-10  Tony Wang  <tony.wang@arm.com>
 
1063
+
 
1064
+       PR target/56846
 
1065
+       * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
 
1066
+       Return with CONTINUE_UNWINDING when the state pattern
 
1067
+       contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
 
1068
+
 
1069
+2014-11-05  David Edelsohn  <dje.gcc@gmail.com>
 
1070
+
 
1071
+       Backported from mainline.
 
1072
+       2014-10-30  David Edelsohn  <dje.gcc@gmail.com>
 
1073
+
 
1074
+       * configure.host (aix4.3+, 5+): Do not use -G in link command.
 
1075
+
 
1076
+2014-10-15  Jason Merrill  <jason@redhat.com>
 
1077
+
 
1078
+       * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
 
1079
+       dynamic_cast more gracefully.
 
1080
+
 
1081
+2014-10-14  Kai Tietz  <ktietz@redhat.com>
 
1082
+
 
1083
+       PR libstdc++/57440
 
1084
+       * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
 
1085
+       Define to avoid leak.
 
1086
+       * config/os/mingw32-w64/os_defines.h: Likewise.
 
1087
+
 
1088
+2014-10-03  Jonathan Wakely  <jwakely@redhat.com>
 
1089
+
 
1090
+       PR libstdc++/63449
 
1091
+       * doc/xml/manual/containers.xml: Remove outdated section. Update
 
1092
+       std::list notes.
 
1093
+       * doc/html/*: Regenerate.
 
1094
+
 
1095
+2014-10-01  Jonathan Wakely  <jwakely@redhat.com>
 
1096
+
 
1097
+       * doc/xml/manual/status_cxx2011.xml: Corrections.
 
1098
+       * doc/html/manual/status.html: Regenerate.
 
1099
+
 
1100
+2014-08-28  Samuel Bronson  <naesten@gmail.com>
 
1101
+
 
1102
+       Backport r212453 from trunk
 
1103
+       2014-07-11  Samuel Bronson  <naesten@gmail.com>
 
1104
+                   Matthias Klose  <doko@ubuntu.com>
 
1105
+
 
1106
+       PR libstdc++/58962
 
1107
+       * python/libstdcxx/v6/printers.py: Port to Python 2+3
 
1108
+       (imap): New compat function.
 
1109
+       (izip): Likewise.
 
1110
+       (Iterator): New mixin to allow writing iterators in Python 3 style
 
1111
+       regardless of which version we're running on.
 
1112
+       [Python3] (long) New compat alias for "int".
 
1113
+       * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
 
1114
+
 
1115
+       Backport r210625 from trunk
 
1116
+       2014-05-19  Jonathan Wakely  <jwakely@redhat.com>
 
1117
+
 
1118
+       * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
 
1119
+
 
1120
+2014-08-26  John David Anglin  <danglin@gcc.gnu.org>
 
1121
+
 
1122
+       * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
 
1123
+
 
1124
+2014-08-26  Jonathan Wakely  <jwakely@redhat.com>
 
1125
+
 
1126
+       * doc/xml/manual/status_cxx2011.xml: Correct status table.
 
1127
+       * doc/html/manual/*: Regenerate.
 
1128
+
 
1129
+2014-08-04  Jonathan Wakely  <jwakely@redhat.com>
 
1130
+
 
1131
+       Backported from mainline
 
1132
+       2014-07-29  Jonathan Wakely  <jwakely@redhat.com>
 
1133
+
 
1134
+       PR libstdc++/61946
 
1135
+       * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
 
1136
+       const allocator_type&)): Pass non-const allocator to
 
1137
+       _S_new_RopeFunction.
 
1138
+       * testsuite/ext/rope/61946.cc: New.
 
1139
+
 
1140
+2014-08-04  Zifei Tong  <zifeitong@gmail.com>
 
1141
+
 
1142
+       * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
 
1143
+       _GLIBCXX_ prefix to macro.
 
1144
+
 
1145
+2014-06-03  Jonathan Wakely  <jwakely@redhat.com>
 
1146
+
 
1147
+       Backport from mainline
 
1148
+       2014-04-15  Jonathan Wakely  <jwakely@redhat.com>
 
1149
+
 
1150
+       PR libstdc++/60734
 
1151
+       * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
 
1152
+
 
1153
+       Backport from mainline
 
1154
+       2014-05-16  Jonathan Wakely  <jwakely@redhat.com>
 
1155
+
 
1156
+       PR libstdc++/60966
 
1157
+       * include/std/future (__future_base::_State_baseV2::_M_set_result):
 
1158
+       Signal condition variable after call_once returns.
 
1159
+       (__future_base::_State_baseV2::_M_do_set): Do not signal here.
 
1160
+       (promise::set_value, promise::set_exception): Increment the reference
 
1161
+       count on the shared state until the function returns.
 
1162
+       * testsuite/30_threads/promise/60966.cc: New.
 
1163
+
 
1164
+2014-05-29  Jonathan Wakely  <jwakely@redhat.com>
 
1165
+
 
1166
+       * include/tr2/bool_set: Use UTF-8 for accented characters.
 
1167
+       * scripts/run_doxygen: Handle Doxygen 1.8.x change.
 
1168
+
 
1169
 2014-05-22  Release Manager
 
1170
 
 
1171
        * GCC 4.8.3 released.
 
1172
Index: libstdc++-v3/libsupc++/atexit_thread.cc
 
1173
===================================================================
 
1174
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../tags/gcc_4_8_3_release)
 
1175
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../branches/gcc-4_8-branch)
 
1176
@@ -26,7 +26,7 @@
 
1177
 #include <new>
 
1178
 #include "bits/gthr.h"
 
1179
 
 
1180
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
 
1181
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
 
1182
 
 
1183
 extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
 
1184
                                         void *arg, void *d);
 
1185
@@ -38,7 +38,7 @@
 
1186
   return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
 
1187
 }
 
1188
 
 
1189
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1190
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1191
 
 
1192
 namespace {
 
1193
   // One element in a singly-linked stack of cleanups.
 
1194
@@ -142,4 +142,4 @@
 
1195
   return 0;
 
1196
 }
 
1197
 
 
1198
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1199
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1200
Index: libstdc++-v3/libsupc++/eh_personality.cc
 
1201
===================================================================
 
1202
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../tags/gcc_4_8_3_release)
 
1203
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../branches/gcc-4_8-branch)
 
1204
@@ -378,6 +378,12 @@
 
1205
   switch (state & _US_ACTION_MASK)
 
1206
     {
 
1207
     case _US_VIRTUAL_UNWIND_FRAME:
 
1208
+      // If the unwind state pattern is
 
1209
+      // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
 
1210
+      // then we don't need to search for any handler as it is not a real
 
1211
+      // exception. Just unwind the stack.
 
1212
+      if (state & _US_FORCE_UNWIND)
 
1213
+       CONTINUE_UNWINDING;
 
1214
       actions = _UA_SEARCH_PHASE;
 
1215
       break;
 
1216
 
 
1217
Index: libstdc++-v3/libsupc++/dyncast.cc
 
1218
===================================================================
 
1219
--- a/src/libstdc++-v3/libsupc++/dyncast.cc     (.../tags/gcc_4_8_3_release)
 
1220
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc     (.../branches/gcc-4_8-branch)
 
1221
@@ -55,6 +55,18 @@
 
1222
       adjust_pointer <void> (src_ptr, prefix->whole_object);
 
1223
   const __class_type_info *whole_type = prefix->whole_type;
 
1224
   __class_type_info::__dyncast_result result;
 
1225
+
 
1226
+  // If the whole object vptr doesn't refer to the whole object type, we're
 
1227
+  // in the middle of constructing a primary base, and src is a separate
 
1228
+  // base.  This has undefined behavior and we can't find anything outside
 
1229
+  // of the base we're actually constructing, so fail now rather than
 
1230
+  // segfault later trying to use a vbase offset that doesn't exist.
 
1231
+  const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
 
1232
+  const vtable_prefix *whole_prefix =
 
1233
+    adjust_pointer <vtable_prefix> (whole_vtable,
 
1234
+                                   -offsetof (vtable_prefix, origin));
 
1235
+  if (whole_prefix->whole_type != whole_type)
 
1236
+    return NULL;
 
1237
   
 
1238
   whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
 
1239
                             dst_type, whole_ptr, src_type, src_ptr, result);
 
1240
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
 
1241
===================================================================
 
1242
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../tags/gcc_4_8_3_release)
 
1243
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../branches/gcc-4_8-branch)
 
1244
@@ -0,0 +1,67 @@
 
1245
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
 
1246
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
 
1247
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
 
1248
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
 
1249
+// { dg-require-cstdint "" }
 
1250
+// { dg-require-gthreads "" }
 
1251
+// { dg-require-atomic-builtins "" }
 
1252
+
 
1253
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1254
+//
 
1255
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1256
+// software; you can redistribute it and/or modify it under the
 
1257
+// terms of the GNU General Public License as published by the
 
1258
+// Free Software Foundation; either version 3, or (at your option)
 
1259
+// any later version.
 
1260
+
 
1261
+// This library is distributed in the hope that it will be useful,
 
1262
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1263
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1264
+// GNU General Public License for more details.
 
1265
+
 
1266
+// You should have received a copy of the GNU General Public License along
 
1267
+// with this library; see the file COPYING3.  If not see
 
1268
+// <http://www.gnu.org/licenses/>.
 
1269
+
 
1270
+// libstdc++/60966
 
1271
+// This test hangs if std::promise::~promise() destroys the
 
1272
+// shared state before std::promise::set_value() finishes using it.
 
1273
+
 
1274
+#include <future>
 
1275
+#include <thread>
 
1276
+#include <vector>
 
1277
+
 
1278
+const int THREADS = 10;
 
1279
+
 
1280
+void run_task(std::promise<void>* pr)
 
1281
+{
 
1282
+  std::this_thread::sleep_for(std::chrono::milliseconds(100));
 
1283
+  pr->set_value();
 
1284
+}
 
1285
+
 
1286
+int main()
 
1287
+{
 
1288
+  std::vector<std::promise<void>*> tasks(THREADS);
 
1289
+  std::vector<std::thread> threads(THREADS);
 
1290
+  std::vector<std::future<void>> futures(THREADS);
 
1291
+
 
1292
+  for (int i = 0; i < THREADS; ++i)
 
1293
+  {
 
1294
+    std::promise<void>* task = new std::promise<void>;
 
1295
+    tasks[i] = task;
 
1296
+    futures[i] = task->get_future();
 
1297
+    threads[i] = std::thread(run_task, task);
 
1298
+  }
 
1299
+
 
1300
+  for (int i = 0; i < THREADS; ++i)
 
1301
+  {
 
1302
+    // the temporary future releases the state as soon as wait() returns
 
1303
+    std::future<void>(std::move(futures[i])).wait();
 
1304
+    // state is ready, should now be safe to delete promise, so it
 
1305
+    // releases the shared state too
 
1306
+    delete tasks[i];
 
1307
+  }
 
1308
+
 
1309
+  for (auto& t : threads)
 
1310
+    t.join();
 
1311
+}
 
1312
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
 
1313
===================================================================
 
1314
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../tags/gcc_4_8_3_release)
 
1315
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../branches/gcc-4_8-branch)
 
1316
@@ -0,0 +1,31 @@
 
1317
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1318
+//
 
1319
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1320
+// software; you can redistribute it and/or modify it under the
 
1321
+// terms of the GNU General Public License as published by the
 
1322
+// Free Software Foundation; either version 3, or (at your option)
 
1323
+// any later version.
 
1324
+
 
1325
+// This library is distributed in the hope that it will be useful,
 
1326
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1327
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1328
+// GNU General Public License for more details.
 
1329
+
 
1330
+// You should have received a copy of the GNU General Public License along
 
1331
+// with this library; see the file COPYING3.  If not see
 
1332
+// <http://www.gnu.org/licenses/>.
 
1333
+
 
1334
+// { dg-do compile }
 
1335
+
 
1336
+#include <ext/rope>
 
1337
+
 
1338
+struct empty_char_prod : __gnu_cxx::char_producer<char>
 
1339
+{
 
1340
+  virtual void operator()(size_t, size_t, char*) {}
 
1341
+};
 
1342
+
 
1343
+int main ()
 
1344
+{
 
1345
+  empty_char_prod* ecp = new empty_char_prod;
 
1346
+  __gnu_cxx::crope excrope( ecp, 10L, true );
 
1347
+}
 
1348
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
 
1349
===================================================================
 
1350
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../tags/gcc_4_8_3_release)
 
1351
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../branches/gcc-4_8-branch)
 
1352
@@ -91,7 +91,7 @@
 
1353
        }
 
1354
     }
 
1355
 
 
1356
-    set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
 
1357
+    set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
 
1358
                           "\\\[\\\]"]
 
1359
     if {!$do_whatis_tests} {
 
1360
        send_log "skipping 'whatis' tests - gdb too old"
 
1361
@@ -252,6 +252,6 @@
 
1362
 # but not earlier versions.
 
1363
 # Return 1 if the version is ok, 0 otherwise.
 
1364
 proc gdb_version_check {} {
 
1365
-    return [gdb_batch_check "python print gdb.lookup_global_symbol" \
 
1366
+    return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
 
1367
              "<built-in function lookup_global_symbol>"]
 
1368
 }
 
1369
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
 
1370
===================================================================
 
1371
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../tags/gcc_4_8_3_release)
 
1372
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../branches/gcc-4_8-branch)
 
1373
@@ -78,4 +78,7 @@
 
1374
 #define _GLIBCXX_LLP64 1
 
1375
 #endif
 
1376
 
 
1377
+// See libstdc++/59807
 
1378
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
 
1379
+
 
1380
 #endif
 
1381
Index: libstdc++-v3/config/os/mingw32/os_defines.h
 
1382
===================================================================
 
1383
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../tags/gcc_4_8_3_release)
 
1384
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../branches/gcc-4_8-branch)
 
1385
@@ -75,4 +75,7 @@
 
1386
 #define _GLIBCXX_LLP64 1
 
1387
 #endif
 
1388
 
 
1389
+// See libstdc++/59807
 
1390
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
 
1391
+
 
1392
 #endif
 
1393
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
 
1394
===================================================================
 
1395
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../tags/gcc_4_8_3_release)
 
1396
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../branches/gcc-4_8-branch)
 
1397
@@ -400,6 +400,7 @@
 
1398
 FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
 
1399
 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1400
 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1401
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
 
1402
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1403
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
 
1404
 FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1405
@@ -587,6 +588,8 @@
 
1406
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
 
1407
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
 
1408
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
 
1409
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
 
1410
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
 
1411
 FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
 
1412
 FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
 
1413
 FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
 
1414
@@ -1204,6 +1207,7 @@
 
1415
 FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
 
1416
 FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
 
1417
 FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
 
1418
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
 
1419
 FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
 
1420
 FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
 
1421
 FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
 
1422
@@ -1471,6 +1475,11 @@
 
1423
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
 
1424
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
 
1425
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
 
1426
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
 
1427
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
 
1428
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
 
1429
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
 
1430
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
 
1431
 FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
 
1432
 FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
 
1433
 FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
 
1434
@@ -1900,6 +1909,8 @@
 
1435
 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
 
1436
 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
 
1437
 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
 
1438
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
 
1439
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
 
1440
 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1441
 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1442
 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
 
1443
@@ -2436,6 +2447,7 @@
 
1444
 FUNC:__cxa_guard_release@@CXXABI_1.3
 
1445
 FUNC:__cxa_pure_virtual@@CXXABI_1.3
 
1446
 FUNC:__cxa_rethrow@@CXXABI_1.3
 
1447
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
 
1448
 FUNC:__cxa_throw@@CXXABI_1.3
 
1449
 FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
 
1450
 FUNC:__cxa_vec_cctor@@CXXABI_1.3
 
1451
@@ -2482,6 +2494,7 @@
 
1452
 OBJECT:0:CXXABI_1.3.4
 
1453
 OBJECT:0:CXXABI_1.3.5
 
1454
 OBJECT:0:CXXABI_1.3.6
 
1455
+OBJECT:0:CXXABI_1.3.7
 
1456
 OBJECT:0:CXXABI_TM_1
 
1457
 OBJECT:0:GLIBCXX_3.4
 
1458
 OBJECT:0:GLIBCXX_3.4.1
 
1459
@@ -2493,6 +2506,8 @@
 
1460
 OBJECT:0:GLIBCXX_3.4.15
 
1461
 OBJECT:0:GLIBCXX_3.4.16
 
1462
 OBJECT:0:GLIBCXX_3.4.17
 
1463
+OBJECT:0:GLIBCXX_3.4.18
 
1464
+OBJECT:0:GLIBCXX_3.4.19
 
1465
 OBJECT:0:GLIBCXX_3.4.2
 
1466
 OBJECT:0:GLIBCXX_3.4.3
 
1467
 OBJECT:0:GLIBCXX_3.4.4
 
1468
@@ -2992,6 +3007,8 @@
 
1469
 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
 
1470
 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
 
1471
 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
 
1472
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
 
1473
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
 
1474
 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
 
1475
 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
 
1476
 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
 
1477
Index: configure.ac
 
1478
===================================================================
 
1479
--- a/src/configure.ac  (.../tags/gcc_4_8_3_release)
 
1480
+++ b/src/configure.ac  (.../branches/gcc-4_8-branch)
 
1481
@@ -1154,6 +1154,9 @@
 
1482
   *-mingw*)
 
1483
     host_makefile_frag="config/mh-mingw"
 
1484
     ;;
 
1485
+  alpha*-*-linux*)
 
1486
+    host_makefile_frag="config/mh-alpha-linux"
 
1487
+    ;;
 
1488
   hppa*-hp-hpux10*)
 
1489
     host_makefile_frag="config/mh-pa-hpux10"
 
1490
     ;;
 
1491
Index: ChangeLog
 
1492
===================================================================
 
1493
--- a/src/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1494
+++ b/src/ChangeLog     (.../branches/gcc-4_8-branch)
 
1495
@@ -1,3 +1,9 @@
 
1496
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1497
+
 
1498
+       PR target/47230
 
1499
+       * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
 
1500
+       * configure: Regenerate.
 
1501
+
 
1502
 2014-05-22  Release Manager
 
1503
 
 
1504
        * GCC 4.8.3 released.
 
1505
Index: contrib/ChangeLog
 
1506
===================================================================
 
1507
--- a/src/contrib/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1508
+++ b/src/contrib/ChangeLog     (.../branches/gcc-4_8-branch)
 
1509
@@ -1,3 +1,7 @@
 
1510
+2014-07-07  Richard Biener  <rguenther@suse.de>
 
1511
+
 
1512
+        * gennews: Use gcc-3.0/index.html.
 
1513
+
 
1514
 2014-05-22  Release Manager
 
1515
 
 
1516
        * GCC 4.8.3 released.
 
1517
Index: contrib/gennews
 
1518
===================================================================
 
1519
--- a/src/contrib/gennews       (.../tags/gcc_4_8_3_release)
 
1520
+++ b/src/contrib/gennews       (.../branches/gcc-4_8-branch)
 
1521
@@ -37,7 +37,7 @@
 
1522
     gcc-3.3/index.html gcc-3.3/changes.html
 
1523
     gcc-3.2/index.html gcc-3.2/changes.html
 
1524
     gcc-3.1/index.html gcc-3.1/changes.html
 
1525
-    gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1526
+    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1527
     gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
 
1528
     egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
 
1529
     egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
 
1530
Index: config/mh-alpha-linux
 
1531
===================================================================
 
1532
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
 
1533
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
 
1534
@@ -0,0 +1,3 @@
 
1535
+# Prevent GPREL16 relocation truncation
 
1536
+LDFLAGS += -Wl,--no-relax
 
1537
+BOOT_LDFLAGS += -Wl,--no-relax
 
1538
Index: config/ChangeLog
 
1539
===================================================================
 
1540
--- a/src/config/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1541
+++ b/src/config/ChangeLog      (.../branches/gcc-4_8-branch)
 
1542
@@ -1,3 +1,8 @@
 
1543
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1544
+
 
1545
+       PR target/47230
 
1546
+       * mh-alpha-linux: New file.
 
1547
+
 
1548
 2014-05-22  Release Manager
 
1549
 
 
1550
        * GCC 4.8.3 released.
 
1551
Index: libjava/classpath
 
1552
===================================================================
 
1553
--- a/src/libjava/classpath     (.../tags/gcc_4_8_3_release)
 
1554
+++ b/src/libjava/classpath     (.../branches/gcc-4_8-branch)
 
1555
 
 
1556
Property changes on: libjava/classpath
 
1557
___________________________________________________________________
 
1558
Modified: svn:mergeinfo
 
1559
   Merged /trunk/libjava/classpath:r211733,215049
 
1560
Index: configure
 
1561
===================================================================
 
1562
--- a/src/configure     (.../tags/gcc_4_8_3_release)
 
1563
+++ b/src/configure     (.../branches/gcc-4_8-branch)
 
1564
@@ -3834,6 +3834,9 @@
 
1565
   *-mingw*)
 
1566
     host_makefile_frag="config/mh-mingw"
 
1567
     ;;
 
1568
+  alpha*-*-linux*)
 
1569
+    host_makefile_frag="config/mh-alpha-linux"
 
1570
+    ;;
 
1571
   hppa*-hp-hpux10*)
 
1572
     host_makefile_frag="config/mh-pa-hpux10"
 
1573
     ;;
 
1574
Index: libgcc/ChangeLog
 
1575
===================================================================
 
1576
--- a/src/libgcc/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1577
+++ b/src/libgcc/ChangeLog      (.../branches/gcc-4_8-branch)
 
1578
@@ -1,3 +1,14 @@
 
1579
+2014-10-26  John David Anglin  <danglin@gcc.gnu.org>
 
1580
+
 
1581
+       * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
 
1582
+       (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
 
1583
+       memory read accesses are ok.
 
1584
+
 
1585
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
1586
+
 
1587
+       * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
 
1588
+       bits not set bits as indicating trapping exceptions.
 
1589
+
 
1590
 2014-05-22  Release Manager
 
1591
 
 
1592
        * GCC 4.8.3 released.
 
1593
Index: libgcc/config/i386/sfp-machine.h
 
1594
===================================================================
 
1595
--- a/src/libgcc/config/i386/sfp-machine.h      (.../tags/gcc_4_8_3_release)
 
1596
+++ b/src/libgcc/config/i386/sfp-machine.h      (.../branches/gcc-4_8-branch)
 
1597
@@ -59,7 +59,7 @@
 
1598
       __sfp_handle_exceptions (_fex);          \
 
1599
   } while (0);
 
1600
 
 
1601
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1602
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1603
 
 
1604
 #define FP_ROUNDMODE           (_fcw & FP_RND_MASK)
 
1605
 #endif
 
1606
Index: libgcc/config/pa/linux-unwind.h
 
1607
===================================================================
 
1608
--- a/src/libgcc/config/pa/linux-unwind.h       (.../tags/gcc_4_8_3_release)
 
1609
+++ b/src/libgcc/config/pa/linux-unwind.h       (.../branches/gcc-4_8-branch)
 
1610
@@ -32,6 +32,17 @@
 
1611
 #include <signal.h>
 
1612
 #include <sys/ucontext.h>
 
1613
 
 
1614
+/* Return TRUE if read access to *P is allowed.  */
 
1615
+
 
1616
+static inline long
 
1617
+pa32_read_access_ok (void *p)
 
1618
+{
 
1619
+  long ret;
 
1620
+
 
1621
+  __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
 
1622
+  return ret;
 
1623
+}
 
1624
+
 
1625
 /* Unfortunately, because of various bugs and changes to the kernel,
 
1626
    we have several cases to deal with.
 
1627
 
 
1628
@@ -48,8 +59,13 @@
 
1629
    tell us how to locate the sigcontext structure.
 
1630
 
 
1631
    Note that with a 2.4 64-bit kernel, the signal context is not properly
 
1632
-   passed back to userspace so the unwind will not work correctly.  */
 
1633
+   passed back to userspace so the unwind will not work correctly.
 
1634
 
 
1635
+   There is also a bug in various glibc versions.  The (CONTEXT)->ra
 
1636
+   for the outermost frame is not marked as undefined, so we need to
 
1637
+   check whether read access is allowed for all the accesses used in
 
1638
+   searching for the signal trampoline.  */
 
1639
+
 
1640
 #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
 
1641
 
 
1642
 static _Unwind_Reason_Code
 
1643
@@ -73,14 +89,17 @@
 
1644
      e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
 
1645
      08000240 nop  */
 
1646
 
 
1647
-  if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
 
1648
+  if (pa32_read_access_ok (pc)
 
1649
+      && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
1650
     off = 4*4;
 
1651
-  else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
 
1652
+  else if (pa32_read_access_ok (&pc[4])
 
1653
+          && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
 
1654
     {
 
1655
       pc += 4;
 
1656
       off = 10 * 4;
 
1657
     }
 
1658
-  else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
 
1659
+  else if (pa32_read_access_ok (&pc[5])
 
1660
+          && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
 
1661
     {
 
1662
       pc += 5;
 
1663
       off = 10 * 4;
 
1664
@@ -96,13 +115,16 @@
 
1665
         word boundary and we can then determine the frame offset.  */
 
1666
       sp = (unsigned long)context->ra;
 
1667
       pc = (unsigned int *)sp;
 
1668
-      if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
 
1669
+      if ((sp & 4)
 
1670
+         && pa32_read_access_ok (pc)
 
1671
+         && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
1672
        off = 5 * 4;
 
1673
       else
 
1674
        return _URC_END_OF_STACK;
 
1675
     }
 
1676
 
 
1677
-  if (pc[1] != 0x3414015a
 
1678
+  if (!pa32_read_access_ok (&pc[3])
 
1679
+      || pc[1] != 0x3414015a
 
1680
       || pc[2] != 0xe4008200
 
1681
       || pc[3] != 0x08000240)
 
1682
     return _URC_END_OF_STACK;
 
1683
Index: gcc/tree-ssa-tail-merge.c
 
1684
===================================================================
 
1685
--- a/src/gcc/tree-ssa-tail-merge.c     (.../tags/gcc_4_8_3_release)
 
1686
+++ b/src/gcc/tree-ssa-tail-merge.c     (.../branches/gcc-4_8-branch)
 
1687
@@ -298,7 +298,8 @@
 
1688
   def_operand_p def_p;
 
1689
 
 
1690
   if (gimple_has_side_effects (stmt)
 
1691
-      || gimple_vdef (stmt) != NULL_TREE)
 
1692
+      || gimple_vdef (stmt) != NULL_TREE
 
1693
+      || gimple_vuse (stmt) != NULL_TREE)
 
1694
     return false;
 
1695
 
 
1696
   def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
 
1697
@@ -1060,6 +1061,24 @@
 
1698
     gcc_unreachable ();
 
1699
 }
 
1700
 
 
1701
+/* Return true if gimple operands T1 and T2 have the same value.  */
 
1702
+
 
1703
+static bool
 
1704
+gimple_operand_equal_value_p (tree t1, tree t2)
 
1705
+{
 
1706
+  if (t1 == t2)
 
1707
+    return true;
 
1708
+
 
1709
+  if (t1 == NULL_TREE
 
1710
+      || t2 == NULL_TREE)
 
1711
+    return false;
 
1712
+
 
1713
+  if (operand_equal_p (t1, t2, 0))
 
1714
+    return true;
 
1715
+
 
1716
+  return gvn_uses_equal (t1, t2);
 
1717
+}
 
1718
+
 
1719
 /* Return true if gimple statements S1 and S2 are equal.  Gimple_bb (s1) and
 
1720
    gimple_bb (s2) are members of SAME_SUCC.  */
 
1721
 
 
1722
@@ -1122,11 +1141,13 @@
 
1723
       lhs2 = gimple_get_lhs (s2);
 
1724
       if (TREE_CODE (lhs1) != SSA_NAME
 
1725
          && TREE_CODE (lhs2) != SSA_NAME)
 
1726
-       return (vn_valueize (gimple_vdef (s1))
 
1727
-               == vn_valueize (gimple_vdef (s2)));
 
1728
+       return (operand_equal_p (lhs1, lhs2, 0)
 
1729
+               && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
 
1730
+                                                gimple_assign_rhs1 (s2)));
 
1731
       else if (TREE_CODE (lhs1) == SSA_NAME
 
1732
               && TREE_CODE (lhs2) == SSA_NAME)
 
1733
-       return vn_valueize (lhs1) == vn_valueize (lhs2);
 
1734
+       return operand_equal_p (gimple_assign_rhs1 (s1),
 
1735
+                               gimple_assign_rhs1 (s2), 0);
 
1736
       return false;
 
1737
 
 
1738
     case GIMPLE_COND:
 
1739
Index: gcc/DATESTAMP
 
1740
===================================================================
 
1741
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
 
1742
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
 
1743
@@ -1 +1 @@
 
1744
-20140522
 
1745
+20141129
 
1746
Index: gcc/tree-ssa-strlen.c
 
1747
===================================================================
 
1748
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
 
1749
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
 
1750
@@ -1777,7 +1777,7 @@
 
1751
            break;
 
1752
          }
 
1753
     }
 
1754
-  else if (is_gimple_assign (stmt))
 
1755
+  else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
 
1756
     {
 
1757
       tree lhs = gimple_assign_lhs (stmt);
 
1758
 
 
1759
Index: gcc/ipa-cp.c
 
1760
===================================================================
 
1761
--- a/src/gcc/ipa-cp.c  (.../tags/gcc_4_8_3_release)
 
1762
+++ b/src/gcc/ipa-cp.c  (.../branches/gcc-4_8-branch)
 
1763
@@ -447,6 +447,8 @@
 
1764
   else if (!opt_for_fn (node->symbol.decl, optimize)
 
1765
           || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
 
1766
     reason = "non-optimized function";
 
1767
+  else if (node->tm_clone)
 
1768
+    reason = "transactional memory clone";
 
1769
 
 
1770
   if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
 
1771
     fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
 
1772
@@ -2902,6 +2904,11 @@
 
1773
                intersect_with_agg_replacements (cs->caller, src_idx,
 
1774
                                                 &inter, 0);
 
1775
            }
 
1776
+         else
 
1777
+           {
 
1778
+             inter.release ();
 
1779
+             return vNULL;
 
1780
+           }
 
1781
        }
 
1782
       else
 
1783
        {
 
1784
@@ -2917,6 +2924,11 @@
 
1785
              else
 
1786
                intersect_with_plats (src_plats, &inter, 0);
 
1787
            }
 
1788
+         else
 
1789
+           {
 
1790
+             inter.release ();
 
1791
+             return vNULL;
 
1792
+           }
 
1793
        }
 
1794
     }
 
1795
   else if (jfunc->type == IPA_JF_ANCESTOR
 
1796
@@ -3000,7 +3012,8 @@
 
1797
                                          vec<cgraph_edge_p> callers)
 
1798
 {
 
1799
   struct ipa_node_params *dest_info = IPA_NODE_REF (node);
 
1800
-  struct ipa_agg_replacement_value *res = NULL;
 
1801
+  struct ipa_agg_replacement_value *res;
 
1802
+  struct ipa_agg_replacement_value **tail = &res;
 
1803
   struct cgraph_edge *cs;
 
1804
   int i, j, count = ipa_get_param_count (dest_info);
 
1805
 
 
1806
@@ -3044,8 +3057,8 @@
 
1807
          v->offset = item->offset;
 
1808
          v->value = item->value;
 
1809
          v->by_ref = plats->aggs_by_ref;
 
1810
-         v->next = res;
 
1811
-         res = v;
 
1812
+         *tail = v;
 
1813
+         tail = &v->next;
 
1814
        }
 
1815
 
 
1816
     next_param:
 
1817
@@ -3052,6 +3065,7 @@
 
1818
       if (inter.exists ())
 
1819
        inter.release ();
 
1820
     }
 
1821
+  *tail = NULL;
 
1822
   return res;
 
1823
 }
 
1824
 
 
1825
@@ -3060,7 +3074,8 @@
 
1826
 static struct ipa_agg_replacement_value *
 
1827
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
 
1828
 {
 
1829
-  struct ipa_agg_replacement_value *res = NULL;
 
1830
+  struct ipa_agg_replacement_value *res;
 
1831
+  struct ipa_agg_replacement_value **tail = &res;
 
1832
   struct ipa_agg_jump_function *aggjf;
 
1833
   struct ipa_agg_jf_item *item;
 
1834
   int i, j;
 
1835
@@ -3074,9 +3089,10 @@
 
1836
        v->offset = item->offset;
 
1837
        v->value = item->value;
 
1838
        v->by_ref = aggjf->by_ref;
 
1839
-       v->next = res;
 
1840
-       res = v;
 
1841
+       *tail = v;
 
1842
+       tail = &v->next;
 
1843
       }
 
1844
+  *tail = NULL;
 
1845
   return res;
 
1846
 }
 
1847
 
 
1848
Index: gcc/configure
 
1849
===================================================================
 
1850
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
 
1851
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
 
1852
@@ -910,6 +910,7 @@
 
1853
 enable_gnu_indirect_function
 
1854
 enable_initfini_array
 
1855
 enable_comdat
 
1856
+enable_fix_cortex_a53_835769
 
1857
 enable_gnu_unique_object
 
1858
 enable_linker_build_id
 
1859
 with_long_double_128
 
1860
@@ -1619,6 +1620,14 @@
 
1861
                           glibc systems
 
1862
   --enable-initfini-array      use .init_array/.fini_array sections
 
1863
   --enable-comdat         enable COMDAT group support
 
1864
+
 
1865
+  --enable-fix-cortex-a53-835769
 
1866
+                          enable workaround for AArch64 Cortex-A53 erratum
 
1867
+                          835769 by default
 
1868
+  --disable-fix-cortex-a53-835769
 
1869
+                          disable workaround for AArch64 Cortex-A53 erratum
 
1870
+                          835769 by default
 
1871
+
 
1872
   --enable-gnu-unique-object
 
1873
                           enable the use of the @gnu_unique_object ELF
 
1874
                           extension on glibc systems
 
1875
@@ -17838,7 +17847,7 @@
 
1876
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1877
   lt_status=$lt_dlunknown
 
1878
   cat > conftest.$ac_ext <<_LT_EOF
 
1879
-#line 17841 "configure"
 
1880
+#line 17850 "configure"
 
1881
 #include "confdefs.h"
 
1882
 
 
1883
 #if HAVE_DLFCN_H
 
1884
@@ -17944,7 +17953,7 @@
 
1885
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1886
   lt_status=$lt_dlunknown
 
1887
   cat > conftest.$ac_ext <<_LT_EOF
 
1888
-#line 17947 "configure"
 
1889
+#line 17956 "configure"
 
1890
 #include "confdefs.h"
 
1891
 
 
1892
 #if HAVE_DLFCN_H
 
1893
@@ -23796,6 +23805,28 @@
 
1894
 $as_echo "$gcc_cv_lto_plugin" >&6; }
 
1895
 
 
1896
 case "$target" in
 
1897
+
 
1898
+  aarch64*-*-*)
 
1899
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
1900
+    # Check whether --enable-fix-cortex-a53-835769 was given.
 
1901
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
 
1902
+  enableval=$enable_fix_cortex_a53_835769;
 
1903
+        case $enableval in
 
1904
+          yes)
 
1905
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
1906
+            ;;
 
1907
+          no)
 
1908
+            ;;
 
1909
+          *)
 
1910
+            as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
1911
+  Valid choices are 'yes' and 'no'." "$LINENO" 5
 
1912
+            ;;
 
1913
+
 
1914
+        esac
 
1915
+
 
1916
+fi
 
1917
+
 
1918
+  ;;
 
1919
   # All TARGET_ABI_OSF targets.
 
1920
   alpha*-*-linux* | alpha*-*-*bsd*)
 
1921
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
 
1922
Index: gcc/fold-const.c
 
1923
===================================================================
 
1924
--- a/src/gcc/fold-const.c      (.../tags/gcc_4_8_3_release)
 
1925
+++ b/src/gcc/fold-const.c      (.../branches/gcc-4_8-branch)
 
1926
@@ -8929,7 +8929,8 @@
 
1927
       /* If the constant operation overflowed this can be
 
1928
         simplified as a comparison against INT_MAX/INT_MIN.  */
 
1929
       if (TREE_CODE (lhs) == INTEGER_CST
 
1930
-         && TREE_OVERFLOW (lhs))
 
1931
+         && TREE_OVERFLOW (lhs)
 
1932
+         && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
 
1933
        {
 
1934
          int const1_sgn = tree_int_cst_sgn (const1);
 
1935
          enum tree_code code2 = code;
 
1936
@@ -9213,7 +9214,7 @@
 
1937
   /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
 
1938
      X CMP Y +- C2 +- C1 for signed X, Y.  This is valid if
 
1939
      the resulting offset is smaller in absolute value than the
 
1940
-     original one.  */
 
1941
+     original one and has the same sign.  */
 
1942
   if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
 
1943
       && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
 
1944
       && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
 
1945
@@ -9232,19 +9233,20 @@
 
1946
                                      "a comparison");
 
1947
 
 
1948
       /* Put the constant on the side where it doesn't overflow and is
 
1949
-        of lower absolute value than before.  */
 
1950
+        of lower absolute value and of same sign than before.  */
 
1951
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1952
                             ? MINUS_EXPR : PLUS_EXPR,
 
1953
                             const2, const1);
 
1954
       if (!TREE_OVERFLOW (cst)
 
1955
-         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
 
1956
+         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
 
1957
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
 
1958
        {
 
1959
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1960
          return fold_build2_loc (loc, code, type,
 
1961
-                             variable1,
 
1962
-                             fold_build2_loc (loc,
 
1963
-                                          TREE_CODE (arg1), TREE_TYPE (arg1),
 
1964
-                                          variable2, cst));
 
1965
+                                 variable1,
 
1966
+                                 fold_build2_loc (loc, TREE_CODE (arg1),
 
1967
+                                                  TREE_TYPE (arg1),
 
1968
+                                                  variable2, cst));
 
1969
        }
 
1970
 
 
1971
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1972
@@ -9251,13 +9253,15 @@
 
1973
                             ? MINUS_EXPR : PLUS_EXPR,
 
1974
                             const1, const2);
 
1975
       if (!TREE_OVERFLOW (cst)
 
1976
-         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
 
1977
+         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
 
1978
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
 
1979
        {
 
1980
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1981
          return fold_build2_loc (loc, code, type,
 
1982
-                             fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
 
1983
-                                          variable1, cst),
 
1984
-                             variable2);
 
1985
+                                 fold_build2_loc (loc, TREE_CODE (arg0),
 
1986
+                                                  TREE_TYPE (arg0),
 
1987
+                                                  variable1, cst),
 
1988
+                                 variable2);
 
1989
        }
 
1990
     }
 
1991
 
 
1992
@@ -11218,7 +11222,6 @@
 
1993
        {
 
1994
          double_int c1, c2, c3, msk;
 
1995
          int width = TYPE_PRECISION (type), w;
 
1996
-         bool try_simplify = true;
 
1997
 
 
1998
          c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
 
1999
          c2 = tree_to_double_int (arg1);
 
2000
@@ -11255,20 +11258,7 @@
 
2001
                }
 
2002
            }
 
2003
 
 
2004
-         /* If X is a tree of the form (Y * K1) & K2, this might conflict
 
2005
-            with that optimization from the BIT_AND_EXPR optimizations.
 
2006
-            This could end up in an infinite recursion.  */
 
2007
-         if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
 
2008
-             && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
 
2009
-                           == INTEGER_CST)
 
2010
-         {
 
2011
-           tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
 
2012
-           double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
 
2013
-
 
2014
-           try_simplify = (masked != c1);
 
2015
-         }
 
2016
-
 
2017
-         if (try_simplify && c3 != c1)
 
2018
+         if (c3 != c1)
 
2019
            return fold_build2_loc (loc, BIT_IOR_EXPR, type,
 
2020
                                    fold_build2_loc (loc, BIT_AND_EXPR, type,
 
2021
                                                     TREE_OPERAND (arg0, 0),
 
2022
@@ -11658,16 +11648,25 @@
 
2023
          && TREE_CODE (arg0) == MULT_EXPR
 
2024
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
 
2025
        {
 
2026
+         double_int darg1 = tree_to_double_int (arg1);
 
2027
          double_int masked
 
2028
-           = mask_with_tz (type, tree_to_double_int (arg1),
 
2029
+           = mask_with_tz (type, darg1,
 
2030
                            tree_to_double_int (TREE_OPERAND (arg0, 1)));
 
2031
 
 
2032
          if (masked.is_zero ())
 
2033
            return omit_two_operands_loc (loc, type, build_zero_cst (type),
 
2034
                                          arg0, arg1);
 
2035
-         else if (masked != tree_to_double_int (arg1))
 
2036
-           return fold_build2_loc (loc, code, type, op0,
 
2037
-                                   double_int_to_tree (type, masked));
 
2038
+         else if (masked != darg1)
 
2039
+           {
 
2040
+             /* Avoid the transform if arg1 is a mask of some
 
2041
+                mode which allows further optimizations.  */
 
2042
+             int pop = darg1.popcount ();
 
2043
+             if (!(pop >= BITS_PER_UNIT
 
2044
+                   && exact_log2 (pop) != -1
 
2045
+                   && double_int::mask (pop) == darg1))
 
2046
+               return fold_build2_loc (loc, code, type, op0,
 
2047
+                                       double_int_to_tree (type, masked));
 
2048
+           }
 
2049
        }
 
2050
 
 
2051
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
 
2052
@@ -13083,6 +13082,8 @@
 
2053
          tree arg01 = TREE_OPERAND (arg0, 1);
 
2054
          tree itype = TREE_TYPE (arg00);
 
2055
          if (TREE_INT_CST_HIGH (arg01) == 0
 
2056
+             && !(TREE_CODE (itype) == COMPLEX_TYPE
 
2057
+                  || TREE_CODE (itype) == VECTOR_TYPE)
 
2058
              && TREE_INT_CST_LOW (arg01)
 
2059
                 == (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
 
2060
            {
 
2061
Index: gcc/omp-low.c
 
2062
===================================================================
 
2063
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
 
2064
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
 
2065
@@ -128,6 +128,7 @@
 
2066
 static int taskreg_nesting_level;
 
2067
 struct omp_region *root_omp_region;
 
2068
 static bitmap task_shared_vars;
 
2069
+static vec<omp_context *> taskreg_contexts;
 
2070
 
 
2071
 static void scan_omp (gimple_seq *, omp_context *);
 
2072
 static tree scan_omp_1_op (tree *, int *, void *);
 
2073
@@ -1586,7 +1587,6 @@
 
2074
   TREE_STATIC (decl) = 1;
 
2075
   TREE_USED (decl) = 1;
 
2076
   DECL_ARTIFICIAL (decl) = 1;
 
2077
-  DECL_NAMELESS (decl) = 1;
 
2078
   DECL_IGNORED_P (decl) = 0;
 
2079
   TREE_PUBLIC (decl) = 0;
 
2080
   DECL_UNINLINABLE (decl) = 1;
 
2081
@@ -1656,6 +1656,7 @@
 
2082
     }
 
2083
 
 
2084
   ctx = new_omp_context (stmt, outer_ctx);
 
2085
+  taskreg_contexts.safe_push (ctx);
 
2086
   if (taskreg_nesting_level > 1)
 
2087
     ctx->is_nested = true;
 
2088
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
 
2089
@@ -1675,11 +1676,6 @@
 
2090
 
 
2091
   if (TYPE_FIELDS (ctx->record_type) == NULL)
 
2092
     ctx->record_type = ctx->receiver_decl = NULL;
 
2093
-  else
 
2094
-    {
 
2095
-      layout_type (ctx->record_type);
 
2096
-      fixup_child_record_type (ctx);
 
2097
-    }
 
2098
 }
 
2099
 
 
2100
 /* Scan an OpenMP task directive.  */
 
2101
@@ -1690,7 +1686,6 @@
 
2102
   omp_context *ctx;
 
2103
   tree name, t;
 
2104
   gimple stmt = gsi_stmt (*gsi);
 
2105
-  location_t loc = gimple_location (stmt);
 
2106
 
 
2107
   /* Ignore task directives with empty bodies.  */
 
2108
   if (optimize > 0
 
2109
@@ -1701,6 +1696,7 @@
 
2110
     }
 
2111
 
 
2112
   ctx = new_omp_context (stmt, outer_ctx);
 
2113
+  taskreg_contexts.safe_push (ctx);
 
2114
   if (taskreg_nesting_level > 1)
 
2115
     ctx->is_nested = true;
 
2116
   ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
 
2117
@@ -1738,8 +1734,71 @@
 
2118
       t = build_int_cst (long_integer_type_node, 1);
 
2119
       gimple_omp_task_set_arg_align (stmt, t);
 
2120
     }
 
2121
+}
 
2122
+
 
2123
+
 
2124
+/* If any decls have been made addressable during scan_omp,
 
2125
+   adjust their fields if needed, and layout record types
 
2126
+   of parallel/task constructs.  */
 
2127
+
 
2128
+static void
 
2129
+finish_taskreg_scan (omp_context *ctx)
 
2130
+{
 
2131
+  if (ctx->record_type == NULL_TREE)
 
2132
+    return;
 
2133
+
 
2134
+  /* If any task_shared_vars were needed, verify all
 
2135
+     OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
 
2136
+     statements if use_pointer_for_field hasn't changed
 
2137
+     because of that.  If it did, update field types now.  */
 
2138
+  if (task_shared_vars)
 
2139
+    {
 
2140
+      tree c;
 
2141
+
 
2142
+      for (c = gimple_omp_taskreg_clauses (ctx->stmt);
 
2143
+          c; c = OMP_CLAUSE_CHAIN (c))
 
2144
+       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
 
2145
+         {
 
2146
+           tree decl = OMP_CLAUSE_DECL (c);
 
2147
+
 
2148
+           /* Global variables don't need to be copied,
 
2149
+              the receiver side will use them directly.  */
 
2150
+           if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
 
2151
+             continue;
 
2152
+           if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
 
2153
+               || !use_pointer_for_field (decl, ctx))
 
2154
+             continue;
 
2155
+           tree field = lookup_field (decl, ctx);
 
2156
+           if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
 
2157
+               && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
 
2158
+             continue;
 
2159
+           TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
 
2160
+           TREE_THIS_VOLATILE (field) = 0;
 
2161
+           DECL_USER_ALIGN (field) = 0;
 
2162
+           DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
 
2163
+           if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
 
2164
+             TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
 
2165
+           if (ctx->srecord_type)
 
2166
+             {
 
2167
+               tree sfield = lookup_sfield (decl, ctx);
 
2168
+               TREE_TYPE (sfield) = TREE_TYPE (field);
 
2169
+               TREE_THIS_VOLATILE (sfield) = 0;
 
2170
+               DECL_USER_ALIGN (sfield) = 0;
 
2171
+               DECL_ALIGN (sfield) = DECL_ALIGN (field);
 
2172
+               if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
 
2173
+                 TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
 
2174
+             }
 
2175
+         }
 
2176
+    }
 
2177
+
 
2178
+  if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
 
2179
+    {
 
2180
+      layout_type (ctx->record_type);
 
2181
+      fixup_child_record_type (ctx);
 
2182
+    }
 
2183
   else
 
2184
     {
 
2185
+      location_t loc = gimple_location (ctx->stmt);
 
2186
       tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
 
2187
       /* Move VLA fields to the end.  */
 
2188
       p = &TYPE_FIELDS (ctx->record_type);
 
2189
@@ -1759,12 +1818,12 @@
 
2190
       fixup_child_record_type (ctx);
 
2191
       if (ctx->srecord_type)
 
2192
        layout_type (ctx->srecord_type);
 
2193
-      t = fold_convert_loc (loc, long_integer_type_node,
 
2194
-                       TYPE_SIZE_UNIT (ctx->record_type));
 
2195
-      gimple_omp_task_set_arg_size (stmt, t);
 
2196
+      tree t = fold_convert_loc (loc, long_integer_type_node,
 
2197
+                                TYPE_SIZE_UNIT (ctx->record_type));
 
2198
+      gimple_omp_task_set_arg_size (ctx->stmt, t);
 
2199
       t = build_int_cst (long_integer_type_node,
 
2200
                         TYPE_ALIGN_UNIT (ctx->record_type));
 
2201
-      gimple_omp_task_set_arg_align (stmt, t);
 
2202
+      gimple_omp_task_set_arg_align (ctx->stmt, t);
 
2203
     }
 
2204
 }
 
2205
 
 
2206
@@ -7113,6 +7172,8 @@
 
2207
 execute_lower_omp (void)
 
2208
 {
 
2209
   gimple_seq body;
 
2210
+  int i;
 
2211
+  omp_context *ctx;
 
2212
 
 
2213
   /* This pass always runs, to provide PROP_gimple_lomp.
 
2214
      But there is nothing to do unless -fopenmp is given.  */
 
2215
@@ -7125,6 +7186,9 @@
 
2216
   body = gimple_body (current_function_decl);
 
2217
   scan_omp (&body, NULL);
 
2218
   gcc_assert (taskreg_nesting_level == 0);
 
2219
+  FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
 
2220
+    finish_taskreg_scan (ctx);
 
2221
+  taskreg_contexts.release ();
 
2222
 
 
2223
   if (all_contexts->root)
 
2224
     {
 
2225
Index: gcc/toplev.c
 
2226
===================================================================
 
2227
--- a/src/gcc/toplev.c  (.../tags/gcc_4_8_3_release)
 
2228
+++ b/src/gcc/toplev.c  (.../branches/gcc-4_8-branch)
 
2229
@@ -1036,16 +1036,19 @@
 
2230
 
 
2231
   if (warn_stack_usage >= 0)
 
2232
     {
 
2233
+      const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
 
2234
+
 
2235
       if (stack_usage_kind == DYNAMIC)
 
2236
-       warning (OPT_Wstack_usage_, "stack usage might be unbounded");
 
2237
+       warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
 
2238
       else if (stack_usage > warn_stack_usage)
 
2239
        {
 
2240
          if (stack_usage_kind == DYNAMIC_BOUNDED)
 
2241
-           warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
2242
-                    stack_usage);
 
2243
+           warning_at (loc,
 
2244
+                       OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
2245
+                       stack_usage);
 
2246
          else
 
2247
-           warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
 
2248
-                    stack_usage);
 
2249
+           warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
 
2250
+                       stack_usage);
 
2251
        }
 
2252
     }
 
2253
 }
 
2254
Index: gcc/tree-ssa-sccvn.c
 
2255
===================================================================
 
2256
--- a/src/gcc/tree-ssa-sccvn.c  (.../tags/gcc_4_8_3_release)
 
2257
+++ b/src/gcc/tree-ssa-sccvn.c  (.../branches/gcc-4_8-branch)
 
2258
@@ -3015,33 +3015,12 @@
 
2259
   /* If all value numbered to the same value, the phi node has that
 
2260
      value.  */
 
2261
   if (allsame)
 
2262
-    {
 
2263
-      if (is_gimple_min_invariant (sameval))
 
2264
-       {
 
2265
-         VN_INFO (PHI_RESULT (phi))->has_constants = true;
 
2266
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
2267
-       }
 
2268
-      else
 
2269
-       {
 
2270
-         VN_INFO (PHI_RESULT (phi))->has_constants = false;
 
2271
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
2272
-       }
 
2273
+    return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
2274
 
 
2275
-      if (TREE_CODE (sameval) == SSA_NAME)
 
2276
-       return visit_copy (PHI_RESULT (phi), sameval);
 
2277
-
 
2278
-      return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
2279
-    }
 
2280
-
 
2281
   /* Otherwise, see if it is equivalent to a phi node in this block.  */
 
2282
   result = vn_phi_lookup (phi);
 
2283
   if (result)
 
2284
-    {
 
2285
-      if (TREE_CODE (result) == SSA_NAME)
 
2286
-       changed = visit_copy (PHI_RESULT (phi), result);
 
2287
-      else
 
2288
-       changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
2289
-    }
 
2290
+    changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
2291
   else
 
2292
     {
 
2293
       vn_phi_insert (phi, PHI_RESULT (phi));
 
2294
@@ -3142,24 +3121,18 @@
 
2295
      catch those with constants.  The goal here is to simultaneously
 
2296
      combine constants between expressions, but avoid infinite
 
2297
      expansion of expressions during simplification.  */
 
2298
-  if (TREE_CODE (op0) == SSA_NAME)
 
2299
-    {
 
2300
-      if (VN_INFO (op0)->has_constants
 
2301
+  op0 = vn_valueize (op0);
 
2302
+  if (TREE_CODE (op0) == SSA_NAME
 
2303
+      && (VN_INFO (op0)->has_constants
 
2304
          || TREE_CODE_CLASS (code) == tcc_comparison
 
2305
-         || code == COMPLEX_EXPR)
 
2306
-       op0 = valueize_expr (vn_get_expr_for (op0));
 
2307
-      else
 
2308
-       op0 = vn_valueize (op0);
 
2309
-    }
 
2310
+         || code == COMPLEX_EXPR))
 
2311
+    op0 = valueize_expr (vn_get_expr_for (op0));
 
2312
 
 
2313
-  if (TREE_CODE (op1) == SSA_NAME)
 
2314
-    {
 
2315
-      if (VN_INFO (op1)->has_constants
 
2316
-         || code == COMPLEX_EXPR)
 
2317
-       op1 = valueize_expr (vn_get_expr_for (op1));
 
2318
-      else
 
2319
-       op1 = vn_valueize (op1);
 
2320
-    }
 
2321
+  op1 = vn_valueize (op1);
 
2322
+  if (TREE_CODE (op1) == SSA_NAME
 
2323
+      && (VN_INFO (op1)->has_constants
 
2324
+         || code == COMPLEX_EXPR))
 
2325
+    op1 = valueize_expr (vn_get_expr_for (op1));
 
2326
 
 
2327
   /* Pointer plus constant can be represented as invariant address.
 
2328
      Do so to allow further propatation, see also tree forwprop.  */
 
2329
@@ -3217,27 +3190,31 @@
 
2330
     return NULL_TREE;
 
2331
 
 
2332
   orig_op0 = op0;
 
2333
-  if (VN_INFO (op0)->has_constants)
 
2334
-    op0 = valueize_expr (vn_get_expr_for (op0));
 
2335
-  else if (CONVERT_EXPR_CODE_P (code)
 
2336
-          || code == REALPART_EXPR
 
2337
-          || code == IMAGPART_EXPR
 
2338
-          || code == VIEW_CONVERT_EXPR
 
2339
-          || code == BIT_FIELD_REF)
 
2340
+  op0 = vn_valueize (op0);
 
2341
+  if (TREE_CODE (op0) == SSA_NAME)
 
2342
     {
 
2343
-      /* We want to do tree-combining on conversion-like expressions.
 
2344
-         Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2345
-      tree tem = valueize_expr (vn_get_expr_for (op0));
 
2346
-      if (UNARY_CLASS_P (tem)
 
2347
-         || BINARY_CLASS_P (tem)
 
2348
-         || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2349
-         || TREE_CODE (tem) == SSA_NAME
 
2350
-         || TREE_CODE (tem) == CONSTRUCTOR
 
2351
-         || is_gimple_min_invariant (tem))
 
2352
-       op0 = tem;
 
2353
+      if (VN_INFO (op0)->has_constants)
 
2354
+       op0 = valueize_expr (vn_get_expr_for (op0));
 
2355
+      else if (CONVERT_EXPR_CODE_P (code)
 
2356
+              || code == REALPART_EXPR
 
2357
+              || code == IMAGPART_EXPR
 
2358
+              || code == VIEW_CONVERT_EXPR
 
2359
+              || code == BIT_FIELD_REF)
 
2360
+       {
 
2361
+         /* We want to do tree-combining on conversion-like expressions.
 
2362
+            Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2363
+         tree tem = valueize_expr (vn_get_expr_for (op0));
 
2364
+         if (UNARY_CLASS_P (tem)
 
2365
+             || BINARY_CLASS_P (tem)
 
2366
+             || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2367
+             || TREE_CODE (tem) == SSA_NAME
 
2368
+             || TREE_CODE (tem) == CONSTRUCTOR
 
2369
+             || is_gimple_min_invariant (tem))
 
2370
+           op0 = tem;
 
2371
+       }
 
2372
     }
 
2373
 
 
2374
-  /* Avoid folding if nothing changed, but remember the expression.  */
 
2375
+  /* Avoid folding if nothing changed.  */
 
2376
   if (op0 == orig_op0)
 
2377
     return NULL_TREE;
 
2378
 
 
2379
Index: gcc/cgraphunit.c
 
2380
===================================================================
 
2381
--- a/src/gcc/cgraphunit.c      (.../tags/gcc_4_8_3_release)
 
2382
+++ b/src/gcc/cgraphunit.c      (.../branches/gcc-4_8-branch)
 
2383
@@ -1097,7 +1097,7 @@
 
2384
          /* We use local aliases for C++ thunks to force the tailcall
 
2385
             to bind locally.  This is a hack - to keep it working do
 
2386
             the following (which is not strictly correct).  */
 
2387
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
 
2388
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
 
2389
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
 
2390
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
 
2391
        {
 
2392
Index: gcc/ChangeLog
 
2393
===================================================================
 
2394
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
 
2395
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
 
2396
@@ -1,3 +1,1095 @@
 
2397
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
2398
+
 
2399
+       Backported from mainline
 
2400
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
 
2401
+
 
2402
+       PR middle-end/64067
 
2403
+       * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
 
2404
+       Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
 
2405
+       not only if modifier is EXPAND_INITIALIZER, but whenever
 
2406
+       COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
 
2407
+
 
2408
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
 
2409
+
 
2410
+       PR rtl-optimization/63659
 
2411
+       * ree.c (update_reg_equal_equiv_notes): New function.
 
2412
+       (combine_set_extension, transform_ifelse): Use it.
 
2413
+
 
2414
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
2415
+
 
2416
+       PR libgomp/61200
 
2417
+       * omp-low.c (taskreg_contexts): New variable.
 
2418
+       (scan_omp_parallel): Push newly created context into taskreg_contexts
 
2419
+       vector and move record layout code to finish_taskreg_scan.
 
2420
+       (scan_omp_task): Likewise.
 
2421
+       (finish_taskreg_scan): New function.
 
2422
+       (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
 
2423
+       vector elements and release it.
 
2424
+
 
2425
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
2426
+
 
2427
+       Backport from mainline
 
2428
+       2014-10-08  Richard Biener  <rguenther@suse.de>
 
2429
+
 
2430
+       PR tree-optimization/61969
 
2431
+       * tree-nrv.c (pass_nrv::execute): Properly test for automatic
 
2432
+       variables.
 
2433
+
 
2434
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
2435
+
 
2436
+       PR tree-optimization/62031
 
2437
+       * tree-data-ref.c (dr_analyze_indices): Do not set
 
2438
+       DR_UNCONSTRAINED_BASE.
 
2439
+       (dr_may_alias_p): All indirect accesses have to go the
 
2440
+       formerly DR_UNCONSTRAINED_BASE path.
 
2441
+       * tree-data-ref.h (struct indices): Remove
 
2442
+       unconstrained_base member.
 
2443
+       (DR_UNCONSTRAINED_BASE): Remove.
 
2444
+
 
2445
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
2446
+
 
2447
+       PR tree-optimization/63379
 
2448
+       * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
 
2449
+       a neutral operand for min/max when it is not a reduction chain.
 
2450
+
 
2451
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
2452
+
 
2453
+       PR tree-optimization/63605
 
2454
+       * fold-const.c (fold_binary_loc): Properly use element_precision
 
2455
+       for types that may not be scalar.
 
2456
+
 
2457
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
2458
+
 
2459
+       PR middle-end/63665
 
2460
+       * fold-const.c (fold_comparison): Properly guard simplifying
 
2461
+       against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
 
2462
+
 
2463
+2014-11-22  Oleg Endo  <olegendo@gcc.gnu.org>
 
2464
+
 
2465
+       Backport from mainline
 
2466
+       2014-11-20  Segher Boessenkool  <segher@kernel.crashing.org>
 
2467
+
 
2468
+       PR target/60111
 
2469
+       * config/sh/sh.c: Use signed char for signed field.
 
2470
+
 
2471
+2014-11-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2472
+
 
2473
+       PR target/63673
 
2474
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
 
2475
+       the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
 
2476
+       double.
 
2477
+
 
2478
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
2479
+
 
2480
+       PR target/63947
 
2481
+       * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
 
2482
+       Output "b" and "nb" suffix for FP mode.
 
2483
+
 
2484
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
2485
+
 
2486
+       Backport from mainline
 
2487
+       PR tree-optimization/62167
 
2488
+       * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
 
2489
+       conservatively.
 
2490
+       (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
 
2491
+       assigns.
 
2492
+
 
2493
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
2494
+
 
2495
+       Backport from mainline and gcc-4_9 branch.
 
2496
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
2497
+
 
2498
+       PR tree-optimization/63841
 
2499
+       * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
 
2500
+
 
2501
+2014-11-16  Eric Botcazou  <ebotcazou@adacore.com>
 
2502
+
 
2503
+       * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
 
2504
+       * doc/tm.texi: Regenerate.
 
2505
+
 
2506
+       Backport from mainline
 
2507
+       2013-09-16  Andreas Schwab  <schwab@linux-m68k.org>
 
2508
+
 
2509
+       * doc/tm.texi.in (Cond Exec Macros): Remove node.
 
2510
+       (Condition Code): Don't reference it.
 
2511
+       * doc/tm.texi: Regenerate.
 
2512
+
 
2513
+2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>
 
2514
+
 
2515
+       Backport from mainline
 
2516
+       2014-11-02  Michael Collison  <michael.collison@linaro.org>
 
2517
+
 
2518
+       * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
 
2519
+       to support vector modes.
 
2520
+       (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
 
2521
+
 
2522
+2014-11-13  Eric Botcazou  <ebotcazou@adacore.com>
 
2523
+
 
2524
+       * doc/tm.texi.in (SELECT_CC_MODE): Update example.
 
2525
+       (REVERSIBLE_CC_MODE): Fix example.
 
2526
+       (REVERSE_CONDITION): Fix typo.
 
2527
+       * doc/tm.texi: Regenerate.
 
2528
+
 
2529
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
2530
+
 
2531
+       PR ipa/63838
 
2532
+       * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
 
2533
+       chain instead of node->indirect_calls.
 
2534
+
 
2535
+2014-11-10  Daniel Hellstrom  <daniel@gaisler.com>
 
2536
+
 
2537
+       Backport from mainline
 
2538
+       * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
 
2539
+       * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
 
2540
+
 
2541
+2014-11-07  Daniel Hellstrom  <daniel@gaisler.com>
 
2542
+
 
2543
+       * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
 
2544
+       * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
 
2545
+       * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
 
2546
+       leon3v7 as leon3.
 
2547
+       * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
 
2548
+       * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
 
2549
+       * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
 
2550
+       * config/sparc/sparc.md (cpu): Add leon3v7.
 
2551
+       * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
 
2552
+
 
2553
+2014-11-06  John David Anglin  <danglin@gcc.gnu.org>
 
2554
+
 
2555
+       * config/pa/pa.md (trap): New insn.  Add "trap" to attribute type.
 
2556
+       Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
 
2557
+       or in_call_delay.
 
2558
+       
 
2559
+2014-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2560
+
 
2561
+       * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
 
2562
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
2563
+       * config/aarch64/aarch64-linux.h
 
2564
+       (CA53_ERR_835769_SPEC): Define.
 
2565
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
2566
+
 
2567
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2568
+
 
2569
+       * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
 
2570
+       recog state after aarch64_prev_real_insn call.
 
2571
+
 
2572
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2573
+
 
2574
+       * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
 
2575
+       if asked.
 
2576
+       * configure.ac: Add --enable-fix-cortex-a53-835769 option.
 
2577
+       * configure: Regenerate.
 
2578
+       * config/aarch64/aarch64.c (aarch64_override_options): Handle
 
2579
+       TARGET_FIX_ERR_A53_835769_DEFAULT.
 
2580
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
 
2581
+       to 2.
 
2582
+       * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
 
2583
+
 
2584
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2585
+
 
2586
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
 
2587
+       * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
 
2588
+       (FINAL_PRESCAN_INSN): Likewise.
 
2589
+       * config/aarch64/aarch64.h (is_mem_p): New function.
 
2590
+       (has_memory_op): Likewise.
 
2591
+       (aarch64_prev_real_insn): Likewise.
 
2592
+       (is_madd_op): Likewise.
 
2593
+       (dep_between_memop_and_curr): Likewise.
 
2594
+       (aarch64_madd_needs_nop): Likewise.
 
2595
+       (aarch64_final_prescan_insn): Likewise.
 
2596
+       * doc/invoke.texi (Document new option).
 
2597
+
 
2598
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
2599
+
 
2600
+       * stor-layout.c (self_referential_size): Do not promote arguments.
 
2601
+
 
2602
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2603
+
 
2604
+       Backport from mainline r215880
 
2605
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2606
+
 
2607
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
 
2608
+       Issue a warning message when vec_lvsl or vec_lvsr is used with a
 
2609
+       little endian target.
 
2610
+
 
2611
+       Backport from mainline r215882
 
2612
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2613
+
 
2614
+       * altivec.md (altivec_lvsl): New define_expand.
 
2615
+       (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
 
2616
+       (altivec_lvsr): New define_expand.
 
2617
+       (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
 
2618
+       * rs6000.c (rs6000_expand_builtin): Change to use
 
2619
+       altivec_lvs[lr]_direct; remove commented-out code.
 
2620
+
 
2621
+2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
2622
+
 
2623
+       Backport from mainline
 
2624
+       2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
2625
+
 
2626
+       PR rtl-optimization/57003
 
2627
+       * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
 
2628
+       also check CALL_INSN_FUNCTION_USAGE for clobbers again after
 
2629
+       killing regs_invalidated_by_call.
 
2630
+
 
2631
+2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
2632
+
 
2633
+       Backport from mainline
 
2634
+       2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
2635
+
 
2636
+       PR target/52941
 
2637
+       * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
 
2638
+       atomic_fetch_<fetchop_name>si_hard,
 
2639
+       atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
 
2640
+       atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
 
2641
+       atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
 
2642
+       atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
 
2643
+
 
2644
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
 
2645
+
 
2646
+       PR tree-optimization/63375
 
2647
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
 
2648
+       references.
 
2649
+
 
2650
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
2651
+
 
2652
+       PR debug/63342
 
2653
+       * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
 
2654
+       SSA_NAME.
 
2655
+
 
2656
+       PR target/63428
 
2657
+       * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
 
2658
+       argument to avx2_permv2ti.
 
2659
+
 
2660
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
2661
+
 
2662
+       Backport from mainline
 
2663
+       2014-09-30  Uros Bizjak  <ubizjak@gmail.com>
 
2664
+
 
2665
+       * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
 
2666
+       (fmod<mode>3): Ditto.
 
2667
+       (fpremxf4_i387): Ditto.
 
2668
+       (reminderxf3): Ditto.
 
2669
+       (reminder<mode>3): Ditto.
 
2670
+       (fprem1xf4_i387): Ditto.
 
2671
+
 
2672
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
2673
+
 
2674
+       PR inline-asm/63282
 
2675
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
 
2676
+       or invert_jump_1 if jump isn't any_condjump_p.
 
2677
+
 
2678
+2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
 
2679
+
 
2680
+       Backport from mainline r212303
 
2681
+       PR target/49423
 
2682
+       * config/arm/arm-protos.h (arm_legitimate_address_p,
 
2683
+       arm_is_constant_pool_ref): Add prototypes.
 
2684
+       * config/arm/arm.c (arm_legitimate_address_p): Remove static.
 
2685
+       (arm_is_constant_pool_ref) New function.
 
2686
+       * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
 
2687
+       arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
 
2688
+       (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
 
2689
+       operand and remove pool_range and neg_pool_range attributes.
 
2690
+       (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
 
2691
+       pool_range and neg_pool_range attributes.
 
2692
+       * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
 
2693
+       constant pool references.
 
2694
+
 
2695
+2014-09-28  John David Anglin  <danglin@gcc.gnu.org>
 
2696
+
 
2697
+       * config/pa/pa.c (pa_output_function_epilogue): Only update
 
2698
+       last_address when a nonnote insn is found.
 
2699
+
 
2700
+2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
2701
+
 
2702
+       Backport from mainline
 
2703
+       2014-09-25  Nick Clifton  <nickc@redhat.com>
 
2704
+       2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
2705
+
 
2706
+       PR target/62218
 
2707
+       * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
 
2708
+       atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
 
2709
+
 
2710
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2711
+
 
2712
+       Backport from mainline r215559
 
2713
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2714
+
 
2715
+       PR target/63335
 
2716
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
 
2717
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
 
2718
+
 
2719
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
2720
+
 
2721
+       PR tree-optimization/63341
 
2722
+       * tree-vectorizer.h (vect_create_data_ref_ptr,
 
2723
+       vect_create_addr_base_for_vector_ref): Add another tree argument
 
2724
+       defaulting to NULL_TREE.
 
2725
+       * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
 
2726
+       argument, pass it down to vect_create_addr_base_for_vector_ref.
 
2727
+       (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
 
2728
+       add that to base_offset too if non-NULL.
 
2729
+       * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
 
2730
+       for dr_explicit_realign_optimized set it to vector byte size
 
2731
+       - 1 instead of setting offset, pass byte_offset down to
 
2732
+       vect_create_data_ref_ptr.
 
2733
+
 
2734
+2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2735
+
 
2736
+       Back port from trunk:
 
2737
+       2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2738
+
 
2739
+       * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
 
2740
+       refine the constraints used on 32/64-bit floating point moves.
 
2741
+       (f32_av): Likewise.
 
2742
+       (f64_vsx): Likewise.
 
2743
+       (f64_dm): Likewise.
 
2744
+       (f64_av): Likewise.
 
2745
+       (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
 
2746
+       (BOOL_REGS_OP1): Likewise.
 
2747
+       (BOOL_REGS_OP2): Likewise.
 
2748
+       (BOOL_REGS_UNARY): Likewise.
 
2749
+       (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
 
2750
+       32/64-bit floating point moves.  Do not use wa, instead use ww/ws
 
2751
+       for moves involving VSX registers.  Do not use constraints that
 
2752
+       target VSX registers for decimal types.
 
2753
+       (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
 
2754
+       (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
 
2755
+
 
2756
+2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2757
+
 
2758
+       Back port from trunk:
 
2759
+       2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2760
+
 
2761
+       * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
 
2762
+       for base_reg_operand to be common between LO_SUM and PLUS.
 
2763
+       (fusion_gpr_mem_combo): New predicate to match a fused address
 
2764
+       that combines the addis and memory offset address.
 
2765
+
 
2766
+       * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
 
2767
+       calling signature.
 
2768
+       (emit_fusion_gpr_load): Likewise.
 
2769
+
 
2770
+       * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
 
2771
+       signature to pass each argument separately, rather than
 
2772
+       using an operands array.  Rewrite the insns found by peephole2 to
 
2773
+       be a single insn, rather than hoping the insns will still be
 
2774
+       together when the peephole pass is done.  Drop being called via a
 
2775
+       normal peephole.
 
2776
+       (emit_fusion_gpr_load): Change calling signature to be called from
 
2777
+       the fusion_gpr_load_<mode> insns with a combined memory address
 
2778
+       instead of the peephole pass passing the addis and offset
 
2779
+       separately.
 
2780
+
 
2781
+       * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
 
2782
+       fusion.
 
2783
+       (power8 fusion peephole): Drop support for doing power8 via a
 
2784
+       normal peephole that was created by the peephole2 pass.
 
2785
+       (power8 fusion peephole2): Create a new insn with the fused
 
2786
+       address, so that the fused operation is kept together after
 
2787
+       register allocation is done.
 
2788
+       (fusion_gpr_load_<mode>): Likewise.
 
2789
+
 
2790
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
2791
+
 
2792
+       PR debug/63284
 
2793
+       * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
 
2794
+       if there are only debug stmts after the noreturn call, instead
 
2795
+       remove the debug stmts.
 
2796
+
 
2797
+2014-09-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2798
+
 
2799
+       * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
 
2800
+       V2DF, V4SF, DF, and DI modes.
 
2801
+       (vsx_fmav2df2): Likewise.
 
2802
+       (vsx_float_fix_<mode>2): Likewise.
 
2803
+       (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
 
2804
+
 
2805
+2014-09-10  Alan Modra  <amodra@gmail.com>
 
2806
+
 
2807
+       PR debug/60655
 
2808
+       * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
 
2809
+       can't be output.
 
2810
+
 
2811
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
2812
+
 
2813
+       Backport from mainline
 
2814
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
2815
+
 
2816
+       PR tree-optimization/61452
 
2817
+       * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
 
2818
+       expr and has_constants in case we found a leader.
 
2819
+       (simplify_binary_expression): Always valueize operands first.
 
2820
+       (simplify_unary_expression): Likewise.
 
2821
+
 
2822
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
2823
+
 
2824
+       Backport from mainline
 
2825
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
2826
+
 
2827
+       PR middle-end/61010
 
2828
+       * fold-const.c (fold_binary_loc): Consistently avoid
 
2829
+       canonicalizing X & CST away from a CST that is the mask
 
2830
+       of a mode.
 
2831
+
 
2832
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
2833
+
 
2834
+       PR middle-end/61045
 
2835
+       * fold-const.c (fold_comparison): When folding
 
2836
+       X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
 
2837
+       the sign of the remaining constant operand stays the same.
 
2838
+
 
2839
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
2840
+
 
2841
+       PR tree-optimization/62075
 
2842
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
 
2843
+       handle uses in patterns.
 
2844
+
 
2845
+2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2846
+
 
2847
+       Backport from mainline.
 
2848
+       2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2849
+
 
2850
+       * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
 
2851
+       (-mtune): Likewise.
 
2852
+       (-mcpu): Likewise.
 
2853
+
 
2854
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2855
+
 
2856
+       PR tree-optimization/60196
 
2857
+       PR tree-optimization/63189
 
2858
+       Backported from mainline
 
2859
+       2013-09-17  Cong Hou  <congh@google.com>
 
2860
+
 
2861
+       * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
 
2862
+       when checking the dot production pattern. The type of rhs operand
 
2863
+       of multiply is now checked correctly.
 
2864
+
 
2865
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2866
+
 
2867
+       Backported from mainline
 
2868
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
2869
+
 
2870
+       PR debug/61923
 
2871
+       * haifa-sched.c (advance_one_cycle): Fix dump.
 
2872
+       (schedule_block): Don't advance cycle if we are already at the
 
2873
+       beginning of the cycle.
 
2874
+
 
2875
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2876
+
 
2877
+       PR ipa/62015
 
2878
+       * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
 
2879
+       pass-trough jump functions correctly.
 
2880
+
 
2881
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2882
+
 
2883
+       PR ipa/61986
 
2884
+       * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
 
2885
+       created replacements in ascending order of offsets.
 
2886
+       (known_aggs_to_agg_replacement_list): Likewise.
 
2887
+
 
2888
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2889
+
 
2890
+       Backport from mainline
 
2891
+       2014-08-21  Marek Polacek  <polacek@redhat.com>
 
2892
+
 
2893
+       PR c/61271
 
2894
+       * expr.c (is_aligning_offset): Remove logical not.
 
2895
+
 
2896
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2897
+
 
2898
+       Backport from mainline
 
2899
+       2014-08-19  Marek Polacek  <polacek@redhat.com>
 
2900
+
 
2901
+       PR c/61271
 
2902
+       * cgraphunit.c (handle_alias_pairs): Fix condition.
 
2903
+
 
2904
+2014-08-30  John David Anglin  <danglin@gcc.gnu.org>
 
2905
+
 
2906
+       * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
 
2907
+       prefix to function labels when generating fast indirect calls.
 
2908
+
 
2909
+2014-08-26  Joel Sherrill <joel.sherrill@oarcorp.com>
 
2910
+
 
2911
+       * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
 
2912
+
 
2913
+2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2914
+
 
2915
+       Backport from mainline
 
2916
+       2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2917
+
 
2918
+       PR c/61271
 
2919
+       * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
 
2920
+       LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
 
2921
+
 
2922
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2923
+
 
2924
+       Backport from mainline
 
2925
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2926
+
 
2927
+       PR target/61996
 
2928
+       * config/sh/sh.opt (musermode): Allow negative form.
 
2929
+       * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
 
2930
+       targets that don't support it.
 
2931
+       * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
 
2932
+       Document -mno-usermode option.
 
2933
+
 
2934
+2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
 
2935
+
 
2936
+       PR target/62038
 
2937
+       * config/pa/pa.c (pa_output_function_epilogue): Don't set
 
2938
+       last_address when the current function is a thunk.
 
2939
+       (pa_asm_output_mi_thunk): When we don't have named sections or they
 
2940
+       are not being used, check that thunk can reach the stub table with a
 
2941
+       short branch.
 
2942
+
 
2943
+2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2944
+
 
2945
+       Backport fro mainline
 
2946
+       2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2947
+
 
2948
+       PR target/62195
 
2949
+       * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
 
2950
+       documentation to state it is only for VSX operations.
 
2951
+
 
2952
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
 
2953
+       constraint only active if VSX.
 
2954
+
 
2955
+       * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
 
2956
+       wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
 
2957
+       (lfiwzx): Likewise.
 
2958
+
 
2959
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
2960
+
 
2961
+       Backport from mainline:
 
2962
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
2963
+
 
2964
+       PR rtl-optimization/62004
 
2965
+       PR rtl-optimization/62030
 
2966
+       * ifcvt.c (rtx_interchangeable_p): New function.
 
2967
+       (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
 
2968
+
 
2969
+       2014-08-05  Richard Biener  <rguenther@suse.de>
 
2970
+
 
2971
+       * emit-rtl.h (mem_attrs_eq_p): Declare.
 
2972
+       * emit-rtl.c (mem_attrs_eq_p): Export.
 
2973
+
 
2974
+2014-08-16  John David Anglin  <danglin@gcc.gnu.org>
 
2975
+
 
2976
+       Backport from trunk:
 
2977
+       2014-04-06  John David Anglin  <danglin@gcc.gnu.org>
 
2978
+
 
2979
+       PR debug/55794
 
2980
+       * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
 
2981
+       size accounting for thunks.
 
2982
+       (pa_asm_output_mi_thunk): Use final_start_function() and
 
2983
+       final_end_function() to output function start and end directives.
 
2984
+
 
2985
+2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2986
+
 
2987
+       Backport from mainline:
 
2988
+       2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2989
+
 
2990
+       * doc/invoke.texi (SH options): Document missing processor variant
 
2991
+       options.  Remove references to Hitachi.  Undocument deprecated mspace
 
2992
+       option.
 
2993
+
 
2994
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
2995
+
 
2996
+       PR tree-optimization/62073
 
2997
+       * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
 
2998
+       a basic block.
 
2999
+
 
3000
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3001
+
 
3002
+       Backport from mainline
 
3003
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3004
+
 
3005
+       PR middle-end/62103
 
3006
+       * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
 
3007
+       bitfields, that is when size doesn't match the size of type or the
 
3008
+       size of the constructor.
 
3009
+
 
3010
+2014-08-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3011
+
 
3012
+       Backport patch from mainline
 
3013
+       2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3014
+
 
3015
+       * config/rs6000/constraints.md (wh constraint): New constraint,
 
3016
+       for FP registers if direct move is available.
 
3017
+       (wi constraint): New constraint, for VSX/FP registers that can
 
3018
+       handle 64-bit integers.
 
3019
+       (wj constraint): New constraint for VSX/FP registers that can
 
3020
+       handle 64-bit integers for direct moves.
 
3021
+       (wk constraint): New constraint for VSX/FP registers that can
 
3022
+       handle 64-bit doubles for direct moves.
 
3023
+       (wy constraint): Make documentation match implementation.
 
3024
+
 
3025
+       * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
 
3026
+       scalar_in_vmx_p field to simplify tests of whether SFmode or
 
3027
+       DFmode can go in the Altivec registers.
 
3028
+       (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
 
3029
+       (rs6000_setup_reg_addr_masks): Likewise.
 
3030
+       (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
 
3031
+       field, and wh/wi/wj/wk constraints.
 
3032
+       (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
 
3033
+       the wh/wi/wj/wk constraints.
 
3034
+       (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
 
3035
+       upper registers, prefer VSX registers unless the operation is a
 
3036
+       memory operation with REG+OFFSET addressing.
 
3037
+
 
3038
+       * config/rs6000/vsx.md (VSr mode attribute): Add support for
 
3039
+       DImode.  Change SFmode to use ww constraint instead of d to allow
 
3040
+       SF registers in the upper registers.
 
3041
+       (VSr2): Likewise.
 
3042
+       (VSr3): Likewise.
 
3043
+       (VSr5): Fix thinko in comment.
 
3044
+       (VSa): New mode attribute that is an alternative to wa, that
 
3045
+       returns the VSX register class that a mode can go in, but may not
 
3046
+       be the preferred register class.
 
3047
+       (VS_64dm): New mode attribute for appropriate register classes for
 
3048
+       referencing 64-bit elements of vectors for direct moves and normal
 
3049
+       moves.
 
3050
+       (VS_64reg): Likewise.
 
3051
+       (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
 
3052
+       register allocator to only registers the data type can handle.
 
3053
+       (vsx_le_perm_load_<mode>): Likewise.
 
3054
+       (vsx_le_perm_store_<mode>): Likewise.
 
3055
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
3056
+       (vsx_xxpermdi4_le_<mode>): Likewise.
 
3057
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
3058
+       (vsx_lxvd2x4_le_<mode>): Likewise.
 
3059
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
3060
+       (vsx_add<mode>3): Likewise.
 
3061
+       (vsx_sub<mode>3): Likewise.
 
3062
+       (vsx_mul<mode>3): Likewise.
 
3063
+       (vsx_div<mode>3): Likewise.
 
3064
+       (vsx_tdiv<mode>3_internal): Likewise.
 
3065
+       (vsx_fre<mode>2): Likewise.
 
3066
+       (vsx_neg<mode>2): Likewise.
 
3067
+       (vsx_abs<mode>2): Likewise.
 
3068
+       (vsx_nabs<mode>2): Likewise.
 
3069
+       (vsx_smax<mode>3): Likewise.
 
3070
+       (vsx_smin<mode>3): Likewise.
 
3071
+       (vsx_sqrt<mode>2): Likewise.
 
3072
+       (vsx_rsqrte<mode>2): Likewise.
 
3073
+       (vsx_tsqrt<mode>2_internal): Likewise.
 
3074
+       (vsx_fms<mode>4): Likewise.
 
3075
+       (vsx_nfma<mode>4): Likewise.
 
3076
+       (vsx_eq<mode>): Likewise.
 
3077
+       (vsx_gt<mode>): Likewise.
 
3078
+       (vsx_ge<mode>): Likewise.
 
3079
+       (vsx_eq<mode>_p): Likewise.
 
3080
+       (vsx_gt<mode>_p): Likewise.
 
3081
+       (vsx_ge<mode>_p): Likewise.
 
3082
+       (vsx_xxsel<mode>): Likewise.
 
3083
+       (vsx_xxsel<mode>_uns): Likewise.
 
3084
+       (vsx_copysign<mode>3): Likewise.
 
3085
+       (vsx_float<VSi><mode>2): Likewise.
 
3086
+       (vsx_floatuns<VSi><mode>2): Likewise.
 
3087
+       (vsx_fix_trunc<mode><VSi>2): Likewise.
 
3088
+       (vsx_fixuns_trunc<mode><VSi>2): Likewise.
 
3089
+       (vsx_x<VSv>r<VSs>i): Likewise.
 
3090
+       (vsx_x<VSv>r<VSs>ic): Likewise.
 
3091
+       (vsx_btrunc<mode>2): Likewise.
 
3092
+       (vsx_b2trunc<mode>2): Likewise.
 
3093
+       (vsx_floor<mode>2): Likewise.
 
3094
+       (vsx_ceil<mode>2): Likewise.
 
3095
+       (vsx_<VS_spdp_insn>): Likewise.
 
3096
+       (vsx_xscvspdp): Likewise.
 
3097
+       (vsx_xvcvspuxds): Likewise.
 
3098
+       (vsx_float_fix_<mode>2): Likewise.
 
3099
+       (vsx_set_<mode>): Likewise.
 
3100
+       (vsx_extract_<mode>_internal1): Likewise.
 
3101
+       (vsx_extract_<mode>_internal2): Likewise.
 
3102
+       (vsx_extract_<mode>_load): Likewise.
 
3103
+       (vsx_extract_<mode>_store): Likewise.
 
3104
+       (vsx_splat_<mode>): Likewise.
 
3105
+       (vsx_xxspltw_<mode>): Likewise.
 
3106
+       (vsx_xxspltw_<mode>_direct): Likewise.
 
3107
+       (vsx_xxmrghw_<mode>): Likewise.
 
3108
+       (vsx_xxmrglw_<mode>): Likewise.
 
3109
+       (vsx_xxsldwi_<mode>): Likewise.
 
3110
+       (vsx_xscvdpspn): Tighten constraints to only use register classes
 
3111
+       the types use.
 
3112
+       (vsx_xscvspdpn): Likewise.
 
3113
+       (vsx_xscvdpspn_scalar): Likewise.
 
3114
+
 
3115
+       * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
 
3116
+       wj, and wk constraints.
 
3117
+       (GPR_REG_CLASS_P): New helper macro for register classes targeting
 
3118
+       general purpose registers.
 
3119
+
 
3120
+       * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
 
3121
+       direct moves.
 
3122
+       (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
 
3123
+       DImode instead of wm.  Use wk constraint for direct move of DFmode
 
3124
+       instead of wm.
 
3125
+       (extendsidi2_lfiwax): Likewise.
 
3126
+       (lfiwax): Likewise.
 
3127
+       (lfiwzx): Likewise.
 
3128
+       (movdi_internal64): Likewise.
 
3129
+
 
3130
+       * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
 
3131
+       wk constraints. Make the wy constraint documentation match them
 
3132
+       implementation.
 
3133
+
 
3134
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3135
+
 
3136
+       Backport from mainline
 
3137
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3138
+
 
3139
+       PR tree-optimization/61375
 
3140
+       * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
 
3141
+       symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
 
3142
+       (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
 
3143
+
 
3144
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
3145
+
 
3146
+       PR tree-optimization/61964
 
3147
+       * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
 
3148
+       function merged from trunk.
 
3149
+       (gimple_equal_p): Handle non-SSA LHS solely by structural
 
3150
+       equality.
 
3151
+
 
3152
+2014-07-25  Uros Bizjak  <ubizjak@gmail.com>
 
3153
+
 
3154
+       * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
 
3155
+
 
3156
+2014-07-24  Kyle McMartin  <kyle@redhat.com>
 
3157
+
 
3158
+       * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
 
3159
+
 
3160
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3161
+
 
3162
+       * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
 
3163
+       Add prototype.
 
3164
+       * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
 
3165
+       function.  Issue -Wpsabi warning if future GCC releases will use
 
3166
+       different field alignment rules for this type.
 
3167
+       * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
 
3168
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
 
3169
+       * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
 
3170
+
 
3171
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3172
+
 
3173
+       * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
 
3174
+       -Wpsabi note when encountering a type where future GCC releases
 
3175
+       will apply different alignment requirements.
 
3176
+
 
3177
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
3178
+
 
3179
+       * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
 
3180
+       does not fit fully into floating-point registers, and there is still
 
3181
+       space in the register parameter area, issue -Wpsabi note that the ABI
 
3182
+       will change in a future GCC release.
 
3183
+
 
3184
+2014-07-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
3185
+
 
3186
+       * config/arm/t-rtems-eabi: Add
 
3187
+       mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
 
3188
+       mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
 
3189
+       mbig-endian/mthumb/march=armv7-r, and
 
3190
+       mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
3191
+       multilibs.
 
3192
+
 
3193
+2014-07-21  Peter Bergner  <bergner@vnet.ibm.com>
 
3194
+
 
3195
+       * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
 
3196
+       (LIBTSAN_EARLY_SPEC): Likewise.
 
3197
+       (STATIC_LIBASAN_LIBS): Likewise.
 
3198
+       (STATIC_LIBTSAN_LIBS): Likewise.
 
3199
+
 
3200
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
3201
+
 
3202
+       * toplev.c (output_stack_usage): Adjust the location of the warning.
 
3203
+
 
3204
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
 
3205
+
 
3206
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
 
3207
+       (*membar_storeload): Disable for LEON3.
 
3208
+
 
3209
+2014-07-17  Richard Biener  <rguenther@suse.de>
 
3210
+
 
3211
+       PR rtl-optimization/61801
 
3212
+       * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
 
3213
+       ASM_INPUT don't set reg_pending_barrier if it appears in a
 
3214
+       debug-insn.
 
3215
+
 
3216
+2014-07-16  Jakub Jelinek  <jakub@redhat.com>
 
3217
+
 
3218
+       * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
 
3219
+       on the FUNCTION_DECL.
 
3220
+
 
3221
+2014-07-10  Tom G. Christensen  <tgc@jupiterrise.com>
 
3222
+
 
3223
+       * doc/install.texi: Remove links to defunct package providers for
 
3224
+       Solaris.
 
3225
+
 
3226
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
3227
+
 
3228
+       PR middle-end/53590
 
3229
+       * function.c (allocate_struct_function): Revert r188667 change.
 
3230
+
 
3231
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
3232
+
 
3233
+       PR tree-optimization/61684
 
3234
+       * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
 
3235
+       rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
 
3236
+
 
3237
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3238
+
 
3239
+       Backport from Mainline
 
3240
+       2014-06-20  Jakub Jelinek  <jakub@redhat.com>
 
3241
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
3242
+
 
3243
+       PR tree-optimization/61306
 
3244
+       * tree-ssa-math-opts.c (struct symbolic_number): Store type of
 
3245
+       expression instead of its size.
 
3246
+       (do_shift_rotate): Adapt to change in struct symbolic_number. Return
 
3247
+       false to prevent optimization when the result is unpredictable due to
 
3248
+       arithmetic right shift of signed type with highest byte is set.
 
3249
+       (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
 
3250
+       (find_bswap_1): Likewise. Return NULL to prevent optimization when the
 
3251
+       result is unpredictable due to sign extension.
 
3252
+       (find_bswap): Adapt to change in struct symbolic_number.
 
3253
+
 
3254
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
3255
+
 
3256
+       Backport from mainline
 
3257
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
3258
+
 
3259
+       PR target/61586
 
3260
+       * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
 
3261
+
 
3262
+2014-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
3263
+
 
3264
+       PR target/61542
 
3265
+       * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
 
3266
+       extraction other than index 3.
 
3267
+
 
3268
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
 
3269
+
 
3270
+       PR target/61570
 
3271
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
 
3272
+       model family 6 CPU with has_longmode never use a CPU without
 
3273
+       64-bit support.
 
3274
+
 
3275
+2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
 
3276
+
 
3277
+       Backport from mainline
 
3278
+
 
3279
+       2014-06-20  Julian Brown  <julian@codesourcery.com>
 
3280
+                   Chung-Lin Tang  <cltang@codesourcery.com>
 
3281
+
 
3282
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
 
3283
+       TARGET_THUMB1_ONLY. Add comments.
 
3284
+
 
3285
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
3286
+
 
3287
+       Backport from mainline
 
3288
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
3289
+
 
3290
+       PR target/61423
 
3291
+       * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
 
3292
+       define_insn_and_split pattern, merged from *floatunssi<mode>2_1
 
3293
+       and corresponding splitters.  Zero extend general register
 
3294
+       or memory input operand to XMM temporary.  Enable for
 
3295
+       TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
 
3296
+       (floatunssi<mode>2): Update expander predicate.
 
3297
+
 
3298
+2014-06-18  Richard Henderson  <rth@redhat.com>
 
3299
+
 
3300
+       PR target/61545
 
3301
+       * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
 
3302
+
 
3303
+2014-06-17  Nagaraju Mekala <nagaraju.mekala@xilinx.com>
 
3304
+
 
3305
+       Revert on gcc-4_8-branch.
 
3306
+       * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
 
3307
+       * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
 
3308
+
 
3309
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
3310
+
 
3311
+       Backport from mainline
 
3312
+
 
3313
+       PR target/61483
 
3314
+       * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
 
3315
+       variable 'size'; calculate 'size' right in the front; use
 
3316
+       'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
 
3317
+       pcum->aapcs_stack_words.
 
3318
+
 
3319
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
3320
+
 
3321
+       Backport from mainline
 
3322
+
 
3323
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
3324
+       PR target/61415
 
3325
+       * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
 
3326
+       (BU_MISC_2): Rename to ...
 
3327
+       (BU_LDBL128_2): ... this.
 
3328
+       * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
 
3329
+       (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
 
3330
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
 
3331
+       RS6000_BTM_LDBL128.
 
3332
+       (rs6000_invalid_builtin): Add long double 128-bit builtin support.
 
3333
+       (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
 
3334
+       * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
 
3335
+       (unpacktf_1): Likewise.
 
3336
+       * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
 
3337
+       (__builtin_longdouble_dw1): Likewise.
 
3338
+       * doc/sourcebuild.texi (longdouble128): Document.
 
3339
+
 
3340
+2014-06-13  Jason Merrill  <jason@redhat.com>
 
3341
+
 
3342
+       PR c++/60731
 
3343
+       * common.opt (-fno-gnu-unique): Add.
 
3344
+       * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
 
3345
+
 
3346
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
3347
+
 
3348
+       Backport from 2014-05-09 trunk r210272
 
3349
+
 
3350
+       * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
 
3351
+       unsigned int initializers for regno_in, regno_out.
 
3352
+
 
3353
+       Backport from 2014-05-14 trunk r210418
 
3354
+       * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
 
3355
+       shifted values to avoid build warning.
 
3356
+
 
3357
+       Backport from 2014-06-12 trunk r211491
 
3358
+
 
3359
+       PR target/61443
 
3360
+       * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
 
3361
+       loading from address spaces.
 
3362
+
 
3363
+2014-06-12  Alan Modra  <amodra@gmail.com>
 
3364
+
 
3365
+       PR target/61300
 
3366
+       * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
 
3367
+       * doc/tm.texi: Regenerate.
 
3368
+       * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
 
3369
+       Use throughout in place of REG_PARM_STACK_SPACE.
 
3370
+       * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
 
3371
+       "incoming" param.  Pass to rs6000_function_parms_need_stack.
 
3372
+       (rs6000_function_parms_need_stack): Add "incoming" param, ignore
 
3373
+       prototype_p when incoming.  Use function decl when incoming
 
3374
+       to handle K&R style functions.
 
3375
+       * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
 
3376
+       (INCOMING_REG_PARM_STACK_SPACE): Define.
 
3377
+
 
3378
+2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3379
+
 
3380
+       Back port from trunk
 
3381
+       2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3382
+
 
3383
+       PR target/61431
 
3384
+       * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
 
3385
+       iterators, VSX_D that handles 64-bit types, and VSX_LE that
 
3386
+       handles swapping the two 64-bit double words on little endian
 
3387
+       systems.  Include V1TImode and optionally TImode in VSX_LE so that
 
3388
+       these types are properly swapped.  Change all of the insns and
 
3389
+       splits that do the 64-bit swaps to use VSX_LE.
 
3390
+       (vsx_le_perm_load_<mode>): Likewise.
 
3391
+       (vsx_le_perm_store_<mode>): Likewise.
 
3392
+       (splitters for little endian memory operations): Likewise.
 
3393
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
3394
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
3395
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
3396
+
 
3397
+2014-06-05  Martin Jambor  <mjambor@suse.cz>
 
3398
+
 
3399
+       PR ipa/61393
 
3400
+       * ipa-cp.c (determine_versionability): Pretend that tm_clones are
 
3401
+       not versionable.
 
3402
+
 
3403
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
3404
+
 
3405
+       PR tree-optimization/61383
 
3406
+       * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
 
3407
+       stmts can't trap.
 
3408
+
 
3409
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
3410
+
 
3411
+       Backport from mainline
 
3412
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
3413
+
 
3414
+       PR rtl-optimization/60866
 
3415
+       * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
 
3416
+       Default it to -1.  Pass it down to init_simplejump_data.
 
3417
+       (init_simplejump_data): New parameter old_seqno.  Pass it down
 
3418
+       to get_seqno_for_a_jump.
 
3419
+       (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
 
3420
+       initializing new jump seqno as a last resort.  Add comment.
 
3421
+       (sel_redirect_edge_and_branch): Save old seqno of the conditional
 
3422
+       jump and pass it down to sel_init_new_insn.
 
3423
+       (sel_redirect_edge_and_branch_force): Likewise.
 
3424
+
 
3425
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
3426
+
 
3427
+       Backport from mainline
 
3428
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
3429
+
 
3430
+       PR rtl-optimization/60901
 
3431
+       * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
 
3432
+       bb predecessor belongs to the same scheduling region.  Adjust comment.
 
3433
+
 
3434
+2014-06-03  Uros Bizjak  <ubizjak@gmail.com>
 
3435
+
 
3436
+       Backport from mainline
 
3437
+       2014-06-02  Uros Bizjak  <ubizjak@gmail.com>
 
3438
+
 
3439
+       PR target/61239
 
3440
+       * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
 
3441
+       GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
 
3442
+
 
3443
+2014-05-28  Guozhi Wei  <carrot@google.com>
 
3444
+
 
3445
+       PR target/61202
 
3446
+       * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
 
3447
+       constraint.
 
3448
+       (vqdmulhq_n_s16): Likewise.
 
3449
+
 
3450
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
3451
+
 
3452
+       Backport from mainline
 
3453
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
3454
+
 
3455
+       * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
 
3456
+       predicate to detect a negative quotient.
 
3457
+
 
3458
+2014-05-28  Georg-Johann Lay  <avr@gjlay.de>
 
3459
+
 
3460
+       PR target/61044
 
3461
+       * doc/extend.texi (Local Labels): Note that label differences are
 
3462
+       not supported for AVR.
 
3463
+
 
3464
+2014-05-26  Michael Tautschnig  <mt@debian.org>
 
3465
+
 
3466
+       PR target/61249
 
3467
+       * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
 
3468
+       __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
 
3469
+
 
3470
+2014-05-23  Alan Modra  <amodra@gmail.com>
 
3471
+
 
3472
+       PR target/61231
 
3473
+       * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
 
3474
+       * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
 
3475
+       Use "Y" constraint rather than "m".
 
3476
+
 
3477
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
3478
+
 
3479
+       Backport from mainline
 
3480
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
3481
+
 
3482
+       * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
 
3483
+
 
3484
+2014-05-22  Richard Earnshaw  <rearnsha@arm.com>
 
3485
+
 
3486
+       PR target/61208
 
3487
+       * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
 
3488
+
 
3489
 2014-05-22  Release Manager
 
3490
 
 
3491
        * GCC 4.8.3 released.
 
3492
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
 
3493
===================================================================
 
3494
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../tags/gcc_4_8_3_release)
 
3495
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../branches/gcc-4_8-branch)
 
3496
@@ -0,0 +1,14 @@
 
3497
+/* Test for deprecation messages on use of lvsl and lvsr for little endian.  */
 
3498
+
 
3499
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
3500
+/* { dg-options "-O0 -Wdeprecated" } */
 
3501
+
 
3502
+#include <altivec.h>
 
3503
+
 
3504
+float f[20];
 
3505
+
 
3506
+void foo ()
 
3507
+{
 
3508
+  vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
3509
+  vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
3510
+}
 
3511
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
 
3512
===================================================================
 
3513
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../tags/gcc_4_8_3_release)
 
3514
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../branches/gcc-4_8-branch)
 
3515
@@ -0,0 +1,30 @@
 
3516
+/* { dg-do run { target { powerpc64*-*-* } } } */
 
3517
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
3518
+/* { dg-options "-mvsx" } */
 
3519
+
 
3520
+#include <altivec.h>
 
3521
+
 
3522
+void abort (void);
 
3523
+
 
3524
+vector double vec = (vector double) {99.0, 99.0};
 
3525
+
 
3526
+int main() {
 
3527
+
 
3528
+  int actual = vec_all_nge(vec, vec);
 
3529
+  if ( actual != 0)
 
3530
+    abort();
 
3531
+
 
3532
+  actual = vec_all_nle(vec, vec);
 
3533
+  if ( actual != 0)
 
3534
+    abort();
 
3535
+
 
3536
+  actual = vec_any_nge(vec, vec);
 
3537
+  if ( actual != 0)
 
3538
+    abort();
 
3539
+
 
3540
+  actual = vec_any_nle(vec, vec);
 
3541
+  if ( actual != 0)
 
3542
+    abort();
 
3543
+
 
3544
+  return 0;
 
3545
+}
 
3546
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
 
3547
===================================================================
 
3548
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../tags/gcc_4_8_3_release)
 
3549
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../branches/gcc-4_8-branch)
 
3550
@@ -1,7 +1,7 @@
 
3551
 /* { dg-do compile { target { powerpc*-*-* } } } */
 
3552
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3553
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
3554
-/* { dg-options "-O3 -mcpu=power7" } */
 
3555
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
 
3556
 
 
3557
 /* Test the various load/store varients.  */
 
3558
 
 
3559
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
 
3560
===================================================================
 
3561
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
 
3562
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
 
3563
@@ -1,6 +1,7 @@
 
3564
 /* { dg-do assemble } */
 
3565
 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
 
3566
 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
 
3567
+/* { dg-require-effective-target longdouble128 } */
 
3568
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
 
3569
 
 
3570
 typedef float TFmode __attribute__ ((mode (TF)));
 
3571
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
 
3572
===================================================================
 
3573
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../tags/gcc_4_8_3_release)
 
3574
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../branches/gcc-4_8-branch)
 
3575
@@ -2,6 +2,7 @@
 
3576
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3577
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 
3578
 /* { dg-require-effective-target powerpc_fprs } */
 
3579
+/* { dg-require-effective-target longdouble128 } */
 
3580
 /* { dg-options "-O2 -mhard-float" } */
 
3581
 
 
3582
 #include <stddef.h>
 
3583
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
 
3584
===================================================================
 
3585
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../tags/gcc_4_8_3_release)
 
3586
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../branches/gcc-4_8-branch)
 
3587
@@ -0,0 +1,12 @@
 
3588
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3589
+/* { dg-options "-mabi=elfv2" } */
 
3590
+
 
3591
+struct f8
 
3592
+  {
 
3593
+    float x[8];
 
3594
+  };
 
3595
+
 
3596
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
 
3597
+{
 
3598
+}
 
3599
+
 
3600
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
 
3601
===================================================================
 
3602
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../tags/gcc_4_8_3_release)
 
3603
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../branches/gcc-4_8-branch)
 
3604
@@ -0,0 +1,14 @@
 
3605
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
3606
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3607
+/* { dg-require-effective-target powerpc_htm_ok } */
 
3608
+/* { dg-options "-O2 -mhtm" } */
 
3609
+
 
3610
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
 
3611
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
 
3612
+
 
3613
+#include <htmintrin.h>
 
3614
+long
 
3615
+ttest (void)
 
3616
+{
 
3617
+  return _HTM_STATE(__builtin_ttest());
 
3618
+}
 
3619
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
 
3620
===================================================================
 
3621
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../tags/gcc_4_8_3_release)
 
3622
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../branches/gcc-4_8-branch)
 
3623
@@ -0,0 +1,21 @@
 
3624
+/* Test expected code generation for lvsl and lvsr on little endian.
 
3625
+   Note that lvsl and lvsr are each produced once, but the filename
 
3626
+   causes them to appear twice in the file.  */
 
3627
+
 
3628
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
3629
+/* { dg-options "-O0 -Wno-deprecated" } */
 
3630
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
 
3631
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
 
3632
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
 
3633
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
 
3634
+
 
3635
+
 
3636
+#include <altivec.h>
 
3637
+
 
3638
+float f[20];
 
3639
+
 
3640
+void foo ()
 
3641
+{
 
3642
+  vector unsigned char a = vec_lvsl (4, f);
 
3643
+  vector unsigned char b = vec_lvsr (8, f);
 
3644
+}
 
3645
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
 
3646
===================================================================
 
3647
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../tags/gcc_4_8_3_release)
 
3648
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../branches/gcc-4_8-branch)
 
3649
@@ -0,0 +1,12 @@
 
3650
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3651
+/* { dg-options "-mno-compat-align-parm" } */
 
3652
+
 
3653
+struct test
 
3654
+  {
 
3655
+    long a __attribute__((aligned (16)));
 
3656
+  };
 
3657
+
 
3658
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
 
3659
+{
 
3660
+}
 
3661
+
 
3662
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
 
3663
===================================================================
 
3664
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../tags/gcc_4_8_3_release)
 
3665
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../branches/gcc-4_8-branch)
 
3666
@@ -0,0 +1,9 @@
 
3667
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3668
+/* { dg-require-effective-target powerpc_altivec_ok } */
 
3669
+/* { dg-options "-maltivec" } */
 
3670
+
 
3671
+struct test
 
3672
+  {
 
3673
+    int a __attribute__((vector_size (8)));
 
3674
+  }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
 
3675
+
 
3676
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
 
3677
===================================================================
 
3678
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../tags/gcc_4_8_3_release)
 
3679
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../branches/gcc-4_8-branch)
 
3680
@@ -1,6 +1,6 @@
 
3681
 /* { dg-do compile { target powerpc*-*-* } } */
 
3682
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
3683
-/* { dg-options "-maltivec -O0 -Wall" } */
 
3684
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
 
3685
 
 
3686
 #include <altivec.h>
 
3687
 
 
3688
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
 
3689
===================================================================
 
3690
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../tags/gcc_4_8_3_release)
 
3691
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../branches/gcc-4_8-branch)
 
3692
@@ -1,7 +1,7 @@
 
3693
 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
 
3694
 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
 
3695
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
3696
-/* { dg-options "-maltivec -O2" } */
 
3697
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
 
3698
 
 
3699
 #include <altivec.h>
 
3700
 
 
3701
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
 
3702
===================================================================
 
3703
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
 
3704
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
 
3705
@@ -1,5 +1,5 @@
 
3706
 /* { dg-do compile { target powerpc_altivec_ok } } */
 
3707
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
 
3708
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
 
3709
 
 
3710
 #include <altivec.h>
 
3711
 
 
3712
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
 
3713
===================================================================
 
3714
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../tags/gcc_4_8_3_release)
 
3715
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../branches/gcc-4_8-branch)
 
3716
@@ -0,0 +1,10 @@
 
3717
+/* { dg-do compile } */
 
3718
+/* { dg-options "-O2 -mieee" } */
 
3719
+
 
3720
+void foo (int *dimensions, double **params, int hh)
 
3721
+{
 
3722
+  if (params[hh])
 
3723
+    ;
 
3724
+  else if (dimensions[hh] > 0)
 
3725
+    params[hh][0] = 1.0f;
 
3726
+}
 
3727
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
 
3728
===================================================================
 
3729
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../tags/gcc_4_8_3_release)
 
3730
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../branches/gcc-4_8-branch)
 
3731
@@ -0,0 +1,35 @@
 
3732
+/* Test AAPCS64 layout and __builtin_va_start.
 
3733
+
 
3734
+   Pass named HFA/HVA argument on stack.  */
 
3735
+
 
3736
+/* { dg-do run { target aarch64*-*-* } } */
 
3737
+
 
3738
+#ifndef IN_FRAMEWORK
 
3739
+#define AAPCS64_TEST_STDARG
 
3740
+#define TESTFILE "va_arg-14.c"
 
3741
+#include "type-def.h"
 
3742
+
 
3743
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
 
3744
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
 
3745
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
 
3746
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
 
3747
+
 
3748
+#include "abitest.h"
 
3749
+#else
 
3750
+  ARG (float, 1.0f, S0, 0)
 
3751
+  ARG (float, 2.0f, S1, 1)
 
3752
+  ARG (float, 3.0f, S2, 2)
 
3753
+  ARG (float, 4.0f, S3, 3)
 
3754
+  ARG (float, 5.0f, S4, 4)
 
3755
+  ARG (float, 6.0f, S5, 5)
 
3756
+  ARG (float, 7.0f, S6, 6)
 
3757
+  ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
 
3758
+  /* Previous argument size has been rounded up to the nearest multiple of
 
3759
+     8 bytes.  */
 
3760
+  ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
 
3761
+  /* NSAA is rounded up to the nearest natural alignment of float32x4.  */
 
3762
+  ARG (vf4_t, float32x4, STACK + 32, 9)
 
3763
+  ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
 
3764
+  DOTS
 
3765
+  LAST_ANON (double, 123456789.987, STACK + 64, 11)
 
3766
+#endif
 
3767
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
 
3768
===================================================================
 
3769
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../tags/gcc_4_8_3_release)
 
3770
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../branches/gcc-4_8-branch)
 
3771
@@ -34,6 +34,13 @@
 
3772
   float b;
 
3773
 };
 
3774
 
 
3775
+struct hfa_fx3_t
 
3776
+{
 
3777
+  float a;
 
3778
+  float b;
 
3779
+  float c;
 
3780
+};
 
3781
+
 
3782
 struct hfa_dx2_t
 
3783
 {
 
3784
   double a;
 
3785
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
 
3786
===================================================================
 
3787
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../tags/gcc_4_8_3_release)
 
3788
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../branches/gcc-4_8-branch)
 
3789
@@ -0,0 +1,59 @@
 
3790
+/* Test AAPCS64 layout and __builtin_va_start.
 
3791
+
 
3792
+   Pass named HFA/HVA argument on stack.  */
 
3793
+
 
3794
+/* { dg-do run { target aarch64*-*-* } } */
 
3795
+
 
3796
+#ifndef IN_FRAMEWORK
 
3797
+#define AAPCS64_TEST_STDARG
 
3798
+#define TESTFILE "va_arg-13.c"
 
3799
+
 
3800
+struct float_float_t
 
3801
+{
 
3802
+  float a;
 
3803
+  float b;
 
3804
+} float_float;
 
3805
+
 
3806
+union float_int_t
 
3807
+{
 
3808
+  float b8;
 
3809
+  int b5;
 
3810
+} float_int;
 
3811
+
 
3812
+#define HAS_DATA_INIT_FUNC
 
3813
+void
 
3814
+init_data ()
 
3815
+{
 
3816
+  float_float.a = 1.2f;
 
3817
+  float_float.b = 2.2f;
 
3818
+
 
3819
+  float_int.b8 = 4983.80f;
 
3820
+}
 
3821
+
 
3822
+#include "abitest.h"
 
3823
+#else
 
3824
+  ARG (float, 1.0f, S0, 0)
 
3825
+  ARG (float, 2.0f, S1, 1)
 
3826
+  ARG (float, 3.0f, S2, 2)
 
3827
+  ARG (float, 4.0f, S3, 3)
 
3828
+  ARG (float, 5.0f, S4, 4)
 
3829
+  ARG (float, 6.0f, S5, 5)
 
3830
+  ARG (float, 7.0f, S6, 6)
 
3831
+  ARG (struct float_float_t, float_float, STACK, 7)
 
3832
+  ARG (int,  9, W0, 8)
 
3833
+  ARG (int, 10, W1, 9)
 
3834
+  ARG (int, 11, W2, 10)
 
3835
+  ARG (int, 12, W3, 11)
 
3836
+  ARG (int, 13, W4, 12)
 
3837
+  ARG (int, 14, W5, 13)
 
3838
+  ARG (int, 15, W6, LAST_NAMED_ARG_ID)
 
3839
+  DOTS
 
3840
+  /* Note on the reason of using 'X7' instead of 'W7' here:
 
3841
+     Using 'X7' makes sure the test works in the big-endian mode.
 
3842
+     According to PCS rules B.4 and C.10, the size of float_int is rounded
 
3843
+     to 8 bytes and prepared in the register X7 as if loaded via LDR from
 
3844
+     the memory, with the content of the other 4 bytes unspecified.  The
 
3845
+     test framework will only compare the 4 relavent bytes.  */
 
3846
+  ANON (union float_int_t, float_int, X7, 15)
 
3847
+  LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
 
3848
+#endif
 
3849
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
 
3850
===================================================================
 
3851
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../tags/gcc_4_8_3_release)
 
3852
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../branches/gcc-4_8-branch)
 
3853
@@ -0,0 +1,39 @@
 
3854
+/* Test AAPCS64 layout and __builtin_va_start.
 
3855
+
 
3856
+   Pass named __128int argument on stack.  */
 
3857
+
 
3858
+/* { dg-do run { target aarch64*-*-* } } */
 
3859
+
 
3860
+#ifndef IN_FRAMEWORK
 
3861
+#define AAPCS64_TEST_STDARG
 
3862
+#define TESTFILE "va_arg-15.c"
 
3863
+#include "type-def.h"
 
3864
+
 
3865
+union int128_t qword;
 
3866
+
 
3867
+#define HAS_DATA_INIT_FUNC
 
3868
+void
 
3869
+init_data ()
 
3870
+{
 
3871
+  /* Init signed quad-word integer.  */
 
3872
+  qword.l64 = 0xfdb9753102468aceLL;
 
3873
+  qword.h64 = 0xeca8642013579bdfLL;
 
3874
+}
 
3875
+
 
3876
+#include "abitest.h"
 
3877
+#else
 
3878
+  ARG (int, 1, W0, 0)
 
3879
+  ARG (int, 2, W1, 1)
 
3880
+  ARG (int, 3, W2, 2)
 
3881
+  ARG (int, 4, W3, 3)
 
3882
+  ARG (int, 5, W4, 4)
 
3883
+  ARG (int, 6, W5, 5)
 
3884
+  ARG (int, 7, W6, 6)
 
3885
+  ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
 
3886
+  DOTS
 
3887
+#ifndef __AAPCS64_BIG_ENDIAN__
 
3888
+  LAST_ANON (int, 8, STACK + 16, 8)
 
3889
+#else
 
3890
+  LAST_ANON (int, 8, STACK + 20, 8)
 
3891
+#endif
 
3892
+#endif
 
3893
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
 
3894
===================================================================
 
3895
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../tags/gcc_4_8_3_release)
 
3896
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../branches/gcc-4_8-branch)
 
3897
@@ -0,0 +1,14 @@
 
3898
+/* { dg-do assemble } */
 
3899
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
 
3900
+
 
3901
+int
 
3902
+test (int a, double b, int c, int d, int e)
 
3903
+{
 
3904
+  double result;
 
3905
+  __asm__ __volatile ("// %0, %1"
 
3906
+                      : "=w" (result)
 
3907
+                      : "0" (b)
 
3908
+                      :    /* No clobbers */
 
3909
+                      );
 
3910
+  return c * d + e;
 
3911
+}
 
3912
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
 
3913
===================================================================
 
3914
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../tags/gcc_4_8_3_release)
 
3915
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../branches/gcc-4_8-branch)
 
3916
@@ -0,0 +1,134 @@
 
3917
+/* { dg-do run } */
 
3918
+/* { dg-options "-std=gnu99" } */
 
3919
+
 
3920
+#include <stdlib.h>
 
3921
+#include <stdarg.h>
 
3922
+
 
3923
+#define NC __attribute__((noinline,noclone))
 
3924
+
 
3925
+void NC vfun (char n, ...)
 
3926
+{
 
3927
+  va_list ap;
 
3928
+
 
3929
+  va_start (ap, n);
 
3930
+
 
3931
+  switch (n)
 
3932
+    {
 
3933
+    default:
 
3934
+      abort();
 
3935
+    case 1:
 
3936
+      if (11 != va_arg (ap, int))
 
3937
+        abort();
 
3938
+      break;
 
3939
+    case 2:
 
3940
+      if (2222 != va_arg (ap, int))
 
3941
+        abort();
 
3942
+      break;
 
3943
+    case 3:
 
3944
+      if (333333 != va_arg (ap, __int24))
 
3945
+        abort();
 
3946
+      break;
 
3947
+    case 4:
 
3948
+      if (44444444 != va_arg (ap, long))
 
3949
+        abort();
 
3950
+      break;
 
3951
+    case 8:
 
3952
+      if (8888888888888888 != va_arg (ap, long long))
 
3953
+        abort();
 
3954
+      break;
 
3955
+    }
 
3956
+
 
3957
+  va_end (ap);
 
3958
+}
 
3959
+
 
3960
+
 
3961
+void NC boo_qi (const __flash char *p)
 
3962
+{
 
3963
+  vfun (1, *p);
 
3964
+}
 
3965
+
 
3966
+void NC boox_qi (const __memx char *p)
 
3967
+{
 
3968
+  vfun (1, *p);
 
3969
+}
 
3970
+
 
3971
+void NC boo_hi (const __flash int *p)
 
3972
+{
 
3973
+  vfun (2, *p);
 
3974
+}
 
3975
+
 
3976
+void NC boox_hi (const __memx int *p)
 
3977
+{
 
3978
+  vfun (2, *p);
 
3979
+}
 
3980
+
 
3981
+void NC boo_psi (const __flash __int24 *p)
 
3982
+{
 
3983
+  vfun (3, *p);
 
3984
+}
 
3985
+
 
3986
+void NC boox_psi (const __memx __int24 *p)
 
3987
+{
 
3988
+  vfun (3, *p);
 
3989
+}
 
3990
+
 
3991
+void NC boo_si (const __flash long *p)
 
3992
+{
 
3993
+  vfun (4, *p);
 
3994
+}
 
3995
+
 
3996
+void NC boox_si (const __memx long *p)
 
3997
+{
 
3998
+  vfun (4, *p);
 
3999
+}
 
4000
+
 
4001
+void NC boo_di (const __flash long long *p)
 
4002
+{
 
4003
+  vfun (8, *p);
 
4004
+}
 
4005
+
 
4006
+void NC boox_di (const __memx long long *p)
 
4007
+{
 
4008
+  vfun (8, *p);
 
4009
+}
 
4010
+
 
4011
+const __flash char f_qi = 11;
 
4012
+const __flash int f_hi = 2222;
 
4013
+const __flash __int24 f_psi = 333333;
 
4014
+const __flash long f_si = 44444444;
 
4015
+const __flash long long f_di = 8888888888888888;
 
4016
+
 
4017
+const __memx char x_qi = 11;
 
4018
+const __memx int x_hi = 2222;
 
4019
+const __memx __int24 x_psi = 333333;
 
4020
+const __memx long x_si = 44444444;
 
4021
+const __memx long long x_di = 8888888888888888;
 
4022
+
 
4023
+char r_qi = 11;
 
4024
+int r_hi = 2222;
 
4025
+__int24 r_psi = 333333;
 
4026
+long r_si = 44444444;
 
4027
+long long r_di = 8888888888888888;
 
4028
+
 
4029
+int main (void)
 
4030
+{
 
4031
+  boo_qi (&f_qi);
 
4032
+  boo_hi (&f_hi);
 
4033
+  boo_psi (&f_psi);
 
4034
+  boo_si (&f_si);
 
4035
+  boo_di (&f_di);
 
4036
+
 
4037
+  boox_qi (&x_qi);
 
4038
+  boox_hi (&x_hi);
 
4039
+  boox_psi (&x_psi);
 
4040
+  boox_si (&x_si);
 
4041
+  boox_di (&x_di);
 
4042
+
 
4043
+  boox_qi (&r_qi);
 
4044
+  boox_hi (&r_hi);
 
4045
+  boox_psi (&r_psi);
 
4046
+  boox_si (&r_si);
 
4047
+  boox_di (&r_di);
 
4048
+
 
4049
+  exit (0);
 
4050
+}
 
4051
Index: gcc/testsuite/gcc.target/i386/pr61923.c
 
4052
===================================================================
 
4053
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../tags/gcc_4_8_3_release)
 
4054
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../branches/gcc-4_8-branch)
 
4055
@@ -0,0 +1,36 @@
 
4056
+/* PR debug/61923 */
 
4057
+/* { dg-do compile } */
 
4058
+/* { dg-options "-O2 -fcompare-debug" } */
 
4059
+
 
4060
+typedef struct
 
4061
+{
 
4062
+  struct
 
4063
+  {
 
4064
+    struct
 
4065
+    {
 
4066
+      char head;
 
4067
+    } tickets;
 
4068
+  };
 
4069
+} arch_spinlock_t;
 
4070
+struct ext4_map_blocks
 
4071
+{
 
4072
+  int m_lblk;
 
4073
+  int m_len;
 
4074
+  int m_flags;
 
4075
+};
 
4076
+int ext4_da_map_blocks_ei_0;
 
4077
+void fn1 (int p1, struct ext4_map_blocks *p2)
 
4078
+{
 
4079
+  int ret;
 
4080
+  if (p2->m_flags)
 
4081
+    {
 
4082
+      ext4_da_map_blocks_ei_0++;
 
4083
+      arch_spinlock_t *lock;
 
4084
+      switch (sizeof *&lock->tickets.head)
 
4085
+      case 1:
 
4086
+      asm("" : "+m"(*&lock->tickets.head) : ""(0));
 
4087
+      __asm__("");
 
4088
+      ret = 0;
 
4089
+    }
 
4090
+  fn2 (p2->m_lblk, p2->m_len);
 
4091
+}
 
4092
Index: gcc/testsuite/gcc.target/i386/pr61423.c
 
4093
===================================================================
 
4094
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../tags/gcc_4_8_3_release)
 
4095
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../branches/gcc-4_8-branch)
 
4096
@@ -0,0 +1,38 @@
 
4097
+/* PR target/61423 */
 
4098
+/* { dg-do run { target ia32 } } */
 
4099
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
 
4100
+
 
4101
+#define N 1024
 
4102
+static unsigned int A[N];
 
4103
+
 
4104
+double
 
4105
+__attribute__((noinline))
 
4106
+func (void)
 
4107
+{
 
4108
+  unsigned int sum = 0;
 
4109
+  unsigned i;
 
4110
+  double t;
 
4111
+
 
4112
+  for (i = 0; i < N; i++)
 
4113
+    sum += A[i];
 
4114
+
 
4115
+  t = sum;
 
4116
+  return t;
 
4117
+}
 
4118
+
 
4119
+int
 
4120
+main ()
 
4121
+{
 
4122
+  unsigned i;
 
4123
+  double d;
 
4124
+
 
4125
+  for(i = 0; i < N; i++)
 
4126
+    A[i] = 1;
 
4127
+
 
4128
+  d = func();
 
4129
+
 
4130
+  if (d != 1024.0)
 
4131
+    __builtin_abort ();
 
4132
+
 
4133
+  return 0;
 
4134
+}
 
4135
Index: gcc/testsuite/gcc.target/i386/pr60901.c
 
4136
===================================================================
 
4137
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../tags/gcc_4_8_3_release)
 
4138
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../branches/gcc-4_8-branch)
 
4139
@@ -0,0 +1,17 @@
 
4140
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts"  } */
 
4141
+
 
4142
+extern int n;
 
4143
+extern void bar (void);
 
4144
+extern int baz (int);
 
4145
+
 
4146
+void
 
4147
+foo (void)
 
4148
+{
 
4149
+  int i, j;
 
4150
+  for (j = 0; j < n; j++)
 
4151
+    {
 
4152
+      for (i = 1; i < j; i++)
 
4153
+       bar ();
 
4154
+      baz (0);
 
4155
+    }
 
4156
+}
 
4157
Index: gcc/testsuite/gcc.target/i386/pr61801.c
 
4158
===================================================================
 
4159
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../tags/gcc_4_8_3_release)
 
4160
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../branches/gcc-4_8-branch)
 
4161
@@ -0,0 +1,21 @@
 
4162
+/* PR rtl-optimization/61801 */
 
4163
+/* { dg-do compile } */
 
4164
+/* { dg-options "-Os -fcompare-debug" } */
 
4165
+
 
4166
+int a, c;
 
4167
+int bar (void);
 
4168
+void baz (void);
 
4169
+
 
4170
+void
 
4171
+foo (void)
 
4172
+{
 
4173
+  int d;
 
4174
+  if (bar ())
 
4175
+    {
 
4176
+      int e;
 
4177
+      baz ();
 
4178
+      asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
 
4179
+      d = e;
 
4180
+    }
 
4181
+  c = d;
 
4182
+}
 
4183
Index: gcc/testsuite/gcc.target/i386/pr61446.c
 
4184
===================================================================
 
4185
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../tags/gcc_4_8_3_release)
 
4186
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../branches/gcc-4_8-branch)
 
4187
@@ -0,0 +1,14 @@
 
4188
+/* PR rtl-optimization/61446 */
 
4189
+
 
4190
+/* { dg-do compile { target { ia32 } } } */
 
4191
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
 
4192
+
 
4193
+unsigned long long
 
4194
+foo (float a)
 
4195
+{
 
4196
+  const double dfa = a;
 
4197
+  const unsigned int hi = dfa / 0x1p32f;
 
4198
+  const unsigned int lo = dfa - (double) hi * 0x1p32f;
 
4199
+
 
4200
+  return ((unsigned long long) hi << (4 * (8))) | lo;
 
4201
+}
 
4202
Index: gcc/testsuite/gcc.target/i386/pr63947.c
 
4203
===================================================================
 
4204
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../tags/gcc_4_8_3_release)
 
4205
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../branches/gcc-4_8-branch)
 
4206
@@ -0,0 +1,9 @@
 
4207
+/* PR target/63947 */
 
4208
+/* { dg-do assemble } */
 
4209
+/* { dg-options "-Os" } */
 
4210
+/* { dg-additional-options "-march=i686" { target ia32 } } */
 
4211
+
 
4212
+long double foo (unsigned a, unsigned b)
 
4213
+{
 
4214
+  return a + b < a;
 
4215
+}
 
4216
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
 
4217
===================================================================
 
4218
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../tags/gcc_4_8_3_release)
 
4219
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../branches/gcc-4_8-branch)
 
4220
@@ -0,0 +1,50 @@
 
4221
+/* { dg-do run } */
 
4222
+/* { dg-options "-march=octeon" } */
 
4223
+
 
4224
+extern void abort (void);
 
4225
+
 
4226
+struct node
 
4227
+{
 
4228
+  struct node *next;
 
4229
+  struct node *prev;
 
4230
+};
 
4231
+
 
4232
+struct node node;
 
4233
+
 
4234
+struct head
 
4235
+{
 
4236
+  struct node *first;
 
4237
+};
 
4238
+
 
4239
+struct head heads[5];
 
4240
+
 
4241
+int k = 2;
 
4242
+
 
4243
+struct head *head = &heads[2];
 
4244
+
 
4245
+static int __attribute__((noinline))
 
4246
+foo (void)
 
4247
+{
 
4248
+  node.prev = (void *)head;
 
4249
+  head->first = &node;
 
4250
+
 
4251
+  struct node *n = head->first;
 
4252
+  struct head *h = &heads[k];
 
4253
+  struct node *next = n->next;
 
4254
+
 
4255
+  if (n->prev == (void *)h)
 
4256
+    h->first = next;
 
4257
+  else
 
4258
+    n->prev->next = next;
 
4259
+
 
4260
+  n->next = h->first;
 
4261
+  return n->next == &node;
 
4262
+}
 
4263
+
 
4264
+int
 
4265
+main (void)
 
4266
+{
 
4267
+  if (foo ())
 
4268
+    abort ();
 
4269
+  return 0;
 
4270
+}
 
4271
Index: gcc/testsuite/gcc.target/sh/pr61996.c
 
4272
===================================================================
 
4273
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
 
4274
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
 
4275
@@ -0,0 +1,12 @@
 
4276
+/* Check that the option -musermode has no effect on targets that do not
 
4277
+   support user/privileged mode and that it does not interfere with option
 
4278
+   -matomic-model=soft-imask.  */
 
4279
+/* { dg-do compile }  */
 
4280
+/* { dg-options "-matomic-model=soft-imask" }  */
 
4281
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } }  */
 
4282
+
 
4283
+int
 
4284
+test (void)
 
4285
+{
 
4286
+  return 0;
 
4287
+}
 
4288
Index: gcc/testsuite/lib/target-supports.exp
 
4289
===================================================================
 
4290
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
 
4291
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
 
4292
@@ -1790,6 +1790,15 @@
 
4293
     }]
 
4294
 }
 
4295
 
 
4296
+# Return 1 if the target supports long double of 128 bits,
 
4297
+# 0 otherwise.
 
4298
+
 
4299
+proc check_effective_target_longdouble128 { } {
 
4300
+    return [check_no_compiler_messages longdouble128 object {
 
4301
+       int dummy[sizeof(long double) == 16 ? 1 : -1];
 
4302
+    }]
 
4303
+}
 
4304
+
 
4305
 # Return 1 if the target supports double of 64 bits,
 
4306
 # 0 otherwise.
 
4307
 
 
4308
@@ -5329,3 +5338,40 @@
 
4309
        return 0
 
4310
     }
 
4311
 }
 
4312
+
 
4313
+# Return 1 if <fenv.h> is available with all the standard IEEE
 
4314
+# exceptions and floating-point exceptions are raised by arithmetic
 
4315
+# operations.  (If the target requires special options for "inexact"
 
4316
+# exceptions, those need to be specified in the testcases.)
 
4317
+
 
4318
+proc check_effective_target_fenv_exceptions {} {
 
4319
+    return [check_runtime fenv_exceptions {
 
4320
+       #include <fenv.h>
 
4321
+       #include <stdlib.h>
 
4322
+       #ifndef FE_DIVBYZERO
 
4323
+       # error Missing FE_DIVBYZERO
 
4324
+       #endif
 
4325
+       #ifndef FE_INEXACT
 
4326
+       # error Missing FE_INEXACT
 
4327
+       #endif
 
4328
+       #ifndef FE_INVALID
 
4329
+       # error Missing FE_INVALID
 
4330
+       #endif
 
4331
+       #ifndef FE_OVERFLOW
 
4332
+       # error Missing FE_OVERFLOW
 
4333
+       #endif
 
4334
+       #ifndef FE_UNDERFLOW
 
4335
+       # error Missing FE_UNDERFLOW
 
4336
+       #endif
 
4337
+       volatile float a = 0.0f, r;
 
4338
+       int
 
4339
+       main (void)
 
4340
+       {
 
4341
+         r = a / a;
 
4342
+         if (fetestexcept (FE_INVALID))
 
4343
+           exit (0);
 
4344
+         else
 
4345
+           abort ();
 
4346
+       }
 
4347
+    } "-std=gnu99"]
 
4348
+}
 
4349
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
 
4350
===================================================================
 
4351
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../tags/gcc_4_8_3_release)
 
4352
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../branches/gcc-4_8-branch)
 
4353
@@ -1,6 +1,6 @@
 
4354
 ! { dg-require-effective-target fortran_large_real }
 
4355
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
 
4356
-! Test XFAILed on these platforms because the system's printf() lacks
 
4357
+! { dg-do run { xfail powerpc*-apple-darwin* } }
 
4358
+! Test XFAILed on this platform because the system's printf() lacks
 
4359
 ! proper support for denormalized long doubles. See PR24685
 
4360
 !
 
4361
 ! This tests that the default formats for formatted I/O of reals are
 
4362
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
 
4363
===================================================================
 
4364
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../tags/gcc_4_8_3_release)
 
4365
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../branches/gcc-4_8-branch)
 
4366
@@ -0,0 +1,15 @@
 
4367
+! { dg-do compile }
 
4368
+! { dg-options "-fdump-tree-original" }
 
4369
+! PR 61999 - this used to ICE.
 
4370
+! Original test case by A. Kasahara
 
4371
+program main
 
4372
+   use, intrinsic:: iso_fortran_env, only: output_unit
 
4373
+
 
4374
+   implicit none
 
4375
+
 
4376
+   write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
 
4377
+
 
4378
+   stop
 
4379
+end program main
 
4380
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
 
4381
+! { dg-final { cleanup-tree-dump "original" } }
 
4382
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
 
4383
===================================================================
 
4384
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../tags/gcc_4_8_3_release)
 
4385
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../branches/gcc-4_8-branch)
 
4386
@@ -0,0 +1,13 @@
 
4387
+! PR fortran/59488
 
4388
+! { dg-do compile }
 
4389
+! { dg-options "-fopenmp" }
 
4390
+
 
4391
+  implicit none
 
4392
+  integer, parameter :: p(2) = (/ 11, 12 /)
 
4393
+  integer :: r
 
4394
+
 
4395
+  !$omp parallel do default(none)
 
4396
+  do r = 1, 2
 
4397
+    print *, p(r)
 
4398
+  end do
 
4399
+end
 
4400
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
 
4401
===================================================================
 
4402
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../tags/gcc_4_8_3_release)
 
4403
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../branches/gcc-4_8-branch)
 
4404
@@ -0,0 +1,16 @@
 
4405
+! PR fortran/59488
 
4406
+! { dg-do compile }
 
4407
+! { dg-options "-fopenmp" }
 
4408
+
 
4409
+  implicit none
 
4410
+  type t
 
4411
+    integer :: s1, s2, s3
 
4412
+  end type
 
4413
+  integer :: r
 
4414
+  type(t), parameter :: u = t(1, 2, 3)
 
4415
+
 
4416
+  !$omp parallel do default(none)
 
4417
+  do r = 1, 2
 
4418
+    print *, u
 
4419
+  end do
 
4420
+end
 
4421
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
 
4422
===================================================================
 
4423
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../tags/gcc_4_8_3_release)
 
4424
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../branches/gcc-4_8-branch)
 
4425
@@ -0,0 +1,18 @@
 
4426
+! { dg-do run }
 
4427
+! { dg-options "-fcray-pointer" }
 
4428
+!
 
4429
+! PR fortran/45187
 
4430
+!
 
4431
+module foo
 
4432
+  implicit none
 
4433
+  real :: a
 
4434
+  pointer(c_a, a)
 
4435
+end module foo
 
4436
+
 
4437
+program test
 
4438
+  use foo
 
4439
+  real :: z
 
4440
+  c_a = loc(z)
 
4441
+  a = 42
 
4442
+  if (z /= 42) call abort
 
4443
+end program test
 
4444
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
 
4445
===================================================================
 
4446
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../tags/gcc_4_8_3_release)
 
4447
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../branches/gcc-4_8-branch)
 
4448
@@ -0,0 +1,36 @@
 
4449
+! { dg-do run }
 
4450
+! Tests fix for PR61780 in which the loop reversal mechanism was
 
4451
+! not accounting for the first index being an element so that no
 
4452
+! loop in this dimension is created.
 
4453
+!
 
4454
+! Contributed by Manfred Tietze on clf.
 
4455
+!
 
4456
+program prgm3
 
4457
+    implicit none
 
4458
+    integer, parameter :: n = 10, k = 3
 
4459
+    integer :: i, j
 
4460
+    integer, dimension(n,n) :: y
 
4461
+    integer :: res1(n), res2(n)
 
4462
+
 
4463
+1   format(10i5)
 
4464
+
 
4465
+!initialize
 
4466
+    do i=1,n
 
4467
+        do j=1,n
 
4468
+            y(i,j) = n*i + j
 
4469
+        end do
 
4470
+    end do
 
4471
+    res2 = y(k,:)
 
4472
+
 
4473
+!shift right
 
4474
+    y(k,4:n) = y(k,3:n-1)
 
4475
+    y(k,3) = 0
 
4476
+    res1 = y(k,:)
 
4477
+    y(k,:) = res2
 
4478
+    y(k,n:4:-1) = y(k,n-1:3:-1)
 
4479
+    y(k,3) = 0
 
4480
+    res2 = y(k,:)
 
4481
+!    print *, res1
 
4482
+!    print *, res2
 
4483
+    if (any(res1 /= res2)) call abort ()
 
4484
+end program prgm3
 
4485
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
 
4486
===================================================================
 
4487
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../tags/gcc_4_8_3_release)
 
4488
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../branches/gcc-4_8-branch)
 
4489
@@ -0,0 +1,8 @@
 
4490
+C { dg-do compile }
 
4491
+      TYPE T
 
4492
+      INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
 
4493
+      END TYPE
 
4494
+      TYPE S
 
4495
+      INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
 
4496
+      END TYPE
 
4497
+      END
 
4498
Index: gcc/testsuite/gfortran.dg/nint_2.f90
 
4499
===================================================================
 
4500
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../tags/gcc_4_8_3_release)
 
4501
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../branches/gcc-4_8-branch)
 
4502
@@ -4,7 +4,8 @@
 
4503
 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
 
4504
 !
 
4505
 ! { dg-do run }
 
4506
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
4507
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
4508
+! Note that this doesn't fail on powerpc64le-*-linux*.
 
4509
   real(kind=8) :: a
 
4510
   integer(kind=8) :: i1, i2
 
4511
   real :: b
 
4512
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
 
4513
===================================================================
 
4514
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../tags/gcc_4_8_3_release)
 
4515
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../branches/gcc-4_8-branch)
 
4516
@@ -23,7 +23,7 @@
 
4517
     call bar2 (c)
 
4518
     call bar3 (c)
 
4519
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4520
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4521
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
 
4522
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4523
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4524
   end subroutine
 
4525
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
 
4526
===================================================================
 
4527
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../tags/gcc_4_8_3_release)
 
4528
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../branches/gcc-4_8-branch)
 
4529
@@ -0,0 +1,16 @@
 
4530
+! { dg-do run }
 
4531
+! { dg-options "-ffrontend-optimize" }
 
4532
+! PR 62214 - this used to give the wrong result.
 
4533
+! Original test case by Oliver Fuhrer
 
4534
+PROGRAM test
 
4535
+  IMPLICIT NONE
 
4536
+  CHARACTER(LEN=20)   :: fullNames(2)
 
4537
+  CHARACTER(LEN=255)  :: pathName
 
4538
+  CHARACTER(LEN=5)    :: fileNames(2)
 
4539
+  
 
4540
+  pathName = "/dir1/dir2/"
 
4541
+  fileNames = (/ "file1", "file2" /)
 
4542
+  fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
 
4543
+  if (fullNames(1) /= '/dir1/dir2/file1' .or. &
 
4544
+       & fullnames(2) /= '/dir1/dir2/file2') call abort
 
4545
+END PROGRAM test
 
4546
Index: gcc/testsuite/gfortran.dg/pr45636.f90
 
4547
===================================================================
 
4548
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
 
4549
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
 
4550
@@ -10,5 +10,5 @@
 
4551
   b = y
 
4552
   call sub(a, b)
 
4553
 end program main
 
4554
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
 
4555
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
 
4556
 ! { dg-final { cleanup-tree-dump "forwprop2" } }
 
4557
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
 
4558
===================================================================
 
4559
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../tags/gcc_4_8_3_release)
 
4560
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../branches/gcc-4_8-branch)
 
4561
@@ -0,0 +1,47 @@
 
4562
+! { dg-do run }
 
4563
+! Test the fix for PR61459.
 
4564
+!
 
4565
+! Contributed by John Wingate  <johnww@tds.net>
 
4566
+!
 
4567
+module a
 
4568
+
 
4569
+   implicit none
 
4570
+   private
 
4571
+   public :: f_segfault, f_segfault_plus, f_workaround
 
4572
+   integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
 
4573
+
 
4574
+contains
 
4575
+
 
4576
+   function f_segfault(x)
 
4577
+      real, dimension(:), allocatable :: f_segfault
 
4578
+      real, dimension(:), intent(in)  :: x
 
4579
+      allocate(f_segfault(2))
 
4580
+      f_segfault = matmul(b,x)
 
4581
+   end function f_segfault
 
4582
+
 
4583
+! Sefaulted without the ALLOCATE as well.
 
4584
+   function f_segfault_plus(x)
 
4585
+      real, dimension(:), allocatable :: f_segfault_plus
 
4586
+      real, dimension(:), intent(in)  :: x
 
4587
+      f_segfault_plus = matmul(b,x)
 
4588
+   end function f_segfault_plus
 
4589
+
 
4590
+   function f_workaround(x)
 
4591
+      real, dimension(:), allocatable :: f_workaround
 
4592
+      real, dimension(:), intent(in)  :: x
 
4593
+      real, dimension(:), allocatable :: tmp
 
4594
+      allocate(f_workaround(2),tmp(2))
 
4595
+      tmp = matmul(b,x)
 
4596
+      f_workaround = tmp
 
4597
+   end function f_workaround
 
4598
+
 
4599
+end module a
 
4600
+
 
4601
+program main
 
4602
+   use a
 
4603
+   implicit none
 
4604
+   real, dimension(2) :: x = 1.0, y
 
4605
+   y = f_workaround (x)
 
4606
+   if (any (f_segfault (x) .ne. y)) call abort
 
4607
+   if (any (f_segfault_plus (x) .ne. y)) call abort
 
4608
+end program main
 
4609
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
 
4610
===================================================================
 
4611
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../tags/gcc_4_8_3_release)
 
4612
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../branches/gcc-4_8-branch)
 
4613
@@ -16,7 +16,7 @@
 
4614
 implicit none
 
4615
 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] 
 
4616
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
 
4617
-                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
 
4618
+                  * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
 
4619
 ! The following is sufficient for me - the values above are a bit
 
4620
 ! more tolerant
 
4621
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
 
4622
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
 
4623
===================================================================
 
4624
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
 
4625
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
 
4626
@@ -0,0 +1,29 @@
 
4627
+/* PR rtl-optimization/63659 */
 
4628
+
 
4629
+int a, b, c, *d = &b, g, h, i;
 
4630
+unsigned char e;
 
4631
+char f;
 
4632
+
 
4633
+int
 
4634
+main ()
 
4635
+{
 
4636
+  while (a)
 
4637
+    {
 
4638
+      for (a = 0; a; a++)
 
4639
+       for (; c; c++)
 
4640
+         ;
 
4641
+      if (i)
 
4642
+       break;
 
4643
+    }
 
4644
+
 
4645
+  char j = c, k = -1, l;
 
4646
+  l = g = j >> h;
 
4647
+  f = l == 0 ? k : k % l;
 
4648
+  e = 0 ? 0 : f;
 
4649
+  *d = e;
 
4650
+
 
4651
+  if (b != 255)
 
4652
+    __builtin_abort ();
 
4653
+
 
4654
+  return 0;
 
4655
+}
 
4656
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
 
4657
===================================================================
 
4658
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../tags/gcc_4_8_3_release)
 
4659
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../branches/gcc-4_8-branch)
 
4660
@@ -0,0 +1,39 @@
 
4661
+#ifdef __INT32_TYPE__
 
4662
+typedef __INT32_TYPE__ int32_t;
 
4663
+#else
 
4664
+typedef int int32_t;
 
4665
+#endif
 
4666
+
 
4667
+#ifdef __UINT32_TYPE__
 
4668
+typedef __UINT32_TYPE__ uint32_t;
 
4669
+#else
 
4670
+typedef unsigned uint32_t;
 
4671
+#endif
 
4672
+
 
4673
+#define __fake_const_swab32(x) ((uint32_t)(                  \
 
4674
+       (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |    \
 
4675
+       (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |    \
 
4676
+       (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |    \
 
4677
+       (( (int32_t)(x) &  (int32_t)0xff000000UL) >> 24)))
 
4678
+
 
4679
+/* Previous version of bswap optimization failed to consider sign extension
 
4680
+   and as a result would replace an expression *not* doing a bswap by a
 
4681
+   bswap.  */
 
4682
+
 
4683
+__attribute__ ((noinline, noclone)) uint32_t
 
4684
+fake_bswap32 (uint32_t in)
 
4685
+{
 
4686
+  return __fake_const_swab32 (in);
 
4687
+}
 
4688
+
 
4689
+int
 
4690
+main(void)
 
4691
+{
 
4692
+  if (sizeof (int32_t) * __CHAR_BIT__ != 32)
 
4693
+    return 0;
 
4694
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
4695
+    return 0;
 
4696
+  if (fake_bswap32 (0x87654321) != 0xffffff87)
 
4697
+    __builtin_abort ();
 
4698
+  return 0;
 
4699
+}
 
4700
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
 
4701
===================================================================
 
4702
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
 
4703
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
 
4704
@@ -0,0 +1,2 @@
 
4705
+set additional_flags "-Wno-psabi"
 
4706
+return 0
 
4707
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
 
4708
===================================================================
 
4709
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../tags/gcc_4_8_3_release)
 
4710
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../branches/gcc-4_8-branch)
 
4711
@@ -0,0 +1,23 @@
 
4712
+union U
 
4713
+{
 
4714
+  const int a;
 
4715
+  unsigned b : 20;
 
4716
+};
 
4717
+
 
4718
+static union U u = { 0x12345678 };
 
4719
+
 
4720
+/* Constant folding used to fail to account for endianness when folding a
 
4721
+   union.  */
 
4722
+
 
4723
+int
 
4724
+main (void)
 
4725
+{
 
4726
+#ifdef __BYTE_ORDER__
 
4727
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
4728
+  return u.b - 0x45678;
 
4729
+#else
 
4730
+  return u.b - 0x12345;
 
4731
+#endif
 
4732
+#endif
 
4733
+  return 0;
 
4734
+}
 
4735
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
 
4736
===================================================================
 
4737
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../tags/gcc_4_8_3_release)
 
4738
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../branches/gcc-4_8-branch)
 
4739
@@ -0,0 +1,13 @@
 
4740
+short a = -1;
 
4741
+int b;
 
4742
+char c;
 
4743
+
 
4744
+int
 
4745
+main ()
 
4746
+{
 
4747
+  c = a;
 
4748
+  b = a | c;
 
4749
+  if (b != -1)
 
4750
+    __builtin_abort ();
 
4751
+  return 0;
 
4752
+}
 
4753
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
 
4754
===================================================================
 
4755
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../tags/gcc_4_8_3_release)
 
4756
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../branches/gcc-4_8-branch)
 
4757
@@ -6,4 +6,5 @@
 
4758
        set additional_flags "-mno-mmx"
 
4759
 }
 
4760
 
 
4761
+set additional_flags "-Wno-psabi"
 
4762
 return 0
 
4763
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
 
4764
===================================================================
 
4765
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../tags/gcc_4_8_3_release)
 
4766
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../branches/gcc-4_8-branch)
 
4767
@@ -0,0 +1,40 @@
 
4768
+#ifdef __INT16_TYPE__
 
4769
+typedef __INT16_TYPE__ int16_t;
 
4770
+#else
 
4771
+typedef short int16_t;
 
4772
+#endif
 
4773
+
 
4774
+#ifdef __UINT32_TYPE__
 
4775
+typedef __UINT32_TYPE__ uint32_t;
 
4776
+#else
 
4777
+typedef unsigned uint32_t;
 
4778
+#endif
 
4779
+
 
4780
+#define __fake_const_swab32(x) ((uint32_t)(                          \
 
4781
+       (((uint32_t)         (x) & (uint32_t)0x000000ffUL) << 24) |   \
 
4782
+       (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) <<  8) |   \
 
4783
+       (((uint32_t)         (x) & (uint32_t)0x00ff0000UL) >>  8) |   \
 
4784
+       (((uint32_t)         (x) & (uint32_t)0xff000000UL) >> 24)))
 
4785
+
 
4786
+
 
4787
+/* Previous version of bswap optimization failed to consider sign extension
 
4788
+   and as a result would replace an expression *not* doing a bswap by a
 
4789
+   bswap.  */
 
4790
+
 
4791
+__attribute__ ((noinline, noclone)) uint32_t
 
4792
+fake_bswap32 (uint32_t in)
 
4793
+{
 
4794
+  return __fake_const_swab32 (in);
 
4795
+}
 
4796
+
 
4797
+int
 
4798
+main(void)
 
4799
+{
 
4800
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
4801
+    return 0;
 
4802
+  if (sizeof (int16_t) * __CHAR_BIT__ != 16)
 
4803
+    return 0;
 
4804
+  if (fake_bswap32 (0x81828384) != 0xff838281)
 
4805
+    __builtin_abort ();
 
4806
+  return 0;
 
4807
+}
 
4808
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
 
4809
===================================================================
 
4810
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
 
4811
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
 
4812
@@ -0,0 +1,35 @@
 
4813
+#ifdef __UINT64_TYPE__
 
4814
+typedef __UINT64_TYPE__ uint64_t;
 
4815
+#else
 
4816
+typedef unsigned long long uint64_t;
 
4817
+#endif
 
4818
+
 
4819
+#ifndef __SIZEOF_INT128__
 
4820
+#define __int128 long long
 
4821
+#endif
 
4822
+
 
4823
+/* Some version of bswap optimization would ICE when analyzing a mask constant
 
4824
+   too big for an HOST_WIDE_INT (PR61375).  */
 
4825
+
 
4826
+__attribute__ ((noinline, noclone)) uint64_t
 
4827
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
 
4828
+{
 
4829
+  __int128 mask = (__int128)0xffff << 56;
 
4830
+  return ((in1 & mask) >> 56) | in2;
 
4831
+}
 
4832
+
 
4833
+int
 
4834
+main (int argc)
 
4835
+{
 
4836
+  __int128 in = 1;
 
4837
+#ifdef __SIZEOF_INT128__
 
4838
+  in <<= 64;
 
4839
+#endif
 
4840
+  if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
 
4841
+    return 0;
 
4842
+  if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
 
4843
+    return 0;
 
4844
+  if (uint128_central_bitsi_ior (in, 2) != 0x102)
 
4845
+    __builtin_abort ();
 
4846
+  return 0;
 
4847
+}
 
4848
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
 
4849
===================================================================
 
4850
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../tags/gcc_4_8_3_release)
 
4851
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../branches/gcc-4_8-branch)
 
4852
@@ -4,4 +4,5 @@
 
4853
        return 1
 
4854
 }
 
4855
 
 
4856
+set additional_flags "-Wno-psabi"
 
4857
 return 0;
 
4858
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
 
4859
===================================================================
 
4860
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../tags/gcc_4_8_3_release)
 
4861
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../branches/gcc-4_8-branch)
 
4862
@@ -0,0 +1,2 @@
 
4863
+set additional_flags "-Wno-psabi"
 
4864
+return 0
 
4865
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
 
4866
===================================================================
 
4867
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
 
4868
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
 
4869
@@ -0,0 +1,15 @@
 
4870
+/* PR tree-optimization/61684 */
 
4871
+
 
4872
+int a, c;
 
4873
+static int *b = 0;
 
4874
+short d;
 
4875
+static short **e = 0;
 
4876
+
 
4877
+void
 
4878
+foo ()
 
4879
+{
 
4880
+  for (; c < 1; c++)
 
4881
+    ;
 
4882
+  *e = &d;
 
4883
+  a = d && (c && 1) & *b;
 
4884
+}
 
4885
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
 
4886
===================================================================
 
4887
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
 
4888
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
 
4889
@@ -0,0 +1,10 @@
 
4890
+/* PR middle-end/64067 */
 
4891
+
 
4892
+struct S { int s; };
 
4893
+int *const v[1] = { &((struct S) { .s = 42 }).s };
 
4894
+
 
4895
+int *
 
4896
+foo (void)
 
4897
+{
 
4898
+  return v[0];
 
4899
+}
 
4900
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
 
4901
===================================================================
 
4902
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
 
4903
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
 
4904
@@ -0,0 +1,13 @@
 
4905
+/* PR inline-asm/63282 */
 
4906
+
 
4907
+void bar (void);
 
4908
+
 
4909
+void
 
4910
+foo (void)
 
4911
+{
 
4912
+  asm volatile goto ("" : : : : a, b);
 
4913
+a:
 
4914
+  bar ();
 
4915
+b:
 
4916
+  return;
 
4917
+}
 
4918
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
 
4919
===================================================================
 
4920
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../tags/gcc_4_8_3_release)
 
4921
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../branches/gcc-4_8-branch)
 
4922
@@ -0,0 +1,53 @@
 
4923
+with Ada.Streams; use Ada.Streams;
 
4924
+
 
4925
+package body Opt41_Pkg is
 
4926
+
 
4927
+   type Wstream is new Root_Stream_Type with record
 
4928
+      S : Unbounded_String;
 
4929
+   end record;
 
4930
+
 
4931
+   procedure Read (Stream : in out Wstream;
 
4932
+                   Item   : out Stream_Element_Array;
 
4933
+                   Last   : out Stream_Element_Offset) is null;
 
4934
+
 
4935
+   procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
 
4936
+   begin
 
4937
+      for J in Item'Range loop
 
4938
+         Append (Stream.S, Character'Val (Item (J)));
 
4939
+      end loop;
 
4940
+   end Write;
 
4941
+
 
4942
+   function Rec_Write (R : Rec) return Unbounded_String is
 
4943
+      S : aliased Wstream;
 
4944
+   begin
 
4945
+      Rec'Output (S'Access, R);
 
4946
+      return S.S;
 
4947
+   end Rec_Write;
 
4948
+
 
4949
+   type Rstream is new Root_Stream_Type with record
 
4950
+      S   : String_Access;
 
4951
+      Idx : Integer := 1;
 
4952
+   end record;
 
4953
+
 
4954
+   procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
 
4955
+
 
4956
+   procedure Read (Stream : in out Rstream;
 
4957
+                   Item   : out Stream_Element_Array;
 
4958
+                   Last   : out Stream_Element_Offset) is
 
4959
+   begin
 
4960
+      Last := Stream_Element_Offset'Min
 
4961
+         (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
 
4962
+      for I in Item'First .. Last loop
 
4963
+         Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
 
4964
+         Stream.Idx := Stream.Idx + 1;
 
4965
+      end loop;
 
4966
+   end Read;
 
4967
+
 
4968
+   function Rec_Read (Str : String_Access) return Rec is
 
4969
+      S : aliased Rstream;
 
4970
+   begin
 
4971
+      S.S := Str;
 
4972
+      return Rec'Input (S'Access);
 
4973
+   end Rec_Read;
 
4974
+
 
4975
+end Opt41_Pkg;
 
4976
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
 
4977
===================================================================
 
4978
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../tags/gcc_4_8_3_release)
 
4979
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../branches/gcc-4_8-branch)
 
4980
@@ -0,0 +1,28 @@
 
4981
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
4982
+
 
4983
+package Opt41_Pkg is
 
4984
+
 
4985
+   type Enum is (One, Two, Three, Four, Five, Six);
 
4986
+
 
4987
+   type Rec (D : Enum) is record
 
4988
+      case D is
 
4989
+         when One => 
 
4990
+            I : Integer;
 
4991
+         when Two | Five | Six =>
 
4992
+            S : Unbounded_String;
 
4993
+            case D is
 
4994
+               when Two => B : Boolean;
 
4995
+               when others => null;
 
4996
+            end case;
 
4997
+         when others =>
 
4998
+            null;
 
4999
+      end case;
 
5000
+   end record;
 
5001
+
 
5002
+   type Rec_Ptr is access all Rec;
 
5003
+
 
5004
+   function Rec_Write (R : Rec) return Unbounded_String;
 
5005
+
 
5006
+   function Rec_Read (Str : String_Access) return Rec;
 
5007
+
 
5008
+end Opt41_Pkg;
 
5009
Index: gcc/testsuite/gnat.dg/opt39.adb
 
5010
===================================================================
 
5011
--- a/src/gcc/testsuite/gnat.dg/opt39.adb       (.../tags/gcc_4_8_3_release)
 
5012
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb       (.../branches/gcc-4_8-branch)
 
5013
@@ -0,0 +1,31 @@
 
5014
+-- { dg-do compile }
 
5015
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
 
5016
+
 
5017
+procedure Opt39 (I : Integer) is
 
5018
+
 
5019
+  type Rec is record
 
5020
+    I1 : Integer;
 
5021
+    I2 : Integer;
 
5022
+    I3 : Integer;
 
5023
+    I4 : Integer;
 
5024
+    I5 : Integer;
 
5025
+  end record;
 
5026
+
 
5027
+  procedure Set (A : access Rec; I : Integer) is
 
5028
+    Tmp : Rec := A.all;
 
5029
+  begin
 
5030
+    Tmp.I1 := I;
 
5031
+    A.all := Tmp;
 
5032
+  end;
 
5033
+
 
5034
+  R : aliased Rec;
 
5035
+
 
5036
+begin
 
5037
+  Set (R'Access, I);
 
5038
+  if R.I1 /= I then
 
5039
+    raise Program_Error;
 
5040
+  end if;
 
5041
+end;
 
5042
+
 
5043
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
 
5044
+-- { dg-final { cleanup-tree-dump "optimized" } }
 
5045
Index: gcc/testsuite/gnat.dg/opt41.adb
 
5046
===================================================================
 
5047
--- a/src/gcc/testsuite/gnat.dg/opt41.adb       (.../tags/gcc_4_8_3_release)
 
5048
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb       (.../branches/gcc-4_8-branch)
 
5049
@@ -0,0 +1,15 @@
 
5050
+-- { dg-do run }
 
5051
+-- { dg-options "-Os" }
 
5052
+
 
5053
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
5054
+with Opt41_Pkg;             use Opt41_Pkg;
 
5055
+
 
5056
+procedure Opt41 is
 
5057
+   R  : Rec := (Five, To_Unbounded_String ("CONFIG"));
 
5058
+   SP : String_Access := new String'(To_String (Rec_Write (R)));
 
5059
+   RP : Rec_Ptr := new Rec'(Rec_Read (SP));
 
5060
+begin
 
5061
+   if RP.D /= R.D then
 
5062
+      raise Program_Error;
 
5063
+   end if;
 
5064
+end;
 
5065
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
 
5066
===================================================================
 
5067
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../tags/gcc_4_8_3_release)
 
5068
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../branches/gcc-4_8-branch)
 
5069
@@ -0,0 +1,19 @@
 
5070
+-- { dg-do run }
 
5071
+-- { dg-options "-gnato -O" }
 
5072
+
 
5073
+procedure Overflow_Fixed is
 
5074
+
 
5075
+  type Unsigned_8_Bit is mod 2**8;
 
5076
+
 
5077
+  procedure Fixed_To_Eight (Value : Duration) is
 
5078
+    Item : Unsigned_8_Bit;
 
5079
+  begin
 
5080
+    Item := Unsigned_8_Bit(Value);
 
5081
+    raise Program_Error;
 
5082
+  exception
 
5083
+    when Constraint_Error => null; -- expected case
 
5084
+  end;
 
5085
+
 
5086
+begin
 
5087
+  Fixed_To_Eight (-0.5);
 
5088
+end;
 
5089
Index: gcc/testsuite/gnat.dg/aliasing1.adb
 
5090
===================================================================
 
5091
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../tags/gcc_4_8_3_release)
 
5092
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../branches/gcc-4_8-branch)
 
5093
@@ -18,5 +18,5 @@
 
5094
 
 
5095
 end Aliasing1;
 
5096
 
 
5097
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
 
5098
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
 
5099
 -- { dg-final { cleanup-tree-dump "optimized" } }
 
5100
Index: gcc/testsuite/gcc.dg/pr60866.c
 
5101
===================================================================
 
5102
--- a/src/gcc/testsuite/gcc.dg/pr60866.c        (.../tags/gcc_4_8_3_release)
 
5103
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c        (.../branches/gcc-4_8-branch)
 
5104
@@ -0,0 +1,18 @@
 
5105
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
 
5106
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns"  } */
 
5107
+
 
5108
+int n;
 
5109
+
 
5110
+void
 
5111
+foo (int w, int **dnroot, int **dn)
 
5112
+{
 
5113
+  int *child;
 
5114
+  int *xchild = xchild;
 
5115
+  for (; w < n; w++)
 
5116
+    if (!dnroot)
 
5117
+      {
 
5118
+       dnroot = dn;
 
5119
+       for (child = *dn; child; child = xchild)
 
5120
+         ;
 
5121
+      }
 
5122
+}
 
5123
Index: gcc/testsuite/gcc.dg/pr51879-12.c
 
5124
===================================================================
 
5125
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../tags/gcc_4_8_3_release)
 
5126
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../branches/gcc-4_8-branch)
 
5127
@@ -24,6 +24,6 @@
 
5128
   baz (a);
 
5129
 }
 
5130
 
 
5131
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
 
5132
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
 
5133
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
 
5134
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
 
5135
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
5136
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
 
5137
===================================================================
 
5138
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../tags/gcc_4_8_3_release)
 
5139
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../branches/gcc-4_8-branch)
 
5140
@@ -1,4 +1,5 @@
 
5141
 /* { dg-do compile } */
 
5142
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5143
 #include <altivec.h>
 
5144
 typedef const volatile unsigned int _1;
 
5145
 typedef const  unsigned int _2;
 
5146
Index: gcc/testsuite/gcc.dg/vmx/ops.c
 
5147
===================================================================
 
5148
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../tags/gcc_4_8_3_release)
 
5149
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../branches/gcc-4_8-branch)
 
5150
@@ -1,4 +1,5 @@
 
5151
 /* { dg-do compile } */
 
5152
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5153
 #include <altivec.h>
 
5154
 #include <stdlib.h>
 
5155
 extern char * *var_char_ptr;
 
5156
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
 
5157
===================================================================
 
5158
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
 
5159
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
 
5160
@@ -1,4 +1,5 @@
 
5161
 /* { dg-do compile } */
 
5162
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
5163
 
 
5164
 /* Checks from the original ops.c that pass pointers to long or
 
5165
    unsigned long for operations that support that in released versions
 
5166
Index: gcc/testsuite/gcc.dg/pr63665.c
 
5167
===================================================================
 
5168
--- a/src/gcc/testsuite/gcc.dg/pr63665.c        (.../tags/gcc_4_8_3_release)
 
5169
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c        (.../branches/gcc-4_8-branch)
 
5170
@@ -0,0 +1,18 @@
 
5171
+/* { dg-do run } */
 
5172
+/* { dg-require-effective-target int32plus } */
 
5173
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
 
5174
+
 
5175
+static inline int
 
5176
+test5 (int x)
 
5177
+{
 
5178
+  int y = 0x80000000;
 
5179
+  return x + y;
 
5180
+}
 
5181
+
 
5182
+int
 
5183
+main ()
 
5184
+{
 
5185
+  if (test5 (0x80000000) != 0)
 
5186
+    __builtin_abort ();
 
5187
+  return 0;
 
5188
+}
 
5189
Index: gcc/testsuite/gcc.dg/pr63342.c
 
5190
===================================================================
 
5191
--- a/src/gcc/testsuite/gcc.dg/pr63342.c        (.../tags/gcc_4_8_3_release)
 
5192
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c        (.../branches/gcc-4_8-branch)
 
5193
@@ -0,0 +1,26 @@
 
5194
+/* PR debug/63342 */
 
5195
+/* { dg-do compile } */
 
5196
+/* { dg-options "-g -O2" } */
 
5197
+/* { dg-additional-options "-fpic" { target fpic } } */
 
5198
+
 
5199
+static __thread double u[9], v[9];
 
5200
+
 
5201
+void
 
5202
+foo (double **p, double **q)
 
5203
+{
 
5204
+  *p = u;
 
5205
+  *q = v;
 
5206
+}
 
5207
+
 
5208
+double
 
5209
+bar (double x)
 
5210
+{
 
5211
+  int i;
 
5212
+  double s = 0.0;
 
5213
+  for (i = 0; i < 9; i++)
 
5214
+    {
 
5215
+      double a = x + v[i];
 
5216
+      s += u[i] * a * a;
 
5217
+    }
 
5218
+  return s;
 
5219
+}
 
5220
Index: gcc/testsuite/gcc.dg/pr63284.c
 
5221
===================================================================
 
5222
--- a/src/gcc/testsuite/gcc.dg/pr63284.c        (.../tags/gcc_4_8_3_release)
 
5223
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c        (.../branches/gcc-4_8-branch)
 
5224
@@ -0,0 +1,42 @@
 
5225
+/* PR debug/63284 */
 
5226
+/* { dg-do compile } */
 
5227
+/* { dg-options "-O2 -fcompare-debug" } */
 
5228
+
 
5229
+int a[10], *b, *d, c, f;
 
5230
+int fn2 (void);
 
5231
+void fn3 (void);
 
5232
+void fn4 (int);
 
5233
+
 
5234
+static int
 
5235
+fn1 (int x)
 
5236
+{
 
5237
+  int e = a[0];
 
5238
+  if (e)
 
5239
+    return 1;
 
5240
+  if (b)
 
5241
+    switch (x)
 
5242
+      {
 
5243
+      case 1:
 
5244
+        if (d)
 
5245
+          e = fn2 ();
 
5246
+        else
 
5247
+          fn3 ();
 
5248
+        break;
 
5249
+      case 0:
 
5250
+        if (d)
 
5251
+          {
 
5252
+            fn3 ();
 
5253
+            if (c)
 
5254
+              fn4 (1);
 
5255
+          }
 
5256
+        else
 
5257
+          fn4 (0);
 
5258
+      }
 
5259
+  return e;
 
5260
+}
 
5261
+
 
5262
+void
 
5263
+fn6 (void)
 
5264
+{
 
5265
+  f = fn1 (0);
 
5266
+}
 
5267
Index: gcc/testsuite/gcc.dg/pr61045.c
 
5268
===================================================================
 
5269
--- a/src/gcc/testsuite/gcc.dg/pr61045.c        (.../tags/gcc_4_8_3_release)
 
5270
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c        (.../branches/gcc-4_8-branch)
 
5271
@@ -0,0 +1,12 @@
 
5272
+/* { dg-do run } */
 
5273
+/* { dg-options "-fstrict-overflow" } */
 
5274
+
 
5275
+int main ()
 
5276
+{
 
5277
+  int a = 0;
 
5278
+  int b = __INT_MAX__;
 
5279
+  int t = (a - 2) > (b - 1);
 
5280
+  if (t != 0)
 
5281
+    __builtin_abort();
 
5282
+  return 0;
 
5283
+}
 
5284
Index: gcc/testsuite/gcc.dg/pr62167-run.c
 
5285
===================================================================
 
5286
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../tags/gcc_4_8_3_release)
 
5287
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../branches/gcc-4_8-branch)
 
5288
@@ -0,0 +1,47 @@
 
5289
+/* { dg-do run } */
 
5290
+/* { dg-options "-O2 -ftree-tail-merge" } */
 
5291
+
 
5292
+struct node
 
5293
+{
 
5294
+  struct node *next;
 
5295
+  struct node *prev;
 
5296
+};
 
5297
+
 
5298
+struct node node;
 
5299
+
 
5300
+struct head
 
5301
+{
 
5302
+  struct node *first;
 
5303
+};
 
5304
+
 
5305
+struct head heads[5];
 
5306
+
 
5307
+int k = 2;
 
5308
+
 
5309
+struct head *head = &heads[2];
 
5310
+
 
5311
+int
 
5312
+main ()
 
5313
+{
 
5314
+  struct node *p;
 
5315
+
 
5316
+  node.next = (void*)0;
 
5317
+
 
5318
+  node.prev = (void *)head;
 
5319
+
 
5320
+  head->first = &node;
 
5321
+
 
5322
+  struct node *n = head->first;
 
5323
+
 
5324
+  struct head *h = &heads[k];
 
5325
+
 
5326
+  heads[2].first = n->next;
 
5327
+
 
5328
+  if ((void*)n->prev == (void *)h)
 
5329
+    p = h->first;
 
5330
+  else
 
5331
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5332
+    p = n->prev->next;
 
5333
+
 
5334
+  return !(p == (void*)0);
 
5335
+}
 
5336
Index: gcc/testsuite/gcc.dg/pr52769.c
 
5337
===================================================================
 
5338
--- a/src/gcc/testsuite/gcc.dg/pr52769.c        (.../tags/gcc_4_8_3_release)
 
5339
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c        (.../branches/gcc-4_8-branch)
 
5340
@@ -0,0 +1,24 @@
 
5341
+/* PR c/52769 */
 
5342
+/* { dg-do run } */
 
5343
+/* { dg-options "-O3" } */
 
5344
+
 
5345
+typedef struct
 
5346
+{
 
5347
+  int should_be_zero;
 
5348
+  char s[6];
 
5349
+  int x;
 
5350
+} foo_t;
 
5351
+
 
5352
+int
 
5353
+main (void)
 
5354
+{
 
5355
+  volatile foo_t foo = {
 
5356
+    .s = "123456",
 
5357
+    .x = 2
 
5358
+  };
 
5359
+
 
5360
+  if (foo.should_be_zero != 0)
 
5361
+    __builtin_abort ();
 
5362
+
 
5363
+  return 0;
 
5364
+}
 
5365
Index: gcc/testsuite/gcc.dg/pr62167.c
 
5366
===================================================================
 
5367
--- a/src/gcc/testsuite/gcc.dg/pr62167.c        (.../tags/gcc_4_8_3_release)
 
5368
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c        (.../branches/gcc-4_8-branch)
 
5369
@@ -0,0 +1,50 @@
 
5370
+/* { dg-do compile } */
 
5371
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
 
5372
+
 
5373
+struct node
 
5374
+{
 
5375
+  struct node *next;
 
5376
+  struct node *prev;
 
5377
+};
 
5378
+
 
5379
+struct node node;
 
5380
+
 
5381
+struct head
 
5382
+{
 
5383
+  struct node *first;
 
5384
+};
 
5385
+
 
5386
+struct head heads[5];
 
5387
+
 
5388
+int k = 2;
 
5389
+
 
5390
+struct head *head = &heads[2];
 
5391
+
 
5392
+int
 
5393
+main ()
 
5394
+{
 
5395
+  struct node *p;
 
5396
+
 
5397
+  node.next = (void*)0;
 
5398
+
 
5399
+  node.prev = (void *)head;
 
5400
+
 
5401
+  head->first = &node;
 
5402
+
 
5403
+  struct node *n = head->first;
 
5404
+
 
5405
+  struct head *h = &heads[k];
 
5406
+
 
5407
+  heads[2].first = n->next;
 
5408
+
 
5409
+  if ((void*)n->prev == (void *)h)
 
5410
+    p = h->first;
 
5411
+  else
 
5412
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5413
+    p = n->prev->next;
 
5414
+
 
5415
+  return !(p == (void*)0);
 
5416
+}
 
5417
+
 
5418
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
 
5419
+/* { dg-final { cleanup-tree-dump "pre" } } */
 
5420
Index: gcc/testsuite/gcc.dg/pr62004.c
 
5421
===================================================================
 
5422
--- a/src/gcc/testsuite/gcc.dg/pr62004.c        (.../tags/gcc_4_8_3_release)
 
5423
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c        (.../branches/gcc-4_8-branch)
 
5424
@@ -0,0 +1,47 @@
 
5425
+/* { dg-do run } */
 
5426
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
 
5427
+
 
5428
+struct node
 
5429
+{
 
5430
+  struct node *next;
 
5431
+  struct node *prev;
 
5432
+};
 
5433
+
 
5434
+struct node node;
 
5435
+
 
5436
+struct head
 
5437
+{
 
5438
+  struct node *first;
 
5439
+};
 
5440
+
 
5441
+struct head heads[5];
 
5442
+
 
5443
+int k = 2;
 
5444
+
 
5445
+struct head *head = &heads[2];
 
5446
+
 
5447
+int
 
5448
+main ()
 
5449
+{
 
5450
+  struct node *p;
 
5451
+
 
5452
+  node.next = (void*)0;
 
5453
+
 
5454
+  node.prev = (void *)head;
 
5455
+
 
5456
+  head->first = &node;
 
5457
+
 
5458
+  struct node *n = head->first;
 
5459
+
 
5460
+  struct head *h = &heads[k];
 
5461
+
 
5462
+  heads[2].first = n->next;
 
5463
+
 
5464
+  if ((void*)n->prev == (void *)h)
 
5465
+    p = h->first;
 
5466
+  else
 
5467
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5468
+    p = n->prev->next;
 
5469
+
 
5470
+  return !(p == (void*)0);
 
5471
+}
 
5472
Index: gcc/testsuite/gcc.dg/pr51879-18.c
 
5473
===================================================================
 
5474
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../tags/gcc_4_8_3_release)
 
5475
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../branches/gcc-4_8-branch)
 
5476
@@ -13,5 +13,5 @@
 
5477
     *q = foo ();
 
5478
 }
 
5479
 
 
5480
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
 
5481
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
 
5482
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
5483
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
 
5484
===================================================================
 
5485
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../tags/gcc_4_8_3_release)
 
5486
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../branches/gcc-4_8-branch)
 
5487
@@ -0,0 +1,33 @@
 
5488
+/* { dg-do run } */
 
5489
+
 
5490
+extern void abort (void);
 
5491
+
 
5492
+struct node { struct node *next, *prev; } node;
 
5493
+struct head { struct node *first; } heads[5];
 
5494
+int k = 2;
 
5495
+struct head *head = &heads[2];
 
5496
+
 
5497
+static int __attribute__((noinline))
 
5498
+foo()
 
5499
+{
 
5500
+  node.prev = (void *)head;
 
5501
+  head->first = &node;
 
5502
+
 
5503
+  struct node *n = head->first;
 
5504
+  struct head *h = &heads[k];
 
5505
+
 
5506
+  if (n->prev == (void *)h)
 
5507
+    h->first = n->next;
 
5508
+  else
 
5509
+    n->prev->next = n->next;
 
5510
+
 
5511
+  n->next = h->first;
 
5512
+  return n->next == &node;
 
5513
+}
 
5514
+
 
5515
+int main()
 
5516
+{
 
5517
+  if (foo ())
 
5518
+    abort ();
 
5519
+  return 0;
 
5520
+}
 
5521
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
 
5522
===================================================================
 
5523
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../tags/gcc_4_8_3_release)
 
5524
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../branches/gcc-4_8-branch)
 
5525
@@ -0,0 +1,8 @@
 
5526
+/* { dg-do compile } */
 
5527
+
 
5528
+int main (void)
 
5529
+{
 
5530
+  int a = 0;
 
5531
+  unsigned b = (a * 64 & 192) | 63U;
 
5532
+  return 0;
 
5533
+}
 
5534
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
 
5535
===================================================================
 
5536
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../tags/gcc_4_8_3_release)
 
5537
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../branches/gcc-4_8-branch)
 
5538
@@ -0,0 +1,31 @@
 
5539
+/* { dg-do run } */
 
5540
+
 
5541
+int a, b;
 
5542
+short c, d;
 
5543
+char e, f;
 
5544
+
 
5545
+int
 
5546
+fn1 (int p1, char p2)
 
5547
+{
 
5548
+  return p1 || p2 ? 0 : p2;
 
5549
+}
 
5550
+
 
5551
+void
 
5552
+fn2 ()
 
5553
+{
 
5554
+  for (; a;)
 
5555
+    {
 
5556
+      int g;
 
5557
+      g = c = e;
 
5558
+      for (; a;)
 
5559
+       b = fn1 (g = d = e, g);
 
5560
+      f = g; 
 
5561
+    }
 
5562
+}
 
5563
+
 
5564
+int
 
5565
+main ()
 
5566
+{
 
5567
+  fn2 (); 
 
5568
+  return 0;
 
5569
+}
 
5570
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
 
5571
===================================================================
 
5572
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../tags/gcc_4_8_3_release)
 
5573
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../branches/gcc-4_8-branch)
 
5574
@@ -0,0 +1,35 @@
 
5575
+/* { dg-do run } */
 
5576
+
 
5577
+int a, b = 1, c, d, e, f, g;
 
5578
+
 
5579
+int
 
5580
+fn1 ()
 
5581
+{
 
5582
+  int h;
 
5583
+  for (;;)
 
5584
+    {
 
5585
+      g = b;
 
5586
+      g = g ? 0 : 1 % g;
 
5587
+      e = a + 1;
 
5588
+      for (; d < 1; d = e)
 
5589
+       {
 
5590
+         if (f == 0)
 
5591
+           h = 0;
 
5592
+         else
 
5593
+           h = 1 % f;
 
5594
+         if (f < 1)
 
5595
+           c = 0;
 
5596
+         else if (h)
 
5597
+           break;
 
5598
+       }
 
5599
+      if (b)
 
5600
+       return 0;
 
5601
+    }
 
5602
+}
 
5603
+
 
5604
+int
 
5605
+main ()
 
5606
+{
 
5607
+  fn1 ();
 
5608
+  return 0;
 
5609
+}
 
5610
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
 
5611
===================================================================
 
5612
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../tags/gcc_4_8_3_release)
 
5613
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../branches/gcc-4_8-branch)
 
5614
@@ -0,0 +1,41 @@
 
5615
+/* Test that exact underflow in __float128 signals the underflow
 
5616
+   exception if trapping is enabled, but does not raise the flag
 
5617
+   otherwise.  */
 
5618
+
 
5619
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
 
5620
+/* { dg-options "-D_GNU_SOURCE" } */
 
5621
+/* { dg-require-effective-target fenv_exceptions } */
 
5622
+
 
5623
+#include <fenv.h>
 
5624
+#include <setjmp.h>
 
5625
+#include <signal.h>
 
5626
+#include <stdlib.h>
 
5627
+
 
5628
+volatile sig_atomic_t caught_sigfpe;
 
5629
+sigjmp_buf buf;
 
5630
+
 
5631
+static void
 
5632
+handle_sigfpe (int sig)
 
5633
+{
 
5634
+  caught_sigfpe = 1;
 
5635
+  siglongjmp (buf, 1);
 
5636
+}
 
5637
+
 
5638
+int
 
5639
+main (void)
 
5640
+{
 
5641
+  volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
 
5642
+  volatile __float128 r;
 
5643
+  r = a * b;
 
5644
+  if (fetestexcept (FE_UNDERFLOW))
 
5645
+    abort ();
 
5646
+  if (r != 0x1p-16384q)
 
5647
+    abort ();
 
5648
+  feenableexcept (FE_UNDERFLOW);
 
5649
+  signal (SIGFPE, handle_sigfpe);
 
5650
+  if (sigsetjmp (buf, 1) == 0)
 
5651
+    r = a * b;
 
5652
+  if (!caught_sigfpe)
 
5653
+    abort ();
 
5654
+  exit (0);
 
5655
+}
 
5656
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
 
5657
===================================================================
 
5658
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../tags/gcc_4_8_3_release)
 
5659
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../branches/gcc-4_8-branch)
 
5660
@@ -0,0 +1,52 @@
 
5661
+/* { dg-do run } */
 
5662
+
 
5663
+#include <stdlib.h>
 
5664
+
 
5665
+#define NUM_OF_STATES 4
 
5666
+typedef unsigned int entry_t[2];
 
5667
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
 
5668
+
 
5669
+void __attribute__((noinline,noclone))
 
5670
+test_00(size_t numOfStates, entries_item_t* p_bm,
 
5671
+       const unsigned int* polyArray,
 
5672
+       size_t polyArraySize)
 
5673
+{
 
5674
+  size_t idx;
 
5675
+  unsigned int hlp0, hlp1;
 
5676
+  for (idx = 0; idx < numOfStates; ++idx)
 
5677
+    {
 
5678
+      size_t idy;
 
5679
+
 
5680
+      hlp0 = (idx << 1) | 0x00;
 
5681
+      hlp1 = (idx << 1) | 0x01;
 
5682
+      p_bm->metricEntries_[idx][0] = 0;
 
5683
+      p_bm->metricEntries_[idx][1] = 0;
 
5684
+      for (idy = 0; idy < polyArraySize; ++idy)
 
5685
+       {
 
5686
+         p_bm->metricEntries_[idx][0]
 
5687
+             |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
 
5688
+         p_bm->metricEntries_[idx][1]
 
5689
+             |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
 
5690
+       }
 
5691
+    }
 
5692
+}
 
5693
+
 
5694
+int main()
 
5695
+{
 
5696
+  unsigned int polyArray[] = { 0x07, 0x05 };
 
5697
+  entries_item_t* pBranchMetrics;
 
5698
+  pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
 
5699
+  test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
 
5700
+         sizeof(polyArray) / sizeof(polyArray[0]));
 
5701
+  if (pBranchMetrics->metricEntries_[0][0] != 0
 
5702
+      || pBranchMetrics->metricEntries_[0][1] != 3
 
5703
+      || pBranchMetrics->metricEntries_[1][0] != 1
 
5704
+      || pBranchMetrics->metricEntries_[1][1] != 2
 
5705
+      || pBranchMetrics->metricEntries_[2][0] != 3
 
5706
+      || pBranchMetrics->metricEntries_[2][1] != 0
 
5707
+      || pBranchMetrics->metricEntries_[3][0] != 2
 
5708
+      || pBranchMetrics->metricEntries_[3][1] != 1)
 
5709
+    abort ();
 
5710
+  free(pBranchMetrics);
 
5711
+  return 0;
 
5712
+}
 
5713
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
 
5714
===================================================================
 
5715
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../tags/gcc_4_8_3_release)
 
5716
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../branches/gcc-4_8-branch)
 
5717
@@ -23,7 +23,8 @@
 
5718
 T (20, 0, 4, 1, 5) \
 
5719
 T (21, 2, 6, 3, 7) \
 
5720
 T (22, 1, 2, 3, 0) \
 
5721
-T (23, 2, 1, 0, 3)
 
5722
+T (23, 2, 1, 0, 3) \
 
5723
+T (24, 2, 5, 6, 3)
 
5724
 #define EXPTESTS \
 
5725
 T (116,        1, 2, 4, 3) \
 
5726
 T (117,        7, 3, 3, 0) \
 
5727
@@ -31,7 +32,6 @@
 
5728
 T (119,        0, 3, 5, 6) \
 
5729
 T (120,        0, 0, 1, 5) \
 
5730
 T (121,        4, 6, 2, 1) \
 
5731
-T (122,        2, 5, 6, 3) \
 
5732
 T (123,        4, 6, 3, 2) \
 
5733
 T (124,        4, 7, 5, 6) \
 
5734
 T (125,        0, 4, 2, 4) \
 
5735
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
 
5736
===================================================================
 
5737
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../tags/gcc_4_8_3_release)
 
5738
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../branches/gcc-4_8-branch)
 
5739
@@ -1,21 +1,21 @@
 
5740
 /* { dg-do compile } */
 
5741
 /* { dg-options "-Wstack-usage=512" } */
 
5742
 
 
5743
-int foo1 (void)
 
5744
+int foo1 (void)  /* { dg-bogus "stack usage" } */
 
5745
 {
 
5746
   char arr[16];
 
5747
   arr[0] = 1;
 
5748
   return 0;
 
5749
-} /* { dg-bogus "stack usage" } */
 
5750
+}
 
5751
 
 
5752
-int foo2 (void)
 
5753
+int foo2 (void)  /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
5754
 {
 
5755
   char arr[1024];
 
5756
   arr[0] = 1;
 
5757
   return 0;
 
5758
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
5759
+}
 
5760
 
 
5761
-int foo3 (void)
 
5762
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
5763
 {
 
5764
   char arr[1024] __attribute__((aligned (512)));
 
5765
   arr[0] = 1;
 
5766
@@ -22,12 +22,11 @@
 
5767
   /* Force dynamic realignment of argument pointer.  */
 
5768
   __builtin_apply ((void (*)()) foo2, 0, 0);
 
5769
   return 0;
 
5770
+}
 
5771
 
 
5772
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
5773
-
 
5774
-int foo4 (int n)
 
5775
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
 
5776
 {
 
5777
   char arr[n];
 
5778
   arr[0] = 1;
 
5779
   return 0;
 
5780
-} /* { dg-warning "stack usage might be unbounded" } */
 
5781
+}
 
5782
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
 
5783
===================================================================
 
5784
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../tags/gcc_4_8_3_release)
 
5785
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../branches/gcc-4_8-branch)
 
5786
@@ -0,0 +1,48 @@
 
5787
+/* { dg-do compile } */
 
5788
+/* { dg-options "-O3" } */
 
5789
+
 
5790
+int a, b, c;
 
5791
+
 
5792
+struct S
 
5793
+{
 
5794
+  int f0;
 
5795
+  int f1;
 
5796
+} d;
 
5797
+
 
5798
+static int fn2 (struct S);
 
5799
+void fn3 (struct S);
 
5800
+
 
5801
+void
 
5802
+fn1 (struct S p)
 
5803
+{
 
5804
+  struct S h = { 0, 0 };
 
5805
+  fn3 (p);
 
5806
+  fn2 (h);
 
5807
+}
 
5808
+
 
5809
+int
 
5810
+fn2 (struct S p)
 
5811
+{
 
5812
+  struct S j = { 0, 0 };
 
5813
+  fn3 (p);
 
5814
+  fn2 (j);
 
5815
+  return 0;
 
5816
+}
 
5817
+
 
5818
+void
 
5819
+fn3 (struct S p)
 
5820
+{
 
5821
+  for (; b; a++)
 
5822
+    c = p.f0;
 
5823
+  fn1 (d);
 
5824
+}
 
5825
+
 
5826
+void
 
5827
+fn4 ()
 
5828
+{
 
5829
+  for (;;)
 
5830
+    {
 
5831
+      struct S f = { 0, 0 };
 
5832
+      fn1 (f);
 
5833
+    }
 
5834
+}
 
5835
Index: gcc/testsuite/gcc.dg/pr62030.c
 
5836
===================================================================
 
5837
--- a/src/gcc/testsuite/gcc.dg/pr62030.c        (.../tags/gcc_4_8_3_release)
 
5838
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c        (.../branches/gcc-4_8-branch)
 
5839
@@ -0,0 +1,50 @@
 
5840
+/* { dg-do run } */
 
5841
+/* { dg-options "-O2" } */
 
5842
+
 
5843
+extern void abort (void);
 
5844
+
 
5845
+struct node
 
5846
+{
 
5847
+  struct node *next;
 
5848
+  struct node *prev;
 
5849
+};
 
5850
+
 
5851
+struct node node;
 
5852
+
 
5853
+struct head
 
5854
+{
 
5855
+  struct node *first;
 
5856
+};
 
5857
+
 
5858
+struct head heads[5];
 
5859
+
 
5860
+int k = 2;
 
5861
+
 
5862
+struct head *head = &heads[2];
 
5863
+
 
5864
+static int __attribute__((noinline))
 
5865
+foo (void)
 
5866
+{
 
5867
+  node.prev = (void *)head;
 
5868
+  head->first = &node;
 
5869
+
 
5870
+  struct node *n = head->first;
 
5871
+  struct head *h = &heads[k];
 
5872
+  struct node *next = n->next;
 
5873
+
 
5874
+  if (n->prev == (void *)h)
 
5875
+    h->first = next;
 
5876
+  else
 
5877
+    n->prev->next = next;
 
5878
+
 
5879
+  n->next = h->first;
 
5880
+  return n->next == &node;
 
5881
+}
 
5882
+
 
5883
+int
 
5884
+main (void)
 
5885
+{
 
5886
+  if (foo ())
 
5887
+    abort ();
 
5888
+  return 0;
 
5889
+}
 
5890
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
 
5891
===================================================================
 
5892
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
 
5893
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
 
5894
@@ -0,0 +1,35 @@
 
5895
+/* PR tree-optimization/63341 */
 
5896
+/* { dg-do run } */
 
5897
+
 
5898
+#include "tree-vect.h"
 
5899
+
 
5900
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
5901
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
5902
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
 
5903
+                 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
 
5904
+                 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
 
5905
+                 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
 
5906
+unsigned short d[32] = { 1 };
 
5907
+
 
5908
+__attribute__((noinline, noclone)) void
 
5909
+foo ()
 
5910
+{
 
5911
+  int i;
 
5912
+  for (i = 0; i < 32; i++)
 
5913
+    d[i] = t.s[i].s + 4;
 
5914
+  for (i = 0; i < 32; i++)
 
5915
+    if (d[i] != t.s[i].s + 4)
 
5916
+      abort ();
 
5917
+    else
 
5918
+      asm volatile ("" : : : "memory");
 
5919
+}
 
5920
+
 
5921
+int
 
5922
+main ()
 
5923
+{
 
5924
+  check_vect ();
 
5925
+  foo ();
 
5926
+  return 0;
 
5927
+}
 
5928
+
 
5929
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5930
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
 
5931
===================================================================
 
5932
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../tags/gcc_4_8_3_release)
 
5933
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../branches/gcc-4_8-branch)
 
5934
@@ -0,0 +1,26 @@
 
5935
+/* PR tree-optimization/63189 */
 
5936
+/* { dg-do run } */
 
5937
+
 
5938
+#include "tree-vect.h"
 
5939
+
 
5940
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
 
5941
+
 
5942
+__attribute__((noinline, noclone)) void
 
5943
+foo (void)
 
5944
+{
 
5945
+  int j, s = 0;
 
5946
+  for (j = 0; j < 8; j++)
 
5947
+    s += d[j] * j;
 
5948
+  if (s != 7)
 
5949
+    abort ();
 
5950
+}
 
5951
+
 
5952
+int
 
5953
+main ()
 
5954
+{
 
5955
+  check_vect ();
 
5956
+  foo ();
 
5957
+  return 0;
 
5958
+}
 
5959
+
 
5960
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5961
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
 
5962
===================================================================
 
5963
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../tags/gcc_4_8_3_release)
 
5964
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../branches/gcc-4_8-branch)
 
5965
@@ -0,0 +1,73 @@
 
5966
+/* { dg-require-effective-target vect_int } */
 
5967
+
 
5968
+#include <stdarg.h>
 
5969
+#include "tree-vect.h"
 
5970
+
 
5971
+#define N 64
 
5972
+#define DOT 43680
 
5973
+
 
5974
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
5975
+signed int   Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
5976
+
 
5977
+/* (short, int)->int->int dot product.
 
5978
+   Not detected as a dot-product pattern.  */
 
5979
+
 
5980
+__attribute__ ((noinline)) int
 
5981
+foo (int len)
 
5982
+{
 
5983
+  int i;
 
5984
+  int result = 0;
 
5985
+
 
5986
+  for (i = 0; i < len; i++)
 
5987
+    {
 
5988
+      result += (X[i] * Y[i]);
 
5989
+    }
 
5990
+  return result;
 
5991
+}
 
5992
+
 
5993
+
 
5994
+/* (int, short)->int->int dot product.
 
5995
+   Not detected as a dot-product pattern.  */
 
5996
+
 
5997
+__attribute__ ((noinline)) int
 
5998
+bar (int len)
 
5999
+{
 
6000
+  int i;
 
6001
+  int result = 0;
 
6002
+
 
6003
+  for (i = 0; i < len; i++)
 
6004
+    {
 
6005
+      result += (Y[i] * X[i]);
 
6006
+    }
 
6007
+  return result;
 
6008
+}
 
6009
+
 
6010
+int
 
6011
+main (void)
 
6012
+{
 
6013
+  int i;
 
6014
+  int dot;
 
6015
+
 
6016
+  check_vect ();
 
6017
+
 
6018
+  for (i = 0; i < N; i++)
 
6019
+    {
 
6020
+      X[i] = i;
 
6021
+      Y[i] = N - i;
 
6022
+      __asm__ volatile ("");
 
6023
+    }
 
6024
+
 
6025
+  dot = foo (N);
 
6026
+  if (dot != DOT)
 
6027
+    abort ();
 
6028
+
 
6029
+  dot = bar (N);
 
6030
+  if (dot != DOT)
 
6031
+    abort ();
 
6032
+
 
6033
+  return 0;
 
6034
+}
 
6035
+
 
6036
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
 
6037
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6038
+
 
6039
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
 
6040
===================================================================
 
6041
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../tags/gcc_4_8_3_release)
 
6042
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../branches/gcc-4_8-branch)
 
6043
@@ -0,0 +1,43 @@
 
6044
+/* PR tree-optimization/63379  */
 
6045
+/* { dg-do run } */
 
6046
+
 
6047
+#include "tree-vect.h"
 
6048
+
 
6049
+extern void abort (void);
 
6050
+
 
6051
+typedef struct {
 
6052
+    int x;
 
6053
+    int y;
 
6054
+} Point;
 
6055
+
 
6056
+Point pt_array[25];
 
6057
+
 
6058
+void __attribute__((noinline,noclone))
 
6059
+generate_array(void)
 
6060
+{
 
6061
+  unsigned int i;
 
6062
+  for (i = 0; i<25; i++)
 
6063
+    {
 
6064
+      pt_array[i].x = i;
 
6065
+      pt_array[i].y = 1000+i;
 
6066
+    }
 
6067
+}
 
6068
+
 
6069
+int main()
 
6070
+{
 
6071
+  check_vect ();
 
6072
+  generate_array ();
 
6073
+  Point min_pt = pt_array[0];
 
6074
+  Point *ptr, *ptr_end;
 
6075
+  for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
 
6076
+    {
 
6077
+      min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
 
6078
+      min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
 
6079
+    }
 
6080
+
 
6081
+  if (min_pt.x != 0 || min_pt.y != 1000)
 
6082
+    abort ();
 
6083
+  return 0;
 
6084
+}
 
6085
+
 
6086
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6087
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
 
6088
===================================================================
 
6089
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../tags/gcc_4_8_3_release)
 
6090
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../branches/gcc-4_8-branch)
 
6091
@@ -0,0 +1,40 @@
 
6092
+/* { dg-do compile } */
 
6093
+/* { dg-additional-options "-O1" } */
 
6094
+
 
6095
+struct S0
 
6096
+{
 
6097
+  int f7;
 
6098
+};
 
6099
+struct S0 g_50;
 
6100
+int g_70;
 
6101
+int g_76;
 
6102
+
 
6103
+int foo (long long p_56, int * p_57)
 
6104
+{
 
6105
+  int *l_77;
 
6106
+  int l_101;
 
6107
+
 
6108
+  for (; g_70;)
 
6109
+    {
 
6110
+      int **l_78 = &l_77;
 
6111
+      if (g_50.f7)
 
6112
+       continue;
 
6113
+      *l_78 = 0;
 
6114
+    }
 
6115
+  for (g_76 = 1; g_76 >= 0; g_76--)
 
6116
+    {
 
6117
+      int *l_90;
 
6118
+      for (l_101 = 4; l_101 >= 0; l_101--)
 
6119
+       if (l_101)
 
6120
+         *l_90 = 0;
 
6121
+       else
 
6122
+         {
 
6123
+           int **l_113 = &l_77;
 
6124
+           *l_113 = p_57;
 
6125
+         }
 
6126
+    }
 
6127
+
 
6128
+  return *l_77;
 
6129
+}
 
6130
+
 
6131
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6132
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
 
6133
===================================================================
 
6134
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
 
6135
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
 
6136
@@ -0,0 +1,34 @@
 
6137
+/* PR tree-optimization/63189 */
 
6138
+/* { dg-additional-options "-fwrapv" } */
 
6139
+/* { dg-do run } */
 
6140
+
 
6141
+#include "tree-vect.h"
 
6142
+
 
6143
+__attribute__((noinline, noclone)) static int
 
6144
+bar (const short *a, int len)
 
6145
+{
 
6146
+  int x;
 
6147
+  int x1 = 0;
 
6148
+
 
6149
+  for (x = 0; x < len; x++)
 
6150
+    x1 += x * a[x];
 
6151
+  return x1;
 
6152
+}
 
6153
+
 
6154
+__attribute__((noinline, noclone)) void
 
6155
+foo (void)
 
6156
+{
 
6157
+  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
 
6158
+  if (bar (stuff, 9) != 36)
 
6159
+    abort ();
 
6160
+}
 
6161
+
 
6162
+int
 
6163
+main ()
 
6164
+{
 
6165
+  check_vect ();
 
6166
+  foo ();
 
6167
+  return 0;
 
6168
+}
 
6169
+
 
6170
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6171
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
 
6172
===================================================================
 
6173
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../tags/gcc_4_8_3_release)
 
6174
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../branches/gcc-4_8-branch)
 
6175
@@ -0,0 +1,22 @@
 
6176
+/* { dg-do compile } */
 
6177
+
 
6178
+int a[16][2];
 
6179
+struct A
 
6180
+{
 
6181
+  int b[16][2];
 
6182
+  int c[16][1];
 
6183
+};
 
6184
+
 
6185
+void
 
6186
+foo (struct A *x)
 
6187
+{
 
6188
+  int i;
 
6189
+  for (i = 0; i < 16; ++i)
 
6190
+    {
 
6191
+      x->b[i][0] = a[i][0];
 
6192
+      x->c[i][0] = 0 != a[i][0];
 
6193
+      x->b[i][1] = a[i][1];
 
6194
+    }
 
6195
+}
 
6196
+
 
6197
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6198
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
 
6199
===================================================================
 
6200
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
 
6201
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
 
6202
@@ -0,0 +1,33 @@
 
6203
+/* PR tree-optimization/63189 */
 
6204
+/* { dg-do run } */
 
6205
+
 
6206
+#include "tree-vect.h"
 
6207
+
 
6208
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
 
6209
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
 
6210
+
 
6211
+__attribute__((noinline, noclone)) static int
 
6212
+bar (void)
 
6213
+{
 
6214
+  int sum = 0, i;
 
6215
+  for (i = 0; i < 8; ++i)
 
6216
+    sum += a[i] * b[i];
 
6217
+  return sum;
 
6218
+}
 
6219
+
 
6220
+__attribute__((noinline, noclone)) void
 
6221
+foo (void)
 
6222
+{
 
6223
+  if (bar () != 0)
 
6224
+    abort ();
 
6225
+}
 
6226
+
 
6227
+int
 
6228
+main ()
 
6229
+{
 
6230
+  check_vect ();
 
6231
+  foo ();
 
6232
+  return 0;
 
6233
+}
 
6234
+
 
6235
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6236
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
 
6237
===================================================================
 
6238
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../tags/gcc_4_8_3_release)
 
6239
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../branches/gcc-4_8-branch)
 
6240
@@ -0,0 +1,22 @@
 
6241
+/* { dg-do run } */
 
6242
+
 
6243
+#include "tree-vect.h"
 
6244
+
 
6245
+extern void abort (void);
 
6246
+
 
6247
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
 
6248
+
 
6249
+int
 
6250
+main ()
 
6251
+{
 
6252
+  int d;
 
6253
+  check_vect ();
 
6254
+  for (; a < 8; a++)
 
6255
+    {
 
6256
+      d = b[a] >> 1;
 
6257
+      c[a] = d != 0;
 
6258
+    }
 
6259
+  if (c[0] != 1)
 
6260
+    abort ();
 
6261
+  return 0;
 
6262
+}
 
6263
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
 
6264
===================================================================
 
6265
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
 
6266
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
 
6267
@@ -0,0 +1,32 @@
 
6268
+/* PR tree-optimization/63341 */
 
6269
+/* { dg-do run } */
 
6270
+
 
6271
+#include "tree-vect.h"
 
6272
+
 
6273
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
6274
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
6275
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
 
6276
+                 {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
 
6277
+                 {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
 
6278
+                 {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
 
6279
+unsigned short d[32] = { 1 };
 
6280
+
 
6281
+__attribute__((noinline, noclone)) void
 
6282
+foo ()
 
6283
+{
 
6284
+  int i;
 
6285
+  for (i = 0; i < 32; i++)
 
6286
+    d[i] = t.s[i].s;
 
6287
+  if (__builtin_memcmp (d, t.s, sizeof d))
 
6288
+    abort ();
 
6289
+}
 
6290
+
 
6291
+int
 
6292
+main ()
 
6293
+{
 
6294
+  check_vect ();
 
6295
+  foo ();
 
6296
+  return 0;
 
6297
+}
 
6298
+
 
6299
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
6300
Index: gcc/testsuite/ChangeLog
 
6301
===================================================================
 
6302
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_8_3_release)
 
6303
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_8-branch)
 
6304
@@ -1,3 +1,500 @@
 
6305
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
6306
+
 
6307
+       Backported from mainline
 
6308
+       2014-11-27  Jakub Jelinek  <jakub@redhat.com>
 
6309
+
 
6310
+       PR middle-end/64067
 
6311
+       * gcc.c-torture/compile/pr64067.c: New test.
 
6312
+
 
6313
+       2014-10-31  Jakub Jelinek  <jakub@redhat.com>
 
6314
+
 
6315
+       PR rtl-optimization/63659
 
6316
+       * gcc.c-torture/execute/pr63659.c: New test.
 
6317
+
 
6318
+       2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
6319
+
 
6320
+       PR libgomp/61200
 
6321
+       * c-c++-common/gomp/pr61200.c: New test.
 
6322
+
 
6323
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
6324
+
 
6325
+       Backport from mainline
 
6326
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
6327
+
 
6328
+       PR tree-optimization/62031
 
6329
+       * gcc.dg/torture/pr62031.c: New testcase.
 
6330
+
 
6331
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
6332
+
 
6333
+       PR tree-optimization/63379
 
6334
+       * gcc.dg/vect/pr63379.c: New testcase.
 
6335
+
 
6336
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
6337
+
 
6338
+       PR tree-optimization/63605
 
6339
+       * gcc.dg/vect/pr63605.c: New testcase.
 
6340
+
 
6341
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
6342
+
 
6343
+       PR middle-end/63665
 
6344
+       * gcc.dg/pr63665.c: New testcase.
 
6345
+
 
6346
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
6347
+
 
6348
+       PR target/63947
 
6349
+       * gcc.target/i386/pr63947.c: New test.
 
6350
+
 
6351
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
6352
+
 
6353
+       Backport from mainline
 
6354
+       PR tree-optimization/62167
 
6355
+       * gcc.dg/pr51879-12.c: Add xfails.
 
6356
+       * gcc.dg/pr62167-run.c: New test.
 
6357
+       * gcc.dg/pr62167.c: New test.
 
6358
+
 
6359
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
6360
+
 
6361
+       Backport from mainline and gcc-4_9 branch.
 
6362
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
6363
+
 
6364
+       PR tree-optimization/63841
 
6365
+       * g++.dg/tree-ssa/pr63841.C: New test.
 
6366
+
 
6367
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
6368
+
 
6369
+       PR ipa/63838
 
6370
+       * g++.dg/ipa/pr63838.C: New test.
 
6371
+
 
6372
+2014-11-03  Marek Polacek  <polacek@redhat.com>
 
6373
+
 
6374
+       PR c/52769
 
6375
+       * gcc.dg/pr52769.c: New test.
 
6376
+
 
6377
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
6378
+
 
6379
+       * gcc.target/aarch64/madd_after_asm_1.c: New test.
 
6380
+
 
6381
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
6382
+
 
6383
+       * gnat.dg/opt41.adb: New test.
 
6384
+       * gnat.dg/opt41_pkg.ad[sb]: New helper.
 
6385
+
 
6386
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6387
+
 
6388
+       Backport from mainline r215880
 
6389
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6390
+
 
6391
+       * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
 
6392
+       failing with the new warning message.
 
6393
+       * gcc.dg/vmx/3c-01a.c: Likewise.
 
6394
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
6395
+       * gcc.dg/vmx/ops.c: Likewise.
 
6396
+       * gcc.target/powerpc/altivec-20.c: Likewise.
 
6397
+       * gcc.target/powerpc/altivec-6.c: Likewise.
 
6398
+       * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
 
6399
+       * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
 
6400
+       * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
 
6401
+
 
6402
+       Backport from mainline r215882
 
6403
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6404
+
 
6405
+       * gcc.target/powerpc/lvsl-lvsr.c: New test.
 
6406
+
 
6407
+       Backport from mainline r216017
 
6408
+       2014-10-08  Pat Haugen  <pthaugen@us.ibm.com>
 
6409
+
 
6410
+       * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
 
6411
+       * gcc.dg/vmx/ops.c: Likewise.
 
6412
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
6413
+
 
6414
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
6415
+
 
6416
+       PR fortran/59488
 
6417
+       * gfortran.dg/gomp/pr59488-1.f90: New test.
 
6418
+       * gfortran.dg/gomp/pr59488-2.f90: New test.
 
6419
+
 
6420
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
6421
+
 
6422
+       PR debug/63342
 
6423
+       * gcc.dg/pr63342.c: New test.
 
6424
+
 
6425
+       PR target/63428
 
6426
+       * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
 
6427
+       to test 24 in TESTS.
 
6428
+
 
6429
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
6430
+
 
6431
+       Backport from mainline
 
6432
+       2013-11-07  Joseph Myers  <joseph@codesourcery.com>
 
6433
+
 
6434
+       * lib/target-supports.exp
 
6435
+       (check_effective_target_fenv_exceptions): New function.
 
6436
+
 
6437
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
6438
+
 
6439
+       PR inline-asm/63282
 
6440
+       * gcc.c-torture/compile/pr63282.c: New test.
 
6441
+
 
6442
+2014-09-26  Jakub Jelinek  <jakub@redhat.com>
 
6443
+
 
6444
+       * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
 
6445
+       to default options.
 
6446
+
 
6447
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6448
+
 
6449
+       Backport from mainline r215559
 
6450
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6451
+
 
6452
+       PR target/63335
 
6453
+       * gcc.target/powerpc/pr63335.c: New test.
 
6454
+
 
6455
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
6456
+
 
6457
+       PR tree-optimization/63341
 
6458
+       * gcc.dg/vect/pr63341-1.c: New test.
 
6459
+       * gcc.dg/vect/pr63341-2.c: New test.
 
6460
+
 
6461
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
6462
+
 
6463
+       * gcc.dg/torture/float128-exact-underflow.c: New test.
 
6464
+
 
6465
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
6466
+
 
6467
+       PR debug/63284
 
6468
+       * gcc.dg/pr63284.c: New test.
 
6469
+
 
6470
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
6471
+
 
6472
+       Backport from mainline
 
6473
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
6474
+
 
6475
+       PR tree-optimization/61452
 
6476
+       * gcc.dg/torture/pr61452.c: New testcase.
 
6477
+
 
6478
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
6479
+
 
6480
+       Backport from mainline
 
6481
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
6482
+
 
6483
+       PR middle-end/61010
 
6484
+       * gcc.dg/torture/pr61010.c: New testcase.
 
6485
+
 
6486
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
6487
+
 
6488
+       PR middle-end/61045
 
6489
+       * gcc.dg/pr61045.c: New testcase.
 
6490
+
 
6491
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
6492
+
 
6493
+       PR tree-optimization/62075
 
6494
+       * gcc.dg/vect/pr62075.c: New testcase.
 
6495
+
 
6496
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
6497
+
 
6498
+       PR tree-optimization/60196
 
6499
+       PR tree-optimization/63189
 
6500
+       * gcc.dg/vect/pr63189.c: New test.
 
6501
+       * gcc.dg/vect/pr60196-1.c: New test.
 
6502
+       * gcc.dg/vect/pr60196-2.c: New test.
 
6503
+
 
6504
+       Backported from mainline
 
6505
+       2013-09-17  Cong Hou  <congh@google.com>
 
6506
+
 
6507
+       * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product 
 
6508
+       on two arrays with short and int types. This should not be recognized
 
6509
+       as a dot product pattern.
 
6510
+
 
6511
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
6512
+
 
6513
+       Backported from mainline
 
6514
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
6515
+
 
6516
+       PR debug/61923
 
6517
+       * gcc.target/i386/pr61923.c: New test.
 
6518
+
 
6519
+2014-09-06  John David Anglin  <danglin@gcc.gnu.org>
 
6520
+
 
6521
+       PR testsuite/56194
 
6522
+       * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
 
6523
+
 
6524
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
6525
+
 
6526
+       Backport from mainline
 
6527
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
 
6528
+
 
6529
+       PR fortran/62270
 
6530
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
 
6531
+
 
6532
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
6533
+
 
6534
+       PR ipa/62015
 
6535
+       * g++.dg/ipa/pr62015.C: New test.
 
6536
+
 
6537
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
6538
+
 
6539
+       PR ipa/61986
 
6540
+       * gcc.dg/ipa/pr61986.c: New test.
 
6541
+
 
6542
+2014-08-26  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
6543
+
 
6544
+       * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
 
6545
+       failure on s390*-*-linux-gnu.
 
6546
+
 
6547
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
6548
+
 
6549
+       Backport from mainline
 
6550
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
6551
+
 
6552
+       PR target/61996
 
6553
+       * gcc.target/sh/pr61996.c: New.
 
6554
+
 
6555
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
6556
+
 
6557
+       Backport from trunk
 
6558
+       PR fortran/62214
 
6559
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
6560
+
 
6561
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
6562
+
 
6563
+       Backport from mainline:
 
6564
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
6565
+
 
6566
+       PR rtl-optimization/62004
 
6567
+       PR rtl-optimization/62030
 
6568
+       * gcc.dg/pr62004.c: New test.
 
6569
+       * gcc.dg/pr62030.c: Same.
 
6570
+       * gcc.target/mips/pr62030-octeon.c: Same.
 
6571
+
 
6572
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
6573
+
 
6574
+       PR tree-optimization/62073
 
6575
+       * gcc.dg/vect/pr62073.c: New test.
 
6576
+
 
6577
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6578
+
 
6579
+       Backport from mainline
 
6580
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6581
+
 
6582
+       PR middle-end/62103
 
6583
+       * gcc.c-torture/execute/bitfld-6.c: New test.
 
6584
+
 
6585
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
6586
+
 
6587
+       Backport from trunk
 
6588
+       PR fortran/61999
 
6589
+       * gfortran.dg/dot_product_3.f90:  New test case.
 
6590
+
 
6591
+2014-08-07  John David Anglin  <danglin@gcc.gnu.org>
 
6592
+
 
6593
+       PR tree-optimization/60707
 
6594
+       * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
 
6595
+
 
6596
+2014-08-06  Jakub Jelinek  <jakub@redhat.com>
 
6597
+
 
6598
+       PR rtl-optimization/61801
 
6599
+       * gcc.target/i386/pr61801.c: Rewritten.
 
6600
+
 
6601
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6602
+
 
6603
+       Backport from mainline
 
6604
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6605
+
 
6606
+       PR tree-optimization/61375
 
6607
+       * gcc.c-torture/execute/pr61375-1.c: New test.
 
6608
+
 
6609
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
6610
+
 
6611
+       PR tree-optimization/61964
 
6612
+       * gcc.dg/torture/pr61964.c: New testcase.
 
6613
+       * gcc.dg/pr51879-18.c: XFAIL.
 
6614
+
 
6615
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
6616
+
 
6617
+       PR rtl-optimization/61801
 
6618
+       * gcc.target/i386/pr61801.c: Fix testcase.
 
6619
+
 
6620
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
6621
+
 
6622
+       PR rtl-optimization/61801
 
6623
+       * gcc.target/i386/pr61801.c: New testcase.
 
6624
+
 
6625
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6626
+
 
6627
+       Backport from mainline:
 
6628
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6629
+
 
6630
+       * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
 
6631
+
 
6632
+       * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
 
6633
+       * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
 
6634
+       * gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
 
6635
+       * gcc.c-torture/execute/pr23135.x: Likewise.
 
6636
+
 
6637
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6638
+
 
6639
+       Backport from mainline:
 
6640
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6641
+
 
6642
+       * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
 
6643
+
 
6644
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6645
+
 
6646
+       Backport from mainline:
 
6647
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6648
+
 
6649
+       * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
 
6650
+
 
6651
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6652
+
 
6653
+       Backport from mainline:
 
6654
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6655
+
 
6656
+       * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
 
6657
+
 
6658
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
6659
+
 
6660
+       * gcc.dg/stack-usage-2.c: Adjust.
 
6661
+
 
6662
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
6663
+
 
6664
+       Backport from trunk.
 
6665
+       PR fortran/61780
 
6666
+       * gfortran.dg/dependency_44.f90 : New test
 
6667
+
 
6668
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
6669
+
 
6670
+       * gnat.dg/opt39.adb: New test.
 
6671
+
 
6672
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
6673
+
 
6674
+       PR fortran/61459
 
6675
+       PR fortran/58883
 
6676
+       * gfortran.dg/allocatable_function_8.f90 : New test
 
6677
+
 
6678
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
6679
+
 
6680
+       PR tree-optimization/61684
 
6681
+       * gcc.c-torture/compile/pr61684.c: New test.
 
6682
+
 
6683
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
6684
+           Fritz Reese  <Reese-Fritz@zai.com>
 
6685
+
 
6686
+       * gfortran.dg/oldstyle_5.f: New test.
 
6687
+
 
6688
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6689
+
 
6690
+       Backport from mainline
 
6691
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6692
+
 
6693
+       PR tree-optimization/61306
 
6694
+       * gcc.c-torture/execute/pr61306-1.c: New test.
 
6695
+       * gcc.c-torture/execute/pr61306-2.c: Likewise.
 
6696
+       * gcc.c-torture/execute/pr61306-3.c: Likewise.
 
6697
+
 
6698
+2014-06-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6699
+
 
6700
+       * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
 
6701
+
 
6702
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
6703
+
 
6704
+       Backport from mainline
 
6705
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
6706
+
 
6707
+       PR target/61586
 
6708
+       * gcc.target/alpha/pr61586.c: New test.
 
6709
+
 
6710
+2014-06-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6711
+
 
6712
+       * gfortran.dg/default_format_denormal_2.f90:  Remove xfail for
 
6713
+       powerpc*-*-linux*.
 
6714
+
 
6715
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
6716
+
 
6717
+       Backport from mainline
 
6718
+       2014-06-13  Ilya Enkovich  <ilya.enkovich@intel.com>
 
6719
+
 
6720
+       PR rtl-optimization/61094
 
6721
+       PR rtl-optimization/61446
 
6722
+       * gcc.target/i386/pr61446.c : New.
 
6723
+
 
6724
+       Backport from mainline
 
6725
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
6726
+
 
6727
+       PR target/61423
 
6728
+       * gcc.target/i386/pr61423.c: New test.
 
6729
+
 
6730
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
6731
+
 
6732
+       Backport from mainline
 
6733
+
 
6734
+       PR target/61483
 
6735
+       * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
 
6736
+       * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
 
6737
+       * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
 
6738
+       * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
 
6739
+
 
6740
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
6741
+
 
6742
+       Backport from trunk.
 
6743
+       PR fortran/45187
 
6744
+       * gfortran.dg/cray_pointers_10.f90: New file.
 
6745
+
 
6746
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
6747
+
 
6748
+       Backport from mainline
 
6749
+
 
6750
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
6751
+       PR target/61415
 
6752
+       * lib/target-supports.exp (check_effective_target_longdouble128): New.
 
6753
+       * gcc.target/powerpc/pack02.c: Use it.
 
6754
+       * gcc.target/powerpc/tfmode_off.c: Likewise.
 
6755
+
 
6756
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
6757
+
 
6758
+       Backport from 2014-06-12 trunk r211491
 
6759
+
 
6760
+       PR target/61443
 
6761
+       * gcc.target/avr/torture/pr61443.c: New test.
 
6762
+
 
6763
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
6764
+
 
6765
+       PR tree-optimization/61383
 
6766
+       * gcc.dg/torture/pr61383-1.c: New testcase.
 
6767
+
 
6768
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
6769
+
 
6770
+       Backport from mainline
 
6771
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
6772
+
 
6773
+       PR rtl-optimization/60866
 
6774
+       * gcc.dg/pr60866.c: New test.
 
6775
+
 
6776
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
6777
+
 
6778
+       Backport from mainline
 
6779
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
6780
+
 
6781
+       PR rtl-optimization/60901
 
6782
+       * gcc.target/i386/pr60901.c: New test.
 
6783
+
 
6784
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
6785
+
 
6786
+       Backport from mainline
 
6787
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
6788
+
 
6789
+       * gnat.dg/overflow_fixed.adb: New test.
 
6790
+
 
6791
+2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
6792
+
 
6793
+       * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
 
6794
+
 
6795
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
6796
+
 
6797
+       Backport from mainline
 
6798
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
6799
+
 
6800
+       * gcc.target/powerpc/htm-ttest.c: New test.
 
6801
+
 
6802
 2014-05-22  Release Manager
 
6803
 
 
6804
        * GCC 4.8.3 released.
 
6805
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
 
6806
===================================================================
 
6807
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../tags/gcc_4_8_3_release)
 
6808
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../branches/gcc-4_8-branch)
 
6809
@@ -0,0 +1,28 @@
 
6810
+// I think this dynamic_cast has undefined behavior when destroying E::o
 
6811
+// because we're the F period of destruction has started and ap doesn't
 
6812
+// point to the object currently being destroyed--but the reasonable
 
6813
+// options are success or failure, not SEGV.
 
6814
+
 
6815
+// { dg-do run }
 
6816
+
 
6817
+extern "C" void abort();
 
6818
+
 
6819
+struct A { virtual ~A(); };
 
6820
+struct B { virtual ~B() { } };
 
6821
+struct C : B, A { };
 
6822
+struct E : virtual B { A o; };
 
6823
+struct F : virtual C, virtual E { };
 
6824
+
 
6825
+A* ap;
 
6826
+C* cp;
 
6827
+
 
6828
+A::~A() {
 
6829
+  C* cp2 = dynamic_cast<C*>(ap);
 
6830
+  if (cp2 != cp && cp2 != 0)
 
6831
+    abort();
 
6832
+}
 
6833
+
 
6834
+int main() {
 
6835
+  F f;
 
6836
+  ap = cp = &f;
 
6837
+}
 
6838
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
 
6839
===================================================================
 
6840
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../tags/gcc_4_8_3_release)
 
6841
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../branches/gcc-4_8-branch)
 
6842
@@ -1,6 +1,6 @@
 
6843
 /* { dg-do compile { target powerpc*-*-* } } */
 
6844
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
6845
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
 
6846
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
 
6847
 
 
6848
 /* This test checks if AltiVec builtins accept const-qualified
 
6849
    arguments.  */
 
6850
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
 
6851
===================================================================
 
6852
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
 
6853
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
 
6854
@@ -0,0 +1,10 @@
 
6855
+// PR c++/63455
 
6856
+// { dg-options "-std=gnu++11" }
 
6857
+
 
6858
+int main()
 
6859
+{
 
6860
+    int x = 0;
 
6861
+
 
6862
+    // without '+0', gcc 4.6 gives a different error (no ICE though)
 
6863
+    decltype(({ int y = x; y; })+0) v1 = 0;
 
6864
+}
 
6865
Index: gcc/testsuite/g++.dg/expr/cond12.C
 
6866
===================================================================
 
6867
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../tags/gcc_4_8_3_release)
 
6868
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../branches/gcc-4_8-branch)
 
6869
@@ -0,0 +1,12 @@
 
6870
+// PR c++/58714
 
6871
+// { dg-do run }
 
6872
+
 
6873
+struct X {
 
6874
+    X& operator=(const X&){}
 
6875
+    X& operator=(X&){__builtin_abort();}
 
6876
+};
 
6877
+
 
6878
+int main(int argv,char**) {
 
6879
+  X a, b;
 
6880
+  ((argv > 2) ? a : b) = X();
 
6881
+}
 
6882
Index: gcc/testsuite/g++.dg/init/const9.C
 
6883
===================================================================
 
6884
--- a/src/gcc/testsuite/g++.dg/init/const9.C    (.../tags/gcc_4_8_3_release)
 
6885
+++ b/src/gcc/testsuite/g++.dg/init/const9.C    (.../branches/gcc-4_8-branch)
 
6886
@@ -1,5 +1,5 @@
 
6887
 // PR c++/55893
 
6888
-// { dg-final { scan-assembler-not "rodata" } }
 
6889
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
 
6890
 
 
6891
 struct foo
 
6892
 {
 
6893
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
 
6894
===================================================================
 
6895
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../tags/gcc_4_8_3_release)
 
6896
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../branches/gcc-4_8-branch)
 
6897
@@ -0,0 +1,35 @@
 
6898
+/* { dg-do run } */
 
6899
+/* { dg-options "-O2" } */
 
6900
+
 
6901
+#include <string>
 
6902
+
 
6903
+std::string __attribute__ ((noinline)) comp_test_write() {
 
6904
+  std::string data;
 
6905
+
 
6906
+  for (int i = 0; i < 2; ++i) {
 
6907
+    char b = 1 >> (i * 8);
 
6908
+    data.append(&b, 1);
 
6909
+  }
 
6910
+
 
6911
+  return data;
 
6912
+}
 
6913
+
 
6914
+std::string __attribute__ ((noinline)) comp_test_write_good() {
 
6915
+  std::string data;
 
6916
+
 
6917
+  char b;
 
6918
+  for (int i = 0; i < 2; ++i) {
 
6919
+    b = 1 >> (i * 8);
 
6920
+    data.append(&b, 1);
 
6921
+  }
 
6922
+
 
6923
+  return data;
 
6924
+}
 
6925
+
 
6926
+int main() {
 
6927
+  std::string good = comp_test_write_good();
 
6928
+  std::string bad = comp_test_write();
 
6929
+
 
6930
+  if (good != bad)
 
6931
+    __builtin_abort ();
 
6932
+}
 
6933
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
 
6934
===================================================================
 
6935
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../tags/gcc_4_8_3_release)
 
6936
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../branches/gcc-4_8-branch)
 
6937
@@ -0,0 +1,23 @@
 
6938
+// PR c++/58624
 
6939
+
 
6940
+// { dg-do run { target c++11 } }
 
6941
+// { dg-add-options tls }
 
6942
+// { dg-require-effective-target tls_runtime }
 
6943
+
 
6944
+int i;
 
6945
+
 
6946
+template <typename> struct A
 
6947
+{
 
6948
+  static thread_local int s;
 
6949
+
 
6950
+  A () { i = s; }
 
6951
+};
 
6952
+
 
6953
+int f() { return 42; }
 
6954
+template <typename T> thread_local int A<T>::s = f();
 
6955
+
 
6956
+int main () {
 
6957
+  A<void> a;
 
6958
+  if (i != 42)
 
6959
+    __builtin_abort();
 
6960
+}
 
6961
Index: gcc/testsuite/g++.dg/parse/typename7.C
 
6962
===================================================================
 
6963
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../tags/gcc_4_8_3_release)
 
6964
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../branches/gcc-4_8-branch)
 
6965
@@ -7,10 +7,9 @@
 
6966
 
 
6967
 struct A
 
6968
 {
 
6969
-  template<typename>   void foo(int); // { dg-message "note" }
 
6970
-  template<typename T> void bar(T t) { // { dg-message "note" }
 
6971
+  template<typename>   void foo(int);
 
6972
+  template<typename T> void bar(T t) {
 
6973
     this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6974
-  // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
 
6975
   template<typename T> void bad(T t) {
 
6976
     foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6977
 };
 
6978
@@ -20,7 +19,6 @@
 
6979
 {
 
6980
   void bar(T t) {
 
6981
     A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6982
-  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
 
6983
   void bad(T t) {
 
6984
     B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
 
6985
 };
 
6986
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
 
6987
===================================================================
 
6988
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../tags/gcc_4_8_3_release)
 
6989
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../branches/gcc-4_8-branch)
 
6990
@@ -1,2 +1,2 @@
 
6991
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
 
6992
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
 
6993
 // { dg-prune-output "array bound" }
 
6994
Index: gcc/testsuite/g++.dg/parse/ambig7.C
 
6995
===================================================================
 
6996
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../tags/gcc_4_8_3_release)
 
6997
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../branches/gcc-4_8-branch)
 
6998
@@ -0,0 +1,16 @@
 
6999
+// PR c++/60361
 
7000
+
 
7001
+struct Helper
 
7002
+{
 
7003
+  Helper(int a, void (*pfunc)());
 
7004
+};
 
7005
+
 
7006
+template <int I> void function();
 
7007
+
 
7008
+const int A = 1;
 
7009
+const int B = 2;
 
7010
+
 
7011
+Helper testOk(A, function<A>);
 
7012
+Helper testOk2(int(A), function<B>);
 
7013
+Helper testOk3((int(A)), function<A>);
 
7014
+Helper testFail(int(A), function<A>);
 
7015
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
 
7016
===================================================================
 
7017
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../tags/gcc_4_8_3_release)
 
7018
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../branches/gcc-4_8-branch)
 
7019
@@ -89,6 +89,9 @@
 
7020
 # This must be done after the compat-use-*-compiler definitions.
 
7021
 load_lib compat.exp
 
7022
 
 
7023
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
 
7024
+load_lib g++-dg.exp
 
7025
+
 
7026
 g++_init
 
7027
 
 
7028
 # Save variables for the C++ compiler under test, which each test will
 
7029
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
 
7030
===================================================================
 
7031
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../tags/gcc_4_8_3_release)
 
7032
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../branches/gcc-4_8-branch)
 
7033
@@ -1,5 +1,5 @@
 
7034
 /* Structure layout test generator.
 
7035
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
 
7036
+   Copyright (C) 2004-2014
 
7037
    Free Software Foundation, Inc.
 
7038
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
7039
 
 
7040
@@ -44,7 +44,7 @@
 
7041
 #endif
 
7042
 
 
7043
 const char *dg_options[] = {
 
7044
-"/* { dg-options \"%s-I%s\" } */\n",
 
7045
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 
7046
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 
7047
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 
7048
 "/* { 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",
 
7049
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
 
7050
===================================================================
 
7051
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
 
7052
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
 
7053
@@ -0,0 +1,28 @@
 
7054
+// PR c++/61959
 
7055
+// { dg-do compile { target c++11 } }
 
7056
+
 
7057
+template <class Coord> struct BasePoint
 
7058
+{
 
7059
+  Coord x, y;
 
7060
+  constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
 
7061
+};
 
7062
+template <class T> struct BaseCoord
 
7063
+{
 
7064
+  int value;
 
7065
+  constexpr BaseCoord (T) : value (1) {}
 
7066
+};
 
7067
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
 
7068
+{
 
7069
+  typedef BaseCoord Super;
 
7070
+  constexpr IntCoordTyped (int) : Super (0) {}
 
7071
+};
 
7072
+template <class units>
 
7073
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
 
7074
+{
 
7075
+  typedef BasePoint<IntCoordTyped<units> > Super;
 
7076
+  constexpr IntPointTyped (int, int) : Super (0, 0) {}
 
7077
+};
 
7078
+struct A
 
7079
+{
 
7080
+};
 
7081
+IntPointTyped<A> a (0, 0);
 
7082
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
 
7083
===================================================================
 
7084
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../tags/gcc_4_8_3_release)
 
7085
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../branches/gcc-4_8-branch)
 
7086
@@ -0,0 +1,9 @@
 
7087
+// PR c++/56710
 
7088
+// { dg-options "-std=c++11 -Wall" }
 
7089
+
 
7090
+int main()
 
7091
+{
 
7092
+    int t = 0;
 
7093
+    return [&]() -> int {int __t; __t = t; return __t; }();
 
7094
+    return [&t]() -> int {int __t; __t = t; return __t; }();
 
7095
+}
 
7096
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
 
7097
===================================================================
 
7098
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../tags/gcc_4_8_3_release)
 
7099
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../branches/gcc-4_8-branch)
 
7100
@@ -0,0 +1,24 @@
 
7101
+// PR c++/61134
 
7102
+// { dg-do compile { target c++11 } }
 
7103
+
 
7104
+struct Base { };
 
7105
+
 
7106
+template <typename>
 
7107
+struct Fixed {
 
7108
+  typedef const char* name;
 
7109
+};
 
7110
+
 
7111
+template <typename VT, typename... Fields>
 
7112
+void New(const char* name,
 
7113
+         typename Fixed<Fields>::name... field_names);
 
7114
+
 
7115
+template <typename VT, typename... Fields>
 
7116
+void CreateMetric(const char* name,
 
7117
+                  typename Fixed<Fields>::name... field_names,
 
7118
+                  const Base&) { }
 
7119
+
 
7120
+
 
7121
+void Fn()
 
7122
+{
 
7123
+  CreateMetric<int, const char*>("abcd", "def", Base());
 
7124
+}
 
7125
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
 
7126
===================================================================
 
7127
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../tags/gcc_4_8_3_release)
 
7128
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../branches/gcc-4_8-branch)
 
7129
@@ -0,0 +1,7 @@
 
7130
+// PR c++/63415
 
7131
+// { dg-do compile { target c++11 } }
 
7132
+
 
7133
+template <typename T>
 
7134
+struct A {
 
7135
+  static constexpr int value = int(T{});
 
7136
+};
 
7137
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
 
7138
===================================================================
 
7139
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../tags/gcc_4_8_3_release)
 
7140
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../branches/gcc-4_8-branch)
 
7141
@@ -0,0 +1,49 @@
 
7142
+// PR c++/61539
 
7143
+// { dg-do compile { target c++11 } }
 
7144
+
 
7145
+template <typename _CharT> class A;
 
7146
+template <typename> class B;
 
7147
+template <class charT> class C;
 
7148
+template <> class C<char>
 
7149
+{
 
7150
+  virtual void xparse (int &, const B<A<char> > &) const;
 
7151
+};
 
7152
+template <class T, class charT = char> class G : C<charT>
 
7153
+{
 
7154
+public:
 
7155
+  G (void *) {}
 
7156
+  void default_value (const T &);
 
7157
+  void xparse (int &, const B<A<charT> > &) const;
 
7158
+};
 
7159
+template <class T, class charT>
 
7160
+void validate (int &, const B<A<charT> > &, T *, int);
 
7161
+template <class T, class charT>
 
7162
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
 
7163
+{
 
7164
+  validate (p1, p2, (T *)0, 0);
 
7165
+}
 
7166
+template <class T> G<T> *value (T *) { return new G<T>(0); }
 
7167
+namespace Eigen
 
7168
+{
 
7169
+template <typename T> struct D;
 
7170
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
 
7171
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
 
7172
+          int _MaxCols>
 
7173
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
 
7174
+{
 
7175
+  typedef _Scalar Scalar;
 
7176
+};
 
7177
+template <typename, int, int, int, int, int _MaxCols> class F
 
7178
+{
 
7179
+public:
 
7180
+  typedef typename Eigen::D<F>::Scalar Scalar;
 
7181
+  F (const Scalar &, const Scalar &, const Scalar &);
 
7182
+};
 
7183
+template <class... T>
 
7184
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
 
7185
+}
 
7186
+int main (int, char *[])
 
7187
+{
 
7188
+  Eigen::F<double, 3, 1> a (0, 0, 0);
 
7189
+  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
 
7190
+}
 
7191
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
 
7192
===================================================================
 
7193
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
 
7194
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
 
7195
@@ -0,0 +1,13 @@
 
7196
+// PR c++/58714
 
7197
+// { dg-do compile { target c++11 } }
 
7198
+
 
7199
+struct X {
 
7200
+  X& operator=(const X&) = delete;
 
7201
+  X& operator=(X&& ) = default;
 
7202
+};
 
7203
+
 
7204
+void f(bool t) {
 
7205
+  X a, b;
 
7206
+  *(t ? &a : &b) = X();
 
7207
+  (t ? a : b) = X();
 
7208
+}
 
7209
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
 
7210
===================================================================
 
7211
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../tags/gcc_4_8_3_release)
 
7212
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../branches/gcc-4_8-branch)
 
7213
@@ -0,0 +1,17 @@
 
7214
+// PR c++/59823
 
7215
+// { dg-options "-std=c++11" }
 
7216
+
 
7217
+struct X { };
 
7218
+
 
7219
+void f(X&&);                   // { dg-message "void f" }
 
7220
+
 
7221
+struct wrap
 
7222
+{
 
7223
+  operator const X&() const;
 
7224
+};
 
7225
+
 
7226
+int main()
 
7227
+{
 
7228
+  wrap w;
 
7229
+  f(w);                                // { dg-error "lvalue" }
 
7230
+}
 
7231
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
 
7232
===================================================================
 
7233
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../tags/gcc_4_8_3_release)
 
7234
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../branches/gcc-4_8-branch)
 
7235
@@ -0,0 +1,56 @@
 
7236
+// PR ipa/63838
 
7237
+// { dg-do run }
 
7238
+// { dg-options "-O2 -fdump-ipa-pure-const" }
 
7239
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
 
7240
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
 
7241
+// { dg-final { cleanup-ipa-dump "pure-const" } }
 
7242
+
 
7243
+__attribute__((noinline, noclone)) static void bar (int);
 
7244
+volatile int v;
 
7245
+void (*fn) ();
 
7246
+struct S { S () { v++; } ~S () { v++; } };
 
7247
+
 
7248
+__attribute__((noinline, noclone)) static void
 
7249
+foo (int x)
 
7250
+{
 
7251
+  v++;
 
7252
+  if (x == 5)
 
7253
+    bar (x);
 
7254
+}
 
7255
+
 
7256
+__attribute__((noinline, noclone)) static void
 
7257
+bar (int x)
 
7258
+{
 
7259
+  v++;
 
7260
+  if (x == 6)
 
7261
+    foo (x);
 
7262
+  else if (x == 5)
 
7263
+    fn ();
 
7264
+}
 
7265
+
 
7266
+__attribute__((noinline, noclone)) int
 
7267
+baz (int x)
 
7268
+{
 
7269
+  S s;
 
7270
+  foo (x);
 
7271
+}
 
7272
+
 
7273
+void
 
7274
+throw0 ()
 
7275
+{
 
7276
+  throw 0;
 
7277
+}
 
7278
+
 
7279
+int
 
7280
+main ()
 
7281
+{
 
7282
+  fn = throw0;
 
7283
+  asm volatile ("" : : : "memory");
 
7284
+  try
 
7285
+    {
 
7286
+      baz (5);
 
7287
+    }
 
7288
+  catch (int)
 
7289
+    {
 
7290
+    }
 
7291
+}
 
7292
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
 
7293
===================================================================
 
7294
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../tags/gcc_4_8_3_release)
 
7295
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../branches/gcc-4_8-branch)
 
7296
@@ -0,0 +1,55 @@
 
7297
+/* { dg-do run } */
 
7298
+/* { dg-options "-O3 -std=c++11"  } */
 
7299
+
 
7300
+
 
7301
+extern "C" int printf(const char *fmt, ...);
 
7302
+extern "C" void abort(void);
 
7303
+
 
7304
+struct Side {
 
7305
+    enum _Value { Left, Right, Invalid };
 
7306
+
 
7307
+    constexpr Side() : _value(Invalid) {}
 
7308
+    constexpr Side(_Value value) : _value(value) {}
 
7309
+    operator _Value() const { return (_Value)_value; }
 
7310
+
 
7311
+  private:
 
7312
+    char _value;
 
7313
+};
 
7314
+
 
7315
+struct A {
 
7316
+    void init();
 
7317
+    void adjust(Side side, bool final);
 
7318
+    void move(Side side);
 
7319
+};
 
7320
+
 
7321
+void A::init()
 
7322
+{
 
7323
+    adjust(Side::Invalid, false);
 
7324
+}
 
7325
+
 
7326
+static void __attribute__((noinline))
 
7327
+check (int v, int final)
 
7328
+{
 
7329
+    if (v != 0)
 
7330
+      abort();
 
7331
+}
 
7332
+
 
7333
+
 
7334
+__attribute__((noinline))
 
7335
+void A::adjust(Side side, bool final)
 
7336
+{
 
7337
+  check ((int)side, final);
 
7338
+}
 
7339
+
 
7340
+void A::move(Side side)
 
7341
+{
 
7342
+    adjust(side, false);
 
7343
+    adjust(side, true);
 
7344
+}
 
7345
+
 
7346
+int main()
 
7347
+{
 
7348
+    A t;
 
7349
+    t.move(Side::Left);
 
7350
+    return 0;
 
7351
+}
 
7352
Index: gcc/testsuite/g++.dg/template/local-fn1.C
 
7353
===================================================================
 
7354
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../tags/gcc_4_8_3_release)
 
7355
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../branches/gcc-4_8-branch)
 
7356
@@ -0,0 +1,8 @@
 
7357
+// PR c++/60605
 
7358
+
 
7359
+template <typename T = int>
 
7360
+struct Foo {
 
7361
+    void bar() {
 
7362
+        void bug();
 
7363
+    }
 
7364
+};
 
7365
Index: gcc/testsuite/g++.dg/template/conv14.C
 
7366
===================================================================
 
7367
--- a/src/gcc/testsuite/g++.dg/template/conv14.C        (.../tags/gcc_4_8_3_release)
 
7368
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C        (.../branches/gcc-4_8-branch)
 
7369
@@ -0,0 +1,30 @@
 
7370
+// PR c++/61647
 
7371
+
 
7372
+class XX;
 
7373
+
 
7374
+template<typename Container, typename Key>
 
7375
+struct Accessor;
 
7376
+
 
7377
+template<typename Container, typename Key, typename KeyStore = Key>
 
7378
+class Variant {
 
7379
+protected:
 
7380
+    KeyStore index;
 
7381
+    Container state;
 
7382
+public:
 
7383
+    Variant(Container st, const Key& i) : index(i), state(st) {}
 
7384
+
 
7385
+    template<typename T>
 
7386
+    operator T() const {
 
7387
+        return Accessor<Container, KeyStore>::template get<T>(state, index);
 
7388
+    }
 
7389
+};
 
7390
+
 
7391
+class AutoCleanVariant : public Variant<XX*, int> {
 
7392
+public:
 
7393
+    AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
 
7394
+
 
7395
+    template<typename T>
 
7396
+    operator T() const {
 
7397
+         return Variant<XX*, int>::operator T();
 
7398
+    }
 
7399
+};
 
7400
Index: gcc/testsuite/g++.dg/template/friend55.C
 
7401
===================================================================
 
7402
--- a/src/gcc/testsuite/g++.dg/template/friend55.C      (.../tags/gcc_4_8_3_release)
 
7403
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C      (.../branches/gcc-4_8-branch)
 
7404
@@ -0,0 +1,18 @@
 
7405
+// PR c++/59956
 
7406
+
 
7407
+template <int I> struct A;
 
7408
+template <int I> class B {
 
7409
+  int i;
 
7410
+  template <int A_S> friend void A<A_S>::impl();
 
7411
+};
 
7412
+
 
7413
+B<0> b1;
 
7414
+template<int I>struct A { void impl(); };
 
7415
+B<1> b2;
 
7416
+
 
7417
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
 
7418
+
 
7419
+int main()
 
7420
+{
 
7421
+  A<0>().impl();
 
7422
+}
 
7423
Index: gcc/testsuite/g++.dg/template/memclass5.C
 
7424
===================================================================
 
7425
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../tags/gcc_4_8_3_release)
 
7426
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../branches/gcc-4_8-branch)
 
7427
@@ -0,0 +1,26 @@
 
7428
+// PR c++/60241
 
7429
+
 
7430
+template <typename T>
 
7431
+struct x
 
7432
+{
 
7433
+    template <typename U>
 
7434
+    struct y
 
7435
+    {
 
7436
+        typedef T result2;
 
7437
+    };
 
7438
+
 
7439
+    typedef y<int> zy;
 
7440
+};
 
7441
+
 
7442
+template<>
 
7443
+template<class T>
 
7444
+struct x<int>::y
 
7445
+{
 
7446
+    typedef double result2;
 
7447
+};
 
7448
+
 
7449
+int main()
 
7450
+{
 
7451
+    x<int>::zy::result2 xxx;
 
7452
+    x<int>::y<int>::result2 xxx2;
 
7453
+}
 
7454
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
 
7455
===================================================================
 
7456
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../tags/gcc_4_8_3_release)
 
7457
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../branches/gcc-4_8-branch)
 
7458
@@ -0,0 +1,22 @@
 
7459
+// PR c++/61500
 
7460
+
 
7461
+struct X {
 
7462
+  int i;
 
7463
+  int j;
 
7464
+
 
7465
+  int foo(int X::* ptr);
 
7466
+
 
7467
+  template <int X::* ptr>
 
7468
+  int bar();
 
7469
+};
 
7470
+
 
7471
+int X::foo(int X::* ptr) {
 
7472
+  int* p = &(this->*ptr);  // OK.
 
7473
+  return *p;
 
7474
+}
 
7475
+
 
7476
+template <int X::* ptr>
 
7477
+int X::bar() {
 
7478
+  int* p = &(this->*ptr);  // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
 
7479
+  return *p;
 
7480
+}
 
7481
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
 
7482
===================================================================
 
7483
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../tags/gcc_4_8_3_release)
 
7484
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c     (.../branches/gcc-4_8-branch)
 
7485
@@ -0,0 +1,13 @@
 
7486
+/* PR libgomp/61200 */
 
7487
+
 
7488
+int
 
7489
+main ()
 
7490
+{
 
7491
+  int var = 1;
 
7492
+  #pragma omp parallel
 
7493
+    if (var != 1)
 
7494
+      __builtin_abort ();
 
7495
+  #pragma omp task shared(var)
 
7496
+    var = 2;
 
7497
+  return 0;
 
7498
+}
 
7499
Index: gcc/cp/tree.c
 
7500
===================================================================
 
7501
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
 
7502
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
 
7503
@@ -97,6 +97,16 @@
 
7504
     case IMAGPART_EXPR:
 
7505
       return lvalue_kind (TREE_OPERAND (ref, 0));
 
7506
 
 
7507
+    case MEMBER_REF:
 
7508
+    case DOTSTAR_EXPR:
 
7509
+      if (TREE_CODE (ref) == MEMBER_REF)
 
7510
+       op1_lvalue_kind = clk_ordinary;
 
7511
+      else
 
7512
+       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
7513
+      if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
 
7514
+       op1_lvalue_kind = clk_none;
 
7515
+      return op1_lvalue_kind;
 
7516
+
 
7517
     case COMPONENT_REF:
 
7518
       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
7519
       /* Look at the member designator.  */
 
7520
@@ -3738,6 +3748,10 @@
 
7521
     {
 
7522
       init_expr = get_target_expr (exp);
 
7523
       exp = TARGET_EXPR_SLOT (init_expr);
 
7524
+      if (CLASS_TYPE_P (TREE_TYPE (exp)))
 
7525
+       exp = move (exp);
 
7526
+      else
 
7527
+       exp = rvalue (exp);
 
7528
     }
 
7529
   else
 
7530
     {
 
7531
Index: gcc/cp/ChangeLog
 
7532
===================================================================
 
7533
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
7534
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_8-branch)
 
7535
@@ -1,3 +1,87 @@
 
7536
+2014-10-15  Jason Merrill  <jason@redhat.com>
 
7537
+
 
7538
+       PR c++/63455
 
7539
+       Revert:
 
7540
+       * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
 
7541
+       committed to this tentative parse.
 
7542
+
 
7543
+       PR c++/63415
 
7544
+       * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
 
7545
+       (iterative_hash_template_arg): Likewise.
 
7546
+
 
7547
+       PR c++/56710
 
7548
+       * semantics.c (finish_member_declaration): Don't push closure
 
7549
+       members.
 
7550
+
 
7551
+       PR c++/58624
 
7552
+       * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
 
7553
+       * semantics.c (finish_id_expression): Don't call TLS wrapper in a
 
7554
+       template.
 
7555
+
 
7556
+2014-08-07  Jason Merrill  <jason@redhat.com>
 
7557
+
 
7558
+       PR c++/61959
 
7559
+       * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
 
7560
+
 
7561
+       PR c++/58714
 
7562
+       * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
 
7563
+
 
7564
+2014-01-27  Jason Merrill  <jason@redhat.com>
 
7565
+
 
7566
+       PR c++/59823
 
7567
+       Core DR 1138
 
7568
+       * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
 
7569
+       list-initialization.  A conversion to rvalue ref that involves
 
7570
+       an lvalue-rvalue conversion is bad.
 
7571
+       (convert_like_real): Give helpful error message.
 
7572
+
 
7573
+2014-01-29  Jason Merrill  <jason@redhat.com>
 
7574
+
 
7575
+       PR c++/59956
 
7576
+       * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
 
7577
+       have a friend template in a class template.
 
7578
+       * pt.c (tsubst_friend_function): Look through it.
 
7579
+       (push_template_decl_real): A friend member template is
 
7580
+       primary.
 
7581
+
 
7582
+2014-02-21  Jason Merrill  <jason@redhat.com>
 
7583
+
 
7584
+       PR c++/60241
 
7585
+       * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
 
7586
+       of the partial instantiation, not the most general template.
 
7587
+       (maybe_process_partial_specialization): Reassign everything on
 
7588
+       that list.
 
7589
+
 
7590
+2014-03-05  Jason Merrill  <jason@redhat.com>
 
7591
+
 
7592
+       PR c++/60361
 
7593
+       * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
 
7594
+       if re-parsing might succeed.
 
7595
+       * semantics.c (finish_id_expression): Use of a parameter outside
 
7596
+       the function body is a parse error.
 
7597
+
 
7598
+2014-06-30  Jason Merrill  <jason@redhat.com>
 
7599
+
 
7600
+       PR c++/61647
 
7601
+       * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
 
7602
+
 
7603
+       PR c++/61539
 
7604
+       * pt.c (unify_one_argument): Type/expression mismatch just causes
 
7605
+       deduction failure.
 
7606
+
 
7607
+       PR c++/61500
 
7608
+       * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
 
7609
+
 
7610
+2014-06-17  Jason Merrill  <jason@redhat.com>
 
7611
+
 
7612
+       PR c++/60605
 
7613
+       * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
 
7614
+
 
7615
+2014-06-02  Jason Merrill  <jason@redhat.com>
 
7616
+
 
7617
+       PR c++/61134
 
7618
+       * pt.c (pack_deducible_p): Handle canonicalization.
 
7619
+
 
7620
 2014-05-22  Release Manager
 
7621
 
 
7622
        * GCC 4.8.3 released.
 
7623
Index: gcc/cp/pt.c
 
7624
===================================================================
 
7625
--- a/src/gcc/cp/pt.c   (.../tags/gcc_4_8_3_release)
 
7626
+++ b/src/gcc/cp/pt.c   (.../branches/gcc-4_8-branch)
 
7627
@@ -907,11 +907,13 @@
 
7628
               t; t = TREE_CHAIN (t))
 
7629
            {
 
7630
              tree inst = TREE_VALUE (t);
 
7631
-             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
 
7632
+             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
 
7633
+                 || !COMPLETE_OR_OPEN_TYPE_P (inst))
 
7634
                {
 
7635
                  /* We already have a full specialization of this partial
 
7636
-                    instantiation.  Reassign it to the new member
 
7637
-                    specialization template.  */
 
7638
+                    instantiation, or a full specialization has been
 
7639
+                    looked up but not instantiated.  Reassign it to the
 
7640
+                    new member specialization template.  */
 
7641
                  spec_entry elt;
 
7642
                  spec_entry *entry;
 
7643
                  void **slot;
 
7644
@@ -930,7 +932,7 @@
 
7645
                  *entry = elt;
 
7646
                  *slot = entry;
 
7647
                }
 
7648
-             else if (COMPLETE_OR_OPEN_TYPE_P (inst))
 
7649
+             else
 
7650
                /* But if we've had an implicit instantiation, that's a
 
7651
                   problem ([temp.expl.spec]/6).  */
 
7652
                error ("specialization %qT after instantiation %qT",
 
7653
@@ -1569,6 +1571,7 @@
 
7654
     case CONSTRUCTOR:
 
7655
       {
 
7656
        tree field, value;
 
7657
+       iterative_hash_template_arg (TREE_TYPE (arg), val);
 
7658
        FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
 
7659
          {
 
7660
            val = iterative_hash_template_arg (field, val);
 
7661
@@ -4308,7 +4311,8 @@
 
7662
      in the template-parameter-list of the definition of a member of a
 
7663
      class template.  */
 
7664
 
 
7665
-  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
 
7666
+  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
 
7667
+      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
 
7668
     /* You can't have a function template declaration in a local
 
7669
        scope, nor you can you define a member of a class template in a
 
7670
        local scope.  */
 
7671
@@ -4572,7 +4576,8 @@
 
7672
     DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
 
7673
 
 
7674
   /* See if this is a primary template.  */
 
7675
-  if (is_friend && ctx)
 
7676
+  if (is_friend && ctx
 
7677
+      && uses_template_parms_level (ctx, processing_template_decl))
 
7678
     /* A friend template that specifies a class context, i.e.
 
7679
          template <typename T> friend void A<T>::f();
 
7680
        is not primary.  */
 
7681
@@ -7454,7 +7459,7 @@
 
7682
        }
 
7683
 
 
7684
       /* Let's consider the explicit specialization of a member
 
7685
-         of a class template specialization that is implicitely instantiated,
 
7686
+         of a class template specialization that is implicitly instantiated,
 
7687
         e.g.:
 
7688
             template<class T>
 
7689
             struct S
 
7690
@@ -7552,9 +7557,9 @@
 
7691
 
 
7692
       /* Note this use of the partial instantiation so we can check it
 
7693
         later in maybe_process_partial_specialization.  */
 
7694
-      DECL_TEMPLATE_INSTANTIATIONS (templ)
 
7695
+      DECL_TEMPLATE_INSTANTIATIONS (found)
 
7696
        = tree_cons (arglist, t,
 
7697
-                    DECL_TEMPLATE_INSTANTIATIONS (templ));
 
7698
+                    DECL_TEMPLATE_INSTANTIATIONS (found));
 
7699
 
 
7700
       if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
 
7701
        /* Now that the type has been registered on the instantiations
 
7702
@@ -8289,10 +8294,17 @@
 
7703
 
 
7704
       if (COMPLETE_TYPE_P (context))
 
7705
        {
 
7706
+         tree fn = new_friend;
 
7707
+         /* do_friend adds the TEMPLATE_DECL for any member friend
 
7708
+            template even if it isn't a member template, i.e.
 
7709
+              template <class T> friend A<T>::f();
 
7710
+            Look through it in that case.  */
 
7711
+         if (TREE_CODE (fn) == TEMPLATE_DECL
 
7712
+             && !PRIMARY_TEMPLATE_P (fn))
 
7713
+           fn = DECL_TEMPLATE_RESULT (fn);
 
7714
          /* Check to see that the declaration is really present, and,
 
7715
             possibly obtain an improved declaration.  */
 
7716
-         tree fn = check_classfn (context,
 
7717
-                                  new_friend, NULL_TREE);
 
7718
+         fn = check_classfn (context, fn, NULL_TREE);
 
7719
 
 
7720
          if (fn)
 
7721
            new_friend = fn;
 
7722
@@ -14488,6 +14500,16 @@
 
7723
     case PARM_DECL:
 
7724
       {
 
7725
        tree r = tsubst_copy (t, args, complain, in_decl);
 
7726
+       if (TREE_CODE (r) == VAR_DECL
 
7727
+           && !processing_template_decl
 
7728
+           && !cp_unevaluated_operand
 
7729
+           && DECL_THREAD_LOCAL_P (r))
 
7730
+         {
 
7731
+           if (tree wrap = get_tls_wrapper_fn (r))
 
7732
+             /* Replace an evaluated use of the thread_local variable with
 
7733
+                a call to its wrapper.  */
 
7734
+             r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
 
7735
+         }
 
7736
 
 
7737
        if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
 
7738
          /* If the original type was a reference, we'll be wrapped in
 
7739
@@ -14934,7 +14956,7 @@
 
7740
        continue;
 
7741
       for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
 
7742
           packs; packs = TREE_CHAIN (packs))
 
7743
-       if (TREE_VALUE (packs) == parm)
 
7744
+       if (template_args_equal (TREE_VALUE (packs), parm))
 
7745
          {
 
7746
            /* The template parameter pack is used in a function parameter
 
7747
               pack.  If this is the end of the parameter list, the
 
7748
@@ -15502,8 +15524,9 @@
 
7749
        maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
 
7750
     }
 
7751
   else
 
7752
-    gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
7753
-               == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
 
7754
+    if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
7755
+       != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
 
7756
+      return unify_template_argument_mismatch (explain_p, parm, arg);
 
7757
 
 
7758
   /* For deduction from an init-list we need the actual list.  */
 
7759
   if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
 
7760
@@ -19804,6 +19827,8 @@
 
7761
       {
 
7762
        unsigned ix;
 
7763
        tree val;
 
7764
+       if (dependent_type_p (TREE_TYPE (expression)))
 
7765
+         return true;
 
7766
        FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
 
7767
          if (value_dependent_expression_p (val))
 
7768
            return true;
 
7769
@@ -20009,7 +20034,12 @@
 
7770
        return true;
 
7771
 
 
7772
       if (BASELINK_P (expression))
 
7773
-       expression = BASELINK_FUNCTIONS (expression);
 
7774
+       {
 
7775
+         if (BASELINK_OPTYPE (expression)
 
7776
+             && dependent_type_p (BASELINK_OPTYPE (expression)))
 
7777
+           return true;
 
7778
+         expression = BASELINK_FUNCTIONS (expression);
 
7779
+       }
 
7780
 
 
7781
       if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
 
7782
        {
 
7783
Index: gcc/cp/semantics.c
 
7784
===================================================================
 
7785
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_8_3_release)
 
7786
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_8-branch)
 
7787
@@ -2735,8 +2735,10 @@
 
7788
                                              /*friend_p=*/0);
 
7789
        }
 
7790
     }
 
7791
-  /* Enter the DECL into the scope of the class.  */
 
7792
-  else if (pushdecl_class_level (decl))
 
7793
+  /* Enter the DECL into the scope of the class, if the class
 
7794
+     isn't a closure (whose fields are supposed to be unnamed).  */
 
7795
+  else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
 
7796
+          || pushdecl_class_level (decl))
 
7797
     {
 
7798
       if (TREE_CODE (decl) == USING_DECL)
 
7799
        {
 
7800
@@ -3108,7 +3110,7 @@
 
7801
          && DECL_CONTEXT (decl) == NULL_TREE
 
7802
          && !cp_unevaluated_operand)
 
7803
        {
 
7804
-         error ("use of parameter %qD outside function body", decl);
 
7805
+         *error_msg = "use of parameter outside function body";
 
7806
          return error_mark_node;
 
7807
        }
 
7808
     }
 
7809
@@ -3343,6 +3345,7 @@
 
7810
       tree wrap;
 
7811
       if (TREE_CODE (decl) == VAR_DECL
 
7812
          && !cp_unevaluated_operand
 
7813
+         && !processing_template_decl
 
7814
          && DECL_THREAD_LOCAL_P (decl)
 
7815
          && (wrap = get_tls_wrapper_fn (decl)))
 
7816
        {
 
7817
@@ -7296,7 +7299,9 @@
 
7818
          constructor_elt *inner = base_field_constructor_elt (n, ce->index);
 
7819
          inner->value = elt;
 
7820
        }
 
7821
-      else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
 
7822
+      else if (ce->index
 
7823
+              && (TREE_CODE (ce->index) == NOP_EXPR
 
7824
+                  || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
 
7825
        {
 
7826
          /* This is an initializer for an empty base; now that we've
 
7827
             checked that it's constant, we can ignore it.  */
 
7828
Index: gcc/cp/parser.c
 
7829
===================================================================
 
7830
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_8_3_release)
 
7831
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_8-branch)
 
7832
@@ -12831,7 +12831,12 @@
 
7833
      the effort required to do the parse, nor will we issue duplicate
 
7834
      error messages about problems during instantiation of the
 
7835
      template.  */
 
7836
-  if (start_of_id)
 
7837
+  if (start_of_id
 
7838
+      /* Don't do this if we had a parse error in a declarator; re-parsing
 
7839
+        might succeed if a name changes meaning (60361).  */
 
7840
+      && !(cp_parser_error_occurred (parser)
 
7841
+          && cp_parser_parsing_tentatively (parser)
 
7842
+          && parser->in_declarator_p))
 
7843
     {
 
7844
       cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
 
7845
 
 
7846
@@ -23774,8 +23779,6 @@
 
7847
 static void
 
7848
 cp_parser_abort_tentative_parse (cp_parser* parser)
 
7849
 {
 
7850
-  gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
 
7851
-             || errorcount > 0);
 
7852
   cp_parser_simulate_error (parser);
 
7853
   /* Now, pretend that we want to see if the construct was
 
7854
      successfully parsed.  */
 
7855
Index: gcc/cp/call.c
 
7856
===================================================================
 
7857
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
 
7858
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
 
7859
@@ -1464,7 +1464,7 @@
 
7860
     {
 
7861
       maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
 
7862
       conv = implicit_conversion (to, from, expr, c_cast_p,
 
7863
-                                 flags, complain);
 
7864
+                                 flags|LOOKUP_NO_TEMP_BIND, complain);
 
7865
       if (!CLASS_TYPE_P (to)
 
7866
          && CONSTRUCTOR_NELTS (expr) == 1)
 
7867
        {
 
7868
@@ -1624,9 +1624,9 @@
 
7869
 
 
7870
   /* [dcl.init.ref]
 
7871
 
 
7872
-     Otherwise, the reference shall be to a non-volatile const type.
 
7873
-
 
7874
-     Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
 
7875
+     Otherwise, the reference shall be an lvalue reference to a
 
7876
+     non-volatile const type, or the reference shall be an rvalue
 
7877
+     reference.  */
 
7878
   if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
 
7879
     return NULL;
 
7880
 
 
7881
@@ -1664,7 +1664,16 @@
 
7882
   /* This reference binding, unlike those above, requires the
 
7883
      creation of a temporary.  */
 
7884
   conv->need_temporary_p = true;
 
7885
-  conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
 
7886
+  if (TYPE_REF_IS_RVALUE (rto))
 
7887
+    {
 
7888
+      conv->rvaluedness_matches_p = 1;
 
7889
+      /* In the second case, if the reference is an rvalue reference and
 
7890
+        the second standard conversion sequence of the user-defined
 
7891
+        conversion sequence includes an lvalue-to-rvalue conversion, the
 
7892
+        program is ill-formed.  */
 
7893
+      if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
 
7894
+       conv->bad_p = 1;
 
7895
+    }
 
7896
 
 
7897
   return conv;
 
7898
 }
 
7899
@@ -5811,7 +5820,7 @@
 
7900
       && convs->kind != ck_list
 
7901
       && convs->kind != ck_ambig
 
7902
       && (convs->kind != ck_ref_bind
 
7903
-         || convs->user_conv_p)
 
7904
+         || (convs->user_conv_p && next_conversion (convs)->bad_p))
 
7905
       && (convs->kind != ck_rvalue
 
7906
          || SCALAR_TYPE_P (totype))
 
7907
       && convs->kind != ck_base)
 
7908
@@ -6110,7 +6119,8 @@
 
7909
        if (convs->bad_p && !next_conversion (convs)->bad_p)
 
7910
          {
 
7911
            gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
 
7912
-                       && real_lvalue_p (expr));
 
7913
+                       && (real_lvalue_p (expr)
 
7914
+                           || next_conversion(convs)->kind == ck_rvalue));
 
7915
 
 
7916
            error_at (loc, "cannot bind %qT lvalue to %qT",
 
7917
                      TREE_TYPE (expr), totype);
 
7918
Index: gcc/cp/friend.c
 
7919
===================================================================
 
7920
--- a/src/gcc/cp/friend.c       (.../tags/gcc_4_8_3_release)
 
7921
+++ b/src/gcc/cp/friend.c       (.../branches/gcc-4_8-branch)
 
7922
@@ -502,7 +502,13 @@
 
7923
                                  ? current_template_parms
 
7924
                                  : NULL_TREE);
 
7925
 
 
7926
-         if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
7927
+         if ((template_member_p
 
7928
+              /* Always pull out the TEMPLATE_DECL if we have a friend
 
7929
+                 template in a class template so that it gets tsubsted
 
7930
+                 properly later on (59956).  tsubst_friend_function knows
 
7931
+                 how to tell this apart from a member template.  */
 
7932
+              || (class_template_depth && friend_depth))
 
7933
+             && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
7934
            decl = DECL_TI_TEMPLATE (decl);
 
7935
 
 
7936
          if (decl)
 
7937
Index: gcc/haifa-sched.c
 
7938
===================================================================
 
7939
--- a/src/gcc/haifa-sched.c     (.../tags/gcc_4_8_3_release)
 
7940
+++ b/src/gcc/haifa-sched.c     (.../branches/gcc-4_8-branch)
 
7941
@@ -2931,7 +2931,7 @@
 
7942
 {
 
7943
   advance_state (curr_state);
 
7944
   if (sched_verbose >= 6)
 
7945
-    fprintf (sched_dump, ";;\tAdvanced a state.\n");
 
7946
+    fprintf (sched_dump, ";;\tAdvance the current state.\n");
 
7947
 }
 
7948
 
 
7949
 /* Update register pressure after scheduling INSN.  */
 
7950
@@ -5964,6 +5964,7 @@
 
7951
   modulo_insns_scheduled = 0;
 
7952
 
 
7953
   ls.modulo_epilogue = false;
 
7954
+  ls.first_cycle_insn_p = true;
 
7955
 
 
7956
   /* Loop until all the insns in BB are scheduled.  */
 
7957
   while ((*current_sched_info->schedule_more_p) ())
 
7958
@@ -6034,7 +6035,6 @@
 
7959
       if (must_backtrack)
 
7960
        goto do_backtrack;
 
7961
 
 
7962
-      ls.first_cycle_insn_p = true;
 
7963
       ls.shadows_only_p = false;
 
7964
       cycle_issued_insns = 0;
 
7965
       ls.can_issue_more = issue_rate;
 
7966
@@ -6321,11 +6321,13 @@
 
7967
              break;
 
7968
            }
 
7969
        }
 
7970
+      ls.first_cycle_insn_p = true;
 
7971
     }
 
7972
   if (ls.modulo_epilogue)
 
7973
     success = true;
 
7974
  end_schedule:
 
7975
-  advance_one_cycle ();
 
7976
+  if (!ls.first_cycle_insn_p)
 
7977
+    advance_one_cycle ();
 
7978
   perform_replacements_new_cycle ();
 
7979
   if (modulo_ii > 0)
 
7980
     {
 
7981
Index: gcc/double-int.c
 
7982
===================================================================
 
7983
--- a/src/gcc/double-int.c      (.../tags/gcc_4_8_3_release)
 
7984
+++ b/src/gcc/double-int.c      (.../branches/gcc-4_8-branch)
 
7985
@@ -616,7 +616,7 @@
 
7986
                 == (unsigned HOST_WIDE_INT) htwice)
 
7987
                && (labs_den <= ltwice)))
 
7988
          {
 
7989
-           if (*hquo < 0)
 
7990
+           if (quo_neg)
 
7991
              /* quo = quo - 1;  */
 
7992
              add_double (*lquo, *hquo,
 
7993
                          (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
 
7994
Index: gcc/ipa-pure-const.c
 
7995
===================================================================
 
7996
--- a/src/gcc/ipa-pure-const.c  (.../tags/gcc_4_8_3_release)
 
7997
+++ b/src/gcc/ipa-pure-const.c  (.../branches/gcc-4_8-branch)
 
7998
@@ -1429,7 +1429,7 @@
 
7999
              else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
 
8000
                can_throw = true;
 
8001
            }
 
8002
-          for (ie = node->indirect_calls; ie; ie = ie->next_callee)
 
8003
+          for (ie = w->indirect_calls; ie; ie = ie->next_callee)
 
8004
            if (ie->can_throw_external)
 
8005
              can_throw = true;
 
8006
          w_info = (struct ipa_dfs_info *) w->symbol.aux;
 
8007
Index: gcc/tree-ssa-math-opts.c
 
8008
===================================================================
 
8009
--- a/src/gcc/tree-ssa-math-opts.c      (.../tags/gcc_4_8_3_release)
 
8010
+++ b/src/gcc/tree-ssa-math-opts.c      (.../branches/gcc-4_8-branch)
 
8011
@@ -1537,7 +1537,7 @@
 
8012
 
 
8013
 struct symbolic_number {
 
8014
   unsigned HOST_WIDEST_INT n;
 
8015
-  int size;
 
8016
+  tree type;
 
8017
 };
 
8018
 
 
8019
 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
 
8020
@@ -1549,13 +1549,15 @@
 
8021
                 struct symbolic_number *n,
 
8022
                 int count)
 
8023
 {
 
8024
+  int bitsize = TYPE_PRECISION (n->type);
 
8025
+
 
8026
   if (count % 8 != 0)
 
8027
     return false;
 
8028
 
 
8029
   /* Zero out the extra bits of N in order to avoid them being shifted
 
8030
      into the significant bits.  */
 
8031
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8032
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
8033
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8034
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8035
 
 
8036
   switch (code)
 
8037
     {
 
8038
@@ -1563,20 +1565,24 @@
 
8039
       n->n <<= count;
 
8040
       break;
 
8041
     case RSHIFT_EXPR:
 
8042
+      /* Arithmetic shift of signed type: result is dependent on the value.  */
 
8043
+      if (!TYPE_UNSIGNED (n->type)
 
8044
+         && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
 
8045
+       return false;
 
8046
       n->n >>= count;
 
8047
       break;
 
8048
     case LROTATE_EXPR:
 
8049
-      n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
 
8050
+      n->n = (n->n << count) | (n->n >> (bitsize - count));
 
8051
       break;
 
8052
     case RROTATE_EXPR:
 
8053
-      n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
 
8054
+      n->n = (n->n >> count) | (n->n << (bitsize - count));
 
8055
       break;
 
8056
     default:
 
8057
       return false;
 
8058
     }
 
8059
   /* Zero unused bits for size.  */
 
8060
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8061
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
8062
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8063
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8064
   return true;
 
8065
 }
 
8066
 
 
8067
@@ -1593,7 +1599,7 @@
 
8068
   if (TREE_CODE (lhs_type) != INTEGER_TYPE)
 
8069
     return false;
 
8070
 
 
8071
-  if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
 
8072
+  if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
 
8073
     return false;
 
8074
 
 
8075
   return true;
 
8076
@@ -1650,20 +1656,25 @@
 
8077
         to initialize the symbolic number.  */
 
8078
       if (!source_expr1)
 
8079
        {
 
8080
+         int size;
 
8081
+
 
8082
          /* Set up the symbolic number N by setting each byte to a
 
8083
             value between 1 and the byte size of rhs1.  The highest
 
8084
             order byte is set to n->size and the lowest order
 
8085
             byte to 1.  */
 
8086
-         n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
 
8087
-         if (n->size % BITS_PER_UNIT != 0)
 
8088
+         n->type = TREE_TYPE (rhs1);
 
8089
+         size = TYPE_PRECISION (n->type);
 
8090
+         if (size % BITS_PER_UNIT != 0)
 
8091
            return NULL_TREE;
 
8092
-         n->size /= BITS_PER_UNIT;
 
8093
+         if (size > HOST_BITS_PER_WIDEST_INT)
 
8094
+           return NULL_TREE;
 
8095
+         size /= BITS_PER_UNIT;
 
8096
          n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
 
8097
                  (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
 
8098
 
 
8099
-         if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
8100
+         if (size < (int)sizeof (HOST_WIDEST_INT))
 
8101
            n->n &= ((unsigned HOST_WIDEST_INT)1 <<
 
8102
-                    (n->size * BITS_PER_UNIT)) - 1;
 
8103
+                    (size * BITS_PER_UNIT)) - 1;
 
8104
 
 
8105
          source_expr1 = rhs1;
 
8106
        }
 
8107
@@ -1672,12 +1683,12 @@
 
8108
        {
 
8109
        case BIT_AND_EXPR:
 
8110
          {
 
8111
-           int i;
 
8112
+           int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
8113
            unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
 
8114
            unsigned HOST_WIDEST_INT tmp = val;
 
8115
 
 
8116
            /* Only constants masking full bytes are allowed.  */
 
8117
-           for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
 
8118
+           for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
 
8119
              if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
 
8120
                return NULL_TREE;
 
8121
 
 
8122
@@ -1693,12 +1704,24 @@
 
8123
          break;
 
8124
        CASE_CONVERT:
 
8125
          {
 
8126
-           int type_size;
 
8127
+           int type_size, old_type_size;
 
8128
+           tree type;
 
8129
 
 
8130
-           type_size = TYPE_PRECISION (gimple_expr_type (stmt));
 
8131
+           type = gimple_expr_type (stmt);
 
8132
+           type_size = TYPE_PRECISION (type);
 
8133
            if (type_size % BITS_PER_UNIT != 0)
 
8134
              return NULL_TREE;
 
8135
+           if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
 
8136
+             return NULL_TREE;
 
8137
 
 
8138
+           /* Sign extension: result is dependent on the value.  */
 
8139
+           old_type_size = TYPE_PRECISION (n->type);
 
8140
+           if (!TYPE_UNSIGNED (n->type)
 
8141
+               && type_size > old_type_size
 
8142
+               && n->n &
 
8143
+                  ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
 
8144
+             return NULL_TREE;
 
8145
+
 
8146
            if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
 
8147
              {
 
8148
                /* If STMT casts to a smaller type mask out the bits not
 
8149
@@ -1705,7 +1728,7 @@
 
8150
                   belonging to the target type.  */
 
8151
                n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
 
8152
              }
 
8153
-           n->size = type_size / BITS_PER_UNIT;
 
8154
+           n->type = type;
 
8155
          }
 
8156
          break;
 
8157
        default:
 
8158
@@ -1718,7 +1741,7 @@
 
8159
 
 
8160
   if (rhs_class == GIMPLE_BINARY_RHS)
 
8161
     {
 
8162
-      int i;
 
8163
+      int i, size;
 
8164
       struct symbolic_number n1, n2;
 
8165
       unsigned HOST_WIDEST_INT mask;
 
8166
       tree source_expr2;
 
8167
@@ -1742,11 +1765,12 @@
 
8168
          source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
 
8169
 
 
8170
          if (source_expr1 != source_expr2
 
8171
-             || n1.size != n2.size)
 
8172
+             || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
 
8173
            return NULL_TREE;
 
8174
 
 
8175
-         n->size = n1.size;
 
8176
-         for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
 
8177
+         n->type = n1.type;
 
8178
+         size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
8179
+         for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
 
8180
            {
 
8181
              unsigned HOST_WIDEST_INT masked1, masked2;
 
8182
 
 
8183
@@ -1785,7 +1809,7 @@
 
8184
 
 
8185
   struct symbolic_number n;
 
8186
   tree source_expr;
 
8187
-  int limit;
 
8188
+  int limit, bitsize;
 
8189
 
 
8190
   /* The last parameter determines the depth search limit.  It usually
 
8191
      correlates directly to the number of bytes to be touched.  We
 
8192
@@ -1800,13 +1824,14 @@
 
8193
     return NULL_TREE;
 
8194
 
 
8195
   /* Zero out the extra bits of N and CMP.  */
 
8196
-  if (n.size < (int)sizeof (HOST_WIDEST_INT))
 
8197
+  bitsize = TYPE_PRECISION (n.type);
 
8198
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
8199
     {
 
8200
       unsigned HOST_WIDEST_INT mask =
 
8201
-       ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
 
8202
+       ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
8203
 
 
8204
       n.n &= mask;
 
8205
-      cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
 
8206
+      cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
 
8207
     }
 
8208
 
 
8209
   /* A complete byte swap should make the symbolic number to start
 
8210
@@ -1828,7 +1853,7 @@
 
8211
   bool changed = false;
 
8212
   tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
 
8213
 
 
8214
-  if (BITS_PER_UNIT != 8)
 
8215
+  if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
 
8216
     return 0;
 
8217
 
 
8218
   if (sizeof (HOST_WIDEST_INT) < 8)
 
8219
Index: gcc/tree-nrv.c
 
8220
===================================================================
 
8221
--- a/src/gcc/tree-nrv.c        (.../tags/gcc_4_8_3_release)
 
8222
+++ b/src/gcc/tree-nrv.c        (.../branches/gcc-4_8-branch)
 
8223
@@ -178,8 +178,7 @@
 
8224
                 same type and alignment as the function's result.  */
 
8225
              if (TREE_CODE (found) != VAR_DECL
 
8226
                  || TREE_THIS_VOLATILE (found)
 
8227
-                 || DECL_CONTEXT (found) != current_function_decl
 
8228
-                 || TREE_STATIC (found)
 
8229
+                 || !auto_var_in_fn_p (found, current_function_decl)
 
8230
                  || TREE_ADDRESSABLE (found)
 
8231
                  || DECL_ALIGN (found) > DECL_ALIGN (result)
 
8232
                  || !useless_type_conversion_p (result_type,
 
8233
Index: gcc/ifcvt.c
 
8234
===================================================================
 
8235
--- a/src/gcc/ifcvt.c   (.../tags/gcc_4_8_3_release)
 
8236
+++ b/src/gcc/ifcvt.c   (.../branches/gcc-4_8-branch)
 
8237
@@ -294,6 +294,28 @@
 
8238
 
 
8239
   return (e) ? e->dest : NULL_BLOCK;
 
8240
 }
 
8241
+
 
8242
+/* Return true if RTXs A and B can be safely interchanged.  */
 
8243
+
 
8244
+static bool
 
8245
+rtx_interchangeable_p (const_rtx a, const_rtx b)
 
8246
+{
 
8247
+  if (!rtx_equal_p (a, b))
 
8248
+    return false;
 
8249
+
 
8250
+  if (GET_CODE (a) != MEM)
 
8251
+    return true;
 
8252
+
 
8253
+  /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
 
8254
+     reference is not.  Interchanging a dead type-unsafe memory reference with
 
8255
+     a live type-safe one creates a live type-unsafe memory reference, in other
 
8256
+     words, it makes the program illegal.
 
8257
+     We check here conservatively whether the two memory references have equal
 
8258
+     memory attributes.  */
 
8259
+
 
8260
+  return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
 
8261
+}
 
8262
+
 
8263
 
 
8264
 /* Go through a bunch of insns, converting them to conditional
 
8265
    execution format if possible.  Return TRUE if all of the non-note
 
8266
@@ -1014,6 +1036,9 @@
 
8267
       || (rtx_equal_p (if_info->a, XEXP (cond, 1))
 
8268
          && rtx_equal_p (if_info->b, XEXP (cond, 0))))
 
8269
     {
 
8270
+      if (!rtx_interchangeable_p (if_info->a, if_info->b))
 
8271
+       return FALSE;
 
8272
+
 
8273
       y = (code == EQ) ? if_info->a : if_info->b;
 
8274
 
 
8275
       /* Avoid generating the move if the source is the destination.  */
 
8276
@@ -2483,7 +2508,7 @@
 
8277
       if (! insn_b
 
8278
          || insn_b != last_active_insn (else_bb, FALSE)
 
8279
          || (set_b = single_set (insn_b)) == NULL_RTX
 
8280
-         || ! rtx_equal_p (x, SET_DEST (set_b)))
 
8281
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
 
8282
        return FALSE;
 
8283
     }
 
8284
   else
 
8285
@@ -2496,7 +2521,7 @@
 
8286
          || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
 
8287
          || !NONJUMP_INSN_P (insn_b)
 
8288
          || (set_b = single_set (insn_b)) == NULL_RTX
 
8289
-         || ! rtx_equal_p (x, SET_DEST (set_b))
 
8290
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b))
 
8291
          || ! noce_operand_ok (SET_SRC (set_b))
 
8292
          || reg_overlap_mentioned_p (x, SET_SRC (set_b))
 
8293
          || modified_between_p (SET_SRC (set_b), insn_b, jump)
 
8294
@@ -2562,7 +2587,7 @@
 
8295
 
 
8296
   /* Look and see if A and B are really the same.  Avoid creating silly
 
8297
      cmove constructs that no one will fix up later.  */
 
8298
-  if (rtx_equal_p (a, b))
 
8299
+  if (rtx_interchangeable_p (a, b))
 
8300
     {
 
8301
       /* If we have an INSN_B, we don't have to create any new rtl.  Just
 
8302
         move the instruction that we already have.  If we don't have an
 
8303
@@ -4246,6 +4271,9 @@
 
8304
   old_dest = JUMP_LABEL (jump);
 
8305
   if (other_bb != new_dest)
 
8306
     {
 
8307
+      if (!any_condjump_p (jump))
 
8308
+       goto cancel;
 
8309
+
 
8310
       if (JUMP_P (BB_END (dest_edge->src)))
 
8311
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
 
8312
       else if (new_dest == EXIT_BLOCK_PTR)
 
8313
Index: gcc/dwarf2out.c
 
8314
===================================================================
 
8315
--- a/src/gcc/dwarf2out.c       (.../tags/gcc_4_8_3_release)
 
8316
+++ b/src/gcc/dwarf2out.c       (.../branches/gcc-4_8-branch)
 
8317
@@ -12234,7 +12234,7 @@
 
8318
              op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
 
8319
                                        VAR_INIT_STATUS_INITIALIZED);
 
8320
              if (op1 == 0)
 
8321
-               break;
 
8322
+               return NULL;
 
8323
              add_loc_descr (&mem_loc_result, op1);
 
8324
              add_loc_descr (&mem_loc_result,
 
8325
                             new_loc_descr (DW_OP_plus, 0, 0));
 
8326
@@ -13882,6 +13882,10 @@
 
8327
       have_address = 1;
 
8328
       break;
 
8329
 
 
8330
+    case TARGET_MEM_REF:
 
8331
+    case SSA_NAME:
 
8332
+      return NULL;
 
8333
+
 
8334
     case COMPOUND_EXPR:
 
8335
       return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
 
8336
 
 
8337
Index: gcc/expr.c
 
8338
===================================================================
 
8339
--- a/src/gcc/expr.c    (.../tags/gcc_4_8_3_release)
 
8340
+++ b/src/gcc/expr.c    (.../branches/gcc-4_8-branch)
 
8341
@@ -7590,11 +7590,13 @@
 
8342
       break;
 
8343
 
 
8344
     case COMPOUND_LITERAL_EXPR:
 
8345
-      /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
 
8346
-        rtl_for_decl_init is called on DECL_INITIAL with
 
8347
-        COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified.  */
 
8348
-      if (modifier == EXPAND_INITIALIZER
 
8349
-         && COMPOUND_LITERAL_EXPR_DECL (exp))
 
8350
+      /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
 
8351
+        initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
 
8352
+        with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
 
8353
+        array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
 
8354
+        the initializers aren't gimplified.  */
 
8355
+      if (COMPOUND_LITERAL_EXPR_DECL (exp)
 
8356
+         && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
 
8357
        return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
 
8358
                                        target, tmode, modifier, as);
 
8359
       /* FALLTHRU */
 
8360
@@ -10603,7 +10605,7 @@
 
8361
       || !host_integerp (TREE_OPERAND (offset, 1), 1)
 
8362
       || compare_tree_int (TREE_OPERAND (offset, 1),
 
8363
                           BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
 
8364
-      || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
8365
+      || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
8366
     return 0;
 
8367
 
 
8368
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
 
8369
Index: gcc/ada/socket.c
 
8370
===================================================================
 
8371
--- a/src/gcc/ada/socket.c      (.../tags/gcc_4_8_3_release)
 
8372
+++ b/src/gcc/ada/socket.c      (.../branches/gcc-4_8-branch)
 
8373
@@ -212,7 +212,7 @@
 
8374
   struct hostent *rh;
 
8375
   int ri;
 
8376
 
 
8377
-#if defined(__linux__) || defined(__GLIBC__)
 
8378
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
 
8379
   (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
 
8380
 #else
 
8381
   rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
 
8382
Index: gcc/ada/uintp.adb
 
8383
===================================================================
 
8384
--- a/src/gcc/ada/uintp.adb     (.../tags/gcc_4_8_3_release)
 
8385
+++ b/src/gcc/ada/uintp.adb     (.../branches/gcc-4_8-branch)
 
8386
@@ -171,22 +171,6 @@
 
8387
    --  If Discard_Quotient is True, Quotient is set to No_Uint
 
8388
    --  If Discard_Remainder is True, Remainder is set to No_Uint
 
8389
 
 
8390
-   function Vector_To_Uint
 
8391
-     (In_Vec   : UI_Vector;
 
8392
-      Negative : Boolean) return Uint;
 
8393
-   --  Functions that calculate values in UI_Vectors, call this function to
 
8394
-   --  create and return the Uint value. In_Vec contains the multiple precision
 
8395
-   --  (Base) representation of a non-negative value. Leading zeroes are
 
8396
-   --  permitted. Negative is set if the desired result is the negative of the
 
8397
-   --  given value. The result will be either the appropriate directly
 
8398
-   --  represented value, or a table entry in the proper canonical format is
 
8399
-   --  created and returned.
 
8400
-   --
 
8401
-   --  Note that Init_Operand puts a signed value in the result vector, but
 
8402
-   --  Vector_To_Uint is always presented with a non-negative value. The
 
8403
-   --  processing of signs is something that is done by the caller before
 
8404
-   --  calling Vector_To_Uint.
 
8405
-
 
8406
    ------------
 
8407
    -- Direct --
 
8408
    ------------
 
8409
Index: gcc/ada/uintp.ads
 
8410
===================================================================
 
8411
--- a/src/gcc/ada/uintp.ads     (.../tags/gcc_4_8_3_release)
 
8412
+++ b/src/gcc/ada/uintp.ads     (.../branches/gcc-4_8-branch)
 
8413
@@ -90,6 +90,18 @@
 
8414
    Uint_Minus_80  : constant Uint;
 
8415
    Uint_Minus_128 : constant Uint;
 
8416
 
 
8417
+   type UI_Vector is array (Pos range <>) of Int;
 
8418
+   --  Vector containing the integer values of a Uint value
 
8419
+
 
8420
+   --  Note: An earlier version of this package used pointers of arrays of Ints
 
8421
+   --  (dynamically allocated) for the Uint type. The change leads to a few
 
8422
+   --  less natural idioms used throughout this code, but eliminates all uses
 
8423
+   --  of the heap except for the table package itself. For example, Uint
 
8424
+   --  parameters are often converted to UI_Vectors for internal manipulation.
 
8425
+   --  This is done by creating the local UI_Vector using the function N_Digits
 
8426
+   --  on the Uint to find the size needed for the vector, and then calling
 
8427
+   --  Init_Operand to copy the values out of the table into the vector.
 
8428
+
 
8429
    -----------------
 
8430
    -- Subprograms --
 
8431
    -----------------
 
8432
@@ -252,6 +264,22 @@
 
8433
    --  function is used for capacity checks, and it can be one bit off
 
8434
    --  without affecting its usage.
 
8435
 
 
8436
+   function Vector_To_Uint
 
8437
+     (In_Vec   : UI_Vector;
 
8438
+      Negative : Boolean) return Uint;
 
8439
+   --  Functions that calculate values in UI_Vectors, call this function to
 
8440
+   --  create and return the Uint value. In_Vec contains the multiple precision
 
8441
+   --  (Base) representation of a non-negative value. Leading zeroes are
 
8442
+   --  permitted. Negative is set if the desired result is the negative of the
 
8443
+   --  given value. The result will be either the appropriate directly
 
8444
+   --  represented value, or a table entry in the proper canonical format is
 
8445
+   --  created and returned.
 
8446
+   --
 
8447
+   --  Note that Init_Operand puts a signed value in the result vector, but
 
8448
+   --  Vector_To_Uint is always presented with a non-negative value. The
 
8449
+   --  processing of signs is something that is done by the caller before
 
8450
+   --  calling Vector_To_Uint.
 
8451
+
 
8452
    ---------------------
 
8453
    -- Output Routines --
 
8454
    ---------------------
 
8455
@@ -494,18 +522,6 @@
 
8456
    --  UI_Vector is defined for this purpose and some internal subprograms
 
8457
    --  used for converting from one to the other are defined.
 
8458
 
 
8459
-   type UI_Vector is array (Pos range <>) of Int;
 
8460
-   --  Vector containing the integer values of a Uint value
 
8461
-
 
8462
-   --  Note: An earlier version of this package used pointers of arrays of Ints
 
8463
-   --  (dynamically allocated) for the Uint type. The change leads to a few
 
8464
-   --  less natural idioms used throughout this code, but eliminates all uses
 
8465
-   --  of the heap except for the table package itself. For example, Uint
 
8466
-   --  parameters are often converted to UI_Vectors for internal manipulation.
 
8467
-   --  This is done by creating the local UI_Vector using the function N_Digits
 
8468
-   --  on the Uint to find the size needed for the vector, and then calling
 
8469
-   --  Init_Operand to copy the values out of the table into the vector.
 
8470
-
 
8471
    type Uint_Entry is record
 
8472
       Length : Pos;
 
8473
       --  Length of entry in Udigits table in digits (i.e. in words)
 
8474
Index: gcc/ada/ChangeLog
 
8475
===================================================================
 
8476
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_8_3_release)
 
8477
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_8-branch)
 
8478
@@ -1,3 +1,29 @@
 
8479
+2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
 
8480
+
 
8481
+       Backport from mainline
 
8482
+       2014-11-20  Vincent Celier  <celier@adacore.com>
 
8483
+
 
8484
+       PR ada/47500
 
8485
+       * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
 
8486
+       its argument.
 
8487
+
 
8488
+2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
 
8489
+            Alan Modra  <amodra@gmail.com>
 
8490
+
 
8491
+       PR ada/63225
 
8492
+       * uintp.adb (Vector_To_Uint): Move from here to...
 
8493
+       * uintp.ads (UI_Vector): Make public.
 
8494
+       (Vector_To_Uint): ...here.
 
8495
+
 
8496
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
8497
+
 
8498
+       * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
 
8499
+       * gsocket.h Add include of <unistd.h> on RTEMS.
 
8500
+
 
8501
+2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
 
8502
+
 
8503
+       * s-osinte-rtems.adb: Correct formatting of line in license block.
 
8504
+
 
8505
 2014-05-22  Release Manager
 
8506
 
 
8507
        * GCC 4.8.3 released.
 
8508
Index: gcc/ada/s-osinte-rtems.adb
 
8509
===================================================================
 
8510
--- a/src/gcc/ada/s-osinte-rtems.adb    (.../tags/gcc_4_8_3_release)
 
8511
+++ b/src/gcc/ada/s-osinte-rtems.adb    (.../branches/gcc-4_8-branch)
 
8512
@@ -22,7 +22,7 @@
 
8513
 -- You should have received a copy of the GNU General Public License and    --
 
8514
 -- a copy of the GCC Runtime Library Exception along with this program;     --
 
8515
 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
8516
--- <http://www.gnu.org/licenses/>.                                         
 
8517
+-- <http://www.gnu.org/licenses/>.                                          --
 
8518
 --                                                                          --
 
8519
 -- GNARL was developed by the GNARL team at Florida State University. It is --
 
8520
 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
 
8521
Index: gcc/ada/gsocket.h
 
8522
===================================================================
 
8523
--- a/src/gcc/ada/gsocket.h     (.../tags/gcc_4_8_3_release)
 
8524
+++ b/src/gcc/ada/gsocket.h     (.../branches/gcc-4_8-branch)
 
8525
@@ -183,6 +183,11 @@
 
8526
 #include <sys/time.h>
 
8527
 #endif
 
8528
 
 
8529
+#if defined(__rtems__)
 
8530
+#include <unistd.h>
 
8531
+/* Required, for read(), write(), and close() */
 
8532
+#endif
 
8533
+
 
8534
 /*
 
8535
  * RTEMS has these .h files but not until you have built and installed RTEMS.
 
8536
  * When building a C/C++ toolset, you also build the newlib C library, so the
 
8537
Index: gcc/ada/back_end.adb
 
8538
===================================================================
 
8539
--- a/src/gcc/ada/back_end.adb  (.../tags/gcc_4_8_3_release)
 
8540
+++ b/src/gcc/ada/back_end.adb  (.../branches/gcc-4_8-branch)
 
8541
@@ -209,9 +209,10 @@
 
8542
          Last  : constant Natural  := Switch_Last (Switch_Chars);
 
8543
 
 
8544
       begin
 
8545
-         --  Skip -o or internal GCC switches together with their argument
 
8546
+         --  Skip -o, -G or internal GCC switches together with their argument.
 
8547
 
 
8548
          if Switch_Chars (First .. Last) = "o"
 
8549
+           or else Switch_Chars (First .. Last) = "G"
 
8550
            or else Is_Internal_GCC_Switch (Switch_Chars)
 
8551
          then
 
8552
             Next_Arg := Next_Arg + 1;
 
8553
Index: gcc/tree-ssa-ifcombine.c
 
8554
===================================================================
 
8555
--- a/src/gcc/tree-ssa-ifcombine.c      (.../tags/gcc_4_8_3_release)
 
8556
+++ b/src/gcc/tree-ssa-ifcombine.c      (.../branches/gcc-4_8-branch)
 
8557
@@ -105,7 +105,11 @@
 
8558
     {
 
8559
       gimple stmt = gsi_stmt (gsi);
 
8560
 
 
8561
+      if (is_gimple_debug (stmt))
 
8562
+       continue;
 
8563
+
 
8564
       if (gimple_has_side_effects (stmt)
 
8565
+         || gimple_could_trap_p (stmt)
 
8566
          || gimple_vuse (stmt))
 
8567
        return false;
 
8568
     }
 
8569
@@ -197,7 +201,8 @@
 
8570
       while (is_gimple_assign (stmt)
 
8571
             && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
 
8572
                  && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
 
8573
-                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
 
8574
+                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
 
8575
+                 && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
 
8576
                 || gimple_assign_ssa_name_copy_p (stmt)))
 
8577
        stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
 
8578
 
 
8579
Index: gcc/sel-sched-ir.c
 
8580
===================================================================
 
8581
--- a/src/gcc/sel-sched-ir.c    (.../tags/gcc_4_8_3_release)
 
8582
+++ b/src/gcc/sel-sched-ir.c    (.../branches/gcc-4_8-branch)
 
8583
@@ -162,7 +162,7 @@
 
8584
 static void free_av_set (basic_block);
 
8585
 static void invalidate_av_set (basic_block);
 
8586
 static void extend_insn_data (void);
 
8587
-static void sel_init_new_insn (insn_t, int);
 
8588
+static void sel_init_new_insn (insn_t, int, int = -1);
 
8589
 static void finish_insns (void);
 
8590
 
 
8591
 /* Various list functions.  */
 
8592
@@ -4011,9 +4011,10 @@
 
8593
   return seqno;
 
8594
 }
 
8595
 
 
8596
-/* Compute seqno for INSN by its preds or succs.  */
 
8597
+/* Compute seqno for INSN by its preds or succs.  Use OLD_SEQNO to compute
 
8598
+   seqno in corner cases.  */
 
8599
 static int
 
8600
-get_seqno_for_a_jump (insn_t insn)
 
8601
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
 
8602
 {
 
8603
   int seqno;
 
8604
 
 
8605
@@ -4069,8 +4070,16 @@
 
8606
   if (seqno < 0)
 
8607
     seqno = get_seqno_by_succs (insn);
 
8608
 
 
8609
+  if (seqno < 0)
 
8610
+    {
 
8611
+      /* The only case where this could be here legally is that the only
 
8612
+        unscheduled insn was a conditional jump that got removed and turned
 
8613
+        into this unconditional one.  Initialize from the old seqno
 
8614
+        of that jump passed down to here.  */
 
8615
+      seqno = old_seqno;
 
8616
+    }
 
8617
+
 
8618
   gcc_assert (seqno >= 0);
 
8619
-
 
8620
   return seqno;
 
8621
 }
 
8622
 
 
8623
@@ -4250,22 +4259,24 @@
 
8624
 }
 
8625
 
 
8626
 /* This is used to initialize spurious jumps generated by
 
8627
-   sel_redirect_edge ().  */
 
8628
+   sel_redirect_edge ().  OLD_SEQNO is used for initializing seqnos
 
8629
+   in corner cases within get_seqno_for_a_jump.  */
 
8630
 static void
 
8631
-init_simplejump_data (insn_t insn)
 
8632
+init_simplejump_data (insn_t insn, int old_seqno)
 
8633
 {
 
8634
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
 
8635
             REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
 
8636
             vNULL, true, false, false,
 
8637
             false, true);
 
8638
-  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
 
8639
+  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
 
8640
   init_first_time_insn_data (insn);
 
8641
 }
 
8642
 
 
8643
 /* Perform deferred initialization of insns.  This is used to process
 
8644
-   a new jump that may be created by redirect_edge.  */
 
8645
-void
 
8646
-sel_init_new_insn (insn_t insn, int flags)
 
8647
+   a new jump that may be created by redirect_edge.  OLD_SEQNO is used
 
8648
+   for initializing simplejumps in init_simplejump_data.  */
 
8649
+static void
 
8650
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
 
8651
 {
 
8652
   /* We create data structures for bb when the first insn is emitted in it.  */
 
8653
   if (INSN_P (insn)
 
8654
@@ -4292,7 +4303,7 @@
 
8655
   if (flags & INSN_INIT_TODO_SIMPLEJUMP)
 
8656
     {
 
8657
       extend_insn_data ();
 
8658
-      init_simplejump_data (insn);
 
8659
+      init_simplejump_data (insn, old_seqno);
 
8660
     }
 
8661
 
 
8662
   gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
 
8663
@@ -5578,8 +5589,7 @@
 
8664
 }
 
8665
 
 
8666
 /* A wrapper for redirect_edge_and_branch_force, which also initializes
 
8667
-   data structures for possibly created bb and insns.  Returns the newly
 
8668
-   added bb or NULL, when a bb was not needed.  */
 
8669
+   data structures for possibly created bb and insns.  */
 
8670
 void
 
8671
 sel_redirect_edge_and_branch_force (edge e, basic_block to)
 
8672
 {
 
8673
@@ -5586,6 +5596,7 @@
 
8674
   basic_block jump_bb, src, orig_dest = e->dest;
 
8675
   int prev_max_uid;
 
8676
   rtx jump;
 
8677
+  int old_seqno = -1;
 
8678
 
 
8679
   /* This function is now used only for bookkeeping code creation, where
 
8680
      we'll never get the single pred of orig_dest block and thus will not
 
8681
@@ -5594,8 +5605,13 @@
 
8682
               && !single_pred_p (orig_dest));
 
8683
   src = e->src;
 
8684
   prev_max_uid = get_max_uid ();
 
8685
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
8686
+     when the conditional jump being redirected may become unconditional.  */
 
8687
+  if (any_condjump_p (BB_END (src))
 
8688
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
8689
+    old_seqno = INSN_SEQNO (BB_END (src));
 
8690
+
 
8691
   jump_bb = redirect_edge_and_branch_force (e, to);
 
8692
-
 
8693
   if (jump_bb != NULL)
 
8694
     sel_add_bb (jump_bb);
 
8695
 
 
8696
@@ -5607,7 +5623,8 @@
 
8697
 
 
8698
   jump = find_new_jump (src, jump_bb, prev_max_uid);
 
8699
   if (jump)
 
8700
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
8701
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
 
8702
+                      old_seqno);
 
8703
   set_immediate_dominator (CDI_DOMINATORS, to,
 
8704
                           recompute_dominator (CDI_DOMINATORS, to));
 
8705
   set_immediate_dominator (CDI_DOMINATORS, orig_dest,
 
8706
@@ -5626,6 +5643,7 @@
 
8707
   edge redirected;
 
8708
   bool recompute_toporder_p = false;
 
8709
   bool maybe_unreachable = single_pred_p (orig_dest);
 
8710
+  int old_seqno = -1;
 
8711
 
 
8712
   latch_edge_p = (pipelining_p
 
8713
                   && current_loop_nest
 
8714
@@ -5634,6 +5652,12 @@
 
8715
   src = e->src;
 
8716
   prev_max_uid = get_max_uid ();
 
8717
 
 
8718
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
8719
+     when the conditional jump being redirected may become unconditional.  */
 
8720
+  if (any_condjump_p (BB_END (src))
 
8721
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
8722
+    old_seqno = INSN_SEQNO (BB_END (src));
 
8723
+
 
8724
   redirected = redirect_edge_and_branch (e, to);
 
8725
 
 
8726
   gcc_assert (redirected && !last_added_blocks.exists ());
 
8727
@@ -5654,7 +5678,7 @@
 
8728
 
 
8729
   jump = find_new_jump (src, NULL, prev_max_uid);
 
8730
   if (jump)
 
8731
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
8732
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
 
8733
 
 
8734
   /* Only update dominator info when we don't have unreachable blocks.
 
8735
      Otherwise we'll update in maybe_tidy_empty_bb.  */
 
8736
Index: gcc/fortran/interface.c
 
8737
===================================================================
 
8738
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_8_3_release)
 
8739
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_8-branch)
 
8740
@@ -1923,7 +1923,7 @@
 
8741
   /* F2008, 12.5.2.5; IR F08/0073.  */
 
8742
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
 
8743
       && ((CLASS_DATA (formal)->attr.class_pointer
 
8744
-          && !formal->attr.intent == INTENT_IN)
 
8745
+          && formal->attr.intent != INTENT_IN)
 
8746
           || CLASS_DATA (formal)->attr.allocatable))
 
8747
     {
 
8748
       if (actual->ts.type != BT_CLASS)
 
8749
Index: gcc/fortran/trans-expr.c
 
8750
===================================================================
 
8751
--- a/src/gcc/fortran/trans-expr.c      (.../tags/gcc_4_8_3_release)
 
8752
+++ b/src/gcc/fortran/trans-expr.c      (.../branches/gcc-4_8-branch)
 
8753
@@ -7096,7 +7096,7 @@
 
8754
 
 
8755
   res_desc = gfc_evaluate_now (desc, &se->pre);
 
8756
   gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
 
8757
-  se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
 
8758
+  se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
 
8759
 
 
8760
   /* Free the lhs after the function call and copy the result data to
 
8761
      the lhs descriptor.  */
 
8762
Index: gcc/fortran/decl.c
 
8763
===================================================================
 
8764
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_8_3_release)
 
8765
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_8-branch)
 
8766
@@ -1996,6 +1996,13 @@
 
8767
       if (gfc_notify_std (GFC_STD_GNU, "Old-style "
 
8768
                          "initialization at %C") == FAILURE)
 
8769
        return MATCH_ERROR;
 
8770
+      else if (gfc_current_state () == COMP_DERIVED)
 
8771
+       {
 
8772
+         gfc_error ("Invalid old style initialization for derived type "
 
8773
+                    "component at %C");
 
8774
+         m = MATCH_ERROR;
 
8775
+         goto cleanup;
 
8776
+       }
 
8777
 
 
8778
       return match_old_style_init (name);
 
8779
     }
 
8780
Index: gcc/fortran/trans-openmp.c
 
8781
===================================================================
 
8782
--- a/src/gcc/fortran/trans-openmp.c    (.../tags/gcc_4_8_3_release)
 
8783
+++ b/src/gcc/fortran/trans-openmp.c    (.../branches/gcc-4_8-branch)
 
8784
@@ -115,6 +115,16 @@
 
8785
   if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
 
8786
     return OMP_CLAUSE_DEFAULT_SHARED;
 
8787
 
 
8788
+  /* These are either array or derived parameters, or vtables.
 
8789
+     In the former cases, the OpenMP standard doesn't consider them to be
 
8790
+     variables at all (they can't be redefined), but they can nevertheless appear
 
8791
+     in parallel/task regions and for default(none) purposes treat them as shared.
 
8792
+     For vtables likely the same handling is desirable.  */
 
8793
+  if (TREE_CODE (decl) == VAR_DECL
 
8794
+      && TREE_READONLY (decl)
 
8795
+      && TREE_STATIC (decl))
 
8796
+    return OMP_CLAUSE_DEFAULT_SHARED;
 
8797
+
 
8798
   return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
 
8799
 }
 
8800
 
 
8801
@@ -1217,6 +1227,18 @@
 
8802
     }
 
8803
 
 
8804
   lhsaddr = save_expr (lhsaddr);
 
8805
+  if (TREE_CODE (lhsaddr) != SAVE_EXPR
 
8806
+      && (TREE_CODE (lhsaddr) != ADDR_EXPR
 
8807
+         || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
 
8808
+    {
 
8809
+      /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
 
8810
+        it even after unsharing function body.  */
 
8811
+      tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
 
8812
+      DECL_CONTEXT (var) = current_function_decl;
 
8813
+      lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
 
8814
+                       NULL_TREE, NULL_TREE);
 
8815
+    }
 
8816
+
 
8817
   rhs = gfc_evaluate_now (rse.expr, &block);
 
8818
 
 
8819
   if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
 
8820
Index: gcc/fortran/ChangeLog
 
8821
===================================================================
 
8822
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
8823
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
 
8824
@@ -1,3 +1,72 @@
 
8825
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
8826
+
 
8827
+       Backported from mainline
 
8828
+       2014-11-24  Jakub Jelinek  <jakub@redhat.com>
 
8829
+
 
8830
+       PR fortran/63938
 
8831
+       * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
 
8832
+       simple enough for goa_lhs_expr_p.
 
8833
+
 
8834
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
8835
+
 
8836
+       PR fortran/59488
 
8837
+       * trans-openmp.c (gfc_omp_predetermined_sharing): Return
 
8838
+       OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
 
8839
+
 
8840
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
8841
+
 
8842
+       Backport from trunk
 
8843
+       PR fortran/62270
 
8844
+       * interface.c (compare_parameter): Fix condition.
 
8845
+
 
8846
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
8847
+
 
8848
+       Backport from trunk
 
8849
+       PR fortran/62214
 
8850
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
8851
+
 
8852
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
8853
+
 
8854
+       Backport from trunk
 
8855
+       PR fortran/61999
 
8856
+       * simplify.c (gfc_simplify_dot_product): Convert types of
 
8857
+       vectors before calculating the result.
 
8858
+
 
8859
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
8860
+
 
8861
+       Backport from trunk.
 
8862
+       PR fortran/61780
 
8863
+       * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
 
8864
+       that elements are skipped. This then correctly aligns 'reverse'
 
8865
+       with the scalarizer loops.
 
8866
+
 
8867
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
8868
+
 
8869
+       PR fortran/61459
 
8870
+       PR fortran/58883
 
8871
+       * trans-expr.c (fcncall_realloc_result): Use the natural type
 
8872
+       for the address expression of 'res_desc'.
 
8873
+
 
8874
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
8875
+           Fritz Reese  <Reese-Fritz@zai.com>
 
8876
+
 
8877
+       * decl.c (variable_decl): Reject old style initialization
 
8878
+       for derived type components.
 
8879
+
 
8880
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
8881
+
 
8882
+       Backport from trunk.
 
8883
+       PR fortran/45187
 
8884
+       * trans-decl.c (gfc_create_module_variable): Don't create
 
8885
+       Cray-pointee decls twice.
 
8886
+
 
8887
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
8888
+
 
8889
+       Backport from mainline
 
8890
+       PR libfortran/61310
 
8891
+       * intrinsics.texi (CTIME): Remove mention of locale-dependent
 
8892
+       behavior.
 
8893
+
 
8894
 2014-05-22  Release Manager
 
8895
 
 
8896
        * GCC 4.8.3 released.
 
8897
Index: gcc/fortran/frontend-passes.c
 
8898
===================================================================
 
8899
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
 
8900
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
 
8901
@@ -874,6 +874,10 @@
 
8902
            return true;
 
8903
          break;
 
8904
 
 
8905
+       case INTRINSIC_CONCAT:
 
8906
+         /* Do not do string concatenations.  */
 
8907
+         break;
 
8908
+
 
8909
        default:
 
8910
          /* Binary operators.  */
 
8911
          if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
 
8912
Index: gcc/fortran/trans-decl.c
 
8913
===================================================================
 
8914
--- a/src/gcc/fortran/trans-decl.c      (.../tags/gcc_4_8_3_release)
 
8915
+++ b/src/gcc/fortran/trans-decl.c      (.../branches/gcc-4_8-branch)
 
8916
@@ -4084,8 +4084,8 @@
 
8917
     }
 
8918
 
 
8919
   /* Don't generate variables from other modules. Variables from
 
8920
-     COMMONs will already have been generated.  */
 
8921
-  if (sym->attr.use_assoc || sym->attr.in_common)
 
8922
+     COMMONs and Cray pointees will already have been generated.  */
 
8923
+  if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
 
8924
     return;
 
8925
 
 
8926
   /* Equivalenced variables arrive here after creation.  */
 
8927
Index: gcc/fortran/dependency.c
 
8928
===================================================================
 
8929
--- a/src/gcc/fortran/dependency.c      (.../tags/gcc_4_8_3_release)
 
8930
+++ b/src/gcc/fortran/dependency.c      (.../branches/gcc-4_8-branch)
 
8931
@@ -1779,6 +1779,7 @@
 
8932
 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
 
8933
 {
 
8934
   int n;
 
8935
+  int m;
 
8936
   gfc_dependency fin_dep;
 
8937
   gfc_dependency this_dep;
 
8938
 
 
8939
@@ -1828,6 +1829,8 @@
 
8940
              break;
 
8941
            }
 
8942
 
 
8943
+         /* Index for the reverse array.  */
 
8944
+         m = -1;
 
8945
          for (n=0; n < lref->u.ar.dimen; n++)
 
8946
            {
 
8947
              /* Assume dependency when either of array reference is vector
 
8948
@@ -1862,31 +1865,37 @@
 
8949
                 The ability to reverse or not is set by previous conditions
 
8950
                 in this dimension.  If reversal is not activated, the
 
8951
                 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP.  */
 
8952
+
 
8953
+             /* Get the indexing right for the scalarizing loop. If this
 
8954
+                is an element, there is no corresponding loop.  */
 
8955
+             if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
 
8956
+               m++;
 
8957
+
 
8958
              if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
 
8959
                    && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
 
8960
                {
 
8961
                  /* Set reverse if backward dependence and not inhibited.  */
 
8962
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
8963
-                   reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
 
8964
-                                GFC_REVERSE_SET : reverse[n];
 
8965
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
8966
+                   reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
 
8967
+                                GFC_REVERSE_SET : reverse[m];
 
8968
 
 
8969
                  /* Set forward if forward dependence and not inhibited.  */
 
8970
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
8971
-                   reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
 
8972
-                                GFC_FORWARD_SET : reverse[n];
 
8973
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
8974
+                   reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
 
8975
+                                GFC_FORWARD_SET : reverse[m];
 
8976
 
 
8977
                  /* Flag up overlap if dependence not compatible with
 
8978
                     the overall state of the expression.  */
 
8979
-                 if (reverse && reverse[n] == GFC_REVERSE_SET
 
8980
+                 if (reverse && reverse[m] == GFC_REVERSE_SET
 
8981
                        && this_dep == GFC_DEP_FORWARD)
 
8982
                    {
 
8983
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
8984
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
8985
                      this_dep = GFC_DEP_OVERLAP;
 
8986
                    }
 
8987
-                 else if (reverse && reverse[n] == GFC_FORWARD_SET
 
8988
+                 else if (reverse && reverse[m] == GFC_FORWARD_SET
 
8989
                        && this_dep == GFC_DEP_BACKWARD)
 
8990
                    {
 
8991
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
8992
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
8993
                      this_dep = GFC_DEP_OVERLAP;
 
8994
                    }
 
8995
 
 
8996
@@ -1893,7 +1902,7 @@
 
8997
                  /* If no intention of reversing or reversing is explicitly
 
8998
                     inhibited, convert backward dependence to overlap.  */
 
8999
                  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
 
9000
-                     || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
 
9001
+                     || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
 
9002
                    this_dep = GFC_DEP_OVERLAP;
 
9003
                }
 
9004
 
 
9005
Index: gcc/fortran/simplify.c
 
9006
===================================================================
 
9007
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_8_3_release)
 
9008
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_8-branch)
 
9009
@@ -1877,6 +1877,9 @@
 
9010
 gfc_expr*
 
9011
 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
 
9012
 {
 
9013
+
 
9014
+  gfc_expr temp;
 
9015
+
 
9016
   if (!is_constant_array_expr (vector_a)
 
9017
       || !is_constant_array_expr (vector_b))
 
9018
     return NULL;
 
9019
@@ -1883,8 +1886,14 @@
 
9020
 
 
9021
   gcc_assert (vector_a->rank == 1);
 
9022
   gcc_assert (vector_b->rank == 1);
 
9023
-  gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
 
9024
 
 
9025
+  temp.expr_type = EXPR_OP;
 
9026
+  gfc_clear_ts (&temp.ts);
 
9027
+  temp.value.op.op = INTRINSIC_NONE;
 
9028
+  temp.value.op.op1 = vector_a;
 
9029
+  temp.value.op.op2 = vector_b;
 
9030
+  gfc_type_convert_binary (&temp, 1);
 
9031
+
 
9032
   return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
 
9033
 }
 
9034
 
 
9035
Index: gcc/configure.ac
 
9036
===================================================================
 
9037
--- a/src/gcc/configure.ac      (.../tags/gcc_4_8_3_release)
 
9038
+++ b/src/gcc/configure.ac      (.../branches/gcc-4_8-branch)
 
9039
@@ -3443,6 +3443,32 @@
 
9040
 AC_MSG_RESULT($gcc_cv_lto_plugin)
 
9041
 
 
9042
 case "$target" in
 
9043
+
 
9044
+  aarch64*-*-*)
 
9045
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
9046
+    AC_ARG_ENABLE(fix-cortex-a53-835769,
 
9047
+    [
 
9048
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
 
9049
+        [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
9050
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
 
9051
+        [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
9052
+    ],
 
9053
+      [
 
9054
+        case $enableval in
 
9055
+          yes)
 
9056
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
9057
+            ;;
 
9058
+          no)
 
9059
+            ;;
 
9060
+          *)
 
9061
+            AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
9062
+  Valid choices are 'yes' and 'no'.])
 
9063
+            ;;
 
9064
+
 
9065
+        esac
 
9066
+      ],
 
9067
+    [])
 
9068
+  ;;
 
9069
   # All TARGET_ABI_OSF targets.
 
9070
   alpha*-*-linux* | alpha*-*-*bsd*)
 
9071
     gcc_GAS_CHECK_FEATURE([explicit relocation support],
 
9072
Index: gcc/function.c
 
9073
===================================================================
 
9074
--- a/src/gcc/function.c        (.../tags/gcc_4_8_3_release)
 
9075
+++ b/src/gcc/function.c        (.../branches/gcc-4_8-branch)
 
9076
@@ -1354,9 +1354,13 @@
 
9077
 #define STACK_POINTER_OFFSET   0
 
9078
 #endif
 
9079
 
 
9080
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
 
9081
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
 
9082
+#endif
 
9083
+
 
9084
 /* If not defined, pick an appropriate default for the offset of dynamically
 
9085
    allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
 
9086
-   REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
9087
+   INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
9088
 
 
9089
 #ifndef STACK_DYNAMIC_OFFSET
 
9090
 
 
9091
@@ -1368,12 +1372,12 @@
 
9092
    `crtl->outgoing_args_size'.  Nevertheless, we must allow
 
9093
    for it when allocating stack dynamic objects.  */
 
9094
 
 
9095
-#if defined(REG_PARM_STACK_SPACE)
 
9096
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
9097
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
9098
 ((ACCUMULATE_OUTGOING_ARGS                                                   \
 
9099
   ? (crtl->outgoing_args_size                                \
 
9100
      + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
 
9101
-                                              : REG_PARM_STACK_SPACE (FNDECL))) \
 
9102
+                                              : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
 
9103
   : 0) + (STACK_POINTER_OFFSET))
 
9104
 #else
 
9105
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
9106
@@ -2211,8 +2215,9 @@
 
9107
 #endif
 
9108
   all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
 
9109
 
 
9110
-#ifdef REG_PARM_STACK_SPACE
 
9111
-  all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
 
9112
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
9113
+  all->reg_parm_stack_space
 
9114
+    = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
 
9115
 #endif
 
9116
 }
 
9117
 
 
9118
@@ -4518,6 +4523,7 @@
 
9119
       /* ??? This could be set on a per-function basis by the front-end
 
9120
          but is this worth the hassle?  */
 
9121
       cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
 
9122
+      cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
 
9123
     }
 
9124
 }
 
9125
 
 
9126
Index: gcc/tree-vectorizer.h
 
9127
===================================================================
 
9128
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
 
9129
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
 
9130
@@ -324,9 +324,9 @@
 
9131
 #define LOOP_VINFO_OPERANDS_SWAPPED(L)     (L)->operands_swapped
 
9132
 
 
9133
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
 
9134
-(L)->may_misalign_stmts.length () > 0
 
9135
+((L)->may_misalign_stmts.length () > 0)
 
9136
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)     \
 
9137
-(L)->may_alias_ddrs.length () > 0
 
9138
+((L)->may_alias_ddrs.length () > 0)
 
9139
 
 
9140
 #define NITERS_KNOWN_P(n)                     \
 
9141
 (host_integerp ((n),0)                        \
 
9142
@@ -931,7 +931,8 @@
 
9143
 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
 
9144
 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
 
9145
                                      tree *, gimple_stmt_iterator *,
 
9146
-                                     gimple *, bool, bool *);
 
9147
+                                     gimple *, bool, bool *,
 
9148
+                                     tree = NULL_TREE);
 
9149
 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
 
9150
 extern tree vect_create_destination_var (tree, tree);
 
9151
 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
 
9152
@@ -949,7 +950,8 @@
 
9153
 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
 
9154
 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
 
9155
 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
 
9156
-                                                  tree, struct loop *);
 
9157
+                                                 tree, struct loop *,
 
9158
+                                                 tree = NULL_TREE);
 
9159
 
 
9160
 /* In tree-vect-loop.c.  */
 
9161
 /* FORNOW: Used in tree-parloops.c.  */
 
9162
Index: gcc/stor-layout.c
 
9163
===================================================================
 
9164
--- a/src/gcc/stor-layout.c     (.../tags/gcc_4_8_3_release)
 
9165
+++ b/src/gcc/stor-layout.c     (.../branches/gcc-4_8-branch)
 
9166
@@ -234,12 +234,7 @@
 
9167
       param_type = TREE_TYPE (ref);
 
9168
       param_decl
 
9169
        = build_decl (input_location, PARM_DECL, param_name, param_type);
 
9170
-      if (targetm.calls.promote_prototypes (NULL_TREE)
 
9171
-         && INTEGRAL_TYPE_P (param_type)
 
9172
-         && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
 
9173
-       DECL_ARG_TYPE (param_decl) = integer_type_node;
 
9174
-      else
 
9175
-       DECL_ARG_TYPE (param_decl) = param_type;
 
9176
+      DECL_ARG_TYPE (param_decl) = param_type;
 
9177
       DECL_ARTIFICIAL (param_decl) = 1;
 
9178
       TREE_READONLY (param_decl) = 1;
 
9179
 
 
9180
Index: gcc/tree-vect-loop.c
 
9181
===================================================================
 
9182
--- a/src/gcc/tree-vect-loop.c  (.../tags/gcc_4_8_3_release)
 
9183
+++ b/src/gcc/tree-vect-loop.c  (.../branches/gcc-4_8-branch)
 
9184
@@ -2205,7 +2205,8 @@
 
9185
         }
 
9186
 
 
9187
       def1 = SSA_NAME_DEF_STMT (op1);
 
9188
-      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
9189
+      if (gimple_bb (def1)
 
9190
+         && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
9191
           && loop->inner
 
9192
           && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
 
9193
           && is_gimple_assign (def1))
 
9194
Index: gcc/tree-data-ref.c
 
9195
===================================================================
 
9196
--- a/src/gcc/tree-data-ref.c   (.../tags/gcc_4_8_3_release)
 
9197
+++ b/src/gcc/tree-data-ref.c   (.../branches/gcc-4_8-branch)
 
9198
@@ -919,7 +919,6 @@
 
9199
          ref = fold_build2_loc (EXPR_LOCATION (ref),
 
9200
                                 MEM_REF, TREE_TYPE (ref),
 
9201
                                 base, memoff);
 
9202
-         DR_UNCONSTRAINED_BASE (dr) = true;
 
9203
          access_fns.safe_push (access_fn);
 
9204
        }
 
9205
     }
 
9206
@@ -1326,14 +1325,20 @@
 
9207
        return false;
 
9208
     }
 
9209
 
 
9210
-  /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
 
9211
-     the size of the base-object.  So we cannot do any offset/overlap
 
9212
-     based analysis but have to rely on points-to information only.  */
 
9213
+  /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
 
9214
+     do not know the size of the base-object.  So we cannot do any
 
9215
+     offset/overlap based analysis but have to rely on points-to
 
9216
+     information only.  */
 
9217
   if (TREE_CODE (addr_a) == MEM_REF
 
9218
-      && DR_UNCONSTRAINED_BASE (a))
 
9219
+      && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
 
9220
     {
 
9221
-      if (TREE_CODE (addr_b) == MEM_REF
 
9222
-         && DR_UNCONSTRAINED_BASE (b))
 
9223
+      /* For true dependences we can apply TBAA.  */
 
9224
+      if (flag_strict_aliasing
 
9225
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
9226
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
9227
+                                    get_alias_set (DR_REF (b))))
 
9228
+       return false;
 
9229
+      if (TREE_CODE (addr_b) == MEM_REF)
 
9230
        return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
9231
                                       TREE_OPERAND (addr_b, 0));
 
9232
       else
 
9233
@@ -1341,9 +1346,21 @@
 
9234
                                       build_fold_addr_expr (addr_b));
 
9235
     }
 
9236
   else if (TREE_CODE (addr_b) == MEM_REF
 
9237
-          && DR_UNCONSTRAINED_BASE (b))
 
9238
-    return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
9239
-                                  TREE_OPERAND (addr_b, 0));
 
9240
+          && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
 
9241
+    {
 
9242
+      /* For true dependences we can apply TBAA.  */
 
9243
+      if (flag_strict_aliasing
 
9244
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
9245
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
9246
+                                    get_alias_set (DR_REF (b))))
 
9247
+       return false;
 
9248
+      if (TREE_CODE (addr_a) == MEM_REF)
 
9249
+       return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
9250
+                                      TREE_OPERAND (addr_b, 0));
 
9251
+      else
 
9252
+       return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
9253
+                                      TREE_OPERAND (addr_b, 0));
 
9254
+    }
 
9255
 
 
9256
   /* Otherwise DR_BASE_OBJECT is an access that covers the whole object
 
9257
      that is being subsetted in the loop nest.  */
 
9258
Index: gcc/tree-data-ref.h
 
9259
===================================================================
 
9260
--- a/src/gcc/tree-data-ref.h   (.../tags/gcc_4_8_3_release)
 
9261
+++ b/src/gcc/tree-data-ref.h   (.../branches/gcc-4_8-branch)
 
9262
@@ -81,10 +81,6 @@
 
9263
 
 
9264
   /* A list of chrecs.  Access functions of the indices.  */
 
9265
   vec<tree> access_fns;
 
9266
-
 
9267
-  /* Whether BASE_OBJECT is an access representing the whole object
 
9268
-     or whether the access could not be constrained.  */
 
9269
-  bool unconstrained_base;
 
9270
 };
 
9271
 
 
9272
 struct dr_alias
 
9273
@@ -195,7 +191,6 @@
 
9274
 #define DR_STMT(DR)                (DR)->stmt
 
9275
 #define DR_REF(DR)                 (DR)->ref
 
9276
 #define DR_BASE_OBJECT(DR)         (DR)->indices.base_object
 
9277
-#define DR_UNCONSTRAINED_BASE(DR)  (DR)->indices.unconstrained_base
 
9278
 #define DR_ACCESS_FNS(DR)         (DR)->indices.access_fns
 
9279
 #define DR_ACCESS_FN(DR, I)        DR_ACCESS_FNS (DR)[I]
 
9280
 #define DR_NUM_DIMENSIONS(DR)      DR_ACCESS_FNS (DR).length ()
 
9281
Index: gcc/tree-vect-data-refs.c
 
9282
===================================================================
 
9283
--- a/src/gcc/tree-vect-data-refs.c     (.../tags/gcc_4_8_3_release)
 
9284
+++ b/src/gcc/tree-vect-data-refs.c     (.../branches/gcc-4_8-branch)
 
9285
@@ -3553,6 +3553,9 @@
 
9286
            is as follows:
 
9287
            if LOOP=i_loop:     &in             (relative to i_loop)
 
9288
            if LOOP=j_loop:     &in+i*2B        (relative to j_loop)
 
9289
+   BYTE_OFFSET: Optional, defaulted to NULL.  If supplied, it is added to the
 
9290
+           initial address.  Unlike OFFSET, which is number of elements to
 
9291
+           be added, BYTE_OFFSET is measured in bytes.
 
9292
 
 
9293
    Output:
 
9294
    1. Return an SSA_NAME whose value is the address of the memory location of
 
9295
@@ -3566,7 +3569,8 @@
 
9296
 vect_create_addr_base_for_vector_ref (gimple stmt,
 
9297
                                      gimple_seq *new_stmt_list,
 
9298
                                      tree offset,
 
9299
-                                     struct loop *loop)
 
9300
+                                     struct loop *loop,
 
9301
+                                     tree byte_offset)
 
9302
 {
 
9303
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
9304
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
 
9305
@@ -3628,7 +3632,17 @@
 
9306
       base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
9307
       gimple_seq_add_seq (new_stmt_list, seq);
 
9308
     }
 
9309
+  if (byte_offset)
 
9310
+    {
 
9311
+      tree tmp = create_tmp_var (sizetype, "offset");
 
9312
 
 
9313
+      byte_offset = fold_convert (sizetype, byte_offset);
 
9314
+      base_offset = fold_build2 (PLUS_EXPR, sizetype,
 
9315
+                                base_offset, byte_offset);
 
9316
+      base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
9317
+      gimple_seq_add_seq (new_stmt_list, seq);
 
9318
+    }
 
9319
+
 
9320
   /* base + base_offset */
 
9321
   if (loop_vinfo)
 
9322
     addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
 
9323
@@ -3692,6 +3706,10 @@
 
9324
    5. BSI: location where the new stmts are to be placed if there is no loop
 
9325
    6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
 
9326
         pointing to the initial address.
 
9327
+   7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
 
9328
+       to the initial address accessed by the data-ref in STMT.  This is
 
9329
+       similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
 
9330
+       in bytes.
 
9331
 
 
9332
    Output:
 
9333
    1. Declare a new ptr to vector_type, and have it point to the base of the
 
9334
@@ -3705,6 +3723,8 @@
 
9335
          initial_address = &a[init];
 
9336
       if OFFSET is supplied:
 
9337
          initial_address = &a[init + OFFSET];
 
9338
+      if BYTE_OFFSET is supplied:
 
9339
+        initial_address = &a[init] + BYTE_OFFSET;
 
9340
 
 
9341
       Return the initial_address in INITIAL_ADDRESS.
 
9342
 
 
9343
@@ -3722,7 +3742,7 @@
 
9344
 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
 
9345
                          tree offset, tree *initial_address,
 
9346
                          gimple_stmt_iterator *gsi, gimple *ptr_incr,
 
9347
-                         bool only_init, bool *inv_p)
 
9348
+                         bool only_init, bool *inv_p, tree byte_offset)
 
9349
 {
 
9350
   const char *base_name;
 
9351
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
9352
@@ -3881,10 +3901,10 @@
 
9353
   /* (2) Calculate the initial address of the aggregate-pointer, and set
 
9354
      the aggregate-pointer to point to it before the loop.  */
 
9355
 
 
9356
-  /* Create: (&(base[init_val+offset]) in the loop preheader.  */
 
9357
+  /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader.  */
 
9358
 
 
9359
   new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
 
9360
-                                                   offset, loop);
 
9361
+                                                  offset, loop, byte_offset);
 
9362
   if (new_stmt_list)
 
9363
     {
 
9364
       if (pe)
 
9365
Index: gcc/emit-rtl.c
 
9366
===================================================================
 
9367
--- a/src/gcc/emit-rtl.c        (.../tags/gcc_4_8_3_release)
 
9368
+++ b/src/gcc/emit-rtl.c        (.../branches/gcc-4_8-branch)
 
9369
@@ -263,7 +263,7 @@
 
9370
 
 
9371
 /* Return true if the given memory attributes are equal.  */
 
9372
 
 
9373
-static bool
 
9374
+bool
 
9375
 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
 
9376
 {
 
9377
   return (p->alias == q->alias
 
9378
Index: gcc/gimple-fold.c
 
9379
===================================================================
 
9380
--- a/src/gcc/gimple-fold.c     (.../tags/gcc_4_8_3_release)
 
9381
+++ b/src/gcc/gimple-fold.c     (.../branches/gcc-4_8-branch)
 
9382
@@ -2955,8 +2955,8 @@
 
9383
      result.  */
 
9384
   if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
 
9385
       /* VIEW_CONVERT_EXPR is defined only for matching sizes.  */
 
9386
-      && operand_equal_p (TYPE_SIZE (type),
 
9387
-                         TYPE_SIZE (TREE_TYPE (ctor)), 0))
 
9388
+      && !compare_tree_int (TYPE_SIZE (type), size)
 
9389
+      && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
 
9390
     {
 
9391
       ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
 
9392
       ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
 
9393
Index: gcc/emit-rtl.h
 
9394
===================================================================
 
9395
--- a/src/gcc/emit-rtl.h        (.../tags/gcc_4_8_3_release)
 
9396
+++ b/src/gcc/emit-rtl.h        (.../branches/gcc-4_8-branch)
 
9397
@@ -20,6 +20,9 @@
 
9398
 #ifndef GCC_EMIT_RTL_H
 
9399
 #define GCC_EMIT_RTL_H
 
9400
 
 
9401
+/* Return whether two MEM_ATTRs are equal.  */
 
9402
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
 
9403
+
 
9404
 /* Set the alias set of MEM to SET.  */
 
9405
 extern void set_mem_alias_set (rtx, alias_set_type);
 
9406
 
 
9407
Index: gcc/tree-cfgcleanup.c
 
9408
===================================================================
 
9409
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
 
9410
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
 
9411
@@ -498,7 +498,20 @@
 
9412
 
 
9413
   /* First split basic block if stmt is not last.  */
 
9414
   if (stmt != gsi_stmt (gsi_last_bb (bb)))
 
9415
-    split_block (bb, stmt);
 
9416
+    {
 
9417
+      if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
 
9418
+       {
 
9419
+         /* Don't split if there are only debug stmts
 
9420
+            after stmt, that can result in -fcompare-debug
 
9421
+            failures.  Remove the debug stmts instead,
 
9422
+            they should be all unreachable anyway.  */
 
9423
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
 
9424
+         for (gsi_next (&gsi); !gsi_end_p (gsi); )
 
9425
+           gsi_remove (&gsi, true);
 
9426
+       }
 
9427
+      else
 
9428
+       split_block (bb, stmt);
 
9429
+    }
 
9430
 
 
9431
   changed |= remove_fallthru_edge (bb->succs);
 
9432
 
 
9433
Index: gcc/tree-sra.c
 
9434
===================================================================
 
9435
--- a/src/gcc/tree-sra.c        (.../tags/gcc_4_8_3_release)
 
9436
+++ b/src/gcc/tree-sra.c        (.../branches/gcc-4_8-branch)
 
9437
@@ -1030,6 +1030,11 @@
 
9438
                               "component.");
 
9439
       return NULL;
 
9440
     }
 
9441
+  if (TREE_THIS_VOLATILE (expr))
 
9442
+    {
 
9443
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
 
9444
+      return NULL;
 
9445
+    }
 
9446
 
 
9447
   switch (TREE_CODE (expr))
 
9448
     {
 
9449
Index: gcc/common.opt
 
9450
===================================================================
 
9451
--- a/src/gcc/common.opt        (.../tags/gcc_4_8_3_release)
 
9452
+++ b/src/gcc/common.opt        (.../branches/gcc-4_8-branch)
 
9453
@@ -1226,6 +1226,10 @@
 
9454
 Common Report Var(flag_tm)
 
9455
 Enable support for GNU transactional memory
 
9456
 
 
9457
+fgnu-unique
 
9458
+Common Report Var(flag_gnu_unique) Init(1)
 
9459
+Use STB_GNU_UNIQUE if supported by the assembler
 
9460
+
 
9461
 floop-flatten
 
9462
 Common Ignore
 
9463
 Does nothing. Preserved for backward compatibility.
 
9464
Index: gcc/tree-vect-patterns.c
 
9465
===================================================================
 
9466
--- a/src/gcc/tree-vect-patterns.c      (.../tags/gcc_4_8_3_release)
 
9467
+++ b/src/gcc/tree-vect-patterns.c      (.../branches/gcc-4_8-branch)
 
9468
@@ -395,7 +395,7 @@
 
9469
           || !promotion)
 
9470
         return NULL;
 
9471
       oprnd00 = gimple_assign_rhs1 (def_stmt);
 
9472
-      if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
 
9473
+      if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
 
9474
                                 &promotion)
 
9475
           || !promotion)
 
9476
         return NULL;
 
9477
Index: gcc/sched-deps.c
 
9478
===================================================================
 
9479
--- a/src/gcc/sched-deps.c      (.../tags/gcc_4_8_3_release)
 
9480
+++ b/src/gcc/sched-deps.c      (.../branches/gcc-4_8-branch)
 
9481
@@ -2744,7 +2744,8 @@
 
9482
           Consider for instance a volatile asm that changes the fpu rounding
 
9483
           mode.  An insn should not be moved across this even if it only uses
 
9484
           pseudo-regs because it might give an incorrectly rounded result.  */
 
9485
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
9486
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
9487
+           && !DEBUG_INSN_P (insn))
 
9488
          reg_pending_barrier = TRUE_BARRIER;
 
9489
 
 
9490
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
 
9491
Index: gcc/tree-vect-stmts.c
 
9492
===================================================================
 
9493
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
 
9494
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
 
9495
@@ -4319,6 +4319,7 @@
 
9496
   int i, j, group_size;
 
9497
   tree msq = NULL_TREE, lsq;
 
9498
   tree offset = NULL_TREE;
 
9499
+  tree byte_offset = NULL_TREE;
 
9500
   tree realignment_token = NULL_TREE;
 
9501
   gimple phi = NULL;
 
9502
   vec<tree> dr_chain = vNULL;
 
9503
@@ -4934,7 +4935,8 @@
 
9504
       if (alignment_support_scheme == dr_explicit_realign_optimized)
 
9505
        {
 
9506
          phi = SSA_NAME_DEF_STMT (msq);
 
9507
-         offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
 
9508
+         byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
 
9509
+                                   size_one_node);
 
9510
        }
 
9511
     }
 
9512
   else
 
9513
@@ -4955,7 +4957,8 @@
 
9514
       if (j == 0)
 
9515
         dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
 
9516
                                                offset, &dummy, gsi,
 
9517
-                                               &ptr_incr, false, &inv_p);
 
9518
+                                               &ptr_incr, false, &inv_p,
 
9519
+                                               byte_offset);
 
9520
       else
 
9521
         dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
 
9522
                                       TYPE_SIZE_UNIT (aggr_type));
 
9523
Index: gcc/config.gcc
 
9524
===================================================================
 
9525
--- a/src/gcc/config.gcc        (.../tags/gcc_4_8_3_release)
 
9526
+++ b/src/gcc/config.gcc        (.../branches/gcc-4_8-branch)
 
9527
@@ -2466,7 +2466,7 @@
 
9528
        ;;
 
9529
 sparc-*-rtems*)
 
9530
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
 
9531
-       tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
 
9532
+       tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
 
9533
        ;;
 
9534
 sparc-*-linux*)
 
9535
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
 
9536
@@ -2992,6 +2992,9 @@
 
9537
        *-leon[3-9]*)
 
9538
          with_cpu=leon3
 
9539
          ;;
 
9540
+       *-leon[3-9]v7*)
 
9541
+         with_cpu=leon3v7
 
9542
+         ;;
 
9543
        *)
 
9544
          with_cpu="`echo ${target} | sed 's/-.*$//'`"
 
9545
          ;;
 
9546
@@ -3630,7 +3633,7 @@
 
9547
                        case ${val} in
 
9548
                        "" | sparc | sparcv9 | sparc64 \
 
9549
                        | v7 | cypress \
 
9550
-                       | v8 | supersparc | hypersparc | leon | leon3 \
 
9551
+                       | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
 
9552
                        | sparclite | f930 | f934 | sparclite86x \
 
9553
                        | sparclet | tsc701 \
 
9554
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
 
9555
Index: gcc/ree.c
 
9556
===================================================================
 
9557
--- a/src/gcc/ree.c     (.../tags/gcc_4_8_3_release)
 
9558
+++ b/src/gcc/ree.c     (.../branches/gcc-4_8-branch)
 
9559
@@ -261,6 +261,50 @@
 
9560
 
 
9561
 static int max_insn_uid;
 
9562
 
 
9563
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN.  */
 
9564
+
 
9565
+static bool
 
9566
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
 
9567
+                             enum machine_mode old_mode, enum rtx_code code)
 
9568
+{
 
9569
+  rtx *loc = &REG_NOTES (insn);
 
9570
+  while (*loc)
 
9571
+    {
 
9572
+      enum reg_note kind = REG_NOTE_KIND (*loc);
 
9573
+      if (kind == REG_EQUAL || kind == REG_EQUIV)
 
9574
+       {
 
9575
+         rtx orig_src = XEXP (*loc, 0);
 
9576
+         /* Update equivalency constants.  Recall that RTL constants are
 
9577
+            sign-extended.  */
 
9578
+         if (GET_CODE (orig_src) == CONST_INT
 
9579
+             && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
 
9580
+           {
 
9581
+             if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
 
9582
+               /* Nothing needed.  */;
 
9583
+             else
 
9584
+               {
 
9585
+                 /* Zero-extend the negative constant by masking out the
 
9586
+                    bits outside the source mode.  */
 
9587
+                 rtx new_const_int
 
9588
+                   = gen_int_mode (INTVAL (orig_src)
 
9589
+                                   & GET_MODE_MASK (old_mode),
 
9590
+                                   new_mode);
 
9591
+                 if (!validate_change (insn, &XEXP (*loc, 0),
 
9592
+                                       new_const_int, true))
 
9593
+                   return false;
 
9594
+               }
 
9595
+             loc = &XEXP (*loc, 1);
 
9596
+           }
 
9597
+         /* Drop all other notes, they assume a wrong mode.  */
 
9598
+         else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
 
9599
+           return false;
 
9600
+       }
 
9601
+      else
 
9602
+       loc = &XEXP (*loc, 1);
 
9603
+    }
 
9604
+  return true;
 
9605
+}
 
9606
+
 
9607
 /* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
 
9608
    and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
 
9609
    this code modifies the SET rtx to a new SET rtx that extends the
 
9610
@@ -282,6 +326,7 @@
 
9611
 combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
 
9612
 {
 
9613
   rtx orig_src = SET_SRC (*orig_set);
 
9614
+  enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
 
9615
   rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
 
9616
   rtx new_set;
 
9617
 
 
9618
@@ -296,9 +341,8 @@
 
9619
        {
 
9620
          /* Zero-extend the negative constant by masking out the bits outside
 
9621
             the source mode.  */
 
9622
-         enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
 
9623
          rtx new_const_int
 
9624
-           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
 
9625
+           = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
 
9626
          new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
 
9627
        }
 
9628
     }
 
9629
@@ -336,7 +380,9 @@
 
9630
 
 
9631
   /* This change is a part of a group of changes.  Hence,
 
9632
      validate_change will not try to commit the change.  */
 
9633
-  if (validate_change (curr_insn, orig_set, new_set, true))
 
9634
+  if (validate_change (curr_insn, orig_set, new_set, true)
 
9635
+      && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
 
9636
+                                      cand->code))
 
9637
     {
 
9638
       if (dump_file)
 
9639
         {
 
9640
@@ -385,7 +431,9 @@
 
9641
   ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
 
9642
   new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
 
9643
 
 
9644
-  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
 
9645
+  if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
 
9646
+      && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
 
9647
+                                      cand->code))
 
9648
     {
 
9649
       if (dump_file)
 
9650
         {
 
9651
Index: gcc/config/alpha/elf.h
 
9652
===================================================================
 
9653
--- a/src/gcc/config/alpha/elf.h        (.../tags/gcc_4_8_3_release)
 
9654
+++ b/src/gcc/config/alpha/elf.h        (.../branches/gcc-4_8-branch)
 
9655
@@ -126,6 +126,10 @@
 
9656
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
 
9657
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
9658
 
 
9659
+/* This variable should be set to 'true' if the target ABI requires
 
9660
+   unwinding tables even when exceptions are not used.  */
 
9661
+#define TARGET_UNWIND_TABLES_DEFAULT true
 
9662
+
 
9663
 /* Select a format to encode pointers in exception handling data.  CODE
 
9664
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
 
9665
    true if the symbol may be affected by dynamic relocations.
 
9666
Index: gcc/config/alpha/alpha.c
 
9667
===================================================================
 
9668
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_8_3_release)
 
9669
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_8-branch)
 
9670
@@ -8658,6 +8658,11 @@
 
9671
                        }
 
9672
                      break;
 
9673
 
 
9674
+                   case BARRIER:
 
9675
+                     /* __builtin_unreachable can expand to no code at all,
 
9676
+                        leaving (barrier) RTXes in the instruction stream.  */
 
9677
+                     goto close_shadow_notrapb;
 
9678
+
 
9679
                    case JUMP_INSN:
 
9680
                    case CALL_INSN:
 
9681
                    case CODE_LABEL:
 
9682
@@ -8673,6 +8678,7 @@
 
9683
                  n = emit_insn_before (gen_trapb (), i);
 
9684
                  PUT_MODE (n, TImode);
 
9685
                  PUT_MODE (i, TImode);
 
9686
+               close_shadow_notrapb:
 
9687
                  trap_pending = 0;
 
9688
                  shadow.used.i = 0;
 
9689
                  shadow.used.fp = 0;
 
9690
Index: gcc/config/elfos.h
 
9691
===================================================================
 
9692
--- a/src/gcc/config/elfos.h    (.../tags/gcc_4_8_3_release)
 
9693
+++ b/src/gcc/config/elfos.h    (.../branches/gcc-4_8-branch)
 
9694
@@ -287,7 +287,7 @@
 
9695
 /* Write the extra assembler code needed to declare an object properly.  */
 
9696
 
 
9697
 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
 
9698
-#define USE_GNU_UNIQUE_OBJECT 1
 
9699
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
 
9700
 #else
 
9701
 #define USE_GNU_UNIQUE_OBJECT 0
 
9702
 #endif
 
9703
Index: gcc/config/sparc/t-rtems
 
9704
===================================================================
 
9705
--- a/src/gcc/config/sparc/t-rtems      (.../tags/gcc_4_8_3_release)
 
9706
+++ b/src/gcc/config/sparc/t-rtems      (.../branches/gcc-4_8-branch)
 
9707
@@ -17,6 +17,15 @@
 
9708
 # <http://www.gnu.org/licenses/>.
 
9709
 #
 
9710
 
 
9711
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
 
9712
-MULTILIB_DIRNAMES = soft v8 leon3
 
9713
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
 
9714
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
 
9715
 MULTILIB_MATCHES = msoft-float=mno-fpu
 
9716
+
 
9717
+MULTILIB_EXCEPTIONS = muser-mode
 
9718
+MULTILIB_EXCEPTIONS += mcpu=leon3
 
9719
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
 
9720
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
 
9721
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
 
9722
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
 
9723
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
 
9724
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
 
9725
Index: gcc/config/sparc/sparc.md
 
9726
===================================================================
 
9727
--- a/src/gcc/config/sparc/sparc.md     (.../tags/gcc_4_8_3_release)
 
9728
+++ b/src/gcc/config/sparc/sparc.md     (.../branches/gcc-4_8-branch)
 
9729
@@ -215,6 +215,7 @@
 
9730
    hypersparc,
 
9731
    leon,
 
9732
    leon3,
 
9733
+   leon3v7,
 
9734
    sparclite,
 
9735
    f930,
 
9736
    f934,
 
9737
Index: gcc/config/sparc/sparc.opt
 
9738
===================================================================
 
9739
--- a/src/gcc/config/sparc/sparc.opt    (.../tags/gcc_4_8_3_release)
 
9740
+++ b/src/gcc/config/sparc/sparc.opt    (.../branches/gcc-4_8-branch)
 
9741
@@ -153,6 +153,9 @@
 
9742
 Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
 
9743
 
 
9744
 EnumValue
 
9745
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
 
9746
+
 
9747
+EnumValue
 
9748
 Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
 
9749
 
 
9750
 EnumValue
 
9751
Index: gcc/config/sparc/sync.md
 
9752
===================================================================
 
9753
--- a/src/gcc/config/sparc/sync.md      (.../tags/gcc_4_8_3_release)
 
9754
+++ b/src/gcc/config/sparc/sync.md      (.../branches/gcc-4_8-branch)
 
9755
@@ -64,11 +64,19 @@
 
9756
   "stbar"
 
9757
   [(set_attr "type" "multi")])
 
9758
 
 
9759
+;; For LEON3, STB has the effect of membar #StoreLoad.
 
9760
+(define_insn "*membar_storeload_leon3"
 
9761
+  [(set (match_operand:BLK 0 "" "")
 
9762
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
9763
+  "TARGET_LEON3"
 
9764
+  "stb\t%%g0, [%%sp-1]"
 
9765
+  [(set_attr "type" "store")])
 
9766
+
 
9767
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
 
9768
 (define_insn "*membar_storeload"
 
9769
   [(set (match_operand:BLK 0 "" "")
 
9770
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
9771
-  "TARGET_V8"
 
9772
+  "TARGET_V8 && !TARGET_LEON3"
 
9773
   "ldstub\t[%%sp-1], %%g0"
 
9774
   [(set_attr "type" "multi")])
 
9775
 
 
9776
Index: gcc/config/sparc/sparc-opts.h
 
9777
===================================================================
 
9778
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
 
9779
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
 
9780
@@ -31,6 +31,7 @@
 
9781
   PROCESSOR_HYPERSPARC,
 
9782
   PROCESSOR_LEON,
 
9783
   PROCESSOR_LEON3,
 
9784
+  PROCESSOR_LEON3V7,
 
9785
   PROCESSOR_SPARCLITE,
 
9786
   PROCESSOR_F930,
 
9787
   PROCESSOR_F934,
 
9788
Index: gcc/config/sparc/sparc.c
 
9789
===================================================================
 
9790
--- a/src/gcc/config/sparc/sparc.c      (.../tags/gcc_4_8_3_release)
 
9791
+++ b/src/gcc/config/sparc/sparc.c      (.../branches/gcc-4_8-branch)
 
9792
@@ -1210,6 +1210,7 @@
 
9793
     { TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
 
9794
     { TARGET_CPU_leon, PROCESSOR_LEON },
 
9795
     { TARGET_CPU_leon3, PROCESSOR_LEON3 },
 
9796
+    { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
 
9797
     { TARGET_CPU_sparclite, PROCESSOR_F930 },
 
9798
     { TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
 
9799
     { TARGET_CPU_sparclet, PROCESSOR_TSC701 },
 
9800
@@ -1238,6 +1239,7 @@
 
9801
     { "hypersparc",    MASK_ISA, MASK_V8|MASK_FPU },
 
9802
     { "leon",          MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
 
9803
     { "leon3",         MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
 
9804
+    { "leon3v7",       MASK_ISA, MASK_LEON3|MASK_FPU },
 
9805
     { "sparclite",     MASK_ISA, MASK_SPARCLITE },
 
9806
     /* The Fujitsu MB86930 is the original sparclite chip, with no FPU.  */
 
9807
     { "f930",          MASK_ISA|MASK_FPU, MASK_SPARCLITE },
 
9808
@@ -1490,6 +1492,7 @@
 
9809
       sparc_costs = &leon_costs;
 
9810
       break;
 
9811
     case PROCESSOR_LEON3:
 
9812
+    case PROCESSOR_LEON3V7:
 
9813
       sparc_costs = &leon3_costs;
 
9814
       break;
 
9815
     case PROCESSOR_SPARCLET:
 
9816
Index: gcc/config/sparc/leon.md
 
9817
===================================================================
 
9818
--- a/src/gcc/config/sparc/leon.md      (.../tags/gcc_4_8_3_release)
 
9819
+++ b/src/gcc/config/sparc/leon.md      (.../branches/gcc-4_8-branch)
 
9820
@@ -29,11 +29,11 @@
 
9821
 
 
9822
 ;; Use a double reservation to work around the load pipeline hazard on UT699.
 
9823
 (define_insn_reservation "leon3_load" 1
 
9824
-  (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
 
9825
+  (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
 
9826
   "leon_memory*2")
 
9827
 
 
9828
 (define_insn_reservation "leon_store" 2
 
9829
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
 
9830
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
 
9831
   "leon_memory*2")
 
9832
 
 
9833
 ;; This describes Gaisler Research's FPU
 
9834
@@ -44,21 +44,21 @@
 
9835
 (define_cpu_unit "grfpu_ds" "grfpu")
 
9836
 
 
9837
 (define_insn_reservation "leon_fp_alu" 4
 
9838
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
 
9839
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
 
9840
   "grfpu_alu, nothing*3")
 
9841
 
 
9842
 (define_insn_reservation "leon_fp_divs" 16
 
9843
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
 
9844
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
 
9845
   "grfpu_ds*14, nothing*2")
 
9846
 
 
9847
 (define_insn_reservation "leon_fp_divd" 17
 
9848
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
 
9849
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
 
9850
   "grfpu_ds*15, nothing*2")
 
9851
 
 
9852
 (define_insn_reservation "leon_fp_sqrts" 24
 
9853
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
 
9854
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
 
9855
   "grfpu_ds*22, nothing*2")
 
9856
 
 
9857
 (define_insn_reservation "leon_fp_sqrtd" 25
 
9858
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
 
9859
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
 
9860
   "grfpu_ds*23, nothing*2")
 
9861
Index: gcc/config/sparc/sparc.h
 
9862
===================================================================
 
9863
--- a/src/gcc/config/sparc/sparc.h      (.../tags/gcc_4_8_3_release)
 
9864
+++ b/src/gcc/config/sparc/sparc.h      (.../branches/gcc-4_8-branch)
 
9865
@@ -137,21 +137,22 @@
 
9866
 #define TARGET_CPU_hypersparc  3
 
9867
 #define TARGET_CPU_leon                4
 
9868
 #define TARGET_CPU_leon3       5
 
9869
-#define TARGET_CPU_sparclite   6
 
9870
-#define TARGET_CPU_f930                6       /* alias */
 
9871
-#define TARGET_CPU_f934                6       /* alias */
 
9872
-#define TARGET_CPU_sparclite86x        7
 
9873
-#define TARGET_CPU_sparclet    8
 
9874
-#define TARGET_CPU_tsc701      8       /* alias */
 
9875
-#define TARGET_CPU_v9          9       /* generic v9 implementation */
 
9876
-#define TARGET_CPU_sparcv9     9       /* alias */
 
9877
-#define TARGET_CPU_sparc64     9       /* alias */
 
9878
-#define TARGET_CPU_ultrasparc  10
 
9879
-#define TARGET_CPU_ultrasparc3 11
 
9880
-#define TARGET_CPU_niagara     12
 
9881
-#define TARGET_CPU_niagara2    13
 
9882
-#define TARGET_CPU_niagara3    14
 
9883
-#define TARGET_CPU_niagara4    15
 
9884
+#define TARGET_CPU_leon3v7     6
 
9885
+#define TARGET_CPU_sparclite   7
 
9886
+#define TARGET_CPU_f930                7       /* alias */
 
9887
+#define TARGET_CPU_f934                7       /* alias */
 
9888
+#define TARGET_CPU_sparclite86x        8
 
9889
+#define TARGET_CPU_sparclet    9
 
9890
+#define TARGET_CPU_tsc701      9       /* alias */
 
9891
+#define TARGET_CPU_v9          10      /* generic v9 implementation */
 
9892
+#define TARGET_CPU_sparcv9     10      /* alias */
 
9893
+#define TARGET_CPU_sparc64     10      /* alias */
 
9894
+#define TARGET_CPU_ultrasparc  11
 
9895
+#define TARGET_CPU_ultrasparc3 12
 
9896
+#define TARGET_CPU_niagara     13
 
9897
+#define TARGET_CPU_niagara2    14
 
9898
+#define TARGET_CPU_niagara3    15
 
9899
+#define TARGET_CPU_niagara4    16
 
9900
 
 
9901
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
 
9902
  || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
 
9903
@@ -239,8 +240,13 @@
 
9904
 #define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
 
9905
 #endif
 
9906
 
 
9907
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
 
9908
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
 
9909
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
 
9910
 #endif
 
9911
 
 
9912
+#endif
 
9913
+
 
9914
 #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
 
9915
  #error Unrecognized value in TARGET_CPU_DEFAULT.
 
9916
 #endif
 
9917
@@ -285,6 +291,7 @@
 
9918
 %{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
 
9919
 %{mcpu=leon:-D__leon__ -D__sparc_v8__} \
 
9920
 %{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
 
9921
+%{mcpu=leon3v7:-D__leon__} \
 
9922
 %{mcpu=v9:-D__sparc_v9__} \
 
9923
 %{mcpu=ultrasparc:-D__sparc_v9__} \
 
9924
 %{mcpu=ultrasparc3:-D__sparc_v9__} \
 
9925
@@ -334,6 +341,7 @@
 
9926
 %{mcpu=hypersparc:-Av8} \
 
9927
 %{mcpu=leon:" AS_LEON_FLAG "} \
 
9928
 %{mcpu=leon3:" AS_LEON_FLAG "} \
 
9929
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
 
9930
 %{mv8plus:-Av8plus} \
 
9931
 %{mcpu=v9:-Av9} \
 
9932
 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
 
9933
@@ -1760,8 +1768,10 @@
 
9934
 
 
9935
 #ifdef HAVE_AS_LEON
 
9936
 #define AS_LEON_FLAG "-Aleon"
 
9937
+#define AS_LEONV7_FLAG "-Aleon"
 
9938
 #else
 
9939
 #define AS_LEON_FLAG "-Av8"
 
9940
+#define AS_LEONV7_FLAG "-Av7"
 
9941
 #endif
 
9942
 
 
9943
 /* We use gcc _mcount for profiling.  */
 
9944
Index: gcc/config/i386/i386.md
 
9945
===================================================================
 
9946
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_8_3_release)
 
9947
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_8-branch)
 
9948
@@ -5339,66 +5339,37 @@
 
9949
 
 
9950
 ;; Avoid store forwarding (partial memory) stall penalty by extending
 
9951
 ;; SImode value to DImode through XMM register instead of pushing two
 
9952
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
 
9953
-;; targets benefit from this optimization. Also note that fild
 
9954
-;; loads from memory only.
 
9955
+;; SImode values to stack. Also note that fild loads from memory only.
 
9956
 
 
9957
-(define_insn "*floatunssi<mode>2_1"
 
9958
-  [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
 
9959
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
 
9960
+  [(set (match_operand:X87MODEF 0 "register_operand" "=f")
 
9961
        (unsigned_float:X87MODEF
 
9962
-         (match_operand:SI 1 "nonimmediate_operand" "x,m")))
 
9963
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
 
9964
-   (clobber (match_scratch:SI 3 "=X,x"))]
 
9965
+         (match_operand:SI 1 "nonimmediate_operand" "rm")))
 
9966
+   (clobber (match_scratch:DI 3 "=x"))
 
9967
+   (clobber (match_operand:DI 2 "memory_operand" "=m"))]
 
9968
   "!TARGET_64BIT
 
9969
    && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9970
-   && TARGET_SSE"
 
9971
+   && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
 
9972
   "#"
 
9973
+  "&& reload_completed"
 
9974
+  [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
 
9975
+   (set (match_dup 2) (match_dup 3))
 
9976
+   (set (match_dup 0)
 
9977
+       (float:X87MODEF (match_dup 2)))]
 
9978
+  ""
 
9979
   [(set_attr "type" "multi")
 
9980
    (set_attr "mode" "<MODE>")])
 
9981
 
 
9982
-(define_split
 
9983
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
9984
-       (unsigned_float:X87MODEF
 
9985
-         (match_operand:SI 1 "register_operand")))
 
9986
-   (clobber (match_operand:DI 2 "memory_operand"))
 
9987
-   (clobber (match_scratch:SI 3))]
 
9988
-  "!TARGET_64BIT
 
9989
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9990
-   && TARGET_SSE
 
9991
-   && reload_completed"
 
9992
-  [(set (match_dup 2) (match_dup 1))
 
9993
-   (set (match_dup 0)
 
9994
-       (float:X87MODEF (match_dup 2)))]
 
9995
-  "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
 
9996
-
 
9997
-(define_split
 
9998
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
9999
-       (unsigned_float:X87MODEF
 
10000
-         (match_operand:SI 1 "memory_operand")))
 
10001
-   (clobber (match_operand:DI 2 "memory_operand"))
 
10002
-   (clobber (match_scratch:SI 3))]
 
10003
-  "!TARGET_64BIT
 
10004
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10005
-   && TARGET_SSE
 
10006
-   && reload_completed"
 
10007
-  [(set (match_dup 2) (match_dup 3))
 
10008
-   (set (match_dup 0)
 
10009
-       (float:X87MODEF (match_dup 2)))]
 
10010
-{
 
10011
-  emit_move_insn (operands[3], operands[1]);
 
10012
-  operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
 
10013
-})
 
10014
-
 
10015
 (define_expand "floatunssi<mode>2"
 
10016
   [(parallel
 
10017
      [(set (match_operand:X87MODEF 0 "register_operand")
 
10018
           (unsigned_float:X87MODEF
 
10019
             (match_operand:SI 1 "nonimmediate_operand")))
 
10020
-      (clobber (match_dup 2))
 
10021
-      (clobber (match_scratch:SI 3))])]
 
10022
+      (clobber (match_scratch:DI 3))
 
10023
+      (clobber (match_dup 2))])]
 
10024
   "!TARGET_64BIT
 
10025
    && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
10026
-       && TARGET_SSE)
 
10027
+       && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
 
10028
        || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
 
10029
 {
 
10030
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 
10031
@@ -13545,7 +13516,8 @@
 
10032
    (set (reg:CCFP FPSR_REG)
 
10033
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
10034
                     UNSPEC_C2_FLAG))]
 
10035
-  "TARGET_USE_FANCY_MATH_387"
 
10036
+  "TARGET_USE_FANCY_MATH_387
 
10037
+   && flag_finite_math_only"
 
10038
   "fprem"
 
10039
   [(set_attr "type" "fpspc")
 
10040
    (set_attr "mode" "XF")])
 
10041
@@ -13554,7 +13526,8 @@
 
10042
   [(use (match_operand:XF 0 "register_operand"))
 
10043
    (use (match_operand:XF 1 "general_operand"))
 
10044
    (use (match_operand:XF 2 "general_operand"))]
 
10045
-  "TARGET_USE_FANCY_MATH_387"
 
10046
+  "TARGET_USE_FANCY_MATH_387
 
10047
+   && flag_finite_math_only"
 
10048
 {
 
10049
   rtx label = gen_label_rtx ();
 
10050
 
 
10051
@@ -13577,7 +13550,8 @@
 
10052
   [(use (match_operand:MODEF 0 "register_operand"))
 
10053
    (use (match_operand:MODEF 1 "general_operand"))
 
10054
    (use (match_operand:MODEF 2 "general_operand"))]
 
10055
-  "TARGET_USE_FANCY_MATH_387"
 
10056
+  "TARGET_USE_FANCY_MATH_387
 
10057
+   && flag_finite_math_only"
 
10058
 {
 
10059
   rtx (*gen_truncxf) (rtx, rtx);
 
10060
 
 
10061
@@ -13616,7 +13590,8 @@
 
10062
    (set (reg:CCFP FPSR_REG)
 
10063
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
10064
                     UNSPEC_C2_FLAG))]
 
10065
-  "TARGET_USE_FANCY_MATH_387"
 
10066
+  "TARGET_USE_FANCY_MATH_387
 
10067
+   && flag_finite_math_only"
 
10068
   "fprem1"
 
10069
   [(set_attr "type" "fpspc")
 
10070
    (set_attr "mode" "XF")])
 
10071
@@ -13625,7 +13600,8 @@
 
10072
   [(use (match_operand:XF 0 "register_operand"))
 
10073
    (use (match_operand:XF 1 "general_operand"))
 
10074
    (use (match_operand:XF 2 "general_operand"))]
 
10075
-  "TARGET_USE_FANCY_MATH_387"
 
10076
+  "TARGET_USE_FANCY_MATH_387
 
10077
+   && flag_finite_math_only"
 
10078
 {
 
10079
   rtx label = gen_label_rtx ();
 
10080
 
 
10081
@@ -13648,7 +13624,8 @@
 
10082
   [(use (match_operand:MODEF 0 "register_operand"))
 
10083
    (use (match_operand:MODEF 1 "general_operand"))
 
10084
    (use (match_operand:MODEF 2 "general_operand"))]
 
10085
-  "TARGET_USE_FANCY_MATH_387"
 
10086
+  "TARGET_USE_FANCY_MATH_387
 
10087
+   && flag_finite_math_only"
 
10088
 {
 
10089
   rtx (*gen_truncxf) (rtx, rtx);
 
10090
 
 
10091
Index: gcc/config/i386/driver-i386.c
 
10092
===================================================================
 
10093
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
 
10094
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
 
10095
@@ -713,6 +713,11 @@
 
10096
                    /* Assume Core 2.  */
 
10097
                    cpu = "core2";
 
10098
                }
 
10099
+             else if (has_longmode)
 
10100
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
 
10101
+                  -march=native would be unusable for 64-bit compilations,
 
10102
+                  as all the CPUs below are 32-bit only.  */
 
10103
+               cpu = "x86-64";
 
10104
              else if (has_sse3)
 
10105
                /* It is Core Duo.  */
 
10106
                cpu = "pentium-m";
 
10107
Index: gcc/config/i386/i386.c
 
10108
===================================================================
 
10109
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_8_3_release)
 
10110
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_8-branch)
 
10111
@@ -13800,7 +13800,7 @@
 
10112
       if (mode == CCmode)
 
10113
        suffix = "b";
 
10114
       else if (mode == CCCmode)
 
10115
-       suffix = "c";
 
10116
+       suffix = fp ? "b" : "c";
 
10117
       else
 
10118
        gcc_unreachable ();
 
10119
       break;
 
10120
@@ -13823,9 +13823,9 @@
 
10121
       break;
 
10122
     case GEU:
 
10123
       if (mode == CCmode)
 
10124
-       suffix = fp ? "nb" : "ae";
 
10125
+       suffix = "nb";
 
10126
       else if (mode == CCCmode)
 
10127
-       suffix = "nc";
 
10128
+       suffix = fp ? "nb" : "nc";
 
10129
       else
 
10130
        gcc_unreachable ();
 
10131
       break;
 
10132
@@ -20505,7 +20505,7 @@
 
10133
          t1 = gen_reg_rtx (V32QImode);
 
10134
          t2 = gen_reg_rtx (V32QImode);
 
10135
          t3 = gen_reg_rtx (V32QImode);
 
10136
-         vt2 = GEN_INT (128);
 
10137
+         vt2 = GEN_INT (-128);
 
10138
          for (i = 0; i < 32; i++)
 
10139
            vec[i] = vt2;
 
10140
          vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
 
10141
@@ -24640,13 +24640,17 @@
 
10142
              {
 
10143
                edge e;
 
10144
                edge_iterator ei;
 
10145
-               /* Assume that region is SCC, i.e. all immediate predecessors
 
10146
-                  of non-head block are in the same region.  */
 
10147
+
 
10148
+               /* Regions are SCCs with the exception of selective
 
10149
+                  scheduling with pipelining of outer blocks enabled.
 
10150
+                  So also check that immediate predecessors of a non-head
 
10151
+                  block are in the same region.  */
 
10152
                FOR_EACH_EDGE (e, ei, bb->preds)
 
10153
                  {
 
10154
                    /* Avoid creating of loop-carried dependencies through
 
10155
-                      using topological odering in region.  */
 
10156
-                   if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
10157
+                      using topological ordering in the region.  */
 
10158
+                   if (rgn == CONTAINING_RGN (e->src->index)
 
10159
+                       && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
10160
                      add_dependee_for_func_arg (first_arg, e->src); 
 
10161
                  }
 
10162
              }
 
10163
@@ -38807,8 +38811,8 @@
 
10164
              op0 = gen_lowpart (V4DImode, d->op0);
 
10165
              op1 = gen_lowpart (V4DImode, d->op1);
 
10166
              rperm[0]
 
10167
-               = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
 
10168
-                          || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
 
10169
+               = GEN_INT ((d->perm[0] / (nelt / 2))
 
10170
+                          | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
 
10171
              emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
 
10172
              return true;
 
10173
            }
 
10174
Index: gcc/config/sh/sh.c
 
10175
===================================================================
 
10176
--- a/src/gcc/config/sh/sh.c    (.../tags/gcc_4_8_3_release)
 
10177
+++ b/src/gcc/config/sh/sh.c    (.../branches/gcc-4_8-branch)
 
10178
@@ -808,6 +808,12 @@
 
10179
        targetm.asm_out.aligned_op.di = NULL;
 
10180
        targetm.asm_out.unaligned_op.di = NULL;
 
10181
     }
 
10182
+
 
10183
+  /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
 
10184
+     Disable it for everything else.  */
 
10185
+  if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
 
10186
+    TARGET_USERMODE = false;
 
10187
+
 
10188
   if (TARGET_SH1)
 
10189
     {
 
10190
       if (! strcmp (sh_div_str, "call-div1"))
 
10191
@@ -3036,7 +3042,7 @@
 
10192
 struct ashl_lshr_sequence
 
10193
 {
 
10194
   char insn_count;
 
10195
-  char amount[6];
 
10196
+  signed char amount[6];
 
10197
   char clobbers_t;
 
10198
 };
 
10199
 
 
10200
Index: gcc/config/sh/sync.md
 
10201
===================================================================
 
10202
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
 
10203
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
 
10204
@@ -466,6 +466,7 @@
 
10205
    (set (mem:SI (match_dup 1))
 
10206
        (unspec:SI
 
10207
          [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
 
10208
+   (set (reg:SI T_REG) (const_int 1))
 
10209
    (clobber (reg:SI R0_REG))]
 
10210
   "TARGET_ATOMIC_HARD_LLCS
 
10211
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
10212
@@ -484,6 +485,7 @@
 
10213
    (set (mem:QIHI (match_dup 1))
 
10214
        (unspec:QIHI
 
10215
          [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
 
10216
+   (set (reg:SI T_REG) (const_int 1))
 
10217
    (clobber (reg:SI R0_REG))
 
10218
    (clobber (match_scratch:SI 3 "=&r"))
 
10219
    (clobber (match_scratch:SI 4 "=1"))]
 
10220
@@ -617,6 +619,7 @@
 
10221
          [(FETCHOP:SI (mem:SI (match_dup 1))
 
10222
             (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
10223
          UNSPEC_ATOMIC))
 
10224
+   (set (reg:SI T_REG) (const_int 1))
 
10225
    (clobber (reg:SI R0_REG))]
 
10226
   "TARGET_ATOMIC_HARD_LLCS
 
10227
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
10228
@@ -637,6 +640,7 @@
 
10229
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
 
10230
             (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
10231
          UNSPEC_ATOMIC))
 
10232
+   (set (reg:SI T_REG) (const_int 1))
 
10233
    (clobber (reg:SI R0_REG))
 
10234
    (clobber (match_scratch:SI 3 "=&r"))
 
10235
    (clobber (match_scratch:SI 4 "=1"))]
 
10236
@@ -784,6 +788,7 @@
 
10237
          [(not:SI (and:SI (mem:SI (match_dup 1))
 
10238
                   (match_operand:SI 2 "logical_operand" "rK08")))]
 
10239
          UNSPEC_ATOMIC))
 
10240
+   (set (reg:SI T_REG) (const_int 1))
 
10241
    (clobber (reg:SI R0_REG))]
 
10242
   "TARGET_ATOMIC_HARD_LLCS
 
10243
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
10244
@@ -805,6 +810,7 @@
 
10245
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
 
10246
                     (match_operand:QIHI 2 "logical_operand" "rK08")))]
 
10247
          UNSPEC_ATOMIC))
 
10248
+   (set (reg:SI T_REG) (const_int 1))
 
10249
    (clobber (reg:SI R0_REG))
 
10250
    (clobber (match_scratch:SI 3 "=&r"))
 
10251
    (clobber (match_scratch:SI 4 "=1"))]
 
10252
@@ -903,7 +909,7 @@
 
10253
         "      and     %0,%3"                  "\n"
 
10254
         "      not     %3,%3"                  "\n"
 
10255
         "      mov.<bwl>       %3,@%1"         "\n"
 
10256
-        "      stc     %4,sr";
 
10257
+        "      ldc     %4,sr";
 
10258
 }
 
10259
   [(set_attr "length" "20")])
 
10260
 
 
10261
@@ -960,7 +966,8 @@
 
10262
    (set (mem:SI (match_dup 1))
 
10263
        (unspec:SI
 
10264
          [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
 
10265
-         UNSPEC_ATOMIC))]
 
10266
+         UNSPEC_ATOMIC))
 
10267
+   (set (reg:SI T_REG) (const_int 1))]
 
10268
   "TARGET_ATOMIC_HARD_LLCS
 
10269
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
10270
 {
 
10271
@@ -980,6 +987,7 @@
 
10272
        (unspec:QIHI
 
10273
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
 
10274
          UNSPEC_ATOMIC))
 
10275
+   (set (reg:SI T_REG) (const_int 1))
 
10276
    (clobber (reg:SI R0_REG))
 
10277
    (clobber (match_scratch:SI 3 "=&r"))
 
10278
    (clobber (match_scratch:SI 4 "=1"))]
 
10279
@@ -1124,7 +1132,8 @@
 
10280
    (set (mem:SI (match_dup 1))
 
10281
        (unspec:SI
 
10282
          [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
 
10283
-         UNSPEC_ATOMIC))]
 
10284
+         UNSPEC_ATOMIC))
 
10285
+   (set (reg:SI T_REG) (const_int 1))]
 
10286
   "TARGET_ATOMIC_HARD_LLCS
 
10287
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
10288
 {
 
10289
@@ -1145,6 +1154,7 @@
 
10290
        (unspec:QIHI
 
10291
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
 
10292
          UNSPEC_ATOMIC))
 
10293
+   (set (reg:SI T_REG) (const_int 1))
 
10294
    (clobber (reg:SI R0_REG))
 
10295
    (clobber (match_scratch:SI 3 "=&r"))
 
10296
    (clobber (match_scratch:SI 4 "=1"))]
 
10297
@@ -1353,7 +1363,7 @@
 
10298
         "      ldc     r0,sr"          "\n"
 
10299
         "      mov.b   @%0,r0"         "\n"
 
10300
         "      mov.b   %1,@%0"         "\n"
 
10301
-        "      stc     %2,sr"          "\n"
 
10302
+        "      ldc     %2,sr"          "\n"
 
10303
         "      tst     r0,r0";
 
10304
 }
 
10305
   [(set_attr "length" "16")])
 
10306
Index: gcc/config/sh/sh.opt
 
10307
===================================================================
 
10308
--- a/src/gcc/config/sh/sh.opt  (.../tags/gcc_4_8_3_release)
 
10309
+++ b/src/gcc/config/sh/sh.opt  (.../branches/gcc-4_8-branch)
 
10310
@@ -343,7 +343,7 @@
 
10311
 Cost to assume for a multiply insn
 
10312
 
 
10313
 musermode
 
10314
-Target Report RejectNegative Var(TARGET_USERMODE)
 
10315
+Target Var(TARGET_USERMODE)
 
10316
 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
 
10317
 
 
10318
 ;; We might want to enable this by default for TARGET_HARD_SH4, because
 
10319
Index: gcc/config/microblaze/predicates.md
 
10320
===================================================================
 
10321
--- a/src/gcc/config/microblaze/predicates.md   (.../tags/gcc_4_8_3_release)
 
10322
+++ b/src/gcc/config/microblaze/predicates.md   (.../branches/gcc-4_8-branch)
 
10323
@@ -85,10 +85,6 @@
 
10324
   (ior (match_operand 0 "const_0_operand")
 
10325
        (match_operand 0 "register_operand")))
 
10326
 
 
10327
-(define_predicate "reg_or_mem_operand"
 
10328
-  (ior (match_operand 0 "memory_operand")
 
10329
-       (match_operand 0 "register_operand")))
 
10330
-
 
10331
 ;;  Return if the operand is either the PC or a label_ref.  
 
10332
 (define_special_predicate "pc_or_label_operand"
 
10333
   (ior (match_code "pc,label_ref")
 
10334
Index: gcc/config/microblaze/microblaze.md
 
10335
===================================================================
 
10336
--- a/src/gcc/config/microblaze/microblaze.md   (.../tags/gcc_4_8_3_release)
 
10337
+++ b/src/gcc/config/microblaze/microblaze.md   (.../branches/gcc-4_8-branch)
 
10338
@@ -1119,18 +1119,6 @@
 
10339
   }
 
10340
 )
 
10341
 
 
10342
-;;Load and store reverse
 
10343
-(define_insn "movsi4_rev"
 
10344
-  [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
 
10345
-        (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
 
10346
-  "TARGET_REORDER"
 
10347
-  "@
 
10348
-   lwr\t%0,%y1,r0
 
10349
-   swr\t%1,%y0,r0"
 
10350
-  [(set_attr "type"     "load,store")
 
10351
-  (set_attr "mode"      "SI")
 
10352
-  (set_attr "length"    "4,4")])
 
10353
-
 
10354
 ;; 32-bit floating point moves
 
10355
 
 
10356
 (define_expand "movsf"
 
10357
Index: gcc/config/avr/avr-fixed.md
 
10358
===================================================================
 
10359
--- a/src/gcc/config/avr/avr-fixed.md   (.../tags/gcc_4_8_3_release)
 
10360
+++ b/src/gcc/config/avr/avr-fixed.md   (.../branches/gcc-4_8-branch)
 
10361
@@ -430,8 +430,8 @@
 
10362
       }
 
10363
 
 
10364
     // Input and output of the libgcc function
 
10365
-    const unsigned int regno_in[]  = { -1, 22, 22, -1, 18 };
 
10366
-    const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
 
10367
+    const unsigned int regno_in[]  = { -1U, 22, 22, -1U, 18 };
 
10368
+    const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
 
10369
 
 
10370
     operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
10371
     operands[4] = gen_rtx_REG (<MODE>mode,  regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
10372
Index: gcc/config/avr/avr.md
 
10373
===================================================================
 
10374
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
 
10375
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
 
10376
@@ -367,6 +367,15 @@
 
10377
   ""
 
10378
   {
 
10379
     int i;
 
10380
+
 
10381
+    // Avoid (subreg (mem)) for non-generic address spaces below.  Because
 
10382
+    // of the poor addressing capabilities of these spaces it's better to
 
10383
+    // load them in one chunk.  And it avoids PR61443.
 
10384
+
 
10385
+    if (MEM_P (operands[0])
 
10386
+        && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
 
10387
+      operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
 
10388
+
 
10389
     for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
 
10390
       {
 
10391
         rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
 
10392
Index: gcc/config/avr/avr.h
 
10393
===================================================================
 
10394
--- a/src/gcc/config/avr/avr.h  (.../tags/gcc_4_8_3_release)
 
10395
+++ b/src/gcc/config/avr/avr.h  (.../branches/gcc-4_8-branch)
 
10396
@@ -250,18 +250,18 @@
 
10397
 #define REG_CLASS_CONTENTS {                                           \
 
10398
   {0x00000000,0x00000000},     /* NO_REGS */                           \
 
10399
   {0x00000001,0x00000000},     /* R0_REG */                            \
 
10400
-  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */                \
 
10401
-  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */                \
 
10402
-  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */                \
 
10403
+  {3u << REG_X,0x00000000},     /* POINTER_X_REGS, r26 - r27 */                \
 
10404
+  {3u << REG_Y,0x00000000},     /* POINTER_Y_REGS, r28 - r29 */                \
 
10405
+  {3u << REG_Z,0x00000000},     /* POINTER_Z_REGS, r30 - r31 */                \
 
10406
   {0x00000000,0x00000003},     /* STACK_REG, STACK */                  \
 
10407
-  {(3 << REG_Y) | (3 << REG_Z),                                                \
 
10408
+  {(3u << REG_Y) | (3u << REG_Z),                                      \
 
10409
      0x00000000},              /* BASE_POINTER_REGS, r28 - r31 */      \
 
10410
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                         \
 
10411
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z),                      \
 
10412
      0x00000000},              /* POINTER_REGS, r26 - r31 */           \
 
10413
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),          \
 
10414
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W),      \
 
10415
      0x00000000},              /* ADDW_REGS, r24 - r31 */              \
 
10416
   {0x00ff0000,0x00000000},     /* SIMPLE_LD_REGS r16 - r23 */          \
 
10417
-  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),   \
 
10418
+  {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
 
10419
      0x00000000},      /* LD_REGS, r16 - r31 */                        \
 
10420
   {0x0000ffff,0x00000000},     /* NO_LD_REGS  r0 - r15 */              \
 
10421
   {0xffffffff,0x00000000},     /* GENERAL_REGS, r0 - r31 */            \
 
10422
Index: gcc/config/aarch64/arm_neon.h
 
10423
===================================================================
 
10424
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
 
10425
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
 
10426
@@ -13815,7 +13815,7 @@
 
10427
   int16x4_t result;
 
10428
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
 
10429
            : "=w"(result)
 
10430
-           : "w"(a), "w"(b)
 
10431
+           : "w"(a), "x"(b)
 
10432
            : /* No clobbers */);
 
10433
   return result;
 
10434
 }
 
10435
@@ -13837,7 +13837,7 @@
 
10436
   int16x8_t result;
 
10437
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
 
10438
            : "=w"(result)
 
10439
-           : "w"(a), "w"(b)
 
10440
+           : "w"(a), "x"(b)
 
10441
            : /* No clobbers */);
 
10442
   return result;
 
10443
 }
 
10444
Index: gcc/config/aarch64/aarch64.md
 
10445
===================================================================
 
10446
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
 
10447
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
 
10448
@@ -3292,6 +3292,7 @@
 
10449
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
 
10450
                   UNSPEC_TLSDESC))
 
10451
    (clobber (reg:DI LR_REGNUM))
 
10452
+   (clobber (reg:CC CC_REGNUM))
 
10453
    (clobber (match_scratch:DI 1 "=r"))]
 
10454
   "TARGET_TLS_DESC"
 
10455
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
 
10456
Index: gcc/config/aarch64/aarch64.opt
 
10457
===================================================================
 
10458
--- a/src/gcc/config/aarch64/aarch64.opt        (.../tags/gcc_4_8_3_release)
 
10459
+++ b/src/gcc/config/aarch64/aarch64.opt        (.../branches/gcc-4_8-branch)
 
10460
@@ -67,6 +67,10 @@
 
10461
 Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
 
10462
 Generate code which uses only the general registers
 
10463
 
 
10464
+mfix-cortex-a53-835769
 
10465
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
 
10466
+Workaround for ARM Cortex-A53 Erratum number 835769
 
10467
+
 
10468
 mlittle-endian
 
10469
 Target Report RejectNegative InverseMask(BIG_END)
 
10470
 Assume target CPU is configured as little endian
 
10471
Index: gcc/config/aarch64/aarch64-protos.h
 
10472
===================================================================
 
10473
--- a/src/gcc/config/aarch64/aarch64-protos.h   (.../tags/gcc_4_8_3_release)
 
10474
+++ b/src/gcc/config/aarch64/aarch64-protos.h   (.../branches/gcc-4_8-branch)
 
10475
@@ -247,6 +247,8 @@
 
10476
 
 
10477
 extern void aarch64_split_combinev16qi (rtx operands[3]);
 
10478
 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
 
10479
+extern bool aarch64_madd_needs_nop (rtx);
 
10480
+extern void aarch64_final_prescan_insn (rtx);
 
10481
 extern bool
 
10482
 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
 
10483
 
 
10484
Index: gcc/config/aarch64/aarch64.c
 
10485
===================================================================
 
10486
--- a/src/gcc/config/aarch64/aarch64.c  (.../tags/gcc_4_8_3_release)
 
10487
+++ b/src/gcc/config/aarch64/aarch64.c  (.../branches/gcc-4_8-branch)
 
10488
@@ -1201,6 +1201,7 @@
 
10489
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
 
10490
   int ncrn, nvrn, nregs;
 
10491
   bool allocate_ncrn, allocate_nvrn;
 
10492
+  HOST_WIDE_INT size;
 
10493
 
 
10494
   /* We need to do this once per argument.  */
 
10495
   if (pcum->aapcs_arg_processed)
 
10496
@@ -1208,6 +1209,11 @@
 
10497
 
 
10498
   pcum->aapcs_arg_processed = true;
 
10499
 
 
10500
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
 
10501
+  size
 
10502
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
 
10503
+                       UNITS_PER_WORD);
 
10504
+
 
10505
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
 
10506
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
 
10507
                                                 mode,
 
10508
@@ -1258,10 +1264,8 @@
 
10509
     }
 
10510
 
 
10511
   ncrn = pcum->aapcs_ncrn;
 
10512
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
 
10513
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
 
10514
+  nregs = size / UNITS_PER_WORD;
 
10515
 
 
10516
-
 
10517
   /* C6 - C9.  though the sign and zero extension semantics are
 
10518
      handled elsewhere.  This is the case where the argument fits
 
10519
      entirely general registers.  */
 
10520
@@ -1309,13 +1313,12 @@
 
10521
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
 
10522
 
 
10523
   /* The argument is passed on stack; record the needed number of words for
 
10524
-     this argument (we can re-use NREGS) and align the total size if
 
10525
-     necessary.  */
 
10526
+     this argument and align the total size if necessary.  */
 
10527
 on_stack:
 
10528
-  pcum->aapcs_stack_words = nregs;
 
10529
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
 
10530
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
 
10531
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
 
10532
-                                              16 / UNITS_PER_WORD) + 1;
 
10533
+                                              16 / UNITS_PER_WORD);
 
10534
   return;
 
10535
 }
 
10536
 
 
10537
@@ -4845,6 +4848,15 @@
 
10538
   aarch64_tune = selected_tune->core;
 
10539
   aarch64_tune_params = selected_tune->tune;
 
10540
 
 
10541
+  if (aarch64_fix_a53_err835769 == 2)
 
10542
+    {
 
10543
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
10544
+      aarch64_fix_a53_err835769 = 1;
 
10545
+#else
 
10546
+      aarch64_fix_a53_err835769 = 0;
 
10547
+#endif
 
10548
+    }
 
10549
+
 
10550
   aarch64_override_options_after_change ();
 
10551
 }
 
10552
 
 
10553
@@ -6037,6 +6049,135 @@
 
10554
   return NULL;
 
10555
 }
 
10556
 
 
10557
+
 
10558
+/* Return true iff X is a MEM rtx.  */
 
10559
+
 
10560
+static int
 
10561
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
 
10562
+{
 
10563
+  return MEM_P (*x);
 
10564
+}
 
10565
+
 
10566
+
 
10567
+/*  Return true if mem_insn contains a MEM RTX somewhere in it.  */
 
10568
+
 
10569
+static bool
 
10570
+has_memory_op (rtx mem_insn)
 
10571
+{
 
10572
+   rtx pattern = PATTERN (mem_insn);
 
10573
+   return for_each_rtx (&pattern, is_mem_p, NULL);
 
10574
+}
 
10575
+
 
10576
+
 
10577
+/* Find the first rtx before insn that will generate an assembly
 
10578
+   instruction.  */
 
10579
+
 
10580
+static rtx
 
10581
+aarch64_prev_real_insn (rtx insn)
 
10582
+{
 
10583
+  if (!insn)
 
10584
+    return NULL;
 
10585
+
 
10586
+  do
 
10587
+    {
 
10588
+      insn = prev_real_insn (insn);
 
10589
+    }
 
10590
+  while (insn && recog_memoized (insn) < 0);
 
10591
+
 
10592
+  return insn;
 
10593
+}
 
10594
+
 
10595
+/*  Return true iff t1 is the v8type of a multiply-accumulate instruction.  */
 
10596
+
 
10597
+static bool
 
10598
+is_madd_op (enum attr_v8type t1)
 
10599
+{
 
10600
+  return t1 == V8TYPE_MADD
 
10601
+         || t1 == V8TYPE_MADDL;
 
10602
+}
 
10603
+
 
10604
+
 
10605
+/* Check if there is a register dependency between a load and the insn
 
10606
+   for which we hold recog_data.  */
 
10607
+
 
10608
+static bool
 
10609
+dep_between_memop_and_curr (rtx memop)
 
10610
+{
 
10611
+  rtx load_reg;
 
10612
+  int opno;
 
10613
+
 
10614
+  gcc_assert (GET_CODE (memop) == SET);
 
10615
+
 
10616
+  if (!REG_P (SET_DEST (memop)))
 
10617
+    return false;
 
10618
+
 
10619
+  load_reg = SET_DEST (memop);
 
10620
+  for (opno = 1; opno < recog_data.n_operands; opno++)
 
10621
+    {
 
10622
+      rtx operand = recog_data.operand[opno];
 
10623
+      if (REG_P (operand)
 
10624
+          && reg_overlap_mentioned_p (load_reg, operand))
 
10625
+        return true;
 
10626
+
 
10627
+    }
 
10628
+  return false;
 
10629
+}
 
10630
+
 
10631
+
 
10632
+
 
10633
+/* When working around the Cortex-A53 erratum 835769,
 
10634
+   given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
 
10635
+   instruction and has a preceding memory instruction such that a NOP
 
10636
+   should be inserted between them.  */
 
10637
+
 
10638
+bool
 
10639
+aarch64_madd_needs_nop (rtx insn)
 
10640
+{
 
10641
+  enum attr_v8type attr_type;
 
10642
+  rtx prev;
 
10643
+  rtx body;
 
10644
+
 
10645
+  if (!aarch64_fix_a53_err835769)
 
10646
+    return false;
 
10647
+
 
10648
+  if (recog_memoized (insn) < 0)
 
10649
+    return false;
 
10650
+
 
10651
+  attr_type = get_attr_v8type (insn);
 
10652
+  if (!is_madd_op (attr_type))
 
10653
+    return false;
 
10654
+
 
10655
+  prev = aarch64_prev_real_insn (insn);
 
10656
+  /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
 
10657
+     Restore recog state to INSN to avoid state corruption.  */
 
10658
+  extract_constrain_insn_cached (insn);
 
10659
+
 
10660
+  if (!prev || !has_memory_op (prev))
 
10661
+    return false;
 
10662
+
 
10663
+  body = single_set (prev);
 
10664
+
 
10665
+  /* If the previous insn is a memory op and there is no dependency between
 
10666
+     it and the madd, emit a nop between them.  If we know it's a memop but
 
10667
+     body is NULL, return true to be safe.  */
 
10668
+  if (GET_MODE (recog_data.operand[0]) == DImode
 
10669
+      && (!body || !dep_between_memop_and_curr (body)))
 
10670
+    return true;
 
10671
+
 
10672
+  return false;
 
10673
+
 
10674
+}
 
10675
+
 
10676
+/* Implement FINAL_PRESCAN_INSN.  */
 
10677
+
 
10678
+void
 
10679
+aarch64_final_prescan_insn (rtx insn)
 
10680
+{
 
10681
+  if (aarch64_madd_needs_nop (insn))
 
10682
+    fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
 
10683
+}
 
10684
+
 
10685
+
 
10686
 /* Return the equivalent letter for size.  */
 
10687
 static unsigned char
 
10688
 sizetochar (int size)
 
10689
Index: gcc/config/aarch64/aarch64-elf-raw.h
 
10690
===================================================================
 
10691
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../tags/gcc_4_8_3_release)
 
10692
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../branches/gcc-4_8-branch)
 
10693
@@ -25,8 +25,17 @@
 
10694
 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
 
10695
 #define ENDFILE_SPEC " crtend%O%s crtn%O%s"
 
10696
 
 
10697
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
10698
+#define CA53_ERR_835769_SPEC \
 
10699
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10700
+#else
 
10701
+#define CA53_ERR_835769_SPEC \
 
10702
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10703
+#endif
 
10704
+
 
10705
 #ifndef LINK_SPEC
 
10706
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
 
10707
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
 
10708
+                  CA53_ERR_835769_SPEC
 
10709
 #endif
 
10710
 
 
10711
 #endif /* GCC_AARCH64_ELF_RAW_H */
 
10712
Index: gcc/config/aarch64/aarch64-linux.h
 
10713
===================================================================
 
10714
--- a/src/gcc/config/aarch64/aarch64-linux.h    (.../tags/gcc_4_8_3_release)
 
10715
+++ b/src/gcc/config/aarch64/aarch64-linux.h    (.../branches/gcc-4_8-branch)
 
10716
@@ -34,8 +34,17 @@
 
10717
    -X                                          \
 
10718
    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
 
10719
 
 
10720
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
 
10721
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
10722
+#define CA53_ERR_835769_SPEC \
 
10723
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10724
+#else
 
10725
+#define CA53_ERR_835769_SPEC \
 
10726
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10727
+#endif
 
10728
 
 
10729
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
 
10730
+                  CA53_ERR_835769_SPEC
 
10731
+
 
10732
 #define TARGET_OS_CPP_BUILTINS()               \
 
10733
   do                                           \
 
10734
     {                                          \
 
10735
@@ -43,4 +52,6 @@
 
10736
     }                                          \
 
10737
   while (0)
 
10738
 
 
10739
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
10740
+
 
10741
 #endif  /* GCC_AARCH64_LINUX_H */
 
10742
Index: gcc/config/aarch64/aarch64.h
 
10743
===================================================================
 
10744
--- a/src/gcc/config/aarch64/aarch64.h  (.../tags/gcc_4_8_3_release)
 
10745
+++ b/src/gcc/config/aarch64/aarch64.h  (.../branches/gcc-4_8-branch)
 
10746
@@ -465,6 +465,18 @@
 
10747
   (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
 
10748
 #endif
 
10749
 
 
10750
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
 
10751
+   length so that conditional branching code is updated appropriately.  */
 
10752
+#define ADJUST_INSN_LENGTH(insn, length)       \
 
10753
+  do                                           \
 
10754
+    {                                          \
 
10755
+      if (aarch64_madd_needs_nop (insn))       \
 
10756
+        length += 4;                           \
 
10757
+    } while (0)
 
10758
+
 
10759
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)     \
 
10760
+    aarch64_final_prescan_insn (INSN);                 \
 
10761
+
 
10762
 /* The processor for which instructions should be scheduled.  */
 
10763
 extern enum aarch64_processor aarch64_tune;
 
10764
 
 
10765
Index: gcc/config/rs6000/constraints.md
 
10766
===================================================================
 
10767
--- a/src/gcc/config/rs6000/constraints.md      (.../tags/gcc_4_8_3_release)
 
10768
+++ b/src/gcc/config/rs6000/constraints.md      (.../branches/gcc-4_8-branch)
 
10769
@@ -65,6 +65,20 @@
 
10770
 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
 
10771
   "If -mmfpgpr was used, a floating point register or NO_REGS.")
 
10772
 
 
10773
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
 
10774
+  "Floating point register if direct moves are available, or NO_REGS.")
 
10775
+
 
10776
+;; At present, DImode is not allowed in the Altivec registers.  If in the
 
10777
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
 
10778
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
 
10779
+  "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
 
10780
+
 
10781
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
 
10782
+  "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
 
10783
+
 
10784
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
 
10785
+  "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
 
10786
+
 
10787
 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
 
10788
   "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
 
10789
 
 
10790
@@ -98,7 +112,7 @@
 
10791
   "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
 
10792
 
 
10793
 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
 
10794
-  "VSX vector register to hold scalar float values or NO_REGS.")
 
10795
+  "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
 
10796
 
 
10797
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
 
10798
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
 
10799
Index: gcc/config/rs6000/predicates.md
 
10800
===================================================================
 
10801
--- a/src/gcc/config/rs6000/predicates.md       (.../tags/gcc_4_8_3_release)
 
10802
+++ b/src/gcc/config/rs6000/predicates.md       (.../branches/gcc-4_8-branch)
 
10803
@@ -1795,7 +1795,7 @@
 
10804
 (define_predicate "fusion_gpr_mem_load"
 
10805
   (match_code "mem,sign_extend,zero_extend")
 
10806
 {
 
10807
-  rtx addr;
 
10808
+  rtx addr, base, offset;
 
10809
 
 
10810
   /* Handle sign/zero extend.  */
 
10811
   if (GET_CODE (op) == ZERO_EXTEND
 
10812
@@ -1825,24 +1825,79 @@
 
10813
     }
 
10814
 
 
10815
   addr = XEXP (op, 0);
 
10816
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
10817
+    return 0;
 
10818
+
 
10819
+  base = XEXP (addr, 0);
 
10820
+  if (!base_reg_operand (base, GET_MODE (base)))
 
10821
+    return 0;
 
10822
+
 
10823
+  offset = XEXP (addr, 1);
 
10824
+
 
10825
   if (GET_CODE (addr) == PLUS)
 
10826
+    return satisfies_constraint_I (offset);
 
10827
+
 
10828
+  else if (GET_CODE (addr) == LO_SUM)
 
10829
     {
 
10830
-      rtx base = XEXP (addr, 0);
 
10831
-      rtx offset = XEXP (addr, 1);
 
10832
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10833
+       return small_toc_ref (offset, GET_MODE (offset));
 
10834
 
 
10835
-      return (base_reg_operand (base, GET_MODE (base))
 
10836
-             && satisfies_constraint_I (offset));
 
10837
+      else if (TARGET_ELF && !TARGET_POWERPC64)
 
10838
+       return CONSTANT_P (offset);
 
10839
     }
 
10840
 
 
10841
-  else if (GET_CODE (addr) == LO_SUM)
 
10842
+  return 0;
 
10843
+})
 
10844
+
 
10845
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
 
10846
+;; memory field with both the addis and the memory offset.  Sign extension
 
10847
+;; is not handled here, since lha and lwa are not fused.
 
10848
+(define_predicate "fusion_gpr_mem_combo"
 
10849
+  (match_code "mem,zero_extend")
 
10850
+{
 
10851
+  rtx addr, base, offset;
 
10852
+
 
10853
+  /* Handle zero extend.  */
 
10854
+  if (GET_CODE (op) == ZERO_EXTEND)
 
10855
     {
 
10856
-      rtx base = XEXP (addr, 0);
 
10857
-      rtx offset = XEXP (addr, 1);
 
10858
+      op = XEXP (op, 0);
 
10859
+      mode = GET_MODE (op);
 
10860
+    }
 
10861
 
 
10862
-      if (!base_reg_operand (base, GET_MODE (base)))
 
10863
+  if (!MEM_P (op))
 
10864
+    return 0;
 
10865
+
 
10866
+  switch (mode)
 
10867
+    {
 
10868
+    case QImode:
 
10869
+    case HImode:
 
10870
+    case SImode:
 
10871
+      break;
 
10872
+
 
10873
+    case DImode:
 
10874
+      if (!TARGET_POWERPC64)
 
10875
        return 0;
 
10876
+      break;
 
10877
 
 
10878
-      else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10879
+    default:
 
10880
+      return 0;
 
10881
+    }
 
10882
+
 
10883
+  addr = XEXP (op, 0);
 
10884
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
10885
+    return 0;
 
10886
+
 
10887
+  base = XEXP (addr, 0);
 
10888
+  if (!fusion_gpr_addis (base, GET_MODE (base)))
 
10889
+    return 0;
 
10890
+
 
10891
+  offset = XEXP (addr, 1);
 
10892
+  if (GET_CODE (addr) == PLUS)
 
10893
+    return satisfies_constraint_I (offset);
 
10894
+
 
10895
+  else if (GET_CODE (addr) == LO_SUM)
 
10896
+    {
 
10897
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10898
        return small_toc_ref (offset, GET_MODE (offset));
 
10899
 
 
10900
       else if (TARGET_ELF && !TARGET_POWERPC64)
 
10901
Index: gcc/config/rs6000/htm.md
 
10902
===================================================================
 
10903
--- a/src/gcc/config/rs6000/htm.md      (.../tags/gcc_4_8_3_release)
 
10904
+++ b/src/gcc/config/rs6000/htm.md      (.../branches/gcc-4_8-branch)
 
10905
@@ -179,7 +179,7 @@
 
10906
                             (const_int 0)]
 
10907
                            UNSPECV_HTM_TABORTWCI))
 
10908
    (set (subreg:CC (match_dup 2) 0) (match_dup 1))
 
10909
-   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
 
10910
+   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
 
10911
    (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
 
10912
                   (and:SI (match_dup 3) (const_int 15)))
 
10913
               (clobber (scratch:CC))])]
 
10914
Index: gcc/config/rs6000/freebsd64.h
 
10915
===================================================================
 
10916
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
 
10917
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
 
10918
@@ -367,7 +367,7 @@
 
10919
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
10920
 #undef  ADJUST_FIELD_ALIGN
 
10921
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
10922
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
10923
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
10924
    ? 128                                                                \
 
10925
    : (TARGET_64BIT                                                      \
 
10926
       && TARGET_ALIGN_NATURAL == 0                                      \
 
10927
Index: gcc/config/rs6000/rs6000-protos.h
 
10928
===================================================================
 
10929
--- a/src/gcc/config/rs6000/rs6000-protos.h     (.../tags/gcc_4_8_3_release)
 
10930
+++ b/src/gcc/config/rs6000/rs6000-protos.h     (.../branches/gcc-4_8-branch)
 
10931
@@ -79,9 +79,9 @@
 
10932
 extern bool gpr_or_gpr_p (rtx, rtx);
 
10933
 extern bool direct_move_p (rtx, rtx);
 
10934
 extern bool quad_load_store_p (rtx, rtx);
 
10935
-extern bool fusion_gpr_load_p (rtx *, bool);
 
10936
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
 
10937
 extern void expand_fusion_gpr_load (rtx *);
 
10938
-extern const char *emit_fusion_gpr_load (rtx *);
 
10939
+extern const char *emit_fusion_gpr_load (rtx, rtx);
 
10940
 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
 
10941
                                                            enum reg_class);
 
10942
 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
 
10943
@@ -153,6 +153,7 @@
 
10944
 
 
10945
 #ifdef TREE_CODE
 
10946
 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
 
10947
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
 
10948
 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
 
10949
                                                     unsigned int);
 
10950
 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
 
10951
@@ -161,7 +162,7 @@
 
10952
 extern rtx rs6000_libcall_value (enum machine_mode);
 
10953
 extern rtx rs6000_va_arg (tree, tree);
 
10954
 extern int function_ok_for_sibcall (tree);
 
10955
-extern int rs6000_reg_parm_stack_space (tree);
 
10956
+extern int rs6000_reg_parm_stack_space (tree, bool);
 
10957
 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
 
10958
 extern bool rs6000_elf_in_small_data_p (const_tree);
 
10959
 #ifdef ARGS_SIZE_RTX
 
10960
Index: gcc/config/rs6000/rs6000-builtin.def
 
10961
===================================================================
 
10962
--- a/src/gcc/config/rs6000/rs6000-builtin.def  (.../tags/gcc_4_8_3_release)
 
10963
+++ b/src/gcc/config/rs6000/rs6000-builtin.def  (.../branches/gcc-4_8-branch)
 
10964
@@ -622,20 +622,13 @@
 
10965
                     | RS6000_BTC_TERNARY),                             \
 
10966
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
10967
 
 
10968
-/* Miscellaneous builtins.  */
 
10969
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE)                             \
 
10970
+/* 128-bit long double floating point builtins.  */
 
10971
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE)                          \
 
10972
   RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
10973
                    "__builtin_" NAME,                  /* NAME */      \
 
10974
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
10975
+                   (RS6000_BTM_HARD_FLOAT              /* MASK */      \
 
10976
+                    | RS6000_BTM_LDBL128),                             \
 
10977
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
10978
-                    | RS6000_BTC_UNARY),                               \
 
10979
-                   CODE_FOR_ ## ICODE)                 /* ICODE */
 
10980
-
 
10981
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE)                             \
 
10982
-  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
10983
-                   "__builtin_" NAME,                  /* NAME */      \
 
10984
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
10985
-                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
10986
                     | RS6000_BTC_BINARY),                              \
 
10987
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
10988
 
 
10989
@@ -1593,10 +1586,8 @@
 
10990
 BU_DFP_MISC_2 (PACK_TD,                "pack_dec128",          CONST,  packtd)
 
10991
 BU_DFP_MISC_2 (UNPACK_TD,      "unpack_dec128",        CONST,  unpacktd)
 
10992
 
 
10993
-BU_MISC_2 (PACK_TF,            "pack_longdouble",      CONST,  packtf)
 
10994
-BU_MISC_2 (UNPACK_TF,          "unpack_longdouble",    CONST,  unpacktf)
 
10995
-BU_MISC_1 (UNPACK_TF_0,                "longdouble_dw0",       CONST,  unpacktf_0)
 
10996
-BU_MISC_1 (UNPACK_TF_1,                "longdouble_dw1",       CONST,  unpacktf_1)
 
10997
+BU_LDBL128_2 (PACK_TF,         "pack_longdouble",      CONST,  packtf)
 
10998
+BU_LDBL128_2 (UNPACK_TF,       "unpack_longdouble",    CONST,  unpacktf)
 
10999
 
 
11000
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
 
11001
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
 
11002
Index: gcc/config/rs6000/rs6000-c.c
 
11003
===================================================================
 
11004
--- a/src/gcc/config/rs6000/rs6000-c.c  (.../tags/gcc_4_8_3_release)
 
11005
+++ b/src/gcc/config/rs6000/rs6000-c.c  (.../branches/gcc-4_8-branch)
 
11006
@@ -3265,6 +3265,8 @@
 
11007
 
 
11008
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
11009
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
 
11010
+  { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
11011
+    RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
 
11012
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
11013
     RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
 
11014
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
11015
@@ -3319,6 +3321,8 @@
 
11016
 
 
11017
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
11018
     RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
 
11019
+  { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
11020
+    RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
 
11021
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
11022
     RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
 
11023
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
11024
@@ -4126,7 +4130,8 @@
 
11025
      argument) is reversed.  Patch the arguments here before building
 
11026
      the resolved CALL_EXPR.  */
 
11027
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
 
11028
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
 
11029
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
 
11030
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
 
11031
     {
 
11032
       tree t;
 
11033
       t = args[2], args[2] = args[1], args[1] = t;
 
11034
@@ -4184,6 +4189,14 @@
 
11035
   if (TARGET_DEBUG_BUILTIN)
 
11036
     fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
 
11037
             (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 
11038
 
11039
+  /* vec_lvsl and vec_lvsr are deprecated for use with LE element order.  */
 
11040
+  if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
 
11041
+    warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
 
11042
+assignment for unaligned loads and stores");
 
11043
+  else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
 
11044
+    warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
 
11045
+assignment for unaligned loads and stores");
 
11046
 
 
11047
   /* For now treat vec_splats and vec_promote as the same.  */
 
11048
   if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
 
11049
Index: gcc/config/rs6000/linux64.h
 
11050
===================================================================
 
11051
--- a/src/gcc/config/rs6000/linux64.h   (.../tags/gcc_4_8_3_release)
 
11052
+++ b/src/gcc/config/rs6000/linux64.h   (.../branches/gcc-4_8-branch)
 
11053
@@ -246,7 +246,7 @@
 
11054
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
11055
 #undef  ADJUST_FIELD_ALIGN
 
11056
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
11057
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)    \
 
11058
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
11059
    ? 128                                                               \
 
11060
    : (TARGET_64BIT                                                     \
 
11061
       && TARGET_ALIGN_NATURAL == 0                                     \
 
11062
Index: gcc/config/rs6000/rs6000.c
 
11063
===================================================================
 
11064
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_8_3_release)
 
11065
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_8-branch)
 
11066
@@ -369,6 +369,7 @@
 
11067
   enum insn_code reload_gpr_vsx;       /* INSN to move from GPR to VSX.  */
 
11068
   enum insn_code reload_vsx_gpr;       /* INSN to move from VSX to GPR.  */
 
11069
   addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks.  */
 
11070
+  bool scalar_in_vmx_p;                        /* Scalar value can go in VMX.  */
 
11071
 };
 
11072
 
 
11073
 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
 
11074
@@ -1704,8 +1705,7 @@
 
11075
      asked for it.  */
 
11076
   if (TARGET_VSX && VSX_REGNO_P (regno)
 
11077
       && (VECTOR_MEM_VSX_P (mode)
 
11078
-         || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
 
11079
-         || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
 
11080
+         || reg_addr[mode].scalar_in_vmx_p
 
11081
          || (TARGET_VSX_TIMODE && mode == TImode)
 
11082
          || (TARGET_VADDUQM && mode == V1TImode)))
 
11083
     {
 
11084
@@ -1714,12 +1714,9 @@
 
11085
 
 
11086
       if (ALTIVEC_REGNO_P (regno))
 
11087
        {
 
11088
-         if (mode == SFmode && !TARGET_UPPER_REGS_SF)
 
11089
+         if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
 
11090
            return 0;
 
11091
 
 
11092
-         if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
 
11093
-           return 0;
 
11094
-
 
11095
          return ALTIVEC_REGNO_P (last_regno);
 
11096
        }
 
11097
     }
 
11098
@@ -1897,14 +1894,16 @@
 
11099
   if (rs6000_vector_unit[m] != VECTOR_NONE
 
11100
       || rs6000_vector_mem[m] != VECTOR_NONE
 
11101
       || (reg_addr[m].reload_store != CODE_FOR_nothing)
 
11102
-      || (reg_addr[m].reload_load != CODE_FOR_nothing))
 
11103
+      || (reg_addr[m].reload_load != CODE_FOR_nothing)
 
11104
+      || reg_addr[m].scalar_in_vmx_p)
 
11105
     {
 
11106
       fprintf (stderr,
 
11107
-              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
 
11108
+              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
 
11109
               rs6000_debug_vector_unit (rs6000_vector_unit[m]),
 
11110
               rs6000_debug_vector_unit (rs6000_vector_mem[m]),
 
11111
               (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
 
11112
-              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
 
11113
+              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
 
11114
+              (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
 
11115
     }
 
11116
 
 
11117
   fputs ("\n", stderr);
 
11118
@@ -2021,6 +2020,10 @@
 
11119
           "wd reg_class = %s\n"
 
11120
           "wf reg_class = %s\n"
 
11121
           "wg reg_class = %s\n"
 
11122
+          "wh reg_class = %s\n"
 
11123
+          "wi reg_class = %s\n"
 
11124
+          "wj reg_class = %s\n"
 
11125
+          "wk reg_class = %s\n"
 
11126
           "wl reg_class = %s\n"
 
11127
           "wm reg_class = %s\n"
 
11128
           "wr reg_class = %s\n"
 
11129
@@ -2040,6 +2043,10 @@
 
11130
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
 
11131
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
 
11132
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
 
11133
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
 
11134
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
 
11135
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
 
11136
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
 
11137
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
 
11138
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
 
11139
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
 
11140
@@ -2324,6 +2331,8 @@
 
11141
 
 
11142
   for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
11143
     {
 
11144
+      enum machine_mode m2 = (enum machine_mode)m;
 
11145
+
 
11146
       /* SDmode is special in that we want to access it only via REG+REG
 
11147
         addressing on power7 and above, since we want to use the LFIWZX and
 
11148
         STFIWZX instructions to load it.  */
 
11149
@@ -2358,13 +2367,12 @@
 
11150
 
 
11151
              if (TARGET_UPDATE
 
11152
                  && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
 
11153
-                 && GET_MODE_SIZE (m) <= 8
 
11154
-                 && !VECTOR_MODE_P (m)
 
11155
-                 && !COMPLEX_MODE_P (m)
 
11156
+                 && GET_MODE_SIZE (m2) <= 8
 
11157
+                 && !VECTOR_MODE_P (m2)
 
11158
+                 && !COMPLEX_MODE_P (m2)
 
11159
                  && !indexed_only_p
 
11160
-                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
 
11161
-                 && !(m == DFmode && TARGET_UPPER_REGS_DF)
 
11162
-                 && !(m == SFmode && TARGET_UPPER_REGS_SF))
 
11163
+                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
 
11164
+                 && !reg_addr[m2].scalar_in_vmx_p)
 
11165
                {
 
11166
                  addr_mask |= RELOAD_REG_PRE_INCDEC;
 
11167
 
 
11168
@@ -2595,16 +2603,22 @@
 
11169
        f  - Register class to use with traditional SFmode instructions.
 
11170
        v  - Altivec register.
 
11171
        wa - Any VSX register.
 
11172
+       wc - Reserved to represent individual CR bits (used in LLVM).
 
11173
        wd - Preferred register class for V2DFmode.
 
11174
        wf - Preferred register class for V4SFmode.
 
11175
        wg - Float register for power6x move insns.
 
11176
+       wh - FP register for direct move instructions.
 
11177
+       wi - FP or VSX register to hold 64-bit integers for VSX insns.
 
11178
+       wj - FP or VSX register to hold 64-bit integers for direct moves.
 
11179
+       wk - FP or VSX register to hold 64-bit doubles for direct moves.
 
11180
        wl - Float register if we can do 32-bit signed int loads.
 
11181
        wm - VSX register for ISA 2.07 direct move operations.
 
11182
+       wn - always NO_REGS.
 
11183
        wr - GPR if 64-bit mode is permitted.
 
11184
        ws - Register class to do ISA 2.06 DF operations.
 
11185
+       wt - VSX register for TImode in VSX registers.
 
11186
        wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
 
11187
        wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
 
11188
-       wt - VSX register for TImode in VSX registers.
 
11189
        ww - Register class to do SF conversions in with VSX operations.
 
11190
        wx - Float register if we can do 32-bit int stores.
 
11191
        wy - Register class to do ISA 2.07 SF operations.
 
11192
@@ -2611,21 +2625,22 @@
 
11193
        wz - Float register if we can do 32-bit unsigned int loads.  */
 
11194
 
 
11195
   if (TARGET_HARD_FLOAT && TARGET_FPRS)
 
11196
-    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
 
11197
+    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;      /* SFmode  */
 
11198
 
 
11199
   if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
 
11200
-    rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
 
11201
+    rs6000_constraints[RS6000_CONSTRAINT_d]  = FLOAT_REGS;     /* DFmode  */
 
11202
 
 
11203
   if (TARGET_VSX)
 
11204
     {
 
11205
       rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
 
11206
-      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
 
11207
-      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
 
11208
+      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;     /* V2DFmode  */
 
11209
+      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;     /* V4SFmode  */
 
11210
+      rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS;   /* DImode  */
 
11211
 
 
11212
       if (TARGET_VSX_TIMODE)
 
11213
-       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
 
11214
+       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;    /* TImode  */
 
11215
 
 
11216
-      if (TARGET_UPPER_REGS_DF)
 
11217
+      if (TARGET_UPPER_REGS_DF)                                        /* DFmode  */
 
11218
        {
 
11219
          rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
 
11220
          rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
 
11221
@@ -2639,19 +2654,26 @@
 
11222
   if (TARGET_ALTIVEC)
 
11223
     rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
 
11224
 
 
11225
-  if (TARGET_MFPGPR)
 
11226
+  if (TARGET_MFPGPR)                                           /* DFmode  */
 
11227
     rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
 
11228
 
 
11229
   if (TARGET_LFIWAX)
 
11230
-    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
 
11231
+    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;     /* DImode  */
 
11232
 
 
11233
   if (TARGET_DIRECT_MOVE)
 
11234
-    rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
11235
+    {
 
11236
+      rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
 
11237
+      rs6000_constraints[RS6000_CONSTRAINT_wj]                 /* DImode  */
 
11238
+       = rs6000_constraints[RS6000_CONSTRAINT_wi];
 
11239
+      rs6000_constraints[RS6000_CONSTRAINT_wk]                 /* DFmode  */
 
11240
+       = rs6000_constraints[RS6000_CONSTRAINT_ws];
 
11241
+      rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
11242
+    }
 
11243
 
 
11244
   if (TARGET_POWERPC64)
 
11245
     rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
 
11246
 
 
11247
-  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
 
11248
+  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
 
11249
     {
 
11250
       rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
 
11251
       rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
 
11252
@@ -2666,10 +2688,10 @@
 
11253
     rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
 
11254
 
 
11255
   if (TARGET_STFIWX)
 
11256
-    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
 
11257
+    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;     /* DImode  */
 
11258
 
 
11259
   if (TARGET_LFIWZX)
 
11260
-    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
 
11261
+    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;     /* DImode  */
 
11262
 
 
11263
   /* Set up the reload helper and direct move functions.  */
 
11264
   if (TARGET_VSX || TARGET_ALTIVEC)
 
11265
@@ -2692,10 +2714,11 @@
 
11266
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_di_load;
 
11267
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
11268
            {
 
11269
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_di_store;
 
11270
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_di_load;
 
11271
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_di_store;
 
11272
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_di_load;
 
11273
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_di_store;
 
11274
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_di_load;
 
11275
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
11276
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_di_store;
 
11277
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_di_load;
 
11278
            }
 
11279
          if (TARGET_P8_VECTOR)
 
11280
            {
 
11281
@@ -2703,6 +2726,8 @@
 
11282
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_di_load;
 
11283
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_di_store;
 
11284
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_di_load;
 
11285
+             if (TARGET_UPPER_REGS_SF)
 
11286
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
11287
            }
 
11288
          if (TARGET_VSX_TIMODE)
 
11289
            {
 
11290
@@ -2759,10 +2784,11 @@
 
11291
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_si_load;
 
11292
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
11293
            {
 
11294
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_si_store;
 
11295
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_si_load;
 
11296
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_si_store;
 
11297
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_si_load;
 
11298
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_si_store;
 
11299
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_si_load;
 
11300
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
11301
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_si_store;
 
11302
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_si_load;
 
11303
            }
 
11304
          if (TARGET_P8_VECTOR)
 
11305
            {
 
11306
@@ -2770,6 +2796,8 @@
 
11307
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_si_load;
 
11308
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_si_store;
 
11309
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_si_load;
 
11310
+             if (TARGET_UPPER_REGS_SF)
 
11311
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
11312
            }
 
11313
          if (TARGET_VSX_TIMODE)
 
11314
            {
 
11315
@@ -2810,6 +2838,7 @@
 
11316
 
 
11317
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
11318
        {
 
11319
+         enum machine_mode m2 = (enum machine_mode)m;
 
11320
          int reg_size2 = reg_size;
 
11321
 
 
11322
          /* TFmode/TDmode always takes 2 registers, even in VSX.  */
 
11323
@@ -2818,7 +2847,7 @@
 
11324
            reg_size2 = UNITS_PER_FP_WORD;
 
11325
 
 
11326
          rs6000_class_max_nregs[m][c]
 
11327
-           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
 
11328
+           = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
 
11329
        }
 
11330
     }
 
11331
 
 
11332
@@ -3014,7 +3043,8 @@
 
11333
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
 
11334
          | ((TARGET_HTM)                   ? RS6000_BTM_HTM       : 0)
 
11335
          | ((TARGET_DFP)                   ? RS6000_BTM_DFP       : 0)
 
11336
-         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0));
 
11337
+         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0)
 
11338
+         | ((TARGET_LONG_DOUBLE_128)       ? RS6000_BTM_LDBL128 : 0));
 
11339
 }
 
11340
 
 
11341
 /* Override command line options.  Mostly we process the processor type and
 
11342
@@ -5861,6 +5891,34 @@
 
11343
   return align;
 
11344
 }
 
11345
 
 
11346
+/* Previous GCC releases forced all vector types to have 16-byte alignment.  */
 
11347
+
 
11348
+bool
 
11349
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
 
11350
+{
 
11351
+  if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
 
11352
+    {
 
11353
+      if (computed != 128)
 
11354
+       {
 
11355
+         static bool warned;
 
11356
+         if (!warned && warn_psabi)
 
11357
+           {
 
11358
+             warned = true;
 
11359
+             inform (input_location,
 
11360
+                     "the layout of aggregates containing vectors with"
 
11361
+                     " %d-byte alignment will change in a future GCC release",
 
11362
+                     computed / BITS_PER_UNIT);
 
11363
+           }
 
11364
+       }
 
11365
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
11366
+        keep the special treatment of vector types, but warn if there will
 
11367
+        be differences in future GCC releases.  */
 
11368
+      return true;
 
11369
+    }
 
11370
+
 
11371
+  return false;
 
11372
+}
 
11373
+
 
11374
 /* AIX increases natural record alignment to doubleword if the first
 
11375
    field is an FP double while the FP fields remain word aligned.  */
 
11376
 
 
11377
@@ -6109,7 +6167,8 @@
 
11378
     return false;
 
11379
 
 
11380
   extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
 
11381
-  gcc_assert (extra >= 0);
 
11382
+  if (extra < 0)
 
11383
+    extra = 0;
 
11384
 
 
11385
   if (GET_CODE (addr) == LO_SUM)
 
11386
     /* For lo_sum addresses, we must allow any offset except one that
 
11387
@@ -9198,14 +9257,51 @@
 
11388
           || (type && TREE_CODE (type) == VECTOR_TYPE
 
11389
               && int_size_in_bytes (type) >= 16))
 
11390
     return 128;
 
11391
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
 
11392
-           || DEFAULT_ABI == ABI_ELFv2
 
11393
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
 
11394
-          && mode == BLKmode
 
11395
-          && type && TYPE_ALIGN (type) > 64)
 
11396
+
 
11397
+  /* Aggregate types that need > 8 byte alignment are quadword-aligned
 
11398
+     in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
 
11399
+     -mcompat-align-parm is used.  */
 
11400
+  if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
 
11401
+       || DEFAULT_ABI == ABI_ELFv2)
 
11402
+      && type && TYPE_ALIGN (type) > 64)
 
11403
+    {
 
11404
+      /* "Aggregate" means any AGGREGATE_TYPE except for single-element
 
11405
+         or homogeneous float/vector aggregates here.  We already handled
 
11406
+         vector aggregates above, but still need to check for float here. */
 
11407
+      bool aggregate_p = (AGGREGATE_TYPE_P (type)
 
11408
+                         && !SCALAR_FLOAT_MODE_P (elt_mode));
 
11409
+
 
11410
+      /* We used to check for BLKmode instead of the above aggregate type
 
11411
+        check.  Warn when this results in any difference to the ABI.  */
 
11412
+      if (aggregate_p != (mode == BLKmode))
 
11413
+       {
 
11414
+         static bool warned;
 
11415
+         if (!warned && warn_psabi)
 
11416
+           {
 
11417
+             warned = true;
 
11418
+             inform (input_location,
 
11419
+                     "the ABI of passing aggregates with %d-byte alignment"
 
11420
+                     " will change in a future GCC release",
 
11421
+                     (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
 
11422
+           }
 
11423
+       }
 
11424
+
 
11425
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
11426
+        keep using the BLKmode check, but warn if there will be differences
 
11427
+        in future GCC releases.  */
 
11428
+      if (mode == BLKmode)
 
11429
+       return 128;
 
11430
+    }
 
11431
+
 
11432
+  /* Similar for the Darwin64 ABI.  Note that for historical reasons we
 
11433
+     implement the "aggregate type" check as a BLKmode check here; this
 
11434
+     means certain aggregate types are in fact not aligned.  */
 
11435
+  if (TARGET_MACHO && rs6000_darwin64_abi
 
11436
+      && mode == BLKmode
 
11437
+      && type && TYPE_ALIGN (type) > 64)
 
11438
     return 128;
 
11439
-  else
 
11440
-    return PARM_BOUNDARY;
 
11441
+
 
11442
+  return PARM_BOUNDARY;
 
11443
 }
 
11444
 
 
11445
 /* The offset in words to the start of the parameter save area.  */
 
11446
@@ -10243,6 +10339,7 @@
 
11447
          rtx r, off;
 
11448
          int i, k = 0;
 
11449
          unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
 
11450
+         int fpr_words;
 
11451
 
 
11452
          /* Do we also need to pass this argument in the parameter
 
11453
             save area?  */
 
11454
@@ -10271,6 +10368,37 @@
 
11455
              rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
 
11456
            }
 
11457
 
 
11458
+         /* If there were not enough FPRs to hold the argument, the rest
 
11459
+            usually goes into memory.  However, if the current position
 
11460
+            is still within the register parameter area, a portion may
 
11461
+            actually have to go into GPRs.
 
11462
+
 
11463
+            Note that it may happen that the portion of the argument
 
11464
+            passed in the first "half" of the first GPR was already
 
11465
+            passed in the last FPR as well.
 
11466
+
 
11467
+            For unnamed arguments, we already set up GPRs to cover the
 
11468
+            whole argument in rs6000_psave_function_arg, so there is
 
11469
+            nothing further to do at this point.
 
11470
+
 
11471
+            GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
 
11472
+            GCC releases.  To avoid any ABI change on the release branch,
 
11473
+            we retain that original implementation here, but warn if we
 
11474
+            encounter a case where the ABI will change in the future.  */
 
11475
+         fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
 
11476
+         if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
 
11477
+             && cum->nargs_prototype > 0)
 
11478
+            {
 
11479
+             static bool warned;
 
11480
+             if (!warned && warn_psabi)
 
11481
+               {
 
11482
+                 warned = true;
 
11483
+                 inform (input_location,
 
11484
+                         "the ABI of passing homogeneous float aggregates"
 
11485
+                         " will change in a future GCC release");
 
11486
+               }
 
11487
+           }
 
11488
+
 
11489
          return rs6000_finish_function_arg (mode, rvec, k);
 
11490
        }
 
11491
       else if (align_words < GP_ARG_NUM_REG)
 
11492
@@ -10497,10 +10625,9 @@
 
11493
    list, or passes any parameter in memory.  */
 
11494
 
 
11495
 static bool
 
11496
-rs6000_function_parms_need_stack (tree fun)
 
11497
+rs6000_function_parms_need_stack (tree fun, bool incoming)
 
11498
 {
 
11499
-  function_args_iterator args_iter;
 
11500
-  tree arg_type;
 
11501
+  tree fntype, result;
 
11502
   CUMULATIVE_ARGS args_so_far_v;
 
11503
   cumulative_args_t args_so_far;
 
11504
 
 
11505
@@ -10507,26 +10634,57 @@
 
11506
   if (!fun)
 
11507
     /* Must be a libcall, all of which only use reg parms.  */
 
11508
     return false;
 
11509
+
 
11510
+  fntype = fun;
 
11511
   if (!TYPE_P (fun))
 
11512
-    fun = TREE_TYPE (fun);
 
11513
+    fntype = TREE_TYPE (fun);
 
11514
 
 
11515
   /* Varargs functions need the parameter save area.  */
 
11516
-  if (!prototype_p (fun) || stdarg_p (fun))
 
11517
+  if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
 
11518
     return true;
 
11519
 
 
11520
-  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
 
11521
+  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
 
11522
   args_so_far = pack_cumulative_args (&args_so_far_v);
 
11523
 
 
11524
-  if (aggregate_value_p (TREE_TYPE (fun), fun))
 
11525
+  /* When incoming, we will have been passed the function decl.
 
11526
+     It is necessary to use the decl to handle K&R style functions,
 
11527
+     where TYPE_ARG_TYPES may not be available.  */
 
11528
+  if (incoming)
 
11529
     {
 
11530
-      tree type = build_pointer_type (TREE_TYPE (fun));
 
11531
-      rs6000_parm_needs_stack (args_so_far, type);
 
11532
+      gcc_assert (DECL_P (fun));
 
11533
+      result = DECL_RESULT (fun);
 
11534
     }
 
11535
+  else
 
11536
+    result = TREE_TYPE (fntype);
 
11537
 
 
11538
-  FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
 
11539
-    if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
11540
-      return true;
 
11541
+  if (result && aggregate_value_p (result, fntype))
 
11542
+    {
 
11543
+      if (!TYPE_P (result))
 
11544
+       result = TREE_TYPE (result);
 
11545
+      result = build_pointer_type (result);
 
11546
+      rs6000_parm_needs_stack (args_so_far, result);
 
11547
+    }
 
11548
 
 
11549
+  if (incoming)
 
11550
+    {
 
11551
+      tree parm;
 
11552
+
 
11553
+      for (parm = DECL_ARGUMENTS (fun);
 
11554
+          parm && parm != void_list_node;
 
11555
+          parm = TREE_CHAIN (parm))
 
11556
+       if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
 
11557
+         return true;
 
11558
+    }
 
11559
+  else
 
11560
+    {
 
11561
+      function_args_iterator args_iter;
 
11562
+      tree arg_type;
 
11563
+
 
11564
+      FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
 
11565
+       if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
11566
+         return true;
 
11567
+    }
 
11568
+
 
11569
   return false;
 
11570
 }
 
11571
 
 
11572
@@ -10537,7 +10695,7 @@
 
11573
    all parameters in registers.  */
 
11574
 
 
11575
 int
 
11576
-rs6000_reg_parm_stack_space (tree fun)
 
11577
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
 
11578
 {
 
11579
   int reg_parm_stack_space;
 
11580
 
 
11581
@@ -10555,7 +10713,7 @@
 
11582
     case ABI_ELFv2:
 
11583
       /* ??? Recomputing this every time is a bit expensive.  Is there
 
11584
         a place to cache this information?  */
 
11585
-      if (rs6000_function_parms_need_stack (fun))
 
11586
+      if (rs6000_function_parms_need_stack (fun, incoming))
 
11587
        reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
 
11588
       else
 
11589
        reg_parm_stack_space = 0;
 
11590
@@ -13544,11 +13702,15 @@
 
11591
   else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
11592
           == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
11593
     error ("Builtin function %s requires the -mhard-dfp and"
 
11594
-          "-mpower8-vector options", name);
 
11595
+          " -mpower8-vector options", name);
 
11596
   else if ((fnmask & RS6000_BTM_DFP) != 0)
 
11597
     error ("Builtin function %s requires the -mhard-dfp option", name);
 
11598
   else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
 
11599
     error ("Builtin function %s requires the -mpower8-vector option", name);
 
11600
+  else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
11601
+          == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
11602
+    error ("Builtin function %s requires the -mhard-float and"
 
11603
+          " -mlong-double-128 options", name);
 
11604
   else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
 
11605
     error ("Builtin function %s requires the -mhard-float option", name);
 
11606
   else
 
11607
@@ -13649,8 +13811,8 @@
 
11608
     case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
 
11609
     case ALTIVEC_BUILTIN_MASK_FOR_STORE:
 
11610
       {
 
11611
-       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
 
11612
-                    : (int) CODE_FOR_altivec_lvsl);
 
11613
+       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
 
11614
+                    : (int) CODE_FOR_altivec_lvsl_direct);
 
11615
        enum machine_mode tmode = insn_data[icode].operand[0].mode;
 
11616
        enum machine_mode mode = insn_data[icode].operand[1].mode;
 
11617
        tree arg;
 
11618
@@ -13678,7 +13840,6 @@
 
11619
            || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
 
11620
          target = gen_reg_rtx (tmode);
 
11621
 
 
11622
-       /*pat = gen_altivec_lvsr (target, op);*/
 
11623
        pat = GEN_FCN (icode) (target, op);
 
11624
        if (!pat)
 
11625
          return 0;
 
11626
@@ -17099,7 +17260,14 @@
 
11627
      prefer Altivec loads..  */
 
11628
   if (rclass == VSX_REGS)
 
11629
     {
 
11630
-      if (GET_MODE_SIZE (mode) <= 8)
 
11631
+      if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
 
11632
+       {
 
11633
+         rtx addr = XEXP (x, 0);
 
11634
+         if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
 
11635
+             || legitimate_lo_sum_address_p (mode, addr, false))
 
11636
+           return FLOAT_REGS;
 
11637
+       }
 
11638
+      else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
 
11639
        return FLOAT_REGS;
 
11640
 
 
11641
       if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
 
11642
@@ -31413,6 +31581,7 @@
 
11643
   { "htm",              RS6000_BTM_HTM,        false, false },
 
11644
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
 
11645
   { "hard-float",       RS6000_BTM_HARD_FLOAT, false, false },
 
11646
+  { "long-double-128",  RS6000_BTM_LDBL128,    false, false },
 
11647
 };
 
11648
 
 
11649
 /* Option variables that we want to support inside attribute((target)) and
 
11650
@@ -32663,25 +32832,14 @@
 
11651
 
 
11652
 /* Return true if the peephole2 can combine a load involving a combination of
 
11653
    an addis instruction and a load with an offset that can be fused together on
 
11654
-   a power8.
 
11655
+   a power8.  */
 
11656
 
 
11657
-   The operands are:
 
11658
-       operands[0]     register set with addis
 
11659
-       operands[1]     value set via addis
 
11660
-       operands[2]     target register being loaded
 
11661
-       operands[3]     D-form memory reference using operands[0].
 
11662
-
 
11663
-   In addition, we are passed a boolean that is true if this is a peephole2,
 
11664
-   and we can use see if the addis_reg is dead after the insn and can be
 
11665
-   replaced by the target register.  */
 
11666
-
 
11667
 bool
 
11668
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
 
11669
+fusion_gpr_load_p (rtx addis_reg,      /* register set via addis.  */
 
11670
+                  rtx addis_value,     /* addis value.  */
 
11671
+                  rtx target,          /* target register that is loaded.  */
 
11672
+                  rtx mem)             /* bottom part of the memory addr. */
 
11673
 {
 
11674
-  rtx addis_reg = operands[0];
 
11675
-  rtx addis_value = operands[1];
 
11676
-  rtx target = operands[2];
 
11677
-  rtx mem = operands[3];
 
11678
   rtx addr;
 
11679
   rtx base_reg;
 
11680
 
 
11681
@@ -32695,9 +32853,6 @@
 
11682
   if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
 
11683
     return false;
 
11684
 
 
11685
-  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
11686
-    return false;
 
11687
-
 
11688
   /* Allow sign/zero extension.  */
 
11689
   if (GET_CODE (mem) == ZERO_EXTEND
 
11690
       || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
 
11691
@@ -32706,22 +32861,22 @@
 
11692
   if (!MEM_P (mem))
 
11693
     return false;
 
11694
 
 
11695
+  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
11696
+    return false;
 
11697
+
 
11698
   addr = XEXP (mem, 0);                        /* either PLUS or LO_SUM.  */
 
11699
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11700
     return false;
 
11701
 
 
11702
   /* Validate that the register used to load the high value is either the
 
11703
-     register being loaded, or we can safely replace its use in a peephole2.
 
11704
+     register being loaded, or we can safely replace its use.
 
11705
 
 
11706
-     If this is a peephole2, we assume that there are 2 instructions in the
 
11707
-     peephole (addis and load), so we want to check if the target register was
 
11708
-     not used in the memory address and the register to hold the addis result
 
11709
-     is dead after the peephole.  */
 
11710
+     This function is only called from the peephole2 pass and we assume that
 
11711
+     there are 2 instructions in the peephole (addis and load), so we want to
 
11712
+     check if the target register was not used in the memory address and the
 
11713
+     register to hold the addis result is dead after the peephole.  */
 
11714
   if (REGNO (addis_reg) != REGNO (target))
 
11715
     {
 
11716
-      if (!peep2_p)
 
11717
-       return false;
 
11718
-
 
11719
       if (reg_mentioned_p (target, mem))
 
11720
        return false;
 
11721
 
 
11722
@@ -32762,9 +32917,6 @@
 
11723
   enum machine_mode extend_mode = target_mode;
 
11724
   enum machine_mode ptr_mode = Pmode;
 
11725
   enum rtx_code extend = UNKNOWN;
 
11726
-  rtx addis_reg = ((ptr_mode == target_mode)
 
11727
-                  ? target
 
11728
-                  : simplify_subreg (ptr_mode, target, target_mode, 0));
 
11729
 
 
11730
   if (GET_CODE (orig_mem) == ZERO_EXTEND
 
11731
       || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
 
11732
@@ -32781,13 +32933,14 @@
 
11733
   gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
 
11734
 
 
11735
   offset = XEXP (orig_addr, 1);
 
11736
-  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
 
11737
-  new_mem = change_address (orig_mem, target_mode, new_addr);
 
11738
+  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
 
11739
+  new_mem = replace_equiv_address_nv (orig_mem, new_addr);
 
11740
 
 
11741
   if (extend != UNKNOWN)
 
11742
     new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
 
11743
 
 
11744
-  emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
 
11745
+  new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
 
11746
+                           UNSPEC_FUSION_GPR);
 
11747
   emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
 
11748
 
 
11749
   if (extend == SIGN_EXTEND)
 
11750
@@ -32806,55 +32959,40 @@
 
11751
 }
 
11752
 
 
11753
 /* Return a string to fuse an addis instruction with a gpr load to the same
 
11754
-   register that we loaded up the addis instruction.  The code is complicated,
 
11755
-   so we call output_asm_insn directly, and just return "".
 
11756
+   register that we loaded up the addis instruction.  The address that is used
 
11757
+   is the logical address that was formed during peephole2:
 
11758
+       (lo_sum (high) (low-part))
 
11759
 
 
11760
-   The operands are:
 
11761
-       operands[0]     register set with addis (must be same reg as target).
 
11762
-       operands[1]     value set via addis
 
11763
-       operands[2]     target register being loaded
 
11764
-       operands[3]     D-form memory reference using operands[0].  */
 
11765
+   The code is complicated, so we call output_asm_insn directly, and just
 
11766
+   return "".  */
 
11767
 
 
11768
 const char *
 
11769
-emit_fusion_gpr_load (rtx *operands)
 
11770
+emit_fusion_gpr_load (rtx target, rtx mem)
 
11771
 {
 
11772
-  rtx addis_reg = operands[0];
 
11773
-  rtx addis_value = operands[1];
 
11774
-  rtx target = operands[2];
 
11775
-  rtx mem = operands[3];
 
11776
+  rtx addis_value;
 
11777
   rtx fuse_ops[10];
 
11778
   rtx addr;
 
11779
   rtx load_offset;
 
11780
   const char *addis_str = NULL;
 
11781
   const char *load_str = NULL;
 
11782
-  const char *extend_insn = NULL;
 
11783
   const char *mode_name = NULL;
 
11784
   char insn_template[80];
 
11785
   enum machine_mode mode;
 
11786
   const char *comment_str = ASM_COMMENT_START;
 
11787
-  bool sign_p = false;
 
11788
 
 
11789
-  gcc_assert (REG_P (addis_reg) && REG_P (target));
 
11790
-  gcc_assert (REGNO (addis_reg) == REGNO (target));
 
11791
+  if (GET_CODE (mem) == ZERO_EXTEND)
 
11792
+    mem = XEXP (mem, 0);
 
11793
 
 
11794
+  gcc_assert (REG_P (target) && MEM_P (mem));
 
11795
+
 
11796
   if (*comment_str == ' ')
 
11797
     comment_str++;
 
11798
 
 
11799
-  /* Allow sign/zero extension.  */
 
11800
-  if (GET_CODE (mem) == ZERO_EXTEND)
 
11801
-    mem = XEXP (mem, 0);
 
11802
-
 
11803
-  else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
 
11804
-    {
 
11805
-      sign_p = true;
 
11806
-      mem = XEXP (mem, 0);
 
11807
-    }
 
11808
-
 
11809
-  gcc_assert (MEM_P (mem));
 
11810
   addr = XEXP (mem, 0);
 
11811
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11812
     gcc_unreachable ();
 
11813
 
 
11814
+  addis_value = XEXP (addr, 0);
 
11815
   load_offset = XEXP (addr, 1);
 
11816
 
 
11817
   /* Now emit the load instruction to the same register.  */
 
11818
@@ -32864,29 +33002,22 @@
 
11819
     case QImode:
 
11820
       mode_name = "char";
 
11821
       load_str = "lbz";
 
11822
-      extend_insn = "extsb %0,%0";
 
11823
       break;
 
11824
 
 
11825
     case HImode:
 
11826
       mode_name = "short";
 
11827
       load_str = "lhz";
 
11828
-      extend_insn = "extsh %0,%0";
 
11829
       break;
 
11830
 
 
11831
     case SImode:
 
11832
       mode_name = "int";
 
11833
       load_str = "lwz";
 
11834
-      extend_insn = "extsw %0,%0";
 
11835
       break;
 
11836
 
 
11837
     case DImode:
 
11838
-      if (TARGET_POWERPC64)
 
11839
-       {
 
11840
-         mode_name = "long";
 
11841
-         load_str = "ld";
 
11842
-       }
 
11843
-      else
 
11844
-       gcc_unreachable ();
 
11845
+      gcc_assert (TARGET_POWERPC64);
 
11846
+      mode_name = "long";
 
11847
+      load_str = "ld";
 
11848
       break;
 
11849
 
 
11850
     default:
 
11851
@@ -33030,14 +33161,6 @@
 
11852
   else
 
11853
     fatal_insn ("Unable to generate load offset for fusion", load_offset);
 
11854
 
 
11855
-  /* Handle sign extension.  The peephole2 pass generates this as a separate
 
11856
-     insn, but we handle it just in case it got reattached.  */
 
11857
-  if (sign_p)
 
11858
-    {
 
11859
-      gcc_assert (extend_insn != NULL);
 
11860
-      output_asm_insn (extend_insn, fuse_ops);
 
11861
-    }
 
11862
-
 
11863
   return "";
 
11864
 }
 
11865
 
 
11866
Index: gcc/config/rs6000/vsx.md
 
11867
===================================================================
 
11868
--- a/src/gcc/config/rs6000/vsx.md      (.../tags/gcc_4_8_3_release)
 
11869
+++ b/src/gcc/config/rs6000/vsx.md      (.../branches/gcc-4_8-branch)
 
11870
@@ -24,6 +24,13 @@
 
11871
 ;; Iterator for the 2 64-bit vector types
 
11872
 (define_mode_iterator VSX_D [V2DF V2DI])
 
11873
 
 
11874
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
 
11875
+;; lxvd2x to properly handle swapping words on little endian
 
11876
+(define_mode_iterator VSX_LE [V2DF
 
11877
+                             V2DI
 
11878
+                             V1TI
 
11879
+                             (TI       "VECTOR_MEM_VSX_P (TImode)")])
 
11880
+
 
11881
 ;; Iterator for the 2 32-bit vector types
 
11882
 (define_mode_iterator VSX_W [V4SF V4SI])
 
11883
 
 
11884
@@ -79,19 +86,26 @@
 
11885
                         (V4SF  "wf")
 
11886
                         (V2DI  "wd")
 
11887
                         (V2DF  "wd")
 
11888
+                        (DI    "wi")
 
11889
                         (DF    "ws")
 
11890
-                        (SF    "d")
 
11891
+                        (SF    "ww")
 
11892
                         (V1TI  "v")
 
11893
                         (TI    "wt")])
 
11894
 
 
11895
-;; Map the register class used for float<->int conversions
 
11896
+;; Map the register class used for float<->int conversions (floating point side)
 
11897
+;; VSr2 is the preferred register class, VSr3 is any register class that will
 
11898
+;; hold the data
 
11899
 (define_mode_attr VSr2 [(V2DF  "wd")
 
11900
                         (V4SF  "wf")
 
11901
-                        (DF    "ws")])
 
11902
+                        (DF    "ws")
 
11903
+                        (SF    "ww")
 
11904
+                        (DI    "wi")])
 
11905
 
 
11906
 (define_mode_attr VSr3 [(V2DF  "wa")
 
11907
                         (V4SF  "wa")
 
11908
-                        (DF    "ws")])
 
11909
+                        (DF    "ws")
 
11910
+                        (SF    "ww")
 
11911
+                        (DI    "wi")])
 
11912
 
 
11913
 ;; Map the register class for sp<->dp float conversions, destination
 
11914
 (define_mode_attr VSr4 [(SF    "ws")
 
11915
@@ -99,12 +113,27 @@
 
11916
                         (V2DF  "wd")
 
11917
                         (V4SF  "v")])
 
11918
 
 
11919
-;; Map the register class for sp<->dp float conversions, destination
 
11920
+;; Map the register class for sp<->dp float conversions, source
 
11921
 (define_mode_attr VSr5 [(SF    "ws")
 
11922
                         (DF    "f")
 
11923
                         (V2DF  "v")
 
11924
                         (V4SF  "wd")])
 
11925
 
 
11926
+;; The VSX register class that a type can occupy, even if it is not the
 
11927
+;; preferred register class (VSr is the preferred register class that will get
 
11928
+;; allocated first).
 
11929
+(define_mode_attr VSa  [(V16QI "wa")
 
11930
+                        (V8HI  "wa")
 
11931
+                        (V4SI  "wa")
 
11932
+                        (V4SF  "wa")
 
11933
+                        (V2DI  "wa")
 
11934
+                        (V2DF  "wa")
 
11935
+                        (DI    "wi")
 
11936
+                        (DF    "ws")
 
11937
+                        (SF    "ww")
 
11938
+                        (V1TI  "wa")
 
11939
+                        (TI    "wt")])
 
11940
+
 
11941
 ;; Same size integer type for floating point data
 
11942
 (define_mode_attr VSi [(V4SF  "v4si")
 
11943
                       (V2DF  "v2di")
 
11944
@@ -200,6 +229,16 @@
 
11945
                             (V2DF      "V4DF")
 
11946
                             (V1TI      "V2TI")])
 
11947
 
 
11948
+;; Map register class for 64-bit element in 128-bit vector for direct moves
 
11949
+;; to/from gprs
 
11950
+(define_mode_attr VS_64dm [(V2DF       "wk")
 
11951
+                          (V2DI        "wj")])
 
11952
+
 
11953
+;; Map register class for 64-bit element in 128-bit vector for normal register
 
11954
+;; to register moves
 
11955
+(define_mode_attr VS_64reg [(V2DF      "ws")
 
11956
+                           (V2DI       "wi")])
 
11957
+
 
11958
 ;; Constants for creating unspecs
 
11959
 (define_c_enum "unspec"
 
11960
   [UNSPEC_VSX_CONCAT
 
11961
@@ -228,8 +267,8 @@
 
11962
 ;; The patterns for LE permuted loads and stores come before the general
 
11963
 ;; VSX moves so they match first.
 
11964
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
11965
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
11966
-        (match_operand:VSX_D 1 "memory_operand" "Z"))]
 
11967
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
11968
+        (match_operand:VSX_LE 1 "memory_operand" "Z"))]
 
11969
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11970
   "#"
 
11971
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11972
@@ -251,7 +290,7 @@
 
11973
    (set_attr "length" "8")])
 
11974
 
 
11975
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
11976
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
11977
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
11978
         (match_operand:VSX_W 1 "memory_operand" "Z"))]
 
11979
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11980
   "#"
 
11981
@@ -342,8 +381,8 @@
 
11982
    (set_attr "length" "8")])
 
11983
 
 
11984
 (define_insn "*vsx_le_perm_store_<mode>"
 
11985
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
11986
-        (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
 
11987
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
11988
+        (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
 
11989
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11990
   "#"
 
11991
   [(set_attr "type" "vecstore")
 
11992
@@ -350,8 +389,8 @@
 
11993
    (set_attr "length" "12")])
 
11994
 
 
11995
 (define_split
 
11996
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
11997
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
11998
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
11999
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
12000
   "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
 
12001
   [(set (match_dup 2)
 
12002
         (vec_select:<MODE>
 
12003
@@ -369,8 +408,8 @@
 
12004
 ;; The post-reload split requires that we re-permute the source
 
12005
 ;; register in case it is still live.
 
12006
 (define_split
 
12007
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
12008
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
12009
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
12010
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
12011
   "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
 
12012
   [(set (match_dup 1)
 
12013
         (vec_select:<MODE>
 
12014
@@ -388,7 +427,7 @@
 
12015
 
 
12016
 (define_insn "*vsx_le_perm_store_<mode>"
 
12017
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
12018
-        (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
 
12019
+        (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
 
12020
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
12021
   "#"
 
12022
   [(set_attr "type" "vecstore")
 
12023
@@ -578,8 +617,8 @@
 
12024
 
 
12025
 
 
12026
 (define_insn "*vsx_mov<mode>"
 
12027
-  [(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")
 
12028
-       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
12029
+  [(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")
 
12030
+       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
12031
   "VECTOR_MEM_VSX_P (<MODE>mode)
 
12032
    && (register_operand (operands[0], <MODE>mode) 
 
12033
        || register_operand (operands[1], <MODE>mode))"
 
12034
@@ -681,9 +720,9 @@
 
12035
 ;; instructions are now combined with the insn for the traditional floating
 
12036
 ;; point unit.
 
12037
 (define_insn "*vsx_add<mode>3"
 
12038
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12039
-        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12040
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12041
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12042
+        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12043
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12044
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12045
   "xvadd<VSs> %x0,%x1,%x2"
 
12046
   [(set_attr "type" "<VStype_simple>")
 
12047
@@ -690,9 +729,9 @@
 
12048
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12049
 
 
12050
 (define_insn "*vsx_sub<mode>3"
 
12051
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12052
-        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12053
-                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12054
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12055
+        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12056
+                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12057
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12058
   "xvsub<VSs> %x0,%x1,%x2"
 
12059
   [(set_attr "type" "<VStype_simple>")
 
12060
@@ -699,9 +738,9 @@
 
12061
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12062
 
 
12063
 (define_insn "*vsx_mul<mode>3"
 
12064
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12065
-        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12066
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12067
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12068
+        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12069
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12070
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12071
   "xvmul<VSs> %x0,%x1,%x2"
 
12072
   [(set_attr "type" "<VStype_simple>")
 
12073
@@ -708,9 +747,9 @@
 
12074
    (set_attr "fp_type" "<VSfptype_mul>")])
 
12075
 
 
12076
 (define_insn "*vsx_div<mode>3"
 
12077
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12078
-        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12079
-                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12080
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12081
+        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12082
+                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12083
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12084
   "xvdiv<VSs> %x0,%x1,%x2"
 
12085
   [(set_attr "type" "<VStype_div>")
 
12086
@@ -746,8 +785,8 @@
 
12087
 
 
12088
 (define_insn "*vsx_tdiv<mode>3_internal"
 
12089
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
12090
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
 
12091
-                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
 
12092
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12093
+                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
12094
                   UNSPEC_VSX_TDIV))]
 
12095
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12096
   "x<VSv>tdiv<VSs> %0,%x1,%x2"
 
12097
@@ -755,8 +794,8 @@
 
12098
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12099
 
 
12100
 (define_insn "vsx_fre<mode>2"
 
12101
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12102
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
12103
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12104
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12105
                      UNSPEC_FRES))]
 
12106
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12107
   "xvre<VSs> %x0,%x1"
 
12108
@@ -764,8 +803,8 @@
 
12109
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12110
 
 
12111
 (define_insn "*vsx_neg<mode>2"
 
12112
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12113
-        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
12114
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12115
+        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12116
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12117
   "xvneg<VSs> %x0,%x1"
 
12118
   [(set_attr "type" "<VStype_simple>")
 
12119
@@ -772,8 +811,8 @@
 
12120
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12121
 
 
12122
 (define_insn "*vsx_abs<mode>2"
 
12123
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12124
-        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
12125
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12126
+        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12127
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12128
   "xvabs<VSs> %x0,%x1"
 
12129
   [(set_attr "type" "<VStype_simple>")
 
12130
@@ -780,10 +819,10 @@
 
12131
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12132
 
 
12133
 (define_insn "vsx_nabs<mode>2"
 
12134
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12135
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12136
         (neg:VSX_F
 
12137
         (abs:VSX_F
 
12138
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
 
12139
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
 
12140
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12141
   "xvnabs<VSs> %x0,%x1"
 
12142
   [(set_attr "type" "<VStype_simple>")
 
12143
@@ -790,9 +829,9 @@
 
12144
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12145
 
 
12146
 (define_insn "vsx_smax<mode>3"
 
12147
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12148
-        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12149
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12150
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12151
+        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12152
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12153
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12154
   "xvmax<VSs> %x0,%x1,%x2"
 
12155
   [(set_attr "type" "<VStype_simple>")
 
12156
@@ -799,9 +838,9 @@
 
12157
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12158
 
 
12159
 (define_insn "*vsx_smin<mode>3"
 
12160
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12161
-        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12162
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12163
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12164
+        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12165
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12166
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12167
   "xvmin<VSs> %x0,%x1,%x2"
 
12168
   [(set_attr "type" "<VStype_simple>")
 
12169
@@ -808,8 +847,8 @@
 
12170
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12171
 
 
12172
 (define_insn "*vsx_sqrt<mode>2"
 
12173
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12174
-        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
12175
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12176
+        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12177
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12178
   "xvsqrt<VSs> %x0,%x1"
 
12179
   [(set_attr "type" "<VStype_sqrt>")
 
12180
@@ -816,8 +855,8 @@
 
12181
    (set_attr "fp_type" "<VSfptype_sqrt>")])
 
12182
 
 
12183
 (define_insn "*vsx_rsqrte<mode>2"
 
12184
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12185
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
12186
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12187
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12188
                      UNSPEC_RSQRT))]
 
12189
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12190
   "xvrsqrte<VSs> %x0,%x1"
 
12191
@@ -852,7 +891,7 @@
 
12192
 
 
12193
 (define_insn "*vsx_tsqrt<mode>2_internal"
 
12194
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
12195
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
12196
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12197
                     UNSPEC_VSX_TSQRT))]
 
12198
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12199
   "x<VSv>tsqrt<VSs> %0,%x1"
 
12200
@@ -865,11 +904,11 @@
 
12201
 ;; multiply.
 
12202
 
 
12203
 (define_insn "*vsx_fmav4sf4"
 
12204
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
 
12205
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
 
12206
        (fma:V4SF
 
12207
-         (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
 
12208
-         (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
 
12209
-         (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
 
12210
+         (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
 
12211
+         (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
 
12212
+         (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
 
12213
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
12214
   "@
 
12215
    xvmaddasp %x0,%x1,%x2
 
12216
@@ -880,11 +919,11 @@
 
12217
   [(set_attr "type" "vecfloat")])
 
12218
 
 
12219
 (define_insn "*vsx_fmav2df4"
 
12220
-  [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
 
12221
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
 
12222
        (fma:V2DF
 
12223
-         (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
 
12224
-         (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
 
12225
-         (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
 
12226
+         (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
 
12227
+         (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
 
12228
+         (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
 
12229
   "VECTOR_UNIT_VSX_P (V2DFmode)"
 
12230
   "@
 
12231
    xvmaddadp %x0,%x1,%x2
 
12232
@@ -894,12 +933,12 @@
 
12233
   [(set_attr "type" "vecdouble")])
 
12234
 
 
12235
 (define_insn "*vsx_fms<mode>4"
 
12236
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
12237
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
12238
        (fma:VSX_F
 
12239
-         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
 
12240
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
12241
+         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
 
12242
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
12243
          (neg:VSX_F
 
12244
-           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
12245
+           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
12246
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12247
   "@
 
12248
    xvmsuba<VSs> %x0,%x1,%x2
 
12249
@@ -909,12 +948,12 @@
 
12250
   [(set_attr "type" "<VStype_mul>")])
 
12251
 
 
12252
 (define_insn "*vsx_nfma<mode>4"
 
12253
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
12254
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
12255
        (neg:VSX_F
 
12256
         (fma:VSX_F
 
12257
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
 
12258
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
12259
-         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
12260
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
 
12261
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
12262
+         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
12263
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12264
   "@
 
12265
    xvnmadda<VSs> %x0,%x1,%x2
 
12266
@@ -959,9 +998,9 @@
 
12267
 
 
12268
 ;; Vector conditional expressions (no scalar version for these instructions)
 
12269
 (define_insn "vsx_eq<mode>"
 
12270
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12271
-       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12272
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12273
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12274
+       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12275
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12276
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12277
   "xvcmpeq<VSs> %x0,%x1,%x2"
 
12278
   [(set_attr "type" "<VStype_simple>")
 
12279
@@ -968,9 +1007,9 @@
 
12280
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12281
 
 
12282
 (define_insn "vsx_gt<mode>"
 
12283
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12284
-       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12285
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12286
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12287
+       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12288
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12289
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12290
   "xvcmpgt<VSs> %x0,%x1,%x2"
 
12291
   [(set_attr "type" "<VStype_simple>")
 
12292
@@ -977,9 +1016,9 @@
 
12293
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12294
 
 
12295
 (define_insn "*vsx_ge<mode>"
 
12296
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12297
-       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12298
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
12299
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12300
+       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12301
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12302
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12303
   "xvcmpge<VSs> %x0,%x1,%x2"
 
12304
   [(set_attr "type" "<VStype_simple>")
 
12305
@@ -990,10 +1029,10 @@
 
12306
 (define_insn "*vsx_eq_<mode>_p"
 
12307
   [(set (reg:CC 74)
 
12308
        (unspec:CC
 
12309
-        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
12310
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
12311
+        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
12312
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
12313
         UNSPEC_PREDICATE))
 
12314
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12315
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12316
        (eq:VSX_F (match_dup 1)
 
12317
                  (match_dup 2)))]
 
12318
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12319
@@ -1003,10 +1042,10 @@
 
12320
 (define_insn "*vsx_gt_<mode>_p"
 
12321
   [(set (reg:CC 74)
 
12322
        (unspec:CC
 
12323
-        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
12324
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
12325
+        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
12326
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
12327
         UNSPEC_PREDICATE))
 
12328
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12329
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12330
        (gt:VSX_F (match_dup 1)
 
12331
                  (match_dup 2)))]
 
12332
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12333
@@ -1016,10 +1055,10 @@
 
12334
 (define_insn "*vsx_ge_<mode>_p"
 
12335
   [(set (reg:CC 74)
 
12336
        (unspec:CC
 
12337
-        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
12338
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
12339
+        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
12340
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
12341
         UNSPEC_PREDICATE))
 
12342
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12343
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12344
        (ge:VSX_F (match_dup 1)
 
12345
                  (match_dup 2)))]
 
12346
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12347
@@ -1028,23 +1067,23 @@
 
12348
 
 
12349
 ;; Vector select
 
12350
 (define_insn "*vsx_xxsel<mode>"
 
12351
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
12352
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12353
        (if_then_else:VSX_L
 
12354
-        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
12355
+        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12356
                (match_operand:VSX_L 4 "zero_constant" ""))
 
12357
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
12358
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
12359
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
12360
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12361
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12362
   "xxsel %x0,%x3,%x2,%x1"
 
12363
   [(set_attr "type" "vecperm")])
 
12364
 
 
12365
 (define_insn "*vsx_xxsel<mode>_uns"
 
12366
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
12367
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12368
        (if_then_else:VSX_L
 
12369
-        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
12370
+        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12371
                   (match_operand:VSX_L 4 "zero_constant" ""))
 
12372
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
12373
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
12374
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
12375
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12376
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12377
   "xxsel %x0,%x3,%x2,%x1"
 
12378
   [(set_attr "type" "vecperm")])
 
12379
@@ -1051,10 +1090,10 @@
 
12380
 
 
12381
 ;; Copy sign
 
12382
 (define_insn "vsx_copysign<mode>3"
 
12383
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12384
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12385
        (unspec:VSX_F
 
12386
-        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
12387
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
 
12388
+        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
12389
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
12390
         UNSPEC_COPYSIGN))]
 
12391
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12392
   "xvcpsgn<VSs> %x0,%x2,%x1"
 
12393
@@ -1067,7 +1106,7 @@
 
12394
 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
 
12395
 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
 
12396
 (define_insn "vsx_float<VSi><mode>2"
 
12397
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
12398
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
12399
        (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
12400
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12401
   "x<VSv>cvsx<VSc><VSs> %x0,%x1"
 
12402
@@ -1075,7 +1114,7 @@
 
12403
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12404
 
 
12405
 (define_insn "vsx_floatuns<VSi><mode>2"
 
12406
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
12407
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
12408
        (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
12409
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12410
   "x<VSv>cvux<VSc><VSs> %x0,%x1"
 
12411
@@ -1084,7 +1123,7 @@
 
12412
 
 
12413
 (define_insn "vsx_fix_trunc<mode><VSi>2"
 
12414
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
12415
-       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
12416
+       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
12417
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12418
   "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
 
12419
   [(set_attr "type" "<VStype_simple>")
 
12420
@@ -1092,7 +1131,7 @@
 
12421
 
 
12422
 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
 
12423
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
12424
-       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
12425
+       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
12426
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12427
   "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
 
12428
   [(set_attr "type" "<VStype_simple>")
 
12429
@@ -1100,8 +1139,8 @@
 
12430
 
 
12431
 ;; Math rounding functions
 
12432
 (define_insn "vsx_x<VSv>r<VSs>i"
 
12433
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
12434
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
12435
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12436
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12437
                      UNSPEC_VSX_ROUND_I))]
 
12438
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12439
   "x<VSv>r<VSs>i %x0,%x1"
 
12440
@@ -1109,8 +1148,8 @@
 
12441
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12442
 
 
12443
 (define_insn "vsx_x<VSv>r<VSs>ic"
 
12444
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
12445
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
12446
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12447
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12448
                      UNSPEC_VSX_ROUND_IC))]
 
12449
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12450
   "x<VSv>r<VSs>ic %x0,%x1"
 
12451
@@ -1118,8 +1157,8 @@
 
12452
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12453
 
 
12454
 (define_insn "vsx_btrunc<mode>2"
 
12455
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12456
-       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
12457
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12458
+       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
12459
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12460
   "xvr<VSs>iz %x0,%x1"
 
12461
   [(set_attr "type" "<VStype_simple>")
 
12462
@@ -1126,8 +1165,8 @@
 
12463
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12464
 
 
12465
 (define_insn "*vsx_b2trunc<mode>2"
 
12466
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
12467
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
12468
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12469
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12470
                      UNSPEC_FRIZ))]
 
12471
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12472
   "x<VSv>r<VSs>iz %x0,%x1"
 
12473
@@ -1135,8 +1174,8 @@
 
12474
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12475
 
 
12476
 (define_insn "vsx_floor<mode>2"
 
12477
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12478
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
12479
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12480
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12481
                      UNSPEC_FRIM))]
 
12482
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12483
   "xvr<VSs>im %x0,%x1"
 
12484
@@ -1144,8 +1183,8 @@
 
12485
    (set_attr "fp_type" "<VSfptype_simple>")])
 
12486
 
 
12487
 (define_insn "vsx_ceil<mode>2"
 
12488
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
12489
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
12490
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12491
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
12492
                      UNSPEC_FRIP))]
 
12493
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12494
   "xvr<VSs>ip %x0,%x1"
 
12495
@@ -1160,8 +1199,8 @@
 
12496
 ;; scalar single precision instructions internally use the double format.
 
12497
 ;; Prefer the altivec registers, since we likely will need to do a vperm
 
12498
 (define_insn "vsx_<VS_spdp_insn>"
 
12499
-  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
 
12500
-       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
 
12501
+  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
 
12502
+       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
 
12503
                              UNSPEC_VSX_CVSPDP))]
 
12504
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
12505
   "<VS_spdp_insn> %x0,%x1"
 
12506
@@ -1169,8 +1208,8 @@
 
12507
 
 
12508
 ;; xscvspdp, represent the scalar SF type as V4SF
 
12509
 (define_insn "vsx_xscvspdp"
 
12510
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
12511
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
12512
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
 
12513
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
 
12514
                   UNSPEC_VSX_CVSPDP))]
 
12515
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
12516
   "xscvspdp %x0,%x1"
 
12517
@@ -1197,7 +1236,7 @@
 
12518
 
 
12519
 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
 
12520
 (define_insn "vsx_xscvdpspn"
 
12521
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
 
12522
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
 
12523
        (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
 
12524
                     UNSPEC_VSX_CVDPSPN))]
 
12525
   "TARGET_XSCVDPSPN"
 
12526
@@ -1205,8 +1244,8 @@
 
12527
   [(set_attr "type" "fp")])
 
12528
 
 
12529
 (define_insn "vsx_xscvspdpn"
 
12530
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
12531
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
12532
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
 
12533
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
 
12534
                   UNSPEC_VSX_CVSPDPN))]
 
12535
   "TARGET_XSCVSPDPN"
 
12536
   "xscvspdpn %x0,%x1"
 
12537
@@ -1213,8 +1252,8 @@
 
12538
   [(set_attr "type" "fp")])
 
12539
 
 
12540
 (define_insn "vsx_xscvdpspn_scalar"
 
12541
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
 
12542
-       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
 
12543
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
 
12544
+       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
 
12545
                     UNSPEC_VSX_CVDPSPN))]
 
12546
   "TARGET_XSCVDPSPN"
 
12547
   "xscvdpspn %x0,%x1"
 
12548
@@ -1302,10 +1341,10 @@
 
12549
 ;; since the xsrdpiz instruction does not truncate the value if the floating
 
12550
 ;; point value is < LONG_MIN or > LONG_MAX.
 
12551
 (define_insn "*vsx_float_fix_<mode>2"
 
12552
-  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
 
12553
+  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12554
        (float:VSX_DF
 
12555
         (fix:<VSI>
 
12556
-         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
 
12557
+         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
 
12558
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
12559
    && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
 
12560
    && !flag_trapping_math && TARGET_FRIZ"
 
12561
@@ -1318,10 +1357,10 @@
 
12562
 
 
12563
 ;; Build a V2DF/V2DI vector from two scalars
 
12564
 (define_insn "vsx_concat_<mode>"
 
12565
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
 
12566
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12567
        (vec_concat:VSX_D
 
12568
-        (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
 
12569
-        (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
 
12570
+        (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
12571
+        (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
 
12572
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12573
 {
 
12574
   if (BYTES_BIG_ENDIAN)
 
12575
@@ -1352,9 +1391,9 @@
 
12576
 ;; xxpermdi for little endian loads and stores.  We need several of
 
12577
 ;; these since the form of the PARALLEL differs by mode.
 
12578
 (define_insn "*vsx_xxpermdi2_le_<mode>"
 
12579
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
12580
-        (vec_select:VSX_D
 
12581
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
12582
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
12583
+        (vec_select:VSX_LE
 
12584
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
12585
           (parallel [(const_int 1) (const_int 0)])))]
 
12586
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12587
   "xxpermdi %x0,%x1,%x1,2"
 
12588
@@ -1361,9 +1400,9 @@
 
12589
   [(set_attr "type" "vecperm")])
 
12590
 
 
12591
 (define_insn "*vsx_xxpermdi4_le_<mode>"
 
12592
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
12593
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
12594
         (vec_select:VSX_W
 
12595
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
12596
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
12597
           (parallel [(const_int 2) (const_int 3)
 
12598
                      (const_int 0) (const_int 1)])))]
 
12599
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12600
@@ -1401,9 +1440,9 @@
 
12601
 ;; lxvd2x for little endian loads.  We need several of
 
12602
 ;; these since the form of the PARALLEL differs by mode.
 
12603
 (define_insn "*vsx_lxvd2x2_le_<mode>"
 
12604
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
12605
-        (vec_select:VSX_D
 
12606
-          (match_operand:VSX_D 1 "memory_operand" "Z")
 
12607
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
12608
+        (vec_select:VSX_LE
 
12609
+          (match_operand:VSX_LE 1 "memory_operand" "Z")
 
12610
           (parallel [(const_int 1) (const_int 0)])))]
 
12611
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12612
   "lxvd2x %x0,%y1"
 
12613
@@ -1410,7 +1449,7 @@
 
12614
   [(set_attr "type" "vecload")])
 
12615
 
 
12616
 (define_insn "*vsx_lxvd2x4_le_<mode>"
 
12617
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
12618
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
12619
         (vec_select:VSX_W
 
12620
           (match_operand:VSX_W 1 "memory_operand" "Z")
 
12621
           (parallel [(const_int 2) (const_int 3)
 
12622
@@ -1450,9 +1489,9 @@
 
12623
 ;; stxvd2x for little endian stores.  We need several of
 
12624
 ;; these since the form of the PARALLEL differs by mode.
 
12625
 (define_insn "*vsx_stxvd2x2_le_<mode>"
 
12626
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
12627
-        (vec_select:VSX_D
 
12628
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
12629
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
12630
+        (vec_select:VSX_LE
 
12631
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
12632
           (parallel [(const_int 1) (const_int 0)])))]
 
12633
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12634
   "stxvd2x %x1,%y0"
 
12635
@@ -1461,7 +1500,7 @@
 
12636
 (define_insn "*vsx_stxvd2x4_le_<mode>"
 
12637
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
12638
         (vec_select:VSX_W
 
12639
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
12640
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
12641
           (parallel [(const_int 2) (const_int 3)
 
12642
                      (const_int 0) (const_int 1)])))]
 
12643
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12644
@@ -1513,11 +1552,12 @@
 
12645
 
 
12646
 ;; Set the element of a V2DI/VD2F mode
 
12647
 (define_insn "vsx_set_<mode>"
 
12648
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
 
12649
-       (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
 
12650
-                      (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
 
12651
-                      (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
12652
-                     UNSPEC_VSX_SET))]
 
12653
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
 
12654
+       (unspec:VSX_D
 
12655
+        [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
 
12656
+         (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
12657
+         (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
12658
+        UNSPEC_VSX_SET))]
 
12659
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12660
 {
 
12661
   int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
 
12662
@@ -1582,7 +1622,7 @@
 
12663
 (define_insn_and_split "vsx_extract_v4sf"
 
12664
   [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
 
12665
        (vec_select:SF
 
12666
-        (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
 
12667
+        (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
 
12668
         (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
 
12669
    (clobber (match_scratch:V4SF 3 "=X,0"))]
 
12670
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
12671
@@ -1606,7 +1646,7 @@
 
12672
     {
 
12673
       if (GET_CODE (op3) == SCRATCH)
 
12674
        op3 = gen_reg_rtx (V4SFmode);
 
12675
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
 
12676
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
 
12677
       tmp = op3;
 
12678
     }
 
12679
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
 
12680
@@ -1765,9 +1805,9 @@
 
12681
 
 
12682
 ;; V2DF/V2DI splat
 
12683
 (define_insn "vsx_splat_<mode>"
 
12684
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
 
12685
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
 
12686
        (vec_duplicate:VSX_D
 
12687
-        (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
 
12688
+        (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
 
12689
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12690
   "@
 
12691
    xxpermdi %x0,%x1,%x1,0
 
12692
@@ -1780,10 +1820,10 @@
 
12693
 
 
12694
 ;; V4SF/V4SI splat
 
12695
 (define_insn "vsx_xxspltw_<mode>"
 
12696
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12697
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12698
        (vec_duplicate:VSX_W
 
12699
         (vec_select:<VS_scalar>
 
12700
-         (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12701
+         (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12702
          (parallel
 
12703
           [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
 
12704
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12705
@@ -1796,8 +1836,8 @@
 
12706
   [(set_attr "type" "vecperm")])
 
12707
 
 
12708
 (define_insn "vsx_xxspltw_<mode>_direct"
 
12709
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12710
-        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12711
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12712
+        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12713
                        (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
 
12714
                       UNSPEC_VSX_XXSPLTW))]
 
12715
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12716
@@ -1806,11 +1846,11 @@
 
12717
 
 
12718
 ;; V4SF/V4SI interleave
 
12719
 (define_insn "vsx_xxmrghw_<mode>"
 
12720
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12721
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12722
         (vec_select:VSX_W
 
12723
          (vec_concat:<VS_double>
 
12724
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12725
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
 
12726
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12727
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
 
12728
          (parallel [(const_int 0) (const_int 4)
 
12729
                     (const_int 1) (const_int 5)])))]
 
12730
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12731
@@ -1823,11 +1863,11 @@
 
12732
   [(set_attr "type" "vecperm")])
 
12733
 
 
12734
 (define_insn "vsx_xxmrglw_<mode>"
 
12735
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12736
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12737
        (vec_select:VSX_W
 
12738
          (vec_concat:<VS_double>
 
12739
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12740
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
 
12741
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12742
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
 
12743
          (parallel [(const_int 2) (const_int 6)
 
12744
                     (const_int 3) (const_int 7)])))]
 
12745
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12746
@@ -1841,9 +1881,9 @@
 
12747
 
 
12748
 ;; Shift left double by word immediate
 
12749
 (define_insn "vsx_xxsldwi_<mode>"
 
12750
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
 
12751
-       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
 
12752
-                      (match_operand:VSX_L 2 "vsx_register_operand" "wa")
 
12753
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
 
12754
+       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
 
12755
+                      (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
 
12756
                       (match_operand:QI 3 "u5bit_cint_operand" "i")]
 
12757
                      UNSPEC_VSX_SLDWI))]
 
12758
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12759
@@ -1924,7 +1964,7 @@
 
12760
 ;; to the top element of the V2DF array without doing an extract.
 
12761
 
 
12762
 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
 
12763
-  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
 
12764
+  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
 
12765
        (vec_select:DF
 
12766
         (VEC_reduc:V2DF
 
12767
          (vec_concat:V2DF
 
12768
Index: gcc/config/rs6000/rs6000.h
 
12769
===================================================================
 
12770
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_8_3_release)
 
12771
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_8-branch)
 
12772
@@ -1438,6 +1438,10 @@
 
12773
   RS6000_CONSTRAINT_wd,                /* VSX register for V2DF */
 
12774
   RS6000_CONSTRAINT_wf,                /* VSX register for V4SF */
 
12775
   RS6000_CONSTRAINT_wg,                /* FPR register for -mmfpgpr */
 
12776
+  RS6000_CONSTRAINT_wh,                /* FPR register for direct moves.  */
 
12777
+  RS6000_CONSTRAINT_wi,                /* FPR/VSX register to hold DImode */
 
12778
+  RS6000_CONSTRAINT_wj,                /* FPR/VSX register for DImode direct moves. */
 
12779
+  RS6000_CONSTRAINT_wk,                /* FPR/VSX register for DFmode direct moves. */
 
12780
   RS6000_CONSTRAINT_wl,                /* FPR register for LFIWAX */
 
12781
   RS6000_CONSTRAINT_wm,                /* VSX register for direct move */
 
12782
   RS6000_CONSTRAINT_wr,                /* GPR register if 64-bit  */
 
12783
@@ -1462,6 +1466,9 @@
 
12784
 #define VSX_REG_CLASS_P(CLASS)                 \
 
12785
   ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
 
12786
 
 
12787
+/* Return whether a given register class targets general purpose registers.  */
 
12788
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
 
12789
+
 
12790
 /* Given an rtx X being reloaded into a reg required to be
 
12791
    in class CLASS, return the class of reg to actually use.
 
12792
    In general this is just CLASS; but on some machines
 
12793
@@ -1593,8 +1600,15 @@
 
12794
 /* Define this if stack space is still allocated for a parameter passed
 
12795
    in a register.  The value is the number of bytes allocated to this
 
12796
    area.  */
 
12797
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
 
12798
+#define REG_PARM_STACK_SPACE(FNDECL) \
 
12799
+  rs6000_reg_parm_stack_space ((FNDECL), false)
 
12800
 
 
12801
+/* Define this macro if space guaranteed when compiling a function body
 
12802
+   is different to space required when making a call, a situation that
 
12803
+   can arise with K&R style function definitions.  */
 
12804
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
 
12805
+  rs6000_reg_parm_stack_space ((FNDECL), true)
 
12806
+
 
12807
 /* Define this if the above stack space is to be considered part of the
 
12808
    space allocated by the caller.  */
 
12809
 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
 
12810
@@ -2483,8 +2497,8 @@
 
12811
 #define RS6000_BTC_SAT         RS6000_BTC_MISC /* saturate sets VSCR.  */
 
12812
 
 
12813
 /* Builtin targets.  For now, we reuse the masks for those options that are in
 
12814
-   target flags, and pick two random bits for SPE and paired which aren't in
 
12815
-   target_flags.  */
 
12816
+   target flags, and pick three random bits for SPE, paired and ldbl128 which
 
12817
+   aren't in target_flags.  */
 
12818
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
 
12819
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
 
12820
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
 
12821
@@ -2501,6 +2515,7 @@
 
12822
 #define RS6000_BTM_CELL                MASK_FPRND      /* Target is cell powerpc.  */
 
12823
 #define RS6000_BTM_DFP         MASK_DFP        /* Decimal floating point.  */
 
12824
 #define RS6000_BTM_HARD_FLOAT  MASK_SOFT_FLOAT /* Hardware floating point.  */
 
12825
+#define RS6000_BTM_LDBL128     MASK_MULTIPLE   /* 128-bit long double.  */
 
12826
 
 
12827
 #define RS6000_BTM_COMMON      (RS6000_BTM_ALTIVEC                     \
 
12828
                                 | RS6000_BTM_VSX                       \
 
12829
@@ -2514,7 +2529,8 @@
 
12830
                                 | RS6000_BTM_POPCNTD                   \
 
12831
                                 | RS6000_BTM_CELL                      \
 
12832
                                 | RS6000_BTM_DFP                       \
 
12833
-                                | RS6000_BTM_HARD_FLOAT)
 
12834
+                                | RS6000_BTM_HARD_FLOAT                \
 
12835
+                                | RS6000_BTM_LDBL128)
 
12836
 
 
12837
 /* Define builtin enum index.  */
 
12838
 
 
12839
Index: gcc/config/rs6000/altivec.md
 
12840
===================================================================
 
12841
--- a/src/gcc/config/rs6000/altivec.md  (.../tags/gcc_4_8_3_release)
 
12842
+++ b/src/gcc/config/rs6000/altivec.md  (.../branches/gcc-4_8-branch)
 
12843
@@ -2297,7 +2297,31 @@
 
12844
   "dststt %0,%1,%2"
 
12845
   [(set_attr "type" "vecsimple")])
 
12846
 
 
12847
-(define_insn "altivec_lvsl"
 
12848
+(define_expand "altivec_lvsl"
 
12849
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
12850
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
12851
+  "TARGET_ALTIVEC"
 
12852
+{
 
12853
+  if (VECTOR_ELT_ORDER_BIG)
 
12854
+    emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
 
12855
+  else
 
12856
+    {
 
12857
+      int i;
 
12858
+      rtx mask, perm[16], constv, vperm;
 
12859
+      mask = gen_reg_rtx (V16QImode);
 
12860
+      emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
 
12861
+      for (i = 0; i < 16; ++i)
 
12862
+        perm[i] = GEN_INT (i);
 
12863
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
12864
+      constv = force_reg (V16QImode, constv);
 
12865
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
12866
+                              UNSPEC_VPERM);
 
12867
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
12868
+    }
 
12869
+  DONE;
 
12870
+})
 
12871
+
 
12872
+(define_insn "altivec_lvsl_direct"
 
12873
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
12874
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
12875
                      UNSPEC_LVSL))]
 
12876
@@ -2305,7 +2329,31 @@
 
12877
   "lvsl %0,%y1"
 
12878
   [(set_attr "type" "vecload")])
 
12879
 
 
12880
-(define_insn "altivec_lvsr"
 
12881
+(define_expand "altivec_lvsr"
 
12882
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
12883
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
12884
+  "TARGET_ALTIVEC"
 
12885
+{
 
12886
+  if (VECTOR_ELT_ORDER_BIG)
 
12887
+    emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
 
12888
+  else
 
12889
+    {
 
12890
+      int i;
 
12891
+      rtx mask, perm[16], constv, vperm;
 
12892
+      mask = gen_reg_rtx (V16QImode);
 
12893
+      emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
 
12894
+      for (i = 0; i < 16; ++i)
 
12895
+        perm[i] = GEN_INT (i);
 
12896
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
12897
+      constv = force_reg (V16QImode, constv);
 
12898
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
12899
+                              UNSPEC_VPERM);
 
12900
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
12901
+    }
 
12902
+  DONE;
 
12903
+})
 
12904
+
 
12905
+(define_insn "altivec_lvsr_direct"
 
12906
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
12907
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
12908
                      UNSPEC_LVSR))]
 
12909
Index: gcc/config/rs6000/rs6000.md
 
12910
===================================================================
 
12911
--- a/src/gcc/config/rs6000/rs6000.md   (.../tags/gcc_4_8_3_release)
 
12912
+++ b/src/gcc/config/rs6000/rs6000.md   (.../branches/gcc-4_8-branch)
 
12913
@@ -134,6 +134,7 @@
 
12914
    UNSPEC_UNPACK_128BIT
 
12915
    UNSPEC_PACK_128BIT
 
12916
    UNSPEC_LSQ
 
12917
+   UNSPEC_FUSION_GPR
 
12918
   ])
 
12919
 
 
12920
 ;;
 
12921
@@ -317,8 +318,25 @@
 
12922
 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0")  (SD "stxsiwzx %x1,%y0")])
 
12923
 
 
12924
 ; Definitions for 32-bit fpr direct move
 
12925
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
 
12926
+; At present, the decimal modes are not allowed in the traditional altivec
 
12927
+; registers, so restrict the constraints to just the traditional FPRs.
 
12928
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
 
12929
 
 
12930
+; Definitions for 32-bit VSX
 
12931
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
 
12932
+
 
12933
+; Definitions for 32-bit use of altivec registers
 
12934
+(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
 
12935
+
 
12936
+; Definitions for 64-bit VSX
 
12937
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
 
12938
+
 
12939
+; Definitions for 64-bit direct move
 
12940
+(define_mode_attr f64_dm  [(DF "wk") (DD "wh")])
 
12941
+
 
12942
+; Definitions for 64-bit use of altivec registers
 
12943
+(define_mode_attr f64_av  [(DF "wv") (DD "wn")])
 
12944
+
 
12945
 ; These modes do not fit in integer registers in 32-bit mode.
 
12946
 ; but on e500v2, the gpr are 64 bit registers
 
12947
 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
 
12948
@@ -424,7 +442,7 @@
 
12949
 ;; either.
 
12950
 
 
12951
 ;; Mode attribute for boolean operation register constraints for output
 
12952
-(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wa,v")
 
12953
+(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wt,v")
 
12954
                                         (PTI   "&r,r,r")
 
12955
                                         (V16QI "wa,v,&?r,?r,?r")
 
12956
                                         (V8HI  "wa,v,&?r,?r,?r")
 
12957
@@ -435,7 +453,7 @@
 
12958
                                         (V1TI  "wa,v,&?r,?r,?r")])
 
12959
 
 
12960
 ;; Mode attribute for boolean operation register constraints for operand1
 
12961
-(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wa,v")
 
12962
+(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wt,v")
 
12963
                                         (PTI   "r,0,r")
 
12964
                                         (V16QI "wa,v,r,0,r")
 
12965
                                         (V8HI  "wa,v,r,0,r")
 
12966
@@ -446,7 +464,7 @@
 
12967
                                         (V1TI  "wa,v,r,0,r")])
 
12968
 
 
12969
 ;; Mode attribute for boolean operation register constraints for operand2
 
12970
-(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wa,v")
 
12971
+(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wt,v")
 
12972
                                         (PTI   "r,r,0")
 
12973
                                         (V16QI "wa,v,r,r,0")
 
12974
                                         (V8HI  "wa,v,r,r,0")
 
12975
@@ -459,7 +477,7 @@
 
12976
 ;; Mode attribute for boolean operation register constraints for operand1
 
12977
 ;; for one_cmpl.  To simplify things, we repeat the constraint where 0
 
12978
 ;; is used for operand1 or operand2
 
12979
-(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wa,v")
 
12980
+(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wt,v")
 
12981
                                         (PTI   "r,0,0")
 
12982
                                         (V16QI "wa,v,r,0,0")
 
12983
                                         (V8HI  "wa,v,r,0,0")
 
12984
@@ -566,7 +584,7 @@
 
12985
   "")
 
12986
 
 
12987
 (define_insn "*zero_extendsidi2_lfiwzx"
 
12988
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
 
12989
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
 
12990
        (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
 
12991
   "TARGET_POWERPC64 && TARGET_LFIWZX"
 
12992
   "@
 
12993
@@ -736,8 +754,8 @@
 
12994
   "")
 
12995
 
 
12996
 (define_insn "*extendsidi2_lfiwax"
 
12997
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
 
12998
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
 
12999
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
 
13000
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
 
13001
   "TARGET_POWERPC64 && TARGET_LFIWAX"
 
13002
   "@
 
13003
    lwa%U1%X1 %0,%1
 
13004
@@ -760,7 +778,7 @@
 
13005
 
 
13006
 (define_insn "*extendsidi2_nocell"
 
13007
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 
13008
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
 
13009
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
 
13010
   "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
 
13011
   "@
 
13012
    lwa%U1%X1 %0,%1
 
13013
@@ -5614,7 +5632,7 @@
 
13014
 ; We don't define lfiwax/lfiwzx with the normal definition, because we
 
13015
 ; don't want to support putting SImode in FPR registers.
 
13016
 (define_insn "lfiwax"
 
13017
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
13018
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
13019
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
13020
                   UNSPEC_LFIWAX))]
 
13021
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
 
13022
@@ -5694,7 +5712,7 @@
 
13023
    (set_attr "type" "fpload")])
 
13024
 
 
13025
 (define_insn "lfiwzx"
 
13026
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
13027
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
13028
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
13029
                   UNSPEC_LFIWZX))]
 
13030
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
 
13031
@@ -9210,8 +9228,8 @@
 
13032
 }")
 
13033
 
 
13034
 (define_insn "mov<mode>_hardfloat"
 
13035
-  [(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")
 
13036
-       (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"))]
 
13037
+  [(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")
 
13038
+       (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"))]
 
13039
   "(gpc_reg_operand (operands[0], <MODE>mode)
 
13040
    || gpc_reg_operand (operands[1], <MODE>mode))
 
13041
    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
 
13042
@@ -9422,8 +9440,8 @@
 
13043
 ;; reloading.
 
13044
 
 
13045
 (define_insn "*mov<mode>_hardfloat32"
 
13046
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
 
13047
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
 
13048
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
 
13049
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
 
13050
   "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
 
13051
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
13052
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
13053
@@ -9491,8 +9509,8 @@
 
13054
 ; ld/std require word-aligned displacements -> 'Y' constraint.
 
13055
 ; List Y->r and r->Y before r->r for reload.
 
13056
 (define_insn "*mov<mode>_hardfloat64"
 
13057
-  [(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")
 
13058
-       (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"))]
 
13059
+  [(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>")
 
13060
+       (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"))]
 
13061
   "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
13062
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
13063
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
13064
@@ -10272,8 +10290,8 @@
 
13065
 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
 
13066
 
 
13067
 (define_insn "*movdi_internal64"
 
13068
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
 
13069
-       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
 
13070
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
 
13071
+       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
 
13072
   "TARGET_POWERPC64
 
13073
    && (gpc_reg_operand (operands[0], DImode)
 
13074
        || gpc_reg_operand (operands[1], DImode))"
 
13075
@@ -10293,7 +10311,8 @@
 
13076
    mftgpr %0,%1
 
13077
    mffgpr %0,%1
 
13078
    mfvsrd %0,%x1
 
13079
-   mtvsrd %x0,%1"
 
13080
+   mtvsrd %x0,%1
 
13081
+   xxlxor %x0,%x0,%x0"
 
13082
   [(set_attr_alternative "type"
 
13083
       [(if_then_else
 
13084
         (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
 
13085
@@ -10334,8 +10353,9 @@
 
13086
        (const_string "mftgpr")
 
13087
        (const_string "mffgpr")
 
13088
        (const_string "mftgpr")
 
13089
-       (const_string "mffgpr")])
 
13090
-   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
 
13091
+       (const_string "mffgpr")
 
13092
+       (const_string "vecsimple")])
 
13093
+   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
 
13094
 
 
13095
 ;; immediate value valid for a single instruction hiding in a const_double
 
13096
 (define_insn ""
 
13097
@@ -15751,23 +15771,10 @@
 
13098
 ;; a GPR.  The addis instruction must be adjacent to the load, and use the same
 
13099
 ;; register that is being loaded.  The fused ops must be physically adjacent.
 
13100
 
 
13101
-;; We use define_peephole for the actual addis/load, and the register used to
 
13102
-;; hold the addis value must be the same as the register being loaded.  We use
 
13103
-;; define_peephole2 to change the register used for addis to be the register
 
13104
-;; being loaded, since we can look at whether it is dead after the load insn.
 
13105
+;; Find cases where the addis that feeds into a load instruction is either used
 
13106
+;; once or is the same as the target register, and replace it with the fusion
 
13107
+;; insn
 
13108
 
 
13109
-(define_peephole
 
13110
-  [(set (match_operand:P 0 "base_reg_operand" "")
 
13111
-       (match_operand:P 1 "fusion_gpr_addis" ""))
 
13112
-   (set (match_operand:INT1 2 "base_reg_operand" "")
 
13113
-       (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
13114
-  "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
 
13115
-{
 
13116
-  return emit_fusion_gpr_load (operands);
 
13117
-}
 
13118
-  [(set_attr "type" "load")
 
13119
-   (set_attr "length" "8")])
 
13120
-
 
13121
 (define_peephole2
 
13122
   [(set (match_operand:P 0 "base_reg_operand" "")
 
13123
        (match_operand:P 1 "fusion_gpr_addis" ""))
 
13124
@@ -15774,9 +15781,8 @@
 
13125
    (set (match_operand:INT1 2 "base_reg_operand" "")
 
13126
        (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
13127
   "TARGET_P8_FUSION
 
13128
-   && (REGNO (operands[0]) != REGNO (operands[2])
 
13129
-       || GET_CODE (operands[3]) == SIGN_EXTEND)
 
13130
-   && fusion_gpr_load_p (operands, true)"
 
13131
+   && fusion_gpr_load_p (operands[0], operands[1], operands[2],
 
13132
+                        operands[3])"
 
13133
   [(const_int 0)]
 
13134
 {
 
13135
   expand_fusion_gpr_load (operands);
 
13136
@@ -15783,6 +15789,20 @@
 
13137
   DONE;
 
13138
 })
 
13139
 
 
13140
+;; Fusion insn, created by the define_peephole2 above (and eventually by
 
13141
+;; reload)
 
13142
+
 
13143
+(define_insn "fusion_gpr_load_<mode>"
 
13144
+  [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
 
13145
+       (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
 
13146
+                    UNSPEC_FUSION_GPR))]
 
13147
+  "TARGET_P8_FUSION"
 
13148
+{
 
13149
+  return emit_fusion_gpr_load (operands[0], operands[1]);
 
13150
+}
 
13151
+  [(set_attr "type" "load")
 
13152
+   (set_attr "length" "8")])
 
13153
+
 
13154
 
 
13155
 ;; Miscellaneous ISA 2.06 (power7) instructions
 
13156
 (define_insn "addg6s"
 
13157
@@ -15847,26 +15867,6 @@
 
13158
   ""
 
13159
   "")
 
13160
 
 
13161
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
 
13162
-;; and __builtin_longdouble_dw1 to optimize glibc.  Add support for these
 
13163
-;; builtins here.
 
13164
-
 
13165
-(define_expand "unpacktf_0"
 
13166
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
13167
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
13168
-                   (const_int 0)]
 
13169
-        UNSPEC_UNPACK_128BIT))]
 
13170
-  ""
 
13171
-  "")
 
13172
-
 
13173
-(define_expand "unpacktf_1"
 
13174
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
13175
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
13176
-                   (const_int 1)]
 
13177
-        UNSPEC_UNPACK_128BIT))]
 
13178
-  ""
 
13179
-  "")
 
13180
-
 
13181
 (define_insn_and_split "unpack<mode>_dm"
 
13182
   [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
 
13183
        (unspec:<FP128_64>
 
13184
Index: gcc/config/rs6000/sysv4.h
 
13185
===================================================================
 
13186
--- a/src/gcc/config/rs6000/sysv4.h     (.../tags/gcc_4_8_3_release)
 
13187
+++ b/src/gcc/config/rs6000/sysv4.h     (.../branches/gcc-4_8-branch)
 
13188
@@ -292,7 +292,7 @@
 
13189
 /* An expression for the alignment of a structure field FIELD if the
 
13190
    alignment computed in the usual way is COMPUTED.  */
 
13191
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                  \
 
13192
-       ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
13193
+       (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))            \
 
13194
         ? 128 : COMPUTED)
 
13195
 
 
13196
 #undef  BIGGEST_FIELD_ALIGNMENT
 
13197
@@ -949,3 +949,27 @@
 
13198
 #define TARGET_USES_SYSV4_OPT 1
 
13199
 
 
13200
 #undef DBX_REGISTER_NUMBER
 
13201
+
 
13202
+/* Link -lasan early on the command line.  For -static-libasan, don't link
 
13203
+   it for -shared link, the executable should be compiled with -static-libasan
 
13204
+   in that case, and for executable link link with --{,no-}whole-archive around
 
13205
+   it to force everything into the executable.  And similarly for -ltsan.  */
 
13206
+#if defined(HAVE_LD_STATIC_DYNAMIC)
 
13207
+#undef LIBASAN_EARLY_SPEC
 
13208
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
 
13209
+  "%{static-libasan:%{!shared:" \
 
13210
+  LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
 
13211
+  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
 
13212
+#undef LIBTSAN_EARLY_SPEC
 
13213
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
 
13214
+  LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
 
13215
+  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
 
13216
+#endif
 
13217
+
 
13218
+/* Additional libraries needed by -static-libasan.  */
 
13219
+#undef STATIC_LIBASAN_LIBS
 
13220
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
 
13221
+
 
13222
+/* Additional libraries needed by -static-libtsan.  */
 
13223
+#undef STATIC_LIBTSAN_LIBS
 
13224
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
 
13225
Index: gcc/config/arm/arm.c
 
13226
===================================================================
 
13227
--- a/src/gcc/config/arm/arm.c  (.../tags/gcc_4_8_3_release)
 
13228
+++ b/src/gcc/config/arm/arm.c  (.../branches/gcc-4_8-branch)
 
13229
@@ -82,7 +82,6 @@
 
13230
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
 
13231
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
 
13232
 inline static int thumb1_index_register_rtx_p (rtx, int);
 
13233
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
13234
 static int thumb_far_jump_used_p (void);
 
13235
 static bool thumb_force_lr_save (void);
 
13236
 static unsigned arm_size_return_regs (void);
 
13237
@@ -24476,9 +24475,13 @@
 
13238
       fputs (":\n", file);
 
13239
       if (flag_pic)
 
13240
        {
 
13241
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 
13242
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
 
13243
          rtx tem = XEXP (DECL_RTL (function), 0);
 
13244
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
 
13245
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
 
13246
+            pipeline offset is four rather than eight.  Adjust the offset
 
13247
+            accordingly.  */
 
13248
+         tem = plus_constant (GET_MODE (tem), tem,
 
13249
+                              TARGET_THUMB1_ONLY ? -3 : -7);
 
13250
          tem = gen_rtx_MINUS (GET_MODE (tem),
 
13251
                               tem,
 
13252
                               gen_rtx_SYMBOL_REF (Pmode,
 
13253
@@ -27462,4 +27465,13 @@
 
13254
 
 
13255
 }
 
13256
 
 
13257
+/* return TRUE if x is a reference to a value in a constant pool */
 
13258
+extern bool
 
13259
+arm_is_constant_pool_ref (rtx x)
 
13260
+{
 
13261
+  return (MEM_P (x)
 
13262
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
 
13263
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
 
13264
+}
 
13265
+
 
13266
 #include "gt-arm.h"
 
13267
Index: gcc/config/arm/arm.h
 
13268
===================================================================
 
13269
--- a/src/gcc/config/arm/arm.h  (.../tags/gcc_4_8_3_release)
 
13270
+++ b/src/gcc/config/arm/arm.h  (.../branches/gcc-4_8-branch)
 
13271
@@ -2082,9 +2082,10 @@
 
13272
    ? reverse_condition_maybe_unordered (code) \
 
13273
    : reverse_condition (code))
 
13274
 
 
13275
-/* The arm5 clz instruction returns 32.  */
 
13276
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
13277
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
13278
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
13279
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
13280
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
13281
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
13282
 
 
13283
 #define CC_STATUS_INIT \
 
13284
   do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
 
13285
Index: gcc/config/arm/arm-protos.h
 
13286
===================================================================
 
13287
--- a/src/gcc/config/arm/arm-protos.h   (.../tags/gcc_4_8_3_release)
 
13288
+++ b/src/gcc/config/arm/arm-protos.h   (.../branches/gcc-4_8-branch)
 
13289
@@ -55,6 +55,7 @@
 
13290
 extern int legitimate_pic_operand_p (rtx);
 
13291
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 
13292
 extern rtx legitimize_tls_address (rtx, rtx);
 
13293
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
13294
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
 
13295
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
 
13296
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
 
13297
@@ -286,4 +287,6 @@
 
13298
 
 
13299
 extern void arm_emit_eabi_attribute (const char *, int, int);
 
13300
 
 
13301
+extern bool arm_is_constant_pool_ref (rtx);
 
13302
+
 
13303
 #endif /* ! GCC_ARM_PROTOS_H */
 
13304
Index: gcc/config/arm/constraints.md
 
13305
===================================================================
 
13306
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
 
13307
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
 
13308
@@ -36,7 +36,7 @@
 
13309
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
 
13310
 
 
13311
 ;; The following memory constraints have been used:
 
13312
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
 
13313
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
 
13314
 ;; in ARM state: Uq
 
13315
 ;; in Thumb state: Uu, Uw
 
13316
 
 
13317
@@ -310,6 +310,12 @@
 
13318
   An address valid for loading/storing register exclusive"
 
13319
  (match_operand 0 "mem_noofs_operand"))
 
13320
 
 
13321
+(define_memory_constraint "Uh"
 
13322
+ "@internal
 
13323
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
 
13324
+ (and (match_code "mem")
 
13325
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
 
13326
+
 
13327
 (define_memory_constraint "Ut"
 
13328
  "@internal
 
13329
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
 
13330
@@ -356,7 +362,8 @@
 
13331
  (and (match_code "mem")
 
13332
       (match_test "TARGET_ARM
 
13333
                   && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
 
13334
-                                                     SIGN_EXTEND, 0)")))
 
13335
+                                                     SIGN_EXTEND, 0)
 
13336
+                  && !arm_is_constant_pool_ref (op)")))
 
13337
 
 
13338
 (define_memory_constraint "Q"
 
13339
  "@internal
 
13340
Index: gcc/config/arm/arm.md
 
13341
===================================================================
 
13342
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
 
13343
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
 
13344
@@ -4047,7 +4047,7 @@
 
13345
 (define_insn "unaligned_loadhis"
 
13346
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
 
13347
        (sign_extend:SI
 
13348
-         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 
13349
+         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
 
13350
                     UNSPEC_UNALIGNED_LOAD)))]
 
13351
   "unaligned_access && TARGET_32BIT"
 
13352
   "ldr%(sh%)\t%0, %1\t@ unaligned"
 
13353
@@ -4655,7 +4655,7 @@
 
13354
 
 
13355
 (define_insn "*arm_zero_extendhisi2_v6"
 
13356
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
13357
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
13358
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
13359
   "TARGET_ARM && arm_arch6"
 
13360
   "@
 
13361
    uxth%?\\t%0, %1
 
13362
@@ -4748,7 +4748,7 @@
 
13363
 
 
13364
 (define_insn "*arm_zero_extendqisi2_v6"
 
13365
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
13366
-       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
 
13367
+       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
 
13368
   "TARGET_ARM && arm_arch6"
 
13369
   "@
 
13370
    uxtb%(%)\\t%0, %1
 
13371
@@ -4980,7 +4980,7 @@
 
13372
 
 
13373
 (define_insn "*arm_extendhisi2"
 
13374
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
13375
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
13376
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
13377
   "TARGET_ARM && arm_arch4 && !arm_arch6"
 
13378
   "@
 
13379
    #
 
13380
@@ -4987,23 +4987,19 @@
 
13381
    ldr%(sh%)\\t%0, %1"
 
13382
   [(set_attr "length" "8,4")
 
13383
    (set_attr "type" "alu_shift,load_byte")
 
13384
-   (set_attr "predicable" "yes")
 
13385
-   (set_attr "pool_range" "*,256")
 
13386
-   (set_attr "neg_pool_range" "*,244")]
 
13387
+   (set_attr "predicable" "yes")]
 
13388
 )
 
13389
 
 
13390
 ;; ??? Check Thumb-2 pool range
 
13391
 (define_insn "*arm_extendhisi2_v6"
 
13392
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
13393
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
13394
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
13395
   "TARGET_32BIT && arm_arch6"
 
13396
   "@
 
13397
    sxth%?\\t%0, %1
 
13398
    ldr%(sh%)\\t%0, %1"
 
13399
   [(set_attr "type" "simple_alu_shift,load_byte")
 
13400
-   (set_attr "predicable" "yes")
 
13401
-   (set_attr "pool_range" "*,256")
 
13402
-   (set_attr "neg_pool_range" "*,244")]
 
13403
+   (set_attr "predicable" "yes")]
 
13404
 )
 
13405
 
 
13406
 (define_insn "*arm_extendhisi2addsi"
 
13407
@@ -5045,9 +5041,7 @@
 
13408
   "TARGET_ARM && arm_arch4"
 
13409
   "ldr%(sb%)\\t%0, %1"
 
13410
   [(set_attr "type" "load_byte")
 
13411
-   (set_attr "predicable" "yes")
 
13412
-   (set_attr "pool_range" "256")
 
13413
-   (set_attr "neg_pool_range" "244")]
 
13414
+   (set_attr "predicable" "yes")]
 
13415
 )
 
13416
 
 
13417
 (define_expand "extendqisi2"
 
13418
@@ -5087,9 +5081,7 @@
 
13419
    ldr%(sb%)\\t%0, %1"
 
13420
   [(set_attr "length" "8,4")
 
13421
    (set_attr "type" "alu_shift,load_byte")
 
13422
-   (set_attr "predicable" "yes")
 
13423
-   (set_attr "pool_range" "*,256")
 
13424
-   (set_attr "neg_pool_range" "*,244")]
 
13425
+   (set_attr "predicable" "yes")]
 
13426
 )
 
13427
 
 
13428
 (define_insn "*arm_extendqisi_v6"
 
13429
@@ -5101,9 +5093,7 @@
 
13430
    sxtb%?\\t%0, %1
 
13431
    ldr%(sb%)\\t%0, %1"
 
13432
   [(set_attr "type" "simple_alu_shift,load_byte")
 
13433
-   (set_attr "predicable" "yes")
 
13434
-   (set_attr "pool_range" "*,256")
 
13435
-   (set_attr "neg_pool_range" "*,244")]
 
13436
+   (set_attr "predicable" "yes")]
 
13437
 )
 
13438
 
 
13439
 (define_insn "*arm_extendqisi2addsi"
 
13440
@@ -7630,12 +7620,13 @@
 
13441
 
 
13442
 (define_insn "*arm_cmpdi_unsigned"
 
13443
   [(set (reg:CC_CZ CC_REGNUM)
 
13444
-       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
 
13445
-                      (match_operand:DI 1 "arm_di_operand"     "rDi")))]
 
13446
+       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
 
13447
+                      (match_operand:DI 1 "arm_di_operand"     "rDi,rDi")))]
 
13448
   "TARGET_32BIT"
 
13449
   "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
 
13450
   [(set_attr "conds" "set")
 
13451
-   (set_attr "length" "8")]
 
13452
+   (set_attr "arch" "a,t2")
 
13453
+   (set_attr "length" "8,10")]
 
13454
 )
 
13455
 
 
13456
 (define_insn "*arm_cmpdi_zero"
 
13457
Index: gcc/config/arm/t-rtems-eabi
 
13458
===================================================================
 
13459
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_8_3_release)
 
13460
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_8-branch)
 
13461
@@ -1,47 +1,167 @@
 
13462
 # Custom RTEMS EABI multilibs
 
13463
 
 
13464
-MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
 
13465
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
 
13466
+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
 
13467
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
 
13468
 
 
13469
 # Enumeration of multilibs
 
13470
 
 
13471
 MULTILIB_EXCEPTIONS =
 
13472
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
13473
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
 
13474
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13475
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
 
13476
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13477
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
13478
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
 
13479
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
 
13480
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
13481
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
 
13482
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
13483
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
 
13484
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13485
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
13486
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
 
13487
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
 
13488
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13489
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
 
13490
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13491
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
 
13492
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13493
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
13494
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
 
13495
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
 
13496
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13497
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
 
13498
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13499
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
 
13500
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13501
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
13502
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
 
13503
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
 
13504
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
 
13505
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
 
13506
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
13507
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
 
13508
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13509
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
 
13510
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
 
13511
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
 
13512
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
13513
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
 
13514
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13515
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
 
13516
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13517
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
 
13518
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
 
13519
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
 
13520
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
13521
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
 
13522
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
13523
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
 
13524
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13525
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
 
13526
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
 
13527
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
 
13528
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13529
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
 
13530
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13531
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
 
13532
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13533
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
 
13534
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
 
13535
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
 
13536
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13537
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
 
13538
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13539
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
 
13540
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13541
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
 
13542
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
 
13543
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
 
13544
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
 
13545
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
 
13546
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
 
13547
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
 
13548
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13549
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
 
13550
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
 
13551
+MULTILIB_EXCEPTIONS += mbig-endian
 
13552
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
13553
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
 
13554
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13555
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
 
13556
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13557
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
13558
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
 
13559
 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
 
13560
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
13561
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
 
13562
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
13563
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
 
13564
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13565
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
13566
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
 
13567
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
 
13568
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13569
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
 
13570
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13571
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
 
13572
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13573
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
13574
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
 
13575
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
 
13576
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13577
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
 
13578
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13579
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
 
13580
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13581
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
13582
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
 
13583
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
 
13584
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
 
13585
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
 
13586
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
13587
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
 
13588
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13589
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
 
13590
 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
 
13591
 # MULTILIB_EXCEPTIONS += mthumb
 
13592
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
 
13593
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
 
13594
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13595
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
 
13596
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13597
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
 
13598
 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
 
13599
 MULTILIB_EXCEPTIONS += march=armv6-m
 
13600
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
 
13601
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
 
13602
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
13603
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
 
13604
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13605
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
 
13606
 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
 
13607
 MULTILIB_EXCEPTIONS += march=armv7-a
 
13608
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13609
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
 
13610
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13611
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
 
13612
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13613
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
 
13614
 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
 
13615
 MULTILIB_EXCEPTIONS += march=armv7-r
 
13616
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13617
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
 
13618
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13619
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
 
13620
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13621
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
 
13622
 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
 
13623
 MULTILIB_EXCEPTIONS += march=armv7-m
 
13624
 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
 
13625
 MULTILIB_EXCEPTIONS += mfpu=neon
 
13626
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
 
13627
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
 
13628
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13629
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
 
13630
 MULTILIB_EXCEPTIONS += mfloat-abi=hard
 
13631
Index: gcc/config/pa/pa.md
 
13632
===================================================================
 
13633
--- a/src/gcc/config/pa/pa.md   (.../tags/gcc_4_8_3_release)
 
13634
+++ b/src/gcc/config/pa/pa.md   (.../branches/gcc-4_8-branch)
 
13635
@@ -123,7 +123,7 @@
 
13636
 ;; type "binary" insns have two input operands (1,2) and one output (0)
 
13637
 
 
13638
 (define_attr "type"
 
13639
-  "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"
 
13640
+  "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"
 
13641
   (const_string "binary"))
 
13642
 
 
13643
 (define_attr "pa_combine_type"
 
13644
@@ -166,7 +166,7 @@
 
13645
 ;; For conditional branches. Frame related instructions are not allowed
 
13646
 ;; because they confuse the unwind support.
 
13647
 (define_attr "in_branch_delay" "false,true"
 
13648
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
13649
+  (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")
 
13650
                     (eq_attr "length" "4")
 
13651
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13652
                (const_string "true")
 
13653
@@ -175,7 +175,7 @@
 
13654
 ;; Disallow instructions which use the FPU since they will tie up the FPU
 
13655
 ;; even if the instruction is nullified.
 
13656
 (define_attr "in_nullified_branch_delay" "false,true"
 
13657
-  (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")
 
13658
+  (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")
 
13659
                     (eq_attr "length" "4")
 
13660
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13661
                (const_string "true")
 
13662
@@ -184,7 +184,7 @@
 
13663
 ;; For calls and millicode calls.  Allow unconditional branches in the
 
13664
 ;; delay slot.
 
13665
 (define_attr "in_call_delay" "false,true"
 
13666
-  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
13667
+  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
 
13668
              (eq_attr "length" "4")
 
13669
              (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13670
           (const_string "true")
 
13671
@@ -5331,6 +5331,15 @@
 
13672
   [(set_attr "type" "binary,binary")
 
13673
    (set_attr "length" "4,4")])
 
13674
 
 
13675
+;; Trap instructions.
 
13676
+
 
13677
+(define_insn "trap"
 
13678
+  [(trap_if (const_int 1) (const_int 0))]
 
13679
+  ""
 
13680
+  "{addit|addi,tc},<> 1,%%r0,%%r0"
 
13681
+  [(set_attr "type" "trap")
 
13682
+   (set_attr "length" "4")])
 
13683
+
 
13684
 ;; Clobbering a "register_operand" instead of a match_scratch
 
13685
 ;; in operand3 of millicode calls avoids spilling %r1 and
 
13686
 ;; produces better code.
 
13687
Index: gcc/config/pa/pa.c
 
13688
===================================================================
 
13689
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_8_3_release)
 
13690
+++ b/src/gcc/config/pa/pa.c    (.../branches/gcc-4_8-branch)
 
13691
@@ -3237,7 +3237,12 @@
 
13692
       && aligned_p
 
13693
       && function_label_operand (x, VOIDmode))
 
13694
     {
 
13695
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
 
13696
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
 
13697
+
 
13698
+      /* We don't want an OPD when generating fast indirect calls.  */
 
13699
+      if (!TARGET_FAST_INDIRECT_CALLS)
 
13700
+       fputs ("P%", asm_out_file);
 
13701
+
 
13702
       output_addr_const (asm_out_file, x);
 
13703
       fputc ('\n', asm_out_file);
 
13704
       return true;
 
13705
@@ -4160,9 +4165,8 @@
 
13706
 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 
13707
 {
 
13708
   rtx insn = get_last_insn ();
 
13709
+  bool extra_nop;
 
13710
 
 
13711
-  last_address = 0;
 
13712
-
 
13713
   /* pa_expand_epilogue does the dirty work now.  We just need
 
13714
      to output the assembler directives which denote the end
 
13715
      of a function.
 
13716
@@ -4185,14 +4189,16 @@
 
13717
   if (insn && GET_CODE (insn) == CALL_INSN)
 
13718
     {
 
13719
       fputs ("\tnop\n", file);
 
13720
-      last_address += 4;
 
13721
+      extra_nop = true;
 
13722
     }
 
13723
+  else
 
13724
+    extra_nop = false;
 
13725
 
 
13726
   fputs ("\t.EXIT\n\t.PROCEND\n", file);
 
13727
 
 
13728
   if (TARGET_SOM && TARGET_GAS)
 
13729
     {
 
13730
-      /* We done with this subspace except possibly for some additional
 
13731
+      /* We are done with this subspace except possibly for some additional
 
13732
         debug information.  Forget that we are in this subspace to ensure
 
13733
         that the next function is output in its own subspace.  */
 
13734
       in_section = NULL;
 
13735
@@ -4199,12 +4205,20 @@
 
13736
       cfun->machine->in_nsubspa = 2;
 
13737
     }
 
13738
 
 
13739
+  /* Thunks do their own insn accounting.  */
 
13740
+  if (cfun->is_thunk)
 
13741
+    return;
 
13742
+
 
13743
   if (INSN_ADDRESSES_SET_P ())
 
13744
     {
 
13745
+      last_address = extra_nop ? 4 : 0;
 
13746
       insn = get_last_nonnote_insn ();
 
13747
-      last_address += INSN_ADDRESSES (INSN_UID (insn));
 
13748
-      if (INSN_P (insn))
 
13749
-       last_address += insn_default_length (insn);
 
13750
+      if (insn)
 
13751
+       {
 
13752
+         last_address += INSN_ADDRESSES (INSN_UID (insn));
 
13753
+         if (INSN_P (insn))
 
13754
+           last_address += insn_default_length (insn);
 
13755
+       }
 
13756
       last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
 
13757
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
 
13758
     }
 
13759
@@ -8270,8 +8284,7 @@
 
13760
   xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
 
13761
   xoperands[2] = GEN_INT (delta);
 
13762
 
 
13763
-  ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
 
13764
-  fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
 
13765
+  final_start_function (emit_barrier (), file, 1);
 
13766
 
 
13767
   /* Output the thunk.  We know that the function is in the same
 
13768
      translation unit (i.e., the same space) as the thunk, and that
 
13769
@@ -8301,12 +8314,16 @@
 
13770
                   || ((DECL_SECTION_NAME (thunk_fndecl)
 
13771
                        == DECL_SECTION_NAME (function))
 
13772
                       && last_address < 262132)))
 
13773
+             /* In this case, we need to be able to reach the start of
 
13774
+                the stub table even though the function is likely closer
 
13775
+                and can be jumped to directly.  */
 
13776
              || (targetm_common.have_named_sections
 
13777
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
 
13778
                  && DECL_SECTION_NAME (function) == NULL
 
13779
-                 && last_address < 262132)
 
13780
+                 && total_code_bytes < MAX_PCREL17F_OFFSET)
 
13781
+             /* Likewise.  */
 
13782
              || (!targetm_common.have_named_sections
 
13783
-                 && last_address < 262132))))
 
13784
+                 && total_code_bytes < MAX_PCREL17F_OFFSET))))
 
13785
     {
 
13786
       if (!val_14)
 
13787
        output_asm_insn ("addil L'%2,%%r26", xoperands);
 
13788
@@ -8477,17 +8494,8 @@
 
13789
        }
 
13790
     }
 
13791
 
 
13792
-  fprintf (file, "\t.EXIT\n\t.PROCEND\n");
 
13793
+  final_end_function ();
 
13794
 
 
13795
-  if (TARGET_SOM && TARGET_GAS)
 
13796
-    {
 
13797
-      /* We done with this subspace except possibly for some additional
 
13798
-        debug information.  Forget that we are in this subspace to ensure
 
13799
-        that the next function is output in its own subspace.  */
 
13800
-      in_section = NULL;
 
13801
-      cfun->machine->in_nsubspa = 2;
 
13802
-    }
 
13803
-
 
13804
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
 
13805
     {
 
13806
       switch_to_section (data_section);
 
13807
Index: gcc/tree-vect-slp.c
 
13808
===================================================================
 
13809
--- a/src/gcc/tree-vect-slp.c   (.../tags/gcc_4_8_3_release)
 
13810
+++ b/src/gcc/tree-vect-slp.c   (.../branches/gcc-4_8-branch)
 
13811
@@ -1837,7 +1837,10 @@
 
13812
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
 
13813
            && !STMT_SLP_TYPE (stmt_vinfo)
 
13814
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
 
13815
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
 
13816
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
 
13817
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
 
13818
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
 
13819
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
 
13820
            && !(gimple_code (use_stmt) == GIMPLE_PHI
 
13821
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
 
13822
                   == vect_reduction_def))
 
13823
@@ -2377,13 +2380,21 @@
 
13824
             neutral_op = build_int_cst (TREE_TYPE (op), -1);
 
13825
             break;
 
13826
 
 
13827
-          case MAX_EXPR:
 
13828
-          case MIN_EXPR:
 
13829
-            def_stmt = SSA_NAME_DEF_STMT (op);
 
13830
-            loop = (gimple_bb (stmt))->loop_father;
 
13831
-            neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
13832
-                                                loop_preheader_edge (loop));
 
13833
-            break;
 
13834
+         /* For MIN/MAX we don't have an easy neutral operand but
 
13835
+            the initial values can be used fine here.  Only for
 
13836
+            a reduction chain we have to force a neutral element.  */
 
13837
+         case MAX_EXPR:
 
13838
+         case MIN_EXPR:
 
13839
+           if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
 
13840
+             neutral_op = NULL;
 
13841
+           else
 
13842
+             {
 
13843
+               def_stmt = SSA_NAME_DEF_STMT (op);
 
13844
+               loop = (gimple_bb (stmt))->loop_father;
 
13845
+               neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
13846
+                                                   loop_preheader_edge (loop));
 
13847
+             }
 
13848
+           break;
 
13849
 
 
13850
           default:
 
13851
             neutral_op = NULL;
 
13852
Index: gcc/regcprop.c
 
13853
===================================================================
 
13854
--- a/src/gcc/regcprop.c        (.../tags/gcc_4_8_3_release)
 
13855
+++ b/src/gcc/regcprop.c        (.../branches/gcc-4_8-branch)
 
13856
@@ -1039,7 +1039,17 @@
 
13857
             but instead among CLOBBERs on the CALL_INSN, we could wrongly
 
13858
             assume the value in it is still live.  */
 
13859
          if (ksvd.ignore_set_reg)
 
13860
-           note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
13861
+           {
 
13862
+             note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
13863
+             for (exp = CALL_INSN_FUNCTION_USAGE (insn);
 
13864
+                  exp;
 
13865
+                  exp = XEXP (exp, 1))
 
13866
+               {
 
13867
+                 rtx x = XEXP (exp, 0);
 
13868
+                 if (GET_CODE (x) == CLOBBER)
 
13869
+                   kill_value (SET_DEST (x), vd);
 
13870
+               }
 
13871
+           }
 
13872
        }
 
13873
 
 
13874
       /* Notice stores.  */
 
13875
Index: libobjc/encoding.c
 
13876
===================================================================
 
13877
--- a/src/libobjc/encoding.c    (.../tags/gcc_4_8_3_release)
 
13878
+++ b/src/libobjc/encoding.c    (.../branches/gcc-4_8-branch)
 
13879
@@ -192,6 +192,8 @@
 
13880
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
 
13881
    : MAX (COMPUTED, SPECIFIED));})
 
13882
 
 
13883
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
 
13884
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
 
13885
 
 
13886
 /* Skip a variable name, enclosed in quotes (").  */
 
13887
 static inline
 
13888
Index: libobjc/ChangeLog
 
13889
===================================================================
 
13890
--- a/src/libobjc/ChangeLog     (.../tags/gcc_4_8_3_release)
 
13891
+++ b/src/libobjc/ChangeLog     (.../branches/gcc-4_8-branch)
 
13892
@@ -1,3 +1,16 @@
 
13893
+2014-07-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
13894
+
 
13895
+       PR libobjc/61920
 
13896
+       * encoding.c (rs6000_special_adjust_field_align_p): Use definition
 
13897
+       that matches the 4.8 branch ABI.
 
13898
+
 
13899
+2014-07-27  Alan Modra  <amodra@gmail.com>
 
13900
+           Matthias Klose  <doko@ubuntu.com>
 
13901
+
 
13902
+       PR libobjc/61920
 
13903
+
 
13904
+       * encoding.c: Define rs6000_special_adjust_field_align_p.
 
13905
+
 
13906
 2014-05-22  Release Manager
 
13907
 
 
13908
        * GCC 4.8.3 released.
 
13909
Index: libgfortran/m4/in_pack.m4
 
13910
===================================================================
 
13911
--- a/src/libgfortran/m4/in_pack.m4     (.../tags/gcc_4_8_3_release)
 
13912
+++ b/src/libgfortran/m4/in_pack.m4     (.../branches/gcc-4_8-branch)
 
13913
@@ -79,7 +79,7 @@
 
13914
     return source->base_addr;
 
13915
 
 
13916
   /* Allocate storage for the destination.  */
 
13917
-  destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
 
13918
+  destptr = xmallocarray (ssize, sizeof ('rtype_name`));
 
13919
   dest = destptr;
 
13920
   src = source->base_addr;
 
13921
   stride0 = stride[0];
 
13922
Index: libgfortran/m4/pack.m4
 
13923
===================================================================
 
13924
--- a/src/libgfortran/m4/pack.m4        (.../tags/gcc_4_8_3_release)
 
13925
+++ b/src/libgfortran/m4/pack.m4        (.../branches/gcc-4_8-branch)
 
13926
@@ -168,8 +168,8 @@
 
13927
 
 
13928
          ret->offset = 0;
 
13929
 
 
13930
-         /* xmalloc allocates a single byte for zero size.  */
 
13931
-         ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
 
13932
+         /* xmallocarray allocates a single byte for zero size.  */
 
13933
+         ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
 
13934
 
 
13935
          if (total == 0)
 
13936
            return;
 
13937
Index: libgfortran/m4/spread.m4
 
13938
===================================================================
 
13939
--- a/src/libgfortran/m4/spread.m4      (.../tags/gcc_4_8_3_release)
 
13940
+++ b/src/libgfortran/m4/spread.m4      (.../branches/gcc-4_8-branch)
 
13941
@@ -102,8 +102,8 @@
 
13942
        }
 
13943
       ret->offset = 0;
 
13944
 
 
13945
-      /* xmalloc allocates a single byte for zero size.  */
 
13946
-      ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
 
13947
+      /* xmallocarray allocates a single byte for zero size.  */
 
13948
+      ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
 
13949
       if (rs <= 0)
 
13950
         return;
 
13951
     }
 
13952
@@ -245,7 +245,7 @@
 
13953
 
 
13954
   if (ret->base_addr == NULL)
 
13955
     {
 
13956
-      ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
 
13957
+      ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
 
13958
       ret->offset = 0;
 
13959
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
13960
     }
 
13961
Index: libgfortran/m4/transpose.m4
 
13962
===================================================================
 
13963
--- a/src/libgfortran/m4/transpose.m4   (.../tags/gcc_4_8_3_release)
 
13964
+++ b/src/libgfortran/m4/transpose.m4   (.../branches/gcc-4_8-branch)
 
13965
@@ -61,7 +61,8 @@
 
13966
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
13967
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
13968
 
 
13969
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
 
13970
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
13971
+                                     sizeof ('rtype_name`));
 
13972
       ret->offset = 0;
 
13973
     } else if (unlikely (compile_options.bounds_check))
 
13974
     {
 
13975
Index: libgfortran/m4/iforeach.m4
 
13976
===================================================================
 
13977
--- a/src/libgfortran/m4/iforeach.m4    (.../tags/gcc_4_8_3_release)
 
13978
+++ b/src/libgfortran/m4/iforeach.m4    (.../branches/gcc-4_8-branch)
 
13979
@@ -30,7 +30,7 @@
 
13980
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13981
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13982
       retarray->offset = 0;
 
13983
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
13984
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
13985
     }
 
13986
   else
 
13987
     {
 
13988
@@ -133,7 +133,7 @@
 
13989
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13990
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13991
       retarray->offset = 0;
 
13992
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
13993
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
13994
     }
 
13995
   else
 
13996
     {
 
13997
@@ -264,7 +264,7 @@
 
13998
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13999
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14000
       retarray->offset = 0;
 
14001
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
14002
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
14003
     }
 
14004
   else if (unlikely (compile_options.bounds_check))
 
14005
     {
 
14006
Index: libgfortran/m4/eoshift1.m4
 
14007
===================================================================
 
14008
--- a/src/libgfortran/m4/eoshift1.m4    (.../tags/gcc_4_8_3_release)
 
14009
+++ b/src/libgfortran/m4/eoshift1.m4    (.../branches/gcc-4_8-branch)
 
14010
@@ -106,8 +106,8 @@
 
14011
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14012
 
 
14013
         }
 
14014
-      /* xmalloc allocates a single byte for zero size.  */
 
14015
-      ret->base_addr = xmalloc (size * arraysize);
 
14016
+      /* xmallocarray allocates a single byte for zero size.  */
 
14017
+      ret->base_addr = xmallocarray (arraysize, size);
 
14018
 
 
14019
     }
 
14020
   else if (unlikely (compile_options.bounds_check))
 
14021
Index: libgfortran/m4/eoshift3.m4
 
14022
===================================================================
 
14023
--- a/src/libgfortran/m4/eoshift3.m4    (.../tags/gcc_4_8_3_release)
 
14024
+++ b/src/libgfortran/m4/eoshift3.m4    (.../branches/gcc-4_8-branch)
 
14025
@@ -90,7 +90,7 @@
 
14026
     {
 
14027
       int i;
 
14028
 
 
14029
-      ret->base_addr = xmalloc (size * arraysize);
 
14030
+      ret->base_addr = xmallocarray (arraysize, size);
 
14031
       ret->offset = 0;
 
14032
       ret->dtype = array->dtype;
 
14033
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14034
@@ -108,8 +108,8 @@
 
14035
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14036
 
 
14037
         }
 
14038
-      /* xmalloc allocates a single byte for zero size.  */
 
14039
-      ret->base_addr = xmalloc (size * arraysize);
 
14040
+      /* xmallocarray allocates a single byte for zero size.  */
 
14041
+      ret->base_addr = xmallocarray (arraysize, size);
 
14042
 
 
14043
     }
 
14044
   else if (unlikely (compile_options.bounds_check))
 
14045
Index: libgfortran/m4/shape.m4
 
14046
===================================================================
 
14047
--- a/src/libgfortran/m4/shape.m4       (.../tags/gcc_4_8_3_release)
 
14048
+++ b/src/libgfortran/m4/shape.m4       (.../branches/gcc-4_8-branch)
 
14049
@@ -50,7 +50,7 @@
 
14050
     {
 
14051
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
14052
       ret->offset = 0;
 
14053
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
 
14054
+      ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
 
14055
     }
 
14056
 
 
14057
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
14058
Index: libgfortran/m4/cshift1.m4
 
14059
===================================================================
 
14060
--- a/src/libgfortran/m4/cshift1.m4     (.../tags/gcc_4_8_3_release)
 
14061
+++ b/src/libgfortran/m4/cshift1.m4     (.../branches/gcc-4_8-branch)
 
14062
@@ -81,7 +81,7 @@
 
14063
     {
 
14064
       int i;
 
14065
 
 
14066
-      ret->base_addr = xmalloc (size * arraysize);
 
14067
+      ret->base_addr = xmallocarray (arraysize, size);
 
14068
       ret->offset = 0;
 
14069
       ret->dtype = array->dtype;
 
14070
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14071
Index: libgfortran/m4/matmull.m4
 
14072
===================================================================
 
14073
--- a/src/libgfortran/m4/matmull.m4     (.../tags/gcc_4_8_3_release)
 
14074
+++ b/src/libgfortran/m4/matmull.m4     (.../branches/gcc-4_8-branch)
 
14075
@@ -89,7 +89,7 @@
 
14076
         }
 
14077
           
 
14078
       retarray->base_addr
 
14079
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
14080
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
14081
       retarray->offset = 0;
 
14082
     }
 
14083
     else if (unlikely (compile_options.bounds_check))
 
14084
Index: libgfortran/m4/bessel.m4
 
14085
===================================================================
 
14086
--- a/src/libgfortran/m4/bessel.m4      (.../tags/gcc_4_8_3_release)
 
14087
+++ b/src/libgfortran/m4/bessel.m4      (.../branches/gcc-4_8-branch)
 
14088
@@ -56,7 +56,7 @@
 
14089
     {
 
14090
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14091
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14092
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
14093
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
14094
       ret->offset = 0;
 
14095
     }
 
14096
 
 
14097
@@ -123,7 +123,7 @@
 
14098
     {
 
14099
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14100
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14101
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
14102
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
14103
       ret->offset = 0;
 
14104
     }
 
14105
 
 
14106
@@ -163,7 +163,7 @@
 
14107
 
 
14108
   x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
 
14109
 
 
14110
-  for (i = 2; i <= n1+n2; i++)
 
14111
+  for (i = 2; i <= n2 - n1; i++)
 
14112
     {
 
14113
 #if defined('rtype_name`_INFINITY)
 
14114
       if (unlikely (last2 == -'rtype_name`_INFINITY))
 
14115
Index: libgfortran/m4/unpack.m4
 
14116
===================================================================
 
14117
--- a/src/libgfortran/m4/unpack.m4      (.../tags/gcc_4_8_3_release)
 
14118
+++ b/src/libgfortran/m4/unpack.m4      (.../branches/gcc-4_8-branch)
 
14119
@@ -100,7 +100,7 @@
 
14120
          rs *= extent[n];
 
14121
        }
 
14122
       ret->offset = 0;
 
14123
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
14124
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
14125
     }
 
14126
   else
 
14127
     {
 
14128
@@ -245,7 +245,7 @@
 
14129
          rs *= extent[n];
 
14130
        }
 
14131
       ret->offset = 0;
 
14132
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
14133
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
14134
     }
 
14135
   else
 
14136
     {
 
14137
Index: libgfortran/m4/reshape.m4
 
14138
===================================================================
 
14139
--- a/src/libgfortran/m4/reshape.m4     (.../tags/gcc_4_8_3_release)
 
14140
+++ b/src/libgfortran/m4/reshape.m4     (.../branches/gcc-4_8-branch)
 
14141
@@ -115,11 +115,11 @@
 
14142
       ret->offset = 0;
 
14143
 
 
14144
       if (unlikely (rs < 1))
 
14145
-        alloc_size = 1;
 
14146
+        alloc_size = 0;
 
14147
       else
 
14148
-        alloc_size = rs * sizeof ('rtype_name`);
 
14149
+        alloc_size = rs;
 
14150
 
 
14151
-      ret->base_addr = xmalloc (alloc_size);
 
14152
+      ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
 
14153
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
14154
     }
 
14155
 
 
14156
Index: libgfortran/m4/ifunction_logical.m4
 
14157
===================================================================
 
14158
--- a/src/libgfortran/m4/ifunction_logical.m4   (.../tags/gcc_4_8_3_release)
 
14159
+++ b/src/libgfortran/m4/ifunction_logical.m4   (.../branches/gcc-4_8-branch)
 
14160
@@ -89,8 +89,7 @@
 
14161
       retarray->offset = 0;
 
14162
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14163
 
 
14164
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14165
-                  * extent[rank-1];
 
14166
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14167
 
 
14168
       if (alloc_size == 0)
 
14169
        {
 
14170
@@ -99,7 +98,7 @@
 
14171
          return;
 
14172
        }
 
14173
       else
 
14174
-       retarray->base_addr = xmalloc (alloc_size);
 
14175
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
14176
     }
 
14177
   else
 
14178
     {
 
14179
Index: libgfortran/m4/ifunction.m4
 
14180
===================================================================
 
14181
--- a/src/libgfortran/m4/ifunction.m4   (.../tags/gcc_4_8_3_release)
 
14182
+++ b/src/libgfortran/m4/ifunction.m4   (.../branches/gcc-4_8-branch)
 
14183
@@ -85,10 +85,9 @@
 
14184
       retarray->offset = 0;
 
14185
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14186
 
 
14187
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14188
-                  * extent[rank-1];
 
14189
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14190
 
 
14191
-      retarray->base_addr = xmalloc (alloc_size);
 
14192
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
14193
       if (alloc_size == 0)
 
14194
        {
 
14195
          /* Make sure we have a zero-sized array.  */
 
14196
@@ -260,8 +259,7 @@
 
14197
 
 
14198
        }
 
14199
 
 
14200
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14201
-                  * extent[rank-1];
 
14202
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14203
 
 
14204
       retarray->offset = 0;
 
14205
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14206
@@ -273,7 +271,7 @@
 
14207
          return;
 
14208
        }
 
14209
       else
 
14210
-       retarray->base_addr = xmalloc (alloc_size);
 
14211
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
14212
 
 
14213
     }
 
14214
   else
 
14215
@@ -417,8 +415,7 @@
 
14216
       retarray->offset = 0;
 
14217
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14218
 
 
14219
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14220
-                  * extent[rank-1];
 
14221
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14222
 
 
14223
       if (alloc_size == 0)
 
14224
        {
 
14225
@@ -427,7 +424,7 @@
 
14226
          return;
 
14227
        }
 
14228
       else
 
14229
-       retarray->base_addr = xmalloc (alloc_size);
 
14230
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
14231
     }
 
14232
   else
 
14233
     {
 
14234
Index: libgfortran/m4/matmul.m4
 
14235
===================================================================
 
14236
--- a/src/libgfortran/m4/matmul.m4      (.../tags/gcc_4_8_3_release)
 
14237
+++ b/src/libgfortran/m4/matmul.m4      (.../branches/gcc-4_8-branch)
 
14238
@@ -125,7 +125,7 @@
 
14239
         }
 
14240
 
 
14241
       retarray->base_addr
 
14242
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
14243
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
14244
       retarray->offset = 0;
 
14245
     }
 
14246
     else if (unlikely (compile_options.bounds_check))
 
14247
Index: libgfortran/configure
 
14248
===================================================================
 
14249
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
 
14250
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
 
14251
@@ -2595,6 +2595,7 @@
 
14252
 as_fn_append ac_func_list " getegid"
 
14253
 as_fn_append ac_func_list " secure_getenv"
 
14254
 as_fn_append ac_func_list " __secure_getenv"
 
14255
+as_fn_append ac_func_list " strtok_r"
 
14256
 as_fn_append ac_header_list " math.h"
 
14257
 # Check that the precious variables saved in the cache have kept the same
 
14258
 # value.
 
14259
@@ -12339,7 +12340,7 @@
 
14260
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
14261
   lt_status=$lt_dlunknown
 
14262
   cat > conftest.$ac_ext <<_LT_EOF
 
14263
-#line 12342 "configure"
 
14264
+#line 12343 "configure"
 
14265
 #include "confdefs.h"
 
14266
 
 
14267
 #if HAVE_DLFCN_H
 
14268
@@ -12445,7 +12446,7 @@
 
14269
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
14270
   lt_status=$lt_dlunknown
 
14271
   cat > conftest.$ac_ext <<_LT_EOF
 
14272
-#line 12448 "configure"
 
14273
+#line 12449 "configure"
 
14274
 #include "confdefs.h"
 
14275
 
 
14276
 #if HAVE_DLFCN_H
 
14277
@@ -16506,6 +16507,8 @@
 
14278
 
 
14279
 
 
14280
 
 
14281
+
 
14282
+
 
14283
 
 
14284
 
 
14285
 
 
14286
Index: libgfortran/runtime/in_pack_generic.c
 
14287
===================================================================
 
14288
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
 
14289
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
 
14290
@@ -180,7 +180,7 @@
 
14291
     return source->base_addr;
 
14292
 
 
14293
    /* Allocate storage for the destination.  */
 
14294
-  destptr = xmalloc (ssize * size);
 
14295
+  destptr = xmallocarray (ssize, size);
 
14296
   dest = (char *)destptr;
 
14297
   src = source->base_addr;
 
14298
   stride0 = stride[0] * size;
 
14299
Index: libgfortran/runtime/memory.c
 
14300
===================================================================
 
14301
--- a/src/libgfortran/runtime/memory.c  (.../tags/gcc_4_8_3_release)
 
14302
+++ b/src/libgfortran/runtime/memory.c  (.../branches/gcc-4_8-branch)
 
14303
@@ -25,8 +25,13 @@
 
14304
 
 
14305
 #include "libgfortran.h"
 
14306
 #include <stdlib.h>
 
14307
+#include <errno.h>
 
14308
 
 
14309
+#ifndef SIZE_MAX
 
14310
+#define SIZE_MAX ((size_t)-1)
 
14311
+#endif
 
14312
 
 
14313
+
 
14314
 void *
 
14315
 xmalloc (size_t n)
 
14316
 {
 
14317
@@ -44,12 +49,34 @@
 
14318
 }
 
14319
 
 
14320
 
 
14321
+void *
 
14322
+xmallocarray (size_t nmemb, size_t size)
 
14323
+{
 
14324
+  void *p;
 
14325
+
 
14326
+  if (!nmemb || !size)
 
14327
+    size = nmemb = 1;
 
14328
+  else if (nmemb > SIZE_MAX / size)
 
14329
+    {
 
14330
+      errno = ENOMEM;
 
14331
+      os_error ("Integer overflow in xmallocarray");
 
14332
+    }
 
14333
+
 
14334
+  p = malloc (nmemb * size);
 
14335
+
 
14336
+  if (!p)
 
14337
+    os_error ("Memory allocation failed in xmallocarray");
 
14338
+
 
14339
+  return p;
 
14340
+}
 
14341
+
 
14342
+
 
14343
 /* calloc wrapper that aborts on error.  */
 
14344
 
 
14345
 void *
 
14346
 xcalloc (size_t nmemb, size_t size)
 
14347
 {
 
14348
-  if (nmemb * size == 0)
 
14349
+  if (!nmemb || !size)
 
14350
     nmemb = size = 1;
 
14351
 
 
14352
   void *p = calloc (nmemb, size);
 
14353
Index: libgfortran/runtime/convert_char.c
 
14354
===================================================================
 
14355
--- a/src/libgfortran/runtime/convert_char.c    (.../tags/gcc_4_8_3_release)
 
14356
+++ b/src/libgfortran/runtime/convert_char.c    (.../branches/gcc-4_8-branch)
 
14357
@@ -44,7 +44,7 @@
 
14358
   gfc_charlen_type i, l;
 
14359
 
 
14360
   l = len > 0 ? len : 0;
 
14361
-  *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
 
14362
+  *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
 
14363
 
 
14364
   for (i = 0; i < l; i++)
 
14365
     (*dst)[i] = src[i];
 
14366
@@ -60,7 +60,7 @@
 
14367
   gfc_charlen_type i, l;
 
14368
 
 
14369
   l = len > 0 ? len : 0;
 
14370
-  *dst = xmalloc ((l + 1) * sizeof (unsigned char));
 
14371
+  *dst = xmalloc (l + 1);
 
14372
 
 
14373
   for (i = 0; i < l; i++)
 
14374
     (*dst)[i] = src[i];
 
14375
Index: libgfortran/runtime/environ.c
 
14376
===================================================================
 
14377
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
 
14378
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
 
14379
@@ -833,7 +833,7 @@
 
14380
     }
 
14381
   else
 
14382
     {
 
14383
-      elist = xmalloc (unit_count * sizeof (exception_t));
 
14384
+      elist = xmallocarray (unit_count, sizeof (exception_t));
 
14385
       do_count = 0;
 
14386
       p = val;
 
14387
       do_parse ();
 
14388
Index: libgfortran/runtime/main.c
 
14389
===================================================================
 
14390
--- a/src/libgfortran/runtime/main.c    (.../tags/gcc_4_8_3_release)
 
14391
+++ b/src/libgfortran/runtime/main.c    (.../branches/gcc-4_8-branch)
 
14392
@@ -153,6 +153,16 @@
 
14393
 }
 
14394
 
 
14395
 
 
14396
+#ifndef HAVE_STRTOK_R
 
14397
+static char*
 
14398
+gfstrtok_r (char *str, const char *delim, 
 
14399
+           char **saveptr __attribute__ ((unused)))
 
14400
+{
 
14401
+  return strtok (str, delim);
 
14402
+}
 
14403
+#define strtok_r gfstrtok_r
 
14404
+#endif
 
14405
+
 
14406
 char *addr2line_path;
 
14407
 
 
14408
 /* Find addr2line and store the path.  */
 
14409
@@ -161,30 +171,32 @@
 
14410
 find_addr2line (void)
 
14411
 {
 
14412
 #ifdef HAVE_ACCESS
 
14413
-#define A2L_LEN 10
 
14414
+#define A2L_LEN 11
 
14415
   char *path = secure_getenv ("PATH");
 
14416
   if (!path)
 
14417
     return;
 
14418
+  char *tp = strdup (path);
 
14419
+  if (!tp)
 
14420
+    return;
 
14421
   size_t n = strlen (path);
 
14422
-  char ap[n + 1 + A2L_LEN];
 
14423
-  size_t ai = 0;
 
14424
-  for (size_t i = 0; i < n; i++)
 
14425
+  char *ap = xmalloc (n + A2L_LEN);
 
14426
+  char *saveptr;
 
14427
+  for (char *str = tp;; str = NULL)
 
14428
     {
 
14429
-      if (path[i] != ':')
 
14430
-       ap[ai++] = path[i];
 
14431
-      else
 
14432
+      char *token = strtok_r (str, ":", &saveptr);
 
14433
+      if (!token)
 
14434
+       break;
 
14435
+      size_t toklen = strlen (token);
 
14436
+      memcpy (ap, token, toklen);
 
14437
+      memcpy (ap + toklen, "/addr2line", A2L_LEN);
 
14438
+      if (access (ap, R_OK|X_OK) == 0)
 
14439
        {
 
14440
-         ap[ai++] = '/';
 
14441
-         memcpy (ap + ai, "addr2line", A2L_LEN);
 
14442
-         if (access (ap, R_OK|X_OK) == 0)
 
14443
-           {
 
14444
-             addr2line_path = strdup (ap);
 
14445
-             return;
 
14446
-           }
 
14447
-         else
 
14448
-           ai = 0;
 
14449
+         addr2line_path = strdup (ap);
 
14450
+         break;
 
14451
        }
 
14452
     }
 
14453
+  free (tp);
 
14454
+  free (ap);
 
14455
 #endif
 
14456
 }
 
14457
 
 
14458
Index: libgfortran/intrinsics/string_intrinsics_inc.c
 
14459
===================================================================
 
14460
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../tags/gcc_4_8_3_release)
 
14461
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../branches/gcc-4_8-branch)
 
14462
@@ -164,7 +164,7 @@
 
14463
   else
 
14464
     {
 
14465
       /* Allocate space for result string.  */
 
14466
-      *dest = xmalloc (*len * sizeof (CHARTYPE));
 
14467
+      *dest = xmallocarray (*len, sizeof (CHARTYPE));
 
14468
 
 
14469
       /* Copy string if necessary.  */
 
14470
       memcpy (*dest, src, *len * sizeof (CHARTYPE));
 
14471
@@ -442,7 +442,7 @@
 
14472
     *dest = &zero_length_string;
 
14473
   else
 
14474
     {
 
14475
-      CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
 
14476
+      CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
 
14477
       memcpy (tmp, res, reslen * sizeof (CHARTYPE));
 
14478
       MEMSET (&tmp[reslen], ' ', *rlen - reslen);
 
14479
       *dest = tmp;
 
14480
Index: libgfortran/intrinsics/pack_generic.c
 
14481
===================================================================
 
14482
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
 
14483
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
 
14484
@@ -152,8 +152,8 @@
 
14485
          GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
 
14486
 
 
14487
          ret->offset = 0;
 
14488
-         /* xmalloc allocates a single byte for zero size.  */
 
14489
-         ret->base_addr = xmalloc (size * total);
 
14490
+         /* xmallocarray allocates a single byte for zero size.  */
 
14491
+         ret->base_addr = xmallocarray (total, size);
 
14492
 
 
14493
          if (total == 0)
 
14494
            return;      /* In this case, nothing remains to be done.  */
 
14495
@@ -519,7 +519,7 @@
 
14496
 
 
14497
       ret->offset = 0;
 
14498
 
 
14499
-      ret->base_addr = xmalloc (size * total);
 
14500
+      ret->base_addr = xmallocarray (total, size);
 
14501
 
 
14502
       if (total == 0)
 
14503
        return;
 
14504
Index: libgfortran/intrinsics/transpose_generic.c
 
14505
===================================================================
 
14506
--- a/src/libgfortran/intrinsics/transpose_generic.c    (.../tags/gcc_4_8_3_release)
 
14507
+++ b/src/libgfortran/intrinsics/transpose_generic.c    (.../branches/gcc-4_8-branch)
 
14508
@@ -60,7 +60,7 @@
 
14509
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
14510
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
14511
 
 
14512
-      ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
 
14513
+      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
 
14514
       ret->offset = 0;
 
14515
     }
 
14516
   else if (unlikely (compile_options.bounds_check))
 
14517
Index: libgfortran/intrinsics/cshift0.c
 
14518
===================================================================
 
14519
--- a/src/libgfortran/intrinsics/cshift0.c      (.../tags/gcc_4_8_3_release)
 
14520
+++ b/src/libgfortran/intrinsics/cshift0.c      (.../branches/gcc-4_8-branch)
 
14521
@@ -79,8 +79,8 @@
 
14522
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14523
         }
 
14524
 
 
14525
-      /* xmalloc allocates a single byte for zero size.  */
 
14526
-      ret->base_addr = xmalloc (size * arraysize);
 
14527
+      /* xmallocarray allocates a single byte for zero size.  */
 
14528
+      ret->base_addr = xmallocarray (arraysize, size);
 
14529
     }
 
14530
   else if (unlikely (compile_options.bounds_check))
 
14531
     {
 
14532
Index: libgfortran/intrinsics/ctime.c
 
14533
===================================================================
 
14534
--- a/src/libgfortran/intrinsics/ctime.c        (.../tags/gcc_4_8_3_release)
 
14535
+++ b/src/libgfortran/intrinsics/ctime.c        (.../branches/gcc-4_8-branch)
 
14536
@@ -31,31 +31,53 @@
 
14537
 #include <string.h>
 
14538
 
 
14539
 
 
14540
-/* strftime-like function that fills a C string with %c format which
 
14541
-   is identical to ctime in the default locale. As ctime and ctime_r
 
14542
-   are poorly specified and their usage not recommended, the
 
14543
-   implementation instead uses strftime.  */
 
14544
+/* Maximum space a ctime-like string might need. A "normal" ctime
 
14545
+   string is 26 bytes, and in our case 24 bytes as we don't include
 
14546
+   the trailing newline and null. However, the longest possible year
 
14547
+   number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
 
14548
+   32-bit signed integer) so an extra 7 bytes are needed. */
 
14549
+#define CTIME_BUFSZ 31
 
14550
 
 
14551
-static size_t
 
14552
-strctime (char *s, size_t max, const time_t *timep)
 
14553
+
 
14554
+/* Thread-safe ctime-like function that fills a Fortran
 
14555
+   string. ctime_r is a portability headache and marked as obsolescent
 
14556
+   in POSIX 2008, which recommends strftime in its place. However,
 
14557
+   strftime(..., "%c",...)  doesn't produce ctime-like output on
 
14558
+   MinGW, so do it manually with snprintf.  */
 
14559
+
 
14560
+static int
 
14561
+gf_ctime (char *s, size_t max, const time_t timev)
 
14562
 {
 
14563
   struct tm ltm;
 
14564
   int failed;
 
14565
+  char buf[CTIME_BUFSZ + 1];
 
14566
   /* Some targets provide a localtime_r based on a draft of the POSIX
 
14567
      standard where the return type is int rather than the
 
14568
      standardized struct tm*.  */
 
14569
-  __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, &ltm)) 
 
14570
+  __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, &ltm)) 
 
14571
                         == 5,
 
14572
-                        failed = localtime_r (timep, &ltm) == NULL,
 
14573
-                        failed = localtime_r (timep, &ltm) != 0);
 
14574
+                        failed = localtime_r (&timev, &ltm) == NULL,
 
14575
+                        failed = localtime_r (&timev, &ltm) != 0);
 
14576
   if (failed)
 
14577
-    return 0;
 
14578
-  return strftime (s, max, "%c", &ltm);
 
14579
+    goto blank;
 
14580
+  int n = snprintf (buf, sizeof (buf), 
 
14581
+                   "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
 
14582
+                   "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
 
14583
+                   "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
 
14584
+                   ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 
 
14585
+                   1900 + ltm.tm_year);
 
14586
+  if (n < 0)
 
14587
+    goto blank;
 
14588
+  if ((size_t) n <= max)
 
14589
+    {
 
14590
+      cf_strcpy (s, max, buf);
 
14591
+      return n;
 
14592
+    }
 
14593
+ blank:
 
14594
+  memset (s, ' ', max);
 
14595
+  return 0;
 
14596
 }
 
14597
 
 
14598
-/* In the default locale, the date and time representation fits in 26
 
14599
-   bytes. However, other locales might need more space.  */
 
14600
-#define CSZ 100
 
14601
 
 
14602
 extern void fdate (char **, gfc_charlen_type *);
 
14603
 export_proto(fdate);
 
14604
@@ -64,8 +86,8 @@
 
14605
 fdate (char ** date, gfc_charlen_type * date_len)
 
14606
 {
 
14607
   time_t now = time(NULL);
 
14608
-  *date = xmalloc (CSZ);
 
14609
-  *date_len = strctime (*date, CSZ, &now);
 
14610
+  *date = xmalloc (CTIME_BUFSZ);
 
14611
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
14612
 }
 
14613
 
 
14614
 
 
14615
@@ -76,10 +98,7 @@
 
14616
 fdate_sub (char * date, gfc_charlen_type date_len)
 
14617
 {
 
14618
   time_t now = time(NULL);
 
14619
-  char *s = xmalloc (date_len + 1);
 
14620
-  size_t n = strctime (s, date_len + 1, &now);
 
14621
-  fstrcpy (date, date_len, s, n);
 
14622
-  free (s);
 
14623
+  gf_ctime (date, date_len, now);
 
14624
 }
 
14625
 
 
14626
 
 
14627
@@ -91,8 +110,8 @@
 
14628
 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
 
14629
 {
 
14630
   time_t now = t;
 
14631
-  *date = xmalloc (CSZ);
 
14632
-  *date_len = strctime (*date, CSZ, &now);
 
14633
+  *date = xmalloc (CTIME_BUFSZ);
 
14634
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
14635
 }
 
14636
 
 
14637
 
 
14638
@@ -103,8 +122,5 @@
 
14639
 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
 
14640
 {
 
14641
   time_t now = *t;
 
14642
-  char *s = xmalloc (date_len + 1);
 
14643
-  size_t n = strctime (s, date_len + 1, &now);
 
14644
-  fstrcpy (date, date_len, s, n);
 
14645
-  free (s);
 
14646
+  gf_ctime (date, date_len, now);
 
14647
 }
 
14648
Index: libgfortran/intrinsics/spread_generic.c
 
14649
===================================================================
 
14650
--- a/src/libgfortran/intrinsics/spread_generic.c       (.../tags/gcc_4_8_3_release)
 
14651
+++ b/src/libgfortran/intrinsics/spread_generic.c       (.../branches/gcc-4_8-branch)
 
14652
@@ -100,7 +100,7 @@
 
14653
          GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
 
14654
        }
 
14655
       ret->offset = 0;
 
14656
-      ret->base_addr = xmalloc (rs * size);
 
14657
+      ret->base_addr = xmallocarray (rs, size);
 
14658
 
 
14659
       if (rs <= 0)
 
14660
        return;
 
14661
@@ -245,7 +245,7 @@
 
14662
 
 
14663
   if (ret->base_addr == NULL)
 
14664
     {
 
14665
-      ret->base_addr = xmalloc (ncopies * size);
 
14666
+      ret->base_addr = xmallocarray (ncopies, size);
 
14667
       ret->offset = 0;
 
14668
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14669
     }
 
14670
Index: libgfortran/intrinsics/unpack_generic.c
 
14671
===================================================================
 
14672
--- a/src/libgfortran/intrinsics/unpack_generic.c       (.../tags/gcc_4_8_3_release)
 
14673
+++ b/src/libgfortran/intrinsics/unpack_generic.c       (.../branches/gcc-4_8-branch)
 
14674
@@ -125,7 +125,7 @@
 
14675
          rs *= extent[n];
 
14676
        }
 
14677
       ret->offset = 0;
 
14678
-      ret->base_addr = xmalloc (rs * size);
 
14679
+      ret->base_addr = xmallocarray (rs, size);
 
14680
     }
 
14681
   else
 
14682
     {
 
14683
Index: libgfortran/intrinsics/eoshift0.c
 
14684
===================================================================
 
14685
--- a/src/libgfortran/intrinsics/eoshift0.c     (.../tags/gcc_4_8_3_release)
 
14686
+++ b/src/libgfortran/intrinsics/eoshift0.c     (.../branches/gcc-4_8-branch)
 
14687
@@ -86,8 +86,8 @@
 
14688
 
 
14689
         }
 
14690
 
 
14691
-      /* xmalloc allocates a single byte for zero size.  */
 
14692
-      ret->base_addr = xmalloc (size * arraysize);
 
14693
+      /* xmallocarray allocates a single byte for zero size.  */
 
14694
+      ret->base_addr = xmallocarray (arraysize, size);
 
14695
     }
 
14696
   else if (unlikely (compile_options.bounds_check))
 
14697
     {
 
14698
Index: libgfortran/intrinsics/eoshift2.c
 
14699
===================================================================
 
14700
--- a/src/libgfortran/intrinsics/eoshift2.c     (.../tags/gcc_4_8_3_release)
 
14701
+++ b/src/libgfortran/intrinsics/eoshift2.c     (.../branches/gcc-4_8-branch)
 
14702
@@ -78,8 +78,8 @@
 
14703
       ret->offset = 0;
 
14704
       ret->dtype = array->dtype;
 
14705
 
 
14706
-      /* xmalloc allocates a single byte for zero size.  */
 
14707
-      ret->base_addr = xmalloc (size * arraysize);
 
14708
+      /* xmallocarray allocates a single byte for zero size.  */
 
14709
+      ret->base_addr = xmallocarray (arraysize, size);
 
14710
 
 
14711
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14712
         {
 
14713
Index: libgfortran/intrinsics/reshape_generic.c
 
14714
===================================================================
 
14715
--- a/src/libgfortran/intrinsics/reshape_generic.c      (.../tags/gcc_4_8_3_release)
 
14716
+++ b/src/libgfortran/intrinsics/reshape_generic.c      (.../branches/gcc-4_8-branch)
 
14717
@@ -99,11 +99,11 @@
 
14718
       ret->offset = 0;
 
14719
 
 
14720
       if (unlikely (rs < 1))
 
14721
-       alloc_size = 1;
 
14722
+       alloc_size = 0; /* xmalloc will allocate 1 byte.  */
 
14723
       else
 
14724
-       alloc_size = rs * size;
 
14725
+       alloc_size = rs;
 
14726
 
 
14727
-      ret->base_addr = xmalloc (alloc_size);
 
14728
+      ret->base_addr = xmallocarray (alloc_size, size);
 
14729
 
 
14730
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
14731
     }
 
14732
Index: libgfortran/configure.ac
 
14733
===================================================================
 
14734
--- a/src/libgfortran/configure.ac      (.../tags/gcc_4_8_3_release)
 
14735
+++ b/src/libgfortran/configure.ac      (.../branches/gcc-4_8-branch)
 
14736
@@ -267,7 +267,7 @@
 
14737
 strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
 
14738
 getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
 
14739
 readlink getgid getpid getppid getuid geteuid umask getegid \
 
14740
-secure_getenv __secure_getenv)
 
14741
+secure_getenv __secure_getenv strtok_r)
 
14742
 
 
14743
 # Check strerror_r, cannot be above as versions with two and three arguments exist
 
14744
 LIBGFOR_CHECK_STRERROR_R
 
14745
Index: libgfortran/ChangeLog
 
14746
===================================================================
 
14747
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
14748
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
 
14749
@@ -1,3 +1,94 @@
 
14750
+2014-10-20  Janne Blomqvist  <jb@gcc.gnu.org>
 
14751
+
 
14752
+       PR libfortran/63589
 
14753
+       * configure.ac: Check for strtok_r.
 
14754
+       * runtime/main.c (gfstrtok_r): Fallback implementation of
 
14755
+       strtok_r.
 
14756
+       (find_addr2line): Use strtok_r to split PATH.
 
14757
+       * config.h.in: Regenerated.
 
14758
+       * configure: Regenerated.
 
14759
+
 
14760
+2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
 
14761
+
 
14762
+       PR libgfortran/62188
 
14763
+       * m4/bessel.m4: Avoid indexing off the end of an array.
 
14764
+       * generated/bessel_r10.c: Regenerated.
 
14765
+       * generated/bessel_r16.c: Ditto.
 
14766
+       * generated/bessel_r4.c: Ditto.
 
14767
+       * generated/bessel_r8.c: Ditto.
 
14768
+
 
14769
+2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>
 
14770
+
 
14771
+       Backport from mainline
 
14772
+       CVE-2014-5044
 
14773
+        * libgfortran.h (xmallocarray): New prototype.
 
14774
+        * runtime/memory.c (xmallocarray): New function.
 
14775
+        (xcalloc): Check for nonzero separately instead of multiplying.
 
14776
+        * generated/*.c: Regenerated.
 
14777
+        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
 
14778
+        xmalloc.
 
14779
+        * intrinsics/eoshift0.c (eoshift0): Likewise.
 
14780
+        * intrinsics/eoshift2.c (eoshift2): Likewise.
 
14781
+        * intrinsics/pack_generic.c (pack_internal): Likewise.
 
14782
+        (pack_s_internal): Likewise.
 
14783
+        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
 
14784
+        * intrinsics/spread_generic.c (spread_internal): Likewise.
 
14785
+        (spread_internal_scalar): Likewise.
 
14786
+        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
 
14787
+        (string_minmax): Likewise.
 
14788
+        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
 
14789
+        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
 
14790
+        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
 
14791
+        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
 
14792
+        xmalloc.
 
14793
+        * io/unit.c (get_internal_unit): Likewise.
 
14794
+        (filename_from_unit): Don't cast xmalloc return value.
 
14795
+        * io/write.c (nml_write_obj): Likewise, formatting.
 
14796
+        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
 
14797
+        instead of xmalloc.
 
14798
+        (besse_yn_r'rtype_kind`): Likewise.
 
14799
+        * m4/cshift1.m4 (cshift1): Likewise.
 
14800
+        * m4/eoshift1.m4 (eoshift1): Likewise.
 
14801
+        * m4/eoshift3.m4 (eoshift3): Likewise.
 
14802
+        * m4/iforeach.m4: Likewise.
 
14803
+        * m4/ifunction.m4: Likewise.
 
14804
+        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
 
14805
+        Likewise.
 
14806
+        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
 
14807
+        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
 
14808
+        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
 
14809
+        * m4/pack.m4 (pack_'rtype_code`): Likewise.
 
14810
+        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
 
14811
+        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
 
14812
+        * m4/spread.m4 (spread_'rtype_code`): Likewise.
 
14813
+        (spread_scalar_'rtype_code`): Likewise.
 
14814
+        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
 
14815
+        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
 
14816
+        (unpack1_'rtype_code`): Likewise.
 
14817
+        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
 
14818
+        (convert_char4_to_char1): Simplify.
 
14819
+        * runtime/environ.c (init_unformatted): Call xmallocarray instead
 
14820
+        of xmalloc.
 
14821
+        * runtime/in_pack_generic.c (internal_pack): Likewise.
 
14822
+
 
14823
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
14824
+
 
14825
+       Backport from mainline
 
14826
+       PR libfortran/61310
 
14827
+       * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
 
14828
+       instead of strftime.
 
14829
+       (fdate): Use gf_ctime.
 
14830
+       (fdate_sub): Likewise.
 
14831
+       (ctime): Likewise.
 
14832
+       (ctime_sub): Likewise.
 
14833
+
 
14834
+2014-05-25  Janne Blomqvist  <jb@gcc.gnu.org>
 
14835
+
 
14836
+       Backport from trunk.
 
14837
+       PR libfortran/61187
 
14838
+       * io/unix.c (raw_close): Check if s->fd is -1.
 
14839
+       (fd_to_stream): Check return value of fstat(), handle error.
 
14840
+
 
14841
 2014-05-22  Release Manager
 
14842
 
 
14843
        * GCC 4.8.3 released.
 
14844
Index: libgfortran/generated/spread_r10.c
 
14845
===================================================================
 
14846
--- a/src/libgfortran/generated/spread_r10.c    (.../tags/gcc_4_8_3_release)
 
14847
+++ b/src/libgfortran/generated/spread_r10.c    (.../branches/gcc-4_8-branch)
 
14848
@@ -101,8 +101,8 @@
 
14849
        }
 
14850
       ret->offset = 0;
 
14851
 
 
14852
-      /* xmalloc allocates a single byte for zero size.  */
 
14853
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
 
14854
+      /* xmallocarray allocates a single byte for zero size.  */
 
14855
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
 
14856
       if (rs <= 0)
 
14857
         return;
 
14858
     }
 
14859
@@ -244,7 +244,7 @@
 
14860
 
 
14861
   if (ret->base_addr == NULL)
 
14862
     {
 
14863
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
 
14864
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
 
14865
       ret->offset = 0;
 
14866
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14867
     }
 
14868
Index: libgfortran/generated/maxloc1_4_r8.c
 
14869
===================================================================
 
14870
--- a/src/libgfortran/generated/maxloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
14871
+++ b/src/libgfortran/generated/maxloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
14872
@@ -98,10 +98,9 @@
 
14873
       retarray->offset = 0;
 
14874
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14875
 
 
14876
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14877
-                  * extent[rank-1];
 
14878
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14879
 
 
14880
-      retarray->base_addr = xmalloc (alloc_size);
 
14881
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14882
       if (alloc_size == 0)
 
14883
        {
 
14884
          /* Make sure we have a zero-sized array.  */
 
14885
@@ -294,8 +293,7 @@
 
14886
 
 
14887
        }
 
14888
 
 
14889
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14890
-                  * extent[rank-1];
 
14891
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14892
 
 
14893
       retarray->offset = 0;
 
14894
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14895
@@ -307,7 +305,7 @@
 
14896
          return;
 
14897
        }
 
14898
       else
 
14899
-       retarray->base_addr = xmalloc (alloc_size);
 
14900
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14901
 
 
14902
     }
 
14903
   else
 
14904
@@ -485,8 +483,7 @@
 
14905
       retarray->offset = 0;
 
14906
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14907
 
 
14908
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14909
-                  * extent[rank-1];
 
14910
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14911
 
 
14912
       if (alloc_size == 0)
 
14913
        {
 
14914
@@ -495,7 +492,7 @@
 
14915
          return;
 
14916
        }
 
14917
       else
 
14918
-       retarray->base_addr = xmalloc (alloc_size);
 
14919
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14920
     }
 
14921
   else
 
14922
     {
 
14923
Index: libgfortran/generated/norm2_r4.c
 
14924
===================================================================
 
14925
--- a/src/libgfortran/generated/norm2_r4.c      (.../tags/gcc_4_8_3_release)
 
14926
+++ b/src/libgfortran/generated/norm2_r4.c      (.../branches/gcc-4_8-branch)
 
14927
@@ -101,10 +101,9 @@
 
14928
       retarray->offset = 0;
 
14929
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14930
 
 
14931
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14932
-                  * extent[rank-1];
 
14933
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14934
 
 
14935
-      retarray->base_addr = xmalloc (alloc_size);
 
14936
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14937
       if (alloc_size == 0)
 
14938
        {
 
14939
          /* Make sure we have a zero-sized array.  */
 
14940
Index: libgfortran/generated/parity_l2.c
 
14941
===================================================================
 
14942
--- a/src/libgfortran/generated/parity_l2.c     (.../tags/gcc_4_8_3_release)
 
14943
+++ b/src/libgfortran/generated/parity_l2.c     (.../branches/gcc-4_8-branch)
 
14944
@@ -98,10 +98,9 @@
 
14945
       retarray->offset = 0;
 
14946
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14947
 
 
14948
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14949
-                  * extent[rank-1];
 
14950
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14951
 
 
14952
-      retarray->base_addr = xmalloc (alloc_size);
 
14953
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
14954
       if (alloc_size == 0)
 
14955
        {
 
14956
          /* Make sure we have a zero-sized array.  */
 
14957
Index: libgfortran/generated/eoshift3_4.c
 
14958
===================================================================
 
14959
--- a/src/libgfortran/generated/eoshift3_4.c    (.../tags/gcc_4_8_3_release)
 
14960
+++ b/src/libgfortran/generated/eoshift3_4.c    (.../branches/gcc-4_8-branch)
 
14961
@@ -89,7 +89,7 @@
 
14962
     {
 
14963
       int i;
 
14964
 
 
14965
-      ret->base_addr = xmalloc (size * arraysize);
 
14966
+      ret->base_addr = xmallocarray (arraysize, size);
 
14967
       ret->offset = 0;
 
14968
       ret->dtype = array->dtype;
 
14969
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14970
@@ -107,8 +107,8 @@
 
14971
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14972
 
 
14973
         }
 
14974
-      /* xmalloc allocates a single byte for zero size.  */
 
14975
-      ret->base_addr = xmalloc (size * arraysize);
 
14976
+      /* xmallocarray allocates a single byte for zero size.  */
 
14977
+      ret->base_addr = xmallocarray (arraysize, size);
 
14978
 
 
14979
     }
 
14980
   else if (unlikely (compile_options.bounds_check))
 
14981
Index: libgfortran/generated/transpose_c8.c
 
14982
===================================================================
 
14983
--- a/src/libgfortran/generated/transpose_c8.c  (.../tags/gcc_4_8_3_release)
 
14984
+++ b/src/libgfortran/generated/transpose_c8.c  (.../branches/gcc-4_8-branch)
 
14985
@@ -60,7 +60,8 @@
 
14986
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
14987
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
14988
 
 
14989
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
 
14990
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
14991
+                                     sizeof (GFC_COMPLEX_8));
 
14992
       ret->offset = 0;
 
14993
     } else if (unlikely (compile_options.bounds_check))
 
14994
     {
 
14995
Index: libgfortran/generated/eoshift1_8.c
 
14996
===================================================================
 
14997
--- a/src/libgfortran/generated/eoshift1_8.c    (.../tags/gcc_4_8_3_release)
 
14998
+++ b/src/libgfortran/generated/eoshift1_8.c    (.../branches/gcc-4_8-branch)
 
14999
@@ -105,8 +105,8 @@
 
15000
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
15001
 
 
15002
         }
 
15003
-      /* xmalloc allocates a single byte for zero size.  */
 
15004
-      ret->base_addr = xmalloc (size * arraysize);
 
15005
+      /* xmallocarray allocates a single byte for zero size.  */
 
15006
+      ret->base_addr = xmallocarray (arraysize, size);
 
15007
 
 
15008
     }
 
15009
   else if (unlikely (compile_options.bounds_check))
 
15010
Index: libgfortran/generated/reshape_r16.c
 
15011
===================================================================
 
15012
--- a/src/libgfortran/generated/reshape_r16.c   (.../tags/gcc_4_8_3_release)
 
15013
+++ b/src/libgfortran/generated/reshape_r16.c   (.../branches/gcc-4_8-branch)
 
15014
@@ -111,11 +111,11 @@
 
15015
       ret->offset = 0;
 
15016
 
 
15017
       if (unlikely (rs < 1))
 
15018
-        alloc_size = 1;
 
15019
+        alloc_size = 0;
 
15020
       else
 
15021
-        alloc_size = rs * sizeof (GFC_REAL_16);
 
15022
+        alloc_size = rs;
 
15023
 
 
15024
-      ret->base_addr = xmalloc (alloc_size);
 
15025
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15026
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
15027
     }
 
15028
 
 
15029
Index: libgfortran/generated/bessel_r4.c
 
15030
===================================================================
 
15031
--- a/src/libgfortran/generated/bessel_r4.c     (.../tags/gcc_4_8_3_release)
 
15032
+++ b/src/libgfortran/generated/bessel_r4.c     (.../branches/gcc-4_8-branch)
 
15033
@@ -55,7 +55,7 @@
 
15034
     {
 
15035
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15036
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15037
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
15038
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
15039
       ret->offset = 0;
 
15040
     }
 
15041
 
 
15042
@@ -122,7 +122,7 @@
 
15043
     {
 
15044
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15045
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15046
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
15047
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
15048
       ret->offset = 0;
 
15049
     }
 
15050
 
 
15051
@@ -162,7 +162,7 @@
 
15052
 
 
15053
   x2rev = GFC_REAL_4_LITERAL(2.)/x;
 
15054
 
 
15055
-  for (i = 2; i <= n1+n2; i++)
 
15056
+  for (i = 2; i <= n2 - n1; i++)
 
15057
     {
 
15058
 #if defined(GFC_REAL_4_INFINITY)
 
15059
       if (unlikely (last2 == -GFC_REAL_4_INFINITY))
 
15060
Index: libgfortran/generated/any_l2.c
 
15061
===================================================================
 
15062
--- a/src/libgfortran/generated/any_l2.c        (.../tags/gcc_4_8_3_release)
 
15063
+++ b/src/libgfortran/generated/any_l2.c        (.../branches/gcc-4_8-branch)
 
15064
@@ -101,8 +101,7 @@
 
15065
       retarray->offset = 0;
 
15066
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15067
 
 
15068
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15069
-                  * extent[rank-1];
 
15070
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15071
 
 
15072
       if (alloc_size == 0)
 
15073
        {
 
15074
@@ -111,7 +110,7 @@
 
15075
          return;
 
15076
        }
 
15077
       else
 
15078
-       retarray->base_addr = xmalloc (alloc_size);
 
15079
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
15080
     }
 
15081
   else
 
15082
     {
 
15083
Index: libgfortran/generated/product_r4.c
 
15084
===================================================================
 
15085
--- a/src/libgfortran/generated/product_r4.c    (.../tags/gcc_4_8_3_release)
 
15086
+++ b/src/libgfortran/generated/product_r4.c    (.../branches/gcc-4_8-branch)
 
15087
@@ -97,10 +97,9 @@
 
15088
       retarray->offset = 0;
 
15089
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15090
 
 
15091
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15092
-                  * extent[rank-1];
 
15093
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15094
 
 
15095
-      retarray->base_addr = xmalloc (alloc_size);
 
15096
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15097
       if (alloc_size == 0)
 
15098
        {
 
15099
          /* Make sure we have a zero-sized array.  */
 
15100
@@ -272,8 +271,7 @@
 
15101
 
 
15102
        }
 
15103
 
 
15104
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15105
-                  * extent[rank-1];
 
15106
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15107
 
 
15108
       retarray->offset = 0;
 
15109
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15110
@@ -285,7 +283,7 @@
 
15111
          return;
 
15112
        }
 
15113
       else
 
15114
-       retarray->base_addr = xmalloc (alloc_size);
 
15115
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15116
 
 
15117
     }
 
15118
   else
 
15119
@@ -430,8 +428,7 @@
 
15120
       retarray->offset = 0;
 
15121
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15122
 
 
15123
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15124
-                  * extent[rank-1];
 
15125
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15126
 
 
15127
       if (alloc_size == 0)
 
15128
        {
 
15129
@@ -440,7 +437,7 @@
 
15130
          return;
 
15131
        }
 
15132
       else
 
15133
-       retarray->base_addr = xmalloc (alloc_size);
 
15134
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15135
     }
 
15136
   else
 
15137
     {
 
15138
Index: libgfortran/generated/iany_i1.c
 
15139
===================================================================
 
15140
--- a/src/libgfortran/generated/iany_i1.c       (.../tags/gcc_4_8_3_release)
 
15141
+++ b/src/libgfortran/generated/iany_i1.c       (.../branches/gcc-4_8-branch)
 
15142
@@ -97,10 +97,9 @@
 
15143
       retarray->offset = 0;
 
15144
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15145
 
 
15146
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15147
-                  * extent[rank-1];
 
15148
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15149
 
 
15150
-      retarray->base_addr = xmalloc (alloc_size);
 
15151
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15152
       if (alloc_size == 0)
 
15153
        {
 
15154
          /* Make sure we have a zero-sized array.  */
 
15155
@@ -272,8 +271,7 @@
 
15156
 
 
15157
        }
 
15158
 
 
15159
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15160
-                  * extent[rank-1];
 
15161
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15162
 
 
15163
       retarray->offset = 0;
 
15164
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15165
@@ -285,7 +283,7 @@
 
15166
          return;
 
15167
        }
 
15168
       else
 
15169
-       retarray->base_addr = xmalloc (alloc_size);
 
15170
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15171
 
 
15172
     }
 
15173
   else
 
15174
@@ -430,8 +428,7 @@
 
15175
       retarray->offset = 0;
 
15176
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15177
 
 
15178
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15179
-                  * extent[rank-1];
 
15180
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15181
 
 
15182
       if (alloc_size == 0)
 
15183
        {
 
15184
@@ -440,7 +437,7 @@
 
15185
          return;
 
15186
        }
 
15187
       else
 
15188
-       retarray->base_addr = xmalloc (alloc_size);
 
15189
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15190
     }
 
15191
   else
 
15192
     {
 
15193
Index: libgfortran/generated/parity_l16.c
 
15194
===================================================================
 
15195
--- a/src/libgfortran/generated/parity_l16.c    (.../tags/gcc_4_8_3_release)
 
15196
+++ b/src/libgfortran/generated/parity_l16.c    (.../branches/gcc-4_8-branch)
 
15197
@@ -98,10 +98,9 @@
 
15198
       retarray->offset = 0;
 
15199
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15200
 
 
15201
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15202
-                  * extent[rank-1];
 
15203
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15204
 
 
15205
-      retarray->base_addr = xmalloc (alloc_size);
 
15206
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
15207
       if (alloc_size == 0)
 
15208
        {
 
15209
          /* Make sure we have a zero-sized array.  */
 
15210
Index: libgfortran/generated/in_pack_r4.c
 
15211
===================================================================
 
15212
--- a/src/libgfortran/generated/in_pack_r4.c    (.../tags/gcc_4_8_3_release)
 
15213
+++ b/src/libgfortran/generated/in_pack_r4.c    (.../branches/gcc-4_8-branch)
 
15214
@@ -76,7 +76,7 @@
 
15215
     return source->base_addr;
 
15216
 
 
15217
   /* Allocate storage for the destination.  */
 
15218
-  destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
 
15219
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
 
15220
   dest = destptr;
 
15221
   src = source->base_addr;
 
15222
   stride0 = stride[0];
 
15223
Index: libgfortran/generated/product_i2.c
 
15224
===================================================================
 
15225
--- a/src/libgfortran/generated/product_i2.c    (.../tags/gcc_4_8_3_release)
 
15226
+++ b/src/libgfortran/generated/product_i2.c    (.../branches/gcc-4_8-branch)
 
15227
@@ -97,10 +97,9 @@
 
15228
       retarray->offset = 0;
 
15229
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15230
 
 
15231
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15232
-                  * extent[rank-1];
 
15233
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15234
 
 
15235
-      retarray->base_addr = xmalloc (alloc_size);
 
15236
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15237
       if (alloc_size == 0)
 
15238
        {
 
15239
          /* Make sure we have a zero-sized array.  */
 
15240
@@ -272,8 +271,7 @@
 
15241
 
 
15242
        }
 
15243
 
 
15244
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15245
-                  * extent[rank-1];
 
15246
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15247
 
 
15248
       retarray->offset = 0;
 
15249
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15250
@@ -285,7 +283,7 @@
 
15251
          return;
 
15252
        }
 
15253
       else
 
15254
-       retarray->base_addr = xmalloc (alloc_size);
 
15255
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15256
 
 
15257
     }
 
15258
   else
 
15259
@@ -430,8 +428,7 @@
 
15260
       retarray->offset = 0;
 
15261
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15262
 
 
15263
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15264
-                  * extent[rank-1];
 
15265
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15266
 
 
15267
       if (alloc_size == 0)
 
15268
        {
 
15269
@@ -440,7 +437,7 @@
 
15270
          return;
 
15271
        }
 
15272
       else
 
15273
-       retarray->base_addr = xmalloc (alloc_size);
 
15274
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15275
     }
 
15276
   else
 
15277
     {
 
15278
Index: libgfortran/generated/iparity_i4.c
 
15279
===================================================================
 
15280
--- a/src/libgfortran/generated/iparity_i4.c    (.../tags/gcc_4_8_3_release)
 
15281
+++ b/src/libgfortran/generated/iparity_i4.c    (.../branches/gcc-4_8-branch)
 
15282
@@ -97,10 +97,9 @@
 
15283
       retarray->offset = 0;
 
15284
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15285
 
 
15286
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15287
-                  * extent[rank-1];
 
15288
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15289
 
 
15290
-      retarray->base_addr = xmalloc (alloc_size);
 
15291
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15292
       if (alloc_size == 0)
 
15293
        {
 
15294
          /* Make sure we have a zero-sized array.  */
 
15295
@@ -272,8 +271,7 @@
 
15296
 
 
15297
        }
 
15298
 
 
15299
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15300
-                  * extent[rank-1];
 
15301
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15302
 
 
15303
       retarray->offset = 0;
 
15304
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15305
@@ -285,7 +283,7 @@
 
15306
          return;
 
15307
        }
 
15308
       else
 
15309
-       retarray->base_addr = xmalloc (alloc_size);
 
15310
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15311
 
 
15312
     }
 
15313
   else
 
15314
@@ -430,8 +428,7 @@
 
15315
       retarray->offset = 0;
 
15316
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15317
 
 
15318
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15319
-                  * extent[rank-1];
 
15320
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15321
 
 
15322
       if (alloc_size == 0)
 
15323
        {
 
15324
@@ -440,7 +437,7 @@
 
15325
          return;
 
15326
        }
 
15327
       else
 
15328
-       retarray->base_addr = xmalloc (alloc_size);
 
15329
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15330
     }
 
15331
   else
 
15332
     {
 
15333
Index: libgfortran/generated/minloc0_4_i1.c
 
15334
===================================================================
 
15335
--- a/src/libgfortran/generated/minloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
15336
+++ b/src/libgfortran/generated/minloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
15337
@@ -58,7 +58,7 @@
 
15338
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15339
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15340
       retarray->offset = 0;
 
15341
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15342
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15343
     }
 
15344
   else
 
15345
     {
 
15346
@@ -199,7 +199,7 @@
 
15347
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15348
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15349
       retarray->offset = 0;
 
15350
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15351
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15352
     }
 
15353
   else
 
15354
     {
 
15355
@@ -367,7 +367,7 @@
 
15356
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15357
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15358
       retarray->offset = 0;
 
15359
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15360
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15361
     }
 
15362
   else if (unlikely (compile_options.bounds_check))
 
15363
     {
 
15364
Index: libgfortran/generated/reshape_c4.c
 
15365
===================================================================
 
15366
--- a/src/libgfortran/generated/reshape_c4.c    (.../tags/gcc_4_8_3_release)
 
15367
+++ b/src/libgfortran/generated/reshape_c4.c    (.../branches/gcc-4_8-branch)
 
15368
@@ -111,11 +111,11 @@
 
15369
       ret->offset = 0;
 
15370
 
 
15371
       if (unlikely (rs < 1))
 
15372
-        alloc_size = 1;
 
15373
+        alloc_size = 0;
 
15374
       else
 
15375
-        alloc_size = rs * sizeof (GFC_COMPLEX_4);
 
15376
+        alloc_size = rs;
 
15377
 
 
15378
-      ret->base_addr = xmalloc (alloc_size);
 
15379
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
15380
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
15381
     }
 
15382
 
 
15383
Index: libgfortran/generated/maxloc0_4_r16.c
 
15384
===================================================================
 
15385
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
15386
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
15387
@@ -58,7 +58,7 @@
 
15388
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15389
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15390
       retarray->offset = 0;
 
15391
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15392
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15393
     }
 
15394
   else
 
15395
     {
 
15396
@@ -199,7 +199,7 @@
 
15397
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15398
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15399
       retarray->offset = 0;
 
15400
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15401
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15402
     }
 
15403
   else
 
15404
     {
 
15405
@@ -367,7 +367,7 @@
 
15406
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15407
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15408
       retarray->offset = 0;
 
15409
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15410
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15411
     }
 
15412
   else if (unlikely (compile_options.bounds_check))
 
15413
     {
 
15414
Index: libgfortran/generated/iall_i8.c
 
15415
===================================================================
 
15416
--- a/src/libgfortran/generated/iall_i8.c       (.../tags/gcc_4_8_3_release)
 
15417
+++ b/src/libgfortran/generated/iall_i8.c       (.../branches/gcc-4_8-branch)
 
15418
@@ -97,10 +97,9 @@
 
15419
       retarray->offset = 0;
 
15420
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15421
 
 
15422
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15423
-                  * extent[rank-1];
 
15424
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15425
 
 
15426
-      retarray->base_addr = xmalloc (alloc_size);
 
15427
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15428
       if (alloc_size == 0)
 
15429
        {
 
15430
          /* Make sure we have a zero-sized array.  */
 
15431
@@ -272,8 +271,7 @@
 
15432
 
 
15433
        }
 
15434
 
 
15435
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15436
-                  * extent[rank-1];
 
15437
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15438
 
 
15439
       retarray->offset = 0;
 
15440
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15441
@@ -285,7 +283,7 @@
 
15442
          return;
 
15443
        }
 
15444
       else
 
15445
-       retarray->base_addr = xmalloc (alloc_size);
 
15446
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15447
 
 
15448
     }
 
15449
   else
 
15450
@@ -430,8 +428,7 @@
 
15451
       retarray->offset = 0;
 
15452
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15453
 
 
15454
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15455
-                  * extent[rank-1];
 
15456
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15457
 
 
15458
       if (alloc_size == 0)
 
15459
        {
 
15460
@@ -440,7 +437,7 @@
 
15461
          return;
 
15462
        }
 
15463
       else
 
15464
-       retarray->base_addr = xmalloc (alloc_size);
 
15465
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15466
     }
 
15467
   else
 
15468
     {
 
15469
Index: libgfortran/generated/maxloc1_8_r16.c
 
15470
===================================================================
 
15471
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
15472
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
15473
@@ -98,10 +98,9 @@
 
15474
       retarray->offset = 0;
 
15475
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15476
 
 
15477
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15478
-                  * extent[rank-1];
 
15479
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15480
 
 
15481
-      retarray->base_addr = xmalloc (alloc_size);
 
15482
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15483
       if (alloc_size == 0)
 
15484
        {
 
15485
          /* Make sure we have a zero-sized array.  */
 
15486
@@ -294,8 +293,7 @@
 
15487
 
 
15488
        }
 
15489
 
 
15490
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15491
-                  * extent[rank-1];
 
15492
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15493
 
 
15494
       retarray->offset = 0;
 
15495
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15496
@@ -307,7 +305,7 @@
 
15497
          return;
 
15498
        }
 
15499
       else
 
15500
-       retarray->base_addr = xmalloc (alloc_size);
 
15501
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15502
 
 
15503
     }
 
15504
   else
 
15505
@@ -485,8 +483,7 @@
 
15506
       retarray->offset = 0;
 
15507
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15508
 
 
15509
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15510
-                  * extent[rank-1];
 
15511
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15512
 
 
15513
       if (alloc_size == 0)
 
15514
        {
 
15515
@@ -495,7 +492,7 @@
 
15516
          return;
 
15517
        }
 
15518
       else
 
15519
-       retarray->base_addr = xmalloc (alloc_size);
 
15520
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15521
     }
 
15522
   else
 
15523
     {
 
15524
Index: libgfortran/generated/sum_r16.c
 
15525
===================================================================
 
15526
--- a/src/libgfortran/generated/sum_r16.c       (.../tags/gcc_4_8_3_release)
 
15527
+++ b/src/libgfortran/generated/sum_r16.c       (.../branches/gcc-4_8-branch)
 
15528
@@ -97,10 +97,9 @@
 
15529
       retarray->offset = 0;
 
15530
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15531
 
 
15532
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15533
-                  * extent[rank-1];
 
15534
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15535
 
 
15536
-      retarray->base_addr = xmalloc (alloc_size);
 
15537
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15538
       if (alloc_size == 0)
 
15539
        {
 
15540
          /* Make sure we have a zero-sized array.  */
 
15541
@@ -272,8 +271,7 @@
 
15542
 
 
15543
        }
 
15544
 
 
15545
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15546
-                  * extent[rank-1];
 
15547
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15548
 
 
15549
       retarray->offset = 0;
 
15550
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15551
@@ -285,7 +283,7 @@
 
15552
          return;
 
15553
        }
 
15554
       else
 
15555
-       retarray->base_addr = xmalloc (alloc_size);
 
15556
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15557
 
 
15558
     }
 
15559
   else
 
15560
@@ -430,8 +428,7 @@
 
15561
       retarray->offset = 0;
 
15562
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15563
 
 
15564
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15565
-                  * extent[rank-1];
 
15566
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15567
 
 
15568
       if (alloc_size == 0)
 
15569
        {
 
15570
@@ -440,7 +437,7 @@
 
15571
          return;
 
15572
        }
 
15573
       else
 
15574
-       retarray->base_addr = xmalloc (alloc_size);
 
15575
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15576
     }
 
15577
   else
 
15578
     {
 
15579
Index: libgfortran/generated/sum_i1.c
 
15580
===================================================================
 
15581
--- a/src/libgfortran/generated/sum_i1.c        (.../tags/gcc_4_8_3_release)
 
15582
+++ b/src/libgfortran/generated/sum_i1.c        (.../branches/gcc-4_8-branch)
 
15583
@@ -97,10 +97,9 @@
 
15584
       retarray->offset = 0;
 
15585
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15586
 
 
15587
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15588
-                  * extent[rank-1];
 
15589
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15590
 
 
15591
-      retarray->base_addr = xmalloc (alloc_size);
 
15592
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15593
       if (alloc_size == 0)
 
15594
        {
 
15595
          /* Make sure we have a zero-sized array.  */
 
15596
@@ -272,8 +271,7 @@
 
15597
 
 
15598
        }
 
15599
 
 
15600
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15601
-                  * extent[rank-1];
 
15602
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15603
 
 
15604
       retarray->offset = 0;
 
15605
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15606
@@ -285,7 +283,7 @@
 
15607
          return;
 
15608
        }
 
15609
       else
 
15610
-       retarray->base_addr = xmalloc (alloc_size);
 
15611
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15612
 
 
15613
     }
 
15614
   else
 
15615
@@ -430,8 +428,7 @@
 
15616
       retarray->offset = 0;
 
15617
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15618
 
 
15619
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15620
-                  * extent[rank-1];
 
15621
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15622
 
 
15623
       if (alloc_size == 0)
 
15624
        {
 
15625
@@ -440,7 +437,7 @@
 
15626
          return;
 
15627
        }
 
15628
       else
 
15629
-       retarray->base_addr = xmalloc (alloc_size);
 
15630
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15631
     }
 
15632
   else
 
15633
     {
 
15634
Index: libgfortran/generated/in_pack_i2.c
 
15635
===================================================================
 
15636
--- a/src/libgfortran/generated/in_pack_i2.c    (.../tags/gcc_4_8_3_release)
 
15637
+++ b/src/libgfortran/generated/in_pack_i2.c    (.../branches/gcc-4_8-branch)
 
15638
@@ -76,7 +76,7 @@
 
15639
     return source->base_addr;
 
15640
 
 
15641
   /* Allocate storage for the destination.  */
 
15642
-  destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
 
15643
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
 
15644
   dest = destptr;
 
15645
   src = source->base_addr;
 
15646
   stride0 = stride[0];
 
15647
Index: libgfortran/generated/transpose_r10.c
 
15648
===================================================================
 
15649
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
 
15650
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
 
15651
@@ -60,7 +60,8 @@
 
15652
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15653
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15654
 
 
15655
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
 
15656
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
15657
+                                     sizeof (GFC_REAL_10));
 
15658
       ret->offset = 0;
 
15659
     } else if (unlikely (compile_options.bounds_check))
 
15660
     {
 
15661
Index: libgfortran/generated/maxloc1_16_r16.c
 
15662
===================================================================
 
15663
--- a/src/libgfortran/generated/maxloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
15664
+++ b/src/libgfortran/generated/maxloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
15665
@@ -98,10 +98,9 @@
 
15666
       retarray->offset = 0;
 
15667
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15668
 
 
15669
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15670
-                  * extent[rank-1];
 
15671
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15672
 
 
15673
-      retarray->base_addr = xmalloc (alloc_size);
 
15674
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15675
       if (alloc_size == 0)
 
15676
        {
 
15677
          /* Make sure we have a zero-sized array.  */
 
15678
@@ -294,8 +293,7 @@
 
15679
 
 
15680
        }
 
15681
 
 
15682
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15683
-                  * extent[rank-1];
 
15684
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15685
 
 
15686
       retarray->offset = 0;
 
15687
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15688
@@ -307,7 +305,7 @@
 
15689
          return;
 
15690
        }
 
15691
       else
 
15692
-       retarray->base_addr = xmalloc (alloc_size);
 
15693
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15694
 
 
15695
     }
 
15696
   else
 
15697
@@ -485,8 +483,7 @@
 
15698
       retarray->offset = 0;
 
15699
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15700
 
 
15701
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15702
-                  * extent[rank-1];
 
15703
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15704
 
 
15705
       if (alloc_size == 0)
 
15706
        {
 
15707
@@ -495,7 +492,7 @@
 
15708
          return;
 
15709
        }
 
15710
       else
 
15711
-       retarray->base_addr = xmalloc (alloc_size);
 
15712
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15713
     }
 
15714
   else
 
15715
     {
 
15716
Index: libgfortran/generated/maxloc1_16_i4.c
 
15717
===================================================================
 
15718
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
15719
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
15720
@@ -98,10 +98,9 @@
 
15721
       retarray->offset = 0;
 
15722
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15723
 
 
15724
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15725
-                  * extent[rank-1];
 
15726
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15727
 
 
15728
-      retarray->base_addr = xmalloc (alloc_size);
 
15729
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15730
       if (alloc_size == 0)
 
15731
        {
 
15732
          /* Make sure we have a zero-sized array.  */
 
15733
@@ -294,8 +293,7 @@
 
15734
 
 
15735
        }
 
15736
 
 
15737
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15738
-                  * extent[rank-1];
 
15739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15740
 
 
15741
       retarray->offset = 0;
 
15742
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15743
@@ -307,7 +305,7 @@
 
15744
          return;
 
15745
        }
 
15746
       else
 
15747
-       retarray->base_addr = xmalloc (alloc_size);
 
15748
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15749
 
 
15750
     }
 
15751
   else
 
15752
@@ -485,8 +483,7 @@
 
15753
       retarray->offset = 0;
 
15754
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15755
 
 
15756
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15757
-                  * extent[rank-1];
 
15758
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15759
 
 
15760
       if (alloc_size == 0)
 
15761
        {
 
15762
@@ -495,7 +492,7 @@
 
15763
          return;
 
15764
        }
 
15765
       else
 
15766
-       retarray->base_addr = xmalloc (alloc_size);
 
15767
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15768
     }
 
15769
   else
 
15770
     {
 
15771
Index: libgfortran/generated/spread_i1.c
 
15772
===================================================================
 
15773
--- a/src/libgfortran/generated/spread_i1.c     (.../tags/gcc_4_8_3_release)
 
15774
+++ b/src/libgfortran/generated/spread_i1.c     (.../branches/gcc-4_8-branch)
 
15775
@@ -101,8 +101,8 @@
 
15776
        }
 
15777
       ret->offset = 0;
 
15778
 
 
15779
-      /* xmalloc allocates a single byte for zero size.  */
 
15780
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
 
15781
+      /* xmallocarray allocates a single byte for zero size.  */
 
15782
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
 
15783
       if (rs <= 0)
 
15784
         return;
 
15785
     }
 
15786
@@ -244,7 +244,7 @@
 
15787
 
 
15788
   if (ret->base_addr == NULL)
 
15789
     {
 
15790
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
 
15791
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
 
15792
       ret->offset = 0;
 
15793
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15794
     }
 
15795
Index: libgfortran/generated/maxloc0_16_i8.c
 
15796
===================================================================
 
15797
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
15798
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
15799
@@ -58,7 +58,7 @@
 
15800
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15801
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15802
       retarray->offset = 0;
 
15803
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15804
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15805
     }
 
15806
   else
 
15807
     {
 
15808
@@ -199,7 +199,7 @@
 
15809
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15810
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15811
       retarray->offset = 0;
 
15812
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15813
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15814
     }
 
15815
   else
 
15816
     {
 
15817
@@ -367,7 +367,7 @@
 
15818
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15819
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15820
       retarray->offset = 0;
 
15821
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15822
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15823
     }
 
15824
   else if (unlikely (compile_options.bounds_check))
 
15825
     {
 
15826
Index: libgfortran/generated/maxval_r16.c
 
15827
===================================================================
 
15828
--- a/src/libgfortran/generated/maxval_r16.c    (.../tags/gcc_4_8_3_release)
 
15829
+++ b/src/libgfortran/generated/maxval_r16.c    (.../branches/gcc-4_8-branch)
 
15830
@@ -97,10 +97,9 @@
 
15831
       retarray->offset = 0;
 
15832
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15833
 
 
15834
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15835
-                  * extent[rank-1];
 
15836
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15837
 
 
15838
-      retarray->base_addr = xmalloc (alloc_size);
 
15839
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15840
       if (alloc_size == 0)
 
15841
        {
 
15842
          /* Make sure we have a zero-sized array.  */
 
15843
@@ -286,8 +285,7 @@
 
15844
 
 
15845
        }
 
15846
 
 
15847
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15848
-                  * extent[rank-1];
 
15849
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15850
 
 
15851
       retarray->offset = 0;
 
15852
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15853
@@ -299,7 +297,7 @@
 
15854
          return;
 
15855
        }
 
15856
       else
 
15857
-       retarray->base_addr = xmalloc (alloc_size);
 
15858
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15859
 
 
15860
     }
 
15861
   else
 
15862
@@ -472,8 +470,7 @@
 
15863
       retarray->offset = 0;
 
15864
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15865
 
 
15866
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15867
-                  * extent[rank-1];
 
15868
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15869
 
 
15870
       if (alloc_size == 0)
 
15871
        {
 
15872
@@ -482,7 +479,7 @@
 
15873
          return;
 
15874
        }
 
15875
       else
 
15876
-       retarray->base_addr = xmalloc (alloc_size);
 
15877
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15878
     }
 
15879
   else
 
15880
     {
 
15881
Index: libgfortran/generated/product_c10.c
 
15882
===================================================================
 
15883
--- a/src/libgfortran/generated/product_c10.c   (.../tags/gcc_4_8_3_release)
 
15884
+++ b/src/libgfortran/generated/product_c10.c   (.../branches/gcc-4_8-branch)
 
15885
@@ -97,10 +97,9 @@
 
15886
       retarray->offset = 0;
 
15887
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15888
 
 
15889
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15890
-                  * extent[rank-1];
 
15891
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15892
 
 
15893
-      retarray->base_addr = xmalloc (alloc_size);
 
15894
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15895
       if (alloc_size == 0)
 
15896
        {
 
15897
          /* Make sure we have a zero-sized array.  */
 
15898
@@ -272,8 +271,7 @@
 
15899
 
 
15900
        }
 
15901
 
 
15902
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15903
-                  * extent[rank-1];
 
15904
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15905
 
 
15906
       retarray->offset = 0;
 
15907
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15908
@@ -285,7 +283,7 @@
 
15909
          return;
 
15910
        }
 
15911
       else
 
15912
-       retarray->base_addr = xmalloc (alloc_size);
 
15913
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15914
 
 
15915
     }
 
15916
   else
 
15917
@@ -430,8 +428,7 @@
 
15918
       retarray->offset = 0;
 
15919
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15920
 
 
15921
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15922
-                  * extent[rank-1];
 
15923
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15924
 
 
15925
       if (alloc_size == 0)
 
15926
        {
 
15927
@@ -440,7 +437,7 @@
 
15928
          return;
 
15929
        }
 
15930
       else
 
15931
-       retarray->base_addr = xmalloc (alloc_size);
 
15932
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15933
     }
 
15934
   else
 
15935
     {
 
15936
Index: libgfortran/generated/minloc1_8_i4.c
 
15937
===================================================================
 
15938
--- a/src/libgfortran/generated/minloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
15939
+++ b/src/libgfortran/generated/minloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
15940
@@ -98,10 +98,9 @@
 
15941
       retarray->offset = 0;
 
15942
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15943
 
 
15944
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15945
-                  * extent[rank-1];
 
15946
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15947
 
 
15948
-      retarray->base_addr = xmalloc (alloc_size);
 
15949
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15950
       if (alloc_size == 0)
 
15951
        {
 
15952
          /* Make sure we have a zero-sized array.  */
 
15953
@@ -294,8 +293,7 @@
 
15954
 
 
15955
        }
 
15956
 
 
15957
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15958
-                  * extent[rank-1];
 
15959
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15960
 
 
15961
       retarray->offset = 0;
 
15962
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15963
@@ -307,7 +305,7 @@
 
15964
          return;
 
15965
        }
 
15966
       else
 
15967
-       retarray->base_addr = xmalloc (alloc_size);
 
15968
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15969
 
 
15970
     }
 
15971
   else
 
15972
@@ -485,8 +483,7 @@
 
15973
       retarray->offset = 0;
 
15974
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15975
 
 
15976
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15977
-                  * extent[rank-1];
 
15978
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15979
 
 
15980
       if (alloc_size == 0)
 
15981
        {
 
15982
@@ -495,7 +492,7 @@
 
15983
          return;
 
15984
        }
 
15985
       else
 
15986
-       retarray->base_addr = xmalloc (alloc_size);
 
15987
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15988
     }
 
15989
   else
 
15990
     {
 
15991
Index: libgfortran/generated/minloc0_16_i16.c
 
15992
===================================================================
 
15993
--- a/src/libgfortran/generated/minloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
15994
+++ b/src/libgfortran/generated/minloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
15995
@@ -58,7 +58,7 @@
 
15996
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15997
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15998
       retarray->offset = 0;
 
15999
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16000
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16001
     }
 
16002
   else
 
16003
     {
 
16004
@@ -199,7 +199,7 @@
 
16005
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16006
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16007
       retarray->offset = 0;
 
16008
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16009
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16010
     }
 
16011
   else
 
16012
     {
 
16013
@@ -367,7 +367,7 @@
 
16014
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16015
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16016
       retarray->offset = 0;
 
16017
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16018
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16019
     }
 
16020
   else if (unlikely (compile_options.bounds_check))
 
16021
     {
 
16022
Index: libgfortran/generated/matmul_r16.c
 
16023
===================================================================
 
16024
--- a/src/libgfortran/generated/matmul_r16.c    (.../tags/gcc_4_8_3_release)
 
16025
+++ b/src/libgfortran/generated/matmul_r16.c    (.../branches/gcc-4_8-branch)
 
16026
@@ -124,7 +124,7 @@
 
16027
         }
 
16028
 
 
16029
       retarray->base_addr
 
16030
-       = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
 
16031
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
 
16032
       retarray->offset = 0;
 
16033
     }
 
16034
     else if (unlikely (compile_options.bounds_check))
 
16035
Index: libgfortran/generated/minloc0_4_r4.c
 
16036
===================================================================
 
16037
--- a/src/libgfortran/generated/minloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
16038
+++ b/src/libgfortran/generated/minloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
16039
@@ -58,7 +58,7 @@
 
16040
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16041
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16042
       retarray->offset = 0;
 
16043
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16044
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16045
     }
 
16046
   else
 
16047
     {
 
16048
@@ -199,7 +199,7 @@
 
16049
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16050
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16051
       retarray->offset = 0;
 
16052
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16053
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16054
     }
 
16055
   else
 
16056
     {
 
16057
@@ -367,7 +367,7 @@
 
16058
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16059
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16060
       retarray->offset = 0;
 
16061
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16062
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16063
     }
 
16064
   else if (unlikely (compile_options.bounds_check))
 
16065
     {
 
16066
Index: libgfortran/generated/iany_i2.c
 
16067
===================================================================
 
16068
--- a/src/libgfortran/generated/iany_i2.c       (.../tags/gcc_4_8_3_release)
 
16069
+++ b/src/libgfortran/generated/iany_i2.c       (.../branches/gcc-4_8-branch)
 
16070
@@ -97,10 +97,9 @@
 
16071
       retarray->offset = 0;
 
16072
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16073
 
 
16074
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16075
-                  * extent[rank-1];
 
16076
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16077
 
 
16078
-      retarray->base_addr = xmalloc (alloc_size);
 
16079
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16080
       if (alloc_size == 0)
 
16081
        {
 
16082
          /* Make sure we have a zero-sized array.  */
 
16083
@@ -272,8 +271,7 @@
 
16084
 
 
16085
        }
 
16086
 
 
16087
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16088
-                  * extent[rank-1];
 
16089
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16090
 
 
16091
       retarray->offset = 0;
 
16092
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16093
@@ -285,7 +283,7 @@
 
16094
          return;
 
16095
        }
 
16096
       else
 
16097
-       retarray->base_addr = xmalloc (alloc_size);
 
16098
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16099
 
 
16100
     }
 
16101
   else
 
16102
@@ -430,8 +428,7 @@
 
16103
       retarray->offset = 0;
 
16104
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16105
 
 
16106
-      alloc_size = sizeof (GFC_INTEGER_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
@@ -440,7 +437,7 @@
 
16113
          return;
 
16114
        }
 
16115
       else
 
16116
-       retarray->base_addr = xmalloc (alloc_size);
 
16117
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16118
     }
 
16119
   else
 
16120
     {
 
16121
Index: libgfortran/generated/sum_r4.c
 
16122
===================================================================
 
16123
--- a/src/libgfortran/generated/sum_r4.c        (.../tags/gcc_4_8_3_release)
 
16124
+++ b/src/libgfortran/generated/sum_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/unpack_c8.c
 
16177
===================================================================
 
16178
--- a/src/libgfortran/generated/unpack_c8.c     (.../tags/gcc_4_8_3_release)
 
16179
+++ b/src/libgfortran/generated/unpack_c8.c     (.../branches/gcc-4_8-branch)
 
16180
@@ -99,7 +99,7 @@
 
16181
          rs *= extent[n];
 
16182
        }
 
16183
       ret->offset = 0;
 
16184
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
16185
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
16186
     }
 
16187
   else
 
16188
     {
 
16189
@@ -244,7 +244,7 @@
 
16190
          rs *= extent[n];
 
16191
        }
 
16192
       ret->offset = 0;
 
16193
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
16194
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
16195
     }
 
16196
   else
 
16197
     {
 
16198
Index: libgfortran/generated/in_pack_c16.c
 
16199
===================================================================
 
16200
--- a/src/libgfortran/generated/in_pack_c16.c   (.../tags/gcc_4_8_3_release)
 
16201
+++ b/src/libgfortran/generated/in_pack_c16.c   (.../branches/gcc-4_8-branch)
 
16202
@@ -76,7 +76,7 @@
 
16203
     return source->base_addr;
 
16204
 
 
16205
   /* Allocate storage for the destination.  */
 
16206
-  destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
 
16207
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
 
16208
   dest = destptr;
 
16209
   src = source->base_addr;
 
16210
   stride0 = stride[0];
 
16211
Index: libgfortran/generated/minloc0_4_i2.c
 
16212
===================================================================
 
16213
--- a/src/libgfortran/generated/minloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
16214
+++ b/src/libgfortran/generated/minloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
16215
@@ -58,7 +58,7 @@
 
16216
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16217
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16218
       retarray->offset = 0;
 
16219
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16220
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16221
     }
 
16222
   else
 
16223
     {
 
16224
@@ -199,7 +199,7 @@
 
16225
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16226
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16227
       retarray->offset = 0;
 
16228
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16229
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16230
     }
 
16231
   else
 
16232
     {
 
16233
@@ -367,7 +367,7 @@
 
16234
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16235
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16236
       retarray->offset = 0;
 
16237
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16238
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16239
     }
 
16240
   else if (unlikely (compile_options.bounds_check))
 
16241
     {
 
16242
Index: libgfortran/generated/spread_c10.c
 
16243
===================================================================
 
16244
--- a/src/libgfortran/generated/spread_c10.c    (.../tags/gcc_4_8_3_release)
 
16245
+++ b/src/libgfortran/generated/spread_c10.c    (.../branches/gcc-4_8-branch)
 
16246
@@ -101,8 +101,8 @@
 
16247
        }
 
16248
       ret->offset = 0;
 
16249
 
 
16250
-      /* xmalloc allocates a single byte for zero size.  */
 
16251
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
 
16252
+      /* xmallocarray allocates a single byte for zero size.  */
 
16253
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
 
16254
       if (rs <= 0)
 
16255
         return;
 
16256
     }
 
16257
@@ -244,7 +244,7 @@
 
16258
 
 
16259
   if (ret->base_addr == NULL)
 
16260
     {
 
16261
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
 
16262
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
 
16263
       ret->offset = 0;
 
16264
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16265
     }
 
16266
Index: libgfortran/generated/maxloc0_8_i1.c
 
16267
===================================================================
 
16268
--- a/src/libgfortran/generated/maxloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
16269
+++ b/src/libgfortran/generated/maxloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
16270
@@ -58,7 +58,7 @@
 
16271
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16272
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16273
       retarray->offset = 0;
 
16274
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16275
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16276
     }
 
16277
   else
 
16278
     {
 
16279
@@ -199,7 +199,7 @@
 
16280
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16281
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16282
       retarray->offset = 0;
 
16283
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16284
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16285
     }
 
16286
   else
 
16287
     {
 
16288
@@ -367,7 +367,7 @@
 
16289
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16290
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16291
       retarray->offset = 0;
 
16292
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16293
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16294
     }
 
16295
   else if (unlikely (compile_options.bounds_check))
 
16296
     {
 
16297
Index: libgfortran/generated/spread_r4.c
 
16298
===================================================================
 
16299
--- a/src/libgfortran/generated/spread_r4.c     (.../tags/gcc_4_8_3_release)
 
16300
+++ b/src/libgfortran/generated/spread_r4.c     (.../branches/gcc-4_8-branch)
 
16301
@@ -101,8 +101,8 @@
 
16302
        }
 
16303
       ret->offset = 0;
 
16304
 
 
16305
-      /* xmalloc allocates a single byte for zero size.  */
 
16306
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
 
16307
+      /* xmallocarray allocates a single byte for zero size.  */
 
16308
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
 
16309
       if (rs <= 0)
 
16310
         return;
 
16311
     }
 
16312
@@ -244,7 +244,7 @@
 
16313
 
 
16314
   if (ret->base_addr == NULL)
 
16315
     {
 
16316
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
 
16317
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
 
16318
       ret->offset = 0;
 
16319
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16320
     }
 
16321
Index: libgfortran/generated/minloc0_8_i8.c
 
16322
===================================================================
 
16323
--- a/src/libgfortran/generated/minloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
16324
+++ b/src/libgfortran/generated/minloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
16325
@@ -58,7 +58,7 @@
 
16326
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16327
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16328
       retarray->offset = 0;
 
16329
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16330
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16331
     }
 
16332
   else
 
16333
     {
 
16334
@@ -199,7 +199,7 @@
 
16335
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16336
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16337
       retarray->offset = 0;
 
16338
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16339
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16340
     }
 
16341
   else
 
16342
     {
 
16343
@@ -367,7 +367,7 @@
 
16344
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16345
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16346
       retarray->offset = 0;
 
16347
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16348
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16349
     }
 
16350
   else if (unlikely (compile_options.bounds_check))
 
16351
     {
 
16352
Index: libgfortran/generated/matmul_c8.c
 
16353
===================================================================
 
16354
--- a/src/libgfortran/generated/matmul_c8.c     (.../tags/gcc_4_8_3_release)
 
16355
+++ b/src/libgfortran/generated/matmul_c8.c     (.../branches/gcc-4_8-branch)
 
16356
@@ -124,7 +124,7 @@
 
16357
         }
 
16358
 
 
16359
       retarray->base_addr
 
16360
-       = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
 
16361
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
 
16362
       retarray->offset = 0;
 
16363
     }
 
16364
     else if (unlikely (compile_options.bounds_check))
 
16365
Index: libgfortran/generated/minloc1_16_r10.c
 
16366
===================================================================
 
16367
--- a/src/libgfortran/generated/minloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
16368
+++ b/src/libgfortran/generated/minloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
16369
@@ -98,10 +98,9 @@
 
16370
       retarray->offset = 0;
 
16371
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16372
 
 
16373
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16374
-                  * extent[rank-1];
 
16375
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16376
 
 
16377
-      retarray->base_addr = xmalloc (alloc_size);
 
16378
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16379
       if (alloc_size == 0)
 
16380
        {
 
16381
          /* Make sure we have a zero-sized array.  */
 
16382
@@ -294,8 +293,7 @@
 
16383
 
 
16384
        }
 
16385
 
 
16386
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16387
-                  * extent[rank-1];
 
16388
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16389
 
 
16390
       retarray->offset = 0;
 
16391
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16392
@@ -307,7 +305,7 @@
 
16393
          return;
 
16394
        }
 
16395
       else
 
16396
-       retarray->base_addr = xmalloc (alloc_size);
 
16397
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16398
 
 
16399
     }
 
16400
   else
 
16401
@@ -485,8 +483,7 @@
 
16402
       retarray->offset = 0;
 
16403
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16404
 
 
16405
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16406
-                  * extent[rank-1];
 
16407
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16408
 
 
16409
       if (alloc_size == 0)
 
16410
        {
 
16411
@@ -495,7 +492,7 @@
 
16412
          return;
 
16413
        }
 
16414
       else
 
16415
-       retarray->base_addr = xmalloc (alloc_size);
 
16416
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16417
     }
 
16418
   else
 
16419
     {
 
16420
Index: libgfortran/generated/sum_i2.c
 
16421
===================================================================
 
16422
--- a/src/libgfortran/generated/sum_i2.c        (.../tags/gcc_4_8_3_release)
 
16423
+++ b/src/libgfortran/generated/sum_i2.c        (.../branches/gcc-4_8-branch)
 
16424
@@ -97,10 +97,9 @@
 
16425
       retarray->offset = 0;
 
16426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16427
 
 
16428
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16429
-                  * extent[rank-1];
 
16430
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16431
 
 
16432
-      retarray->base_addr = xmalloc (alloc_size);
 
16433
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16434
       if (alloc_size == 0)
 
16435
        {
 
16436
          /* Make sure we have a zero-sized array.  */
 
16437
@@ -272,8 +271,7 @@
 
16438
 
 
16439
        }
 
16440
 
 
16441
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16442
-                  * extent[rank-1];
 
16443
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16444
 
 
16445
       retarray->offset = 0;
 
16446
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16447
@@ -285,7 +283,7 @@
 
16448
          return;
 
16449
        }
 
16450
       else
 
16451
-       retarray->base_addr = xmalloc (alloc_size);
 
16452
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16453
 
 
16454
     }
 
16455
   else
 
16456
@@ -430,8 +428,7 @@
 
16457
       retarray->offset = 0;
 
16458
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16459
 
 
16460
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16461
-                  * extent[rank-1];
 
16462
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16463
 
 
16464
       if (alloc_size == 0)
 
16465
        {
 
16466
@@ -440,7 +437,7 @@
 
16467
          return;
 
16468
        }
 
16469
       else
 
16470
-       retarray->base_addr = xmalloc (alloc_size);
 
16471
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16472
     }
 
16473
   else
 
16474
     {
 
16475
Index: libgfortran/generated/iparity_i16.c
 
16476
===================================================================
 
16477
--- a/src/libgfortran/generated/iparity_i16.c   (.../tags/gcc_4_8_3_release)
 
16478
+++ b/src/libgfortran/generated/iparity_i16.c   (.../branches/gcc-4_8-branch)
 
16479
@@ -97,10 +97,9 @@
 
16480
       retarray->offset = 0;
 
16481
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16482
 
 
16483
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16484
-                  * extent[rank-1];
 
16485
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16486
 
 
16487
-      retarray->base_addr = xmalloc (alloc_size);
 
16488
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16489
       if (alloc_size == 0)
 
16490
        {
 
16491
          /* Make sure we have a zero-sized array.  */
 
16492
@@ -272,8 +271,7 @@
 
16493
 
 
16494
        }
 
16495
 
 
16496
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16497
-                  * extent[rank-1];
 
16498
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16499
 
 
16500
       retarray->offset = 0;
 
16501
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16502
@@ -285,7 +283,7 @@
 
16503
          return;
 
16504
        }
 
16505
       else
 
16506
-       retarray->base_addr = xmalloc (alloc_size);
 
16507
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16508
 
 
16509
     }
 
16510
   else
 
16511
@@ -430,8 +428,7 @@
 
16512
       retarray->offset = 0;
 
16513
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16514
 
 
16515
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16516
-                  * extent[rank-1];
 
16517
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16518
 
 
16519
       if (alloc_size == 0)
 
16520
        {
 
16521
@@ -440,7 +437,7 @@
 
16522
          return;
 
16523
        }
 
16524
       else
 
16525
-       retarray->base_addr = xmalloc (alloc_size);
 
16526
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16527
     }
 
16528
   else
 
16529
     {
 
16530
Index: libgfortran/generated/minloc0_16_i1.c
 
16531
===================================================================
 
16532
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
16533
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
16534
@@ -58,7 +58,7 @@
 
16535
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16536
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16537
       retarray->offset = 0;
 
16538
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16539
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16540
     }
 
16541
   else
 
16542
     {
 
16543
@@ -199,7 +199,7 @@
 
16544
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16545
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16546
       retarray->offset = 0;
 
16547
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16548
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16549
     }
 
16550
   else
 
16551
     {
 
16552
@@ -367,7 +367,7 @@
 
16553
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16554
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16555
       retarray->offset = 0;
 
16556
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16557
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16558
     }
 
16559
   else if (unlikely (compile_options.bounds_check))
 
16560
     {
 
16561
Index: libgfortran/generated/reshape_c16.c
 
16562
===================================================================
 
16563
--- a/src/libgfortran/generated/reshape_c16.c   (.../tags/gcc_4_8_3_release)
 
16564
+++ b/src/libgfortran/generated/reshape_c16.c   (.../branches/gcc-4_8-branch)
 
16565
@@ -111,11 +111,11 @@
 
16566
       ret->offset = 0;
 
16567
 
 
16568
       if (unlikely (rs < 1))
 
16569
-        alloc_size = 1;
 
16570
+        alloc_size = 0;
 
16571
       else
 
16572
-        alloc_size = rs * sizeof (GFC_COMPLEX_16);
 
16573
+        alloc_size = rs;
 
16574
 
 
16575
-      ret->base_addr = xmalloc (alloc_size);
 
16576
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
16577
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
16578
     }
 
16579
 
 
16580
Index: libgfortran/generated/pack_c4.c
 
16581
===================================================================
 
16582
--- a/src/libgfortran/generated/pack_c4.c       (.../tags/gcc_4_8_3_release)
 
16583
+++ b/src/libgfortran/generated/pack_c4.c       (.../branches/gcc-4_8-branch)
 
16584
@@ -167,8 +167,8 @@
 
16585
 
 
16586
          ret->offset = 0;
 
16587
 
 
16588
-         /* xmalloc allocates a single byte for zero size.  */
 
16589
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
 
16590
+         /* xmallocarray allocates a single byte for zero size.  */
 
16591
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
 
16592
 
 
16593
          if (total == 0)
 
16594
            return;
 
16595
Index: libgfortran/generated/parity_l4.c
 
16596
===================================================================
 
16597
--- a/src/libgfortran/generated/parity_l4.c     (.../tags/gcc_4_8_3_release)
 
16598
+++ b/src/libgfortran/generated/parity_l4.c     (.../branches/gcc-4_8-branch)
 
16599
@@ -98,10 +98,9 @@
 
16600
       retarray->offset = 0;
 
16601
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16602
 
 
16603
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16604
-                  * extent[rank-1];
 
16605
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16606
 
 
16607
-      retarray->base_addr = xmalloc (alloc_size);
 
16608
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
16609
       if (alloc_size == 0)
 
16610
        {
 
16611
          /* Make sure we have a zero-sized array.  */
 
16612
Index: libgfortran/generated/spread_i2.c
 
16613
===================================================================
 
16614
--- a/src/libgfortran/generated/spread_i2.c     (.../tags/gcc_4_8_3_release)
 
16615
+++ b/src/libgfortran/generated/spread_i2.c     (.../branches/gcc-4_8-branch)
 
16616
@@ -101,8 +101,8 @@
 
16617
        }
 
16618
       ret->offset = 0;
 
16619
 
 
16620
-      /* xmalloc allocates a single byte for zero size.  */
 
16621
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
 
16622
+      /* xmallocarray allocates a single byte for zero size.  */
 
16623
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
 
16624
       if (rs <= 0)
 
16625
         return;
 
16626
     }
 
16627
@@ -244,7 +244,7 @@
 
16628
 
 
16629
   if (ret->base_addr == NULL)
 
16630
     {
 
16631
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
 
16632
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
 
16633
       ret->offset = 0;
 
16634
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16635
     }
 
16636
Index: libgfortran/generated/any_l4.c
 
16637
===================================================================
 
16638
--- a/src/libgfortran/generated/any_l4.c        (.../tags/gcc_4_8_3_release)
 
16639
+++ b/src/libgfortran/generated/any_l4.c        (.../branches/gcc-4_8-branch)
 
16640
@@ -101,8 +101,7 @@
 
16641
       retarray->offset = 0;
 
16642
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16643
 
 
16644
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16645
-                  * extent[rank-1];
 
16646
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16647
 
 
16648
       if (alloc_size == 0)
 
16649
        {
 
16650
@@ -111,7 +110,7 @@
 
16651
          return;
 
16652
        }
 
16653
       else
 
16654
-       retarray->base_addr = xmalloc (alloc_size);
 
16655
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
16656
     }
 
16657
   else
 
16658
     {
 
16659
Index: libgfortran/generated/maxloc1_4_i8.c
 
16660
===================================================================
 
16661
--- a/src/libgfortran/generated/maxloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
16662
+++ b/src/libgfortran/generated/maxloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
16663
@@ -98,10 +98,9 @@
 
16664
       retarray->offset = 0;
 
16665
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16666
 
 
16667
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16668
-                  * extent[rank-1];
 
16669
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16670
 
 
16671
-      retarray->base_addr = xmalloc (alloc_size);
 
16672
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16673
       if (alloc_size == 0)
 
16674
        {
 
16675
          /* Make sure we have a zero-sized array.  */
 
16676
@@ -294,8 +293,7 @@
 
16677
 
 
16678
        }
 
16679
 
 
16680
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16681
-                  * extent[rank-1];
 
16682
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16683
 
 
16684
       retarray->offset = 0;
 
16685
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16686
@@ -307,7 +305,7 @@
 
16687
          return;
 
16688
        }
 
16689
       else
 
16690
-       retarray->base_addr = xmalloc (alloc_size);
 
16691
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16692
 
 
16693
     }
 
16694
   else
 
16695
@@ -485,8 +483,7 @@
 
16696
       retarray->offset = 0;
 
16697
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16698
 
 
16699
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16700
-                  * extent[rank-1];
 
16701
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16702
 
 
16703
       if (alloc_size == 0)
 
16704
        {
 
16705
@@ -495,7 +492,7 @@
 
16706
          return;
 
16707
        }
 
16708
       else
 
16709
-       retarray->base_addr = xmalloc (alloc_size);
 
16710
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16711
     }
 
16712
   else
 
16713
     {
 
16714
Index: libgfortran/generated/maxloc0_8_r4.c
 
16715
===================================================================
 
16716
--- a/src/libgfortran/generated/maxloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
16717
+++ b/src/libgfortran/generated/maxloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
16718
@@ -58,7 +58,7 @@
 
16719
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16720
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16721
       retarray->offset = 0;
 
16722
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16723
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16724
     }
 
16725
   else
 
16726
     {
 
16727
@@ -199,7 +199,7 @@
 
16728
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16729
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16730
       retarray->offset = 0;
 
16731
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16732
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16733
     }
 
16734
   else
 
16735
     {
 
16736
@@ -367,7 +367,7 @@
 
16737
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16738
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16739
       retarray->offset = 0;
 
16740
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16741
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16742
     }
 
16743
   else if (unlikely (compile_options.bounds_check))
 
16744
     {
 
16745
Index: libgfortran/generated/maxloc1_4_i16.c
 
16746
===================================================================
 
16747
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
16748
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
16749
@@ -98,10 +98,9 @@
 
16750
       retarray->offset = 0;
 
16751
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16752
 
 
16753
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16754
-                  * extent[rank-1];
 
16755
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16756
 
 
16757
-      retarray->base_addr = xmalloc (alloc_size);
 
16758
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16759
       if (alloc_size == 0)
 
16760
        {
 
16761
          /* Make sure we have a zero-sized array.  */
 
16762
@@ -294,8 +293,7 @@
 
16763
 
 
16764
        }
 
16765
 
 
16766
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16767
-                  * extent[rank-1];
 
16768
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16769
 
 
16770
       retarray->offset = 0;
 
16771
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16772
@@ -307,7 +305,7 @@
 
16773
          return;
 
16774
        }
 
16775
       else
 
16776
-       retarray->base_addr = xmalloc (alloc_size);
 
16777
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16778
 
 
16779
     }
 
16780
   else
 
16781
@@ -485,8 +483,7 @@
 
16782
       retarray->offset = 0;
 
16783
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16784
 
 
16785
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16786
-                  * extent[rank-1];
 
16787
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16788
 
 
16789
       if (alloc_size == 0)
 
16790
        {
 
16791
@@ -495,7 +492,7 @@
 
16792
          return;
 
16793
        }
 
16794
       else
 
16795
-       retarray->base_addr = xmalloc (alloc_size);
 
16796
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16797
     }
 
16798
   else
 
16799
     {
 
16800
Index: libgfortran/generated/minloc0_4_r10.c
 
16801
===================================================================
 
16802
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
16803
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
16804
@@ -58,7 +58,7 @@
 
16805
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16806
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16807
       retarray->offset = 0;
 
16808
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16809
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16810
     }
 
16811
   else
 
16812
     {
 
16813
@@ -199,7 +199,7 @@
 
16814
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16815
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16816
       retarray->offset = 0;
 
16817
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16818
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16819
     }
 
16820
   else
 
16821
     {
 
16822
@@ -367,7 +367,7 @@
 
16823
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16824
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16825
       retarray->offset = 0;
 
16826
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16827
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16828
     }
 
16829
   else if (unlikely (compile_options.bounds_check))
 
16830
     {
 
16831
Index: libgfortran/generated/minloc0_8_i16.c
 
16832
===================================================================
 
16833
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
16834
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
16835
@@ -58,7 +58,7 @@
 
16836
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16837
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16838
       retarray->offset = 0;
 
16839
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16840
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16841
     }
 
16842
   else
 
16843
     {
 
16844
@@ -199,7 +199,7 @@
 
16845
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16846
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16847
       retarray->offset = 0;
 
16848
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16849
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16850
     }
 
16851
   else
 
16852
     {
 
16853
@@ -367,7 +367,7 @@
 
16854
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16855
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16856
       retarray->offset = 0;
 
16857
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16858
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16859
     }
 
16860
   else if (unlikely (compile_options.bounds_check))
 
16861
     {
 
16862
Index: libgfortran/generated/minloc1_8_r10.c
 
16863
===================================================================
 
16864
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
16865
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
16866
@@ -98,10 +98,9 @@
 
16867
       retarray->offset = 0;
 
16868
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16869
 
 
16870
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16871
-                  * extent[rank-1];
 
16872
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16873
 
 
16874
-      retarray->base_addr = xmalloc (alloc_size);
 
16875
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16876
       if (alloc_size == 0)
 
16877
        {
 
16878
          /* Make sure we have a zero-sized array.  */
 
16879
@@ -294,8 +293,7 @@
 
16880
 
 
16881
        }
 
16882
 
 
16883
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16884
-                  * extent[rank-1];
 
16885
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16886
 
 
16887
       retarray->offset = 0;
 
16888
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16889
@@ -307,7 +305,7 @@
 
16890
          return;
 
16891
        }
 
16892
       else
 
16893
-       retarray->base_addr = xmalloc (alloc_size);
 
16894
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16895
 
 
16896
     }
 
16897
   else
 
16898
@@ -485,8 +483,7 @@
 
16899
       retarray->offset = 0;
 
16900
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16901
 
 
16902
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16903
-                  * extent[rank-1];
 
16904
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16905
 
 
16906
       if (alloc_size == 0)
 
16907
        {
 
16908
@@ -495,7 +492,7 @@
 
16909
          return;
 
16910
        }
 
16911
       else
 
16912
-       retarray->base_addr = xmalloc (alloc_size);
 
16913
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16914
     }
 
16915
   else
 
16916
     {
 
16917
Index: libgfortran/generated/minloc0_16_r4.c
 
16918
===================================================================
 
16919
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
16920
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
16921
@@ -58,7 +58,7 @@
 
16922
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16923
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16924
       retarray->offset = 0;
 
16925
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16926
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16927
     }
 
16928
   else
 
16929
     {
 
16930
@@ -199,7 +199,7 @@
 
16931
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16932
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16933
       retarray->offset = 0;
 
16934
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16935
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16936
     }
 
16937
   else
 
16938
     {
 
16939
@@ -367,7 +367,7 @@
 
16940
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16941
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16942
       retarray->offset = 0;
 
16943
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16944
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16945
     }
 
16946
   else if (unlikely (compile_options.bounds_check))
 
16947
     {
 
16948
Index: libgfortran/generated/product_i4.c
 
16949
===================================================================
 
16950
--- a/src/libgfortran/generated/product_i4.c    (.../tags/gcc_4_8_3_release)
 
16951
+++ b/src/libgfortran/generated/product_i4.c    (.../branches/gcc-4_8-branch)
 
16952
@@ -97,10 +97,9 @@
 
16953
       retarray->offset = 0;
 
16954
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16955
 
 
16956
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16957
-                  * extent[rank-1];
 
16958
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16959
 
 
16960
-      retarray->base_addr = xmalloc (alloc_size);
 
16961
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16962
       if (alloc_size == 0)
 
16963
        {
 
16964
          /* Make sure we have a zero-sized array.  */
 
16965
@@ -272,8 +271,7 @@
 
16966
 
 
16967
        }
 
16968
 
 
16969
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16970
-                  * extent[rank-1];
 
16971
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16972
 
 
16973
       retarray->offset = 0;
 
16974
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16975
@@ -285,7 +283,7 @@
 
16976
          return;
 
16977
        }
 
16978
       else
 
16979
-       retarray->base_addr = xmalloc (alloc_size);
 
16980
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16981
 
 
16982
     }
 
16983
   else
 
16984
@@ -430,8 +428,7 @@
 
16985
       retarray->offset = 0;
 
16986
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16987
 
 
16988
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16989
-                  * extent[rank-1];
 
16990
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16991
 
 
16992
       if (alloc_size == 0)
 
16993
        {
 
16994
@@ -440,7 +437,7 @@
 
16995
          return;
 
16996
        }
 
16997
       else
 
16998
-       retarray->base_addr = xmalloc (alloc_size);
 
16999
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17000
     }
 
17001
   else
 
17002
     {
 
17003
Index: libgfortran/generated/sum_c16.c
 
17004
===================================================================
 
17005
--- a/src/libgfortran/generated/sum_c16.c       (.../tags/gcc_4_8_3_release)
 
17006
+++ b/src/libgfortran/generated/sum_c16.c       (.../branches/gcc-4_8-branch)
 
17007
@@ -97,10 +97,9 @@
 
17008
       retarray->offset = 0;
 
17009
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17010
 
 
17011
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17012
-                  * extent[rank-1];
 
17013
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17014
 
 
17015
-      retarray->base_addr = xmalloc (alloc_size);
 
17016
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17017
       if (alloc_size == 0)
 
17018
        {
 
17019
          /* Make sure we have a zero-sized array.  */
 
17020
@@ -272,8 +271,7 @@
 
17021
 
 
17022
        }
 
17023
 
 
17024
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17025
-                  * extent[rank-1];
 
17026
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17027
 
 
17028
       retarray->offset = 0;
 
17029
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17030
@@ -285,7 +283,7 @@
 
17031
          return;
 
17032
        }
 
17033
       else
 
17034
-       retarray->base_addr = xmalloc (alloc_size);
 
17035
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17036
 
 
17037
     }
 
17038
   else
 
17039
@@ -430,8 +428,7 @@
 
17040
       retarray->offset = 0;
 
17041
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17042
 
 
17043
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17044
-                  * extent[rank-1];
 
17045
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17046
 
 
17047
       if (alloc_size == 0)
 
17048
        {
 
17049
@@ -440,7 +437,7 @@
 
17050
          return;
 
17051
        }
 
17052
       else
 
17053
-       retarray->base_addr = xmalloc (alloc_size);
 
17054
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17055
     }
 
17056
   else
 
17057
     {
 
17058
Index: libgfortran/generated/transpose_c10.c
 
17059
===================================================================
 
17060
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
 
17061
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
 
17062
@@ -60,7 +60,8 @@
 
17063
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
17064
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
17065
 
 
17066
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
 
17067
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
17068
+                                     sizeof (GFC_COMPLEX_10));
 
17069
       ret->offset = 0;
 
17070
     } else if (unlikely (compile_options.bounds_check))
 
17071
     {
 
17072
Index: libgfortran/generated/maxloc1_16_r8.c
 
17073
===================================================================
 
17074
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
17075
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
17076
@@ -98,10 +98,9 @@
 
17077
       retarray->offset = 0;
 
17078
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17079
 
 
17080
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17081
-                  * extent[rank-1];
 
17082
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17083
 
 
17084
-      retarray->base_addr = xmalloc (alloc_size);
 
17085
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17086
       if (alloc_size == 0)
 
17087
        {
 
17088
          /* Make sure we have a zero-sized array.  */
 
17089
@@ -294,8 +293,7 @@
 
17090
 
 
17091
        }
 
17092
 
 
17093
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17094
-                  * extent[rank-1];
 
17095
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17096
 
 
17097
       retarray->offset = 0;
 
17098
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17099
@@ -307,7 +305,7 @@
 
17100
          return;
 
17101
        }
 
17102
       else
 
17103
-       retarray->base_addr = xmalloc (alloc_size);
 
17104
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17105
 
 
17106
     }
 
17107
   else
 
17108
@@ -485,8 +483,7 @@
 
17109
       retarray->offset = 0;
 
17110
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17111
 
 
17112
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17113
-                  * extent[rank-1];
 
17114
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17115
 
 
17116
       if (alloc_size == 0)
 
17117
        {
 
17118
@@ -495,7 +492,7 @@
 
17119
          return;
 
17120
        }
 
17121
       else
 
17122
-       retarray->base_addr = xmalloc (alloc_size);
 
17123
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17124
     }
 
17125
   else
 
17126
     {
 
17127
Index: libgfortran/generated/transpose_r4.c
 
17128
===================================================================
 
17129
--- a/src/libgfortran/generated/transpose_r4.c  (.../tags/gcc_4_8_3_release)
 
17130
+++ b/src/libgfortran/generated/transpose_r4.c  (.../branches/gcc-4_8-branch)
 
17131
@@ -60,7 +60,8 @@
 
17132
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
17133
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
17134
 
 
17135
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
 
17136
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
17137
+                                     sizeof (GFC_REAL_4));
 
17138
       ret->offset = 0;
 
17139
     } else if (unlikely (compile_options.bounds_check))
 
17140
     {
 
17141
Index: libgfortran/generated/cshift1_4.c
 
17142
===================================================================
 
17143
--- a/src/libgfortran/generated/cshift1_4.c     (.../tags/gcc_4_8_3_release)
 
17144
+++ b/src/libgfortran/generated/cshift1_4.c     (.../branches/gcc-4_8-branch)
 
17145
@@ -80,7 +80,7 @@
 
17146
     {
 
17147
       int i;
 
17148
 
 
17149
-      ret->base_addr = xmalloc (size * arraysize);
 
17150
+      ret->base_addr = xmallocarray (arraysize, size);
 
17151
       ret->offset = 0;
 
17152
       ret->dtype = array->dtype;
 
17153
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
17154
Index: libgfortran/generated/maxloc0_8_i2.c
 
17155
===================================================================
 
17156
--- a/src/libgfortran/generated/maxloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
17157
+++ b/src/libgfortran/generated/maxloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
17158
@@ -58,7 +58,7 @@
 
17159
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17160
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17161
       retarray->offset = 0;
 
17162
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17163
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17164
     }
 
17165
   else
 
17166
     {
 
17167
@@ -199,7 +199,7 @@
 
17168
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17169
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17170
       retarray->offset = 0;
 
17171
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17172
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17173
     }
 
17174
   else
 
17175
     {
 
17176
@@ -367,7 +367,7 @@
 
17177
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17178
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17179
       retarray->offset = 0;
 
17180
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17181
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17182
     }
 
17183
   else if (unlikely (compile_options.bounds_check))
 
17184
     {
 
17185
Index: libgfortran/generated/count_8_l.c
 
17186
===================================================================
 
17187
--- a/src/libgfortran/generated/count_8_l.c     (.../tags/gcc_4_8_3_release)
 
17188
+++ b/src/libgfortran/generated/count_8_l.c     (.../branches/gcc-4_8-branch)
 
17189
@@ -101,8 +101,7 @@
 
17190
       retarray->offset = 0;
 
17191
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17192
 
 
17193
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17194
-                  * extent[rank-1];
 
17195
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17196
 
 
17197
       if (alloc_size == 0)
 
17198
        {
 
17199
@@ -111,7 +110,7 @@
 
17200
          return;
 
17201
        }
 
17202
       else
 
17203
-       retarray->base_addr = xmalloc (alloc_size);
 
17204
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17205
     }
 
17206
   else
 
17207
     {
 
17208
Index: libgfortran/generated/in_pack_i4.c
 
17209
===================================================================
 
17210
--- a/src/libgfortran/generated/in_pack_i4.c    (.../tags/gcc_4_8_3_release)
 
17211
+++ b/src/libgfortran/generated/in_pack_i4.c    (.../branches/gcc-4_8-branch)
 
17212
@@ -76,7 +76,7 @@
 
17213
     return source->base_addr;
 
17214
 
 
17215
   /* Allocate storage for the destination.  */
 
17216
-  destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
 
17217
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
 
17218
   dest = destptr;
 
17219
   src = source->base_addr;
 
17220
   stride0 = stride[0];
 
17221
Index: libgfortran/generated/minloc0_16_i2.c
 
17222
===================================================================
 
17223
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
17224
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
17225
@@ -58,7 +58,7 @@
 
17226
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17227
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17228
       retarray->offset = 0;
 
17229
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17230
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17231
     }
 
17232
   else
 
17233
     {
 
17234
@@ -199,7 +199,7 @@
 
17235
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17236
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17237
       retarray->offset = 0;
 
17238
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17239
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17240
     }
 
17241
   else
 
17242
     {
 
17243
@@ -367,7 +367,7 @@
 
17244
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17245
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17246
       retarray->offset = 0;
 
17247
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17248
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17249
     }
 
17250
   else if (unlikely (compile_options.bounds_check))
 
17251
     {
 
17252
Index: libgfortran/generated/minloc1_8_r8.c
 
17253
===================================================================
 
17254
--- a/src/libgfortran/generated/minloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
17255
+++ b/src/libgfortran/generated/minloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
17256
@@ -98,10 +98,9 @@
 
17257
       retarray->offset = 0;
 
17258
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17259
 
 
17260
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17261
-                  * extent[rank-1];
 
17262
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17263
 
 
17264
-      retarray->base_addr = xmalloc (alloc_size);
 
17265
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17266
       if (alloc_size == 0)
 
17267
        {
 
17268
          /* Make sure we have a zero-sized array.  */
 
17269
@@ -294,8 +293,7 @@
 
17270
 
 
17271
        }
 
17272
 
 
17273
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17274
-                  * extent[rank-1];
 
17275
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17276
 
 
17277
       retarray->offset = 0;
 
17278
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17279
@@ -307,7 +305,7 @@
 
17280
          return;
 
17281
        }
 
17282
       else
 
17283
-       retarray->base_addr = xmalloc (alloc_size);
 
17284
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17285
 
 
17286
     }
 
17287
   else
 
17288
@@ -485,8 +483,7 @@
 
17289
       retarray->offset = 0;
 
17290
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17291
 
 
17292
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17293
-                  * extent[rank-1];
 
17294
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17295
 
 
17296
       if (alloc_size == 0)
 
17297
        {
 
17298
@@ -495,7 +492,7 @@
 
17299
          return;
 
17300
        }
 
17301
       else
 
17302
-       retarray->base_addr = xmalloc (alloc_size);
 
17303
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17304
     }
 
17305
   else
 
17306
     {
 
17307
Index: libgfortran/generated/matmul_c16.c
 
17308
===================================================================
 
17309
--- a/src/libgfortran/generated/matmul_c16.c    (.../tags/gcc_4_8_3_release)
 
17310
+++ b/src/libgfortran/generated/matmul_c16.c    (.../branches/gcc-4_8-branch)
 
17311
@@ -124,7 +124,7 @@
 
17312
         }
 
17313
 
 
17314
       retarray->base_addr
 
17315
-       = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
 
17316
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
 
17317
       retarray->offset = 0;
 
17318
     }
 
17319
     else if (unlikely (compile_options.bounds_check))
 
17320
Index: libgfortran/generated/minval_i1.c
 
17321
===================================================================
 
17322
--- a/src/libgfortran/generated/minval_i1.c     (.../tags/gcc_4_8_3_release)
 
17323
+++ b/src/libgfortran/generated/minval_i1.c     (.../branches/gcc-4_8-branch)
 
17324
@@ -97,10 +97,9 @@
 
17325
       retarray->offset = 0;
 
17326
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17327
 
 
17328
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17329
-                  * extent[rank-1];
 
17330
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17331
 
 
17332
-      retarray->base_addr = xmalloc (alloc_size);
 
17333
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17334
       if (alloc_size == 0)
 
17335
        {
 
17336
          /* Make sure we have a zero-sized array.  */
 
17337
@@ -286,8 +285,7 @@
 
17338
 
 
17339
        }
 
17340
 
 
17341
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17342
-                  * extent[rank-1];
 
17343
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17344
 
 
17345
       retarray->offset = 0;
 
17346
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17347
@@ -299,7 +297,7 @@
 
17348
          return;
 
17349
        }
 
17350
       else
 
17351
-       retarray->base_addr = xmalloc (alloc_size);
 
17352
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17353
 
 
17354
     }
 
17355
   else
 
17356
@@ -472,8 +470,7 @@
 
17357
       retarray->offset = 0;
 
17358
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17359
 
 
17360
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17361
-                  * extent[rank-1];
 
17362
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17363
 
 
17364
       if (alloc_size == 0)
 
17365
        {
 
17366
@@ -482,7 +479,7 @@
 
17367
          return;
 
17368
        }
 
17369
       else
 
17370
-       retarray->base_addr = xmalloc (alloc_size);
 
17371
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17372
     }
 
17373
   else
 
17374
     {
 
17375
Index: libgfortran/generated/shape_i16.c
 
17376
===================================================================
 
17377
--- a/src/libgfortran/generated/shape_i16.c     (.../tags/gcc_4_8_3_release)
 
17378
+++ b/src/libgfortran/generated/shape_i16.c     (.../branches/gcc-4_8-branch)
 
17379
@@ -49,7 +49,7 @@
 
17380
     {
 
17381
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
17382
       ret->offset = 0;
 
17383
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17384
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17385
     }
 
17386
 
 
17387
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
17388
Index: libgfortran/generated/iany_i4.c
 
17389
===================================================================
 
17390
--- a/src/libgfortran/generated/iany_i4.c       (.../tags/gcc_4_8_3_release)
 
17391
+++ b/src/libgfortran/generated/iany_i4.c       (.../branches/gcc-4_8-branch)
 
17392
@@ -97,10 +97,9 @@
 
17393
       retarray->offset = 0;
 
17394
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17395
 
 
17396
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17397
-                  * extent[rank-1];
 
17398
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17399
 
 
17400
-      retarray->base_addr = xmalloc (alloc_size);
 
17401
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17402
       if (alloc_size == 0)
 
17403
        {
 
17404
          /* Make sure we have a zero-sized array.  */
 
17405
@@ -272,8 +271,7 @@
 
17406
 
 
17407
        }
 
17408
 
 
17409
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17410
-                  * extent[rank-1];
 
17411
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17412
 
 
17413
       retarray->offset = 0;
 
17414
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17415
@@ -285,7 +283,7 @@
 
17416
          return;
 
17417
        }
 
17418
       else
 
17419
-       retarray->base_addr = xmalloc (alloc_size);
 
17420
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17421
 
 
17422
     }
 
17423
   else
 
17424
@@ -430,8 +428,7 @@
 
17425
       retarray->offset = 0;
 
17426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17427
 
 
17428
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17429
-                  * extent[rank-1];
 
17430
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17431
 
 
17432
       if (alloc_size == 0)
 
17433
        {
 
17434
@@ -440,7 +437,7 @@
 
17435
          return;
 
17436
        }
 
17437
       else
 
17438
-       retarray->base_addr = xmalloc (alloc_size);
 
17439
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17440
     }
 
17441
   else
 
17442
     {
 
17443
Index: libgfortran/generated/minloc0_16_r16.c
 
17444
===================================================================
 
17445
--- a/src/libgfortran/generated/minloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
17446
+++ b/src/libgfortran/generated/minloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
17447
@@ -58,7 +58,7 @@
 
17448
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17449
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17450
       retarray->offset = 0;
 
17451
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17452
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17453
     }
 
17454
   else
 
17455
     {
 
17456
@@ -199,7 +199,7 @@
 
17457
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17458
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17459
       retarray->offset = 0;
 
17460
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17461
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17462
     }
 
17463
   else
 
17464
     {
 
17465
@@ -367,7 +367,7 @@
 
17466
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17467
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17468
       retarray->offset = 0;
 
17469
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17470
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17471
     }
 
17472
   else if (unlikely (compile_options.bounds_check))
 
17473
     {
 
17474
Index: libgfortran/generated/product_i16.c
 
17475
===================================================================
 
17476
--- a/src/libgfortran/generated/product_i16.c   (.../tags/gcc_4_8_3_release)
 
17477
+++ b/src/libgfortran/generated/product_i16.c   (.../branches/gcc-4_8-branch)
 
17478
@@ -97,10 +97,9 @@
 
17479
       retarray->offset = 0;
 
17480
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17481
 
 
17482
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17483
-                  * extent[rank-1];
 
17484
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17485
 
 
17486
-      retarray->base_addr = xmalloc (alloc_size);
 
17487
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17488
       if (alloc_size == 0)
 
17489
        {
 
17490
          /* Make sure we have a zero-sized array.  */
 
17491
@@ -272,8 +271,7 @@
 
17492
 
 
17493
        }
 
17494
 
 
17495
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17496
-                  * extent[rank-1];
 
17497
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17498
 
 
17499
       retarray->offset = 0;
 
17500
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17501
@@ -285,7 +283,7 @@
 
17502
          return;
 
17503
        }
 
17504
       else
 
17505
-       retarray->base_addr = xmalloc (alloc_size);
 
17506
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17507
 
 
17508
     }
 
17509
   else
 
17510
@@ -430,8 +428,7 @@
 
17511
       retarray->offset = 0;
 
17512
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17513
 
 
17514
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17515
-                  * extent[rank-1];
 
17516
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17517
 
 
17518
       if (alloc_size == 0)
 
17519
        {
 
17520
@@ -440,7 +437,7 @@
 
17521
          return;
 
17522
        }
 
17523
       else
 
17524
-       retarray->base_addr = xmalloc (alloc_size);
 
17525
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17526
     }
 
17527
   else
 
17528
     {
 
17529
Index: libgfortran/generated/unpack_i1.c
 
17530
===================================================================
 
17531
--- a/src/libgfortran/generated/unpack_i1.c     (.../tags/gcc_4_8_3_release)
 
17532
+++ b/src/libgfortran/generated/unpack_i1.c     (.../branches/gcc-4_8-branch)
 
17533
@@ -99,7 +99,7 @@
 
17534
          rs *= extent[n];
 
17535
        }
 
17536
       ret->offset = 0;
 
17537
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
17538
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
17539
     }
 
17540
   else
 
17541
     {
 
17542
@@ -244,7 +244,7 @@
 
17543
          rs *= extent[n];
 
17544
        }
 
17545
       ret->offset = 0;
 
17546
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
17547
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
17548
     }
 
17549
   else
 
17550
     {
 
17551
Index: libgfortran/generated/minloc0_4_i4.c
 
17552
===================================================================
 
17553
--- a/src/libgfortran/generated/minloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
17554
+++ b/src/libgfortran/generated/minloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
17555
@@ -58,7 +58,7 @@
 
17556
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17557
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17558
       retarray->offset = 0;
 
17559
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17560
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17561
     }
 
17562
   else
 
17563
     {
 
17564
@@ -199,7 +199,7 @@
 
17565
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17566
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17567
       retarray->offset = 0;
 
17568
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17569
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17570
     }
 
17571
   else
 
17572
     {
 
17573
@@ -367,7 +367,7 @@
 
17574
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17575
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17576
       retarray->offset = 0;
 
17577
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17578
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17579
     }
 
17580
   else if (unlikely (compile_options.bounds_check))
 
17581
     {
 
17582
Index: libgfortran/generated/matmul_i1.c
 
17583
===================================================================
 
17584
--- a/src/libgfortran/generated/matmul_i1.c     (.../tags/gcc_4_8_3_release)
 
17585
+++ b/src/libgfortran/generated/matmul_i1.c     (.../branches/gcc-4_8-branch)
 
17586
@@ -124,7 +124,7 @@
 
17587
         }
 
17588
 
 
17589
       retarray->base_addr
 
17590
-       = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
 
17591
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
 
17592
       retarray->offset = 0;
 
17593
     }
 
17594
     else if (unlikely (compile_options.bounds_check))
 
17595
Index: libgfortran/generated/minval_r4.c
 
17596
===================================================================
 
17597
--- a/src/libgfortran/generated/minval_r4.c     (.../tags/gcc_4_8_3_release)
 
17598
+++ b/src/libgfortran/generated/minval_r4.c     (.../branches/gcc-4_8-branch)
 
17599
@@ -97,10 +97,9 @@
 
17600
       retarray->offset = 0;
 
17601
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17602
 
 
17603
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17604
-                  * extent[rank-1];
 
17605
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17606
 
 
17607
-      retarray->base_addr = xmalloc (alloc_size);
 
17608
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17609
       if (alloc_size == 0)
 
17610
        {
 
17611
          /* Make sure we have a zero-sized array.  */
 
17612
@@ -286,8 +285,7 @@
 
17613
 
 
17614
        }
 
17615
 
 
17616
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17617
-                  * extent[rank-1];
 
17618
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17619
 
 
17620
       retarray->offset = 0;
 
17621
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17622
@@ -299,7 +297,7 @@
 
17623
          return;
 
17624
        }
 
17625
       else
 
17626
-       retarray->base_addr = xmalloc (alloc_size);
 
17627
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17628
 
 
17629
     }
 
17630
   else
 
17631
@@ -472,8 +470,7 @@
 
17632
       retarray->offset = 0;
 
17633
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17634
 
 
17635
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17636
-                  * extent[rank-1];
 
17637
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17638
 
 
17639
       if (alloc_size == 0)
 
17640
        {
 
17641
@@ -482,7 +479,7 @@
 
17642
          return;
 
17643
        }
 
17644
       else
 
17645
-       retarray->base_addr = xmalloc (alloc_size);
 
17646
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17647
     }
 
17648
   else
 
17649
     {
 
17650
Index: libgfortran/generated/spread_i16.c
 
17651
===================================================================
 
17652
--- a/src/libgfortran/generated/spread_i16.c    (.../tags/gcc_4_8_3_release)
 
17653
+++ b/src/libgfortran/generated/spread_i16.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_16));
 
17660
+      /* xmallocarray allocates a single byte for zero size.  */
 
17661
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
 
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_16));
 
17670
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
 
17671
       ret->offset = 0;
 
17672
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17673
     }
 
17674
Index: libgfortran/generated/sum_i4.c
 
17675
===================================================================
 
17676
--- a/src/libgfortran/generated/sum_i4.c        (.../tags/gcc_4_8_3_release)
 
17677
+++ b/src/libgfortran/generated/sum_i4.c        (.../branches/gcc-4_8-branch)
 
17678
@@ -97,10 +97,9 @@
 
17679
       retarray->offset = 0;
 
17680
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17681
 
 
17682
-      alloc_size = sizeof (GFC_INTEGER_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
-      retarray->base_addr = xmalloc (alloc_size);
 
17687
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17688
       if (alloc_size == 0)
 
17689
        {
 
17690
          /* Make sure we have a zero-sized array.  */
 
17691
@@ -272,8 +271,7 @@
 
17692
 
 
17693
        }
 
17694
 
 
17695
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17696
-                  * extent[rank-1];
 
17697
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17698
 
 
17699
       retarray->offset = 0;
 
17700
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17701
@@ -285,7 +283,7 @@
 
17702
          return;
 
17703
        }
 
17704
       else
 
17705
-       retarray->base_addr = xmalloc (alloc_size);
 
17706
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17707
 
 
17708
     }
 
17709
   else
 
17710
@@ -430,8 +428,7 @@
 
17711
       retarray->offset = 0;
 
17712
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17713
 
 
17714
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17715
-                  * extent[rank-1];
 
17716
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17717
 
 
17718
       if (alloc_size == 0)
 
17719
        {
 
17720
@@ -440,7 +437,7 @@
 
17721
          return;
 
17722
        }
 
17723
       else
 
17724
-       retarray->base_addr = xmalloc (alloc_size);
 
17725
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17726
     }
 
17727
   else
 
17728
     {
 
17729
Index: libgfortran/generated/unpack_r10.c
 
17730
===================================================================
 
17731
--- a/src/libgfortran/generated/unpack_r10.c    (.../tags/gcc_4_8_3_release)
 
17732
+++ b/src/libgfortran/generated/unpack_r10.c    (.../branches/gcc-4_8-branch)
 
17733
@@ -99,7 +99,7 @@
 
17734
          rs *= extent[n];
 
17735
        }
 
17736
       ret->offset = 0;
 
17737
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
17738
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
17739
     }
 
17740
   else
 
17741
     {
 
17742
@@ -244,7 +244,7 @@
 
17743
          rs *= extent[n];
 
17744
        }
 
17745
       ret->offset = 0;
 
17746
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
17747
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
17748
     }
 
17749
   else
 
17750
     {
 
17751
Index: libgfortran/generated/bessel_r16.c
 
17752
===================================================================
 
17753
--- a/src/libgfortran/generated/bessel_r16.c    (.../tags/gcc_4_8_3_release)
 
17754
+++ b/src/libgfortran/generated/bessel_r16.c    (.../branches/gcc-4_8-branch)
 
17755
@@ -59,7 +59,7 @@
 
17756
     {
 
17757
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17758
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17759
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
17760
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
17761
       ret->offset = 0;
 
17762
     }
 
17763
 
 
17764
@@ -126,7 +126,7 @@
 
17765
     {
 
17766
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17767
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17768
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
17769
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
17770
       ret->offset = 0;
 
17771
     }
 
17772
 
 
17773
@@ -166,7 +166,7 @@
 
17774
 
 
17775
   x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
17776
 
 
17777
-  for (i = 2; i <= n1+n2; i++)
 
17778
+  for (i = 2; i <= n2 - n1; i++)
 
17779
     {
 
17780
 #if defined(GFC_REAL_16_INFINITY)
 
17781
       if (unlikely (last2 == -GFC_REAL_16_INFINITY))
 
17782
Index: libgfortran/generated/norm2_r8.c
 
17783
===================================================================
 
17784
--- a/src/libgfortran/generated/norm2_r8.c      (.../tags/gcc_4_8_3_release)
 
17785
+++ b/src/libgfortran/generated/norm2_r8.c      (.../branches/gcc-4_8-branch)
 
17786
@@ -101,10 +101,9 @@
 
17787
       retarray->offset = 0;
 
17788
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17789
 
 
17790
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17791
-                  * extent[rank-1];
 
17792
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17793
 
 
17794
-      retarray->base_addr = xmalloc (alloc_size);
 
17795
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17796
       if (alloc_size == 0)
 
17797
        {
 
17798
          /* Make sure we have a zero-sized array.  */
 
17799
Index: libgfortran/generated/spread_i4.c
 
17800
===================================================================
 
17801
--- a/src/libgfortran/generated/spread_i4.c     (.../tags/gcc_4_8_3_release)
 
17802
+++ b/src/libgfortran/generated/spread_i4.c     (.../branches/gcc-4_8-branch)
 
17803
@@ -101,8 +101,8 @@
 
17804
        }
 
17805
       ret->offset = 0;
 
17806
 
 
17807
-      /* xmalloc allocates a single byte for zero size.  */
 
17808
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
 
17809
+      /* xmallocarray allocates a single byte for zero size.  */
 
17810
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
 
17811
       if (rs <= 0)
 
17812
         return;
 
17813
     }
 
17814
@@ -244,7 +244,7 @@
 
17815
 
 
17816
   if (ret->base_addr == NULL)
 
17817
     {
 
17818
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
 
17819
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
 
17820
       ret->offset = 0;
 
17821
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17822
     }
 
17823
Index: libgfortran/generated/eoshift3_8.c
 
17824
===================================================================
 
17825
--- a/src/libgfortran/generated/eoshift3_8.c    (.../tags/gcc_4_8_3_release)
 
17826
+++ b/src/libgfortran/generated/eoshift3_8.c    (.../branches/gcc-4_8-branch)
 
17827
@@ -89,7 +89,7 @@
 
17828
     {
 
17829
       int i;
 
17830
 
 
17831
-      ret->base_addr = xmalloc (size * arraysize);
 
17832
+      ret->base_addr = xmallocarray (arraysize, size);
 
17833
       ret->offset = 0;
 
17834
       ret->dtype = array->dtype;
 
17835
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
17836
@@ -107,8 +107,8 @@
 
17837
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
17838
 
 
17839
         }
 
17840
-      /* xmalloc allocates a single byte for zero size.  */
 
17841
-      ret->base_addr = xmalloc (size * arraysize);
 
17842
+      /* xmallocarray allocates a single byte for zero size.  */
 
17843
+      ret->base_addr = xmallocarray (arraysize, size);
 
17844
 
 
17845
     }
 
17846
   else if (unlikely (compile_options.bounds_check))
 
17847
Index: libgfortran/generated/minloc1_4_i1.c
 
17848
===================================================================
 
17849
--- a/src/libgfortran/generated/minloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
17850
+++ b/src/libgfortran/generated/minloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
17851
@@ -98,10 +98,9 @@
 
17852
       retarray->offset = 0;
 
17853
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17854
 
 
17855
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17856
-                  * extent[rank-1];
 
17857
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17858
 
 
17859
-      retarray->base_addr = xmalloc (alloc_size);
 
17860
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17861
       if (alloc_size == 0)
 
17862
        {
 
17863
          /* Make sure we have a zero-sized array.  */
 
17864
@@ -294,8 +293,7 @@
 
17865
 
 
17866
        }
 
17867
 
 
17868
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17869
-                  * extent[rank-1];
 
17870
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17871
 
 
17872
       retarray->offset = 0;
 
17873
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17874
@@ -307,7 +305,7 @@
 
17875
          return;
 
17876
        }
 
17877
       else
 
17878
-       retarray->base_addr = xmalloc (alloc_size);
 
17879
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17880
 
 
17881
     }
 
17882
   else
 
17883
@@ -485,8 +483,7 @@
 
17884
       retarray->offset = 0;
 
17885
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17886
 
 
17887
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17888
-                  * extent[rank-1];
 
17889
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17890
 
 
17891
       if (alloc_size == 0)
 
17892
        {
 
17893
@@ -495,7 +492,7 @@
 
17894
          return;
 
17895
        }
 
17896
       else
 
17897
-       retarray->base_addr = xmalloc (alloc_size);
 
17898
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17899
     }
 
17900
   else
 
17901
     {
 
17902
Index: libgfortran/generated/minval_i2.c
 
17903
===================================================================
 
17904
--- a/src/libgfortran/generated/minval_i2.c     (.../tags/gcc_4_8_3_release)
 
17905
+++ b/src/libgfortran/generated/minval_i2.c     (.../branches/gcc-4_8-branch)
 
17906
@@ -97,10 +97,9 @@
 
17907
       retarray->offset = 0;
 
17908
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17909
 
 
17910
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17911
-                  * extent[rank-1];
 
17912
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17913
 
 
17914
-      retarray->base_addr = xmalloc (alloc_size);
 
17915
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17916
       if (alloc_size == 0)
 
17917
        {
 
17918
          /* Make sure we have a zero-sized array.  */
 
17919
@@ -286,8 +285,7 @@
 
17920
 
 
17921
        }
 
17922
 
 
17923
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17924
-                  * extent[rank-1];
 
17925
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17926
 
 
17927
       retarray->offset = 0;
 
17928
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17929
@@ -299,7 +297,7 @@
 
17930
          return;
 
17931
        }
 
17932
       else
 
17933
-       retarray->base_addr = xmalloc (alloc_size);
 
17934
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17935
 
 
17936
     }
 
17937
   else
 
17938
@@ -472,8 +470,7 @@
 
17939
       retarray->offset = 0;
 
17940
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17941
 
 
17942
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17943
-                  * extent[rank-1];
 
17944
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17945
 
 
17946
       if (alloc_size == 0)
 
17947
        {
 
17948
@@ -482,7 +479,7 @@
 
17949
          return;
 
17950
        }
 
17951
       else
 
17952
-       retarray->base_addr = xmalloc (alloc_size);
 
17953
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17954
     }
 
17955
   else
 
17956
     {
 
17957
Index: libgfortran/generated/bessel_r8.c
 
17958
===================================================================
 
17959
--- a/src/libgfortran/generated/bessel_r8.c     (.../tags/gcc_4_8_3_release)
 
17960
+++ b/src/libgfortran/generated/bessel_r8.c     (.../branches/gcc-4_8-branch)
 
17961
@@ -55,7 +55,7 @@
 
17962
     {
 
17963
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17964
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17965
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
17966
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
17967
       ret->offset = 0;
 
17968
     }
 
17969
 
 
17970
@@ -122,7 +122,7 @@
 
17971
     {
 
17972
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17973
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17974
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
17975
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
17976
       ret->offset = 0;
 
17977
     }
 
17978
 
 
17979
@@ -162,7 +162,7 @@
 
17980
 
 
17981
   x2rev = GFC_REAL_8_LITERAL(2.)/x;
 
17982
 
 
17983
-  for (i = 2; i <= n1+n2; i++)
 
17984
+  for (i = 2; i <= n2 - n1; i++)
 
17985
     {
 
17986
 #if defined(GFC_REAL_8_INFINITY)
 
17987
       if (unlikely (last2 == -GFC_REAL_8_INFINITY))
 
17988
Index: libgfortran/generated/unpack_r4.c
 
17989
===================================================================
 
17990
--- a/src/libgfortran/generated/unpack_r4.c     (.../tags/gcc_4_8_3_release)
 
17991
+++ b/src/libgfortran/generated/unpack_r4.c     (.../branches/gcc-4_8-branch)
 
17992
@@ -99,7 +99,7 @@
 
17993
          rs *= extent[n];
 
17994
        }
 
17995
       ret->offset = 0;
 
17996
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
17997
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
17998
     }
 
17999
   else
 
18000
     {
 
18001
@@ -244,7 +244,7 @@
 
18002
          rs *= extent[n];
 
18003
        }
 
18004
       ret->offset = 0;
 
18005
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
18006
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
18007
     }
 
18008
   else
 
18009
     {
 
18010
Index: libgfortran/generated/product_r8.c
 
18011
===================================================================
 
18012
--- a/src/libgfortran/generated/product_r8.c    (.../tags/gcc_4_8_3_release)
 
18013
+++ b/src/libgfortran/generated/product_r8.c    (.../branches/gcc-4_8-branch)
 
18014
@@ -97,10 +97,9 @@
 
18015
       retarray->offset = 0;
 
18016
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18017
 
 
18018
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18019
-                  * extent[rank-1];
 
18020
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18021
 
 
18022
-      retarray->base_addr = xmalloc (alloc_size);
 
18023
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18024
       if (alloc_size == 0)
 
18025
        {
 
18026
          /* Make sure we have a zero-sized array.  */
 
18027
@@ -272,8 +271,7 @@
 
18028
 
 
18029
        }
 
18030
 
 
18031
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18032
-                  * extent[rank-1];
 
18033
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18034
 
 
18035
       retarray->offset = 0;
 
18036
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18037
@@ -285,7 +283,7 @@
 
18038
          return;
 
18039
        }
 
18040
       else
 
18041
-       retarray->base_addr = xmalloc (alloc_size);
 
18042
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18043
 
 
18044
     }
 
18045
   else
 
18046
@@ -430,8 +428,7 @@
 
18047
       retarray->offset = 0;
 
18048
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18049
 
 
18050
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18051
-                  * extent[rank-1];
 
18052
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18053
 
 
18054
       if (alloc_size == 0)
 
18055
        {
 
18056
@@ -440,7 +437,7 @@
 
18057
          return;
 
18058
        }
 
18059
       else
 
18060
-       retarray->base_addr = xmalloc (alloc_size);
 
18061
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18062
     }
 
18063
   else
 
18064
     {
 
18065
Index: libgfortran/generated/matmul_r4.c
 
18066
===================================================================
 
18067
--- a/src/libgfortran/generated/matmul_r4.c     (.../tags/gcc_4_8_3_release)
 
18068
+++ b/src/libgfortran/generated/matmul_r4.c     (.../branches/gcc-4_8-branch)
 
18069
@@ -124,7 +124,7 @@
 
18070
         }
 
18071
 
 
18072
       retarray->base_addr
 
18073
-       = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
 
18074
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
 
18075
       retarray->offset = 0;
 
18076
     }
 
18077
     else if (unlikely (compile_options.bounds_check))
 
18078
Index: libgfortran/generated/unpack_i2.c
 
18079
===================================================================
 
18080
--- a/src/libgfortran/generated/unpack_i2.c     (.../tags/gcc_4_8_3_release)
 
18081
+++ b/src/libgfortran/generated/unpack_i2.c     (.../branches/gcc-4_8-branch)
 
18082
@@ -99,7 +99,7 @@
 
18083
          rs *= extent[n];
 
18084
        }
 
18085
       ret->offset = 0;
 
18086
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
18087
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
18088
     }
 
18089
   else
 
18090
     {
 
18091
@@ -244,7 +244,7 @@
 
18092
          rs *= extent[n];
 
18093
        }
 
18094
       ret->offset = 0;
 
18095
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
18096
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
18097
     }
 
18098
   else
 
18099
     {
 
18100
Index: libgfortran/generated/in_pack_r8.c
 
18101
===================================================================
 
18102
--- a/src/libgfortran/generated/in_pack_r8.c    (.../tags/gcc_4_8_3_release)
 
18103
+++ b/src/libgfortran/generated/in_pack_r8.c    (.../branches/gcc-4_8-branch)
 
18104
@@ -76,7 +76,7 @@
 
18105
     return source->base_addr;
 
18106
 
 
18107
   /* Allocate storage for the destination.  */
 
18108
-  destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
 
18109
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
 
18110
   dest = destptr;
 
18111
   src = source->base_addr;
 
18112
   stride0 = stride[0];
 
18113
Index: libgfortran/generated/maxloc1_4_r16.c
 
18114
===================================================================
 
18115
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
18116
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
18117
@@ -98,10 +98,9 @@
 
18118
       retarray->offset = 0;
 
18119
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18120
 
 
18121
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18122
-                  * extent[rank-1];
 
18123
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18124
 
 
18125
-      retarray->base_addr = xmalloc (alloc_size);
 
18126
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18127
       if (alloc_size == 0)
 
18128
        {
 
18129
          /* Make sure we have a zero-sized array.  */
 
18130
@@ -294,8 +293,7 @@
 
18131
 
 
18132
        }
 
18133
 
 
18134
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18135
-                  * extent[rank-1];
 
18136
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18137
 
 
18138
       retarray->offset = 0;
 
18139
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18140
@@ -307,7 +305,7 @@
 
18141
          return;
 
18142
        }
 
18143
       else
 
18144
-       retarray->base_addr = xmalloc (alloc_size);
 
18145
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18146
 
 
18147
     }
 
18148
   else
 
18149
@@ -485,8 +483,7 @@
 
18150
       retarray->offset = 0;
 
18151
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18152
 
 
18153
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18154
-                  * extent[rank-1];
 
18155
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18156
 
 
18157
       if (alloc_size == 0)
 
18158
        {
 
18159
@@ -495,7 +492,7 @@
 
18160
          return;
 
18161
        }
 
18162
       else
 
18163
-       retarray->base_addr = xmalloc (alloc_size);
 
18164
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18165
     }
 
18166
   else
 
18167
     {
 
18168
Index: libgfortran/generated/minloc0_8_r16.c
 
18169
===================================================================
 
18170
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
18171
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
18172
@@ -58,7 +58,7 @@
 
18173
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18174
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18175
       retarray->offset = 0;
 
18176
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18177
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18178
     }
 
18179
   else
 
18180
     {
 
18181
@@ -199,7 +199,7 @@
 
18182
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18183
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18184
       retarray->offset = 0;
 
18185
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18186
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18187
     }
 
18188
   else
 
18189
     {
 
18190
@@ -367,7 +367,7 @@
 
18191
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18192
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18193
       retarray->offset = 0;
 
18194
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18195
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18196
     }
 
18197
   else if (unlikely (compile_options.bounds_check))
 
18198
     {
 
18199
Index: libgfortran/generated/reshape_c8.c
 
18200
===================================================================
 
18201
--- a/src/libgfortran/generated/reshape_c8.c    (.../tags/gcc_4_8_3_release)
 
18202
+++ b/src/libgfortran/generated/reshape_c8.c    (.../branches/gcc-4_8-branch)
 
18203
@@ -111,11 +111,11 @@
 
18204
       ret->offset = 0;
 
18205
 
 
18206
       if (unlikely (rs < 1))
 
18207
-        alloc_size = 1;
 
18208
+        alloc_size = 0;
 
18209
       else
 
18210
-        alloc_size = rs * sizeof (GFC_COMPLEX_8);
 
18211
+        alloc_size = rs;
 
18212
 
 
18213
-      ret->base_addr = xmalloc (alloc_size);
 
18214
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
18215
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
18216
     }
 
18217
 
 
18218
Index: libgfortran/generated/iparity_i8.c
 
18219
===================================================================
 
18220
--- a/src/libgfortran/generated/iparity_i8.c    (.../tags/gcc_4_8_3_release)
 
18221
+++ b/src/libgfortran/generated/iparity_i8.c    (.../branches/gcc-4_8-branch)
 
18222
@@ -97,10 +97,9 @@
 
18223
       retarray->offset = 0;
 
18224
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18225
 
 
18226
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18227
-                  * extent[rank-1];
 
18228
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18229
 
 
18230
-      retarray->base_addr = xmalloc (alloc_size);
 
18231
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18232
       if (alloc_size == 0)
 
18233
        {
 
18234
          /* Make sure we have a zero-sized array.  */
 
18235
@@ -272,8 +271,7 @@
 
18236
 
 
18237
        }
 
18238
 
 
18239
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18240
-                  * extent[rank-1];
 
18241
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18242
 
 
18243
       retarray->offset = 0;
 
18244
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18245
@@ -285,7 +283,7 @@
 
18246
          return;
 
18247
        }
 
18248
       else
 
18249
-       retarray->base_addr = xmalloc (alloc_size);
 
18250
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18251
 
 
18252
     }
 
18253
   else
 
18254
@@ -430,8 +428,7 @@
 
18255
       retarray->offset = 0;
 
18256
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18257
 
 
18258
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18259
-                  * extent[rank-1];
 
18260
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18261
 
 
18262
       if (alloc_size == 0)
 
18263
        {
 
18264
@@ -440,7 +437,7 @@
 
18265
          return;
 
18266
        }
 
18267
       else
 
18268
-       retarray->base_addr = xmalloc (alloc_size);
 
18269
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18270
     }
 
18271
   else
 
18272
     {
 
18273
Index: libgfortran/generated/count_1_l.c
 
18274
===================================================================
 
18275
--- a/src/libgfortran/generated/count_1_l.c     (.../tags/gcc_4_8_3_release)
 
18276
+++ b/src/libgfortran/generated/count_1_l.c     (.../branches/gcc-4_8-branch)
 
18277
@@ -101,8 +101,7 @@
 
18278
       retarray->offset = 0;
 
18279
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18280
 
 
18281
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18282
-                  * extent[rank-1];
 
18283
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18284
 
 
18285
       if (alloc_size == 0)
 
18286
        {
 
18287
@@ -111,7 +110,7 @@
 
18288
          return;
 
18289
        }
 
18290
       else
 
18291
-       retarray->base_addr = xmalloc (alloc_size);
 
18292
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18293
     }
 
18294
   else
 
18295
     {
 
18296
Index: libgfortran/generated/maxloc0_8_i4.c
 
18297
===================================================================
 
18298
--- a/src/libgfortran/generated/maxloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
18299
+++ b/src/libgfortran/generated/maxloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
18300
@@ -58,7 +58,7 @@
 
18301
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18302
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18303
       retarray->offset = 0;
 
18304
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18305
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18306
     }
 
18307
   else
 
18308
     {
 
18309
@@ -199,7 +199,7 @@
 
18310
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18311
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18312
       retarray->offset = 0;
 
18313
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18314
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18315
     }
 
18316
   else
 
18317
     {
 
18318
@@ -367,7 +367,7 @@
 
18319
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18320
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18321
       retarray->offset = 0;
 
18322
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18323
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18324
     }
 
18325
   else if (unlikely (compile_options.bounds_check))
 
18326
     {
 
18327
Index: libgfortran/generated/matmul_i2.c
 
18328
===================================================================
 
18329
--- a/src/libgfortran/generated/matmul_i2.c     (.../tags/gcc_4_8_3_release)
 
18330
+++ b/src/libgfortran/generated/matmul_i2.c     (.../branches/gcc-4_8-branch)
 
18331
@@ -124,7 +124,7 @@
 
18332
         }
 
18333
 
 
18334
       retarray->base_addr
 
18335
-       = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
 
18336
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
 
18337
       retarray->offset = 0;
 
18338
     }
 
18339
     else if (unlikely (compile_options.bounds_check))
 
18340
Index: libgfortran/generated/minloc1_4_r4.c
 
18341
===================================================================
 
18342
--- a/src/libgfortran/generated/minloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
18343
+++ b/src/libgfortran/generated/minloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
18344
@@ -98,10 +98,9 @@
 
18345
       retarray->offset = 0;
 
18346
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18347
 
 
18348
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18349
-                  * extent[rank-1];
 
18350
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18351
 
 
18352
-      retarray->base_addr = xmalloc (alloc_size);
 
18353
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18354
       if (alloc_size == 0)
 
18355
        {
 
18356
          /* Make sure we have a zero-sized array.  */
 
18357
@@ -294,8 +293,7 @@
 
18358
 
 
18359
        }
 
18360
 
 
18361
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18362
-                  * extent[rank-1];
 
18363
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18364
 
 
18365
       retarray->offset = 0;
 
18366
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18367
@@ -307,7 +305,7 @@
 
18368
          return;
 
18369
        }
 
18370
       else
 
18371
-       retarray->base_addr = xmalloc (alloc_size);
 
18372
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18373
 
 
18374
     }
 
18375
   else
 
18376
@@ -485,8 +483,7 @@
 
18377
       retarray->offset = 0;
 
18378
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18379
 
 
18380
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18381
-                  * extent[rank-1];
 
18382
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18383
 
 
18384
       if (alloc_size == 0)
 
18385
        {
 
18386
@@ -495,7 +492,7 @@
 
18387
          return;
 
18388
        }
 
18389
       else
 
18390
-       retarray->base_addr = xmalloc (alloc_size);
 
18391
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18392
     }
 
18393
   else
 
18394
     {
 
18395
Index: libgfortran/generated/transpose_i16.c
 
18396
===================================================================
 
18397
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
 
18398
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
 
18399
@@ -60,7 +60,8 @@
 
18400
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18401
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18402
 
 
18403
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
 
18404
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18405
+                                     sizeof (GFC_INTEGER_16));
 
18406
       ret->offset = 0;
 
18407
     } else if (unlikely (compile_options.bounds_check))
 
18408
     {
 
18409
Index: libgfortran/generated/minloc0_16_i4.c
 
18410
===================================================================
 
18411
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
18412
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
18413
@@ -58,7 +58,7 @@
 
18414
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18415
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18416
       retarray->offset = 0;
 
18417
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18418
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18419
     }
 
18420
   else
 
18421
     {
 
18422
@@ -199,7 +199,7 @@
 
18423
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18424
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18425
       retarray->offset = 0;
 
18426
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18427
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18428
     }
 
18429
   else
 
18430
     {
 
18431
@@ -367,7 +367,7 @@
 
18432
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18433
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18434
       retarray->offset = 0;
 
18435
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18436
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18437
     }
 
18438
   else if (unlikely (compile_options.bounds_check))
 
18439
     {
 
18440
Index: libgfortran/generated/transpose_i4.c
 
18441
===================================================================
 
18442
--- a/src/libgfortran/generated/transpose_i4.c  (.../tags/gcc_4_8_3_release)
 
18443
+++ b/src/libgfortran/generated/transpose_i4.c  (.../branches/gcc-4_8-branch)
 
18444
@@ -60,7 +60,8 @@
 
18445
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18446
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18447
 
 
18448
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
 
18449
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18450
+                                     sizeof (GFC_INTEGER_4));
 
18451
       ret->offset = 0;
 
18452
     } else if (unlikely (compile_options.bounds_check))
 
18453
     {
 
18454
Index: libgfortran/generated/maxloc1_16_i8.c
 
18455
===================================================================
 
18456
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
18457
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
18458
@@ -98,10 +98,9 @@
 
18459
       retarray->offset = 0;
 
18460
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18461
 
 
18462
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18463
-                  * extent[rank-1];
 
18464
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18465
 
 
18466
-      retarray->base_addr = xmalloc (alloc_size);
 
18467
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18468
       if (alloc_size == 0)
 
18469
        {
 
18470
          /* Make sure we have a zero-sized array.  */
 
18471
@@ -294,8 +293,7 @@
 
18472
 
 
18473
        }
 
18474
 
 
18475
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18476
-                  * extent[rank-1];
 
18477
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18478
 
 
18479
       retarray->offset = 0;
 
18480
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18481
@@ -307,7 +305,7 @@
 
18482
          return;
 
18483
        }
 
18484
       else
 
18485
-       retarray->base_addr = xmalloc (alloc_size);
 
18486
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18487
 
 
18488
     }
 
18489
   else
 
18490
@@ -485,8 +483,7 @@
 
18491
       retarray->offset = 0;
 
18492
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18493
 
 
18494
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18495
-                  * extent[rank-1];
 
18496
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18497
 
 
18498
       if (alloc_size == 0)
 
18499
        {
 
18500
@@ -495,7 +492,7 @@
 
18501
          return;
 
18502
        }
 
18503
       else
 
18504
-       retarray->base_addr = xmalloc (alloc_size);
 
18505
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18506
     }
 
18507
   else
 
18508
     {
 
18509
Index: libgfortran/generated/minloc1_4_i2.c
 
18510
===================================================================
 
18511
--- a/src/libgfortran/generated/minloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
18512
+++ b/src/libgfortran/generated/minloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
18513
@@ -98,10 +98,9 @@
 
18514
       retarray->offset = 0;
 
18515
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18516
 
 
18517
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18518
-                  * extent[rank-1];
 
18519
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18520
 
 
18521
-      retarray->base_addr = xmalloc (alloc_size);
 
18522
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18523
       if (alloc_size == 0)
 
18524
        {
 
18525
          /* Make sure we have a zero-sized array.  */
 
18526
@@ -294,8 +293,7 @@
 
18527
 
 
18528
        }
 
18529
 
 
18530
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18531
-                  * extent[rank-1];
 
18532
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18533
 
 
18534
       retarray->offset = 0;
 
18535
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18536
@@ -307,7 +305,7 @@
 
18537
          return;
 
18538
        }
 
18539
       else
 
18540
-       retarray->base_addr = xmalloc (alloc_size);
 
18541
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18542
 
 
18543
     }
 
18544
   else
 
18545
@@ -485,8 +483,7 @@
 
18546
       retarray->offset = 0;
 
18547
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18548
 
 
18549
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18550
-                  * extent[rank-1];
 
18551
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18552
 
 
18553
       if (alloc_size == 0)
 
18554
        {
 
18555
@@ -495,7 +492,7 @@
 
18556
          return;
 
18557
        }
 
18558
       else
 
18559
-       retarray->base_addr = xmalloc (alloc_size);
 
18560
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18561
     }
 
18562
   else
 
18563
     {
 
18564
Index: libgfortran/generated/matmul_l16.c
 
18565
===================================================================
 
18566
--- a/src/libgfortran/generated/matmul_l16.c    (.../tags/gcc_4_8_3_release)
 
18567
+++ b/src/libgfortran/generated/matmul_l16.c    (.../branches/gcc-4_8-branch)
 
18568
@@ -88,7 +88,7 @@
 
18569
         }
 
18570
           
 
18571
       retarray->base_addr
 
18572
-       = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
 
18573
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
 
18574
       retarray->offset = 0;
 
18575
     }
 
18576
     else if (unlikely (compile_options.bounds_check))
 
18577
Index: libgfortran/generated/maxloc1_8_i1.c
 
18578
===================================================================
 
18579
--- a/src/libgfortran/generated/maxloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
18580
+++ b/src/libgfortran/generated/maxloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
18581
@@ -98,10 +98,9 @@
 
18582
       retarray->offset = 0;
 
18583
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18584
 
 
18585
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18586
-                  * extent[rank-1];
 
18587
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18588
 
 
18589
-      retarray->base_addr = xmalloc (alloc_size);
 
18590
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18591
       if (alloc_size == 0)
 
18592
        {
 
18593
          /* Make sure we have a zero-sized array.  */
 
18594
@@ -294,8 +293,7 @@
 
18595
 
 
18596
        }
 
18597
 
 
18598
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18599
-                  * extent[rank-1];
 
18600
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18601
 
 
18602
       retarray->offset = 0;
 
18603
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18604
@@ -307,7 +305,7 @@
 
18605
          return;
 
18606
        }
 
18607
       else
 
18608
-       retarray->base_addr = xmalloc (alloc_size);
 
18609
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18610
 
 
18611
     }
 
18612
   else
 
18613
@@ -485,8 +483,7 @@
 
18614
       retarray->offset = 0;
 
18615
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18616
 
 
18617
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18618
-                  * extent[rank-1];
 
18619
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18620
 
 
18621
       if (alloc_size == 0)
 
18622
        {
 
18623
@@ -495,7 +492,7 @@
 
18624
          return;
 
18625
        }
 
18626
       else
 
18627
-       retarray->base_addr = xmalloc (alloc_size);
 
18628
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18629
     }
 
18630
   else
 
18631
     {
 
18632
Index: libgfortran/generated/minloc1_8_i8.c
 
18633
===================================================================
 
18634
--- a/src/libgfortran/generated/minloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
18635
+++ b/src/libgfortran/generated/minloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
18636
@@ -98,10 +98,9 @@
 
18637
       retarray->offset = 0;
 
18638
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18639
 
 
18640
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18641
-                  * extent[rank-1];
 
18642
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18643
 
 
18644
-      retarray->base_addr = xmalloc (alloc_size);
 
18645
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18646
       if (alloc_size == 0)
 
18647
        {
 
18648
          /* Make sure we have a zero-sized array.  */
 
18649
@@ -294,8 +293,7 @@
 
18650
 
 
18651
        }
 
18652
 
 
18653
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18654
-                  * extent[rank-1];
 
18655
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18656
 
 
18657
       retarray->offset = 0;
 
18658
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18659
@@ -307,7 +305,7 @@
 
18660
          return;
 
18661
        }
 
18662
       else
 
18663
-       retarray->base_addr = xmalloc (alloc_size);
 
18664
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18665
 
 
18666
     }
 
18667
   else
 
18668
@@ -485,8 +483,7 @@
 
18669
       retarray->offset = 0;
 
18670
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18671
 
 
18672
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18673
-                  * extent[rank-1];
 
18674
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18675
 
 
18676
       if (alloc_size == 0)
 
18677
        {
 
18678
@@ -495,7 +492,7 @@
 
18679
          return;
 
18680
        }
 
18681
       else
 
18682
-       retarray->base_addr = xmalloc (alloc_size);
 
18683
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18684
     }
 
18685
   else
 
18686
     {
 
18687
Index: libgfortran/generated/minloc0_4_r8.c
 
18688
===================================================================
 
18689
--- a/src/libgfortran/generated/minloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
18690
+++ b/src/libgfortran/generated/minloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
18691
@@ -58,7 +58,7 @@
 
18692
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18693
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18694
       retarray->offset = 0;
 
18695
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18696
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18697
     }
 
18698
   else
 
18699
     {
 
18700
@@ -199,7 +199,7 @@
 
18701
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18702
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18703
       retarray->offset = 0;
 
18704
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18705
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18706
     }
 
18707
   else
 
18708
     {
 
18709
@@ -367,7 +367,7 @@
 
18710
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18711
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18712
       retarray->offset = 0;
 
18713
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18714
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18715
     }
 
18716
   else if (unlikely (compile_options.bounds_check))
 
18717
     {
 
18718
Index: libgfortran/generated/product_r16.c
 
18719
===================================================================
 
18720
--- a/src/libgfortran/generated/product_r16.c   (.../tags/gcc_4_8_3_release)
 
18721
+++ b/src/libgfortran/generated/product_r16.c   (.../branches/gcc-4_8-branch)
 
18722
@@ -97,10 +97,9 @@
 
18723
       retarray->offset = 0;
 
18724
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18725
 
 
18726
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18727
-                  * extent[rank-1];
 
18728
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18729
 
 
18730
-      retarray->base_addr = xmalloc (alloc_size);
 
18731
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18732
       if (alloc_size == 0)
 
18733
        {
 
18734
          /* Make sure we have a zero-sized array.  */
 
18735
@@ -272,8 +271,7 @@
 
18736
 
 
18737
        }
 
18738
 
 
18739
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18740
-                  * extent[rank-1];
 
18741
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18742
 
 
18743
       retarray->offset = 0;
 
18744
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18745
@@ -285,7 +283,7 @@
 
18746
          return;
 
18747
        }
 
18748
       else
 
18749
-       retarray->base_addr = xmalloc (alloc_size);
 
18750
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18751
 
 
18752
     }
 
18753
   else
 
18754
@@ -430,8 +428,7 @@
 
18755
       retarray->offset = 0;
 
18756
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18757
 
 
18758
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18759
-                  * extent[rank-1];
 
18760
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18761
 
 
18762
       if (alloc_size == 0)
 
18763
        {
 
18764
@@ -440,7 +437,7 @@
 
18765
          return;
 
18766
        }
 
18767
       else
 
18768
-       retarray->base_addr = xmalloc (alloc_size);
 
18769
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18770
     }
 
18771
   else
 
18772
     {
 
18773
Index: libgfortran/generated/sum_r8.c
 
18774
===================================================================
 
18775
--- a/src/libgfortran/generated/sum_r8.c        (.../tags/gcc_4_8_3_release)
 
18776
+++ b/src/libgfortran/generated/sum_r8.c        (.../branches/gcc-4_8-branch)
 
18777
@@ -97,10 +97,9 @@
 
18778
       retarray->offset = 0;
 
18779
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18780
 
 
18781
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18782
-                  * extent[rank-1];
 
18783
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18784
 
 
18785
-      retarray->base_addr = xmalloc (alloc_size);
 
18786
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18787
       if (alloc_size == 0)
 
18788
        {
 
18789
          /* Make sure we have a zero-sized array.  */
 
18790
@@ -272,8 +271,7 @@
 
18791
 
 
18792
        }
 
18793
 
 
18794
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18795
-                  * extent[rank-1];
 
18796
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18797
 
 
18798
       retarray->offset = 0;
 
18799
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18800
@@ -285,7 +283,7 @@
 
18801
          return;
 
18802
        }
 
18803
       else
 
18804
-       retarray->base_addr = xmalloc (alloc_size);
 
18805
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18806
 
 
18807
     }
 
18808
   else
 
18809
@@ -430,8 +428,7 @@
 
18810
       retarray->offset = 0;
 
18811
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18812
 
 
18813
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18814
-                  * extent[rank-1];
 
18815
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18816
 
 
18817
       if (alloc_size == 0)
 
18818
        {
 
18819
@@ -440,7 +437,7 @@
 
18820
          return;
 
18821
        }
 
18822
       else
 
18823
-       retarray->base_addr = xmalloc (alloc_size);
 
18824
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18825
     }
 
18826
   else
 
18827
     {
 
18828
Index: libgfortran/generated/norm2_r10.c
 
18829
===================================================================
 
18830
--- a/src/libgfortran/generated/norm2_r10.c     (.../tags/gcc_4_8_3_release)
 
18831
+++ b/src/libgfortran/generated/norm2_r10.c     (.../branches/gcc-4_8-branch)
 
18832
@@ -101,10 +101,9 @@
 
18833
       retarray->offset = 0;
 
18834
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18835
 
 
18836
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18837
-                  * extent[rank-1];
 
18838
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18839
 
 
18840
-      retarray->base_addr = xmalloc (alloc_size);
 
18841
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18842
       if (alloc_size == 0)
 
18843
        {
 
18844
          /* Make sure we have a zero-sized array.  */
 
18845
Index: libgfortran/generated/unpack_c10.c
 
18846
===================================================================
 
18847
--- a/src/libgfortran/generated/unpack_c10.c    (.../tags/gcc_4_8_3_release)
 
18848
+++ b/src/libgfortran/generated/unpack_c10.c    (.../branches/gcc-4_8-branch)
 
18849
@@ -99,7 +99,7 @@
 
18850
          rs *= extent[n];
 
18851
        }
 
18852
       ret->offset = 0;
 
18853
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
18854
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
18855
     }
 
18856
   else
 
18857
     {
 
18858
@@ -244,7 +244,7 @@
 
18859
          rs *= extent[n];
 
18860
        }
 
18861
       ret->offset = 0;
 
18862
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
18863
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
18864
     }
 
18865
   else
 
18866
     {
 
18867
Index: libgfortran/generated/spread_r8.c
 
18868
===================================================================
 
18869
--- a/src/libgfortran/generated/spread_r8.c     (.../tags/gcc_4_8_3_release)
 
18870
+++ b/src/libgfortran/generated/spread_r8.c     (.../branches/gcc-4_8-branch)
 
18871
@@ -101,8 +101,8 @@
 
18872
        }
 
18873
       ret->offset = 0;
 
18874
 
 
18875
-      /* xmalloc allocates a single byte for zero size.  */
 
18876
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
 
18877
+      /* xmallocarray allocates a single byte for zero size.  */
 
18878
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
 
18879
       if (rs <= 0)
 
18880
         return;
 
18881
     }
 
18882
@@ -244,7 +244,7 @@
 
18883
 
 
18884
   if (ret->base_addr == NULL)
 
18885
     {
 
18886
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
 
18887
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
 
18888
       ret->offset = 0;
 
18889
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
18890
     }
 
18891
Index: libgfortran/generated/minloc1_16_i16.c
 
18892
===================================================================
 
18893
--- a/src/libgfortran/generated/minloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
18894
+++ b/src/libgfortran/generated/minloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
18895
@@ -98,10 +98,9 @@
 
18896
       retarray->offset = 0;
 
18897
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18898
 
 
18899
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18900
-                  * extent[rank-1];
 
18901
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18902
 
 
18903
-      retarray->base_addr = xmalloc (alloc_size);
 
18904
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18905
       if (alloc_size == 0)
 
18906
        {
 
18907
          /* Make sure we have a zero-sized array.  */
 
18908
@@ -294,8 +293,7 @@
 
18909
 
 
18910
        }
 
18911
 
 
18912
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18913
-                  * extent[rank-1];
 
18914
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18915
 
 
18916
       retarray->offset = 0;
 
18917
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18918
@@ -307,7 +305,7 @@
 
18919
          return;
 
18920
        }
 
18921
       else
 
18922
-       retarray->base_addr = xmalloc (alloc_size);
 
18923
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18924
 
 
18925
     }
 
18926
   else
 
18927
@@ -485,8 +483,7 @@
 
18928
       retarray->offset = 0;
 
18929
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18930
 
 
18931
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18932
-                  * extent[rank-1];
 
18933
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18934
 
 
18935
       if (alloc_size == 0)
 
18936
        {
 
18937
@@ -495,7 +492,7 @@
 
18938
          return;
 
18939
        }
 
18940
       else
 
18941
-       retarray->base_addr = xmalloc (alloc_size);
 
18942
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18943
     }
 
18944
   else
 
18945
     {
 
18946
Index: libgfortran/generated/maxloc1_8_r4.c
 
18947
===================================================================
 
18948
--- a/src/libgfortran/generated/maxloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
18949
+++ b/src/libgfortran/generated/maxloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
18950
@@ -98,10 +98,9 @@
 
18951
       retarray->offset = 0;
 
18952
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18953
 
 
18954
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18955
-                  * extent[rank-1];
 
18956
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18957
 
 
18958
-      retarray->base_addr = xmalloc (alloc_size);
 
18959
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18960
       if (alloc_size == 0)
 
18961
        {
 
18962
          /* Make sure we have a zero-sized array.  */
 
18963
@@ -294,8 +293,7 @@
 
18964
 
 
18965
        }
 
18966
 
 
18967
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18968
-                  * extent[rank-1];
 
18969
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18970
 
 
18971
       retarray->offset = 0;
 
18972
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18973
@@ -307,7 +305,7 @@
 
18974
          return;
 
18975
        }
 
18976
       else
 
18977
-       retarray->base_addr = xmalloc (alloc_size);
 
18978
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18979
 
 
18980
     }
 
18981
   else
 
18982
@@ -485,8 +483,7 @@
 
18983
       retarray->offset = 0;
 
18984
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18985
 
 
18986
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18987
-                  * extent[rank-1];
 
18988
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18989
 
 
18990
       if (alloc_size == 0)
 
18991
        {
 
18992
@@ -495,7 +492,7 @@
 
18993
          return;
 
18994
        }
 
18995
       else
 
18996
-       retarray->base_addr = xmalloc (alloc_size);
 
18997
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18998
     }
 
18999
   else
 
19000
     {
 
19001
Index: libgfortran/generated/minloc1_16_i1.c
 
19002
===================================================================
 
19003
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
19004
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
19005
@@ -98,10 +98,9 @@
 
19006
       retarray->offset = 0;
 
19007
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19008
 
 
19009
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19010
-                  * extent[rank-1];
 
19011
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19012
 
 
19013
-      retarray->base_addr = xmalloc (alloc_size);
 
19014
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19015
       if (alloc_size == 0)
 
19016
        {
 
19017
          /* Make sure we have a zero-sized array.  */
 
19018
@@ -294,8 +293,7 @@
 
19019
 
 
19020
        }
 
19021
 
 
19022
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19023
-                  * extent[rank-1];
 
19024
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19025
 
 
19026
       retarray->offset = 0;
 
19027
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19028
@@ -307,7 +305,7 @@
 
19029
          return;
 
19030
        }
 
19031
       else
 
19032
-       retarray->base_addr = xmalloc (alloc_size);
 
19033
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19034
 
 
19035
     }
 
19036
   else
 
19037
@@ -485,8 +483,7 @@
 
19038
       retarray->offset = 0;
 
19039
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19040
 
 
19041
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19042
-                  * extent[rank-1];
 
19043
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19044
 
 
19045
       if (alloc_size == 0)
 
19046
        {
 
19047
@@ -495,7 +492,7 @@
 
19048
          return;
 
19049
        }
 
19050
       else
 
19051
-       retarray->base_addr = xmalloc (alloc_size);
 
19052
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19053
     }
 
19054
   else
 
19055
     {
 
19056
Index: libgfortran/generated/spread_r16.c
 
19057
===================================================================
 
19058
--- a/src/libgfortran/generated/spread_r16.c    (.../tags/gcc_4_8_3_release)
 
19059
+++ b/src/libgfortran/generated/spread_r16.c    (.../branches/gcc-4_8-branch)
 
19060
@@ -101,8 +101,8 @@
 
19061
        }
 
19062
       ret->offset = 0;
 
19063
 
 
19064
-      /* xmalloc allocates a single byte for zero size.  */
 
19065
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
 
19066
+      /* xmallocarray allocates a single byte for zero size.  */
 
19067
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
 
19068
       if (rs <= 0)
 
19069
         return;
 
19070
     }
 
19071
@@ -244,7 +244,7 @@
 
19072
 
 
19073
   if (ret->base_addr == NULL)
 
19074
     {
 
19075
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
 
19076
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
 
19077
       ret->offset = 0;
 
19078
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
19079
     }
 
19080
Index: libgfortran/generated/pack_c8.c
 
19081
===================================================================
 
19082
--- a/src/libgfortran/generated/pack_c8.c       (.../tags/gcc_4_8_3_release)
 
19083
+++ b/src/libgfortran/generated/pack_c8.c       (.../branches/gcc-4_8-branch)
 
19084
@@ -167,8 +167,8 @@
 
19085
 
 
19086
          ret->offset = 0;
 
19087
 
 
19088
-         /* xmalloc allocates a single byte for zero size.  */
 
19089
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
 
19090
+         /* xmallocarray allocates a single byte for zero size.  */
 
19091
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
 
19092
 
 
19093
          if (total == 0)
 
19094
            return;
 
19095
Index: libgfortran/generated/minval_r10.c
 
19096
===================================================================
 
19097
--- a/src/libgfortran/generated/minval_r10.c    (.../tags/gcc_4_8_3_release)
 
19098
+++ b/src/libgfortran/generated/minval_r10.c    (.../branches/gcc-4_8-branch)
 
19099
@@ -97,10 +97,9 @@
 
19100
       retarray->offset = 0;
 
19101
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19102
 
 
19103
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19104
-                  * extent[rank-1];
 
19105
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19106
 
 
19107
-      retarray->base_addr = xmalloc (alloc_size);
 
19108
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19109
       if (alloc_size == 0)
 
19110
        {
 
19111
          /* Make sure we have a zero-sized array.  */
 
19112
@@ -286,8 +285,7 @@
 
19113
 
 
19114
        }
 
19115
 
 
19116
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19117
-                  * extent[rank-1];
 
19118
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19119
 
 
19120
       retarray->offset = 0;
 
19121
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19122
@@ -299,7 +297,7 @@
 
19123
          return;
 
19124
        }
 
19125
       else
 
19126
-       retarray->base_addr = xmalloc (alloc_size);
 
19127
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19128
 
 
19129
     }
 
19130
   else
 
19131
@@ -472,8 +470,7 @@
 
19132
       retarray->offset = 0;
 
19133
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19134
 
 
19135
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19136
-                  * extent[rank-1];
 
19137
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19138
 
 
19139
       if (alloc_size == 0)
 
19140
        {
 
19141
@@ -482,7 +479,7 @@
 
19142
          return;
 
19143
        }
 
19144
       else
 
19145
-       retarray->base_addr = xmalloc (alloc_size);
 
19146
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19147
     }
 
19148
   else
 
19149
     {
 
19150
Index: libgfortran/generated/parity_l8.c
 
19151
===================================================================
 
19152
--- a/src/libgfortran/generated/parity_l8.c     (.../tags/gcc_4_8_3_release)
 
19153
+++ b/src/libgfortran/generated/parity_l8.c     (.../branches/gcc-4_8-branch)
 
19154
@@ -98,10 +98,9 @@
 
19155
       retarray->offset = 0;
 
19156
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19157
 
 
19158
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19159
-                  * extent[rank-1];
 
19160
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19161
 
 
19162
-      retarray->base_addr = xmalloc (alloc_size);
 
19163
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
19164
       if (alloc_size == 0)
 
19165
        {
 
19166
          /* Make sure we have a zero-sized array.  */
 
19167
Index: libgfortran/generated/minval_i4.c
 
19168
===================================================================
 
19169
--- a/src/libgfortran/generated/minval_i4.c     (.../tags/gcc_4_8_3_release)
 
19170
+++ b/src/libgfortran/generated/minval_i4.c     (.../branches/gcc-4_8-branch)
 
19171
@@ -97,10 +97,9 @@
 
19172
       retarray->offset = 0;
 
19173
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19174
 
 
19175
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19176
-                  * extent[rank-1];
 
19177
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19178
 
 
19179
-      retarray->base_addr = xmalloc (alloc_size);
 
19180
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19181
       if (alloc_size == 0)
 
19182
        {
 
19183
          /* Make sure we have a zero-sized array.  */
 
19184
@@ -286,8 +285,7 @@
 
19185
 
 
19186
        }
 
19187
 
 
19188
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19189
-                  * extent[rank-1];
 
19190
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19191
 
 
19192
       retarray->offset = 0;
 
19193
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19194
@@ -299,7 +297,7 @@
 
19195
          return;
 
19196
        }
 
19197
       else
 
19198
-       retarray->base_addr = xmalloc (alloc_size);
 
19199
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19200
 
 
19201
     }
 
19202
   else
 
19203
@@ -472,8 +470,7 @@
 
19204
       retarray->offset = 0;
 
19205
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19206
 
 
19207
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19208
-                  * extent[rank-1];
 
19209
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19210
 
 
19211
       if (alloc_size == 0)
 
19212
        {
 
19213
@@ -482,7 +479,7 @@
 
19214
          return;
 
19215
        }
 
19216
       else
 
19217
-       retarray->base_addr = xmalloc (alloc_size);
 
19218
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19219
     }
 
19220
   else
 
19221
     {
 
19222
Index: libgfortran/generated/maxloc1_8_i2.c
 
19223
===================================================================
 
19224
--- a/src/libgfortran/generated/maxloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
19225
+++ b/src/libgfortran/generated/maxloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
19226
@@ -98,10 +98,9 @@
 
19227
       retarray->offset = 0;
 
19228
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19229
 
 
19230
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19231
-                  * extent[rank-1];
 
19232
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19233
 
 
19234
-      retarray->base_addr = xmalloc (alloc_size);
 
19235
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19236
       if (alloc_size == 0)
 
19237
        {
 
19238
          /* Make sure we have a zero-sized array.  */
 
19239
@@ -294,8 +293,7 @@
 
19240
 
 
19241
        }
 
19242
 
 
19243
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19244
-                  * extent[rank-1];
 
19245
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19246
 
 
19247
       retarray->offset = 0;
 
19248
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19249
@@ -307,7 +305,7 @@
 
19250
          return;
 
19251
        }
 
19252
       else
 
19253
-       retarray->base_addr = xmalloc (alloc_size);
 
19254
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19255
 
 
19256
     }
 
19257
   else
 
19258
@@ -485,8 +483,7 @@
 
19259
       retarray->offset = 0;
 
19260
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19261
 
 
19262
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19263
-                  * extent[rank-1];
 
19264
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19265
 
 
19266
       if (alloc_size == 0)
 
19267
        {
 
19268
@@ -495,7 +492,7 @@
 
19269
          return;
 
19270
        }
 
19271
       else
 
19272
-       retarray->base_addr = xmalloc (alloc_size);
 
19273
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19274
     }
 
19275
   else
 
19276
     {
 
19277
Index: libgfortran/generated/any_l8.c
 
19278
===================================================================
 
19279
--- a/src/libgfortran/generated/any_l8.c        (.../tags/gcc_4_8_3_release)
 
19280
+++ b/src/libgfortran/generated/any_l8.c        (.../branches/gcc-4_8-branch)
 
19281
@@ -101,8 +101,7 @@
 
19282
       retarray->offset = 0;
 
19283
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19284
 
 
19285
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19286
-                  * extent[rank-1];
 
19287
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19288
 
 
19289
       if (alloc_size == 0)
 
19290
        {
 
19291
@@ -111,7 +110,7 @@
 
19292
          return;
 
19293
        }
 
19294
       else
 
19295
-       retarray->base_addr = xmalloc (alloc_size);
 
19296
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
19297
     }
 
19298
   else
 
19299
     {
 
19300
Index: libgfortran/generated/maxloc0_16_r10.c
 
19301
===================================================================
 
19302
--- a/src/libgfortran/generated/maxloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
19303
+++ b/src/libgfortran/generated/maxloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
19304
@@ -58,7 +58,7 @@
 
19305
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19306
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19307
       retarray->offset = 0;
 
19308
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19309
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19310
     }
 
19311
   else
 
19312
     {
 
19313
@@ -199,7 +199,7 @@
 
19314
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19315
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19316
       retarray->offset = 0;
 
19317
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19318
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19319
     }
 
19320
   else
 
19321
     {
 
19322
@@ -367,7 +367,7 @@
 
19323
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19324
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19325
       retarray->offset = 0;
 
19326
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19327
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19328
     }
 
19329
   else if (unlikely (compile_options.bounds_check))
 
19330
     {
 
19331
Index: libgfortran/generated/minloc0_4_i16.c
 
19332
===================================================================
 
19333
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
19334
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
19335
@@ -58,7 +58,7 @@
 
19336
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19337
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19338
       retarray->offset = 0;
 
19339
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19340
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19341
     }
 
19342
   else
 
19343
     {
 
19344
@@ -199,7 +199,7 @@
 
19345
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19346
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19347
       retarray->offset = 0;
 
19348
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19349
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19350
     }
 
19351
   else
 
19352
     {
 
19353
@@ -367,7 +367,7 @@
 
19354
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19355
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19356
       retarray->offset = 0;
 
19357
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19358
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19359
     }
 
19360
   else if (unlikely (compile_options.bounds_check))
 
19361
     {
 
19362
Index: libgfortran/generated/maxloc0_8_r8.c
 
19363
===================================================================
 
19364
--- a/src/libgfortran/generated/maxloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
19365
+++ b/src/libgfortran/generated/maxloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
19366
@@ -58,7 +58,7 @@
 
19367
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19368
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19369
       retarray->offset = 0;
 
19370
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19371
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19372
     }
 
19373
   else
 
19374
     {
 
19375
@@ -199,7 +199,7 @@
 
19376
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19377
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19378
       retarray->offset = 0;
 
19379
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19380
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19381
     }
 
19382
   else
 
19383
     {
 
19384
@@ -367,7 +367,7 @@
 
19385
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19386
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19387
       retarray->offset = 0;
 
19388
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19389
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19390
     }
 
19391
   else if (unlikely (compile_options.bounds_check))
 
19392
     {
 
19393
Index: libgfortran/generated/minloc1_4_r10.c
 
19394
===================================================================
 
19395
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
19396
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
19397
@@ -98,10 +98,9 @@
 
19398
       retarray->offset = 0;
 
19399
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19400
 
 
19401
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19402
-                  * extent[rank-1];
 
19403
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19404
 
 
19405
-      retarray->base_addr = xmalloc (alloc_size);
 
19406
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19407
       if (alloc_size == 0)
 
19408
        {
 
19409
          /* Make sure we have a zero-sized array.  */
 
19410
@@ -294,8 +293,7 @@
 
19411
 
 
19412
        }
 
19413
 
 
19414
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19415
-                  * extent[rank-1];
 
19416
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19417
 
 
19418
       retarray->offset = 0;
 
19419
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19420
@@ -307,7 +305,7 @@
 
19421
          return;
 
19422
        }
 
19423
       else
 
19424
-       retarray->base_addr = xmalloc (alloc_size);
 
19425
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19426
 
 
19427
     }
 
19428
   else
 
19429
@@ -485,8 +483,7 @@
 
19430
       retarray->offset = 0;
 
19431
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19432
 
 
19433
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19434
-                  * extent[rank-1];
 
19435
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19436
 
 
19437
       if (alloc_size == 0)
 
19438
        {
 
19439
@@ -495,7 +492,7 @@
 
19440
          return;
 
19441
        }
 
19442
       else
 
19443
-       retarray->base_addr = xmalloc (alloc_size);
 
19444
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19445
     }
 
19446
   else
 
19447
     {
 
19448
Index: libgfortran/generated/minloc1_8_i16.c
 
19449
===================================================================
 
19450
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
19451
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
19452
@@ -98,10 +98,9 @@
 
19453
       retarray->offset = 0;
 
19454
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19455
 
 
19456
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19457
-                  * extent[rank-1];
 
19458
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19459
 
 
19460
-      retarray->base_addr = xmalloc (alloc_size);
 
19461
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19462
       if (alloc_size == 0)
 
19463
        {
 
19464
          /* Make sure we have a zero-sized array.  */
 
19465
@@ -294,8 +293,7 @@
 
19466
 
 
19467
        }
 
19468
 
 
19469
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19470
-                  * extent[rank-1];
 
19471
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19472
 
 
19473
       retarray->offset = 0;
 
19474
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19475
@@ -307,7 +305,7 @@
 
19476
          return;
 
19477
        }
 
19478
       else
 
19479
-       retarray->base_addr = xmalloc (alloc_size);
 
19480
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19481
 
 
19482
     }
 
19483
   else
 
19484
@@ -485,8 +483,7 @@
 
19485
       retarray->offset = 0;
 
19486
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19487
 
 
19488
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19489
-                  * extent[rank-1];
 
19490
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19491
 
 
19492
       if (alloc_size == 0)
 
19493
        {
 
19494
@@ -495,7 +492,7 @@
 
19495
          return;
 
19496
        }
 
19497
       else
 
19498
-       retarray->base_addr = xmalloc (alloc_size);
 
19499
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19500
     }
 
19501
   else
 
19502
     {
 
19503
Index: libgfortran/generated/maxloc0_8_r10.c
 
19504
===================================================================
 
19505
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
19506
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
19507
@@ -58,7 +58,7 @@
 
19508
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19509
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19510
       retarray->offset = 0;
 
19511
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19512
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19513
     }
 
19514
   else
 
19515
     {
 
19516
@@ -199,7 +199,7 @@
 
19517
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19518
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19519
       retarray->offset = 0;
 
19520
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19521
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19522
     }
 
19523
   else
 
19524
     {
 
19525
@@ -367,7 +367,7 @@
 
19526
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19527
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19528
       retarray->offset = 0;
 
19529
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19530
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19531
     }
 
19532
   else if (unlikely (compile_options.bounds_check))
 
19533
     {
 
19534
Index: libgfortran/generated/unpack_i4.c
 
19535
===================================================================
 
19536
--- a/src/libgfortran/generated/unpack_i4.c     (.../tags/gcc_4_8_3_release)
 
19537
+++ b/src/libgfortran/generated/unpack_i4.c     (.../branches/gcc-4_8-branch)
 
19538
@@ -99,7 +99,7 @@
 
19539
          rs *= extent[n];
 
19540
        }
 
19541
       ret->offset = 0;
 
19542
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
19543
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
19544
     }
 
19545
   else
 
19546
     {
 
19547
@@ -244,7 +244,7 @@
 
19548
          rs *= extent[n];
 
19549
        }
 
19550
       ret->offset = 0;
 
19551
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
19552
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
19553
     }
 
19554
   else
 
19555
     {
 
19556
Index: libgfortran/generated/minloc1_16_r4.c
 
19557
===================================================================
 
19558
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
19559
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
19560
@@ -98,10 +98,9 @@
 
19561
       retarray->offset = 0;
 
19562
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19563
 
 
19564
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19565
-                  * extent[rank-1];
 
19566
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19567
 
 
19568
-      retarray->base_addr = xmalloc (alloc_size);
 
19569
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19570
       if (alloc_size == 0)
 
19571
        {
 
19572
          /* Make sure we have a zero-sized array.  */
 
19573
@@ -294,8 +293,7 @@
 
19574
 
 
19575
        }
 
19576
 
 
19577
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19578
-                  * extent[rank-1];
 
19579
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19580
 
 
19581
       retarray->offset = 0;
 
19582
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19583
@@ -307,7 +305,7 @@
 
19584
          return;
 
19585
        }
 
19586
       else
 
19587
-       retarray->base_addr = xmalloc (alloc_size);
 
19588
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19589
 
 
19590
     }
 
19591
   else
 
19592
@@ -485,8 +483,7 @@
 
19593
       retarray->offset = 0;
 
19594
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19595
 
 
19596
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19597
-                  * extent[rank-1];
 
19598
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19599
 
 
19600
       if (alloc_size == 0)
 
19601
        {
 
19602
@@ -495,7 +492,7 @@
 
19603
          return;
 
19604
        }
 
19605
       else
 
19606
-       retarray->base_addr = xmalloc (alloc_size);
 
19607
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19608
     }
 
19609
   else
 
19610
     {
 
19611
Index: libgfortran/generated/product_i8.c
 
19612
===================================================================
 
19613
--- a/src/libgfortran/generated/product_i8.c    (.../tags/gcc_4_8_3_release)
 
19614
+++ b/src/libgfortran/generated/product_i8.c    (.../branches/gcc-4_8-branch)
 
19615
@@ -97,10 +97,9 @@
 
19616
       retarray->offset = 0;
 
19617
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19618
 
 
19619
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19620
-                  * extent[rank-1];
 
19621
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19622
 
 
19623
-      retarray->base_addr = xmalloc (alloc_size);
 
19624
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19625
       if (alloc_size == 0)
 
19626
        {
 
19627
          /* Make sure we have a zero-sized array.  */
 
19628
@@ -272,8 +271,7 @@
 
19629
 
 
19630
        }
 
19631
 
 
19632
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19633
-                  * extent[rank-1];
 
19634
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19635
 
 
19636
       retarray->offset = 0;
 
19637
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19638
@@ -285,7 +283,7 @@
 
19639
          return;
 
19640
        }
 
19641
       else
 
19642
-       retarray->base_addr = xmalloc (alloc_size);
 
19643
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19644
 
 
19645
     }
 
19646
   else
 
19647
@@ -430,8 +428,7 @@
 
19648
       retarray->offset = 0;
 
19649
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19650
 
 
19651
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19652
-                  * extent[rank-1];
 
19653
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19654
 
 
19655
       if (alloc_size == 0)
 
19656
        {
 
19657
@@ -440,7 +437,7 @@
 
19658
          return;
 
19659
        }
 
19660
       else
 
19661
-       retarray->base_addr = xmalloc (alloc_size);
 
19662
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19663
     }
 
19664
   else
 
19665
     {
 
19666
Index: libgfortran/generated/minloc0_16_r8.c
 
19667
===================================================================
 
19668
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
19669
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
19670
@@ -58,7 +58,7 @@
 
19671
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19672
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19673
       retarray->offset = 0;
 
19674
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19675
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19676
     }
 
19677
   else
 
19678
     {
 
19679
@@ -199,7 +199,7 @@
 
19680
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19681
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19682
       retarray->offset = 0;
 
19683
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19684
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19685
     }
 
19686
   else
 
19687
     {
 
19688
@@ -367,7 +367,7 @@
 
19689
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19690
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19691
       retarray->offset = 0;
 
19692
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19693
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19694
     }
 
19695
   else if (unlikely (compile_options.bounds_check))
 
19696
     {
 
19697
Index: libgfortran/generated/count_2_l.c
 
19698
===================================================================
 
19699
--- a/src/libgfortran/generated/count_2_l.c     (.../tags/gcc_4_8_3_release)
 
19700
+++ b/src/libgfortran/generated/count_2_l.c     (.../branches/gcc-4_8-branch)
 
19701
@@ -101,8 +101,7 @@
 
19702
       retarray->offset = 0;
 
19703
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19704
 
 
19705
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19706
-                  * extent[rank-1];
 
19707
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19708
 
 
19709
       if (alloc_size == 0)
 
19710
        {
 
19711
@@ -111,7 +110,7 @@
 
19712
          return;
 
19713
        }
 
19714
       else
 
19715
-       retarray->base_addr = xmalloc (alloc_size);
 
19716
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
19717
     }
 
19718
   else
 
19719
     {
 
19720
Index: libgfortran/generated/transpose_r8.c
 
19721
===================================================================
 
19722
--- a/src/libgfortran/generated/transpose_r8.c  (.../tags/gcc_4_8_3_release)
 
19723
+++ b/src/libgfortran/generated/transpose_r8.c  (.../branches/gcc-4_8-branch)
 
19724
@@ -60,7 +60,8 @@
 
19725
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19726
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19727
 
 
19728
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
 
19729
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19730
+                                     sizeof (GFC_REAL_8));
 
19731
       ret->offset = 0;
 
19732
     } else if (unlikely (compile_options.bounds_check))
 
19733
     {
 
19734
Index: libgfortran/generated/cshift1_8.c
 
19735
===================================================================
 
19736
--- a/src/libgfortran/generated/cshift1_8.c     (.../tags/gcc_4_8_3_release)
 
19737
+++ b/src/libgfortran/generated/cshift1_8.c     (.../branches/gcc-4_8-branch)
 
19738
@@ -80,7 +80,7 @@
 
19739
     {
 
19740
       int i;
 
19741
 
 
19742
-      ret->base_addr = xmalloc (size * arraysize);
 
19743
+      ret->base_addr = xmallocarray (arraysize, size);
 
19744
       ret->offset = 0;
 
19745
       ret->dtype = array->dtype;
 
19746
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
19747
Index: libgfortran/generated/matmul_i4.c
 
19748
===================================================================
 
19749
--- a/src/libgfortran/generated/matmul_i4.c     (.../tags/gcc_4_8_3_release)
 
19750
+++ b/src/libgfortran/generated/matmul_i4.c     (.../branches/gcc-4_8-branch)
 
19751
@@ -124,7 +124,7 @@
 
19752
         }
 
19753
 
 
19754
       retarray->base_addr
 
19755
-       = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
 
19756
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
 
19757
       retarray->offset = 0;
 
19758
     }
 
19759
     else if (unlikely (compile_options.bounds_check))
 
19760
Index: libgfortran/generated/pack_r10.c
 
19761
===================================================================
 
19762
--- a/src/libgfortran/generated/pack_r10.c      (.../tags/gcc_4_8_3_release)
 
19763
+++ b/src/libgfortran/generated/pack_r10.c      (.../branches/gcc-4_8-branch)
 
19764
@@ -167,8 +167,8 @@
 
19765
 
 
19766
          ret->offset = 0;
 
19767
 
 
19768
-         /* xmalloc allocates a single byte for zero size.  */
 
19769
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
 
19770
+         /* xmallocarray allocates a single byte for zero size.  */
 
19771
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
 
19772
 
 
19773
          if (total == 0)
 
19774
            return;
 
19775
Index: libgfortran/generated/minloc1_16_i2.c
 
19776
===================================================================
 
19777
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
19778
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
19779
@@ -98,10 +98,9 @@
 
19780
       retarray->offset = 0;
 
19781
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19782
 
 
19783
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19784
-                  * extent[rank-1];
 
19785
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19786
 
 
19787
-      retarray->base_addr = xmalloc (alloc_size);
 
19788
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19789
       if (alloc_size == 0)
 
19790
        {
 
19791
          /* Make sure we have a zero-sized array.  */
 
19792
@@ -294,8 +293,7 @@
 
19793
 
 
19794
        }
 
19795
 
 
19796
-      alloc_size = sizeof (GFC_INTEGER_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
       retarray->offset = 0;
 
19801
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19802
@@ -307,7 +305,7 @@
 
19803
          return;
 
19804
        }
 
19805
       else
 
19806
-       retarray->base_addr = xmalloc (alloc_size);
 
19807
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19808
 
 
19809
     }
 
19810
   else
 
19811
@@ -485,8 +483,7 @@
 
19812
       retarray->offset = 0;
 
19813
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19814
 
 
19815
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19816
-                  * extent[rank-1];
 
19817
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19818
 
 
19819
       if (alloc_size == 0)
 
19820
        {
 
19821
@@ -495,7 +492,7 @@
 
19822
          return;
 
19823
        }
 
19824
       else
 
19825
-       retarray->base_addr = xmalloc (alloc_size);
 
19826
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19827
     }
 
19828
   else
 
19829
     {
 
19830
Index: libgfortran/generated/in_pack_i8.c
 
19831
===================================================================
 
19832
--- a/src/libgfortran/generated/in_pack_i8.c    (.../tags/gcc_4_8_3_release)
 
19833
+++ b/src/libgfortran/generated/in_pack_i8.c    (.../branches/gcc-4_8-branch)
 
19834
@@ -76,7 +76,7 @@
 
19835
     return source->base_addr;
 
19836
 
 
19837
   /* Allocate storage for the destination.  */
 
19838
-  destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
 
19839
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
 
19840
   dest = destptr;
 
19841
   src = source->base_addr;
 
19842
   stride0 = stride[0];
 
19843
Index: libgfortran/generated/transpose_r16.c
 
19844
===================================================================
 
19845
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
 
19846
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
 
19847
@@ -60,7 +60,8 @@
 
19848
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19849
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19850
 
 
19851
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
 
19852
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19853
+                                     sizeof (GFC_REAL_16));
 
19854
       ret->offset = 0;
 
19855
     } else if (unlikely (compile_options.bounds_check))
 
19856
     {
 
19857
Index: libgfortran/generated/minloc1_4_i4.c
 
19858
===================================================================
 
19859
--- a/src/libgfortran/generated/minloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
19860
+++ b/src/libgfortran/generated/minloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
19861
@@ -98,10 +98,9 @@
 
19862
       retarray->offset = 0;
 
19863
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19864
 
 
19865
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19866
-                  * extent[rank-1];
 
19867
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19868
 
 
19869
-      retarray->base_addr = xmalloc (alloc_size);
 
19870
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19871
       if (alloc_size == 0)
 
19872
        {
 
19873
          /* Make sure we have a zero-sized array.  */
 
19874
@@ -294,8 +293,7 @@
 
19875
 
 
19876
        }
 
19877
 
 
19878
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19879
-                  * extent[rank-1];
 
19880
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19881
 
 
19882
       retarray->offset = 0;
 
19883
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19884
@@ -307,7 +305,7 @@
 
19885
          return;
 
19886
        }
 
19887
       else
 
19888
-       retarray->base_addr = xmalloc (alloc_size);
 
19889
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19890
 
 
19891
     }
 
19892
   else
 
19893
@@ -485,8 +483,7 @@
 
19894
       retarray->offset = 0;
 
19895
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19896
 
 
19897
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19898
-                  * extent[rank-1];
 
19899
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19900
 
 
19901
       if (alloc_size == 0)
 
19902
        {
 
19903
@@ -495,7 +492,7 @@
 
19904
          return;
 
19905
        }
 
19906
       else
 
19907
-       retarray->base_addr = xmalloc (alloc_size);
 
19908
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19909
     }
 
19910
   else
 
19911
     {
 
19912
Index: libgfortran/generated/maxval_i1.c
 
19913
===================================================================
 
19914
--- a/src/libgfortran/generated/maxval_i1.c     (.../tags/gcc_4_8_3_release)
 
19915
+++ b/src/libgfortran/generated/maxval_i1.c     (.../branches/gcc-4_8-branch)
 
19916
@@ -97,10 +97,9 @@
 
19917
       retarray->offset = 0;
 
19918
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19919
 
 
19920
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19921
-                  * extent[rank-1];
 
19922
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19923
 
 
19924
-      retarray->base_addr = xmalloc (alloc_size);
 
19925
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19926
       if (alloc_size == 0)
 
19927
        {
 
19928
          /* Make sure we have a zero-sized array.  */
 
19929
@@ -286,8 +285,7 @@
 
19930
 
 
19931
        }
 
19932
 
 
19933
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19934
-                  * extent[rank-1];
 
19935
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19936
 
 
19937
       retarray->offset = 0;
 
19938
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19939
@@ -299,7 +297,7 @@
 
19940
          return;
 
19941
        }
 
19942
       else
 
19943
-       retarray->base_addr = xmalloc (alloc_size);
 
19944
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19945
 
 
19946
     }
 
19947
   else
 
19948
@@ -472,8 +470,7 @@
 
19949
       retarray->offset = 0;
 
19950
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19951
 
 
19952
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19953
-                  * extent[rank-1];
 
19954
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19955
 
 
19956
       if (alloc_size == 0)
 
19957
        {
 
19958
@@ -482,7 +479,7 @@
 
19959
          return;
 
19960
        }
 
19961
       else
 
19962
-       retarray->base_addr = xmalloc (alloc_size);
 
19963
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19964
     }
 
19965
   else
 
19966
     {
 
19967
Index: libgfortran/generated/product_c16.c
 
19968
===================================================================
 
19969
--- a/src/libgfortran/generated/product_c16.c   (.../tags/gcc_4_8_3_release)
 
19970
+++ b/src/libgfortran/generated/product_c16.c   (.../branches/gcc-4_8-branch)
 
19971
@@ -97,10 +97,9 @@
 
19972
       retarray->offset = 0;
 
19973
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19974
 
 
19975
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19976
-                  * extent[rank-1];
 
19977
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19978
 
 
19979
-      retarray->base_addr = xmalloc (alloc_size);
 
19980
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
19981
       if (alloc_size == 0)
 
19982
        {
 
19983
          /* Make sure we have a zero-sized array.  */
 
19984
@@ -272,8 +271,7 @@
 
19985
 
 
19986
        }
 
19987
 
 
19988
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19989
-                  * extent[rank-1];
 
19990
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19991
 
 
19992
       retarray->offset = 0;
 
19993
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19994
@@ -285,7 +283,7 @@
 
19995
          return;
 
19996
        }
 
19997
       else
 
19998
-       retarray->base_addr = xmalloc (alloc_size);
 
19999
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
20000
 
 
20001
     }
 
20002
   else
 
20003
@@ -430,8 +428,7 @@
 
20004
       retarray->offset = 0;
 
20005
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20006
 
 
20007
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20008
-                  * extent[rank-1];
 
20009
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20010
 
 
20011
       if (alloc_size == 0)
 
20012
        {
 
20013
@@ -440,7 +437,7 @@
 
20014
          return;
 
20015
        }
 
20016
       else
 
20017
-       retarray->base_addr = xmalloc (alloc_size);
 
20018
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
20019
     }
 
20020
   else
 
20021
     {
 
20022
Index: libgfortran/generated/reshape_r4.c
 
20023
===================================================================
 
20024
--- a/src/libgfortran/generated/reshape_r4.c    (.../tags/gcc_4_8_3_release)
 
20025
+++ b/src/libgfortran/generated/reshape_r4.c    (.../branches/gcc-4_8-branch)
 
20026
@@ -111,11 +111,11 @@
 
20027
       ret->offset = 0;
 
20028
 
 
20029
       if (unlikely (rs < 1))
 
20030
-        alloc_size = 1;
 
20031
+        alloc_size = 0;
 
20032
       else
 
20033
-        alloc_size = rs * sizeof (GFC_REAL_4);
 
20034
+        alloc_size = rs;
 
20035
 
 
20036
-      ret->base_addr = xmalloc (alloc_size);
 
20037
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
20038
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
20039
     }
 
20040
 
 
20041
Index: libgfortran/generated/iany_i8.c
 
20042
===================================================================
 
20043
--- a/src/libgfortran/generated/iany_i8.c       (.../tags/gcc_4_8_3_release)
 
20044
+++ b/src/libgfortran/generated/iany_i8.c       (.../branches/gcc-4_8-branch)
 
20045
@@ -97,10 +97,9 @@
 
20046
       retarray->offset = 0;
 
20047
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20048
 
 
20049
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20050
-                  * extent[rank-1];
 
20051
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20052
 
 
20053
-      retarray->base_addr = xmalloc (alloc_size);
 
20054
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20055
       if (alloc_size == 0)
 
20056
        {
 
20057
          /* Make sure we have a zero-sized array.  */
 
20058
@@ -272,8 +271,7 @@
 
20059
 
 
20060
        }
 
20061
 
 
20062
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20063
-                  * extent[rank-1];
 
20064
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20065
 
 
20066
       retarray->offset = 0;
 
20067
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20068
@@ -285,7 +283,7 @@
 
20069
          return;
 
20070
        }
 
20071
       else
 
20072
-       retarray->base_addr = xmalloc (alloc_size);
 
20073
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20074
 
 
20075
     }
 
20076
   else
 
20077
@@ -430,8 +428,7 @@
 
20078
       retarray->offset = 0;
 
20079
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20080
 
 
20081
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20082
-                  * extent[rank-1];
 
20083
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20084
 
 
20085
       if (alloc_size == 0)
 
20086
        {
 
20087
@@ -440,7 +437,7 @@
 
20088
          return;
 
20089
        }
 
20090
       else
 
20091
-       retarray->base_addr = xmalloc (alloc_size);
 
20092
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20093
     }
 
20094
   else
 
20095
     {
 
20096
Index: libgfortran/generated/cshift1_16.c
 
20097
===================================================================
 
20098
--- a/src/libgfortran/generated/cshift1_16.c    (.../tags/gcc_4_8_3_release)
 
20099
+++ b/src/libgfortran/generated/cshift1_16.c    (.../branches/gcc-4_8-branch)
 
20100
@@ -80,7 +80,7 @@
 
20101
     {
 
20102
       int i;
 
20103
 
 
20104
-      ret->base_addr = xmalloc (size * arraysize);
 
20105
+      ret->base_addr = xmallocarray (arraysize, size);
 
20106
       ret->offset = 0;
 
20107
       ret->dtype = array->dtype;
 
20108
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
20109
Index: libgfortran/generated/maxloc0_4_i1.c
 
20110
===================================================================
 
20111
--- a/src/libgfortran/generated/maxloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
20112
+++ b/src/libgfortran/generated/maxloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
20113
@@ -58,7 +58,7 @@
 
20114
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20115
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20116
       retarray->offset = 0;
 
20117
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20118
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20119
     }
 
20120
   else
 
20121
     {
 
20122
@@ -199,7 +199,7 @@
 
20123
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20124
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20125
       retarray->offset = 0;
 
20126
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20127
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20128
     }
 
20129
   else
 
20130
     {
 
20131
@@ -367,7 +367,7 @@
 
20132
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20133
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20134
       retarray->offset = 0;
 
20135
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20136
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20137
     }
 
20138
   else if (unlikely (compile_options.bounds_check))
 
20139
     {
 
20140
Index: libgfortran/generated/minloc0_4_i8.c
 
20141
===================================================================
 
20142
--- a/src/libgfortran/generated/minloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
20143
+++ b/src/libgfortran/generated/minloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
20144
@@ -58,7 +58,7 @@
 
20145
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20146
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20147
       retarray->offset = 0;
 
20148
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20149
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20150
     }
 
20151
   else
 
20152
     {
 
20153
@@ -199,7 +199,7 @@
 
20154
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20155
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20156
       retarray->offset = 0;
 
20157
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20158
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20159
     }
 
20160
   else
 
20161
     {
 
20162
@@ -367,7 +367,7 @@
 
20163
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20164
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20165
       retarray->offset = 0;
 
20166
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20167
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20168
     }
 
20169
   else if (unlikely (compile_options.bounds_check))
 
20170
     {
 
20171
Index: libgfortran/generated/spread_c16.c
 
20172
===================================================================
 
20173
--- a/src/libgfortran/generated/spread_c16.c    (.../tags/gcc_4_8_3_release)
 
20174
+++ b/src/libgfortran/generated/spread_c16.c    (.../branches/gcc-4_8-branch)
 
20175
@@ -101,8 +101,8 @@
 
20176
        }
 
20177
       ret->offset = 0;
 
20178
 
 
20179
-      /* xmalloc allocates a single byte for zero size.  */
 
20180
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
 
20181
+      /* xmallocarray allocates a single byte for zero size.  */
 
20182
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
 
20183
       if (rs <= 0)
 
20184
         return;
 
20185
     }
 
20186
@@ -244,7 +244,7 @@
 
20187
 
 
20188
   if (ret->base_addr == NULL)
 
20189
     {
 
20190
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
 
20191
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
 
20192
       ret->offset = 0;
 
20193
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
20194
     }
 
20195
Index: libgfortran/generated/maxval_r4.c
 
20196
===================================================================
 
20197
--- a/src/libgfortran/generated/maxval_r4.c     (.../tags/gcc_4_8_3_release)
 
20198
+++ b/src/libgfortran/generated/maxval_r4.c     (.../branches/gcc-4_8-branch)
 
20199
@@ -97,10 +97,9 @@
 
20200
       retarray->offset = 0;
 
20201
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20202
 
 
20203
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20204
-                  * extent[rank-1];
 
20205
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20206
 
 
20207
-      retarray->base_addr = xmalloc (alloc_size);
 
20208
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
20209
       if (alloc_size == 0)
 
20210
        {
 
20211
          /* Make sure we have a zero-sized array.  */
 
20212
@@ -286,8 +285,7 @@
 
20213
 
 
20214
        }
 
20215
 
 
20216
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20217
-                  * extent[rank-1];
 
20218
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20219
 
 
20220
       retarray->offset = 0;
 
20221
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20222
@@ -299,7 +297,7 @@
 
20223
          return;
 
20224
        }
 
20225
       else
 
20226
-       retarray->base_addr = xmalloc (alloc_size);
 
20227
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
20228
 
 
20229
     }
 
20230
   else
 
20231
@@ -472,8 +470,7 @@
 
20232
       retarray->offset = 0;
 
20233
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20234
 
 
20235
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20236
-                  * extent[rank-1];
 
20237
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20238
 
 
20239
       if (alloc_size == 0)
 
20240
        {
 
20241
@@ -482,7 +479,7 @@
 
20242
          return;
 
20243
        }
 
20244
       else
 
20245
-       retarray->base_addr = xmalloc (alloc_size);
 
20246
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
20247
     }
 
20248
   else
 
20249
     {
 
20250
Index: libgfortran/generated/minval_r8.c
 
20251
===================================================================
 
20252
--- a/src/libgfortran/generated/minval_r8.c     (.../tags/gcc_4_8_3_release)
 
20253
+++ b/src/libgfortran/generated/minval_r8.c     (.../branches/gcc-4_8-branch)
 
20254
@@ -97,10 +97,9 @@
 
20255
       retarray->offset = 0;
 
20256
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20257
 
 
20258
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20259
-                  * extent[rank-1];
 
20260
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20261
 
 
20262
-      retarray->base_addr = xmalloc (alloc_size);
 
20263
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
20264
       if (alloc_size == 0)
 
20265
        {
 
20266
          /* Make sure we have a zero-sized array.  */
 
20267
@@ -286,8 +285,7 @@
 
20268
 
 
20269
        }
 
20270
 
 
20271
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20272
-                  * extent[rank-1];
 
20273
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20274
 
 
20275
       retarray->offset = 0;
 
20276
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20277
@@ -299,7 +297,7 @@
 
20278
          return;
 
20279
        }
 
20280
       else
 
20281
-       retarray->base_addr = xmalloc (alloc_size);
 
20282
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
20283
 
 
20284
     }
 
20285
   else
 
20286
@@ -472,8 +470,7 @@
 
20287
       retarray->offset = 0;
 
20288
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20289
 
 
20290
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20291
-                  * extent[rank-1];
 
20292
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20293
 
 
20294
       if (alloc_size == 0)
 
20295
        {
 
20296
@@ -482,7 +479,7 @@
 
20297
          return;
 
20298
        }
 
20299
       else
 
20300
-       retarray->base_addr = xmalloc (alloc_size);
 
20301
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
20302
     }
 
20303
   else
 
20304
     {
 
20305
Index: libgfortran/generated/minloc1_16_r16.c
 
20306
===================================================================
 
20307
--- a/src/libgfortran/generated/minloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
20308
+++ b/src/libgfortran/generated/minloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
20309
@@ -98,10 +98,9 @@
 
20310
       retarray->offset = 0;
 
20311
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20312
 
 
20313
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20314
-                  * extent[rank-1];
 
20315
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20316
 
 
20317
-      retarray->base_addr = xmalloc (alloc_size);
 
20318
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20319
       if (alloc_size == 0)
 
20320
        {
 
20321
          /* Make sure we have a zero-sized array.  */
 
20322
@@ -294,8 +293,7 @@
 
20323
 
 
20324
        }
 
20325
 
 
20326
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20327
-                  * extent[rank-1];
 
20328
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20329
 
 
20330
       retarray->offset = 0;
 
20331
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20332
@@ -307,7 +305,7 @@
 
20333
          return;
 
20334
        }
 
20335
       else
 
20336
-       retarray->base_addr = xmalloc (alloc_size);
 
20337
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20338
 
 
20339
     }
 
20340
   else
 
20341
@@ -485,8 +483,7 @@
 
20342
       retarray->offset = 0;
 
20343
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20344
 
 
20345
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20346
-                  * extent[rank-1];
 
20347
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20348
 
 
20349
       if (alloc_size == 0)
 
20350
        {
 
20351
@@ -495,7 +492,7 @@
 
20352
          return;
 
20353
        }
 
20354
       else
 
20355
-       retarray->base_addr = xmalloc (alloc_size);
 
20356
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20357
     }
 
20358
   else
 
20359
     {
 
20360
Index: libgfortran/generated/unpack_i16.c
 
20361
===================================================================
 
20362
--- a/src/libgfortran/generated/unpack_i16.c    (.../tags/gcc_4_8_3_release)
 
20363
+++ b/src/libgfortran/generated/unpack_i16.c    (.../branches/gcc-4_8-branch)
 
20364
@@ -99,7 +99,7 @@
 
20365
          rs *= extent[n];
 
20366
        }
 
20367
       ret->offset = 0;
 
20368
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
20369
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
20370
     }
 
20371
   else
 
20372
     {
 
20373
@@ -244,7 +244,7 @@
 
20374
          rs *= extent[n];
 
20375
        }
 
20376
       ret->offset = 0;
 
20377
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
20378
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
20379
     }
 
20380
   else
 
20381
     {
 
20382
Index: libgfortran/generated/sum_i8.c
 
20383
===================================================================
 
20384
--- a/src/libgfortran/generated/sum_i8.c        (.../tags/gcc_4_8_3_release)
 
20385
+++ b/src/libgfortran/generated/sum_i8.c        (.../branches/gcc-4_8-branch)
 
20386
@@ -97,10 +97,9 @@
 
20387
       retarray->offset = 0;
 
20388
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20389
 
 
20390
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20391
-                  * extent[rank-1];
 
20392
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20393
 
 
20394
-      retarray->base_addr = xmalloc (alloc_size);
 
20395
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20396
       if (alloc_size == 0)
 
20397
        {
 
20398
          /* Make sure we have a zero-sized array.  */
 
20399
@@ -272,8 +271,7 @@
 
20400
 
 
20401
        }
 
20402
 
 
20403
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20404
-                  * extent[rank-1];
 
20405
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20406
 
 
20407
       retarray->offset = 0;
 
20408
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20409
@@ -285,7 +283,7 @@
 
20410
          return;
 
20411
        }
 
20412
       else
 
20413
-       retarray->base_addr = xmalloc (alloc_size);
 
20414
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20415
 
 
20416
     }
 
20417
   else
 
20418
@@ -430,8 +428,7 @@
 
20419
       retarray->offset = 0;
 
20420
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20421
 
 
20422
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20423
-                  * extent[rank-1];
 
20424
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20425
 
 
20426
       if (alloc_size == 0)
 
20427
        {
 
20428
@@ -440,7 +437,7 @@
 
20429
          return;
 
20430
        }
 
20431
       else
 
20432
-       retarray->base_addr = xmalloc (alloc_size);
 
20433
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20434
     }
 
20435
   else
 
20436
     {
 
20437
Index: libgfortran/generated/pack_i1.c
 
20438
===================================================================
 
20439
--- a/src/libgfortran/generated/pack_i1.c       (.../tags/gcc_4_8_3_release)
 
20440
+++ b/src/libgfortran/generated/pack_i1.c       (.../branches/gcc-4_8-branch)
 
20441
@@ -167,8 +167,8 @@
 
20442
 
 
20443
          ret->offset = 0;
 
20444
 
 
20445
-         /* xmalloc allocates a single byte for zero size.  */
 
20446
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
 
20447
+         /* xmallocarray allocates a single byte for zero size.  */
 
20448
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
 
20449
 
 
20450
          if (total == 0)
 
20451
            return;
 
20452
Index: libgfortran/generated/any_l16.c
 
20453
===================================================================
 
20454
--- a/src/libgfortran/generated/any_l16.c       (.../tags/gcc_4_8_3_release)
 
20455
+++ b/src/libgfortran/generated/any_l16.c       (.../branches/gcc-4_8-branch)
 
20456
@@ -101,8 +101,7 @@
 
20457
       retarray->offset = 0;
 
20458
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20459
 
 
20460
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20461
-                  * extent[rank-1];
 
20462
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20463
 
 
20464
       if (alloc_size == 0)
 
20465
        {
 
20466
@@ -111,7 +110,7 @@
 
20467
          return;
 
20468
        }
 
20469
       else
 
20470
-       retarray->base_addr = xmalloc (alloc_size);
 
20471
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
20472
     }
 
20473
   else
 
20474
     {
 
20475
Index: libgfortran/generated/spread_i8.c
 
20476
===================================================================
 
20477
--- a/src/libgfortran/generated/spread_i8.c     (.../tags/gcc_4_8_3_release)
 
20478
+++ b/src/libgfortran/generated/spread_i8.c     (.../branches/gcc-4_8-branch)
 
20479
@@ -101,8 +101,8 @@
 
20480
        }
 
20481
       ret->offset = 0;
 
20482
 
 
20483
-      /* xmalloc allocates a single byte for zero size.  */
 
20484
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
 
20485
+      /* xmallocarray allocates a single byte for zero size.  */
 
20486
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
 
20487
       if (rs <= 0)
 
20488
         return;
 
20489
     }
 
20490
@@ -244,7 +244,7 @@
 
20491
 
 
20492
   if (ret->base_addr == NULL)
 
20493
     {
 
20494
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
 
20495
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
 
20496
       ret->offset = 0;
 
20497
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
20498
     }
 
20499
Index: libgfortran/generated/maxval_i2.c
 
20500
===================================================================
 
20501
--- a/src/libgfortran/generated/maxval_i2.c     (.../tags/gcc_4_8_3_release)
 
20502
+++ b/src/libgfortran/generated/maxval_i2.c     (.../branches/gcc-4_8-branch)
 
20503
@@ -97,10 +97,9 @@
 
20504
       retarray->offset = 0;
 
20505
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20506
 
 
20507
-      alloc_size = sizeof (GFC_INTEGER_2) * 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->base_addr = xmalloc (alloc_size);
 
20512
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
20513
       if (alloc_size == 0)
 
20514
        {
 
20515
          /* Make sure we have a zero-sized array.  */
 
20516
@@ -286,8 +285,7 @@
 
20517
 
 
20518
        }
 
20519
 
 
20520
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20521
-                  * extent[rank-1];
 
20522
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20523
 
 
20524
       retarray->offset = 0;
 
20525
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20526
@@ -299,7 +297,7 @@
 
20527
          return;
 
20528
        }
 
20529
       else
 
20530
-       retarray->base_addr = xmalloc (alloc_size);
 
20531
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
20532
 
 
20533
     }
 
20534
   else
 
20535
@@ -472,8 +470,7 @@
 
20536
       retarray->offset = 0;
 
20537
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20538
 
 
20539
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20540
-                  * extent[rank-1];
 
20541
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20542
 
 
20543
       if (alloc_size == 0)
 
20544
        {
 
20545
@@ -482,7 +479,7 @@
 
20546
          return;
 
20547
        }
 
20548
       else
 
20549
-       retarray->base_addr = xmalloc (alloc_size);
 
20550
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
20551
     }
 
20552
   else
 
20553
     {
 
20554
Index: libgfortran/generated/maxloc1_8_i4.c
 
20555
===================================================================
 
20556
--- a/src/libgfortran/generated/maxloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
20557
+++ b/src/libgfortran/generated/maxloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
20558
@@ -98,10 +98,9 @@
 
20559
       retarray->offset = 0;
 
20560
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20561
 
 
20562
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20563
-                  * extent[rank-1];
 
20564
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20565
 
 
20566
-      retarray->base_addr = xmalloc (alloc_size);
 
20567
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20568
       if (alloc_size == 0)
 
20569
        {
 
20570
          /* Make sure we have a zero-sized array.  */
 
20571
@@ -294,8 +293,7 @@
 
20572
 
 
20573
        }
 
20574
 
 
20575
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20576
-                  * extent[rank-1];
 
20577
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20578
 
 
20579
       retarray->offset = 0;
 
20580
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20581
@@ -307,7 +305,7 @@
 
20582
          return;
 
20583
        }
 
20584
       else
 
20585
-       retarray->base_addr = xmalloc (alloc_size);
 
20586
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20587
 
 
20588
     }
 
20589
   else
 
20590
@@ -485,8 +483,7 @@
 
20591
       retarray->offset = 0;
 
20592
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20593
 
 
20594
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20595
-                  * extent[rank-1];
 
20596
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20597
 
 
20598
       if (alloc_size == 0)
 
20599
        {
 
20600
@@ -495,7 +492,7 @@
 
20601
          return;
 
20602
        }
 
20603
       else
 
20604
-       retarray->base_addr = xmalloc (alloc_size);
 
20605
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20606
     }
 
20607
   else
 
20608
     {
 
20609
Index: libgfortran/generated/unpack_r8.c
 
20610
===================================================================
 
20611
--- a/src/libgfortran/generated/unpack_r8.c     (.../tags/gcc_4_8_3_release)
 
20612
+++ b/src/libgfortran/generated/unpack_r8.c     (.../branches/gcc-4_8-branch)
 
20613
@@ -99,7 +99,7 @@
 
20614
          rs *= extent[n];
 
20615
        }
 
20616
       ret->offset = 0;
 
20617
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
20618
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
20619
     }
 
20620
   else
 
20621
     {
 
20622
@@ -244,7 +244,7 @@
 
20623
          rs *= extent[n];
 
20624
        }
 
20625
       ret->offset = 0;
 
20626
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
20627
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
20628
     }
 
20629
   else
 
20630
     {
 
20631
Index: libgfortran/generated/maxloc0_4_r4.c
 
20632
===================================================================
 
20633
--- a/src/libgfortran/generated/maxloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
20634
+++ b/src/libgfortran/generated/maxloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
20635
@@ -58,7 +58,7 @@
 
20636
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20637
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20638
       retarray->offset = 0;
 
20639
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20640
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20641
     }
 
20642
   else
 
20643
     {
 
20644
@@ -199,7 +199,7 @@
 
20645
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20646
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20647
       retarray->offset = 0;
 
20648
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20649
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20650
     }
 
20651
   else
 
20652
     {
 
20653
@@ -367,7 +367,7 @@
 
20654
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20655
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20656
       retarray->offset = 0;
 
20657
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20658
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20659
     }
 
20660
   else if (unlikely (compile_options.bounds_check))
 
20661
     {
 
20662
Index: libgfortran/generated/all_l1.c
 
20663
===================================================================
 
20664
--- a/src/libgfortran/generated/all_l1.c        (.../tags/gcc_4_8_3_release)
 
20665
+++ b/src/libgfortran/generated/all_l1.c        (.../branches/gcc-4_8-branch)
 
20666
@@ -101,8 +101,7 @@
 
20667
       retarray->offset = 0;
 
20668
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20669
 
 
20670
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20671
-                  * extent[rank-1];
 
20672
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20673
 
 
20674
       if (alloc_size == 0)
 
20675
        {
 
20676
@@ -111,7 +110,7 @@
 
20677
          return;
 
20678
        }
 
20679
       else
 
20680
-       retarray->base_addr = xmalloc (alloc_size);
 
20681
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
20682
     }
 
20683
   else
 
20684
     {
 
20685
Index: libgfortran/generated/matmul_r8.c
 
20686
===================================================================
 
20687
--- a/src/libgfortran/generated/matmul_r8.c     (.../tags/gcc_4_8_3_release)
 
20688
+++ b/src/libgfortran/generated/matmul_r8.c     (.../branches/gcc-4_8-branch)
 
20689
@@ -124,7 +124,7 @@
 
20690
         }
 
20691
 
 
20692
       retarray->base_addr
 
20693
-       = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
 
20694
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
 
20695
       retarray->offset = 0;
 
20696
     }
 
20697
     else if (unlikely (compile_options.bounds_check))
 
20698
Index: libgfortran/generated/minloc0_4_r16.c
 
20699
===================================================================
 
20700
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
20701
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
20702
@@ -58,7 +58,7 @@
 
20703
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20704
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20705
       retarray->offset = 0;
 
20706
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20707
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20708
     }
 
20709
   else
 
20710
     {
 
20711
@@ -199,7 +199,7 @@
 
20712
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20713
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20714
       retarray->offset = 0;
 
20715
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20716
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20717
     }
 
20718
   else
 
20719
     {
 
20720
@@ -367,7 +367,7 @@
 
20721
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20722
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20723
       retarray->offset = 0;
 
20724
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20725
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20726
     }
 
20727
   else if (unlikely (compile_options.bounds_check))
 
20728
     {
 
20729
Index: libgfortran/generated/maxloc0_4_i2.c
 
20730
===================================================================
 
20731
--- a/src/libgfortran/generated/maxloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
20732
+++ b/src/libgfortran/generated/maxloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
20733
@@ -58,7 +58,7 @@
 
20734
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20735
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20736
       retarray->offset = 0;
 
20737
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20738
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20739
     }
 
20740
   else
 
20741
     {
 
20742
@@ -199,7 +199,7 @@
 
20743
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20744
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20745
       retarray->offset = 0;
 
20746
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20747
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20748
     }
 
20749
   else
 
20750
     {
 
20751
@@ -367,7 +367,7 @@
 
20752
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20753
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20754
       retarray->offset = 0;
 
20755
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20756
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20757
     }
 
20758
   else if (unlikely (compile_options.bounds_check))
 
20759
     {
 
20760
Index: libgfortran/generated/minloc1_8_r16.c
 
20761
===================================================================
 
20762
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
20763
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
20764
@@ -98,10 +98,9 @@
 
20765
       retarray->offset = 0;
 
20766
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20767
 
 
20768
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20769
-                  * extent[rank-1];
 
20770
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20771
 
 
20772
-      retarray->base_addr = xmalloc (alloc_size);
 
20773
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20774
       if (alloc_size == 0)
 
20775
        {
 
20776
          /* Make sure we have a zero-sized array.  */
 
20777
@@ -294,8 +293,7 @@
 
20778
 
 
20779
        }
 
20780
 
 
20781
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20782
-                  * extent[rank-1];
 
20783
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20784
 
 
20785
       retarray->offset = 0;
 
20786
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20787
@@ -307,7 +305,7 @@
 
20788
          return;
 
20789
        }
 
20790
       else
 
20791
-       retarray->base_addr = xmalloc (alloc_size);
 
20792
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20793
 
 
20794
     }
 
20795
   else
 
20796
@@ -485,8 +483,7 @@
 
20797
       retarray->offset = 0;
 
20798
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20799
 
 
20800
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20801
-                  * extent[rank-1];
 
20802
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20803
 
 
20804
       if (alloc_size == 0)
 
20805
        {
 
20806
@@ -495,7 +492,7 @@
 
20807
          return;
 
20808
        }
 
20809
       else
 
20810
-       retarray->base_addr = xmalloc (alloc_size);
 
20811
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20812
     }
 
20813
   else
 
20814
     {
 
20815
Index: libgfortran/generated/pack_c10.c
 
20816
===================================================================
 
20817
--- a/src/libgfortran/generated/pack_c10.c      (.../tags/gcc_4_8_3_release)
 
20818
+++ b/src/libgfortran/generated/pack_c10.c      (.../branches/gcc-4_8-branch)
 
20819
@@ -167,8 +167,8 @@
 
20820
 
 
20821
          ret->offset = 0;
 
20822
 
 
20823
-         /* xmalloc allocates a single byte for zero size.  */
 
20824
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
 
20825
+         /* xmallocarray allocates a single byte for zero size.  */
 
20826
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
 
20827
 
 
20828
          if (total == 0)
 
20829
            return;
 
20830
Index: libgfortran/generated/pack_r4.c
 
20831
===================================================================
 
20832
--- a/src/libgfortran/generated/pack_r4.c       (.../tags/gcc_4_8_3_release)
 
20833
+++ b/src/libgfortran/generated/pack_r4.c       (.../branches/gcc-4_8-branch)
 
20834
@@ -167,8 +167,8 @@
 
20835
 
 
20836
          ret->offset = 0;
 
20837
 
 
20838
-         /* xmalloc allocates a single byte for zero size.  */
 
20839
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
 
20840
+         /* xmallocarray allocates a single byte for zero size.  */
 
20841
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
 
20842
 
 
20843
          if (total == 0)
 
20844
            return;
 
20845
Index: libgfortran/generated/transpose_c16.c
 
20846
===================================================================
 
20847
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
 
20848
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
 
20849
@@ -60,7 +60,8 @@
 
20850
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
20851
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
20852
 
 
20853
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
 
20854
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
20855
+                                     sizeof (GFC_COMPLEX_16));
 
20856
       ret->offset = 0;
 
20857
     } else if (unlikely (compile_options.bounds_check))
 
20858
     {
 
20859
Index: libgfortran/generated/maxloc0_8_i8.c
 
20860
===================================================================
 
20861
--- a/src/libgfortran/generated/maxloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
20862
+++ b/src/libgfortran/generated/maxloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
20863
@@ -58,7 +58,7 @@
 
20864
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20865
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20866
       retarray->offset = 0;
 
20867
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20868
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20869
     }
 
20870
   else
 
20871
     {
 
20872
@@ -199,7 +199,7 @@
 
20873
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20874
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20875
       retarray->offset = 0;
 
20876
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20877
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20878
     }
 
20879
   else
 
20880
     {
 
20881
@@ -367,7 +367,7 @@
 
20882
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20883
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20884
       retarray->offset = 0;
 
20885
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20886
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20887
     }
 
20888
   else if (unlikely (compile_options.bounds_check))
 
20889
     {
 
20890
Index: libgfortran/generated/minloc1_4_r8.c
 
20891
===================================================================
 
20892
--- a/src/libgfortran/generated/minloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
20893
+++ b/src/libgfortran/generated/minloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
20894
@@ -98,10 +98,9 @@
 
20895
       retarray->offset = 0;
 
20896
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20897
 
 
20898
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20899
-                  * extent[rank-1];
 
20900
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20901
 
 
20902
-      retarray->base_addr = xmalloc (alloc_size);
 
20903
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20904
       if (alloc_size == 0)
 
20905
        {
 
20906
          /* Make sure we have a zero-sized array.  */
 
20907
@@ -294,8 +293,7 @@
 
20908
 
 
20909
        }
 
20910
 
 
20911
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20912
-                  * extent[rank-1];
 
20913
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20914
 
 
20915
       retarray->offset = 0;
 
20916
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20917
@@ -307,7 +305,7 @@
 
20918
          return;
 
20919
        }
 
20920
       else
 
20921
-       retarray->base_addr = xmalloc (alloc_size);
 
20922
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20923
 
 
20924
     }
 
20925
   else
 
20926
@@ -485,8 +483,7 @@
 
20927
       retarray->offset = 0;
 
20928
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20929
 
 
20930
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20931
-                  * extent[rank-1];
 
20932
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20933
 
 
20934
       if (alloc_size == 0)
 
20935
        {
 
20936
@@ -495,7 +492,7 @@
 
20937
          return;
 
20938
        }
 
20939
       else
 
20940
-       retarray->base_addr = xmalloc (alloc_size);
 
20941
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20942
     }
 
20943
   else
 
20944
     {
 
20945
Index: libgfortran/generated/minloc1_16_i4.c
 
20946
===================================================================
 
20947
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
20948
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
20949
@@ -98,10 +98,9 @@
 
20950
       retarray->offset = 0;
 
20951
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20952
 
 
20953
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20954
-                  * extent[rank-1];
 
20955
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20956
 
 
20957
-      retarray->base_addr = xmalloc (alloc_size);
 
20958
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20959
       if (alloc_size == 0)
 
20960
        {
 
20961
          /* Make sure we have a zero-sized array.  */
 
20962
@@ -294,8 +293,7 @@
 
20963
 
 
20964
        }
 
20965
 
 
20966
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20967
-                  * extent[rank-1];
 
20968
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20969
 
 
20970
       retarray->offset = 0;
 
20971
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20972
@@ -307,7 +305,7 @@
 
20973
          return;
 
20974
        }
 
20975
       else
 
20976
-       retarray->base_addr = xmalloc (alloc_size);
 
20977
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20978
 
 
20979
     }
 
20980
   else
 
20981
@@ -485,8 +483,7 @@
 
20982
       retarray->offset = 0;
 
20983
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20984
 
 
20985
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20986
-                  * extent[rank-1];
 
20987
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20988
 
 
20989
       if (alloc_size == 0)
 
20990
        {
 
20991
@@ -495,7 +492,7 @@
 
20992
          return;
 
20993
        }
 
20994
       else
 
20995
-       retarray->base_addr = xmalloc (alloc_size);
 
20996
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20997
     }
 
20998
   else
 
20999
     {
 
21000
Index: libgfortran/generated/minloc0_16_i8.c
 
21001
===================================================================
 
21002
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
21003
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
21004
@@ -58,7 +58,7 @@
 
21005
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21006
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21007
       retarray->offset = 0;
 
21008
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21009
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21010
     }
 
21011
   else
 
21012
     {
 
21013
@@ -199,7 +199,7 @@
 
21014
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21015
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21016
       retarray->offset = 0;
 
21017
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21018
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21019
     }
 
21020
   else
 
21021
     {
 
21022
@@ -367,7 +367,7 @@
 
21023
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21024
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21025
       retarray->offset = 0;
 
21026
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21027
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21028
     }
 
21029
   else if (unlikely (compile_options.bounds_check))
 
21030
     {
 
21031
Index: libgfortran/generated/pack_i2.c
 
21032
===================================================================
 
21033
--- a/src/libgfortran/generated/pack_i2.c       (.../tags/gcc_4_8_3_release)
 
21034
+++ b/src/libgfortran/generated/pack_i2.c       (.../branches/gcc-4_8-branch)
 
21035
@@ -167,8 +167,8 @@
 
21036
 
 
21037
          ret->offset = 0;
 
21038
 
 
21039
-         /* xmalloc allocates a single byte for zero size.  */
 
21040
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
 
21041
+         /* xmallocarray allocates a single byte for zero size.  */
 
21042
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
 
21043
 
 
21044
          if (total == 0)
 
21045
            return;
 
21046
Index: libgfortran/generated/transpose_i8.c
 
21047
===================================================================
 
21048
--- a/src/libgfortran/generated/transpose_i8.c  (.../tags/gcc_4_8_3_release)
 
21049
+++ b/src/libgfortran/generated/transpose_i8.c  (.../branches/gcc-4_8-branch)
 
21050
@@ -60,7 +60,8 @@
 
21051
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
21052
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
21053
 
 
21054
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
 
21055
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
21056
+                                     sizeof (GFC_INTEGER_8));
 
21057
       ret->offset = 0;
 
21058
     } else if (unlikely (compile_options.bounds_check))
 
21059
     {
 
21060
Index: libgfortran/generated/eoshift1_16.c
 
21061
===================================================================
 
21062
--- a/src/libgfortran/generated/eoshift1_16.c   (.../tags/gcc_4_8_3_release)
 
21063
+++ b/src/libgfortran/generated/eoshift1_16.c   (.../branches/gcc-4_8-branch)
 
21064
@@ -105,8 +105,8 @@
 
21065
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
21066
 
 
21067
         }
 
21068
-      /* xmalloc allocates a single byte for zero size.  */
 
21069
-      ret->base_addr = xmalloc (size * arraysize);
 
21070
+      /* xmallocarray allocates a single byte for zero size.  */
 
21071
+      ret->base_addr = xmallocarray (arraysize, size);
 
21072
 
 
21073
     }
 
21074
   else if (unlikely (compile_options.bounds_check))
 
21075
Index: libgfortran/generated/all_l2.c
 
21076
===================================================================
 
21077
--- a/src/libgfortran/generated/all_l2.c        (.../tags/gcc_4_8_3_release)
 
21078
+++ b/src/libgfortran/generated/all_l2.c        (.../branches/gcc-4_8-branch)
 
21079
@@ -101,8 +101,7 @@
 
21080
       retarray->offset = 0;
 
21081
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21082
 
 
21083
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21084
-                  * extent[rank-1];
 
21085
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21086
 
 
21087
       if (alloc_size == 0)
 
21088
        {
 
21089
@@ -111,7 +110,7 @@
 
21090
          return;
 
21091
        }
 
21092
       else
 
21093
-       retarray->base_addr = xmalloc (alloc_size);
 
21094
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
21095
     }
 
21096
   else
 
21097
     {
 
21098
Index: libgfortran/generated/product_c4.c
 
21099
===================================================================
 
21100
--- a/src/libgfortran/generated/product_c4.c    (.../tags/gcc_4_8_3_release)
 
21101
+++ b/src/libgfortran/generated/product_c4.c    (.../branches/gcc-4_8-branch)
 
21102
@@ -97,10 +97,9 @@
 
21103
       retarray->offset = 0;
 
21104
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21105
 
 
21106
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21107
-                  * extent[rank-1];
 
21108
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21109
 
 
21110
-      retarray->base_addr = xmalloc (alloc_size);
 
21111
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21112
       if (alloc_size == 0)
 
21113
        {
 
21114
          /* Make sure we have a zero-sized array.  */
 
21115
@@ -272,8 +271,7 @@
 
21116
 
 
21117
        }
 
21118
 
 
21119
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21120
-                  * extent[rank-1];
 
21121
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21122
 
 
21123
       retarray->offset = 0;
 
21124
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21125
@@ -285,7 +283,7 @@
 
21126
          return;
 
21127
        }
 
21128
       else
 
21129
-       retarray->base_addr = xmalloc (alloc_size);
 
21130
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21131
 
 
21132
     }
 
21133
   else
 
21134
@@ -430,8 +428,7 @@
 
21135
       retarray->offset = 0;
 
21136
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21137
 
 
21138
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21139
-                  * extent[rank-1];
 
21140
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21141
 
 
21142
       if (alloc_size == 0)
 
21143
        {
 
21144
@@ -440,7 +437,7 @@
 
21145
          return;
 
21146
        }
 
21147
       else
 
21148
-       retarray->base_addr = xmalloc (alloc_size);
 
21149
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21150
     }
 
21151
   else
 
21152
     {
 
21153
Index: libgfortran/generated/iall_i1.c
 
21154
===================================================================
 
21155
--- a/src/libgfortran/generated/iall_i1.c       (.../tags/gcc_4_8_3_release)
 
21156
+++ b/src/libgfortran/generated/iall_i1.c       (.../branches/gcc-4_8-branch)
 
21157
@@ -97,10 +97,9 @@
 
21158
       retarray->offset = 0;
 
21159
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21160
 
 
21161
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21162
-                  * extent[rank-1];
 
21163
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21164
 
 
21165
-      retarray->base_addr = xmalloc (alloc_size);
 
21166
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
21167
       if (alloc_size == 0)
 
21168
        {
 
21169
          /* Make sure we have a zero-sized array.  */
 
21170
@@ -272,8 +271,7 @@
 
21171
 
 
21172
        }
 
21173
 
 
21174
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21175
-                  * extent[rank-1];
 
21176
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21177
 
 
21178
       retarray->offset = 0;
 
21179
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21180
@@ -285,7 +283,7 @@
 
21181
          return;
 
21182
        }
 
21183
       else
 
21184
-       retarray->base_addr = xmalloc (alloc_size);
 
21185
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
21186
 
 
21187
     }
 
21188
   else
 
21189
@@ -430,8 +428,7 @@
 
21190
       retarray->offset = 0;
 
21191
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21192
 
 
21193
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21194
-                  * extent[rank-1];
 
21195
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21196
 
 
21197
       if (alloc_size == 0)
 
21198
        {
 
21199
@@ -440,7 +437,7 @@
 
21200
          return;
 
21201
        }
 
21202
       else
 
21203
-       retarray->base_addr = xmalloc (alloc_size);
 
21204
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
21205
     }
 
21206
   else
 
21207
     {
 
21208
Index: libgfortran/generated/reshape_i4.c
 
21209
===================================================================
 
21210
--- a/src/libgfortran/generated/reshape_i4.c    (.../tags/gcc_4_8_3_release)
 
21211
+++ b/src/libgfortran/generated/reshape_i4.c    (.../branches/gcc-4_8-branch)
 
21212
@@ -111,11 +111,11 @@
 
21213
       ret->offset = 0;
 
21214
 
 
21215
       if (unlikely (rs < 1))
 
21216
-        alloc_size = 1;
 
21217
+        alloc_size = 0;
 
21218
       else
 
21219
-        alloc_size = rs * sizeof (GFC_INTEGER_4);
 
21220
+        alloc_size = rs;
 
21221
 
 
21222
-      ret->base_addr = xmalloc (alloc_size);
 
21223
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21224
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
21225
     }
 
21226
 
 
21227
Index: libgfortran/generated/in_pack_r10.c
 
21228
===================================================================
 
21229
--- a/src/libgfortran/generated/in_pack_r10.c   (.../tags/gcc_4_8_3_release)
 
21230
+++ b/src/libgfortran/generated/in_pack_r10.c   (.../branches/gcc-4_8-branch)
 
21231
@@ -76,7 +76,7 @@
 
21232
     return source->base_addr;
 
21233
 
 
21234
   /* Allocate storage for the destination.  */
 
21235
-  destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
 
21236
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
 
21237
   dest = destptr;
 
21238
   src = source->base_addr;
 
21239
   stride0 = stride[0];
 
21240
Index: libgfortran/generated/in_pack_c4.c
 
21241
===================================================================
 
21242
--- a/src/libgfortran/generated/in_pack_c4.c    (.../tags/gcc_4_8_3_release)
 
21243
+++ b/src/libgfortran/generated/in_pack_c4.c    (.../branches/gcc-4_8-branch)
 
21244
@@ -76,7 +76,7 @@
 
21245
     return source->base_addr;
 
21246
 
 
21247
   /* Allocate storage for the destination.  */
 
21248
-  destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
 
21249
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
 
21250
   dest = destptr;
 
21251
   src = source->base_addr;
 
21252
   stride0 = stride[0];
 
21253
Index: libgfortran/generated/all_l16.c
 
21254
===================================================================
 
21255
--- a/src/libgfortran/generated/all_l16.c       (.../tags/gcc_4_8_3_release)
 
21256
+++ b/src/libgfortran/generated/all_l16.c       (.../branches/gcc-4_8-branch)
 
21257
@@ -101,8 +101,7 @@
 
21258
       retarray->offset = 0;
 
21259
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21260
 
 
21261
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21262
-                  * extent[rank-1];
 
21263
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21264
 
 
21265
       if (alloc_size == 0)
 
21266
        {
 
21267
@@ -111,7 +110,7 @@
 
21268
          return;
 
21269
        }
 
21270
       else
 
21271
-       retarray->base_addr = xmalloc (alloc_size);
 
21272
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
21273
     }
 
21274
   else
 
21275
     {
 
21276
Index: libgfortran/generated/maxloc0_16_i1.c
 
21277
===================================================================
 
21278
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
21279
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
21280
@@ -58,7 +58,7 @@
 
21281
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21282
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21283
       retarray->offset = 0;
 
21284
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21285
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21286
     }
 
21287
   else
 
21288
     {
 
21289
@@ -199,7 +199,7 @@
 
21290
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21291
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21292
       retarray->offset = 0;
 
21293
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21294
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21295
     }
 
21296
   else
 
21297
     {
 
21298
@@ -367,7 +367,7 @@
 
21299
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21300
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21301
       retarray->offset = 0;
 
21302
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21303
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21304
     }
 
21305
   else if (unlikely (compile_options.bounds_check))
 
21306
     {
 
21307
Index: libgfortran/generated/maxloc1_8_r8.c
 
21308
===================================================================
 
21309
--- a/src/libgfortran/generated/maxloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
21310
+++ b/src/libgfortran/generated/maxloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
21311
@@ -98,10 +98,9 @@
 
21312
       retarray->offset = 0;
 
21313
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21314
 
 
21315
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21316
-                  * extent[rank-1];
 
21317
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21318
 
 
21319
-      retarray->base_addr = xmalloc (alloc_size);
 
21320
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21321
       if (alloc_size == 0)
 
21322
        {
 
21323
          /* Make sure we have a zero-sized array.  */
 
21324
@@ -294,8 +293,7 @@
 
21325
 
 
21326
        }
 
21327
 
 
21328
-      alloc_size = sizeof (GFC_INTEGER_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
       retarray->offset = 0;
 
21333
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21334
@@ -307,7 +305,7 @@
 
21335
          return;
 
21336
        }
 
21337
       else
 
21338
-       retarray->base_addr = xmalloc (alloc_size);
 
21339
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21340
 
 
21341
     }
 
21342
   else
 
21343
@@ -485,8 +483,7 @@
 
21344
       retarray->offset = 0;
 
21345
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21346
 
 
21347
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21348
-                  * extent[rank-1];
 
21349
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21350
 
 
21351
       if (alloc_size == 0)
 
21352
        {
 
21353
@@ -495,7 +492,7 @@
 
21354
          return;
 
21355
        }
 
21356
       else
 
21357
-       retarray->base_addr = xmalloc (alloc_size);
 
21358
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21359
     }
 
21360
   else
 
21361
     {
 
21362
Index: libgfortran/generated/minval_i16.c
 
21363
===================================================================
 
21364
--- a/src/libgfortran/generated/minval_i16.c    (.../tags/gcc_4_8_3_release)
 
21365
+++ b/src/libgfortran/generated/minval_i16.c    (.../branches/gcc-4_8-branch)
 
21366
@@ -97,10 +97,9 @@
 
21367
       retarray->offset = 0;
 
21368
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21369
 
 
21370
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21371
-                  * extent[rank-1];
 
21372
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21373
 
 
21374
-      retarray->base_addr = xmalloc (alloc_size);
 
21375
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21376
       if (alloc_size == 0)
 
21377
        {
 
21378
          /* Make sure we have a zero-sized array.  */
 
21379
@@ -286,8 +285,7 @@
 
21380
 
 
21381
        }
 
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
       retarray->offset = 0;
 
21388
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21389
@@ -299,7 +297,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
     }
 
21397
   else
 
21398
@@ -472,8 +470,7 @@
 
21399
       retarray->offset = 0;
 
21400
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21401
 
 
21402
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21403
-                  * extent[rank-1];
 
21404
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21405
 
 
21406
       if (alloc_size == 0)
 
21407
        {
 
21408
@@ -482,7 +479,7 @@
 
21409
          return;
 
21410
        }
 
21411
       else
 
21412
-       retarray->base_addr = xmalloc (alloc_size);
 
21413
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21414
     }
 
21415
   else
 
21416
     {
 
21417
Index: libgfortran/generated/reshape_r10.c
 
21418
===================================================================
 
21419
--- a/src/libgfortran/generated/reshape_r10.c   (.../tags/gcc_4_8_3_release)
 
21420
+++ b/src/libgfortran/generated/reshape_r10.c   (.../branches/gcc-4_8-branch)
 
21421
@@ -111,11 +111,11 @@
 
21422
       ret->offset = 0;
 
21423
 
 
21424
       if (unlikely (rs < 1))
 
21425
-        alloc_size = 1;
 
21426
+        alloc_size = 0;
 
21427
       else
 
21428
-        alloc_size = rs * sizeof (GFC_REAL_10);
 
21429
+        alloc_size = rs;
 
21430
 
 
21431
-      ret->base_addr = xmalloc (alloc_size);
 
21432
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21433
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
21434
     }
 
21435
 
 
21436
Index: libgfortran/generated/unpack_r16.c
 
21437
===================================================================
 
21438
--- a/src/libgfortran/generated/unpack_r16.c    (.../tags/gcc_4_8_3_release)
 
21439
+++ b/src/libgfortran/generated/unpack_r16.c    (.../branches/gcc-4_8-branch)
 
21440
@@ -99,7 +99,7 @@
 
21441
          rs *= extent[n];
 
21442
        }
 
21443
       ret->offset = 0;
 
21444
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
21445
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
21446
     }
 
21447
   else
 
21448
     {
 
21449
@@ -244,7 +244,7 @@
 
21450
          rs *= extent[n];
 
21451
        }
 
21452
       ret->offset = 0;
 
21453
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
21454
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
21455
     }
 
21456
   else
 
21457
     {
 
21458
Index: libgfortran/generated/maxval_i4.c
 
21459
===================================================================
 
21460
--- a/src/libgfortran/generated/maxval_i4.c     (.../tags/gcc_4_8_3_release)
 
21461
+++ b/src/libgfortran/generated/maxval_i4.c     (.../branches/gcc-4_8-branch)
 
21462
@@ -97,10 +97,9 @@
 
21463
       retarray->offset = 0;
 
21464
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21465
 
 
21466
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21467
-                  * extent[rank-1];
 
21468
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21469
 
 
21470
-      retarray->base_addr = xmalloc (alloc_size);
 
21471
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21472
       if (alloc_size == 0)
 
21473
        {
 
21474
          /* Make sure we have a zero-sized array.  */
 
21475
@@ -286,8 +285,7 @@
 
21476
 
 
21477
        }
 
21478
 
 
21479
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21480
-                  * extent[rank-1];
 
21481
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21482
 
 
21483
       retarray->offset = 0;
 
21484
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21485
@@ -299,7 +297,7 @@
 
21486
          return;
 
21487
        }
 
21488
       else
 
21489
-       retarray->base_addr = xmalloc (alloc_size);
 
21490
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21491
 
 
21492
     }
 
21493
   else
 
21494
@@ -472,8 +470,7 @@
 
21495
       retarray->offset = 0;
 
21496
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21497
 
 
21498
-      alloc_size = sizeof (GFC_INTEGER_4) * 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
@@ -482,7 +479,7 @@
 
21505
          return;
 
21506
        }
 
21507
       else
 
21508
-       retarray->base_addr = xmalloc (alloc_size);
 
21509
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21510
     }
 
21511
   else
 
21512
     {
 
21513
Index: libgfortran/generated/minval_i8.c
 
21514
===================================================================
 
21515
--- a/src/libgfortran/generated/minval_i8.c     (.../tags/gcc_4_8_3_release)
 
21516
+++ b/src/libgfortran/generated/minval_i8.c     (.../branches/gcc-4_8-branch)
 
21517
@@ -97,10 +97,9 @@
 
21518
       retarray->offset = 0;
 
21519
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21520
 
 
21521
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21522
-                  * extent[rank-1];
 
21523
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21524
 
 
21525
-      retarray->base_addr = xmalloc (alloc_size);
 
21526
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21527
       if (alloc_size == 0)
 
21528
        {
 
21529
          /* Make sure we have a zero-sized array.  */
 
21530
@@ -286,8 +285,7 @@
 
21531
 
 
21532
        }
 
21533
 
 
21534
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21535
-                  * extent[rank-1];
 
21536
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21537
 
 
21538
       retarray->offset = 0;
 
21539
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21540
@@ -299,7 +297,7 @@
 
21541
          return;
 
21542
        }
 
21543
       else
 
21544
-       retarray->base_addr = xmalloc (alloc_size);
 
21545
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21546
 
 
21547
     }
 
21548
   else
 
21549
@@ -472,8 +470,7 @@
 
21550
       retarray->offset = 0;
 
21551
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21552
 
 
21553
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21554
-                  * extent[rank-1];
 
21555
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21556
 
 
21557
       if (alloc_size == 0)
 
21558
        {
 
21559
@@ -482,7 +479,7 @@
 
21560
          return;
 
21561
        }
 
21562
       else
 
21563
-       retarray->base_addr = xmalloc (alloc_size);
 
21564
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21565
     }
 
21566
   else
 
21567
     {
 
21568
Index: libgfortran/generated/maxloc0_16_i16.c
 
21569
===================================================================
 
21570
--- a/src/libgfortran/generated/maxloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
21571
+++ b/src/libgfortran/generated/maxloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
21572
@@ -58,7 +58,7 @@
 
21573
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21574
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21575
       retarray->offset = 0;
 
21576
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21577
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21578
     }
 
21579
   else
 
21580
     {
 
21581
@@ -199,7 +199,7 @@
 
21582
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21583
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21584
       retarray->offset = 0;
 
21585
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21586
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21587
     }
 
21588
   else
 
21589
     {
 
21590
@@ -367,7 +367,7 @@
 
21591
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21592
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21593
       retarray->offset = 0;
 
21594
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21595
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21596
     }
 
21597
   else if (unlikely (compile_options.bounds_check))
 
21598
     {
 
21599
Index: libgfortran/generated/shape_i4.c
 
21600
===================================================================
 
21601
--- a/src/libgfortran/generated/shape_i4.c      (.../tags/gcc_4_8_3_release)
 
21602
+++ b/src/libgfortran/generated/shape_i4.c      (.../branches/gcc-4_8-branch)
 
21603
@@ -49,7 +49,7 @@
 
21604
     {
 
21605
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
21606
       ret->offset = 0;
 
21607
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21608
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21609
     }
 
21610
 
 
21611
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
21612
Index: libgfortran/generated/minloc1_4_i16.c
 
21613
===================================================================
 
21614
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
21615
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
21616
@@ -98,10 +98,9 @@
 
21617
       retarray->offset = 0;
 
21618
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21619
 
 
21620
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21621
-                  * extent[rank-1];
 
21622
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21623
 
 
21624
-      retarray->base_addr = xmalloc (alloc_size);
 
21625
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21626
       if (alloc_size == 0)
 
21627
        {
 
21628
          /* Make sure we have a zero-sized array.  */
 
21629
@@ -294,8 +293,7 @@
 
21630
 
 
21631
        }
 
21632
 
 
21633
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21634
-                  * extent[rank-1];
 
21635
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21636
 
 
21637
       retarray->offset = 0;
 
21638
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21639
@@ -307,7 +305,7 @@
 
21640
          return;
 
21641
        }
 
21642
       else
 
21643
-       retarray->base_addr = xmalloc (alloc_size);
 
21644
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21645
 
 
21646
     }
 
21647
   else
 
21648
@@ -485,8 +483,7 @@
 
21649
       retarray->offset = 0;
 
21650
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21651
 
 
21652
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21653
-                  * extent[rank-1];
 
21654
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21655
 
 
21656
       if (alloc_size == 0)
 
21657
        {
 
21658
@@ -495,7 +492,7 @@
 
21659
          return;
 
21660
        }
 
21661
       else
 
21662
-       retarray->base_addr = xmalloc (alloc_size);
 
21663
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21664
     }
 
21665
   else
 
21666
     {
 
21667
Index: libgfortran/generated/maxloc0_4_r10.c
 
21668
===================================================================
 
21669
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
21670
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
21671
@@ -58,7 +58,7 @@
 
21672
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21673
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21674
       retarray->offset = 0;
 
21675
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21676
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21677
     }
 
21678
   else
 
21679
     {
 
21680
@@ -199,7 +199,7 @@
 
21681
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21682
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21683
       retarray->offset = 0;
 
21684
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21685
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21686
     }
 
21687
   else
 
21688
     {
 
21689
@@ -367,7 +367,7 @@
 
21690
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21691
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21692
       retarray->offset = 0;
 
21693
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21694
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21695
     }
 
21696
   else if (unlikely (compile_options.bounds_check))
 
21697
     {
 
21698
Index: libgfortran/generated/maxloc0_8_i16.c
 
21699
===================================================================
 
21700
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
21701
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
21702
@@ -58,7 +58,7 @@
 
21703
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21704
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21705
       retarray->offset = 0;
 
21706
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21707
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21708
     }
 
21709
   else
 
21710
     {
 
21711
@@ -199,7 +199,7 @@
 
21712
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21713
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21714
       retarray->offset = 0;
 
21715
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21716
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21717
     }
 
21718
   else
 
21719
     {
 
21720
@@ -367,7 +367,7 @@
 
21721
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21722
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21723
       retarray->offset = 0;
 
21724
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21725
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21726
     }
 
21727
   else if (unlikely (compile_options.bounds_check))
 
21728
     {
 
21729
Index: libgfortran/generated/iall_i2.c
 
21730
===================================================================
 
21731
--- a/src/libgfortran/generated/iall_i2.c       (.../tags/gcc_4_8_3_release)
 
21732
+++ b/src/libgfortran/generated/iall_i2.c       (.../branches/gcc-4_8-branch)
 
21733
@@ -97,10 +97,9 @@
 
21734
       retarray->offset = 0;
 
21735
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21736
 
 
21737
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21738
-                  * extent[rank-1];
 
21739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21740
 
 
21741
-      retarray->base_addr = xmalloc (alloc_size);
 
21742
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21743
       if (alloc_size == 0)
 
21744
        {
 
21745
          /* Make sure we have a zero-sized array.  */
 
21746
@@ -272,8 +271,7 @@
 
21747
 
 
21748
        }
 
21749
 
 
21750
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21751
-                  * extent[rank-1];
 
21752
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21753
 
 
21754
       retarray->offset = 0;
 
21755
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21756
@@ -285,7 +283,7 @@
 
21757
          return;
 
21758
        }
 
21759
       else
 
21760
-       retarray->base_addr = xmalloc (alloc_size);
 
21761
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21762
 
 
21763
     }
 
21764
   else
 
21765
@@ -430,8 +428,7 @@
 
21766
       retarray->offset = 0;
 
21767
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21768
 
 
21769
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21770
-                  * extent[rank-1];
 
21771
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21772
 
 
21773
       if (alloc_size == 0)
 
21774
        {
 
21775
@@ -440,7 +437,7 @@
 
21776
          return;
 
21777
        }
 
21778
       else
 
21779
-       retarray->base_addr = xmalloc (alloc_size);
 
21780
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21781
     }
 
21782
   else
 
21783
     {
 
21784
Index: libgfortran/generated/maxloc1_8_r10.c
 
21785
===================================================================
 
21786
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
21787
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
21788
@@ -98,10 +98,9 @@
 
21789
       retarray->offset = 0;
 
21790
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21791
 
 
21792
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21793
-                  * extent[rank-1];
 
21794
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21795
 
 
21796
-      retarray->base_addr = xmalloc (alloc_size);
 
21797
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21798
       if (alloc_size == 0)
 
21799
        {
 
21800
          /* Make sure we have a zero-sized array.  */
 
21801
@@ -294,8 +293,7 @@
 
21802
 
 
21803
        }
 
21804
 
 
21805
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21806
-                  * extent[rank-1];
 
21807
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21808
 
 
21809
       retarray->offset = 0;
 
21810
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21811
@@ -307,7 +305,7 @@
 
21812
          return;
 
21813
        }
 
21814
       else
 
21815
-       retarray->base_addr = xmalloc (alloc_size);
 
21816
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21817
 
 
21818
     }
 
21819
   else
 
21820
@@ -485,8 +483,7 @@
 
21821
       retarray->offset = 0;
 
21822
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21823
 
 
21824
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21825
-                  * extent[rank-1];
 
21826
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21827
 
 
21828
       if (alloc_size == 0)
 
21829
        {
 
21830
@@ -495,7 +492,7 @@
 
21831
          return;
 
21832
        }
 
21833
       else
 
21834
-       retarray->base_addr = xmalloc (alloc_size);
 
21835
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21836
     }
 
21837
   else
 
21838
     {
 
21839
Index: libgfortran/generated/maxloc0_16_r4.c
 
21840
===================================================================
 
21841
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
21842
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
21843
@@ -58,7 +58,7 @@
 
21844
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21845
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21846
       retarray->offset = 0;
 
21847
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21848
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21849
     }
 
21850
   else
 
21851
     {
 
21852
@@ -199,7 +199,7 @@
 
21853
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21854
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21855
       retarray->offset = 0;
 
21856
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21857
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21858
     }
 
21859
   else
 
21860
     {
 
21861
@@ -367,7 +367,7 @@
 
21862
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21863
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21864
       retarray->offset = 0;
 
21865
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21866
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21867
     }
 
21868
   else if (unlikely (compile_options.bounds_check))
 
21869
     {
 
21870
Index: libgfortran/generated/minloc0_8_i1.c
 
21871
===================================================================
 
21872
--- a/src/libgfortran/generated/minloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
21873
+++ b/src/libgfortran/generated/minloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
21874
@@ -58,7 +58,7 @@
 
21875
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21876
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21877
       retarray->offset = 0;
 
21878
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21879
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21880
     }
 
21881
   else
 
21882
     {
 
21883
@@ -199,7 +199,7 @@
 
21884
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21885
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21886
       retarray->offset = 0;
 
21887
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21888
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21889
     }
 
21890
   else
 
21891
     {
 
21892
@@ -367,7 +367,7 @@
 
21893
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21894
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21895
       retarray->offset = 0;
 
21896
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21897
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21898
     }
 
21899
   else if (unlikely (compile_options.bounds_check))
 
21900
     {
 
21901
Index: libgfortran/generated/minloc1_16_r8.c
 
21902
===================================================================
 
21903
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
21904
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
21905
@@ -98,10 +98,9 @@
 
21906
       retarray->offset = 0;
 
21907
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21908
 
 
21909
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21910
-                  * extent[rank-1];
 
21911
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21912
 
 
21913
-      retarray->base_addr = xmalloc (alloc_size);
 
21914
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21915
       if (alloc_size == 0)
 
21916
        {
 
21917
          /* Make sure we have a zero-sized array.  */
 
21918
@@ -294,8 +293,7 @@
 
21919
 
 
21920
        }
 
21921
 
 
21922
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21923
-                  * extent[rank-1];
 
21924
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21925
 
 
21926
       retarray->offset = 0;
 
21927
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21928
@@ -307,7 +305,7 @@
 
21929
          return;
 
21930
        }
 
21931
       else
 
21932
-       retarray->base_addr = xmalloc (alloc_size);
 
21933
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21934
 
 
21935
     }
 
21936
   else
 
21937
@@ -485,8 +483,7 @@
 
21938
       retarray->offset = 0;
 
21939
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21940
 
 
21941
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21942
-                  * extent[rank-1];
 
21943
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21944
 
 
21945
       if (alloc_size == 0)
 
21946
        {
 
21947
@@ -495,7 +492,7 @@
 
21948
          return;
 
21949
        }
 
21950
       else
 
21951
-       retarray->base_addr = xmalloc (alloc_size);
 
21952
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21953
     }
 
21954
   else
 
21955
     {
 
21956
Index: libgfortran/generated/unpack_i8.c
 
21957
===================================================================
 
21958
--- a/src/libgfortran/generated/unpack_i8.c     (.../tags/gcc_4_8_3_release)
 
21959
+++ b/src/libgfortran/generated/unpack_i8.c     (.../branches/gcc-4_8-branch)
 
21960
@@ -99,7 +99,7 @@
 
21961
          rs *= extent[n];
 
21962
        }
 
21963
       ret->offset = 0;
 
21964
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
21965
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
21966
     }
 
21967
   else
 
21968
     {
 
21969
@@ -244,7 +244,7 @@
 
21970
          rs *= extent[n];
 
21971
        }
 
21972
       ret->offset = 0;
 
21973
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
21974
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
21975
     }
 
21976
   else
 
21977
     {
 
21978
Index: libgfortran/generated/maxloc0_4_i4.c
 
21979
===================================================================
 
21980
--- a/src/libgfortran/generated/maxloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
21981
+++ b/src/libgfortran/generated/maxloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
21982
@@ -58,7 +58,7 @@
 
21983
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21984
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21985
       retarray->offset = 0;
 
21986
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21987
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21988
     }
 
21989
   else
 
21990
     {
 
21991
@@ -199,7 +199,7 @@
 
21992
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21993
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21994
       retarray->offset = 0;
 
21995
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21996
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21997
     }
 
21998
   else
 
21999
     {
 
22000
@@ -367,7 +367,7 @@
 
22001
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22002
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22003
       retarray->offset = 0;
 
22004
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22005
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22006
     }
 
22007
   else if (unlikely (compile_options.bounds_check))
 
22008
     {
 
22009
Index: libgfortran/generated/count_4_l.c
 
22010
===================================================================
 
22011
--- a/src/libgfortran/generated/count_4_l.c     (.../tags/gcc_4_8_3_release)
 
22012
+++ b/src/libgfortran/generated/count_4_l.c     (.../branches/gcc-4_8-branch)
 
22013
@@ -101,8 +101,7 @@
 
22014
       retarray->offset = 0;
 
22015
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22016
 
 
22017
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22018
-                  * extent[rank-1];
 
22019
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22020
 
 
22021
       if (alloc_size == 0)
 
22022
        {
 
22023
@@ -111,7 +110,7 @@
 
22024
          return;
 
22025
        }
 
22026
       else
 
22027
-       retarray->base_addr = xmalloc (alloc_size);
 
22028
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22029
     }
 
22030
   else
 
22031
     {
 
22032
Index: libgfortran/generated/sum_r10.c
 
22033
===================================================================
 
22034
--- a/src/libgfortran/generated/sum_r10.c       (.../tags/gcc_4_8_3_release)
 
22035
+++ b/src/libgfortran/generated/sum_r10.c       (.../branches/gcc-4_8-branch)
 
22036
@@ -97,10 +97,9 @@
 
22037
       retarray->offset = 0;
 
22038
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22039
 
 
22040
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22041
-                  * extent[rank-1];
 
22042
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22043
 
 
22044
-      retarray->base_addr = xmalloc (alloc_size);
 
22045
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22046
       if (alloc_size == 0)
 
22047
        {
 
22048
          /* Make sure we have a zero-sized array.  */
 
22049
@@ -272,8 +271,7 @@
 
22050
 
 
22051
        }
 
22052
 
 
22053
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22054
-                  * extent[rank-1];
 
22055
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22056
 
 
22057
       retarray->offset = 0;
 
22058
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22059
@@ -285,7 +283,7 @@
 
22060
          return;
 
22061
        }
 
22062
       else
 
22063
-       retarray->base_addr = xmalloc (alloc_size);
 
22064
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22065
 
 
22066
     }
 
22067
   else
 
22068
@@ -430,8 +428,7 @@
 
22069
       retarray->offset = 0;
 
22070
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22071
 
 
22072
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22073
-                  * extent[rank-1];
 
22074
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22075
 
 
22076
       if (alloc_size == 0)
 
22077
        {
 
22078
@@ -440,7 +437,7 @@
 
22079
          return;
 
22080
        }
 
22081
       else
 
22082
-       retarray->base_addr = xmalloc (alloc_size);
 
22083
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22084
     }
 
22085
   else
 
22086
     {
 
22087
Index: libgfortran/generated/sum_c4.c
 
22088
===================================================================
 
22089
--- a/src/libgfortran/generated/sum_c4.c        (.../tags/gcc_4_8_3_release)
 
22090
+++ b/src/libgfortran/generated/sum_c4.c        (.../branches/gcc-4_8-branch)
 
22091
@@ -97,10 +97,9 @@
 
22092
       retarray->offset = 0;
 
22093
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22094
 
 
22095
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22096
-                  * extent[rank-1];
 
22097
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22098
 
 
22099
-      retarray->base_addr = xmalloc (alloc_size);
 
22100
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22101
       if (alloc_size == 0)
 
22102
        {
 
22103
          /* Make sure we have a zero-sized array.  */
 
22104
@@ -272,8 +271,7 @@
 
22105
 
 
22106
        }
 
22107
 
 
22108
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22109
-                  * extent[rank-1];
 
22110
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22111
 
 
22112
       retarray->offset = 0;
 
22113
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22114
@@ -285,7 +283,7 @@
 
22115
          return;
 
22116
        }
 
22117
       else
 
22118
-       retarray->base_addr = xmalloc (alloc_size);
 
22119
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22120
 
 
22121
     }
 
22122
   else
 
22123
@@ -430,8 +428,7 @@
 
22124
       retarray->offset = 0;
 
22125
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22126
 
 
22127
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22128
-                  * extent[rank-1];
 
22129
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22130
 
 
22131
       if (alloc_size == 0)
 
22132
        {
 
22133
@@ -440,7 +437,7 @@
 
22134
          return;
 
22135
        }
 
22136
       else
 
22137
-       retarray->base_addr = xmalloc (alloc_size);
 
22138
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
22139
     }
 
22140
   else
 
22141
     {
 
22142
Index: libgfortran/generated/maxloc1_16_r10.c
 
22143
===================================================================
 
22144
--- a/src/libgfortran/generated/maxloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
22145
+++ b/src/libgfortran/generated/maxloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
22146
@@ -98,10 +98,9 @@
 
22147
       retarray->offset = 0;
 
22148
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22149
 
 
22150
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22151
-                  * extent[rank-1];
 
22152
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22153
 
 
22154
-      retarray->base_addr = xmalloc (alloc_size);
 
22155
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22156
       if (alloc_size == 0)
 
22157
        {
 
22158
          /* Make sure we have a zero-sized array.  */
 
22159
@@ -294,8 +293,7 @@
 
22160
 
 
22161
        }
 
22162
 
 
22163
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22164
-                  * extent[rank-1];
 
22165
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22166
 
 
22167
       retarray->offset = 0;
 
22168
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22169
@@ -307,7 +305,7 @@
 
22170
          return;
 
22171
        }
 
22172
       else
 
22173
-       retarray->base_addr = xmalloc (alloc_size);
 
22174
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22175
 
 
22176
     }
 
22177
   else
 
22178
@@ -485,8 +483,7 @@
 
22179
       retarray->offset = 0;
 
22180
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22181
 
 
22182
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22183
-                  * extent[rank-1];
 
22184
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22185
 
 
22186
       if (alloc_size == 0)
 
22187
        {
 
22188
@@ -495,7 +492,7 @@
 
22189
          return;
 
22190
        }
 
22191
       else
 
22192
-       retarray->base_addr = xmalloc (alloc_size);
 
22193
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22194
     }
 
22195
   else
 
22196
     {
 
22197
Index: libgfortran/generated/pack_i16.c
 
22198
===================================================================
 
22199
--- a/src/libgfortran/generated/pack_i16.c      (.../tags/gcc_4_8_3_release)
 
22200
+++ b/src/libgfortran/generated/pack_i16.c      (.../branches/gcc-4_8-branch)
 
22201
@@ -167,8 +167,8 @@
 
22202
 
 
22203
          ret->offset = 0;
 
22204
 
 
22205
-         /* xmalloc allocates a single byte for zero size.  */
 
22206
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
 
22207
+         /* xmallocarray allocates a single byte for zero size.  */
 
22208
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
 
22209
 
 
22210
          if (total == 0)
 
22211
            return;
 
22212
Index: libgfortran/generated/matmul_i8.c
 
22213
===================================================================
 
22214
--- a/src/libgfortran/generated/matmul_i8.c     (.../tags/gcc_4_8_3_release)
 
22215
+++ b/src/libgfortran/generated/matmul_i8.c     (.../branches/gcc-4_8-branch)
 
22216
@@ -124,7 +124,7 @@
 
22217
         }
 
22218
 
 
22219
       retarray->base_addr
 
22220
-       = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
 
22221
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
 
22222
       retarray->offset = 0;
 
22223
     }
 
22224
     else if (unlikely (compile_options.bounds_check))
 
22225
Index: libgfortran/generated/maxloc0_16_i2.c
 
22226
===================================================================
 
22227
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
22228
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
22229
@@ -58,7 +58,7 @@
 
22230
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22231
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22232
       retarray->offset = 0;
 
22233
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22234
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22235
     }
 
22236
   else
 
22237
     {
 
22238
@@ -199,7 +199,7 @@
 
22239
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22240
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22241
       retarray->offset = 0;
 
22242
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22243
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22244
     }
 
22245
   else
 
22246
     {
 
22247
@@ -367,7 +367,7 @@
 
22248
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22249
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22250
       retarray->offset = 0;
 
22251
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22252
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22253
     }
 
22254
   else if (unlikely (compile_options.bounds_check))
 
22255
     {
 
22256
Index: libgfortran/generated/spread_c4.c
 
22257
===================================================================
 
22258
--- a/src/libgfortran/generated/spread_c4.c     (.../tags/gcc_4_8_3_release)
 
22259
+++ b/src/libgfortran/generated/spread_c4.c     (.../branches/gcc-4_8-branch)
 
22260
@@ -101,8 +101,8 @@
 
22261
        }
 
22262
       ret->offset = 0;
 
22263
 
 
22264
-      /* xmalloc allocates a single byte for zero size.  */
 
22265
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
 
22266
+      /* xmallocarray allocates a single byte for zero size.  */
 
22267
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
 
22268
       if (rs <= 0)
 
22269
         return;
 
22270
     }
 
22271
@@ -244,7 +244,7 @@
 
22272
 
 
22273
   if (ret->base_addr == NULL)
 
22274
     {
 
22275
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
 
22276
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
 
22277
       ret->offset = 0;
 
22278
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
22279
     }
 
22280
Index: libgfortran/generated/maxval_r10.c
 
22281
===================================================================
 
22282
--- a/src/libgfortran/generated/maxval_r10.c    (.../tags/gcc_4_8_3_release)
 
22283
+++ b/src/libgfortran/generated/maxval_r10.c    (.../branches/gcc-4_8-branch)
 
22284
@@ -97,10 +97,9 @@
 
22285
       retarray->offset = 0;
 
22286
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22287
 
 
22288
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22289
-                  * extent[rank-1];
 
22290
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22291
 
 
22292
-      retarray->base_addr = xmalloc (alloc_size);
 
22293
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22294
       if (alloc_size == 0)
 
22295
        {
 
22296
          /* Make sure we have a zero-sized array.  */
 
22297
@@ -286,8 +285,7 @@
 
22298
 
 
22299
        }
 
22300
 
 
22301
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22302
-                  * extent[rank-1];
 
22303
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22304
 
 
22305
       retarray->offset = 0;
 
22306
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22307
@@ -299,7 +297,7 @@
 
22308
          return;
 
22309
        }
 
22310
       else
 
22311
-       retarray->base_addr = xmalloc (alloc_size);
 
22312
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22313
 
 
22314
     }
 
22315
   else
 
22316
@@ -472,8 +470,7 @@
 
22317
       retarray->offset = 0;
 
22318
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22319
 
 
22320
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22321
-                  * extent[rank-1];
 
22322
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22323
 
 
22324
       if (alloc_size == 0)
 
22325
        {
 
22326
@@ -482,7 +479,7 @@
 
22327
          return;
 
22328
        }
 
22329
       else
 
22330
-       retarray->base_addr = xmalloc (alloc_size);
 
22331
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22332
     }
 
22333
   else
 
22334
     {
 
22335
Index: libgfortran/generated/pack_i4.c
 
22336
===================================================================
 
22337
--- a/src/libgfortran/generated/pack_i4.c       (.../tags/gcc_4_8_3_release)
 
22338
+++ b/src/libgfortran/generated/pack_i4.c       (.../branches/gcc-4_8-branch)
 
22339
@@ -167,8 +167,8 @@
 
22340
 
 
22341
          ret->offset = 0;
 
22342
 
 
22343
-         /* xmalloc allocates a single byte for zero size.  */
 
22344
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
 
22345
+         /* xmallocarray allocates a single byte for zero size.  */
 
22346
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
 
22347
 
 
22348
          if (total == 0)
 
22349
            return;
 
22350
Index: libgfortran/generated/maxloc1_4_i1.c
 
22351
===================================================================
 
22352
--- a/src/libgfortran/generated/maxloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
22353
+++ b/src/libgfortran/generated/maxloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
22354
@@ -98,10 +98,9 @@
 
22355
       retarray->offset = 0;
 
22356
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22357
 
 
22358
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22359
-                  * extent[rank-1];
 
22360
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22361
 
 
22362
-      retarray->base_addr = xmalloc (alloc_size);
 
22363
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22364
       if (alloc_size == 0)
 
22365
        {
 
22366
          /* Make sure we have a zero-sized array.  */
 
22367
@@ -294,8 +293,7 @@
 
22368
 
 
22369
        }
 
22370
 
 
22371
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22372
-                  * extent[rank-1];
 
22373
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22374
 
 
22375
       retarray->offset = 0;
 
22376
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22377
@@ -307,7 +305,7 @@
 
22378
          return;
 
22379
        }
 
22380
       else
 
22381
-       retarray->base_addr = xmalloc (alloc_size);
 
22382
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22383
 
 
22384
     }
 
22385
   else
 
22386
@@ -485,8 +483,7 @@
 
22387
       retarray->offset = 0;
 
22388
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22389
 
 
22390
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22391
-                  * extent[rank-1];
 
22392
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22393
 
 
22394
       if (alloc_size == 0)
 
22395
        {
 
22396
@@ -495,7 +492,7 @@
 
22397
          return;
 
22398
        }
 
22399
       else
 
22400
-       retarray->base_addr = xmalloc (alloc_size);
 
22401
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22402
     }
 
22403
   else
 
22404
     {
 
22405
Index: libgfortran/generated/matmul_r10.c
 
22406
===================================================================
 
22407
--- a/src/libgfortran/generated/matmul_r10.c    (.../tags/gcc_4_8_3_release)
 
22408
+++ b/src/libgfortran/generated/matmul_r10.c    (.../branches/gcc-4_8-branch)
 
22409
@@ -124,7 +124,7 @@
 
22410
         }
 
22411
 
 
22412
       retarray->base_addr
 
22413
-       = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
 
22414
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
 
22415
       retarray->offset = 0;
 
22416
     }
 
22417
     else if (unlikely (compile_options.bounds_check))
 
22418
Index: libgfortran/generated/minloc1_4_i8.c
 
22419
===================================================================
 
22420
--- a/src/libgfortran/generated/minloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
22421
+++ b/src/libgfortran/generated/minloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
22422
@@ -98,10 +98,9 @@
 
22423
       retarray->offset = 0;
 
22424
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22425
 
 
22426
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22427
-                  * extent[rank-1];
 
22428
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22429
 
 
22430
-      retarray->base_addr = xmalloc (alloc_size);
 
22431
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22432
       if (alloc_size == 0)
 
22433
        {
 
22434
          /* Make sure we have a zero-sized array.  */
 
22435
@@ -294,8 +293,7 @@
 
22436
 
 
22437
        }
 
22438
 
 
22439
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22440
-                  * extent[rank-1];
 
22441
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22442
 
 
22443
       retarray->offset = 0;
 
22444
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22445
@@ -307,7 +305,7 @@
 
22446
          return;
 
22447
        }
 
22448
       else
 
22449
-       retarray->base_addr = xmalloc (alloc_size);
 
22450
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22451
 
 
22452
     }
 
22453
   else
 
22454
@@ -485,8 +483,7 @@
 
22455
       retarray->offset = 0;
 
22456
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22457
 
 
22458
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22459
-                  * extent[rank-1];
 
22460
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22461
 
 
22462
       if (alloc_size == 0)
 
22463
        {
 
22464
@@ -495,7 +492,7 @@
 
22465
          return;
 
22466
        }
 
22467
       else
 
22468
-       retarray->base_addr = xmalloc (alloc_size);
 
22469
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22470
     }
 
22471
   else
 
22472
     {
 
22473
Index: libgfortran/generated/minloc0_8_r4.c
 
22474
===================================================================
 
22475
--- a/src/libgfortran/generated/minloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
22476
+++ b/src/libgfortran/generated/minloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
22477
@@ -58,7 +58,7 @@
 
22478
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22479
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22480
       retarray->offset = 0;
 
22481
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22482
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22483
     }
 
22484
   else
 
22485
     {
 
22486
@@ -199,7 +199,7 @@
 
22487
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22488
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22489
       retarray->offset = 0;
 
22490
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22491
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22492
     }
 
22493
   else
 
22494
     {
 
22495
@@ -367,7 +367,7 @@
 
22496
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22497
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22498
       retarray->offset = 0;
 
22499
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22500
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22501
     }
 
22502
   else if (unlikely (compile_options.bounds_check))
 
22503
     {
 
22504
Index: libgfortran/generated/matmul_l4.c
 
22505
===================================================================
 
22506
--- a/src/libgfortran/generated/matmul_l4.c     (.../tags/gcc_4_8_3_release)
 
22507
+++ b/src/libgfortran/generated/matmul_l4.c     (.../branches/gcc-4_8-branch)
 
22508
@@ -88,7 +88,7 @@
 
22509
         }
 
22510
           
 
22511
       retarray->base_addr
 
22512
-       = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
 
22513
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
 
22514
       retarray->offset = 0;
 
22515
     }
 
22516
     else if (unlikely (compile_options.bounds_check))
 
22517
Index: libgfortran/generated/reshape_r8.c
 
22518
===================================================================
 
22519
--- a/src/libgfortran/generated/reshape_r8.c    (.../tags/gcc_4_8_3_release)
 
22520
+++ b/src/libgfortran/generated/reshape_r8.c    (.../branches/gcc-4_8-branch)
 
22521
@@ -111,11 +111,11 @@
 
22522
       ret->offset = 0;
 
22523
 
 
22524
       if (unlikely (rs < 1))
 
22525
-        alloc_size = 1;
 
22526
+        alloc_size = 0;
 
22527
       else
 
22528
-        alloc_size = rs * sizeof (GFC_REAL_8);
 
22529
+        alloc_size = rs;
 
22530
 
 
22531
-      ret->base_addr = xmalloc (alloc_size);
 
22532
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22533
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
22534
     }
 
22535
 
 
22536
Index: libgfortran/generated/in_pack_c10.c
 
22537
===================================================================
 
22538
--- a/src/libgfortran/generated/in_pack_c10.c   (.../tags/gcc_4_8_3_release)
 
22539
+++ b/src/libgfortran/generated/in_pack_c10.c   (.../branches/gcc-4_8-branch)
 
22540
@@ -76,7 +76,7 @@
 
22541
     return source->base_addr;
 
22542
 
 
22543
   /* Allocate storage for the destination.  */
 
22544
-  destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
 
22545
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
 
22546
   dest = destptr;
 
22547
   src = source->base_addr;
 
22548
   stride0 = stride[0];
 
22549
Index: libgfortran/generated/all_l4.c
 
22550
===================================================================
 
22551
--- a/src/libgfortran/generated/all_l4.c        (.../tags/gcc_4_8_3_release)
 
22552
+++ b/src/libgfortran/generated/all_l4.c        (.../branches/gcc-4_8-branch)
 
22553
@@ -101,8 +101,7 @@
 
22554
       retarray->offset = 0;
 
22555
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22556
 
 
22557
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22558
-                  * extent[rank-1];
 
22559
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22560
 
 
22561
       if (alloc_size == 0)
 
22562
        {
 
22563
@@ -111,7 +110,7 @@
 
22564
          return;
 
22565
        }
 
22566
       else
 
22567
-       retarray->base_addr = xmalloc (alloc_size);
 
22568
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
22569
     }
 
22570
   else
 
22571
     {
 
22572
Index: libgfortran/generated/minloc0_8_i2.c
 
22573
===================================================================
 
22574
--- a/src/libgfortran/generated/minloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
22575
+++ b/src/libgfortran/generated/minloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
22576
@@ -58,7 +58,7 @@
 
22577
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22578
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22579
       retarray->offset = 0;
 
22580
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22581
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22582
     }
 
22583
   else
 
22584
     {
 
22585
@@ -199,7 +199,7 @@
 
22586
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22587
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22588
       retarray->offset = 0;
 
22589
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22590
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22591
     }
 
22592
   else
 
22593
     {
 
22594
@@ -367,7 +367,7 @@
 
22595
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22596
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22597
       retarray->offset = 0;
 
22598
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22599
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22600
     }
 
22601
   else if (unlikely (compile_options.bounds_check))
 
22602
     {
 
22603
Index: libgfortran/generated/norm2_r16.c
 
22604
===================================================================
 
22605
--- a/src/libgfortran/generated/norm2_r16.c     (.../tags/gcc_4_8_3_release)
 
22606
+++ b/src/libgfortran/generated/norm2_r16.c     (.../branches/gcc-4_8-branch)
 
22607
@@ -105,10 +105,9 @@
 
22608
       retarray->offset = 0;
 
22609
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22610
 
 
22611
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22612
-                  * extent[rank-1];
 
22613
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22614
 
 
22615
-      retarray->base_addr = xmalloc (alloc_size);
 
22616
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22617
       if (alloc_size == 0)
 
22618
        {
 
22619
          /* Make sure we have a zero-sized array.  */
 
22620
Index: libgfortran/generated/reshape_c10.c
 
22621
===================================================================
 
22622
--- a/src/libgfortran/generated/reshape_c10.c   (.../tags/gcc_4_8_3_release)
 
22623
+++ b/src/libgfortran/generated/reshape_c10.c   (.../branches/gcc-4_8-branch)
 
22624
@@ -111,11 +111,11 @@
 
22625
       ret->offset = 0;
 
22626
 
 
22627
       if (unlikely (rs < 1))
 
22628
-        alloc_size = 1;
 
22629
+        alloc_size = 0;
 
22630
       else
 
22631
-        alloc_size = rs * sizeof (GFC_COMPLEX_10);
 
22632
+        alloc_size = rs;
 
22633
 
 
22634
-      ret->base_addr = xmalloc (alloc_size);
 
22635
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
22636
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
22637
     }
 
22638
 
 
22639
Index: libgfortran/generated/unpack_c16.c
 
22640
===================================================================
 
22641
--- a/src/libgfortran/generated/unpack_c16.c    (.../tags/gcc_4_8_3_release)
 
22642
+++ b/src/libgfortran/generated/unpack_c16.c    (.../branches/gcc-4_8-branch)
 
22643
@@ -99,7 +99,7 @@
 
22644
          rs *= extent[n];
 
22645
        }
 
22646
       ret->offset = 0;
 
22647
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
22648
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
22649
     }
 
22650
   else
 
22651
     {
 
22652
@@ -244,7 +244,7 @@
 
22653
          rs *= extent[n];
 
22654
        }
 
22655
       ret->offset = 0;
 
22656
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
22657
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
22658
     }
 
22659
   else
 
22660
     {
 
22661
Index: libgfortran/generated/maxloc1_4_r4.c
 
22662
===================================================================
 
22663
--- a/src/libgfortran/generated/maxloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
22664
+++ b/src/libgfortran/generated/maxloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
22665
@@ -98,10 +98,9 @@
 
22666
       retarray->offset = 0;
 
22667
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22668
 
 
22669
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22670
-                  * extent[rank-1];
 
22671
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22672
 
 
22673
-      retarray->base_addr = xmalloc (alloc_size);
 
22674
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22675
       if (alloc_size == 0)
 
22676
        {
 
22677
          /* Make sure we have a zero-sized array.  */
 
22678
@@ -294,8 +293,7 @@
 
22679
 
 
22680
        }
 
22681
 
 
22682
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22683
-                  * extent[rank-1];
 
22684
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22685
 
 
22686
       retarray->offset = 0;
 
22687
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22688
@@ -307,7 +305,7 @@
 
22689
          return;
 
22690
        }
 
22691
       else
 
22692
-       retarray->base_addr = xmalloc (alloc_size);
 
22693
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22694
 
 
22695
     }
 
22696
   else
 
22697
@@ -485,8 +483,7 @@
 
22698
       retarray->offset = 0;
 
22699
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22700
 
 
22701
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22702
-                  * extent[rank-1];
 
22703
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22704
 
 
22705
       if (alloc_size == 0)
 
22706
        {
 
22707
@@ -495,7 +492,7 @@
 
22708
          return;
 
22709
        }
 
22710
       else
 
22711
-       retarray->base_addr = xmalloc (alloc_size);
 
22712
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22713
     }
 
22714
   else
 
22715
     {
 
22716
Index: libgfortran/generated/maxval_r8.c
 
22717
===================================================================
 
22718
--- a/src/libgfortran/generated/maxval_r8.c     (.../tags/gcc_4_8_3_release)
 
22719
+++ b/src/libgfortran/generated/maxval_r8.c     (.../branches/gcc-4_8-branch)
 
22720
@@ -97,10 +97,9 @@
 
22721
       retarray->offset = 0;
 
22722
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22723
 
 
22724
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22725
-                  * extent[rank-1];
 
22726
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22727
 
 
22728
-      retarray->base_addr = xmalloc (alloc_size);
 
22729
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22730
       if (alloc_size == 0)
 
22731
        {
 
22732
          /* Make sure we have a zero-sized array.  */
 
22733
@@ -286,8 +285,7 @@
 
22734
 
 
22735
        }
 
22736
 
 
22737
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22738
-                  * extent[rank-1];
 
22739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22740
 
 
22741
       retarray->offset = 0;
 
22742
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22743
@@ -299,7 +297,7 @@
 
22744
          return;
 
22745
        }
 
22746
       else
 
22747
-       retarray->base_addr = xmalloc (alloc_size);
 
22748
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22749
 
 
22750
     }
 
22751
   else
 
22752
@@ -472,8 +470,7 @@
 
22753
       retarray->offset = 0;
 
22754
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22755
 
 
22756
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22757
-                  * extent[rank-1];
 
22758
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22759
 
 
22760
       if (alloc_size == 0)
 
22761
        {
 
22762
@@ -482,7 +479,7 @@
 
22763
          return;
 
22764
        }
 
22765
       else
 
22766
-       retarray->base_addr = xmalloc (alloc_size);
 
22767
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22768
     }
 
22769
   else
 
22770
     {
 
22771
Index: libgfortran/generated/transpose_c4.c
 
22772
===================================================================
 
22773
--- a/src/libgfortran/generated/transpose_c4.c  (.../tags/gcc_4_8_3_release)
 
22774
+++ b/src/libgfortran/generated/transpose_c4.c  (.../branches/gcc-4_8-branch)
 
22775
@@ -60,7 +60,8 @@
 
22776
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
22777
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
22778
 
 
22779
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
 
22780
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
22781
+                                     sizeof (GFC_COMPLEX_4));
 
22782
       ret->offset = 0;
 
22783
     } else if (unlikely (compile_options.bounds_check))
 
22784
     {
 
22785
Index: libgfortran/generated/eoshift1_4.c
 
22786
===================================================================
 
22787
--- a/src/libgfortran/generated/eoshift1_4.c    (.../tags/gcc_4_8_3_release)
 
22788
+++ b/src/libgfortran/generated/eoshift1_4.c    (.../branches/gcc-4_8-branch)
 
22789
@@ -105,8 +105,8 @@
 
22790
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
22791
 
 
22792
         }
 
22793
-      /* xmalloc allocates a single byte for zero size.  */
 
22794
-      ret->base_addr = xmalloc (size * arraysize);
 
22795
+      /* xmallocarray allocates a single byte for zero size.  */
 
22796
+      ret->base_addr = xmallocarray (arraysize, size);
 
22797
 
 
22798
     }
 
22799
   else if (unlikely (compile_options.bounds_check))
 
22800
Index: libgfortran/generated/minval_r16.c
 
22801
===================================================================
 
22802
--- a/src/libgfortran/generated/minval_r16.c    (.../tags/gcc_4_8_3_release)
 
22803
+++ b/src/libgfortran/generated/minval_r16.c    (.../branches/gcc-4_8-branch)
 
22804
@@ -97,10 +97,9 @@
 
22805
       retarray->offset = 0;
 
22806
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22807
 
 
22808
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22809
-                  * extent[rank-1];
 
22810
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22811
 
 
22812
-      retarray->base_addr = xmalloc (alloc_size);
 
22813
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22814
       if (alloc_size == 0)
 
22815
        {
 
22816
          /* Make sure we have a zero-sized array.  */
 
22817
@@ -286,8 +285,7 @@
 
22818
 
 
22819
        }
 
22820
 
 
22821
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22822
-                  * extent[rank-1];
 
22823
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22824
 
 
22825
       retarray->offset = 0;
 
22826
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22827
@@ -299,7 +297,7 @@
 
22828
          return;
 
22829
        }
 
22830
       else
 
22831
-       retarray->base_addr = xmalloc (alloc_size);
 
22832
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22833
 
 
22834
     }
 
22835
   else
 
22836
@@ -472,8 +470,7 @@
 
22837
       retarray->offset = 0;
 
22838
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22839
 
 
22840
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22841
-                  * extent[rank-1];
 
22842
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22843
 
 
22844
       if (alloc_size == 0)
 
22845
        {
 
22846
@@ -482,7 +479,7 @@
 
22847
          return;
 
22848
        }
 
22849
       else
 
22850
-       retarray->base_addr = xmalloc (alloc_size);
 
22851
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22852
     }
 
22853
   else
 
22854
     {
 
22855
Index: libgfortran/generated/iany_i16.c
 
22856
===================================================================
 
22857
--- a/src/libgfortran/generated/iany_i16.c      (.../tags/gcc_4_8_3_release)
 
22858
+++ b/src/libgfortran/generated/iany_i16.c      (.../branches/gcc-4_8-branch)
 
22859
@@ -97,10 +97,9 @@
 
22860
       retarray->offset = 0;
 
22861
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22862
 
 
22863
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22864
-                  * extent[rank-1];
 
22865
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22866
 
 
22867
-      retarray->base_addr = xmalloc (alloc_size);
 
22868
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22869
       if (alloc_size == 0)
 
22870
        {
 
22871
          /* Make sure we have a zero-sized array.  */
 
22872
@@ -272,8 +271,7 @@
 
22873
 
 
22874
        }
 
22875
 
 
22876
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22877
-                  * extent[rank-1];
 
22878
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22879
 
 
22880
       retarray->offset = 0;
 
22881
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22882
@@ -285,7 +283,7 @@
 
22883
          return;
 
22884
        }
 
22885
       else
 
22886
-       retarray->base_addr = xmalloc (alloc_size);
 
22887
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22888
 
 
22889
     }
 
22890
   else
 
22891
@@ -430,8 +428,7 @@
 
22892
       retarray->offset = 0;
 
22893
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22894
 
 
22895
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22896
-                  * extent[rank-1];
 
22897
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22898
 
 
22899
       if (alloc_size == 0)
 
22900
        {
 
22901
@@ -440,7 +437,7 @@
 
22902
          return;
 
22903
        }
 
22904
       else
 
22905
-       retarray->base_addr = xmalloc (alloc_size);
 
22906
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22907
     }
 
22908
   else
 
22909
     {
 
22910
Index: libgfortran/generated/maxloc1_4_i2.c
 
22911
===================================================================
 
22912
--- a/src/libgfortran/generated/maxloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
22913
+++ b/src/libgfortran/generated/maxloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
22914
@@ -98,10 +98,9 @@
 
22915
       retarray->offset = 0;
 
22916
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22917
 
 
22918
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22919
-                  * extent[rank-1];
 
22920
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22921
 
 
22922
-      retarray->base_addr = xmalloc (alloc_size);
 
22923
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22924
       if (alloc_size == 0)
 
22925
        {
 
22926
          /* Make sure we have a zero-sized array.  */
 
22927
@@ -294,8 +293,7 @@
 
22928
 
 
22929
        }
 
22930
 
 
22931
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22932
-                  * extent[rank-1];
 
22933
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22934
 
 
22935
       retarray->offset = 0;
 
22936
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22937
@@ -307,7 +305,7 @@
 
22938
          return;
 
22939
        }
 
22940
       else
 
22941
-       retarray->base_addr = xmalloc (alloc_size);
 
22942
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22943
 
 
22944
     }
 
22945
   else
 
22946
@@ -485,8 +483,7 @@
 
22947
       retarray->offset = 0;
 
22948
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22949
 
 
22950
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22951
-                  * extent[rank-1];
 
22952
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22953
 
 
22954
       if (alloc_size == 0)
 
22955
        {
 
22956
@@ -495,7 +492,7 @@
 
22957
          return;
 
22958
        }
 
22959
       else
 
22960
-       retarray->base_addr = xmalloc (alloc_size);
 
22961
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22962
     }
 
22963
   else
 
22964
     {
 
22965
Index: libgfortran/generated/maxloc1_8_i8.c
 
22966
===================================================================
 
22967
--- a/src/libgfortran/generated/maxloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
22968
+++ b/src/libgfortran/generated/maxloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
22969
@@ -98,10 +98,9 @@
 
22970
       retarray->offset = 0;
 
22971
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22972
 
 
22973
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22974
-                  * extent[rank-1];
 
22975
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22976
 
 
22977
-      retarray->base_addr = xmalloc (alloc_size);
 
22978
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22979
       if (alloc_size == 0)
 
22980
        {
 
22981
          /* Make sure we have a zero-sized array.  */
 
22982
@@ -294,8 +293,7 @@
 
22983
 
 
22984
        }
 
22985
 
 
22986
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22987
-                  * extent[rank-1];
 
22988
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22989
 
 
22990
       retarray->offset = 0;
 
22991
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22992
@@ -307,7 +305,7 @@
 
22993
          return;
 
22994
        }
 
22995
       else
 
22996
-       retarray->base_addr = xmalloc (alloc_size);
 
22997
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22998
 
 
22999
     }
 
23000
   else
 
23001
@@ -485,8 +483,7 @@
 
23002
       retarray->offset = 0;
 
23003
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23004
 
 
23005
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23006
-                  * extent[rank-1];
 
23007
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23008
 
 
23009
       if (alloc_size == 0)
 
23010
        {
 
23011
@@ -495,7 +492,7 @@
 
23012
          return;
 
23013
        }
 
23014
       else
 
23015
-       retarray->base_addr = xmalloc (alloc_size);
 
23016
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23017
     }
 
23018
   else
 
23019
     {
 
23020
Index: libgfortran/generated/maxloc0_4_r8.c
 
23021
===================================================================
 
23022
--- a/src/libgfortran/generated/maxloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
23023
+++ b/src/libgfortran/generated/maxloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
23024
@@ -58,7 +58,7 @@
 
23025
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23026
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23027
       retarray->offset = 0;
 
23028
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23029
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23030
     }
 
23031
   else
 
23032
     {
 
23033
@@ -199,7 +199,7 @@
 
23034
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23035
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23036
       retarray->offset = 0;
 
23037
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23038
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23039
     }
 
23040
   else
 
23041
     {
 
23042
@@ -367,7 +367,7 @@
 
23043
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23044
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23045
       retarray->offset = 0;
 
23046
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23047
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23048
     }
 
23049
   else if (unlikely (compile_options.bounds_check))
 
23050
     {
 
23051
Index: libgfortran/generated/maxloc0_16_r16.c
 
23052
===================================================================
 
23053
--- a/src/libgfortran/generated/maxloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
23054
+++ b/src/libgfortran/generated/maxloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
23055
@@ -58,7 +58,7 @@
 
23056
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23057
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23058
       retarray->offset = 0;
 
23059
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23060
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23061
     }
 
23062
   else
 
23063
     {
 
23064
@@ -199,7 +199,7 @@
 
23065
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23066
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23067
       retarray->offset = 0;
 
23068
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23069
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23070
     }
 
23071
   else
 
23072
     {
 
23073
@@ -367,7 +367,7 @@
 
23074
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23075
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23076
       retarray->offset = 0;
 
23077
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23078
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23079
     }
 
23080
   else if (unlikely (compile_options.bounds_check))
 
23081
     {
 
23082
Index: libgfortran/generated/sum_c10.c
 
23083
===================================================================
 
23084
--- a/src/libgfortran/generated/sum_c10.c       (.../tags/gcc_4_8_3_release)
 
23085
+++ b/src/libgfortran/generated/sum_c10.c       (.../branches/gcc-4_8-branch)
 
23086
@@ -97,10 +97,9 @@
 
23087
       retarray->offset = 0;
 
23088
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23089
 
 
23090
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23091
-                  * extent[rank-1];
 
23092
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23093
 
 
23094
-      retarray->base_addr = xmalloc (alloc_size);
 
23095
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
23096
       if (alloc_size == 0)
 
23097
        {
 
23098
          /* Make sure we have a zero-sized array.  */
 
23099
@@ -272,8 +271,7 @@
 
23100
 
 
23101
        }
 
23102
 
 
23103
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23104
-                  * extent[rank-1];
 
23105
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23106
 
 
23107
       retarray->offset = 0;
 
23108
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23109
@@ -285,7 +283,7 @@
 
23110
          return;
 
23111
        }
 
23112
       else
 
23113
-       retarray->base_addr = xmalloc (alloc_size);
 
23114
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
23115
 
 
23116
     }
 
23117
   else
 
23118
@@ -430,8 +428,7 @@
 
23119
       retarray->offset = 0;
 
23120
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23121
 
 
23122
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23123
-                  * extent[rank-1];
 
23124
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23125
 
 
23126
       if (alloc_size == 0)
 
23127
        {
 
23128
@@ -440,7 +437,7 @@
 
23129
          return;
 
23130
        }
 
23131
       else
 
23132
-       retarray->base_addr = xmalloc (alloc_size);
 
23133
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
23134
     }
 
23135
   else
 
23136
     {
 
23137
Index: libgfortran/generated/iall_i4.c
 
23138
===================================================================
 
23139
--- a/src/libgfortran/generated/iall_i4.c       (.../tags/gcc_4_8_3_release)
 
23140
+++ b/src/libgfortran/generated/iall_i4.c       (.../branches/gcc-4_8-branch)
 
23141
@@ -97,10 +97,9 @@
 
23142
       retarray->offset = 0;
 
23143
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23144
 
 
23145
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23146
-                  * extent[rank-1];
 
23147
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23148
 
 
23149
-      retarray->base_addr = xmalloc (alloc_size);
 
23150
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23151
       if (alloc_size == 0)
 
23152
        {
 
23153
          /* Make sure we have a zero-sized array.  */
 
23154
@@ -272,8 +271,7 @@
 
23155
 
 
23156
        }
 
23157
 
 
23158
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23159
-                  * extent[rank-1];
 
23160
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23161
 
 
23162
       retarray->offset = 0;
 
23163
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23164
@@ -285,7 +283,7 @@
 
23165
          return;
 
23166
        }
 
23167
       else
 
23168
-       retarray->base_addr = xmalloc (alloc_size);
 
23169
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23170
 
 
23171
     }
 
23172
   else
 
23173
@@ -430,8 +428,7 @@
 
23174
       retarray->offset = 0;
 
23175
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23176
 
 
23177
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23178
-                  * extent[rank-1];
 
23179
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23180
 
 
23181
       if (alloc_size == 0)
 
23182
        {
 
23183
@@ -440,7 +437,7 @@
 
23184
          return;
 
23185
        }
 
23186
       else
 
23187
-       retarray->base_addr = xmalloc (alloc_size);
 
23188
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23189
     }
 
23190
   else
 
23191
     {
 
23192
Index: libgfortran/generated/minloc1_4_r16.c
 
23193
===================================================================
 
23194
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
23195
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
23196
@@ -98,10 +98,9 @@
 
23197
       retarray->offset = 0;
 
23198
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23199
 
 
23200
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23201
-                  * extent[rank-1];
 
23202
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23203
 
 
23204
-      retarray->base_addr = xmalloc (alloc_size);
 
23205
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23206
       if (alloc_size == 0)
 
23207
        {
 
23208
          /* Make sure we have a zero-sized array.  */
 
23209
@@ -294,8 +293,7 @@
 
23210
 
 
23211
        }
 
23212
 
 
23213
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23214
-                  * extent[rank-1];
 
23215
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23216
 
 
23217
       retarray->offset = 0;
 
23218
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23219
@@ -307,7 +305,7 @@
 
23220
          return;
 
23221
        }
 
23222
       else
 
23223
-       retarray->base_addr = xmalloc (alloc_size);
 
23224
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23225
 
 
23226
     }
 
23227
   else
 
23228
@@ -485,8 +483,7 @@
 
23229
       retarray->offset = 0;
 
23230
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23231
 
 
23232
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23233
-                  * extent[rank-1];
 
23234
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23235
 
 
23236
       if (alloc_size == 0)
 
23237
        {
 
23238
@@ -495,7 +492,7 @@
 
23239
          return;
 
23240
        }
 
23241
       else
 
23242
-       retarray->base_addr = xmalloc (alloc_size);
 
23243
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23244
     }
 
23245
   else
 
23246
     {
 
23247
Index: libgfortran/generated/maxloc0_8_r16.c
 
23248
===================================================================
 
23249
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
23250
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
23251
@@ -58,7 +58,7 @@
 
23252
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23253
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23254
       retarray->offset = 0;
 
23255
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23256
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23257
     }
 
23258
   else
 
23259
     {
 
23260
@@ -199,7 +199,7 @@
 
23261
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23262
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23263
       retarray->offset = 0;
 
23264
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23265
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23266
     }
 
23267
   else
 
23268
     {
 
23269
@@ -367,7 +367,7 @@
 
23270
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23271
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23272
       retarray->offset = 0;
 
23273
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23274
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23275
     }
 
23276
   else if (unlikely (compile_options.bounds_check))
 
23277
     {
 
23278
Index: libgfortran/generated/pack_r8.c
 
23279
===================================================================
 
23280
--- a/src/libgfortran/generated/pack_r8.c       (.../tags/gcc_4_8_3_release)
 
23281
+++ b/src/libgfortran/generated/pack_r8.c       (.../branches/gcc-4_8-branch)
 
23282
@@ -167,8 +167,8 @@
 
23283
 
 
23284
          ret->offset = 0;
 
23285
 
 
23286
-         /* xmalloc allocates a single byte for zero size.  */
 
23287
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
 
23288
+         /* xmallocarray allocates a single byte for zero size.  */
 
23289
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
 
23290
 
 
23291
          if (total == 0)
 
23292
            return;
 
23293
Index: libgfortran/generated/matmul_c10.c
 
23294
===================================================================
 
23295
--- a/src/libgfortran/generated/matmul_c10.c    (.../tags/gcc_4_8_3_release)
 
23296
+++ b/src/libgfortran/generated/matmul_c10.c    (.../branches/gcc-4_8-branch)
 
23297
@@ -124,7 +124,7 @@
 
23298
         }
 
23299
 
 
23300
       retarray->base_addr
 
23301
-       = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
 
23302
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
 
23303
       retarray->offset = 0;
 
23304
     }
 
23305
     else if (unlikely (compile_options.bounds_check))
 
23306
Index: libgfortran/generated/maxloc0_16_i4.c
 
23307
===================================================================
 
23308
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
23309
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
23310
@@ -58,7 +58,7 @@
 
23311
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23312
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23313
       retarray->offset = 0;
 
23314
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23315
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23316
     }
 
23317
   else
 
23318
     {
 
23319
@@ -199,7 +199,7 @@
 
23320
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23321
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23322
       retarray->offset = 0;
 
23323
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23324
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23325
     }
 
23326
   else
 
23327
     {
 
23328
@@ -367,7 +367,7 @@
 
23329
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23330
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23331
       retarray->offset = 0;
 
23332
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23333
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23334
     }
 
23335
   else if (unlikely (compile_options.bounds_check))
 
23336
     {
 
23337
Index: libgfortran/generated/pack_r16.c
 
23338
===================================================================
 
23339
--- a/src/libgfortran/generated/pack_r16.c      (.../tags/gcc_4_8_3_release)
 
23340
+++ b/src/libgfortran/generated/pack_r16.c      (.../branches/gcc-4_8-branch)
 
23341
@@ -167,8 +167,8 @@
 
23342
 
 
23343
          ret->offset = 0;
 
23344
 
 
23345
-         /* xmalloc allocates a single byte for zero size.  */
 
23346
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
 
23347
+         /* xmallocarray allocates a single byte for zero size.  */
 
23348
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
 
23349
 
 
23350
          if (total == 0)
 
23351
            return;
 
23352
Index: libgfortran/generated/minloc1_16_i8.c
 
23353
===================================================================
 
23354
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
23355
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
23356
@@ -98,10 +98,9 @@
 
23357
       retarray->offset = 0;
 
23358
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23359
 
 
23360
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23361
-                  * extent[rank-1];
 
23362
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23363
 
 
23364
-      retarray->base_addr = xmalloc (alloc_size);
 
23365
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23366
       if (alloc_size == 0)
 
23367
        {
 
23368
          /* Make sure we have a zero-sized array.  */
 
23369
@@ -294,8 +293,7 @@
 
23370
 
 
23371
        }
 
23372
 
 
23373
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23374
-                  * extent[rank-1];
 
23375
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23376
 
 
23377
       retarray->offset = 0;
 
23378
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23379
@@ -307,7 +305,7 @@
 
23380
          return;
 
23381
        }
 
23382
       else
 
23383
-       retarray->base_addr = xmalloc (alloc_size);
 
23384
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23385
 
 
23386
     }
 
23387
   else
 
23388
@@ -485,8 +483,7 @@
 
23389
       retarray->offset = 0;
 
23390
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23391
 
 
23392
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23393
-                  * extent[rank-1];
 
23394
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23395
 
 
23396
       if (alloc_size == 0)
 
23397
        {
 
23398
@@ -495,7 +492,7 @@
 
23399
          return;
 
23400
        }
 
23401
       else
 
23402
-       retarray->base_addr = xmalloc (alloc_size);
 
23403
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23404
     }
 
23405
   else
 
23406
     {
 
23407
Index: libgfortran/generated/minloc0_16_r10.c
 
23408
===================================================================
 
23409
--- a/src/libgfortran/generated/minloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
23410
+++ b/src/libgfortran/generated/minloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
23411
@@ -58,7 +58,7 @@
 
23412
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23413
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23414
       retarray->offset = 0;
 
23415
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23416
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23417
     }
 
23418
   else
 
23419
     {
 
23420
@@ -199,7 +199,7 @@
 
23421
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23422
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23423
       retarray->offset = 0;
 
23424
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23425
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23426
     }
 
23427
   else
 
23428
     {
 
23429
@@ -367,7 +367,7 @@
 
23430
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23431
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23432
       retarray->offset = 0;
 
23433
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23434
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23435
     }
 
23436
   else if (unlikely (compile_options.bounds_check))
 
23437
     {
 
23438
Index: libgfortran/generated/unpack_c4.c
 
23439
===================================================================
 
23440
--- a/src/libgfortran/generated/unpack_c4.c     (.../tags/gcc_4_8_3_release)
 
23441
+++ b/src/libgfortran/generated/unpack_c4.c     (.../branches/gcc-4_8-branch)
 
23442
@@ -99,7 +99,7 @@
 
23443
          rs *= extent[n];
 
23444
        }
 
23445
       ret->offset = 0;
 
23446
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
23447
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
23448
     }
 
23449
   else
 
23450
     {
 
23451
@@ -244,7 +244,7 @@
 
23452
          rs *= extent[n];
 
23453
        }
 
23454
       ret->offset = 0;
 
23455
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
23456
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
23457
     }
 
23458
   else
 
23459
     {
 
23460
Index: libgfortran/generated/iparity_i1.c
 
23461
===================================================================
 
23462
--- a/src/libgfortran/generated/iparity_i1.c    (.../tags/gcc_4_8_3_release)
 
23463
+++ b/src/libgfortran/generated/iparity_i1.c    (.../branches/gcc-4_8-branch)
 
23464
@@ -97,10 +97,9 @@
 
23465
       retarray->offset = 0;
 
23466
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23467
 
 
23468
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23469
-                  * extent[rank-1];
 
23470
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23471
 
 
23472
-      retarray->base_addr = xmalloc (alloc_size);
 
23473
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
23474
       if (alloc_size == 0)
 
23475
        {
 
23476
          /* Make sure we have a zero-sized array.  */
 
23477
@@ -272,8 +271,7 @@
 
23478
 
 
23479
        }
 
23480
 
 
23481
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23482
-                  * extent[rank-1];
 
23483
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23484
 
 
23485
       retarray->offset = 0;
 
23486
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23487
@@ -285,7 +283,7 @@
 
23488
          return;
 
23489
        }
 
23490
       else
 
23491
-       retarray->base_addr = xmalloc (alloc_size);
 
23492
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
23493
 
 
23494
     }
 
23495
   else
 
23496
@@ -430,8 +428,7 @@
 
23497
       retarray->offset = 0;
 
23498
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23499
 
 
23500
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23501
-                  * extent[rank-1];
 
23502
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23503
 
 
23504
       if (alloc_size == 0)
 
23505
        {
 
23506
@@ -440,7 +437,7 @@
 
23507
          return;
 
23508
        }
 
23509
       else
 
23510
-       retarray->base_addr = xmalloc (alloc_size);
 
23511
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
23512
     }
 
23513
   else
 
23514
     {
 
23515
Index: libgfortran/generated/product_c8.c
 
23516
===================================================================
 
23517
--- a/src/libgfortran/generated/product_c8.c    (.../tags/gcc_4_8_3_release)
 
23518
+++ b/src/libgfortran/generated/product_c8.c    (.../branches/gcc-4_8-branch)
 
23519
@@ -97,10 +97,9 @@
 
23520
       retarray->offset = 0;
 
23521
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23522
 
 
23523
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23524
-                  * extent[rank-1];
 
23525
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23526
 
 
23527
-      retarray->base_addr = xmalloc (alloc_size);
 
23528
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
23529
       if (alloc_size == 0)
 
23530
        {
 
23531
          /* Make sure we have a zero-sized array.  */
 
23532
@@ -272,8 +271,7 @@
 
23533
 
 
23534
        }
 
23535
 
 
23536
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23537
-                  * extent[rank-1];
 
23538
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23539
 
 
23540
       retarray->offset = 0;
 
23541
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23542
@@ -285,7 +283,7 @@
 
23543
          return;
 
23544
        }
 
23545
       else
 
23546
-       retarray->base_addr = xmalloc (alloc_size);
 
23547
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
23548
 
 
23549
     }
 
23550
   else
 
23551
@@ -430,8 +428,7 @@
 
23552
       retarray->offset = 0;
 
23553
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23554
 
 
23555
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23556
-                  * extent[rank-1];
 
23557
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23558
 
 
23559
       if (alloc_size == 0)
 
23560
        {
 
23561
@@ -440,7 +437,7 @@
 
23562
          return;
 
23563
        }
 
23564
       else
 
23565
-       retarray->base_addr = xmalloc (alloc_size);
 
23566
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
23567
     }
 
23568
   else
 
23569
     {
 
23570
Index: libgfortran/generated/in_pack_i16.c
 
23571
===================================================================
 
23572
--- a/src/libgfortran/generated/in_pack_i16.c   (.../tags/gcc_4_8_3_release)
 
23573
+++ b/src/libgfortran/generated/in_pack_i16.c   (.../branches/gcc-4_8-branch)
 
23574
@@ -76,7 +76,7 @@
 
23575
     return source->base_addr;
 
23576
 
 
23577
   /* Allocate storage for the destination.  */
 
23578
-  destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
 
23579
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
 
23580
   dest = destptr;
 
23581
   src = source->base_addr;
 
23582
   stride0 = stride[0];
 
23583
Index: libgfortran/generated/minloc0_8_i4.c
 
23584
===================================================================
 
23585
--- a/src/libgfortran/generated/minloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
23586
+++ b/src/libgfortran/generated/minloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
23587
@@ -58,7 +58,7 @@
 
23588
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23589
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23590
       retarray->offset = 0;
 
23591
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23592
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23593
     }
 
23594
   else
 
23595
     {
 
23596
@@ -199,7 +199,7 @@
 
23597
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23598
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23599
       retarray->offset = 0;
 
23600
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23601
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23602
     }
 
23603
   else
 
23604
     {
 
23605
@@ -367,7 +367,7 @@
 
23606
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23607
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23608
       retarray->offset = 0;
 
23609
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23610
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23611
     }
 
23612
   else if (unlikely (compile_options.bounds_check))
 
23613
     {
 
23614
Index: libgfortran/generated/matmul_c4.c
 
23615
===================================================================
 
23616
--- a/src/libgfortran/generated/matmul_c4.c     (.../tags/gcc_4_8_3_release)
 
23617
+++ b/src/libgfortran/generated/matmul_c4.c     (.../branches/gcc-4_8-branch)
 
23618
@@ -124,7 +124,7 @@
 
23619
         }
 
23620
 
 
23621
       retarray->base_addr
 
23622
-       = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
 
23623
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
 
23624
       retarray->offset = 0;
 
23625
     }
 
23626
     else if (unlikely (compile_options.bounds_check))
 
23627
Index: libgfortran/generated/reshape_i8.c
 
23628
===================================================================
 
23629
--- a/src/libgfortran/generated/reshape_i8.c    (.../tags/gcc_4_8_3_release)
 
23630
+++ b/src/libgfortran/generated/reshape_i8.c    (.../branches/gcc-4_8-branch)
 
23631
@@ -111,11 +111,11 @@
 
23632
       ret->offset = 0;
 
23633
 
 
23634
       if (unlikely (rs < 1))
 
23635
-        alloc_size = 1;
 
23636
+        alloc_size = 0;
 
23637
       else
 
23638
-        alloc_size = rs * sizeof (GFC_INTEGER_8);
 
23639
+        alloc_size = rs;
 
23640
 
 
23641
-      ret->base_addr = xmalloc (alloc_size);
 
23642
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23643
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23644
     }
 
23645
 
 
23646
Index: libgfortran/generated/in_pack_c8.c
 
23647
===================================================================
 
23648
--- a/src/libgfortran/generated/in_pack_c8.c    (.../tags/gcc_4_8_3_release)
 
23649
+++ b/src/libgfortran/generated/in_pack_c8.c    (.../branches/gcc-4_8-branch)
 
23650
@@ -76,7 +76,7 @@
 
23651
     return source->base_addr;
 
23652
 
 
23653
   /* Allocate storage for the destination.  */
 
23654
-  destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
 
23655
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
 
23656
   dest = destptr;
 
23657
   src = source->base_addr;
 
23658
   stride0 = stride[0];
 
23659
Index: libgfortran/generated/bessel_r10.c
 
23660
===================================================================
 
23661
--- a/src/libgfortran/generated/bessel_r10.c    (.../tags/gcc_4_8_3_release)
 
23662
+++ b/src/libgfortran/generated/bessel_r10.c    (.../branches/gcc-4_8-branch)
 
23663
@@ -55,7 +55,7 @@
 
23664
     {
 
23665
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
23666
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
23667
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
23668
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
23669
       ret->offset = 0;
 
23670
     }
 
23671
 
 
23672
@@ -122,7 +122,7 @@
 
23673
     {
 
23674
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
23675
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
23676
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
23677
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
23678
       ret->offset = 0;
 
23679
     }
 
23680
 
 
23681
@@ -162,7 +162,7 @@
 
23682
 
 
23683
   x2rev = GFC_REAL_10_LITERAL(2.)/x;
 
23684
 
 
23685
-  for (i = 2; i <= n1+n2; i++)
 
23686
+  for (i = 2; i <= n2 - n1; i++)
 
23687
     {
 
23688
 #if defined(GFC_REAL_10_INFINITY)
 
23689
       if (unlikely (last2 == -GFC_REAL_10_INFINITY))
 
23690
Index: libgfortran/generated/iall_i16.c
 
23691
===================================================================
 
23692
--- a/src/libgfortran/generated/iall_i16.c      (.../tags/gcc_4_8_3_release)
 
23693
+++ b/src/libgfortran/generated/iall_i16.c      (.../branches/gcc-4_8-branch)
 
23694
@@ -97,10 +97,9 @@
 
23695
       retarray->offset = 0;
 
23696
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23697
 
 
23698
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23699
-                  * extent[rank-1];
 
23700
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23701
 
 
23702
-      retarray->base_addr = xmalloc (alloc_size);
 
23703
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23704
       if (alloc_size == 0)
 
23705
        {
 
23706
          /* Make sure we have a zero-sized array.  */
 
23707
@@ -272,8 +271,7 @@
 
23708
 
 
23709
        }
 
23710
 
 
23711
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23712
-                  * extent[rank-1];
 
23713
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23714
 
 
23715
       retarray->offset = 0;
 
23716
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23717
@@ -285,7 +283,7 @@
 
23718
          return;
 
23719
        }
 
23720
       else
 
23721
-       retarray->base_addr = xmalloc (alloc_size);
 
23722
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23723
 
 
23724
     }
 
23725
   else
 
23726
@@ -430,8 +428,7 @@
 
23727
       retarray->offset = 0;
 
23728
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23729
 
 
23730
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23731
-                  * extent[rank-1];
 
23732
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23733
 
 
23734
       if (alloc_size == 0)
 
23735
        {
 
23736
@@ -440,7 +437,7 @@
 
23737
          return;
 
23738
        }
 
23739
       else
 
23740
-       retarray->base_addr = xmalloc (alloc_size);
 
23741
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23742
     }
 
23743
   else
 
23744
     {
 
23745
Index: libgfortran/generated/maxloc1_16_i1.c
 
23746
===================================================================
 
23747
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
23748
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
23749
@@ -98,10 +98,9 @@
 
23750
       retarray->offset = 0;
 
23751
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23752
 
 
23753
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23754
-                  * extent[rank-1];
 
23755
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23756
 
 
23757
-      retarray->base_addr = xmalloc (alloc_size);
 
23758
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23759
       if (alloc_size == 0)
 
23760
        {
 
23761
          /* Make sure we have a zero-sized array.  */
 
23762
@@ -294,8 +293,7 @@
 
23763
 
 
23764
        }
 
23765
 
 
23766
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23767
-                  * extent[rank-1];
 
23768
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23769
 
 
23770
       retarray->offset = 0;
 
23771
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23772
@@ -307,7 +305,7 @@
 
23773
          return;
 
23774
        }
 
23775
       else
 
23776
-       retarray->base_addr = xmalloc (alloc_size);
 
23777
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23778
 
 
23779
     }
 
23780
   else
 
23781
@@ -485,8 +483,7 @@
 
23782
       retarray->offset = 0;
 
23783
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23784
 
 
23785
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23786
-                  * extent[rank-1];
 
23787
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23788
 
 
23789
       if (alloc_size == 0)
 
23790
        {
 
23791
@@ -495,7 +492,7 @@
 
23792
          return;
 
23793
        }
 
23794
       else
 
23795
-       retarray->base_addr = xmalloc (alloc_size);
 
23796
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23797
     }
 
23798
   else
 
23799
     {
 
23800
Index: libgfortran/generated/reshape_i16.c
 
23801
===================================================================
 
23802
--- a/src/libgfortran/generated/reshape_i16.c   (.../tags/gcc_4_8_3_release)
 
23803
+++ b/src/libgfortran/generated/reshape_i16.c   (.../branches/gcc-4_8-branch)
 
23804
@@ -111,11 +111,11 @@
 
23805
       ret->offset = 0;
 
23806
 
 
23807
       if (unlikely (rs < 1))
 
23808
-        alloc_size = 1;
 
23809
+        alloc_size = 0;
 
23810
       else
 
23811
-        alloc_size = rs * sizeof (GFC_INTEGER_16);
 
23812
+        alloc_size = rs;
 
23813
 
 
23814
-      ret->base_addr = xmalloc (alloc_size);
 
23815
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23816
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23817
     }
 
23818
 
 
23819
Index: libgfortran/generated/count_16_l.c
 
23820
===================================================================
 
23821
--- a/src/libgfortran/generated/count_16_l.c    (.../tags/gcc_4_8_3_release)
 
23822
+++ b/src/libgfortran/generated/count_16_l.c    (.../branches/gcc-4_8-branch)
 
23823
@@ -101,8 +101,7 @@
 
23824
       retarray->offset = 0;
 
23825
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23826
 
 
23827
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23828
-                  * extent[rank-1];
 
23829
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23830
 
 
23831
       if (alloc_size == 0)
 
23832
        {
 
23833
@@ -111,7 +110,7 @@
 
23834
          return;
 
23835
        }
 
23836
       else
 
23837
-       retarray->base_addr = xmalloc (alloc_size);
 
23838
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23839
     }
 
23840
   else
 
23841
     {
 
23842
Index: libgfortran/generated/minloc1_8_i1.c
 
23843
===================================================================
 
23844
--- a/src/libgfortran/generated/minloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
23845
+++ b/src/libgfortran/generated/minloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
23846
@@ -98,10 +98,9 @@
 
23847
       retarray->offset = 0;
 
23848
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23849
 
 
23850
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23851
-                  * extent[rank-1];
 
23852
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23853
 
 
23854
-      retarray->base_addr = xmalloc (alloc_size);
 
23855
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23856
       if (alloc_size == 0)
 
23857
        {
 
23858
          /* Make sure we have a zero-sized array.  */
 
23859
@@ -294,8 +293,7 @@
 
23860
 
 
23861
        }
 
23862
 
 
23863
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23864
-                  * extent[rank-1];
 
23865
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23866
 
 
23867
       retarray->offset = 0;
 
23868
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23869
@@ -307,7 +305,7 @@
 
23870
          return;
 
23871
        }
 
23872
       else
 
23873
-       retarray->base_addr = xmalloc (alloc_size);
 
23874
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23875
 
 
23876
     }
 
23877
   else
 
23878
@@ -485,8 +483,7 @@
 
23879
       retarray->offset = 0;
 
23880
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23881
 
 
23882
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23883
-                  * extent[rank-1];
 
23884
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23885
 
 
23886
       if (alloc_size == 0)
 
23887
        {
 
23888
@@ -495,7 +492,7 @@
 
23889
          return;
 
23890
        }
 
23891
       else
 
23892
-       retarray->base_addr = xmalloc (alloc_size);
 
23893
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23894
     }
 
23895
   else
 
23896
     {
 
23897
Index: libgfortran/generated/maxloc1_4_i4.c
 
23898
===================================================================
 
23899
--- a/src/libgfortran/generated/maxloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
23900
+++ b/src/libgfortran/generated/maxloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
23901
@@ -98,10 +98,9 @@
 
23902
       retarray->offset = 0;
 
23903
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23904
 
 
23905
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23906
-                  * extent[rank-1];
 
23907
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23908
 
 
23909
-      retarray->base_addr = xmalloc (alloc_size);
 
23910
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23911
       if (alloc_size == 0)
 
23912
        {
 
23913
          /* Make sure we have a zero-sized array.  */
 
23914
@@ -294,8 +293,7 @@
 
23915
 
 
23916
        }
 
23917
 
 
23918
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23919
-                  * extent[rank-1];
 
23920
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23921
 
 
23922
       retarray->offset = 0;
 
23923
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23924
@@ -307,7 +305,7 @@
 
23925
          return;
 
23926
        }
 
23927
       else
 
23928
-       retarray->base_addr = xmalloc (alloc_size);
 
23929
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23930
 
 
23931
     }
 
23932
   else
 
23933
@@ -485,8 +483,7 @@
 
23934
       retarray->offset = 0;
 
23935
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23936
 
 
23937
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23938
-                  * extent[rank-1];
 
23939
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23940
 
 
23941
       if (alloc_size == 0)
 
23942
        {
 
23943
@@ -495,7 +492,7 @@
 
23944
          return;
 
23945
        }
 
23946
       else
 
23947
-       retarray->base_addr = xmalloc (alloc_size);
 
23948
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23949
     }
 
23950
   else
 
23951
     {
 
23952
Index: libgfortran/generated/maxval_i8.c
 
23953
===================================================================
 
23954
--- a/src/libgfortran/generated/maxval_i8.c     (.../tags/gcc_4_8_3_release)
 
23955
+++ b/src/libgfortran/generated/maxval_i8.c     (.../branches/gcc-4_8-branch)
 
23956
@@ -97,10 +97,9 @@
 
23957
       retarray->offset = 0;
 
23958
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23959
 
 
23960
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23961
-                  * extent[rank-1];
 
23962
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23963
 
 
23964
-      retarray->base_addr = xmalloc (alloc_size);
 
23965
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23966
       if (alloc_size == 0)
 
23967
        {
 
23968
          /* Make sure we have a zero-sized array.  */
 
23969
@@ -286,8 +285,7 @@
 
23970
 
 
23971
        }
 
23972
 
 
23973
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23974
-                  * extent[rank-1];
 
23975
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23976
 
 
23977
       retarray->offset = 0;
 
23978
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23979
@@ -299,7 +297,7 @@
 
23980
          return;
 
23981
        }
 
23982
       else
 
23983
-       retarray->base_addr = xmalloc (alloc_size);
 
23984
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23985
 
 
23986
     }
 
23987
   else
 
23988
@@ -472,8 +470,7 @@
 
23989
       retarray->offset = 0;
 
23990
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23991
 
 
23992
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23993
-                  * extent[rank-1];
 
23994
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23995
 
 
23996
       if (alloc_size == 0)
 
23997
        {
 
23998
@@ -482,7 +479,7 @@
 
23999
          return;
 
24000
        }
 
24001
       else
 
24002
-       retarray->base_addr = xmalloc (alloc_size);
 
24003
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24004
     }
 
24005
   else
 
24006
     {
 
24007
Index: libgfortran/generated/eoshift3_16.c
 
24008
===================================================================
 
24009
--- a/src/libgfortran/generated/eoshift3_16.c   (.../tags/gcc_4_8_3_release)
 
24010
+++ b/src/libgfortran/generated/eoshift3_16.c   (.../branches/gcc-4_8-branch)
 
24011
@@ -89,7 +89,7 @@
 
24012
     {
 
24013
       int i;
 
24014
 
 
24015
-      ret->base_addr = xmalloc (size * arraysize);
 
24016
+      ret->base_addr = xmallocarray (arraysize, size);
 
24017
       ret->offset = 0;
 
24018
       ret->dtype = array->dtype;
 
24019
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
24020
@@ -107,8 +107,8 @@
 
24021
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
24022
 
 
24023
         }
 
24024
-      /* xmalloc allocates a single byte for zero size.  */
 
24025
-      ret->base_addr = xmalloc (size * arraysize);
 
24026
+      /* xmallocarray allocates a single byte for zero size.  */
 
24027
+      ret->base_addr = xmallocarray (arraysize, size);
 
24028
 
 
24029
     }
 
24030
   else if (unlikely (compile_options.bounds_check))
 
24031
Index: libgfortran/generated/shape_i8.c
 
24032
===================================================================
 
24033
--- a/src/libgfortran/generated/shape_i8.c      (.../tags/gcc_4_8_3_release)
 
24034
+++ b/src/libgfortran/generated/shape_i8.c      (.../branches/gcc-4_8-branch)
 
24035
@@ -49,7 +49,7 @@
 
24036
     {
 
24037
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
24038
       ret->offset = 0;
 
24039
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24040
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24041
     }
 
24042
 
 
24043
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
24044
Index: libgfortran/generated/maxloc0_4_i16.c
 
24045
===================================================================
 
24046
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
24047
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
24048
@@ -58,7 +58,7 @@
 
24049
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24050
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24051
       retarray->offset = 0;
 
24052
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24053
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24054
     }
 
24055
   else
 
24056
     {
 
24057
@@ -199,7 +199,7 @@
 
24058
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24059
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24060
       retarray->offset = 0;
 
24061
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24062
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24063
     }
 
24064
   else
 
24065
     {
 
24066
@@ -367,7 +367,7 @@
 
24067
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24068
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24069
       retarray->offset = 0;
 
24070
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24071
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24072
     }
 
24073
   else if (unlikely (compile_options.bounds_check))
 
24074
     {
 
24075
Index: libgfortran/generated/maxloc1_4_r10.c
 
24076
===================================================================
 
24077
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
24078
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
24079
@@ -98,10 +98,9 @@
 
24080
       retarray->offset = 0;
 
24081
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24082
 
 
24083
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24084
-                  * extent[rank-1];
 
24085
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24086
 
 
24087
-      retarray->base_addr = xmalloc (alloc_size);
 
24088
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24089
       if (alloc_size == 0)
 
24090
        {
 
24091
          /* Make sure we have a zero-sized array.  */
 
24092
@@ -294,8 +293,7 @@
 
24093
 
 
24094
        }
 
24095
 
 
24096
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24097
-                  * extent[rank-1];
 
24098
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24099
 
 
24100
       retarray->offset = 0;
 
24101
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24102
@@ -307,7 +305,7 @@
 
24103
          return;
 
24104
        }
 
24105
       else
 
24106
-       retarray->base_addr = xmalloc (alloc_size);
 
24107
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24108
 
 
24109
     }
 
24110
   else
 
24111
@@ -485,8 +483,7 @@
 
24112
       retarray->offset = 0;
 
24113
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24114
 
 
24115
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24116
-                  * extent[rank-1];
 
24117
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24118
 
 
24119
       if (alloc_size == 0)
 
24120
        {
 
24121
@@ -495,7 +492,7 @@
 
24122
          return;
 
24123
        }
 
24124
       else
 
24125
-       retarray->base_addr = xmalloc (alloc_size);
 
24126
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
24127
     }
 
24128
   else
 
24129
     {
 
24130
Index: libgfortran/generated/maxloc1_8_i16.c
 
24131
===================================================================
 
24132
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
24133
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
24134
@@ -98,10 +98,9 @@
 
24135
       retarray->offset = 0;
 
24136
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24137
 
 
24138
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24139
-                  * extent[rank-1];
 
24140
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24141
 
 
24142
-      retarray->base_addr = xmalloc (alloc_size);
 
24143
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24144
       if (alloc_size == 0)
 
24145
        {
 
24146
          /* Make sure we have a zero-sized array.  */
 
24147
@@ -294,8 +293,7 @@
 
24148
 
 
24149
        }
 
24150
 
 
24151
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24152
-                  * extent[rank-1];
 
24153
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24154
 
 
24155
       retarray->offset = 0;
 
24156
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24157
@@ -307,7 +305,7 @@
 
24158
          return;
 
24159
        }
 
24160
       else
 
24161
-       retarray->base_addr = xmalloc (alloc_size);
 
24162
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24163
 
 
24164
     }
 
24165
   else
 
24166
@@ -485,8 +483,7 @@
 
24167
       retarray->offset = 0;
 
24168
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24169
 
 
24170
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24171
-                  * extent[rank-1];
 
24172
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24173
 
 
24174
       if (alloc_size == 0)
 
24175
        {
 
24176
@@ -495,7 +492,7 @@
 
24177
          return;
 
24178
        }
 
24179
       else
 
24180
-       retarray->base_addr = xmalloc (alloc_size);
 
24181
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24182
     }
 
24183
   else
 
24184
     {
 
24185
Index: libgfortran/generated/minloc0_8_r10.c
 
24186
===================================================================
 
24187
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
24188
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
24189
@@ -58,7 +58,7 @@
 
24190
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24191
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24192
       retarray->offset = 0;
 
24193
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24194
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24195
     }
 
24196
   else
 
24197
     {
 
24198
@@ -199,7 +199,7 @@
 
24199
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24200
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24201
       retarray->offset = 0;
 
24202
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24203
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24204
     }
 
24205
   else
 
24206
     {
 
24207
@@ -367,7 +367,7 @@
 
24208
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24209
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24210
       retarray->offset = 0;
 
24211
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24212
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24213
     }
 
24214
   else if (unlikely (compile_options.bounds_check))
 
24215
     {
 
24216
Index: libgfortran/generated/iparity_i2.c
 
24217
===================================================================
 
24218
--- a/src/libgfortran/generated/iparity_i2.c    (.../tags/gcc_4_8_3_release)
 
24219
+++ b/src/libgfortran/generated/iparity_i2.c    (.../branches/gcc-4_8-branch)
 
24220
@@ -97,10 +97,9 @@
 
24221
       retarray->offset = 0;
 
24222
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24223
 
 
24224
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24225
-                  * extent[rank-1];
 
24226
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24227
 
 
24228
-      retarray->base_addr = xmalloc (alloc_size);
 
24229
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
24230
       if (alloc_size == 0)
 
24231
        {
 
24232
          /* Make sure we have a zero-sized array.  */
 
24233
@@ -272,8 +271,7 @@
 
24234
 
 
24235
        }
 
24236
 
 
24237
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24238
-                  * extent[rank-1];
 
24239
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24240
 
 
24241
       retarray->offset = 0;
 
24242
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24243
@@ -285,7 +283,7 @@
 
24244
          return;
 
24245
        }
 
24246
       else
 
24247
-       retarray->base_addr = xmalloc (alloc_size);
 
24248
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
24249
 
 
24250
     }
 
24251
   else
 
24252
@@ -430,8 +428,7 @@
 
24253
       retarray->offset = 0;
 
24254
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24255
 
 
24256
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24257
-                  * extent[rank-1];
 
24258
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24259
 
 
24260
       if (alloc_size == 0)
 
24261
        {
 
24262
@@ -440,7 +437,7 @@
 
24263
          return;
 
24264
        }
 
24265
       else
 
24266
-       retarray->base_addr = xmalloc (alloc_size);
 
24267
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
24268
     }
 
24269
   else
 
24270
     {
 
24271
Index: libgfortran/generated/maxloc1_16_r4.c
 
24272
===================================================================
 
24273
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
24274
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
24275
@@ -98,10 +98,9 @@
 
24276
       retarray->offset = 0;
 
24277
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24278
 
 
24279
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24280
-                  * extent[rank-1];
 
24281
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24282
 
 
24283
-      retarray->base_addr = xmalloc (alloc_size);
 
24284
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24285
       if (alloc_size == 0)
 
24286
        {
 
24287
          /* Make sure we have a zero-sized array.  */
 
24288
@@ -294,8 +293,7 @@
 
24289
 
 
24290
        }
 
24291
 
 
24292
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24293
-                  * extent[rank-1];
 
24294
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24295
 
 
24296
       retarray->offset = 0;
 
24297
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24298
@@ -307,7 +305,7 @@
 
24299
          return;
 
24300
        }
 
24301
       else
 
24302
-       retarray->base_addr = xmalloc (alloc_size);
 
24303
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24304
 
 
24305
     }
 
24306
   else
 
24307
@@ -485,8 +483,7 @@
 
24308
       retarray->offset = 0;
 
24309
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24310
 
 
24311
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24312
-                  * extent[rank-1];
 
24313
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24314
 
 
24315
       if (alloc_size == 0)
 
24316
        {
 
24317
@@ -495,7 +492,7 @@
 
24318
          return;
 
24319
        }
 
24320
       else
 
24321
-       retarray->base_addr = xmalloc (alloc_size);
 
24322
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24323
     }
 
24324
   else
 
24325
     {
 
24326
Index: libgfortran/generated/maxloc0_16_r8.c
 
24327
===================================================================
 
24328
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
24329
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
24330
@@ -58,7 +58,7 @@
 
24331
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24332
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24333
       retarray->offset = 0;
 
24334
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24335
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24336
     }
 
24337
   else
 
24338
     {
 
24339
@@ -199,7 +199,7 @@
 
24340
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24341
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24342
       retarray->offset = 0;
 
24343
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
24344
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
24345
     }
 
24346
   else
 
24347
     {
 
24348
@@ -367,7 +367,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 if (unlikely (compile_options.bounds_check))
 
24356
     {
 
24357
Index: libgfortran/generated/sum_i16.c
 
24358
===================================================================
 
24359
--- a/src/libgfortran/generated/sum_i16.c       (.../tags/gcc_4_8_3_release)
 
24360
+++ b/src/libgfortran/generated/sum_i16.c       (.../branches/gcc-4_8-branch)
 
24361
@@ -97,10 +97,9 @@
 
24362
       retarray->offset = 0;
 
24363
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24364
 
 
24365
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24366
-                  * extent[rank-1];
 
24367
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24368
 
 
24369
-      retarray->base_addr = xmalloc (alloc_size);
 
24370
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24371
       if (alloc_size == 0)
 
24372
        {
 
24373
          /* Make sure we have a zero-sized array.  */
 
24374
@@ -272,8 +271,7 @@
 
24375
 
 
24376
        }
 
24377
 
 
24378
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24379
-                  * extent[rank-1];
 
24380
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24381
 
 
24382
       retarray->offset = 0;
 
24383
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24384
@@ -285,7 +283,7 @@
 
24385
          return;
 
24386
        }
 
24387
       else
 
24388
-       retarray->base_addr = xmalloc (alloc_size);
 
24389
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24390
 
 
24391
     }
 
24392
   else
 
24393
@@ -430,8 +428,7 @@
 
24394
       retarray->offset = 0;
 
24395
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24396
 
 
24397
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24398
-                  * extent[rank-1];
 
24399
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24400
 
 
24401
       if (alloc_size == 0)
 
24402
        {
 
24403
@@ -440,7 +437,7 @@
 
24404
          return;
 
24405
        }
 
24406
       else
 
24407
-       retarray->base_addr = xmalloc (alloc_size);
 
24408
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24409
     }
 
24410
   else
 
24411
     {
 
24412
Index: libgfortran/generated/maxloc0_4_i8.c
 
24413
===================================================================
 
24414
--- a/src/libgfortran/generated/maxloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
24415
+++ b/src/libgfortran/generated/maxloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
24416
@@ -58,7 +58,7 @@
 
24417
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24418
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24419
       retarray->offset = 0;
 
24420
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24421
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24422
     }
 
24423
   else
 
24424
     {
 
24425
@@ -199,7 +199,7 @@
 
24426
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24427
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24428
       retarray->offset = 0;
 
24429
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24430
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24431
     }
 
24432
   else
 
24433
     {
 
24434
@@ -367,7 +367,7 @@
 
24435
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24436
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24437
       retarray->offset = 0;
 
24438
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
24439
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
24440
     }
 
24441
   else if (unlikely (compile_options.bounds_check))
 
24442
     {
 
24443
Index: libgfortran/generated/pack_c16.c
 
24444
===================================================================
 
24445
--- a/src/libgfortran/generated/pack_c16.c      (.../tags/gcc_4_8_3_release)
 
24446
+++ b/src/libgfortran/generated/pack_c16.c      (.../branches/gcc-4_8-branch)
 
24447
@@ -167,8 +167,8 @@
 
24448
 
 
24449
          ret->offset = 0;
 
24450
 
 
24451
-         /* xmalloc allocates a single byte for zero size.  */
 
24452
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
 
24453
+         /* xmallocarray allocates a single byte for zero size.  */
 
24454
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
 
24455
 
 
24456
          if (total == 0)
 
24457
            return;
 
24458
Index: libgfortran/generated/maxloc1_16_i16.c
 
24459
===================================================================
 
24460
--- a/src/libgfortran/generated/maxloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
24461
+++ b/src/libgfortran/generated/maxloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
24462
@@ -98,10 +98,9 @@
 
24463
       retarray->offset = 0;
 
24464
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24465
 
 
24466
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24467
-                  * extent[rank-1];
 
24468
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24469
 
 
24470
-      retarray->base_addr = xmalloc (alloc_size);
 
24471
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24472
       if (alloc_size == 0)
 
24473
        {
 
24474
          /* Make sure we have a zero-sized array.  */
 
24475
@@ -294,8 +293,7 @@
 
24476
 
 
24477
        }
 
24478
 
 
24479
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24480
-                  * extent[rank-1];
 
24481
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24482
 
 
24483
       retarray->offset = 0;
 
24484
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24485
@@ -307,7 +305,7 @@
 
24486
          return;
 
24487
        }
 
24488
       else
 
24489
-       retarray->base_addr = xmalloc (alloc_size);
 
24490
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24491
 
 
24492
     }
 
24493
   else
 
24494
@@ -485,8 +483,7 @@
 
24495
       retarray->offset = 0;
 
24496
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24497
 
 
24498
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24499
-                  * extent[rank-1];
 
24500
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24501
 
 
24502
       if (alloc_size == 0)
 
24503
        {
 
24504
@@ -495,7 +492,7 @@
 
24505
          return;
 
24506
        }
 
24507
       else
 
24508
-       retarray->base_addr = xmalloc (alloc_size);
 
24509
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24510
     }
 
24511
   else
 
24512
     {
 
24513
Index: libgfortran/generated/minloc1_8_r4.c
 
24514
===================================================================
 
24515
--- a/src/libgfortran/generated/minloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
24516
+++ b/src/libgfortran/generated/minloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
24517
@@ -98,10 +98,9 @@
 
24518
       retarray->offset = 0;
 
24519
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24520
 
 
24521
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24522
-                  * extent[rank-1];
 
24523
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24524
 
 
24525
-      retarray->base_addr = xmalloc (alloc_size);
 
24526
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24527
       if (alloc_size == 0)
 
24528
        {
 
24529
          /* Make sure we have a zero-sized array.  */
 
24530
@@ -294,8 +293,7 @@
 
24531
 
 
24532
        }
 
24533
 
 
24534
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24535
-                  * extent[rank-1];
 
24536
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24537
 
 
24538
       retarray->offset = 0;
 
24539
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24540
@@ -307,7 +305,7 @@
 
24541
          return;
 
24542
        }
 
24543
       else
 
24544
-       retarray->base_addr = xmalloc (alloc_size);
 
24545
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24546
 
 
24547
     }
 
24548
   else
 
24549
@@ -485,8 +483,7 @@
 
24550
       retarray->offset = 0;
 
24551
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24552
 
 
24553
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24554
-                  * extent[rank-1];
 
24555
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24556
 
 
24557
       if (alloc_size == 0)
 
24558
        {
 
24559
@@ -495,7 +492,7 @@
 
24560
          return;
 
24561
        }
 
24562
       else
 
24563
-       retarray->base_addr = xmalloc (alloc_size);
 
24564
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24565
     }
 
24566
   else
 
24567
     {
 
24568
Index: libgfortran/generated/sum_c8.c
 
24569
===================================================================
 
24570
--- a/src/libgfortran/generated/sum_c8.c        (.../tags/gcc_4_8_3_release)
 
24571
+++ b/src/libgfortran/generated/sum_c8.c        (.../branches/gcc-4_8-branch)
 
24572
@@ -97,10 +97,9 @@
 
24573
       retarray->offset = 0;
 
24574
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24575
 
 
24576
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24577
-                  * extent[rank-1];
 
24578
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24579
 
 
24580
-      retarray->base_addr = xmalloc (alloc_size);
 
24581
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24582
       if (alloc_size == 0)
 
24583
        {
 
24584
          /* Make sure we have a zero-sized array.  */
 
24585
@@ -272,8 +271,7 @@
 
24586
 
 
24587
        }
 
24588
 
 
24589
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24590
-                  * extent[rank-1];
 
24591
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24592
 
 
24593
       retarray->offset = 0;
 
24594
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24595
@@ -285,7 +283,7 @@
 
24596
          return;
 
24597
        }
 
24598
       else
 
24599
-       retarray->base_addr = xmalloc (alloc_size);
 
24600
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24601
 
 
24602
     }
 
24603
   else
 
24604
@@ -430,8 +428,7 @@
 
24605
       retarray->offset = 0;
 
24606
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24607
 
 
24608
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24609
-                  * extent[rank-1];
 
24610
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24611
 
 
24612
       if (alloc_size == 0)
 
24613
        {
 
24614
@@ -440,7 +437,7 @@
 
24615
          return;
 
24616
        }
 
24617
       else
 
24618
-       retarray->base_addr = xmalloc (alloc_size);
 
24619
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24620
     }
 
24621
   else
 
24622
     {
 
24623
Index: libgfortran/generated/maxloc1_16_i2.c
 
24624
===================================================================
 
24625
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
24626
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
24627
@@ -98,10 +98,9 @@
 
24628
       retarray->offset = 0;
 
24629
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24630
 
 
24631
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24632
-                  * extent[rank-1];
 
24633
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24634
 
 
24635
-      retarray->base_addr = xmalloc (alloc_size);
 
24636
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24637
       if (alloc_size == 0)
 
24638
        {
 
24639
          /* Make sure we have a zero-sized array.  */
 
24640
@@ -294,8 +293,7 @@
 
24641
 
 
24642
        }
 
24643
 
 
24644
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24645
-                  * extent[rank-1];
 
24646
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24647
 
 
24648
       retarray->offset = 0;
 
24649
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24650
@@ -307,7 +305,7 @@
 
24651
          return;
 
24652
        }
 
24653
       else
 
24654
-       retarray->base_addr = xmalloc (alloc_size);
 
24655
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24656
 
 
24657
     }
 
24658
   else
 
24659
@@ -485,8 +483,7 @@
 
24660
       retarray->offset = 0;
 
24661
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24662
 
 
24663
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24664
-                  * extent[rank-1];
 
24665
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24666
 
 
24667
       if (alloc_size == 0)
 
24668
        {
 
24669
@@ -495,7 +492,7 @@
 
24670
          return;
 
24671
        }
 
24672
       else
 
24673
-       retarray->base_addr = xmalloc (alloc_size);
 
24674
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24675
     }
 
24676
   else
 
24677
     {
 
24678
Index: libgfortran/generated/parity_l1.c
 
24679
===================================================================
 
24680
--- a/src/libgfortran/generated/parity_l1.c     (.../tags/gcc_4_8_3_release)
 
24681
+++ b/src/libgfortran/generated/parity_l1.c     (.../branches/gcc-4_8-branch)
 
24682
@@ -98,10 +98,9 @@
 
24683
       retarray->offset = 0;
 
24684
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24685
 
 
24686
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24687
-                  * extent[rank-1];
 
24688
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24689
 
 
24690
-      retarray->base_addr = xmalloc (alloc_size);
 
24691
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
24692
       if (alloc_size == 0)
 
24693
        {
 
24694
          /* Make sure we have a zero-sized array.  */
 
24695
Index: libgfortran/generated/maxval_i16.c
 
24696
===================================================================
 
24697
--- a/src/libgfortran/generated/maxval_i16.c    (.../tags/gcc_4_8_3_release)
 
24698
+++ b/src/libgfortran/generated/maxval_i16.c    (.../branches/gcc-4_8-branch)
 
24699
@@ -97,10 +97,9 @@
 
24700
       retarray->offset = 0;
 
24701
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24702
 
 
24703
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24704
-                  * extent[rank-1];
 
24705
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24706
 
 
24707
-      retarray->base_addr = xmalloc (alloc_size);
 
24708
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24709
       if (alloc_size == 0)
 
24710
        {
 
24711
          /* Make sure we have a zero-sized array.  */
 
24712
@@ -286,8 +285,7 @@
 
24713
 
 
24714
        }
 
24715
 
 
24716
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24717
-                  * extent[rank-1];
 
24718
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24719
 
 
24720
       retarray->offset = 0;
 
24721
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24722
@@ -299,7 +297,7 @@
 
24723
          return;
 
24724
        }
 
24725
       else
 
24726
-       retarray->base_addr = xmalloc (alloc_size);
 
24727
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24728
 
 
24729
     }
 
24730
   else
 
24731
@@ -472,8 +470,7 @@
 
24732
       retarray->offset = 0;
 
24733
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24734
 
 
24735
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24736
-                  * extent[rank-1];
 
24737
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24738
 
 
24739
       if (alloc_size == 0)
 
24740
        {
 
24741
@@ -482,7 +479,7 @@
 
24742
          return;
 
24743
        }
 
24744
       else
 
24745
-       retarray->base_addr = xmalloc (alloc_size);
 
24746
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24747
     }
 
24748
   else
 
24749
     {
 
24750
Index: libgfortran/generated/spread_c8.c
 
24751
===================================================================
 
24752
--- a/src/libgfortran/generated/spread_c8.c     (.../tags/gcc_4_8_3_release)
 
24753
+++ b/src/libgfortran/generated/spread_c8.c     (.../branches/gcc-4_8-branch)
 
24754
@@ -101,8 +101,8 @@
 
24755
        }
 
24756
       ret->offset = 0;
 
24757
 
 
24758
-      /* xmalloc allocates a single byte for zero size.  */
 
24759
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
 
24760
+      /* xmallocarray allocates a single byte for zero size.  */
 
24761
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
 
24762
       if (rs <= 0)
 
24763
         return;
 
24764
     }
 
24765
@@ -244,7 +244,7 @@
 
24766
 
 
24767
   if (ret->base_addr == NULL)
 
24768
     {
 
24769
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
 
24770
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
 
24771
       ret->offset = 0;
 
24772
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
24773
     }
 
24774
Index: libgfortran/generated/matmul_i16.c
 
24775
===================================================================
 
24776
--- a/src/libgfortran/generated/matmul_i16.c    (.../tags/gcc_4_8_3_release)
 
24777
+++ b/src/libgfortran/generated/matmul_i16.c    (.../branches/gcc-4_8-branch)
 
24778
@@ -124,7 +124,7 @@
 
24779
         }
 
24780
 
 
24781
       retarray->base_addr
 
24782
-       = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
 
24783
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
 
24784
       retarray->offset = 0;
 
24785
     }
 
24786
     else if (unlikely (compile_options.bounds_check))
 
24787
Index: libgfortran/generated/pack_i8.c
 
24788
===================================================================
 
24789
--- a/src/libgfortran/generated/pack_i8.c       (.../tags/gcc_4_8_3_release)
 
24790
+++ b/src/libgfortran/generated/pack_i8.c       (.../branches/gcc-4_8-branch)
 
24791
@@ -167,8 +167,8 @@
 
24792
 
 
24793
          ret->offset = 0;
 
24794
 
 
24795
-         /* xmalloc allocates a single byte for zero size.  */
 
24796
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
 
24797
+         /* xmallocarray allocates a single byte for zero size.  */
 
24798
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
 
24799
 
 
24800
          if (total == 0)
 
24801
            return;
 
24802
Index: libgfortran/generated/any_l1.c
 
24803
===================================================================
 
24804
--- a/src/libgfortran/generated/any_l1.c        (.../tags/gcc_4_8_3_release)
 
24805
+++ b/src/libgfortran/generated/any_l1.c        (.../branches/gcc-4_8-branch)
 
24806
@@ -101,8 +101,7 @@
 
24807
       retarray->offset = 0;
 
24808
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24809
 
 
24810
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24811
-                  * extent[rank-1];
 
24812
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24813
 
 
24814
       if (alloc_size == 0)
 
24815
        {
 
24816
@@ -111,7 +110,7 @@
 
24817
          return;
 
24818
        }
 
24819
       else
 
24820
-       retarray->base_addr = xmalloc (alloc_size);
 
24821
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
24822
     }
 
24823
   else
 
24824
     {
 
24825
Index: libgfortran/generated/minloc1_8_i2.c
 
24826
===================================================================
 
24827
--- a/src/libgfortran/generated/minloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
24828
+++ b/src/libgfortran/generated/minloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
24829
@@ -98,10 +98,9 @@
 
24830
       retarray->offset = 0;
 
24831
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24832
 
 
24833
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24834
-                  * extent[rank-1];
 
24835
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24836
 
 
24837
-      retarray->base_addr = xmalloc (alloc_size);
 
24838
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24839
       if (alloc_size == 0)
 
24840
        {
 
24841
          /* Make sure we have a zero-sized array.  */
 
24842
@@ -294,8 +293,7 @@
 
24843
 
 
24844
        }
 
24845
 
 
24846
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24847
-                  * extent[rank-1];
 
24848
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24849
 
 
24850
       retarray->offset = 0;
 
24851
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24852
@@ -307,7 +305,7 @@
 
24853
          return;
 
24854
        }
 
24855
       else
 
24856
-       retarray->base_addr = xmalloc (alloc_size);
 
24857
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24858
 
 
24859
     }
 
24860
   else
 
24861
@@ -485,8 +483,7 @@
 
24862
       retarray->offset = 0;
 
24863
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24864
 
 
24865
-      alloc_size = sizeof (GFC_INTEGER_8) * 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
@@ -495,7 +492,7 @@
 
24872
          return;
 
24873
        }
 
24874
       else
 
24875
-       retarray->base_addr = xmalloc (alloc_size);
 
24876
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24877
     }
 
24878
   else
 
24879
     {
 
24880
Index: libgfortran/generated/minloc0_8_r8.c
 
24881
===================================================================
 
24882
--- a/src/libgfortran/generated/minloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
24883
+++ b/src/libgfortran/generated/minloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
24884
@@ -58,7 +58,7 @@
 
24885
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24886
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24887
       retarray->offset = 0;
 
24888
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24889
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24890
     }
 
24891
   else
 
24892
     {
 
24893
@@ -199,7 +199,7 @@
 
24894
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24895
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24896
       retarray->offset = 0;
 
24897
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24898
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24899
     }
 
24900
   else
 
24901
     {
 
24902
@@ -367,7 +367,7 @@
 
24903
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24904
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24905
       retarray->offset = 0;
 
24906
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24907
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24908
     }
 
24909
   else if (unlikely (compile_options.bounds_check))
 
24910
     {
 
24911
Index: libgfortran/generated/matmul_l8.c
 
24912
===================================================================
 
24913
--- a/src/libgfortran/generated/matmul_l8.c     (.../tags/gcc_4_8_3_release)
 
24914
+++ b/src/libgfortran/generated/matmul_l8.c     (.../branches/gcc-4_8-branch)
 
24915
@@ -88,7 +88,7 @@
 
24916
         }
 
24917
           
 
24918
       retarray->base_addr
 
24919
-       = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
 
24920
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
 
24921
       retarray->offset = 0;
 
24922
     }
 
24923
     else if (unlikely (compile_options.bounds_check))
 
24924
Index: libgfortran/generated/product_r10.c
 
24925
===================================================================
 
24926
--- a/src/libgfortran/generated/product_r10.c   (.../tags/gcc_4_8_3_release)
 
24927
+++ b/src/libgfortran/generated/product_r10.c   (.../branches/gcc-4_8-branch)
 
24928
@@ -97,10 +97,9 @@
 
24929
       retarray->offset = 0;
 
24930
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24931
 
 
24932
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24933
-                  * extent[rank-1];
 
24934
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24935
 
 
24936
-      retarray->base_addr = xmalloc (alloc_size);
 
24937
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24938
       if (alloc_size == 0)
 
24939
        {
 
24940
          /* Make sure we have a zero-sized array.  */
 
24941
@@ -272,8 +271,7 @@
 
24942
 
 
24943
        }
 
24944
 
 
24945
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24946
-                  * extent[rank-1];
 
24947
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24948
 
 
24949
       retarray->offset = 0;
 
24950
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24951
@@ -285,7 +283,7 @@
 
24952
          return;
 
24953
        }
 
24954
       else
 
24955
-       retarray->base_addr = xmalloc (alloc_size);
 
24956
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24957
 
 
24958
     }
 
24959
   else
 
24960
@@ -430,8 +428,7 @@
 
24961
       retarray->offset = 0;
 
24962
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24963
 
 
24964
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24965
-                  * extent[rank-1];
 
24966
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24967
 
 
24968
       if (alloc_size == 0)
 
24969
        {
 
24970
@@ -440,7 +437,7 @@
 
24971
          return;
 
24972
        }
 
24973
       else
 
24974
-       retarray->base_addr = xmalloc (alloc_size);
 
24975
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24976
     }
 
24977
   else
 
24978
     {
 
24979
Index: libgfortran/generated/product_i1.c
 
24980
===================================================================
 
24981
--- a/src/libgfortran/generated/product_i1.c    (.../tags/gcc_4_8_3_release)
 
24982
+++ b/src/libgfortran/generated/product_i1.c    (.../branches/gcc-4_8-branch)
 
24983
@@ -97,10 +97,9 @@
 
24984
       retarray->offset = 0;
 
24985
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24986
 
 
24987
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24988
-                  * extent[rank-1];
 
24989
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24990
 
 
24991
-      retarray->base_addr = xmalloc (alloc_size);
 
24992
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24993
       if (alloc_size == 0)
 
24994
        {
 
24995
          /* Make sure we have a zero-sized array.  */
 
24996
@@ -272,8 +271,7 @@
 
24997
 
 
24998
        }
 
24999
 
 
25000
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25001
-                  * extent[rank-1];
 
25002
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25003
 
 
25004
       retarray->offset = 0;
 
25005
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25006
@@ -285,7 +283,7 @@
 
25007
          return;
 
25008
        }
 
25009
       else
 
25010
-       retarray->base_addr = xmalloc (alloc_size);
 
25011
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
25012
 
 
25013
     }
 
25014
   else
 
25015
@@ -430,8 +428,7 @@
 
25016
       retarray->offset = 0;
 
25017
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25018
 
 
25019
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25020
-                  * extent[rank-1];
 
25021
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25022
 
 
25023
       if (alloc_size == 0)
 
25024
        {
 
25025
@@ -440,7 +437,7 @@
 
25026
          return;
 
25027
        }
 
25028
       else
 
25029
-       retarray->base_addr = xmalloc (alloc_size);
 
25030
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
25031
     }
 
25032
   else
 
25033
     {
 
25034
Index: libgfortran/generated/all_l8.c
 
25035
===================================================================
 
25036
--- a/src/libgfortran/generated/all_l8.c        (.../tags/gcc_4_8_3_release)
 
25037
+++ b/src/libgfortran/generated/all_l8.c        (.../branches/gcc-4_8-branch)
 
25038
@@ -101,8 +101,7 @@
 
25039
       retarray->offset = 0;
 
25040
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
25041
 
 
25042
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
25043
-                  * extent[rank-1];
 
25044
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
25045
 
 
25046
       if (alloc_size == 0)
 
25047
        {
 
25048
@@ -111,7 +110,7 @@
 
25049
          return;
 
25050
        }
 
25051
       else
 
25052
-       retarray->base_addr = xmalloc (alloc_size);
 
25053
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
25054
     }
 
25055
   else
 
25056
     {
 
25057
Index: libgfortran/generated/in_pack_r16.c
 
25058
===================================================================
 
25059
--- a/src/libgfortran/generated/in_pack_r16.c   (.../tags/gcc_4_8_3_release)
 
25060
+++ b/src/libgfortran/generated/in_pack_r16.c   (.../branches/gcc-4_8-branch)
 
25061
@@ -76,7 +76,7 @@
 
25062
     return source->base_addr;
 
25063
 
 
25064
   /* Allocate storage for the destination.  */
 
25065
-  destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
 
25066
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
 
25067
   dest = destptr;
 
25068
   src = source->base_addr;
 
25069
   stride0 = stride[0];
 
25070
Index: libgfortran/generated/in_pack_i1.c
 
25071
===================================================================
 
25072
--- a/src/libgfortran/generated/in_pack_i1.c    (.../tags/gcc_4_8_3_release)
 
25073
+++ b/src/libgfortran/generated/in_pack_i1.c    (.../branches/gcc-4_8-branch)
 
25074
@@ -76,7 +76,7 @@
 
25075
     return source->base_addr;
 
25076
 
 
25077
   /* Allocate storage for the destination.  */
 
25078
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
 
25079
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
 
25080
   dest = destptr;
 
25081
   src = source->base_addr;
 
25082
   stride0 = stride[0];
 
25083
Index: libgfortran/libgfortran.h
 
25084
===================================================================
 
25085
--- a/src/libgfortran/libgfortran.h     (.../tags/gcc_4_8_3_release)
 
25086
+++ b/src/libgfortran/libgfortran.h     (.../branches/gcc-4_8-branch)
 
25087
@@ -751,6 +751,9 @@
 
25088
 extern void *xmalloc (size_t) __attribute__ ((malloc));
 
25089
 internal_proto(xmalloc);
 
25090
 
 
25091
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
 
25092
+internal_proto(xmallocarray);
 
25093
+
 
25094
 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
 
25095
 internal_proto(xcalloc);
 
25096
 
 
25097
Index: libgfortran/config.h.in
 
25098
===================================================================
 
25099
--- a/src/libgfortran/config.h.in       (.../tags/gcc_4_8_3_release)
 
25100
+++ b/src/libgfortran/config.h.in       (.../branches/gcc-4_8-branch)
 
25101
@@ -711,6 +711,9 @@
 
25102
 /* Define to 1 if you have the `strtof' function. */
 
25103
 #undef HAVE_STRTOF
 
25104
 
 
25105
+/* Define to 1 if you have the `strtok_r' function. */
 
25106
+#undef HAVE_STRTOK_R
 
25107
+
 
25108
 /* Define to 1 if you have the `strtold' function. */
 
25109
 #undef HAVE_STRTOLD
 
25110
 
 
25111
Index: libgfortran/io/list_read.c
 
25112
===================================================================
 
25113
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_8_3_release)
 
25114
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_8-branch)
 
25115
@@ -2354,7 +2354,7 @@
 
25116
 {
 
25117
   index_type len = strlen (nl->var_name) + 1;
 
25118
   int dim;
 
25119
-  char * ext_name = (char*)xmalloc (len + 1);
 
25120
+  char * ext_name = xmalloc (len + 1);
 
25121
   memcpy (ext_name, nl->var_name, len-1);
 
25122
   memcpy (ext_name + len - 1, "%", 2);
 
25123
   for (nl = nl->next; nl; nl = nl->next)
 
25124
Index: libgfortran/io/unit.c
 
25125
===================================================================
 
25126
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
 
25127
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
 
25128
@@ -455,7 +455,7 @@
 
25129
     {
 
25130
       iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
 
25131
       iunit->ls = (array_loop_spec *)
 
25132
-       xmalloc (iunit->rank * sizeof (array_loop_spec));
 
25133
+       xmallocarray (iunit->rank, sizeof (array_loop_spec));
 
25134
       dtp->internal_unit_len *=
 
25135
        init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
 
25136
 
 
25137
Index: libgfortran/io/unix.c
 
25138
===================================================================
 
25139
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
 
25140
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
 
25141
@@ -407,7 +407,9 @@
 
25142
 {
 
25143
   int retval;
 
25144
   
 
25145
-  if (s->fd != STDOUT_FILENO
 
25146
+  if (s->fd == -1)
 
25147
+    retval = -1;
 
25148
+  else if (s->fd != STDOUT_FILENO
 
25149
       && s->fd != STDERR_FILENO
 
25150
       && s->fd != STDIN_FILENO)
 
25151
     retval = close (s->fd);
 
25152
@@ -983,7 +985,15 @@
 
25153
 
 
25154
   /* Get the current length of the file. */
 
25155
 
 
25156
-  fstat (fd, &statbuf);
 
25157
+  if (fstat (fd, &statbuf) == -1)
 
25158
+    {
 
25159
+      s->st_dev = s->st_ino = -1;
 
25160
+      s->file_length = 0;
 
25161
+      if (errno == EBADF)
 
25162
+       s->fd = -1;
 
25163
+      raw_init (s);
 
25164
+      return (stream *) s;
 
25165
+    }
 
25166
 
 
25167
   s->st_dev = statbuf.st_dev;
 
25168
   s->st_ino = statbuf.st_ino;
 
25169
Index: libgfortran/io/transfer.c
 
25170
===================================================================
 
25171
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_8_3_release)
 
25172
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_8-branch)
 
25173
@@ -3776,9 +3776,9 @@
 
25174
   if (nml->var_rank > 0)
 
25175
     {
 
25176
       nml->dim = (descriptor_dimension*)
 
25177
-                  xmalloc (nml->var_rank * sizeof (descriptor_dimension));
 
25178
+       xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
 
25179
       nml->ls = (array_loop_spec*)
 
25180
-                 xmalloc (nml->var_rank * sizeof (array_loop_spec));
 
25181
+       xmallocarray (nml->var_rank, sizeof (array_loop_spec));
 
25182
     }
 
25183
   else
 
25184
     {
 
25185
Index: libgfortran/io/write.c
 
25186
===================================================================
 
25187
--- a/src/libgfortran/io/write.c        (.../tags/gcc_4_8_3_release)
 
25188
+++ b/src/libgfortran/io/write.c        (.../branches/gcc-4_8-branch)
 
25189
@@ -1863,7 +1863,7 @@
 
25190
              base_var_name_len = base ? strlen (base->var_name) : 0;
 
25191
              ext_name_len = base_name_len + base_var_name_len 
 
25192
                + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
 
25193
-             ext_name = (char*)xmalloc (ext_name_len);
 
25194
+             ext_name = xmalloc (ext_name_len);
 
25195
 
 
25196
              memcpy (ext_name, base_name, base_name_len);
 
25197
              clen = strlen (obj->var_name + base_var_name_len);
 
25198
@@ -1892,7 +1892,7 @@
 
25199
              /* Now obj_name.  */
 
25200
 
 
25201
              obj_name_len = strlen (obj->var_name) + 1;
 
25202
-             obj_name = xmalloc (obj_name_len+1);
 
25203
+             obj_name = xmalloc (obj_name_len + 1);
 
25204
              memcpy (obj_name, obj->var_name, obj_name_len-1);
 
25205
              memcpy (obj_name + obj_name_len-1, "%", 2);
 
25206
 
 
25207
Index: libada/Makefile.in
 
25208
===================================================================
 
25209
--- a/src/libada/Makefile.in    (.../tags/gcc_4_8_3_release)
 
25210
+++ b/src/libada/Makefile.in    (.../branches/gcc-4_8-branch)
 
25211
@@ -60,7 +60,7 @@
 
25212
 PICFLAG = @PICFLAG@
 
25213
 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
 
25214
 GNATLIBCFLAGS= -g -O2
 
25215
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
 
25216
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
 
25217
        -fexceptions -DIN_RTS @have_getipinfo@
 
25218
 
 
25219
 host_subdir = @host_subdir@
 
25220
Index: libada/ChangeLog
 
25221
===================================================================
 
25222
--- a/src/libada/ChangeLog      (.../tags/gcc_4_8_3_release)
 
25223
+++ b/src/libada/ChangeLog      (.../branches/gcc-4_8-branch)
 
25224
@@ -1,3 +1,7 @@
 
25225
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
25226
+
 
25227
+       * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
 
25228
+
 
25229
 2014-05-22  Release Manager
 
25230
 
 
25231
        * GCC 4.8.3 released.
 
25232
Index: libffi/src/powerpc/linux64_closure.S
 
25233
===================================================================
 
25234
--- a/src/libffi/src/powerpc/linux64_closure.S  (.../tags/gcc_4_8_3_release)
 
25235
+++ b/src/libffi/src/powerpc/linux64_closure.S  (.../branches/gcc-4_8-branch)
 
25236
@@ -381,7 +381,8 @@
 
25237
        .align 3
 
25238
 .LEFDE1:
 
25239
 
 
25240
-# if defined __ELF__ && defined __linux__
 
25241
+#endif
 
25242
+
 
25243
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
25244
        .section        .note.GNU-stack,"",@progbits
 
25245
-# endif
 
25246
 #endif
 
25247
Index: libffi/src/powerpc/linux64.S
 
25248
===================================================================
 
25249
--- a/src/libffi/src/powerpc/linux64.S  (.../tags/gcc_4_8_3_release)
 
25250
+++ b/src/libffi/src/powerpc/linux64.S  (.../branches/gcc-4_8-branch)
 
25251
@@ -254,7 +254,8 @@
 
25252
        .align 3
 
25253
 .LEFDE1:
 
25254
 
 
25255
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
25256
+#endif
 
25257
+
 
25258
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
25259
        .section        .note.GNU-stack,"",@progbits
 
25260
-# endif
 
25261
 #endif
 
25262
Index: libffi/ChangeLog
 
25263
===================================================================
 
25264
--- a/src/libffi/ChangeLog      (.../tags/gcc_4_8_3_release)
 
25265
+++ b/src/libffi/ChangeLog      (.../branches/gcc-4_8-branch)
 
25266
@@ -1,3 +1,9 @@
 
25267
+2014-09-11  Jakub Jelinek  <jakub@redhat.com>
 
25268
+
 
25269
+       * src/powerpc/linux64.S: Emit .note.GNU-stack even when
 
25270
+       POWERPC64 is not defined.
 
25271
+       * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.
 
25272
+
 
25273
 2014-05-22  Release Manager
 
25274
 
 
25275
        * GCC 4.8.3 released.
 
25276
Index: libcpp/line-map.c
 
25277
===================================================================
 
25278
--- a/src/libcpp/line-map.c     (.../tags/gcc_4_8_3_release)
 
25279
+++ b/src/libcpp/line-map.c     (.../branches/gcc-4_8-branch)
 
25280
@@ -527,10 +527,10 @@
 
25281
          && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
 
25282
       || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
 
25283
       || (max_column_hint <= 80
 
25284
-         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
 
25285
-    {
 
25286
-      add_map = true;
 
25287
-    }
 
25288
+         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
 
25289
+      || (highest > 0x60000000
 
25290
+         && (set->max_column_hint || highest > 0x70000000)))
 
25291
+    add_map = true;
 
25292
   else
 
25293
     max_column_hint = set->max_column_hint;
 
25294
   if (add_map)
 
25295
@@ -541,7 +541,7 @@
 
25296
          /* If the column number is ridiculous or we've allocated a huge
 
25297
             number of source_locations, give up on column numbers. */
 
25298
          max_column_hint = 0;
 
25299
-         if (highest >0x70000000)
 
25300
+         if (highest > 0x70000000)
 
25301
            return 0;
 
25302
          column_bits = 0;
 
25303
        }
 
25304
Index: libcpp/ChangeLog
 
25305
===================================================================
 
25306
--- a/src/libcpp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
25307
+++ b/src/libcpp/ChangeLog      (.../branches/gcc-4_8-branch)
 
25308
@@ -1,3 +1,24 @@
 
25309
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
 
25310
+
 
25311
+       Backported from mainline
 
25312
+       2014-11-25  Jakub Jelinek  <jakub@redhat.com>
 
25313
+
 
25314
+       PR preprocessor/60436
 
25315
+       * line-map.c (linemap_line_start): If highest is above 0x60000000
 
25316
+       and we are still tracking columns or highest is above 0x70000000,
 
25317
+       force add_map.
 
25318
+
 
25319
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
25320
+
 
25321
+       Backport from mainline r215873
 
25322
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
25323
+
 
25324
+       * lex.c (search_line_fast): Add new version to be used for Power8
 
25325
+       and later targets when Altivec is enabled.  Restrict the existing
 
25326
+       Altivec version to big-endian systems so that lvsr is not used on
 
25327
+       little endian, where it is deprecated.  Remove LE-specific code
 
25328
+       from the now-BE-only version.
 
25329
+
 
25330
 2014-05-22  Release Manager
 
25331
 
 
25332
        * GCC 4.8.3 released.
 
25333
Index: libcpp/lex.c
 
25334
===================================================================
 
25335
--- a/src/libcpp/lex.c  (.../tags/gcc_4_8_3_release)
 
25336
+++ b/src/libcpp/lex.c  (.../branches/gcc-4_8-branch)
 
25337
@@ -515,9 +515,111 @@
 
25338
   search_line_fast = impl;
 
25339
 }
 
25340
 
 
25341
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
 
25342
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
 
25343
 
 
25344
-/* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 
25345
+/* A vection of the fast scanner using AltiVec vectorized byte compares
 
25346
+   and VSX unaligned loads (when VSX is available).  This is otherwise
 
25347
+   the same as the pre-GCC 5 version.  */
 
25348
+
 
25349
+static const uchar *
 
25350
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 
25351
+{
 
25352
+  typedef __attribute__((altivec(vector))) unsigned char vc;
 
25353
+
 
25354
+  const vc repl_nl = {
 
25355
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
 
25356
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
 
25357
+  };
 
25358
+  const vc repl_cr = {
 
25359
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', 
 
25360
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
 
25361
+  };
 
25362
+  const vc repl_bs = {
 
25363
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
 
25364
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
 
25365
+  };
 
25366
+  const vc repl_qm = {
 
25367
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
25368
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
25369
+  };
 
25370
+  const vc zero = { 0 };
 
25371
+
 
25372
+  vc data, t;
 
25373
+
 
25374
+  /* Main loop processing 16 bytes at a time.  */
 
25375
+  do
 
25376
+    {
 
25377
+      vc m_nl, m_cr, m_bs, m_qm;
 
25378
+
 
25379
+      data = *((const vc *)s);
 
25380
+      s += 16;
 
25381
+
 
25382
+      m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
 
25383
+      m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
 
25384
+      m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
 
25385
+      m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
 
25386
+      t = (m_nl | m_cr) | (m_bs | m_qm);
 
25387
+
 
25388
+      /* T now contains 0xff in bytes for which we matched one of the relevant
 
25389
+        characters.  We want to exit the loop if any byte in T is non-zero.
 
25390
+        Below is the expansion of vec_any_ne(t, zero).  */
 
25391
+    }
 
25392
+  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
 
25393
+
 
25394
+  /* Restore s to to point to the 16 bytes we just processed.  */
 
25395
+  s -= 16;
 
25396
+
 
25397
+  {
 
25398
+#define N  (sizeof(vc) / sizeof(long))
 
25399
+
 
25400
+    union {
 
25401
+      vc v;
 
25402
+      /* Statically assert that N is 2 or 4.  */
 
25403
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
 
25404
+    } u;
 
25405
+    unsigned long l, i = 0;
 
25406
+
 
25407
+    u.v = t;
 
25408
+
 
25409
+    /* Find the first word of T that is non-zero.  */
 
25410
+    switch (N)
 
25411
+      {
 
25412
+      case 4:
 
25413
+       l = u.l[i++];
 
25414
+       if (l != 0)
 
25415
+         break;
 
25416
+       s += sizeof(unsigned long);
 
25417
+       l = u.l[i++];
 
25418
+       if (l != 0)
 
25419
+         break;
 
25420
+       s += sizeof(unsigned long);
 
25421
+      case 2:
 
25422
+       l = u.l[i++];
 
25423
+       if (l != 0)
 
25424
+         break;
 
25425
+       s += sizeof(unsigned long);
 
25426
+       l = u.l[i];
 
25427
+      }
 
25428
+
 
25429
+    /* L now contains 0xff in bytes for which we matched one of the
 
25430
+       relevant characters.  We can find the byte index by finding
 
25431
+       its bit index and dividing by 8.  */
 
25432
+#ifdef __BIG_ENDIAN__
 
25433
+    l = __builtin_clzl(l) >> 3;
 
25434
+#else
 
25435
+    l = __builtin_ctzl(l) >> 3;
 
25436
+#endif
 
25437
+    return s + l;
 
25438
+
 
25439
+#undef N
 
25440
+  }
 
25441
+}
 
25442
+
 
25443
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
 
25444
+
 
25445
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
 
25446
+   This cannot be used for little endian because vec_lvsl/lvsr are
 
25447
+   deprecated for little endian and the code won't work properly.  */
 
25448
 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
 
25449
    so we can't compile this function without -maltivec on the command line
 
25450
    (or implied by some other switch).  */
 
25451
@@ -559,13 +661,8 @@
 
25452
      beginning with all ones and shifting in zeros according to the
 
25453
      mis-alignment.  The LVSR instruction pulls the exact shift we
 
25454
      want from the address.  */
 
25455
-#ifdef __BIG_ENDIAN__
 
25456
   mask = __builtin_vec_lvsr(0, s);
 
25457
   mask = __builtin_vec_perm(zero, ones, mask);
 
25458
-#else
 
25459
-  mask = __builtin_vec_lvsl(0, s);
 
25460
-  mask = __builtin_vec_perm(ones, zero, mask);
 
25461
-#endif
 
25462
   data &= mask;
 
25463
 
 
25464
   /* While altivec loads mask addresses, we still need to align S so
 
25465
@@ -629,11 +726,7 @@
 
25466
     /* L now contains 0xff in bytes for which we matched one of the
 
25467
        relevant characters.  We can find the byte index by finding
 
25468
        its bit index and dividing by 8.  */
 
25469
-#ifdef __BIG_ENDIAN__
 
25470
     l = __builtin_clzl(l) >> 3;
 
25471
-#else
 
25472
-    l = __builtin_ctzl(l) >> 3;
 
25473
-#endif
 
25474
     return s + l;
 
25475
 
 
25476
 #undef N
 
25477
Index: .
 
25478
===================================================================
 
25479
--- a/src/.     (.../tags/gcc_4_8_3_release)
 
25480
+++ b/src/.     (.../branches/gcc-4_8-branch)
 
25481
 
 
25482
Property changes on: .
 
25483
___________________________________________________________________
 
25484
Modified: svn:mergeinfo
 
25485
   Merged /trunk:r211733,215049