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

« back to all changes in this revision

Viewing changes to .svn/pristine/0a/0a691fbd143162f03aeae9c73b40da4979c5f76a.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 20141014 (r216202).
 
2
 
 
3
last_updated()
 
4
{
 
5
        cat > ${dir}LAST_UPDATED <<EOF
 
6
Tue Oct 14 16:18:10 CEST 2014
 
7
Tue Oct 14 14:18:10 UTC 2014 (revision 216202)
 
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: libstdc++-v3/python/libstdcxx/v6/printers.py
 
16
===================================================================
 
17
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../tags/gcc_4_8_3_release)
 
18
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py  (.../branches/gcc-4_8-branch)
 
19
@@ -1,4 +1,4 @@
 
20
-# Pretty-printers for libstc++.
 
21
+# Pretty-printers for libstdc++.
 
22
 
 
23
 # Copyright (C) 2008-2013 Free Software Foundation, Inc.
 
24
 
 
25
@@ -18,7 +18,51 @@
 
26
 import gdb
 
27
 import itertools
 
28
 import re
 
29
+import sys
 
30
 
 
31
+### Python 2 + Python 3 compatibility code
 
32
+
 
33
+# Resources about compatibility:
 
34
+#
 
35
+#  * <http://pythonhosted.org/six/>: Documentation of the "six" module
 
36
+
 
37
+# FIXME: The handling of e.g. std::basic_string (at least on char)
 
38
+# probably needs updating to work with Python 3's new string rules.
 
39
+#
 
40
+# In particular, Python 3 has a separate type (called byte) for
 
41
+# bytestrings, and a special b"" syntax for the byte literals; the old
 
42
+# str() type has been redefined to always store Unicode text.
 
43
+#
 
44
+# We probably can't do much about this until this GDB PR is addressed:
 
45
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
 
46
+
 
47
+if sys.version_info[0] > 2:
 
48
+    ### Python 3 stuff
 
49
+    Iterator = object
 
50
+    # Python 3 folds these into the normal functions.
 
51
+    imap = map
 
52
+    izip = zip
 
53
+    # Also, int subsumes long
 
54
+    long = int
 
55
+else:
 
56
+    ### Python 2 stuff
 
57
+    class Iterator:
 
58
+        """Compatibility mixin for iterators
 
59
+
 
60
+        Instead of writing next() methods for iterators, write
 
61
+        __next__() methods and use this mixin to make them work in
 
62
+        Python 2 as well as Python 3.
 
63
+
 
64
+        Idea stolen from the "six" documentation:
 
65
+        <http://pythonhosted.org/six/#six.Iterator>
 
66
+        """
 
67
+
 
68
+        def next(self):
 
69
+            return self.__next__()
 
70
+
 
71
+    # In Python 2, we still need these from itertools
 
72
+    from itertools import imap, izip
 
73
+
 
74
 # Try to use the new-style pretty-printing if available.
 
75
 _use_gdb_pp = True
 
76
 try:
 
77
@@ -51,7 +95,7 @@
 
78
         # anything fancier here.
 
79
         field = typ.fields()[0]
 
80
         if not field.is_base_class:
 
81
-            raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
 
82
+            raise ValueError("Cannot find type %s::%s" % (str(orig), name))
 
83
         typ = field.type
 
84
 
 
85
 class SharedPointerPrinter:
 
86
@@ -87,7 +131,7 @@
 
87
 class StdListPrinter:
 
88
     "Print a std::list"
 
89
 
 
90
-    class _iterator:
 
91
+    class _iterator(Iterator):
 
92
         def __init__(self, nodetype, head):
 
93
             self.nodetype = nodetype
 
94
             self.base = head['_M_next']
 
95
@@ -97,7 +141,7 @@
 
96
         def __iter__(self):
 
97
             return self
 
98
 
 
99
-        def next(self):
 
100
+        def __next__(self):
 
101
             if self.base == self.head:
 
102
                 raise StopIteration
 
103
             elt = self.base.cast(self.nodetype).dereference()
 
104
@@ -135,7 +179,7 @@
 
105
 class StdSlistPrinter:
 
106
     "Print a __gnu_cxx::slist"
 
107
 
 
108
-    class _iterator:
 
109
+    class _iterator(Iterator):
 
110
         def __init__(self, nodetype, head):
 
111
             self.nodetype = nodetype
 
112
             self.base = head['_M_head']['_M_next']
 
113
@@ -144,7 +188,7 @@
 
114
         def __iter__(self):
 
115
             return self
 
116
 
 
117
-        def next(self):
 
118
+        def __next__(self):
 
119
             if self.base == 0:
 
120
                 raise StopIteration
 
121
             elt = self.base.cast(self.nodetype).dereference()
 
122
@@ -180,7 +224,7 @@
 
123
 class StdVectorPrinter:
 
124
     "Print a std::vector"
 
125
 
 
126
-    class _iterator:
 
127
+    class _iterator(Iterator):
 
128
         def __init__ (self, start, finish, bitvec):
 
129
             self.bitvec = bitvec
 
130
             if bitvec:
 
131
@@ -198,7 +242,7 @@
 
132
         def __iter__(self):
 
133
             return self
 
134
 
 
135
-        def next(self):
 
136
+        def __next__(self):
 
137
             count = self.count
 
138
             self.count = self.count + 1
 
139
             if self.bitvec:
 
140
@@ -265,7 +309,7 @@
 
141
 class StdTuplePrinter:
 
142
     "Print a std::tuple"
 
143
 
 
144
-    class _iterator:
 
145
+    class _iterator(Iterator):
 
146
         def __init__ (self, head):
 
147
             self.head = head
 
148
 
 
149
@@ -276,13 +320,13 @@
 
150
                 # Set the actual head to the first pair.
 
151
                 self.head  = self.head.cast (nodes[0].type)
 
152
             elif len (nodes) != 0:
 
153
-                raise ValueError, "Top of tuple tree does not consist of a single node."
 
154
+                raise ValueError("Top of tuple tree does not consist of a single node.")
 
155
             self.count = 0
 
156
 
 
157
         def __iter__ (self):
 
158
             return self
 
159
 
 
160
-        def next (self):
 
161
+        def __next__ (self):
 
162
             nodes = self.head.type.fields ()
 
163
             # Check for further recursions in the inheritance tree.
 
164
             if len (nodes) == 0:
 
165
@@ -289,7 +333,7 @@
 
166
                 raise StopIteration
 
167
             # Check that this iteration has an expected structure.
 
168
             if len (nodes) != 2:
 
169
-                raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
 
170
+                raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
 
171
 
 
172
             # - Left node is the next recursion parent.
 
173
             # - Right node is the actual class contained in the tuple.
 
174
@@ -341,7 +385,7 @@
 
175
             return self.visualizer.display_hint ()
 
176
         return None
 
177
 
 
178
-class RbtreeIterator:
 
179
+class RbtreeIterator(Iterator):
 
180
     def __init__(self, rbtree):
 
181
         self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
 
182
         self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
 
183
@@ -353,7 +397,7 @@
 
184
     def __len__(self):
 
185
         return int (self.size)
 
186
 
 
187
-    def next(self):
 
188
+    def __next__(self):
 
189
         if self.count == self.size:
 
190
             raise StopIteration
 
191
         result = self.node
 
192
@@ -405,7 +449,7 @@
 
193
     "Print a std::map or std::multimap"
 
194
 
 
195
     # Turn an RbtreeIterator into a pretty-print iterator.
 
196
-    class _iter:
 
197
+    class _iter(Iterator):
 
198
         def __init__(self, rbiter, type):
 
199
             self.rbiter = rbiter
 
200
             self.count = 0
 
201
@@ -414,9 +458,9 @@
 
202
         def __iter__(self):
 
203
             return self
 
204
 
 
205
-        def next(self):
 
206
+        def __next__(self):
 
207
             if self.count % 2 == 0:
 
208
-                n = self.rbiter.next()
 
209
+                n = next(self.rbiter)
 
210
                 n = n.cast(self.type).dereference()['_M_value_field']
 
211
                 self.pair = n
 
212
                 item = n['first']
 
213
@@ -447,7 +491,7 @@
 
214
     "Print a std::set or std::multiset"
 
215
 
 
216
     # Turn an RbtreeIterator into a pretty-print iterator.
 
217
-    class _iter:
 
218
+    class _iter(Iterator):
 
219
         def __init__(self, rbiter, type):
 
220
             self.rbiter = rbiter
 
221
             self.count = 0
 
222
@@ -456,8 +500,8 @@
 
223
         def __iter__(self):
 
224
             return self
 
225
 
 
226
-        def next(self):
 
227
-            item = self.rbiter.next()
 
228
+        def __next__(self):
 
229
+            item = next(self.rbiter)
 
230
             item = item.cast(self.type).dereference()['_M_value_field']
 
231
             # FIXME: this is weird ... what to do?
 
232
             # Maybe a 'set' display hint?
 
233
@@ -522,7 +566,7 @@
 
234
 class StdDequePrinter:
 
235
     "Print a std::deque"
 
236
 
 
237
-    class _iter:
 
238
+    class _iter(Iterator):
 
239
         def __init__(self, node, start, end, last, buffer_size):
 
240
             self.node = node
 
241
             self.p = start
 
242
@@ -534,7 +578,7 @@
 
243
         def __iter__(self):
 
244
             return self
 
245
 
 
246
-        def next(self):
 
247
+        def __next__(self):
 
248
             if self.p == self.last:
 
249
                 raise StopIteration
 
250
 
 
251
@@ -619,7 +663,7 @@
 
252
     def display_hint (self):
 
253
         return 'string'
 
254
 
 
255
-class Tr1HashtableIterator:
 
256
+class Tr1HashtableIterator(Iterator):
 
257
     def __init__ (self, hash):
 
258
         self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
 
259
         self.node_type = find_type(hash.type, '__node_type').pointer()
 
260
@@ -627,7 +671,7 @@
 
261
     def __iter__ (self):
 
262
         return self
 
263
 
 
264
-    def next (self):
 
265
+    def __next__ (self):
 
266
         if self.node == 0:
 
267
             raise StopIteration
 
268
         node = self.node.cast(self.node_type)
 
269
@@ -655,8 +699,8 @@
 
270
         return '[%d]' % i
 
271
 
 
272
     def children (self):
 
273
-        counter = itertools.imap (self.format_count, itertools.count())
 
274
-        return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
 
275
+        counter = imap (self.format_count, itertools.count())
 
276
+        return izip (counter, Tr1HashtableIterator (self.hashtable()))
 
277
 
 
278
 class Tr1UnorderedMapPrinter:
 
279
     "Print a tr1::unordered_map"
 
280
@@ -688,11 +732,11 @@
 
281
         return '[%d]' % i
 
282
 
 
283
     def children (self):
 
284
-        counter = itertools.imap (self.format_count, itertools.count())
 
285
+        counter = imap (self.format_count, itertools.count())
 
286
         # Map over the hash table and flatten the result.
 
287
-        data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
 
288
+        data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
 
289
         # Zip the two iterators together.
 
290
-        return itertools.izip (counter, data)
 
291
+        return izip (counter, data)
 
292
 
 
293
     def display_hint (self):
 
294
         return 'map'
 
295
@@ -700,7 +744,7 @@
 
296
 class StdForwardListPrinter:
 
297
     "Print a std::forward_list"
 
298
 
 
299
-    class _iterator:
 
300
+    class _iterator(Iterator):
 
301
         def __init__(self, nodetype, head):
 
302
             self.nodetype = nodetype
 
303
             self.base = head['_M_next']
 
304
@@ -709,7 +753,7 @@
 
305
         def __iter__(self):
 
306
             return self
 
307
 
 
308
-        def next(self):
 
309
+        def __next__(self):
 
310
             if self.base == 0:
 
311
                 raise StopIteration
 
312
             elt = self.base.cast(self.nodetype).dereference()
 
313
@@ -764,7 +808,7 @@
 
314
         # A small sanity check.
 
315
         # FIXME
 
316
         if not self.compiled_rx.match(name + '<>'):
 
317
-            raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
 
318
+            raise ValueError('libstdc++ programming error: "%s" does not match' % name)
 
319
         printer = RxPrinter(name, function)
 
320
         self.subprinters.append(printer)
 
321
         self.lookup[name] = printer
 
322
Index: libstdc++-v3/scripts/run_doxygen
 
323
===================================================================
 
324
--- a/src/libstdc++-v3/scripts/run_doxygen      (.../tags/gcc_4_8_3_release)
 
325
+++ b/src/libstdc++-v3/scripts/run_doxygen      (.../branches/gcc-4_8-branch)
 
326
@@ -193,8 +193,15 @@
 
327
 if $do_latex; then
 
328
     cd ${outdir}/${mode}
 
329
 
 
330
-    # Also drop in the header file and style sheet
 
331
-    doxygen -w latex header.tex doxygen.sty
 
332
+    # Grrr, Doxygen 1.8.x changed the -w latex options.
 
333
+    need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
 
334
+
 
335
+    # Also drop in the header file (maybe footer file) and style sheet
 
336
+    if $need_footer; then
 
337
+      doxygen -w latex header.tex footer.tex doxygen.sty
 
338
+    else
 
339
+      doxygen -w latex header.tex doxygen.sty
 
340
+    fi
 
341
     
 
342
     echo ::
 
343
     echo :: LaTeX pages begin with
 
344
Index: libstdc++-v3/doc/xml/manual/containers.xml
 
345
===================================================================
 
346
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../tags/gcc_4_8_3_release)
 
347
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../branches/gcc-4_8-branch)
 
348
@@ -25,8 +25,9 @@
 
349
   <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
 
350
     
 
351
    <para>
 
352
-     Yes it is, and that's okay.  This is a decision that we preserved
 
353
-     when we imported SGI's STL implementation.  The following is
 
354
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
355
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
356
+     preserved when we imported SGI's STL implementation.  The following is
 
357
      quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
 
358
    </para>
 
359
    <blockquote>
 
360
@@ -72,26 +73,6 @@
 
361
   </section>
 
362
 </section>
 
363
 
 
364
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
 
365
-<?dbhtml filename="vector.html"?>
 
366
-  
 
367
-  <para>
 
368
-  </para>
 
369
-  <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
 
370
-    
 
371
-   <para>
 
372
-     In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
 
373
-     message to the list</link>, Daniel Kostecky announced work on an
 
374
-     alternate form of <code>std::vector</code> that would support
 
375
-     hints on the number of elements to be over-allocated.  The design
 
376
-     was also described, along with possible implementation choices.
 
377
-   </para>
 
378
-   <para>
 
379
-     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>
 
380
-     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
 
381
-   </para>
 
382
-
 
383
-  </section></section>
 
384
 </section>
 
385
 
 
386
 <!-- Sect1 02 : Associative -->
 
387
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
 
388
===================================================================
 
389
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../tags/gcc_4_8_3_release)
 
390
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../branches/gcc-4_8-branch)
 
391
@@ -226,10 +226,12 @@
 
392
       <entry/>
 
393
     </row>
 
394
     <row>
 
395
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
396
       <entry>18.8.6</entry>
 
397
       <entry><code>nested_exception</code></entry>
 
398
-      <entry>Y</entry>
 
399
-      <entry/>
 
400
+      <entry>Partial</entry>
 
401
+      <entry>Follows an earlier C++0x draft, not the final specification.
 
402
+      </entry>
 
403
     </row>
 
404
     <row>
 
405
       <entry>18.9</entry>
 
406
@@ -612,10 +614,11 @@
 
407
       <entry/>
 
408
     </row>
 
409
     <row>
 
410
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
411
       <entry>20.6.12.4</entry>
 
412
       <entry><code>uninitialized_fill_n</code></entry>
 
413
-      <entry>Y</entry>
 
414
-      <entry/>
 
415
+      <entry>Partial</entry>
 
416
+      <entry>Returns <code>void</code>.</entry>
 
417
     </row>
 
418
     <row>
 
419
       <entry>20.6.13</entry>
 
420
@@ -1119,10 +1122,13 @@
 
421
       <entry/>
 
422
     </row>
 
423
     <row>
 
424
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
425
       <entry>21.4</entry>
 
426
       <entry>Class template <code>basic_string</code></entry>
 
427
-      <entry>Y</entry>
 
428
-      <entry/>
 
429
+      <entry>Partial</entry>
 
430
+      <entry>Non-conforming Copy-On-Write implementation.
 
431
+             Missing <code>getline</code> overloads for rvalue streams.
 
432
+      </entry>
 
433
     </row>
 
434
     <row>
 
435
       <entry>21.5</entry>
 
436
@@ -1190,10 +1196,11 @@
 
437
       <entry/>
 
438
     </row>
 
439
     <row>
 
440
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
441
       <entry>22.3.3.1</entry>
 
442
       <entry>Character classification</entry>
 
443
-      <entry>Y</entry>
 
444
-      <entry/>
 
445
+      <entry>Partial</entry>
 
446
+      <entry>Missing <code>isblank</code>.</entry>
 
447
     </row>
 
448
     <row>
 
449
       <entry>22.3.3.2</entry>
 
450
@@ -1272,16 +1279,18 @@
 
451
       <entry/>
 
452
     </row>
 
453
     <row>
 
454
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
455
       <entry>22.4.5.1</entry>
 
456
       <entry>Class template <code>time_get</code></entry>
 
457
-      <entry>Y</entry>
 
458
-      <entry/>
 
459
+      <entry>Partial</entry>
 
460
+      <entry>Missing <code>get</code> and <code>do_get</code></entry>
 
461
     </row>
 
462
     <row>
 
463
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
464
       <entry>22.4.5.2</entry>
 
465
       <entry>Class template <code>time_get_byname</code></entry>
 
466
-      <entry>Y</entry>
 
467
-      <entry/>
 
468
+      <entry>Partial</entry>
 
469
+      <entry>Likewise</entry>
 
470
     </row>
 
471
     <row>
 
472
       <entry>22.4.5.3</entry>
 
473
@@ -1434,8 +1443,10 @@
 
474
       <entry>23.3.5</entry>
 
475
       <entry>Class template <code>list</code></entry>
 
476
       <entry>Partial</entry>
 
477
-      <entry><code>insert</code> and <code>erase</code> members do not
 
478
-             take <code>const_iterator</code> arguments (N2350).</entry>
 
479
+      <entry>O(N) size.
 
480
+             <code>insert</code> and <code>erase</code> members do not
 
481
+             take <code>const_iterator</code> arguments (N2350).
 
482
+      </entry>
 
483
     </row>
 
484
     <row>
 
485
       <?dbhtml bgcolor="#B0B0B0" ?>
 
486
@@ -1650,10 +1661,11 @@
 
487
       <entry/>
 
488
     </row>
 
489
     <row>
 
490
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
491
       <entry>25.3</entry>
 
492
       <entry>Mutating sequence operations</entry>
 
493
-      <entry>Y</entry>
 
494
-      <entry/>
 
495
+      <entry>Partial</entry>
 
496
+      <entry><code>rotate</code> returns <code>void</code>.</entry>
 
497
     </row>
 
498
     <row>
 
499
       <entry>25.4</entry>
 
500
@@ -2060,10 +2072,13 @@
 
501
       <entry/>
 
502
     </row>
 
503
     <row>
 
504
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
505
       <entry>26.8</entry>
 
506
       <entry>C Library</entry>
 
507
-      <entry>Y</entry>
 
508
-      <entry/>
 
509
+      <entry>Partial</entry>
 
510
+      <entry><code>&lt;ctgmath&gt;</code> doesn't include
 
511
+       <code>&lt;ccomplex&gt;</code>
 
512
+      </entry>
 
513
     </row>
 
514
     <row>
 
515
       <entry>
 
516
@@ -2143,6 +2158,7 @@
 
517
         Missing move and swap operations on <code>basic_ios</code>.
 
518
         Missing <code>io_errc</code> and <code>iostream_category</code>.
 
519
         <code>ios_base::failure</code> is not derived from <code>system_error</code>.
 
520
+       Missing <code>ios_base::hexfloat</code>.
 
521
       </entry>
 
522
     </row>
 
523
     <row>
 
524
Index: libstdc++-v3/doc/html/index.html
 
525
===================================================================
 
526
--- a/src/libstdc++-v3/doc/html/index.html      (.../tags/gcc_4_8_3_release)
 
527
+++ b/src/libstdc++-v3/doc/html/index.html      (.../branches/gcc-4_8-branch)
 
528
@@ -43,7 +43,7 @@
 
529
 </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. 
 
530
   Containers
 
531
   
 
532
-</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. 
 
533
+</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. 
 
534
   Iterators
 
535
   
 
536
 </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. 
 
537
@@ -162,4 +162,4 @@
 
538
   
 
539
 </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D. 
 
540
     <acronym class="acronym">GNU</acronym> General Public License version 3
 
541
-  </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>
 
542
\ No newline at end of file
 
543
+  </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>
 
544
Index: libstdc++-v3/doc/html/manual/status.html
 
545
===================================================================
 
546
--- a/src/libstdc++-v3/doc/html/manual/status.html      (.../tags/gcc_4_8_3_release)
 
547
+++ b/src/libstdc++-v3/doc/html/manual/status.html      (.../branches/gcc-4_8-branch)
 
548
@@ -165,7 +165,8 @@
 
549
              <code class="code">set_new_handler</code> is not thread-safe.
 
550
       </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>.
 
551
              <code class="code">set_terminate</code> is not thread-safe.
 
552
-      </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">
 
553
+      </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.
 
554
+      </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">
 
555
        <span class="emphasis"><em>19</em></span>
 
556
       </td><td colspan="3" align="left">
 
557
        <span class="emphasis"><em>Diagnostics</em></span>
 
558
@@ -173,7 +174,7 @@
 
559
        <span class="emphasis"><em>20</em></span>
 
560
       </td><td colspan="3" align="left">
 
561
        <span class="emphasis"><em>General utilities</em></span>
 
562
-      </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">
 
563
+      </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">
 
564
        <p>
 
565
          Uses code from
 
566
          <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
 
567
@@ -187,14 +188,16 @@
 
568
        <span class="emphasis"><em>21</em></span>
 
569
       </td><td colspan="3" align="left">
 
570
        <span class="emphasis"><em>Strings</em></span>
 
571
-      </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.
 
572
+      </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.
 
573
+             Missing <code class="code">getline</code> overloads for rvalue streams.
 
574
+      </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.
 
575
       Missing <code class="filename">&lt;cuchar&gt;</code>
 
576
       </td></tr><tr><td align="left">
 
577
        <span class="emphasis"><em>22</em></span>
 
578
       </td><td colspan="3" align="left">
 
579
        <span class="emphasis"><em>Localization</em></span>
 
580
-      </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
 
581
-             <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">
 
582
+      </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
 
583
+             <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">
 
584
        <span class="emphasis"><em>23</em></span>
 
585
       </td><td colspan="3" align="left">
 
586
        <span class="emphasis"><em>Containers</em></span>
 
587
@@ -201,8 +204,10 @@
 
588
       </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>
 
589
              meet the requirements
 
590
              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
 
591
-             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
 
592
-             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
 
593
+             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.
 
594
+             <code class="code">insert</code> and <code class="code">erase</code> members do not
 
595
+             take <code class="code">const_iterator</code> arguments (N2350).
 
596
+      </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
 
597
              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
 
598
              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">
 
599
        <span class="emphasis"><em>24</em></span>
 
600
@@ -212,11 +217,13 @@
 
601
        <span class="emphasis"><em>25</em></span>
 
602
       </td><td colspan="3" align="left">
 
603
        <span class="emphasis"><em>Algorithms</em></span>
 
604
-      </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">
 
605
+      </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">
 
606
       <span class="emphasis"><em>26</em></span>
 
607
       </td><td colspan="3" align="left">
 
608
        <span class="emphasis"><em>Numerics</em></span>
 
609
-      </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">
 
610
+      </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
 
611
+       <code class="code">&lt;ccomplex&gt;</code>
 
612
+      </td></tr><tr><td align="left">
 
613
        <span class="emphasis"><em>27</em></span>
 
614
       </td><td colspan="3" align="left">
 
615
        <span class="emphasis"><em>Input/output library</em></span>
 
616
@@ -224,6 +231,7 @@
 
617
         Missing move and swap operations on <code class="code">basic_ios</code>.
 
618
         Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
 
619
         <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
 
620
+       Missing <code class="code">ios_base::hexfloat</code>.
 
621
       </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">
 
622
         Missing move and swap operations
 
623
         Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
 
624
Index: libstdc++-v3/doc/html/manual/abi.html
 
625
===================================================================
 
626
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
 
627
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
 
628
@@ -96,7 +96,7 @@
 
629
    definitions, where the version definition is the maximum for a
 
630
    particular release. Labels are cumulative. If a particular release
 
631
    is not listed, it has the same version labels as the preceding
 
632
-   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>
 
633
+   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>
 
634
        Release versioning on the libstdc++.so binary, implemented in
 
635
        the same way as the libgcc_s.so binary above. Listed is the
 
636
        filename: <code class="constant">DT_SONAME</code> can be deduced from
 
637
@@ -111,7 +111,7 @@
 
638
        has the same filename and <code class="constant">DT_SONAME</code> as the
 
639
        preceding release.
 
640
       </p><p>It is versioned as follows:
 
641
-    </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>
 
642
+    </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>
 
643
       Note 1: Error should be libstdc++.so.3.0.3.
 
644
     </p><p>
 
645
       Note 2: Not strictly required.
 
646
@@ -129,7 +129,7 @@
 
647
    GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
 
648
    release.) If a particular release is not listed, it has the same
 
649
    version labels as the preceding release.
 
650
-   </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,
 
651
+   </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,
 
652
     __GXX_ABI_VERSION. This macro is defined as the version of the
 
653
     compiler v3 ABI, with g++ 3.0 being version 100. This macro will
 
654
     be automatically defined whenever g++ is used (the curious can
 
655
Index: libstdc++-v3/doc/html/manual/std_contents.html
 
656
===================================================================
 
657
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../tags/gcc_4_8_3_release)
 
658
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../branches/gcc-4_8-branch)
 
659
@@ -21,7 +21,7 @@
 
660
 </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. 
 
661
   Containers
 
662
   
 
663
-</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. 
 
664
+</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. 
 
665
   Iterators
 
666
   
 
667
 </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. 
 
668
@@ -42,4 +42,4 @@
 
669
 </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. 
 
670
   Support
 
671
   
 
672
-</td></tr></table></div></body></html>
 
673
\ No newline at end of file
 
674
+</td></tr></table></div></body></html>
 
675
Index: libstdc++-v3/doc/html/manual/containers.html
 
676
===================================================================
 
677
--- a/src/libstdc++-v3/doc/html/manual/containers.html  (.../tags/gcc_4_8_3_release)
 
678
+++ b/src/libstdc++-v3/doc/html/manual/containers.html  (.../branches/gcc-4_8-branch)
 
679
@@ -7,9 +7,10 @@
 
680
   </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. 
 
681
   Containers
 
682
   <a id="idm269999493408" class="indexterm"></a>
 
683
-</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>
 
684
-     Yes it is, and that's okay.  This is a decision that we preserved
 
685
-     when we imported SGI's STL implementation.  The following is
 
686
+</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>
 
687
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
688
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
689
+     preserved when we imported SGI's STL implementation.  The following is
 
690
      quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
 
691
    </p><div class="blockquote"><blockquote class="blockquote"><p>
 
692
        The size() member function, for list and slist, takes time
 
693
@@ -41,14 +42,4 @@
 
694
         </p><pre class="programlisting">
 
695
         if (L.empty())
 
696
             ...
 
697
-        </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>
 
698
-  </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>
 
699
-     In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
 
700
-     message to the list</a>, Daniel Kostecky announced work on an
 
701
-     alternate form of <code class="code">std::vector</code> that would support
 
702
-     hints on the number of elements to be over-allocated.  The design
 
703
-     was also described, along with possible implementation choices.
 
704
-   </p><p>
 
705
-     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>
 
706
-     and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
 
707
-   </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>
 
708
\ No newline at end of file
 
709
+        </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>
 
710
Index: libstdc++-v3/doc/html/manual/index.html
 
711
===================================================================
 
712
--- a/src/libstdc++-v3/doc/html/manual/index.html       (.../tags/gcc_4_8_3_release)
 
713
+++ b/src/libstdc++-v3/doc/html/manual/index.html       (.../branches/gcc-4_8-branch)
 
714
@@ -24,7 +24,7 @@
 
715
 </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. 
 
716
   Containers
 
717
   
 
718
-</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. 
 
719
+</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. 
 
720
   Iterators
 
721
   
 
722
 </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. 
 
723
@@ -160,4 +160,4 @@
 
724
              </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. 
 
725
   Introduction
 
726
   
 
727
-</td></tr></table></div></body></html>
 
728
\ No newline at end of file
 
729
+</td></tr></table></div></body></html>
 
730
Index: libstdc++-v3/include/std/future
 
731
===================================================================
 
732
--- a/src/libstdc++-v3/include/std/future       (.../tags/gcc_4_8_3_release)
 
733
+++ b/src/libstdc++-v3/include/std/future       (.../branches/gcc-4_8-branch)
 
734
@@ -351,12 +351,14 @@
 
735
       void
 
736
       _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
 
737
       {
 
738
-        bool __set = __ignore_failure;
 
739
+        bool __set = false;
 
740
         // all calls to this function are serialized,
 
741
         // side-effects of invoking __res only happen once
 
742
         call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
 
743
             ref(__set));
 
744
-        if (!__set)
 
745
+       if (__set)
 
746
+         _M_cond.notify_all();
 
747
+       else if (!__ignore_failure)
 
748
           __throw_future_error(int(future_errc::promise_already_satisfied));
 
749
       }
 
750
 
 
751
@@ -471,7 +473,6 @@
 
752
           lock_guard<mutex> __lock(_M_mutex);
 
753
           _M_result.swap(__res);
 
754
         }
 
755
-        _M_cond.notify_all();
 
756
         __set = true;
 
757
       }
 
758
 
 
759
@@ -983,22 +984,25 @@
 
760
       void
 
761
       set_value(const _Res& __r)
 
762
       {
 
763
+       auto __future = _M_future;
 
764
         auto __setter = _State::__setter(this, __r);
 
765
-        _M_future->_M_set_result(std::move(__setter));
 
766
+        __future->_M_set_result(std::move(__setter));
 
767
       }
 
768
 
 
769
       void
 
770
       set_value(_Res&& __r)
 
771
       {
 
772
+       auto __future = _M_future;
 
773
         auto __setter = _State::__setter(this, std::move(__r));
 
774
-        _M_future->_M_set_result(std::move(__setter));
 
775
+        __future->_M_set_result(std::move(__setter));
 
776
       }
 
777
 
 
778
       void
 
779
       set_exception(exception_ptr __p)
 
780
       {
 
781
+       auto __future = _M_future;
 
782
         auto __setter = _State::__setter(__p, this);
 
783
-        _M_future->_M_set_result(std::move(__setter));
 
784
+        __future->_M_set_result(std::move(__setter));
 
785
       }
 
786
     };
 
787
 
 
788
@@ -1081,15 +1085,17 @@
 
789
       void
 
790
       set_value(_Res& __r)
 
791
       {
 
792
+       auto __future = _M_future;
 
793
         auto __setter = _State::__setter(this, __r);
 
794
-        _M_future->_M_set_result(std::move(__setter));
 
795
+        __future->_M_set_result(std::move(__setter));
 
796
       }
 
797
 
 
798
       void
 
799
       set_exception(exception_ptr __p)
 
800
       {
 
801
+       auto __future = _M_future;
 
802
         auto __setter = _State::__setter(__p, this);
 
803
-        _M_future->_M_set_result(std::move(__setter));
 
804
+        __future->_M_set_result(std::move(__setter));
 
805
       }
 
806
     };
 
807
 
 
808
@@ -1166,8 +1172,9 @@
 
809
       void
 
810
       set_exception(exception_ptr __p)
 
811
       {
 
812
+       auto __future = _M_future;
 
813
         auto __setter = _State::__setter(__p, this);
 
814
-        _M_future->_M_set_result(std::move(__setter));
 
815
+        __future->_M_set_result(std::move(__setter));
 
816
       }
 
817
     };
 
818
 
 
819
@@ -1193,8 +1200,9 @@
 
820
   inline void
 
821
   promise<void>::set_value()
 
822
   {
 
823
+    auto __future = _M_future;
 
824
     auto __setter = _State::__setter(this);
 
825
-    _M_future->_M_set_result(std::move(__setter));
 
826
+    __future->_M_set_result(std::move(__setter));
 
827
   }
 
828
 
 
829
 
 
830
Index: libstdc++-v3/include/ext/rope
 
831
===================================================================
 
832
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
 
833
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
 
834
@@ -1544,7 +1544,7 @@
 
835
       typedef typename _Base::allocator_type allocator_type;
 
836
       using _Base::_M_tree_ptr;
 
837
       using _Base::get_allocator;
 
838
-      using _Base::_M_get_allocator;      
 
839
+      using _Base::_M_get_allocator;
 
840
       typedef __GC_CONST _CharT* _Cstrptr;
 
841
       
 
842
       static _CharT _S_empty_c_str[1];
 
843
@@ -1876,8 +1876,9 @@
 
844
           const allocator_type& __a = allocator_type())
 
845
       : _Base(__a)
 
846
       {
 
847
-       this->_M_tree_ptr = (0 == __len) ?
 
848
-         0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
 
849
+       this->_M_tree_ptr = (0 == __len)
 
850
+         ? 0
 
851
+         : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
 
852
       }
 
853
 
 
854
       rope(const rope& __x, const allocator_type& __a = allocator_type())
 
855
Index: libstdc++-v3/include/bits/stl_tree.h
 
856
===================================================================
 
857
--- a/src/libstdc++-v3/include/bits/stl_tree.h  (.../tags/gcc_4_8_3_release)
 
858
+++ b/src/libstdc++-v3/include/bits/stl_tree.h  (.../branches/gcc-4_8-branch)
 
859
@@ -510,11 +510,11 @@
 
860
 
 
861
       _Link_type
 
862
       _M_end()
 
863
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
 
864
+      { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
 
865
 
 
866
       _Const_Link_type
 
867
       _M_end() const
 
868
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
869
+      { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
870
 
 
871
       static const_reference
 
872
       _S_value(_Const_Link_type __x)
 
873
Index: libstdc++-v3/include/tr2/bool_set
 
874
===================================================================
 
875
--- a/src/libstdc++-v3/include/tr2/bool_set     (.../tags/gcc_4_8_3_release)
 
876
+++ b/src/libstdc++-v3/include/tr2/bool_set     (.../branches/gcc-4_8-branch)
 
877
@@ -44,7 +44,7 @@
 
878
    *  bool_set
 
879
    *
 
880
    *  See N2136, Bool_set: multi-valued logic
 
881
-   *  by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
 
882
+   *  by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
 
883
    *
 
884
    *  The implicit conversion to bool is slippery!  I may use the new
 
885
    *  explicit conversion.  This has been specialized in the language
 
886
Index: libstdc++-v3/ChangeLog
 
887
===================================================================
 
888
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_8_3_release)
 
889
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_8-branch)
 
890
@@ -1,3 +1,84 @@
 
891
+2014-10-03  Jonathan Wakely  <jwakely@redhat.com>
 
892
+
 
893
+       PR libstdc++/63449
 
894
+       * doc/xml/manual/containers.xml: Remove outdated section. Update
 
895
+       std::list notes.
 
896
+       * doc/html/*: Regenerate.
 
897
+
 
898
+2014-10-01  Jonathan Wakely  <jwakely@redhat.com>
 
899
+
 
900
+       * doc/xml/manual/status_cxx2011.xml: Corrections.
 
901
+       * doc/html/manual/status.html: Regenerate.
 
902
+
 
903
+2014-08-28  Samuel Bronson  <naesten@gmail.com>
 
904
+
 
905
+       Backport r212453 from trunk
 
906
+       2014-07-11  Samuel Bronson  <naesten@gmail.com>
 
907
+                   Matthias Klose  <doko@ubuntu.com>
 
908
+
 
909
+       PR libstdc++/58962
 
910
+       * python/libstdcxx/v6/printers.py: Port to Python 2+3
 
911
+       (imap): New compat function.
 
912
+       (izip): Likewise.
 
913
+       (Iterator): New mixin to allow writing iterators in Python 3 style
 
914
+       regardless of which version we're running on.
 
915
+       [Python3] (long) New compat alias for "int".
 
916
+       * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
 
917
+
 
918
+       Backport r210625 from trunk
 
919
+       2014-05-19  Jonathan Wakely  <jwakely@redhat.com>
 
920
+
 
921
+       * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
 
922
+
 
923
+2014-08-26  John David Anglin  <danglin@gcc.gnu.org>
 
924
+
 
925
+       * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
 
926
+
 
927
+2014-08-26  Jonathan Wakely  <jwakely@redhat.com>
 
928
+
 
929
+       * doc/xml/manual/status_cxx2011.xml: Correct status table.
 
930
+       * doc/html/manual/*: Regenerate.
 
931
+
 
932
+2014-08-04  Jonathan Wakely  <jwakely@redhat.com>
 
933
+
 
934
+       Backported from mainline
 
935
+       2014-07-29  Jonathan Wakely  <jwakely@redhat.com>
 
936
+
 
937
+       PR libstdc++/61946
 
938
+       * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
 
939
+       const allocator_type&)): Pass non-const allocator to
 
940
+       _S_new_RopeFunction.
 
941
+       * testsuite/ext/rope/61946.cc: New.
 
942
+
 
943
+2014-08-04  Zifei Tong  <zifeitong@gmail.com>
 
944
+
 
945
+       * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
 
946
+       _GLIBCXX_ prefix to macro.
 
947
+
 
948
+2014-06-03  Jonathan Wakely  <jwakely@redhat.com>
 
949
+
 
950
+       Backport from mainline
 
951
+       2014-04-15  Jonathan Wakely  <jwakely@redhat.com>
 
952
+
 
953
+       PR libstdc++/60734
 
954
+       * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
 
955
+
 
956
+       Backport from mainline
 
957
+       2014-05-16  Jonathan Wakely  <jwakely@redhat.com>
 
958
+
 
959
+       PR libstdc++/60966
 
960
+       * include/std/future (__future_base::_State_baseV2::_M_set_result):
 
961
+       Signal condition variable after call_once returns.
 
962
+       (__future_base::_State_baseV2::_M_do_set): Do not signal here.
 
963
+       (promise::set_value, promise::set_exception): Increment the reference
 
964
+       count on the shared state until the function returns.
 
965
+       * testsuite/30_threads/promise/60966.cc: New.
 
966
+
 
967
+2014-05-29  Jonathan Wakely  <jwakely@redhat.com>
 
968
+
 
969
+       * include/tr2/bool_set: Use UTF-8 for accented characters.
 
970
+       * scripts/run_doxygen: Handle Doxygen 1.8.x change.
 
971
+
 
972
 2014-05-22  Release Manager
 
973
 
 
974
        * GCC 4.8.3 released.
 
975
Index: libstdc++-v3/libsupc++/atexit_thread.cc
 
976
===================================================================
 
977
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../tags/gcc_4_8_3_release)
 
978
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../branches/gcc-4_8-branch)
 
979
@@ -26,7 +26,7 @@
 
980
 #include <new>
 
981
 #include "bits/gthr.h"
 
982
 
 
983
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
 
984
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
 
985
 
 
986
 extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
 
987
                                         void *arg, void *d);
 
988
@@ -38,7 +38,7 @@
 
989
   return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
 
990
 }
 
991
 
 
992
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
993
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
994
 
 
995
 namespace {
 
996
   // One element in a singly-linked stack of cleanups.
 
997
@@ -142,4 +142,4 @@
 
998
   return 0;
 
999
 }
 
1000
 
 
1001
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1002
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1003
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
 
1004
===================================================================
 
1005
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../tags/gcc_4_8_3_release)
 
1006
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../branches/gcc-4_8-branch)
 
1007
@@ -0,0 +1,67 @@
 
1008
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
 
1009
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
 
1010
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
 
1011
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
 
1012
+// { dg-require-cstdint "" }
 
1013
+// { dg-require-gthreads "" }
 
1014
+// { dg-require-atomic-builtins "" }
 
1015
+
 
1016
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1017
+//
 
1018
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1019
+// software; you can redistribute it and/or modify it under the
 
1020
+// terms of the GNU General Public License as published by the
 
1021
+// Free Software Foundation; either version 3, or (at your option)
 
1022
+// any later version.
 
1023
+
 
1024
+// This library is distributed in the hope that it will be useful,
 
1025
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1026
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1027
+// GNU General Public License for more details.
 
1028
+
 
1029
+// You should have received a copy of the GNU General Public License along
 
1030
+// with this library; see the file COPYING3.  If not see
 
1031
+// <http://www.gnu.org/licenses/>.
 
1032
+
 
1033
+// libstdc++/60966
 
1034
+// This test hangs if std::promise::~promise() destroys the
 
1035
+// shared state before std::promise::set_value() finishes using it.
 
1036
+
 
1037
+#include <future>
 
1038
+#include <thread>
 
1039
+#include <vector>
 
1040
+
 
1041
+const int THREADS = 10;
 
1042
+
 
1043
+void run_task(std::promise<void>* pr)
 
1044
+{
 
1045
+  std::this_thread::sleep_for(std::chrono::milliseconds(100));
 
1046
+  pr->set_value();
 
1047
+}
 
1048
+
 
1049
+int main()
 
1050
+{
 
1051
+  std::vector<std::promise<void>*> tasks(THREADS);
 
1052
+  std::vector<std::thread> threads(THREADS);
 
1053
+  std::vector<std::future<void>> futures(THREADS);
 
1054
+
 
1055
+  for (int i = 0; i < THREADS; ++i)
 
1056
+  {
 
1057
+    std::promise<void>* task = new std::promise<void>;
 
1058
+    tasks[i] = task;
 
1059
+    futures[i] = task->get_future();
 
1060
+    threads[i] = std::thread(run_task, task);
 
1061
+  }
 
1062
+
 
1063
+  for (int i = 0; i < THREADS; ++i)
 
1064
+  {
 
1065
+    // the temporary future releases the state as soon as wait() returns
 
1066
+    std::future<void>(std::move(futures[i])).wait();
 
1067
+    // state is ready, should now be safe to delete promise, so it
 
1068
+    // releases the shared state too
 
1069
+    delete tasks[i];
 
1070
+  }
 
1071
+
 
1072
+  for (auto& t : threads)
 
1073
+    t.join();
 
1074
+}
 
1075
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
 
1076
===================================================================
 
1077
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../tags/gcc_4_8_3_release)
 
1078
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../branches/gcc-4_8-branch)
 
1079
@@ -0,0 +1,31 @@
 
1080
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1081
+//
 
1082
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1083
+// software; you can redistribute it and/or modify it under the
 
1084
+// terms of the GNU General Public License as published by the
 
1085
+// Free Software Foundation; either version 3, or (at your option)
 
1086
+// any later version.
 
1087
+
 
1088
+// This library is distributed in the hope that it will be useful,
 
1089
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1090
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1091
+// GNU General Public License for more details.
 
1092
+
 
1093
+// You should have received a copy of the GNU General Public License along
 
1094
+// with this library; see the file COPYING3.  If not see
 
1095
+// <http://www.gnu.org/licenses/>.
 
1096
+
 
1097
+// { dg-do compile }
 
1098
+
 
1099
+#include <ext/rope>
 
1100
+
 
1101
+struct empty_char_prod : __gnu_cxx::char_producer<char>
 
1102
+{
 
1103
+  virtual void operator()(size_t, size_t, char*) {}
 
1104
+};
 
1105
+
 
1106
+int main ()
 
1107
+{
 
1108
+  empty_char_prod* ecp = new empty_char_prod;
 
1109
+  __gnu_cxx::crope excrope( ecp, 10L, true );
 
1110
+}
 
1111
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
 
1112
===================================================================
 
1113
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../tags/gcc_4_8_3_release)
 
1114
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../branches/gcc-4_8-branch)
 
1115
@@ -91,7 +91,7 @@
 
1116
        }
 
1117
     }
 
1118
 
 
1119
-    set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
 
1120
+    set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
 
1121
                           "\\\[\\\]"]
 
1122
     if {!$do_whatis_tests} {
 
1123
        send_log "skipping 'whatis' tests - gdb too old"
 
1124
@@ -252,6 +252,6 @@
 
1125
 # but not earlier versions.
 
1126
 # Return 1 if the version is ok, 0 otherwise.
 
1127
 proc gdb_version_check {} {
 
1128
-    return [gdb_batch_check "python print gdb.lookup_global_symbol" \
 
1129
+    return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
 
1130
              "<built-in function lookup_global_symbol>"]
 
1131
 }
 
1132
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
 
1133
===================================================================
 
1134
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../tags/gcc_4_8_3_release)
 
1135
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../branches/gcc-4_8-branch)
 
1136
@@ -400,6 +400,7 @@
 
1137
 FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
 
1138
 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1139
 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1140
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
 
1141
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1142
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
 
1143
 FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1144
@@ -587,6 +588,8 @@
 
1145
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
 
1146
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
 
1147
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
 
1148
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
 
1149
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
 
1150
 FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
 
1151
 FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
 
1152
 FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
 
1153
@@ -1204,6 +1207,7 @@
 
1154
 FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
 
1155
 FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
 
1156
 FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
 
1157
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
 
1158
 FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
 
1159
 FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
 
1160
 FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
 
1161
@@ -1471,6 +1475,11 @@
 
1162
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
 
1163
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
 
1164
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
 
1165
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
 
1166
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
 
1167
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
 
1168
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
 
1169
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
 
1170
 FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
 
1171
 FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
 
1172
 FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
 
1173
@@ -1900,6 +1909,8 @@
 
1174
 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
 
1175
 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
 
1176
 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
 
1177
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
 
1178
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
 
1179
 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1180
 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1181
 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
 
1182
@@ -2436,6 +2447,7 @@
 
1183
 FUNC:__cxa_guard_release@@CXXABI_1.3
 
1184
 FUNC:__cxa_pure_virtual@@CXXABI_1.3
 
1185
 FUNC:__cxa_rethrow@@CXXABI_1.3
 
1186
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
 
1187
 FUNC:__cxa_throw@@CXXABI_1.3
 
1188
 FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
 
1189
 FUNC:__cxa_vec_cctor@@CXXABI_1.3
 
1190
@@ -2482,6 +2494,7 @@
 
1191
 OBJECT:0:CXXABI_1.3.4
 
1192
 OBJECT:0:CXXABI_1.3.5
 
1193
 OBJECT:0:CXXABI_1.3.6
 
1194
+OBJECT:0:CXXABI_1.3.7
 
1195
 OBJECT:0:CXXABI_TM_1
 
1196
 OBJECT:0:GLIBCXX_3.4
 
1197
 OBJECT:0:GLIBCXX_3.4.1
 
1198
@@ -2493,6 +2506,8 @@
 
1199
 OBJECT:0:GLIBCXX_3.4.15
 
1200
 OBJECT:0:GLIBCXX_3.4.16
 
1201
 OBJECT:0:GLIBCXX_3.4.17
 
1202
+OBJECT:0:GLIBCXX_3.4.18
 
1203
+OBJECT:0:GLIBCXX_3.4.19
 
1204
 OBJECT:0:GLIBCXX_3.4.2
 
1205
 OBJECT:0:GLIBCXX_3.4.3
 
1206
 OBJECT:0:GLIBCXX_3.4.4
 
1207
@@ -2992,6 +3007,8 @@
 
1208
 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
 
1209
 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
 
1210
 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
 
1211
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
 
1212
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
 
1213
 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
 
1214
 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
 
1215
 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
 
1216
Index: configure.ac
 
1217
===================================================================
 
1218
--- a/src/configure.ac  (.../tags/gcc_4_8_3_release)
 
1219
+++ b/src/configure.ac  (.../branches/gcc-4_8-branch)
 
1220
@@ -1154,6 +1154,9 @@
 
1221
   *-mingw*)
 
1222
     host_makefile_frag="config/mh-mingw"
 
1223
     ;;
 
1224
+  alpha*-*-linux*)
 
1225
+    host_makefile_frag="config/mh-alpha-linux"
 
1226
+    ;;
 
1227
   hppa*-hp-hpux10*)
 
1228
     host_makefile_frag="config/mh-pa-hpux10"
 
1229
     ;;
 
1230
Index: ChangeLog
 
1231
===================================================================
 
1232
--- a/src/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1233
+++ b/src/ChangeLog     (.../branches/gcc-4_8-branch)
 
1234
@@ -1,3 +1,9 @@
 
1235
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1236
+
 
1237
+       PR target/47230
 
1238
+       * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
 
1239
+       * configure: Regenerate.
 
1240
+
 
1241
 2014-05-22  Release Manager
 
1242
 
 
1243
        * GCC 4.8.3 released.
 
1244
Index: contrib/ChangeLog
 
1245
===================================================================
 
1246
--- a/src/contrib/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1247
+++ b/src/contrib/ChangeLog     (.../branches/gcc-4_8-branch)
 
1248
@@ -1,3 +1,7 @@
 
1249
+2014-07-07  Richard Biener  <rguenther@suse.de>
 
1250
+
 
1251
+        * gennews: Use gcc-3.0/index.html.
 
1252
+
 
1253
 2014-05-22  Release Manager
 
1254
 
 
1255
        * GCC 4.8.3 released.
 
1256
Index: contrib/gennews
 
1257
===================================================================
 
1258
--- a/src/contrib/gennews       (.../tags/gcc_4_8_3_release)
 
1259
+++ b/src/contrib/gennews       (.../branches/gcc-4_8-branch)
 
1260
@@ -37,7 +37,7 @@
 
1261
     gcc-3.3/index.html gcc-3.3/changes.html
 
1262
     gcc-3.2/index.html gcc-3.2/changes.html
 
1263
     gcc-3.1/index.html gcc-3.1/changes.html
 
1264
-    gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1265
+    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1266
     gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
 
1267
     egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
 
1268
     egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
 
1269
Index: config/mh-alpha-linux
 
1270
===================================================================
 
1271
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
 
1272
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
 
1273
@@ -0,0 +1,3 @@
 
1274
+# Prevent GPREL16 relocation truncation
 
1275
+LDFLAGS += -Wl,--no-relax
 
1276
+BOOT_LDFLAGS += -Wl,--no-relax
 
1277
Index: config/ChangeLog
 
1278
===================================================================
 
1279
--- a/src/config/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1280
+++ b/src/config/ChangeLog      (.../branches/gcc-4_8-branch)
 
1281
@@ -1,3 +1,8 @@
 
1282
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1283
+
 
1284
+       PR target/47230
 
1285
+       * mh-alpha-linux: New file.
 
1286
+
 
1287
 2014-05-22  Release Manager
 
1288
 
 
1289
        * GCC 4.8.3 released.
 
1290
Index: libjava/classpath
 
1291
===================================================================
 
1292
--- a/src/libjava/classpath     (.../tags/gcc_4_8_3_release)
 
1293
+++ b/src/libjava/classpath     (.../branches/gcc-4_8-branch)
 
1294
 
 
1295
Property changes on: libjava/classpath
 
1296
___________________________________________________________________
 
1297
Modified: svn:mergeinfo
 
1298
   Merged /trunk/libjava/classpath:r211733,215049
 
1299
Index: configure
 
1300
===================================================================
 
1301
--- a/src/configure     (.../tags/gcc_4_8_3_release)
 
1302
+++ b/src/configure     (.../branches/gcc-4_8-branch)
 
1303
@@ -3834,6 +3834,9 @@
 
1304
   *-mingw*)
 
1305
     host_makefile_frag="config/mh-mingw"
 
1306
     ;;
 
1307
+  alpha*-*-linux*)
 
1308
+    host_makefile_frag="config/mh-alpha-linux"
 
1309
+    ;;
 
1310
   hppa*-hp-hpux10*)
 
1311
     host_makefile_frag="config/mh-pa-hpux10"
 
1312
     ;;
 
1313
Index: libgcc/ChangeLog
 
1314
===================================================================
 
1315
--- a/src/libgcc/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1316
+++ b/src/libgcc/ChangeLog      (.../branches/gcc-4_8-branch)
 
1317
@@ -1,3 +1,8 @@
 
1318
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
1319
+
 
1320
+       * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
 
1321
+       bits not set bits as indicating trapping exceptions.
 
1322
+
 
1323
 2014-05-22  Release Manager
 
1324
 
 
1325
        * GCC 4.8.3 released.
 
1326
Index: libgcc/config/i386/sfp-machine.h
 
1327
===================================================================
 
1328
--- a/src/libgcc/config/i386/sfp-machine.h      (.../tags/gcc_4_8_3_release)
 
1329
+++ b/src/libgcc/config/i386/sfp-machine.h      (.../branches/gcc-4_8-branch)
 
1330
@@ -59,7 +59,7 @@
 
1331
       __sfp_handle_exceptions (_fex);          \
 
1332
   } while (0);
 
1333
 
 
1334
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1335
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1336
 
 
1337
 #define FP_ROUNDMODE           (_fcw & FP_RND_MASK)
 
1338
 #endif
 
1339
Index: gcc/tree-ssa-tail-merge.c
 
1340
===================================================================
 
1341
--- a/src/gcc/tree-ssa-tail-merge.c     (.../tags/gcc_4_8_3_release)
 
1342
+++ b/src/gcc/tree-ssa-tail-merge.c     (.../branches/gcc-4_8-branch)
 
1343
@@ -1060,6 +1060,24 @@
 
1344
     gcc_unreachable ();
 
1345
 }
 
1346
 
 
1347
+/* Return true if gimple operands T1 and T2 have the same value.  */
 
1348
+
 
1349
+static bool
 
1350
+gimple_operand_equal_value_p (tree t1, tree t2)
 
1351
+{
 
1352
+  if (t1 == t2)
 
1353
+    return true;
 
1354
+
 
1355
+  if (t1 == NULL_TREE
 
1356
+      || t2 == NULL_TREE)
 
1357
+    return false;
 
1358
+
 
1359
+  if (operand_equal_p (t1, t2, 0))
 
1360
+    return true;
 
1361
+
 
1362
+  return gvn_uses_equal (t1, t2);
 
1363
+}
 
1364
+
 
1365
 /* Return true if gimple statements S1 and S2 are equal.  Gimple_bb (s1) and
 
1366
    gimple_bb (s2) are members of SAME_SUCC.  */
 
1367
 
 
1368
@@ -1122,8 +1140,9 @@
 
1369
       lhs2 = gimple_get_lhs (s2);
 
1370
       if (TREE_CODE (lhs1) != SSA_NAME
 
1371
          && TREE_CODE (lhs2) != SSA_NAME)
 
1372
-       return (vn_valueize (gimple_vdef (s1))
 
1373
-               == vn_valueize (gimple_vdef (s2)));
 
1374
+       return (operand_equal_p (lhs1, lhs2, 0)
 
1375
+               && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
 
1376
+                                                gimple_assign_rhs1 (s2)));
 
1377
       else if (TREE_CODE (lhs1) == SSA_NAME
 
1378
               && TREE_CODE (lhs2) == SSA_NAME)
 
1379
        return vn_valueize (lhs1) == vn_valueize (lhs2);
 
1380
Index: gcc/DATESTAMP
 
1381
===================================================================
 
1382
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
 
1383
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
 
1384
@@ -1 +1 @@
 
1385
-20140522
 
1386
+20141014
 
1387
Index: gcc/ipa-cp.c
 
1388
===================================================================
 
1389
--- a/src/gcc/ipa-cp.c  (.../tags/gcc_4_8_3_release)
 
1390
+++ b/src/gcc/ipa-cp.c  (.../branches/gcc-4_8-branch)
 
1391
@@ -447,6 +447,8 @@
 
1392
   else if (!opt_for_fn (node->symbol.decl, optimize)
 
1393
           || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
 
1394
     reason = "non-optimized function";
 
1395
+  else if (node->tm_clone)
 
1396
+    reason = "transactional memory clone";
 
1397
 
 
1398
   if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
 
1399
     fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
 
1400
@@ -2902,6 +2904,11 @@
 
1401
                intersect_with_agg_replacements (cs->caller, src_idx,
 
1402
                                                 &inter, 0);
 
1403
            }
 
1404
+         else
 
1405
+           {
 
1406
+             inter.release ();
 
1407
+             return vNULL;
 
1408
+           }
 
1409
        }
 
1410
       else
 
1411
        {
 
1412
@@ -2917,6 +2924,11 @@
 
1413
              else
 
1414
                intersect_with_plats (src_plats, &inter, 0);
 
1415
            }
 
1416
+         else
 
1417
+           {
 
1418
+             inter.release ();
 
1419
+             return vNULL;
 
1420
+           }
 
1421
        }
 
1422
     }
 
1423
   else if (jfunc->type == IPA_JF_ANCESTOR
 
1424
@@ -3000,7 +3012,8 @@
 
1425
                                          vec<cgraph_edge_p> callers)
 
1426
 {
 
1427
   struct ipa_node_params *dest_info = IPA_NODE_REF (node);
 
1428
-  struct ipa_agg_replacement_value *res = NULL;
 
1429
+  struct ipa_agg_replacement_value *res;
 
1430
+  struct ipa_agg_replacement_value **tail = &res;
 
1431
   struct cgraph_edge *cs;
 
1432
   int i, j, count = ipa_get_param_count (dest_info);
 
1433
 
 
1434
@@ -3044,8 +3057,8 @@
 
1435
          v->offset = item->offset;
 
1436
          v->value = item->value;
 
1437
          v->by_ref = plats->aggs_by_ref;
 
1438
-         v->next = res;
 
1439
-         res = v;
 
1440
+         *tail = v;
 
1441
+         tail = &v->next;
 
1442
        }
 
1443
 
 
1444
     next_param:
 
1445
@@ -3052,6 +3065,7 @@
 
1446
       if (inter.exists ())
 
1447
        inter.release ();
 
1448
     }
 
1449
+  *tail = NULL;
 
1450
   return res;
 
1451
 }
 
1452
 
 
1453
@@ -3060,7 +3074,8 @@
 
1454
 static struct ipa_agg_replacement_value *
 
1455
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
 
1456
 {
 
1457
-  struct ipa_agg_replacement_value *res = NULL;
 
1458
+  struct ipa_agg_replacement_value *res;
 
1459
+  struct ipa_agg_replacement_value **tail = &res;
 
1460
   struct ipa_agg_jump_function *aggjf;
 
1461
   struct ipa_agg_jf_item *item;
 
1462
   int i, j;
 
1463
@@ -3074,9 +3089,10 @@
 
1464
        v->offset = item->offset;
 
1465
        v->value = item->value;
 
1466
        v->by_ref = aggjf->by_ref;
 
1467
-       v->next = res;
 
1468
-       res = v;
 
1469
+       *tail = v;
 
1470
+       tail = &v->next;
 
1471
       }
 
1472
+  *tail = NULL;
 
1473
   return res;
 
1474
 }
 
1475
 
 
1476
Index: gcc/fold-const.c
 
1477
===================================================================
 
1478
--- a/src/gcc/fold-const.c      (.../tags/gcc_4_8_3_release)
 
1479
+++ b/src/gcc/fold-const.c      (.../branches/gcc-4_8-branch)
 
1480
@@ -9213,7 +9213,7 @@
 
1481
   /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
 
1482
      X CMP Y +- C2 +- C1 for signed X, Y.  This is valid if
 
1483
      the resulting offset is smaller in absolute value than the
 
1484
-     original one.  */
 
1485
+     original one and has the same sign.  */
 
1486
   if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
 
1487
       && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
 
1488
       && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
 
1489
@@ -9232,19 +9232,20 @@
 
1490
                                      "a comparison");
 
1491
 
 
1492
       /* Put the constant on the side where it doesn't overflow and is
 
1493
-        of lower absolute value than before.  */
 
1494
+        of lower absolute value and of same sign than before.  */
 
1495
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1496
                             ? MINUS_EXPR : PLUS_EXPR,
 
1497
                             const2, const1);
 
1498
       if (!TREE_OVERFLOW (cst)
 
1499
-         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
 
1500
+         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
 
1501
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
 
1502
        {
 
1503
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1504
          return fold_build2_loc (loc, code, type,
 
1505
-                             variable1,
 
1506
-                             fold_build2_loc (loc,
 
1507
-                                          TREE_CODE (arg1), TREE_TYPE (arg1),
 
1508
-                                          variable2, cst));
 
1509
+                                 variable1,
 
1510
+                                 fold_build2_loc (loc, TREE_CODE (arg1),
 
1511
+                                                  TREE_TYPE (arg1),
 
1512
+                                                  variable2, cst));
 
1513
        }
 
1514
 
 
1515
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1516
@@ -9251,13 +9252,15 @@
 
1517
                             ? MINUS_EXPR : PLUS_EXPR,
 
1518
                             const1, const2);
 
1519
       if (!TREE_OVERFLOW (cst)
 
1520
-         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
 
1521
+         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
 
1522
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
 
1523
        {
 
1524
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1525
          return fold_build2_loc (loc, code, type,
 
1526
-                             fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
 
1527
-                                          variable1, cst),
 
1528
-                             variable2);
 
1529
+                                 fold_build2_loc (loc, TREE_CODE (arg0),
 
1530
+                                                  TREE_TYPE (arg0),
 
1531
+                                                  variable1, cst),
 
1532
+                                 variable2);
 
1533
        }
 
1534
     }
 
1535
 
 
1536
@@ -11218,7 +11221,6 @@
 
1537
        {
 
1538
          double_int c1, c2, c3, msk;
 
1539
          int width = TYPE_PRECISION (type), w;
 
1540
-         bool try_simplify = true;
 
1541
 
 
1542
          c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
 
1543
          c2 = tree_to_double_int (arg1);
 
1544
@@ -11255,20 +11257,7 @@
 
1545
                }
 
1546
            }
 
1547
 
 
1548
-         /* If X is a tree of the form (Y * K1) & K2, this might conflict
 
1549
-            with that optimization from the BIT_AND_EXPR optimizations.
 
1550
-            This could end up in an infinite recursion.  */
 
1551
-         if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
 
1552
-             && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
 
1553
-                           == INTEGER_CST)
 
1554
-         {
 
1555
-           tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
 
1556
-           double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
 
1557
-
 
1558
-           try_simplify = (masked != c1);
 
1559
-         }
 
1560
-
 
1561
-         if (try_simplify && c3 != c1)
 
1562
+         if (c3 != c1)
 
1563
            return fold_build2_loc (loc, BIT_IOR_EXPR, type,
 
1564
                                    fold_build2_loc (loc, BIT_AND_EXPR, type,
 
1565
                                                     TREE_OPERAND (arg0, 0),
 
1566
@@ -11658,16 +11647,25 @@
 
1567
          && TREE_CODE (arg0) == MULT_EXPR
 
1568
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
 
1569
        {
 
1570
+         double_int darg1 = tree_to_double_int (arg1);
 
1571
          double_int masked
 
1572
-           = mask_with_tz (type, tree_to_double_int (arg1),
 
1573
+           = mask_with_tz (type, darg1,
 
1574
                            tree_to_double_int (TREE_OPERAND (arg0, 1)));
 
1575
 
 
1576
          if (masked.is_zero ())
 
1577
            return omit_two_operands_loc (loc, type, build_zero_cst (type),
 
1578
                                          arg0, arg1);
 
1579
-         else if (masked != tree_to_double_int (arg1))
 
1580
-           return fold_build2_loc (loc, code, type, op0,
 
1581
-                                   double_int_to_tree (type, masked));
 
1582
+         else if (masked != darg1)
 
1583
+           {
 
1584
+             /* Avoid the transform if arg1 is a mask of some
 
1585
+                mode which allows further optimizations.  */
 
1586
+             int pop = darg1.popcount ();
 
1587
+             if (!(pop >= BITS_PER_UNIT
 
1588
+                   && exact_log2 (pop) != -1
 
1589
+                   && double_int::mask (pop) == darg1))
 
1590
+               return fold_build2_loc (loc, code, type, op0,
 
1591
+                                       double_int_to_tree (type, masked));
 
1592
+           }
 
1593
        }
 
1594
 
 
1595
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
 
1596
Index: gcc/omp-low.c
 
1597
===================================================================
 
1598
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
 
1599
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
 
1600
@@ -1586,7 +1586,6 @@
 
1601
   TREE_STATIC (decl) = 1;
 
1602
   TREE_USED (decl) = 1;
 
1603
   DECL_ARTIFICIAL (decl) = 1;
 
1604
-  DECL_NAMELESS (decl) = 1;
 
1605
   DECL_IGNORED_P (decl) = 0;
 
1606
   TREE_PUBLIC (decl) = 0;
 
1607
   DECL_UNINLINABLE (decl) = 1;
 
1608
Index: gcc/toplev.c
 
1609
===================================================================
 
1610
--- a/src/gcc/toplev.c  (.../tags/gcc_4_8_3_release)
 
1611
+++ b/src/gcc/toplev.c  (.../branches/gcc-4_8-branch)
 
1612
@@ -1036,16 +1036,19 @@
 
1613
 
 
1614
   if (warn_stack_usage >= 0)
 
1615
     {
 
1616
+      const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
 
1617
+
 
1618
       if (stack_usage_kind == DYNAMIC)
 
1619
-       warning (OPT_Wstack_usage_, "stack usage might be unbounded");
 
1620
+       warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
 
1621
       else if (stack_usage > warn_stack_usage)
 
1622
        {
 
1623
          if (stack_usage_kind == DYNAMIC_BOUNDED)
 
1624
-           warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
1625
-                    stack_usage);
 
1626
+           warning_at (loc,
 
1627
+                       OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
1628
+                       stack_usage);
 
1629
          else
 
1630
-           warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
 
1631
-                    stack_usage);
 
1632
+           warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
 
1633
+                       stack_usage);
 
1634
        }
 
1635
     }
 
1636
 }
 
1637
Index: gcc/tree-ssa-sccvn.c
 
1638
===================================================================
 
1639
--- a/src/gcc/tree-ssa-sccvn.c  (.../tags/gcc_4_8_3_release)
 
1640
+++ b/src/gcc/tree-ssa-sccvn.c  (.../branches/gcc-4_8-branch)
 
1641
@@ -3015,33 +3015,12 @@
 
1642
   /* If all value numbered to the same value, the phi node has that
 
1643
      value.  */
 
1644
   if (allsame)
 
1645
-    {
 
1646
-      if (is_gimple_min_invariant (sameval))
 
1647
-       {
 
1648
-         VN_INFO (PHI_RESULT (phi))->has_constants = true;
 
1649
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
1650
-       }
 
1651
-      else
 
1652
-       {
 
1653
-         VN_INFO (PHI_RESULT (phi))->has_constants = false;
 
1654
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
1655
-       }
 
1656
+    return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
1657
 
 
1658
-      if (TREE_CODE (sameval) == SSA_NAME)
 
1659
-       return visit_copy (PHI_RESULT (phi), sameval);
 
1660
-
 
1661
-      return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
1662
-    }
 
1663
-
 
1664
   /* Otherwise, see if it is equivalent to a phi node in this block.  */
 
1665
   result = vn_phi_lookup (phi);
 
1666
   if (result)
 
1667
-    {
 
1668
-      if (TREE_CODE (result) == SSA_NAME)
 
1669
-       changed = visit_copy (PHI_RESULT (phi), result);
 
1670
-      else
 
1671
-       changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
1672
-    }
 
1673
+    changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
1674
   else
 
1675
     {
 
1676
       vn_phi_insert (phi, PHI_RESULT (phi));
 
1677
@@ -3142,24 +3121,18 @@
 
1678
      catch those with constants.  The goal here is to simultaneously
 
1679
      combine constants between expressions, but avoid infinite
 
1680
      expansion of expressions during simplification.  */
 
1681
-  if (TREE_CODE (op0) == SSA_NAME)
 
1682
-    {
 
1683
-      if (VN_INFO (op0)->has_constants
 
1684
+  op0 = vn_valueize (op0);
 
1685
+  if (TREE_CODE (op0) == SSA_NAME
 
1686
+      && (VN_INFO (op0)->has_constants
 
1687
          || TREE_CODE_CLASS (code) == tcc_comparison
 
1688
-         || code == COMPLEX_EXPR)
 
1689
-       op0 = valueize_expr (vn_get_expr_for (op0));
 
1690
-      else
 
1691
-       op0 = vn_valueize (op0);
 
1692
-    }
 
1693
+         || code == COMPLEX_EXPR))
 
1694
+    op0 = valueize_expr (vn_get_expr_for (op0));
 
1695
 
 
1696
-  if (TREE_CODE (op1) == SSA_NAME)
 
1697
-    {
 
1698
-      if (VN_INFO (op1)->has_constants
 
1699
-         || code == COMPLEX_EXPR)
 
1700
-       op1 = valueize_expr (vn_get_expr_for (op1));
 
1701
-      else
 
1702
-       op1 = vn_valueize (op1);
 
1703
-    }
 
1704
+  op1 = vn_valueize (op1);
 
1705
+  if (TREE_CODE (op1) == SSA_NAME
 
1706
+      && (VN_INFO (op1)->has_constants
 
1707
+         || code == COMPLEX_EXPR))
 
1708
+    op1 = valueize_expr (vn_get_expr_for (op1));
 
1709
 
 
1710
   /* Pointer plus constant can be represented as invariant address.
 
1711
      Do so to allow further propatation, see also tree forwprop.  */
 
1712
@@ -3217,27 +3190,31 @@
 
1713
     return NULL_TREE;
 
1714
 
 
1715
   orig_op0 = op0;
 
1716
-  if (VN_INFO (op0)->has_constants)
 
1717
-    op0 = valueize_expr (vn_get_expr_for (op0));
 
1718
-  else if (CONVERT_EXPR_CODE_P (code)
 
1719
-          || code == REALPART_EXPR
 
1720
-          || code == IMAGPART_EXPR
 
1721
-          || code == VIEW_CONVERT_EXPR
 
1722
-          || code == BIT_FIELD_REF)
 
1723
+  op0 = vn_valueize (op0);
 
1724
+  if (TREE_CODE (op0) == SSA_NAME)
 
1725
     {
 
1726
-      /* We want to do tree-combining on conversion-like expressions.
 
1727
-         Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
1728
-      tree tem = valueize_expr (vn_get_expr_for (op0));
 
1729
-      if (UNARY_CLASS_P (tem)
 
1730
-         || BINARY_CLASS_P (tem)
 
1731
-         || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
1732
-         || TREE_CODE (tem) == SSA_NAME
 
1733
-         || TREE_CODE (tem) == CONSTRUCTOR
 
1734
-         || is_gimple_min_invariant (tem))
 
1735
-       op0 = tem;
 
1736
+      if (VN_INFO (op0)->has_constants)
 
1737
+       op0 = valueize_expr (vn_get_expr_for (op0));
 
1738
+      else if (CONVERT_EXPR_CODE_P (code)
 
1739
+              || code == REALPART_EXPR
 
1740
+              || code == IMAGPART_EXPR
 
1741
+              || code == VIEW_CONVERT_EXPR
 
1742
+              || code == BIT_FIELD_REF)
 
1743
+       {
 
1744
+         /* We want to do tree-combining on conversion-like expressions.
 
1745
+            Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
1746
+         tree tem = valueize_expr (vn_get_expr_for (op0));
 
1747
+         if (UNARY_CLASS_P (tem)
 
1748
+             || BINARY_CLASS_P (tem)
 
1749
+             || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
1750
+             || TREE_CODE (tem) == SSA_NAME
 
1751
+             || TREE_CODE (tem) == CONSTRUCTOR
 
1752
+             || is_gimple_min_invariant (tem))
 
1753
+           op0 = tem;
 
1754
+       }
 
1755
     }
 
1756
 
 
1757
-  /* Avoid folding if nothing changed, but remember the expression.  */
 
1758
+  /* Avoid folding if nothing changed.  */
 
1759
   if (op0 == orig_op0)
 
1760
     return NULL_TREE;
 
1761
 
 
1762
Index: gcc/cgraphunit.c
 
1763
===================================================================
 
1764
--- a/src/gcc/cgraphunit.c      (.../tags/gcc_4_8_3_release)
 
1765
+++ b/src/gcc/cgraphunit.c      (.../branches/gcc-4_8-branch)
 
1766
@@ -1097,7 +1097,7 @@
 
1767
          /* We use local aliases for C++ thunks to force the tailcall
 
1768
             to bind locally.  This is a hack - to keep it working do
 
1769
             the following (which is not strictly correct).  */
 
1770
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
 
1771
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
 
1772
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
 
1773
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
 
1774
        {
 
1775
Index: gcc/ChangeLog
 
1776
===================================================================
 
1777
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
 
1778
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
 
1779
@@ -1,3 +1,890 @@
 
1780
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
1781
+
 
1782
+       Backport from mainline r215880
 
1783
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
1784
+
 
1785
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
 
1786
+       Issue a warning message when vec_lvsl or vec_lvsr is used with a
 
1787
+       little endian target.
 
1788
+
 
1789
+       Backport from mainline r215882
 
1790
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
1791
+
 
1792
+       * altivec.md (altivec_lvsl): New define_expand.
 
1793
+       (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
 
1794
+       (altivec_lvsr): New define_expand.
 
1795
+       (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
 
1796
+       * rs6000.c (rs6000_expand_builtin): Change to use
 
1797
+       altivec_lvs[lr]_direct; remove commented-out code.
 
1798
+
 
1799
+2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
1800
+
 
1801
+       Backport from mainline
 
1802
+       2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
1803
+
 
1804
+       PR rtl-optimization/57003
 
1805
+       * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
 
1806
+       also check CALL_INSN_FUNCTION_USAGE for clobbers again after
 
1807
+       killing regs_invalidated_by_call.
 
1808
+
 
1809
+2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
1810
+
 
1811
+       Backport from mainline
 
1812
+       2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
1813
+
 
1814
+       PR target/52941
 
1815
+       * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
 
1816
+       atomic_fetch_<fetchop_name>si_hard,
 
1817
+       atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
 
1818
+       atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
 
1819
+       atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
 
1820
+       atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
 
1821
+
 
1822
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
 
1823
+
 
1824
+       PR tree-optimization/63375
 
1825
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
 
1826
+       references.
 
1827
+
 
1828
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
1829
+
 
1830
+       PR debug/63342
 
1831
+       * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
 
1832
+       SSA_NAME.
 
1833
+
 
1834
+       PR target/63428
 
1835
+       * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
 
1836
+       argument to avx2_permv2ti.
 
1837
+
 
1838
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
1839
+
 
1840
+       Backport from mainline
 
1841
+       2014-09-30  Uros Bizjak  <ubizjak@gmail.com>
 
1842
+
 
1843
+       * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
 
1844
+       (fmod<mode>3): Ditto.
 
1845
+       (fpremxf4_i387): Ditto.
 
1846
+       (reminderxf3): Ditto.
 
1847
+       (reminder<mode>3): Ditto.
 
1848
+       (fprem1xf4_i387): Ditto.
 
1849
+
 
1850
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
1851
+
 
1852
+       PR inline-asm/63282
 
1853
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
 
1854
+       or invert_jump_1 if jump isn't any_condjump_p.
 
1855
+
 
1856
+2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
 
1857
+
 
1858
+       Backport from mainline r212303
 
1859
+       PR target/49423
 
1860
+       * config/arm/arm-protos.h (arm_legitimate_address_p,
 
1861
+       arm_is_constant_pool_ref): Add prototypes.
 
1862
+       * config/arm/arm.c (arm_legitimate_address_p): Remove static.
 
1863
+       (arm_is_constant_pool_ref) New function.
 
1864
+       * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
 
1865
+       arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
 
1866
+       (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
 
1867
+       operand and remove pool_range and neg_pool_range attributes.
 
1868
+       (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
 
1869
+       pool_range and neg_pool_range attributes.
 
1870
+       * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
 
1871
+       constant pool references.
 
1872
+
 
1873
+2014-09-28  John David Anglin  <danglin@gcc.gnu.org>
 
1874
+
 
1875
+       * config/pa/pa.c (pa_output_function_epilogue): Only update
 
1876
+       last_address when a nonnote insn is found.
 
1877
+
 
1878
+2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
1879
+
 
1880
+       Backport from mainline
 
1881
+       2014-09-25  Nick Clifton  <nickc@redhat.com>
 
1882
+       2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
1883
+
 
1884
+       PR target/62218
 
1885
+       * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
 
1886
+       atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
 
1887
+
 
1888
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
1889
+
 
1890
+       Backport from mainline r215559
 
1891
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
1892
+
 
1893
+       PR target/63335
 
1894
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
 
1895
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
 
1896
+
 
1897
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
1898
+
 
1899
+       PR tree-optimization/63341
 
1900
+       * tree-vectorizer.h (vect_create_data_ref_ptr,
 
1901
+       vect_create_addr_base_for_vector_ref): Add another tree argument
 
1902
+       defaulting to NULL_TREE.
 
1903
+       * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
 
1904
+       argument, pass it down to vect_create_addr_base_for_vector_ref.
 
1905
+       (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
 
1906
+       add that to base_offset too if non-NULL.
 
1907
+       * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
 
1908
+       for dr_explicit_realign_optimized set it to vector byte size
 
1909
+       - 1 instead of setting offset, pass byte_offset down to
 
1910
+       vect_create_data_ref_ptr.
 
1911
+
 
1912
+2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1913
+
 
1914
+       Back port from trunk:
 
1915
+       2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1916
+
 
1917
+       * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
 
1918
+       refine the constraints used on 32/64-bit floating point moves.
 
1919
+       (f32_av): Likewise.
 
1920
+       (f64_vsx): Likewise.
 
1921
+       (f64_dm): Likewise.
 
1922
+       (f64_av): Likewise.
 
1923
+       (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
 
1924
+       (BOOL_REGS_OP1): Likewise.
 
1925
+       (BOOL_REGS_OP2): Likewise.
 
1926
+       (BOOL_REGS_UNARY): Likewise.
 
1927
+       (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
 
1928
+       32/64-bit floating point moves.  Do not use wa, instead use ww/ws
 
1929
+       for moves involving VSX registers.  Do not use constraints that
 
1930
+       target VSX registers for decimal types.
 
1931
+       (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
 
1932
+       (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
 
1933
+
 
1934
+2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1935
+
 
1936
+       Back port from trunk:
 
1937
+       2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1938
+
 
1939
+       * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
 
1940
+       for base_reg_operand to be common between LO_SUM and PLUS.
 
1941
+       (fusion_gpr_mem_combo): New predicate to match a fused address
 
1942
+       that combines the addis and memory offset address.
 
1943
+
 
1944
+       * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
 
1945
+       calling signature.
 
1946
+       (emit_fusion_gpr_load): Likewise.
 
1947
+
 
1948
+       * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
 
1949
+       signature to pass each argument separately, rather than
 
1950
+       using an operands array.  Rewrite the insns found by peephole2 to
 
1951
+       be a single insn, rather than hoping the insns will still be
 
1952
+       together when the peephole pass is done.  Drop being called via a
 
1953
+       normal peephole.
 
1954
+       (emit_fusion_gpr_load): Change calling signature to be called from
 
1955
+       the fusion_gpr_load_<mode> insns with a combined memory address
 
1956
+       instead of the peephole pass passing the addis and offset
 
1957
+       separately.
 
1958
+
 
1959
+       * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
 
1960
+       fusion.
 
1961
+       (power8 fusion peephole): Drop support for doing power8 via a
 
1962
+       normal peephole that was created by the peephole2 pass.
 
1963
+       (power8 fusion peephole2): Create a new insn with the fused
 
1964
+       address, so that the fused operation is kept together after
 
1965
+       register allocation is done.
 
1966
+       (fusion_gpr_load_<mode>): Likewise.
 
1967
+
 
1968
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
1969
+
 
1970
+       PR debug/63284
 
1971
+       * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
 
1972
+       if there are only debug stmts after the noreturn call, instead
 
1973
+       remove the debug stmts.
 
1974
+
 
1975
+2014-09-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1976
+
 
1977
+       * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
 
1978
+       V2DF, V4SF, DF, and DI modes.
 
1979
+       (vsx_fmav2df2): Likewise.
 
1980
+       (vsx_float_fix_<mode>2): Likewise.
 
1981
+       (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
 
1982
+
 
1983
+2014-09-10  Alan Modra  <amodra@gmail.com>
 
1984
+
 
1985
+       PR debug/60655
 
1986
+       * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
 
1987
+       can't be output.
 
1988
+
 
1989
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
1990
+
 
1991
+       Backport from mainline
 
1992
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
1993
+
 
1994
+       PR tree-optimization/61452
 
1995
+       * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
 
1996
+       expr and has_constants in case we found a leader.
 
1997
+       (simplify_binary_expression): Always valueize operands first.
 
1998
+       (simplify_unary_expression): Likewise.
 
1999
+
 
2000
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
2001
+
 
2002
+       Backport from mainline
 
2003
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
2004
+
 
2005
+       PR middle-end/61010
 
2006
+       * fold-const.c (fold_binary_loc): Consistently avoid
 
2007
+       canonicalizing X & CST away from a CST that is the mask
 
2008
+       of a mode.
 
2009
+
 
2010
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
2011
+
 
2012
+       PR middle-end/61045
 
2013
+       * fold-const.c (fold_comparison): When folding
 
2014
+       X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
 
2015
+       the sign of the remaining constant operand stays the same.
 
2016
+
 
2017
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
2018
+
 
2019
+       PR tree-optimization/62075
 
2020
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
 
2021
+       handle uses in patterns.
 
2022
+
 
2023
+2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2024
+
 
2025
+       Backport from mainline.
 
2026
+       2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2027
+
 
2028
+       * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
 
2029
+       (-mtune): Likewise.
 
2030
+       (-mcpu): Likewise.
 
2031
+
 
2032
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2033
+
 
2034
+       PR tree-optimization/60196
 
2035
+       PR tree-optimization/63189
 
2036
+       Backported from mainline
 
2037
+       2013-09-17  Cong Hou  <congh@google.com>
 
2038
+
 
2039
+       * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
 
2040
+       when checking the dot production pattern. The type of rhs operand
 
2041
+       of multiply is now checked correctly.
 
2042
+
 
2043
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2044
+
 
2045
+       Backported from mainline
 
2046
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
2047
+
 
2048
+       PR debug/61923
 
2049
+       * haifa-sched.c (advance_one_cycle): Fix dump.
 
2050
+       (schedule_block): Don't advance cycle if we are already at the
 
2051
+       beginning of the cycle.
 
2052
+
 
2053
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2054
+
 
2055
+       PR ipa/62015
 
2056
+       * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
 
2057
+       pass-trough jump functions correctly.
 
2058
+
 
2059
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2060
+
 
2061
+       PR ipa/61986
 
2062
+       * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
 
2063
+       created replacements in ascending order of offsets.
 
2064
+       (known_aggs_to_agg_replacement_list): Likewise.
 
2065
+
 
2066
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2067
+
 
2068
+       Backport from mainline
 
2069
+       2014-08-21  Marek Polacek  <polacek@redhat.com>
 
2070
+
 
2071
+       PR c/61271
 
2072
+       * expr.c (is_aligning_offset): Remove logical not.
 
2073
+
 
2074
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2075
+
 
2076
+       Backport from mainline
 
2077
+       2014-08-19  Marek Polacek  <polacek@redhat.com>
 
2078
+
 
2079
+       PR c/61271
 
2080
+       * cgraphunit.c (handle_alias_pairs): Fix condition.
 
2081
+
 
2082
+2014-08-30  John David Anglin  <danglin@gcc.gnu.org>
 
2083
+
 
2084
+       * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
 
2085
+       prefix to function labels when generating fast indirect calls.
 
2086
+
 
2087
+2014-08-26  Joel Sherrill <joel.sherrill@oarcorp.com>
 
2088
+
 
2089
+       * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
 
2090
+
 
2091
+2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2092
+
 
2093
+       Backport from mainline
 
2094
+       2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2095
+
 
2096
+       PR c/61271
 
2097
+       * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
 
2098
+       LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
 
2099
+
 
2100
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2101
+
 
2102
+       Backport from mainline
 
2103
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2104
+
 
2105
+       PR target/61996
 
2106
+       * config/sh/sh.opt (musermode): Allow negative form.
 
2107
+       * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
 
2108
+       targets that don't support it.
 
2109
+       * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
 
2110
+       Document -mno-usermode option.
 
2111
+
 
2112
+2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
 
2113
+
 
2114
+       PR target/62038
 
2115
+       * config/pa/pa.c (pa_output_function_epilogue): Don't set
 
2116
+       last_address when the current function is a thunk.
 
2117
+       (pa_asm_output_mi_thunk): When we don't have named sections or they
 
2118
+       are not being used, check that thunk can reach the stub table with a
 
2119
+       short branch.
 
2120
+
 
2121
+2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2122
+
 
2123
+       Backport fro mainline
 
2124
+       2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2125
+
 
2126
+       PR target/62195
 
2127
+       * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
 
2128
+       documentation to state it is only for VSX operations.
 
2129
+
 
2130
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
 
2131
+       constraint only active if VSX.
 
2132
+
 
2133
+       * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
 
2134
+       wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
 
2135
+       (lfiwzx): Likewise.
 
2136
+
 
2137
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
2138
+
 
2139
+       Backport from mainline:
 
2140
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
2141
+
 
2142
+       PR rtl-optimization/62004
 
2143
+       PR rtl-optimization/62030
 
2144
+       * ifcvt.c (rtx_interchangeable_p): New function.
 
2145
+       (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
 
2146
+
 
2147
+       2014-08-05  Richard Biener  <rguenther@suse.de>
 
2148
+
 
2149
+       * emit-rtl.h (mem_attrs_eq_p): Declare.
 
2150
+       * emit-rtl.c (mem_attrs_eq_p): Export.
 
2151
+
 
2152
+2014-08-16  John David Anglin  <danglin@gcc.gnu.org>
 
2153
+
 
2154
+       Backport from trunk:
 
2155
+       2014-04-06  John David Anglin  <danglin@gcc.gnu.org>
 
2156
+
 
2157
+       PR debug/55794
 
2158
+       * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
 
2159
+       size accounting for thunks.
 
2160
+       (pa_asm_output_mi_thunk): Use final_start_function() and
 
2161
+       final_end_function() to output function start and end directives.
 
2162
+
 
2163
+2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2164
+
 
2165
+       Backport from mainline:
 
2166
+       2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2167
+
 
2168
+       * doc/invoke.texi (SH options): Document missing processor variant
 
2169
+       options.  Remove references to Hitachi.  Undocument deprecated mspace
 
2170
+       option.
 
2171
+
 
2172
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
2173
+
 
2174
+       PR tree-optimization/62073
 
2175
+       * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
 
2176
+       a basic block.
 
2177
+
 
2178
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2179
+
 
2180
+       Backport from mainline
 
2181
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2182
+
 
2183
+       PR middle-end/62103
 
2184
+       * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
 
2185
+       bitfields, that is when size doesn't match the size of type or the
 
2186
+       size of the constructor.
 
2187
+
 
2188
+2014-08-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2189
+
 
2190
+       Backport patch from mainline
 
2191
+       2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2192
+
 
2193
+       * config/rs6000/constraints.md (wh constraint): New constraint,
 
2194
+       for FP registers if direct move is available.
 
2195
+       (wi constraint): New constraint, for VSX/FP registers that can
 
2196
+       handle 64-bit integers.
 
2197
+       (wj constraint): New constraint for VSX/FP registers that can
 
2198
+       handle 64-bit integers for direct moves.
 
2199
+       (wk constraint): New constraint for VSX/FP registers that can
 
2200
+       handle 64-bit doubles for direct moves.
 
2201
+       (wy constraint): Make documentation match implementation.
 
2202
+
 
2203
+       * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
 
2204
+       scalar_in_vmx_p field to simplify tests of whether SFmode or
 
2205
+       DFmode can go in the Altivec registers.
 
2206
+       (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
 
2207
+       (rs6000_setup_reg_addr_masks): Likewise.
 
2208
+       (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
 
2209
+       field, and wh/wi/wj/wk constraints.
 
2210
+       (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
 
2211
+       the wh/wi/wj/wk constraints.
 
2212
+       (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
 
2213
+       upper registers, prefer VSX registers unless the operation is a
 
2214
+       memory operation with REG+OFFSET addressing.
 
2215
+
 
2216
+       * config/rs6000/vsx.md (VSr mode attribute): Add support for
 
2217
+       DImode.  Change SFmode to use ww constraint instead of d to allow
 
2218
+       SF registers in the upper registers.
 
2219
+       (VSr2): Likewise.
 
2220
+       (VSr3): Likewise.
 
2221
+       (VSr5): Fix thinko in comment.
 
2222
+       (VSa): New mode attribute that is an alternative to wa, that
 
2223
+       returns the VSX register class that a mode can go in, but may not
 
2224
+       be the preferred register class.
 
2225
+       (VS_64dm): New mode attribute for appropriate register classes for
 
2226
+       referencing 64-bit elements of vectors for direct moves and normal
 
2227
+       moves.
 
2228
+       (VS_64reg): Likewise.
 
2229
+       (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
 
2230
+       register allocator to only registers the data type can handle.
 
2231
+       (vsx_le_perm_load_<mode>): Likewise.
 
2232
+       (vsx_le_perm_store_<mode>): Likewise.
 
2233
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
2234
+       (vsx_xxpermdi4_le_<mode>): Likewise.
 
2235
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
2236
+       (vsx_lxvd2x4_le_<mode>): Likewise.
 
2237
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
2238
+       (vsx_add<mode>3): Likewise.
 
2239
+       (vsx_sub<mode>3): Likewise.
 
2240
+       (vsx_mul<mode>3): Likewise.
 
2241
+       (vsx_div<mode>3): Likewise.
 
2242
+       (vsx_tdiv<mode>3_internal): Likewise.
 
2243
+       (vsx_fre<mode>2): Likewise.
 
2244
+       (vsx_neg<mode>2): Likewise.
 
2245
+       (vsx_abs<mode>2): Likewise.
 
2246
+       (vsx_nabs<mode>2): Likewise.
 
2247
+       (vsx_smax<mode>3): Likewise.
 
2248
+       (vsx_smin<mode>3): Likewise.
 
2249
+       (vsx_sqrt<mode>2): Likewise.
 
2250
+       (vsx_rsqrte<mode>2): Likewise.
 
2251
+       (vsx_tsqrt<mode>2_internal): Likewise.
 
2252
+       (vsx_fms<mode>4): Likewise.
 
2253
+       (vsx_nfma<mode>4): Likewise.
 
2254
+       (vsx_eq<mode>): Likewise.
 
2255
+       (vsx_gt<mode>): Likewise.
 
2256
+       (vsx_ge<mode>): Likewise.
 
2257
+       (vsx_eq<mode>_p): Likewise.
 
2258
+       (vsx_gt<mode>_p): Likewise.
 
2259
+       (vsx_ge<mode>_p): Likewise.
 
2260
+       (vsx_xxsel<mode>): Likewise.
 
2261
+       (vsx_xxsel<mode>_uns): Likewise.
 
2262
+       (vsx_copysign<mode>3): Likewise.
 
2263
+       (vsx_float<VSi><mode>2): Likewise.
 
2264
+       (vsx_floatuns<VSi><mode>2): Likewise.
 
2265
+       (vsx_fix_trunc<mode><VSi>2): Likewise.
 
2266
+       (vsx_fixuns_trunc<mode><VSi>2): Likewise.
 
2267
+       (vsx_x<VSv>r<VSs>i): Likewise.
 
2268
+       (vsx_x<VSv>r<VSs>ic): Likewise.
 
2269
+       (vsx_btrunc<mode>2): Likewise.
 
2270
+       (vsx_b2trunc<mode>2): Likewise.
 
2271
+       (vsx_floor<mode>2): Likewise.
 
2272
+       (vsx_ceil<mode>2): Likewise.
 
2273
+       (vsx_<VS_spdp_insn>): Likewise.
 
2274
+       (vsx_xscvspdp): Likewise.
 
2275
+       (vsx_xvcvspuxds): Likewise.
 
2276
+       (vsx_float_fix_<mode>2): Likewise.
 
2277
+       (vsx_set_<mode>): Likewise.
 
2278
+       (vsx_extract_<mode>_internal1): Likewise.
 
2279
+       (vsx_extract_<mode>_internal2): Likewise.
 
2280
+       (vsx_extract_<mode>_load): Likewise.
 
2281
+       (vsx_extract_<mode>_store): Likewise.
 
2282
+       (vsx_splat_<mode>): Likewise.
 
2283
+       (vsx_xxspltw_<mode>): Likewise.
 
2284
+       (vsx_xxspltw_<mode>_direct): Likewise.
 
2285
+       (vsx_xxmrghw_<mode>): Likewise.
 
2286
+       (vsx_xxmrglw_<mode>): Likewise.
 
2287
+       (vsx_xxsldwi_<mode>): Likewise.
 
2288
+       (vsx_xscvdpspn): Tighten constraints to only use register classes
 
2289
+       the types use.
 
2290
+       (vsx_xscvspdpn): Likewise.
 
2291
+       (vsx_xscvdpspn_scalar): Likewise.
 
2292
+
 
2293
+       * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
 
2294
+       wj, and wk constraints.
 
2295
+       (GPR_REG_CLASS_P): New helper macro for register classes targeting
 
2296
+       general purpose registers.
 
2297
+
 
2298
+       * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
 
2299
+       direct moves.
 
2300
+       (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
 
2301
+       DImode instead of wm.  Use wk constraint for direct move of DFmode
 
2302
+       instead of wm.
 
2303
+       (extendsidi2_lfiwax): Likewise.
 
2304
+       (lfiwax): Likewise.
 
2305
+       (lfiwzx): Likewise.
 
2306
+       (movdi_internal64): Likewise.
 
2307
+
 
2308
+       * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
 
2309
+       wk constraints. Make the wy constraint documentation match them
 
2310
+       implementation.
 
2311
+
 
2312
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2313
+
 
2314
+       Backport from mainline
 
2315
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2316
+
 
2317
+       PR tree-optimization/61375
 
2318
+       * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
 
2319
+       symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
 
2320
+       (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
 
2321
+
 
2322
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
2323
+
 
2324
+       PR tree-optimization/61964
 
2325
+       * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
 
2326
+       function merged from trunk.
 
2327
+       (gimple_equal_p): Handle non-SSA LHS solely by structural
 
2328
+       equality.
 
2329
+
 
2330
+2014-07-25  Uros Bizjak  <ubizjak@gmail.com>
 
2331
+
 
2332
+       * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
 
2333
+
 
2334
+2014-07-24  Kyle McMartin  <kyle@redhat.com>
 
2335
+
 
2336
+       * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
 
2337
+
 
2338
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2339
+
 
2340
+       * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
 
2341
+       Add prototype.
 
2342
+       * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
 
2343
+       function.  Issue -Wpsabi warning if future GCC releases will use
 
2344
+       different field alignment rules for this type.
 
2345
+       * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
 
2346
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
 
2347
+       * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
 
2348
+
 
2349
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2350
+
 
2351
+       * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
 
2352
+       -Wpsabi note when encountering a type where future GCC releases
 
2353
+       will apply different alignment requirements.
 
2354
+
 
2355
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2356
+
 
2357
+       * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
 
2358
+       does not fit fully into floating-point registers, and there is still
 
2359
+       space in the register parameter area, issue -Wpsabi note that the ABI
 
2360
+       will change in a future GCC release.
 
2361
+
 
2362
+2014-07-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
2363
+
 
2364
+       * config/arm/t-rtems-eabi: Add
 
2365
+       mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
 
2366
+       mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
 
2367
+       mbig-endian/mthumb/march=armv7-r, and
 
2368
+       mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
2369
+       multilibs.
 
2370
+
 
2371
+2014-07-21  Peter Bergner  <bergner@vnet.ibm.com>
 
2372
+
 
2373
+       * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
 
2374
+       (LIBTSAN_EARLY_SPEC): Likewise.
 
2375
+       (STATIC_LIBASAN_LIBS): Likewise.
 
2376
+       (STATIC_LIBTSAN_LIBS): Likewise.
 
2377
+
 
2378
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
2379
+
 
2380
+       * toplev.c (output_stack_usage): Adjust the location of the warning.
 
2381
+
 
2382
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
 
2383
+
 
2384
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
 
2385
+       (*membar_storeload): Disable for LEON3.
 
2386
+
 
2387
+2014-07-17  Richard Biener  <rguenther@suse.de>
 
2388
+
 
2389
+       PR rtl-optimization/61801
 
2390
+       * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
 
2391
+       ASM_INPUT don't set reg_pending_barrier if it appears in a
 
2392
+       debug-insn.
 
2393
+
 
2394
+2014-07-16  Jakub Jelinek  <jakub@redhat.com>
 
2395
+
 
2396
+       * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
 
2397
+       on the FUNCTION_DECL.
 
2398
+
 
2399
+2014-07-10  Tom G. Christensen  <tgc@jupiterrise.com>
 
2400
+
 
2401
+       * doc/install.texi: Remove links to defunct package providers for
 
2402
+       Solaris.
 
2403
+
 
2404
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
2405
+
 
2406
+       PR middle-end/53590
 
2407
+       * function.c (allocate_struct_function): Revert r188667 change.
 
2408
+
 
2409
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
2410
+
 
2411
+       PR tree-optimization/61684
 
2412
+       * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
 
2413
+       rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
 
2414
+
 
2415
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2416
+
 
2417
+       Backport from Mainline
 
2418
+       2014-06-20  Jakub Jelinek  <jakub@redhat.com>
 
2419
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2420
+
 
2421
+       PR tree-optimization/61306
 
2422
+       * tree-ssa-math-opts.c (struct symbolic_number): Store type of
 
2423
+       expression instead of its size.
 
2424
+       (do_shift_rotate): Adapt to change in struct symbolic_number. Return
 
2425
+       false to prevent optimization when the result is unpredictable due to
 
2426
+       arithmetic right shift of signed type with highest byte is set.
 
2427
+       (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
 
2428
+       (find_bswap_1): Likewise. Return NULL to prevent optimization when the
 
2429
+       result is unpredictable due to sign extension.
 
2430
+       (find_bswap): Adapt to change in struct symbolic_number.
 
2431
+
 
2432
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
2433
+
 
2434
+       Backport from mainline
 
2435
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
2436
+
 
2437
+       PR target/61586
 
2438
+       * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
 
2439
+
 
2440
+2014-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2441
+
 
2442
+       PR target/61542
 
2443
+       * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
 
2444
+       extraction other than index 3.
 
2445
+
 
2446
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
 
2447
+
 
2448
+       PR target/61570
 
2449
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
 
2450
+       model family 6 CPU with has_longmode never use a CPU without
 
2451
+       64-bit support.
 
2452
+
 
2453
+2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
 
2454
+
 
2455
+       Backport from mainline
 
2456
+
 
2457
+       2014-06-20  Julian Brown  <julian@codesourcery.com>
 
2458
+                   Chung-Lin Tang  <cltang@codesourcery.com>
 
2459
+
 
2460
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
 
2461
+       TARGET_THUMB1_ONLY. Add comments.
 
2462
+
 
2463
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
2464
+
 
2465
+       Backport from mainline
 
2466
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
2467
+
 
2468
+       PR target/61423
 
2469
+       * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
 
2470
+       define_insn_and_split pattern, merged from *floatunssi<mode>2_1
 
2471
+       and corresponding splitters.  Zero extend general register
 
2472
+       or memory input operand to XMM temporary.  Enable for
 
2473
+       TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
 
2474
+       (floatunssi<mode>2): Update expander predicate.
 
2475
+
 
2476
+2014-06-18  Richard Henderson  <rth@redhat.com>
 
2477
+
 
2478
+       PR target/61545
 
2479
+       * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
 
2480
+
 
2481
+2014-06-17  Nagaraju Mekala <nagaraju.mekala@xilinx.com>
 
2482
+
 
2483
+       Revert on gcc-4_8-branch.
 
2484
+       * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
 
2485
+       * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
 
2486
+
 
2487
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
2488
+
 
2489
+       Backport from mainline
 
2490
+
 
2491
+       PR target/61483
 
2492
+       * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
 
2493
+       variable 'size'; calculate 'size' right in the front; use
 
2494
+       'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
 
2495
+       pcum->aapcs_stack_words.
 
2496
+
 
2497
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
2498
+
 
2499
+       Backport from mainline
 
2500
+
 
2501
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
2502
+       PR target/61415
 
2503
+       * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
 
2504
+       (BU_MISC_2): Rename to ...
 
2505
+       (BU_LDBL128_2): ... this.
 
2506
+       * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
 
2507
+       (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
 
2508
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
 
2509
+       RS6000_BTM_LDBL128.
 
2510
+       (rs6000_invalid_builtin): Add long double 128-bit builtin support.
 
2511
+       (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
 
2512
+       * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
 
2513
+       (unpacktf_1): Likewise.
 
2514
+       * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
 
2515
+       (__builtin_longdouble_dw1): Likewise.
 
2516
+       * doc/sourcebuild.texi (longdouble128): Document.
 
2517
+
 
2518
+2014-06-13  Jason Merrill  <jason@redhat.com>
 
2519
+
 
2520
+       PR c++/60731
 
2521
+       * common.opt (-fno-gnu-unique): Add.
 
2522
+       * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
 
2523
+
 
2524
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
2525
+
 
2526
+       Backport from 2014-05-09 trunk r210272
 
2527
+
 
2528
+       * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
 
2529
+       unsigned int initializers for regno_in, regno_out.
 
2530
+
 
2531
+       Backport from 2014-05-14 trunk r210418
 
2532
+       * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
 
2533
+       shifted values to avoid build warning.
 
2534
+
 
2535
+       Backport from 2014-06-12 trunk r211491
 
2536
+
 
2537
+       PR target/61443
 
2538
+       * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
 
2539
+       loading from address spaces.
 
2540
+
 
2541
+2014-06-12  Alan Modra  <amodra@gmail.com>
 
2542
+
 
2543
+       PR target/61300
 
2544
+       * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
 
2545
+       * doc/tm.texi: Regenerate.
 
2546
+       * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
 
2547
+       Use throughout in place of REG_PARM_STACK_SPACE.
 
2548
+       * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
 
2549
+       "incoming" param.  Pass to rs6000_function_parms_need_stack.
 
2550
+       (rs6000_function_parms_need_stack): Add "incoming" param, ignore
 
2551
+       prototype_p when incoming.  Use function decl when incoming
 
2552
+       to handle K&R style functions.
 
2553
+       * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
 
2554
+       (INCOMING_REG_PARM_STACK_SPACE): Define.
 
2555
+
 
2556
+2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2557
+
 
2558
+       Back port from trunk
 
2559
+       2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2560
+
 
2561
+       PR target/61431
 
2562
+       * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
 
2563
+       iterators, VSX_D that handles 64-bit types, and VSX_LE that
 
2564
+       handles swapping the two 64-bit double words on little endian
 
2565
+       systems.  Include V1TImode and optionally TImode in VSX_LE so that
 
2566
+       these types are properly swapped.  Change all of the insns and
 
2567
+       splits that do the 64-bit swaps to use VSX_LE.
 
2568
+       (vsx_le_perm_load_<mode>): Likewise.
 
2569
+       (vsx_le_perm_store_<mode>): Likewise.
 
2570
+       (splitters for little endian memory operations): Likewise.
 
2571
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
2572
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
2573
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
2574
+
 
2575
+2014-06-05  Martin Jambor  <mjambor@suse.cz>
 
2576
+
 
2577
+       PR ipa/61393
 
2578
+       * ipa-cp.c (determine_versionability): Pretend that tm_clones are
 
2579
+       not versionable.
 
2580
+
 
2581
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
2582
+
 
2583
+       PR tree-optimization/61383
 
2584
+       * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
 
2585
+       stmts can't trap.
 
2586
+
 
2587
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
2588
+
 
2589
+       Backport from mainline
 
2590
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
2591
+
 
2592
+       PR rtl-optimization/60866
 
2593
+       * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
 
2594
+       Default it to -1.  Pass it down to init_simplejump_data.
 
2595
+       (init_simplejump_data): New parameter old_seqno.  Pass it down
 
2596
+       to get_seqno_for_a_jump.
 
2597
+       (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
 
2598
+       initializing new jump seqno as a last resort.  Add comment.
 
2599
+       (sel_redirect_edge_and_branch): Save old seqno of the conditional
 
2600
+       jump and pass it down to sel_init_new_insn.
 
2601
+       (sel_redirect_edge_and_branch_force): Likewise.
 
2602
+
 
2603
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
2604
+
 
2605
+       Backport from mainline
 
2606
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
2607
+
 
2608
+       PR rtl-optimization/60901
 
2609
+       * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
 
2610
+       bb predecessor belongs to the same scheduling region.  Adjust comment.
 
2611
+
 
2612
+2014-06-03  Uros Bizjak  <ubizjak@gmail.com>
 
2613
+
 
2614
+       Backport from mainline
 
2615
+       2014-06-02  Uros Bizjak  <ubizjak@gmail.com>
 
2616
+
 
2617
+       PR target/61239
 
2618
+       * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
 
2619
+       GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
 
2620
+
 
2621
+2014-05-28  Guozhi Wei  <carrot@google.com>
 
2622
+
 
2623
+       PR target/61202
 
2624
+       * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
 
2625
+       constraint.
 
2626
+       (vqdmulhq_n_s16): Likewise.
 
2627
+
 
2628
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
2629
+
 
2630
+       Backport from mainline
 
2631
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
2632
+
 
2633
+       * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
 
2634
+       predicate to detect a negative quotient.
 
2635
+
 
2636
+2014-05-28  Georg-Johann Lay  <avr@gjlay.de>
 
2637
+
 
2638
+       PR target/61044
 
2639
+       * doc/extend.texi (Local Labels): Note that label differences are
 
2640
+       not supported for AVR.
 
2641
+
 
2642
+2014-05-26  Michael Tautschnig  <mt@debian.org>
 
2643
+
 
2644
+       PR target/61249
 
2645
+       * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
 
2646
+       __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
 
2647
+
 
2648
+2014-05-23  Alan Modra  <amodra@gmail.com>
 
2649
+
 
2650
+       PR target/61231
 
2651
+       * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
 
2652
+       * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
 
2653
+       Use "Y" constraint rather than "m".
 
2654
+
 
2655
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
2656
+
 
2657
+       Backport from mainline
 
2658
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
2659
+
 
2660
+       * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
 
2661
+
 
2662
+2014-05-22  Richard Earnshaw  <rearnsha@arm.com>
 
2663
+
 
2664
+       PR target/61208
 
2665
+       * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
 
2666
+
 
2667
 2014-05-22  Release Manager
 
2668
 
 
2669
        * GCC 4.8.3 released.
 
2670
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
 
2671
===================================================================
 
2672
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../tags/gcc_4_8_3_release)
 
2673
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../branches/gcc-4_8-branch)
 
2674
@@ -0,0 +1,14 @@
 
2675
+/* Test for deprecation messages on use of lvsl and lvsr for little endian.  */
 
2676
+
 
2677
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
2678
+/* { dg-options "-O0 -Wdeprecated" } */
 
2679
+
 
2680
+#include <altivec.h>
 
2681
+
 
2682
+float f[20];
 
2683
+
 
2684
+void foo ()
 
2685
+{
 
2686
+  vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
2687
+  vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
2688
+}
 
2689
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
 
2690
===================================================================
 
2691
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../tags/gcc_4_8_3_release)
 
2692
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../branches/gcc-4_8-branch)
 
2693
@@ -0,0 +1,30 @@
 
2694
+/* { dg-do run { target { powerpc64*-*-* } } } */
 
2695
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
2696
+/* { dg-options "-mvsx" } */
 
2697
+
 
2698
+#include <altivec.h>
 
2699
+
 
2700
+void abort (void);
 
2701
+
 
2702
+vector double vec = (vector double) {99.0, 99.0};
 
2703
+
 
2704
+int main() {
 
2705
+
 
2706
+  int actual = vec_all_nge(vec, vec);
 
2707
+  if ( actual != 0)
 
2708
+    abort();
 
2709
+
 
2710
+  actual = vec_all_nle(vec, vec);
 
2711
+  if ( actual != 0)
 
2712
+    abort();
 
2713
+
 
2714
+  actual = vec_any_nge(vec, vec);
 
2715
+  if ( actual != 0)
 
2716
+    abort();
 
2717
+
 
2718
+  actual = vec_any_nle(vec, vec);
 
2719
+  if ( actual != 0)
 
2720
+    abort();
 
2721
+
 
2722
+  return 0;
 
2723
+}
 
2724
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
 
2725
===================================================================
 
2726
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../tags/gcc_4_8_3_release)
 
2727
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../branches/gcc-4_8-branch)
 
2728
@@ -1,7 +1,7 @@
 
2729
 /* { dg-do compile { target { powerpc*-*-* } } } */
 
2730
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
2731
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
2732
-/* { dg-options "-O3 -mcpu=power7" } */
 
2733
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
 
2734
 
 
2735
 /* Test the various load/store varients.  */
 
2736
 
 
2737
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
 
2738
===================================================================
 
2739
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
 
2740
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
 
2741
@@ -1,6 +1,7 @@
 
2742
 /* { dg-do assemble } */
 
2743
 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
 
2744
 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
 
2745
+/* { dg-require-effective-target longdouble128 } */
 
2746
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
 
2747
 
 
2748
 typedef float TFmode __attribute__ ((mode (TF)));
 
2749
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
 
2750
===================================================================
 
2751
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../tags/gcc_4_8_3_release)
 
2752
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../branches/gcc-4_8-branch)
 
2753
@@ -2,6 +2,7 @@
 
2754
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
2755
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 
2756
 /* { dg-require-effective-target powerpc_fprs } */
 
2757
+/* { dg-require-effective-target longdouble128 } */
 
2758
 /* { dg-options "-O2 -mhard-float" } */
 
2759
 
 
2760
 #include <stddef.h>
 
2761
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
 
2762
===================================================================
 
2763
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../tags/gcc_4_8_3_release)
 
2764
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../branches/gcc-4_8-branch)
 
2765
@@ -0,0 +1,12 @@
 
2766
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
2767
+/* { dg-options "-mabi=elfv2" } */
 
2768
+
 
2769
+struct f8
 
2770
+  {
 
2771
+    float x[8];
 
2772
+  };
 
2773
+
 
2774
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
 
2775
+{
 
2776
+}
 
2777
+
 
2778
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
 
2779
===================================================================
 
2780
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../tags/gcc_4_8_3_release)
 
2781
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../branches/gcc-4_8-branch)
 
2782
@@ -0,0 +1,14 @@
 
2783
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
2784
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
2785
+/* { dg-require-effective-target powerpc_htm_ok } */
 
2786
+/* { dg-options "-O2 -mhtm" } */
 
2787
+
 
2788
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
 
2789
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
 
2790
+
 
2791
+#include <htmintrin.h>
 
2792
+long
 
2793
+ttest (void)
 
2794
+{
 
2795
+  return _HTM_STATE(__builtin_ttest());
 
2796
+}
 
2797
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
 
2798
===================================================================
 
2799
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../tags/gcc_4_8_3_release)
 
2800
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../branches/gcc-4_8-branch)
 
2801
@@ -0,0 +1,21 @@
 
2802
+/* Test expected code generation for lvsl and lvsr on little endian.
 
2803
+   Note that lvsl and lvsr are each produced once, but the filename
 
2804
+   causes them to appear twice in the file.  */
 
2805
+
 
2806
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
2807
+/* { dg-options "-O0 -Wno-deprecated" } */
 
2808
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
 
2809
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
 
2810
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
 
2811
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
 
2812
+
 
2813
+
 
2814
+#include <altivec.h>
 
2815
+
 
2816
+float f[20];
 
2817
+
 
2818
+void foo ()
 
2819
+{
 
2820
+  vector unsigned char a = vec_lvsl (4, f);
 
2821
+  vector unsigned char b = vec_lvsr (8, f);
 
2822
+}
 
2823
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
 
2824
===================================================================
 
2825
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../tags/gcc_4_8_3_release)
 
2826
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../branches/gcc-4_8-branch)
 
2827
@@ -0,0 +1,12 @@
 
2828
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
2829
+/* { dg-options "-mno-compat-align-parm" } */
 
2830
+
 
2831
+struct test
 
2832
+  {
 
2833
+    long a __attribute__((aligned (16)));
 
2834
+  };
 
2835
+
 
2836
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
 
2837
+{
 
2838
+}
 
2839
+
 
2840
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
 
2841
===================================================================
 
2842
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../tags/gcc_4_8_3_release)
 
2843
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../branches/gcc-4_8-branch)
 
2844
@@ -0,0 +1,9 @@
 
2845
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
2846
+/* { dg-require-effective-target powerpc_altivec_ok } */
 
2847
+/* { dg-options "-maltivec" } */
 
2848
+
 
2849
+struct test
 
2850
+  {
 
2851
+    int a __attribute__((vector_size (8)));
 
2852
+  }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
 
2853
+
 
2854
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
 
2855
===================================================================
 
2856
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../tags/gcc_4_8_3_release)
 
2857
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../branches/gcc-4_8-branch)
 
2858
@@ -1,6 +1,6 @@
 
2859
 /* { dg-do compile { target powerpc*-*-* } } */
 
2860
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
2861
-/* { dg-options "-maltivec -O0 -Wall" } */
 
2862
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
 
2863
 
 
2864
 #include <altivec.h>
 
2865
 
 
2866
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
 
2867
===================================================================
 
2868
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../tags/gcc_4_8_3_release)
 
2869
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../branches/gcc-4_8-branch)
 
2870
@@ -1,7 +1,7 @@
 
2871
 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
 
2872
 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
 
2873
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
2874
-/* { dg-options "-maltivec -O2" } */
 
2875
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
 
2876
 
 
2877
 #include <altivec.h>
 
2878
 
 
2879
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
 
2880
===================================================================
 
2881
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
 
2882
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
 
2883
@@ -1,5 +1,5 @@
 
2884
 /* { dg-do compile { target powerpc_altivec_ok } } */
 
2885
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
 
2886
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
 
2887
 
 
2888
 #include <altivec.h>
 
2889
 
 
2890
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
 
2891
===================================================================
 
2892
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../tags/gcc_4_8_3_release)
 
2893
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../branches/gcc-4_8-branch)
 
2894
@@ -0,0 +1,10 @@
 
2895
+/* { dg-do compile } */
 
2896
+/* { dg-options "-O2 -mieee" } */
 
2897
+
 
2898
+void foo (int *dimensions, double **params, int hh)
 
2899
+{
 
2900
+  if (params[hh])
 
2901
+    ;
 
2902
+  else if (dimensions[hh] > 0)
 
2903
+    params[hh][0] = 1.0f;
 
2904
+}
 
2905
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
 
2906
===================================================================
 
2907
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../tags/gcc_4_8_3_release)
 
2908
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../branches/gcc-4_8-branch)
 
2909
@@ -0,0 +1,35 @@
 
2910
+/* Test AAPCS64 layout and __builtin_va_start.
 
2911
+
 
2912
+   Pass named HFA/HVA argument on stack.  */
 
2913
+
 
2914
+/* { dg-do run { target aarch64*-*-* } } */
 
2915
+
 
2916
+#ifndef IN_FRAMEWORK
 
2917
+#define AAPCS64_TEST_STDARG
 
2918
+#define TESTFILE "va_arg-14.c"
 
2919
+#include "type-def.h"
 
2920
+
 
2921
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
 
2922
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
 
2923
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
 
2924
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
 
2925
+
 
2926
+#include "abitest.h"
 
2927
+#else
 
2928
+  ARG (float, 1.0f, S0, 0)
 
2929
+  ARG (float, 2.0f, S1, 1)
 
2930
+  ARG (float, 3.0f, S2, 2)
 
2931
+  ARG (float, 4.0f, S3, 3)
 
2932
+  ARG (float, 5.0f, S4, 4)
 
2933
+  ARG (float, 6.0f, S5, 5)
 
2934
+  ARG (float, 7.0f, S6, 6)
 
2935
+  ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
 
2936
+  /* Previous argument size has been rounded up to the nearest multiple of
 
2937
+     8 bytes.  */
 
2938
+  ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
 
2939
+  /* NSAA is rounded up to the nearest natural alignment of float32x4.  */
 
2940
+  ARG (vf4_t, float32x4, STACK + 32, 9)
 
2941
+  ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
 
2942
+  DOTS
 
2943
+  LAST_ANON (double, 123456789.987, STACK + 64, 11)
 
2944
+#endif
 
2945
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
 
2946
===================================================================
 
2947
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../tags/gcc_4_8_3_release)
 
2948
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../branches/gcc-4_8-branch)
 
2949
@@ -34,6 +34,13 @@
 
2950
   float b;
 
2951
 };
 
2952
 
 
2953
+struct hfa_fx3_t
 
2954
+{
 
2955
+  float a;
 
2956
+  float b;
 
2957
+  float c;
 
2958
+};
 
2959
+
 
2960
 struct hfa_dx2_t
 
2961
 {
 
2962
   double a;
 
2963
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
 
2964
===================================================================
 
2965
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../tags/gcc_4_8_3_release)
 
2966
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../branches/gcc-4_8-branch)
 
2967
@@ -0,0 +1,59 @@
 
2968
+/* Test AAPCS64 layout and __builtin_va_start.
 
2969
+
 
2970
+   Pass named HFA/HVA argument on stack.  */
 
2971
+
 
2972
+/* { dg-do run { target aarch64*-*-* } } */
 
2973
+
 
2974
+#ifndef IN_FRAMEWORK
 
2975
+#define AAPCS64_TEST_STDARG
 
2976
+#define TESTFILE "va_arg-13.c"
 
2977
+
 
2978
+struct float_float_t
 
2979
+{
 
2980
+  float a;
 
2981
+  float b;
 
2982
+} float_float;
 
2983
+
 
2984
+union float_int_t
 
2985
+{
 
2986
+  float b8;
 
2987
+  int b5;
 
2988
+} float_int;
 
2989
+
 
2990
+#define HAS_DATA_INIT_FUNC
 
2991
+void
 
2992
+init_data ()
 
2993
+{
 
2994
+  float_float.a = 1.2f;
 
2995
+  float_float.b = 2.2f;
 
2996
+
 
2997
+  float_int.b8 = 4983.80f;
 
2998
+}
 
2999
+
 
3000
+#include "abitest.h"
 
3001
+#else
 
3002
+  ARG (float, 1.0f, S0, 0)
 
3003
+  ARG (float, 2.0f, S1, 1)
 
3004
+  ARG (float, 3.0f, S2, 2)
 
3005
+  ARG (float, 4.0f, S3, 3)
 
3006
+  ARG (float, 5.0f, S4, 4)
 
3007
+  ARG (float, 6.0f, S5, 5)
 
3008
+  ARG (float, 7.0f, S6, 6)
 
3009
+  ARG (struct float_float_t, float_float, STACK, 7)
 
3010
+  ARG (int,  9, W0, 8)
 
3011
+  ARG (int, 10, W1, 9)
 
3012
+  ARG (int, 11, W2, 10)
 
3013
+  ARG (int, 12, W3, 11)
 
3014
+  ARG (int, 13, W4, 12)
 
3015
+  ARG (int, 14, W5, 13)
 
3016
+  ARG (int, 15, W6, LAST_NAMED_ARG_ID)
 
3017
+  DOTS
 
3018
+  /* Note on the reason of using 'X7' instead of 'W7' here:
 
3019
+     Using 'X7' makes sure the test works in the big-endian mode.
 
3020
+     According to PCS rules B.4 and C.10, the size of float_int is rounded
 
3021
+     to 8 bytes and prepared in the register X7 as if loaded via LDR from
 
3022
+     the memory, with the content of the other 4 bytes unspecified.  The
 
3023
+     test framework will only compare the 4 relavent bytes.  */
 
3024
+  ANON (union float_int_t, float_int, X7, 15)
 
3025
+  LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
 
3026
+#endif
 
3027
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
 
3028
===================================================================
 
3029
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../tags/gcc_4_8_3_release)
 
3030
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../branches/gcc-4_8-branch)
 
3031
@@ -0,0 +1,39 @@
 
3032
+/* Test AAPCS64 layout and __builtin_va_start.
 
3033
+
 
3034
+   Pass named __128int argument on stack.  */
 
3035
+
 
3036
+/* { dg-do run { target aarch64*-*-* } } */
 
3037
+
 
3038
+#ifndef IN_FRAMEWORK
 
3039
+#define AAPCS64_TEST_STDARG
 
3040
+#define TESTFILE "va_arg-15.c"
 
3041
+#include "type-def.h"
 
3042
+
 
3043
+union int128_t qword;
 
3044
+
 
3045
+#define HAS_DATA_INIT_FUNC
 
3046
+void
 
3047
+init_data ()
 
3048
+{
 
3049
+  /* Init signed quad-word integer.  */
 
3050
+  qword.l64 = 0xfdb9753102468aceLL;
 
3051
+  qword.h64 = 0xeca8642013579bdfLL;
 
3052
+}
 
3053
+
 
3054
+#include "abitest.h"
 
3055
+#else
 
3056
+  ARG (int, 1, W0, 0)
 
3057
+  ARG (int, 2, W1, 1)
 
3058
+  ARG (int, 3, W2, 2)
 
3059
+  ARG (int, 4, W3, 3)
 
3060
+  ARG (int, 5, W4, 4)
 
3061
+  ARG (int, 6, W5, 5)
 
3062
+  ARG (int, 7, W6, 6)
 
3063
+  ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
 
3064
+  DOTS
 
3065
+#ifndef __AAPCS64_BIG_ENDIAN__
 
3066
+  LAST_ANON (int, 8, STACK + 16, 8)
 
3067
+#else
 
3068
+  LAST_ANON (int, 8, STACK + 20, 8)
 
3069
+#endif
 
3070
+#endif
 
3071
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
 
3072
===================================================================
 
3073
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../tags/gcc_4_8_3_release)
 
3074
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../branches/gcc-4_8-branch)
 
3075
@@ -0,0 +1,134 @@
 
3076
+/* { dg-do run } */
 
3077
+/* { dg-options "-std=gnu99" } */
 
3078
+
 
3079
+#include <stdlib.h>
 
3080
+#include <stdarg.h>
 
3081
+
 
3082
+#define NC __attribute__((noinline,noclone))
 
3083
+
 
3084
+void NC vfun (char n, ...)
 
3085
+{
 
3086
+  va_list ap;
 
3087
+
 
3088
+  va_start (ap, n);
 
3089
+
 
3090
+  switch (n)
 
3091
+    {
 
3092
+    default:
 
3093
+      abort();
 
3094
+    case 1:
 
3095
+      if (11 != va_arg (ap, int))
 
3096
+        abort();
 
3097
+      break;
 
3098
+    case 2:
 
3099
+      if (2222 != va_arg (ap, int))
 
3100
+        abort();
 
3101
+      break;
 
3102
+    case 3:
 
3103
+      if (333333 != va_arg (ap, __int24))
 
3104
+        abort();
 
3105
+      break;
 
3106
+    case 4:
 
3107
+      if (44444444 != va_arg (ap, long))
 
3108
+        abort();
 
3109
+      break;
 
3110
+    case 8:
 
3111
+      if (8888888888888888 != va_arg (ap, long long))
 
3112
+        abort();
 
3113
+      break;
 
3114
+    }
 
3115
+
 
3116
+  va_end (ap);
 
3117
+}
 
3118
+
 
3119
+
 
3120
+void NC boo_qi (const __flash char *p)
 
3121
+{
 
3122
+  vfun (1, *p);
 
3123
+}
 
3124
+
 
3125
+void NC boox_qi (const __memx char *p)
 
3126
+{
 
3127
+  vfun (1, *p);
 
3128
+}
 
3129
+
 
3130
+void NC boo_hi (const __flash int *p)
 
3131
+{
 
3132
+  vfun (2, *p);
 
3133
+}
 
3134
+
 
3135
+void NC boox_hi (const __memx int *p)
 
3136
+{
 
3137
+  vfun (2, *p);
 
3138
+}
 
3139
+
 
3140
+void NC boo_psi (const __flash __int24 *p)
 
3141
+{
 
3142
+  vfun (3, *p);
 
3143
+}
 
3144
+
 
3145
+void NC boox_psi (const __memx __int24 *p)
 
3146
+{
 
3147
+  vfun (3, *p);
 
3148
+}
 
3149
+
 
3150
+void NC boo_si (const __flash long *p)
 
3151
+{
 
3152
+  vfun (4, *p);
 
3153
+}
 
3154
+
 
3155
+void NC boox_si (const __memx long *p)
 
3156
+{
 
3157
+  vfun (4, *p);
 
3158
+}
 
3159
+
 
3160
+void NC boo_di (const __flash long long *p)
 
3161
+{
 
3162
+  vfun (8, *p);
 
3163
+}
 
3164
+
 
3165
+void NC boox_di (const __memx long long *p)
 
3166
+{
 
3167
+  vfun (8, *p);
 
3168
+}
 
3169
+
 
3170
+const __flash char f_qi = 11;
 
3171
+const __flash int f_hi = 2222;
 
3172
+const __flash __int24 f_psi = 333333;
 
3173
+const __flash long f_si = 44444444;
 
3174
+const __flash long long f_di = 8888888888888888;
 
3175
+
 
3176
+const __memx char x_qi = 11;
 
3177
+const __memx int x_hi = 2222;
 
3178
+const __memx __int24 x_psi = 333333;
 
3179
+const __memx long x_si = 44444444;
 
3180
+const __memx long long x_di = 8888888888888888;
 
3181
+
 
3182
+char r_qi = 11;
 
3183
+int r_hi = 2222;
 
3184
+__int24 r_psi = 333333;
 
3185
+long r_si = 44444444;
 
3186
+long long r_di = 8888888888888888;
 
3187
+
 
3188
+int main (void)
 
3189
+{
 
3190
+  boo_qi (&f_qi);
 
3191
+  boo_hi (&f_hi);
 
3192
+  boo_psi (&f_psi);
 
3193
+  boo_si (&f_si);
 
3194
+  boo_di (&f_di);
 
3195
+
 
3196
+  boox_qi (&x_qi);
 
3197
+  boox_hi (&x_hi);
 
3198
+  boox_psi (&x_psi);
 
3199
+  boox_si (&x_si);
 
3200
+  boox_di (&x_di);
 
3201
+
 
3202
+  boox_qi (&r_qi);
 
3203
+  boox_hi (&r_hi);
 
3204
+  boox_psi (&r_psi);
 
3205
+  boox_si (&r_si);
 
3206
+  boox_di (&r_di);
 
3207
+
 
3208
+  exit (0);
 
3209
+}
 
3210
Index: gcc/testsuite/gcc.target/i386/pr61923.c
 
3211
===================================================================
 
3212
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../tags/gcc_4_8_3_release)
 
3213
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../branches/gcc-4_8-branch)
 
3214
@@ -0,0 +1,36 @@
 
3215
+/* PR debug/61923 */
 
3216
+/* { dg-do compile } */
 
3217
+/* { dg-options "-O2 -fcompare-debug" } */
 
3218
+
 
3219
+typedef struct
 
3220
+{
 
3221
+  struct
 
3222
+  {
 
3223
+    struct
 
3224
+    {
 
3225
+      char head;
 
3226
+    } tickets;
 
3227
+  };
 
3228
+} arch_spinlock_t;
 
3229
+struct ext4_map_blocks
 
3230
+{
 
3231
+  int m_lblk;
 
3232
+  int m_len;
 
3233
+  int m_flags;
 
3234
+};
 
3235
+int ext4_da_map_blocks_ei_0;
 
3236
+void fn1 (int p1, struct ext4_map_blocks *p2)
 
3237
+{
 
3238
+  int ret;
 
3239
+  if (p2->m_flags)
 
3240
+    {
 
3241
+      ext4_da_map_blocks_ei_0++;
 
3242
+      arch_spinlock_t *lock;
 
3243
+      switch (sizeof *&lock->tickets.head)
 
3244
+      case 1:
 
3245
+      asm("" : "+m"(*&lock->tickets.head) : ""(0));
 
3246
+      __asm__("");
 
3247
+      ret = 0;
 
3248
+    }
 
3249
+  fn2 (p2->m_lblk, p2->m_len);
 
3250
+}
 
3251
Index: gcc/testsuite/gcc.target/i386/pr61423.c
 
3252
===================================================================
 
3253
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../tags/gcc_4_8_3_release)
 
3254
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../branches/gcc-4_8-branch)
 
3255
@@ -0,0 +1,38 @@
 
3256
+/* PR target/61423 */
 
3257
+/* { dg-do run { target ia32 } } */
 
3258
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
 
3259
+
 
3260
+#define N 1024
 
3261
+static unsigned int A[N];
 
3262
+
 
3263
+double
 
3264
+__attribute__((noinline))
 
3265
+func (void)
 
3266
+{
 
3267
+  unsigned int sum = 0;
 
3268
+  unsigned i;
 
3269
+  double t;
 
3270
+
 
3271
+  for (i = 0; i < N; i++)
 
3272
+    sum += A[i];
 
3273
+
 
3274
+  t = sum;
 
3275
+  return t;
 
3276
+}
 
3277
+
 
3278
+int
 
3279
+main ()
 
3280
+{
 
3281
+  unsigned i;
 
3282
+  double d;
 
3283
+
 
3284
+  for(i = 0; i < N; i++)
 
3285
+    A[i] = 1;
 
3286
+
 
3287
+  d = func();
 
3288
+
 
3289
+  if (d != 1024.0)
 
3290
+    __builtin_abort ();
 
3291
+
 
3292
+  return 0;
 
3293
+}
 
3294
Index: gcc/testsuite/gcc.target/i386/pr60901.c
 
3295
===================================================================
 
3296
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../tags/gcc_4_8_3_release)
 
3297
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../branches/gcc-4_8-branch)
 
3298
@@ -0,0 +1,17 @@
 
3299
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts"  } */
 
3300
+
 
3301
+extern int n;
 
3302
+extern void bar (void);
 
3303
+extern int baz (int);
 
3304
+
 
3305
+void
 
3306
+foo (void)
 
3307
+{
 
3308
+  int i, j;
 
3309
+  for (j = 0; j < n; j++)
 
3310
+    {
 
3311
+      for (i = 1; i < j; i++)
 
3312
+       bar ();
 
3313
+      baz (0);
 
3314
+    }
 
3315
+}
 
3316
Index: gcc/testsuite/gcc.target/i386/pr61801.c
 
3317
===================================================================
 
3318
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../tags/gcc_4_8_3_release)
 
3319
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../branches/gcc-4_8-branch)
 
3320
@@ -0,0 +1,21 @@
 
3321
+/* PR rtl-optimization/61801 */
 
3322
+/* { dg-do compile } */
 
3323
+/* { dg-options "-Os -fcompare-debug" } */
 
3324
+
 
3325
+int a, c;
 
3326
+int bar (void);
 
3327
+void baz (void);
 
3328
+
 
3329
+void
 
3330
+foo (void)
 
3331
+{
 
3332
+  int d;
 
3333
+  if (bar ())
 
3334
+    {
 
3335
+      int e;
 
3336
+      baz ();
 
3337
+      asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
 
3338
+      d = e;
 
3339
+    }
 
3340
+  c = d;
 
3341
+}
 
3342
Index: gcc/testsuite/gcc.target/i386/pr61446.c
 
3343
===================================================================
 
3344
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../tags/gcc_4_8_3_release)
 
3345
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../branches/gcc-4_8-branch)
 
3346
@@ -0,0 +1,14 @@
 
3347
+/* PR rtl-optimization/61446 */
 
3348
+
 
3349
+/* { dg-do compile { target { ia32 } } } */
 
3350
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
 
3351
+
 
3352
+unsigned long long
 
3353
+foo (float a)
 
3354
+{
 
3355
+  const double dfa = a;
 
3356
+  const unsigned int hi = dfa / 0x1p32f;
 
3357
+  const unsigned int lo = dfa - (double) hi * 0x1p32f;
 
3358
+
 
3359
+  return ((unsigned long long) hi << (4 * (8))) | lo;
 
3360
+}
 
3361
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
 
3362
===================================================================
 
3363
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../tags/gcc_4_8_3_release)
 
3364
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../branches/gcc-4_8-branch)
 
3365
@@ -0,0 +1,50 @@
 
3366
+/* { dg-do run } */
 
3367
+/* { dg-options "-march=octeon" } */
 
3368
+
 
3369
+extern void abort (void);
 
3370
+
 
3371
+struct node
 
3372
+{
 
3373
+  struct node *next;
 
3374
+  struct node *prev;
 
3375
+};
 
3376
+
 
3377
+struct node node;
 
3378
+
 
3379
+struct head
 
3380
+{
 
3381
+  struct node *first;
 
3382
+};
 
3383
+
 
3384
+struct head heads[5];
 
3385
+
 
3386
+int k = 2;
 
3387
+
 
3388
+struct head *head = &heads[2];
 
3389
+
 
3390
+static int __attribute__((noinline))
 
3391
+foo (void)
 
3392
+{
 
3393
+  node.prev = (void *)head;
 
3394
+  head->first = &node;
 
3395
+
 
3396
+  struct node *n = head->first;
 
3397
+  struct head *h = &heads[k];
 
3398
+  struct node *next = n->next;
 
3399
+
 
3400
+  if (n->prev == (void *)h)
 
3401
+    h->first = next;
 
3402
+  else
 
3403
+    n->prev->next = next;
 
3404
+
 
3405
+  n->next = h->first;
 
3406
+  return n->next == &node;
 
3407
+}
 
3408
+
 
3409
+int
 
3410
+main (void)
 
3411
+{
 
3412
+  if (foo ())
 
3413
+    abort ();
 
3414
+  return 0;
 
3415
+}
 
3416
Index: gcc/testsuite/gcc.target/sh/pr61996.c
 
3417
===================================================================
 
3418
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
 
3419
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
 
3420
@@ -0,0 +1,12 @@
 
3421
+/* Check that the option -musermode has no effect on targets that do not
 
3422
+   support user/privileged mode and that it does not interfere with option
 
3423
+   -matomic-model=soft-imask.  */
 
3424
+/* { dg-do compile }  */
 
3425
+/* { dg-options "-matomic-model=soft-imask" }  */
 
3426
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } }  */
 
3427
+
 
3428
+int
 
3429
+test (void)
 
3430
+{
 
3431
+  return 0;
 
3432
+}
 
3433
Index: gcc/testsuite/lib/target-supports.exp
 
3434
===================================================================
 
3435
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
 
3436
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
 
3437
@@ -1790,6 +1790,15 @@
 
3438
     }]
 
3439
 }
 
3440
 
 
3441
+# Return 1 if the target supports long double of 128 bits,
 
3442
+# 0 otherwise.
 
3443
+
 
3444
+proc check_effective_target_longdouble128 { } {
 
3445
+    return [check_no_compiler_messages longdouble128 object {
 
3446
+       int dummy[sizeof(long double) == 16 ? 1 : -1];
 
3447
+    }]
 
3448
+}
 
3449
+
 
3450
 # Return 1 if the target supports double of 64 bits,
 
3451
 # 0 otherwise.
 
3452
 
 
3453
@@ -5329,3 +5338,40 @@
 
3454
        return 0
 
3455
     }
 
3456
 }
 
3457
+
 
3458
+# Return 1 if <fenv.h> is available with all the standard IEEE
 
3459
+# exceptions and floating-point exceptions are raised by arithmetic
 
3460
+# operations.  (If the target requires special options for "inexact"
 
3461
+# exceptions, those need to be specified in the testcases.)
 
3462
+
 
3463
+proc check_effective_target_fenv_exceptions {} {
 
3464
+    return [check_runtime fenv_exceptions {
 
3465
+       #include <fenv.h>
 
3466
+       #include <stdlib.h>
 
3467
+       #ifndef FE_DIVBYZERO
 
3468
+       # error Missing FE_DIVBYZERO
 
3469
+       #endif
 
3470
+       #ifndef FE_INEXACT
 
3471
+       # error Missing FE_INEXACT
 
3472
+       #endif
 
3473
+       #ifndef FE_INVALID
 
3474
+       # error Missing FE_INVALID
 
3475
+       #endif
 
3476
+       #ifndef FE_OVERFLOW
 
3477
+       # error Missing FE_OVERFLOW
 
3478
+       #endif
 
3479
+       #ifndef FE_UNDERFLOW
 
3480
+       # error Missing FE_UNDERFLOW
 
3481
+       #endif
 
3482
+       volatile float a = 0.0f, r;
 
3483
+       int
 
3484
+       main (void)
 
3485
+       {
 
3486
+         r = a / a;
 
3487
+         if (fetestexcept (FE_INVALID))
 
3488
+           exit (0);
 
3489
+         else
 
3490
+           abort ();
 
3491
+       }
 
3492
+    } "-std=gnu99"]
 
3493
+}
 
3494
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
 
3495
===================================================================
 
3496
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../tags/gcc_4_8_3_release)
 
3497
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../branches/gcc-4_8-branch)
 
3498
@@ -1,6 +1,6 @@
 
3499
 ! { dg-require-effective-target fortran_large_real }
 
3500
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
 
3501
-! Test XFAILed on these platforms because the system's printf() lacks
 
3502
+! { dg-do run { xfail powerpc*-apple-darwin* } }
 
3503
+! Test XFAILed on this platform because the system's printf() lacks
 
3504
 ! proper support for denormalized long doubles. See PR24685
 
3505
 !
 
3506
 ! This tests that the default formats for formatted I/O of reals are
 
3507
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
 
3508
===================================================================
 
3509
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../tags/gcc_4_8_3_release)
 
3510
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../branches/gcc-4_8-branch)
 
3511
@@ -0,0 +1,15 @@
 
3512
+! { dg-do compile }
 
3513
+! { dg-options "-fdump-tree-original" }
 
3514
+! PR 61999 - this used to ICE.
 
3515
+! Original test case by A. Kasahara
 
3516
+program main
 
3517
+   use, intrinsic:: iso_fortran_env, only: output_unit
 
3518
+
 
3519
+   implicit none
 
3520
+
 
3521
+   write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
 
3522
+
 
3523
+   stop
 
3524
+end program main
 
3525
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
 
3526
+! { dg-final { cleanup-tree-dump "original" } }
 
3527
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
 
3528
===================================================================
 
3529
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../tags/gcc_4_8_3_release)
 
3530
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../branches/gcc-4_8-branch)
 
3531
@@ -0,0 +1,13 @@
 
3532
+! PR fortran/59488
 
3533
+! { dg-do compile }
 
3534
+! { dg-options "-fopenmp" }
 
3535
+
 
3536
+  implicit none
 
3537
+  integer, parameter :: p(2) = (/ 11, 12 /)
 
3538
+  integer :: r
 
3539
+
 
3540
+  !$omp parallel do default(none)
 
3541
+  do r = 1, 2
 
3542
+    print *, p(r)
 
3543
+  end do
 
3544
+end
 
3545
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
 
3546
===================================================================
 
3547
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../tags/gcc_4_8_3_release)
 
3548
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../branches/gcc-4_8-branch)
 
3549
@@ -0,0 +1,16 @@
 
3550
+! PR fortran/59488
 
3551
+! { dg-do compile }
 
3552
+! { dg-options "-fopenmp" }
 
3553
+
 
3554
+  implicit none
 
3555
+  type t
 
3556
+    integer :: s1, s2, s3
 
3557
+  end type
 
3558
+  integer :: r
 
3559
+  type(t), parameter :: u = t(1, 2, 3)
 
3560
+
 
3561
+  !$omp parallel do default(none)
 
3562
+  do r = 1, 2
 
3563
+    print *, u
 
3564
+  end do
 
3565
+end
 
3566
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
 
3567
===================================================================
 
3568
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../tags/gcc_4_8_3_release)
 
3569
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../branches/gcc-4_8-branch)
 
3570
@@ -0,0 +1,18 @@
 
3571
+! { dg-do run }
 
3572
+! { dg-options "-fcray-pointer" }
 
3573
+!
 
3574
+! PR fortran/45187
 
3575
+!
 
3576
+module foo
 
3577
+  implicit none
 
3578
+  real :: a
 
3579
+  pointer(c_a, a)
 
3580
+end module foo
 
3581
+
 
3582
+program test
 
3583
+  use foo
 
3584
+  real :: z
 
3585
+  c_a = loc(z)
 
3586
+  a = 42
 
3587
+  if (z /= 42) call abort
 
3588
+end program test
 
3589
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
 
3590
===================================================================
 
3591
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../tags/gcc_4_8_3_release)
 
3592
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../branches/gcc-4_8-branch)
 
3593
@@ -0,0 +1,36 @@
 
3594
+! { dg-do run }
 
3595
+! Tests fix for PR61780 in which the loop reversal mechanism was
 
3596
+! not accounting for the first index being an element so that no
 
3597
+! loop in this dimension is created.
 
3598
+!
 
3599
+! Contributed by Manfred Tietze on clf.
 
3600
+!
 
3601
+program prgm3
 
3602
+    implicit none
 
3603
+    integer, parameter :: n = 10, k = 3
 
3604
+    integer :: i, j
 
3605
+    integer, dimension(n,n) :: y
 
3606
+    integer :: res1(n), res2(n)
 
3607
+
 
3608
+1   format(10i5)
 
3609
+
 
3610
+!initialize
 
3611
+    do i=1,n
 
3612
+        do j=1,n
 
3613
+            y(i,j) = n*i + j
 
3614
+        end do
 
3615
+    end do
 
3616
+    res2 = y(k,:)
 
3617
+
 
3618
+!shift right
 
3619
+    y(k,4:n) = y(k,3:n-1)
 
3620
+    y(k,3) = 0
 
3621
+    res1 = y(k,:)
 
3622
+    y(k,:) = res2
 
3623
+    y(k,n:4:-1) = y(k,n-1:3:-1)
 
3624
+    y(k,3) = 0
 
3625
+    res2 = y(k,:)
 
3626
+!    print *, res1
 
3627
+!    print *, res2
 
3628
+    if (any(res1 /= res2)) call abort ()
 
3629
+end program prgm3
 
3630
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
 
3631
===================================================================
 
3632
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../tags/gcc_4_8_3_release)
 
3633
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../branches/gcc-4_8-branch)
 
3634
@@ -0,0 +1,8 @@
 
3635
+C { dg-do compile }
 
3636
+      TYPE T
 
3637
+      INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
 
3638
+      END TYPE
 
3639
+      TYPE S
 
3640
+      INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
 
3641
+      END TYPE
 
3642
+      END
 
3643
Index: gcc/testsuite/gfortran.dg/nint_2.f90
 
3644
===================================================================
 
3645
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../tags/gcc_4_8_3_release)
 
3646
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../branches/gcc-4_8-branch)
 
3647
@@ -4,7 +4,8 @@
 
3648
 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
 
3649
 !
 
3650
 ! { dg-do run }
 
3651
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
3652
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
3653
+! Note that this doesn't fail on powerpc64le-*-linux*.
 
3654
   real(kind=8) :: a
 
3655
   integer(kind=8) :: i1, i2
 
3656
   real :: b
 
3657
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
 
3658
===================================================================
 
3659
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../tags/gcc_4_8_3_release)
 
3660
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../branches/gcc-4_8-branch)
 
3661
@@ -23,7 +23,7 @@
 
3662
     call bar2 (c)
 
3663
     call bar3 (c)
 
3664
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
3665
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
3666
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
 
3667
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
3668
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
3669
   end subroutine
 
3670
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
 
3671
===================================================================
 
3672
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../tags/gcc_4_8_3_release)
 
3673
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../branches/gcc-4_8-branch)
 
3674
@@ -0,0 +1,16 @@
 
3675
+! { dg-do run }
 
3676
+! { dg-options "-ffrontend-optimize" }
 
3677
+! PR 62214 - this used to give the wrong result.
 
3678
+! Original test case by Oliver Fuhrer
 
3679
+PROGRAM test
 
3680
+  IMPLICIT NONE
 
3681
+  CHARACTER(LEN=20)   :: fullNames(2)
 
3682
+  CHARACTER(LEN=255)  :: pathName
 
3683
+  CHARACTER(LEN=5)    :: fileNames(2)
 
3684
+  
 
3685
+  pathName = "/dir1/dir2/"
 
3686
+  fileNames = (/ "file1", "file2" /)
 
3687
+  fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
 
3688
+  if (fullNames(1) /= '/dir1/dir2/file1' .or. &
 
3689
+       & fullnames(2) /= '/dir1/dir2/file2') call abort
 
3690
+END PROGRAM test
 
3691
Index: gcc/testsuite/gfortran.dg/pr45636.f90
 
3692
===================================================================
 
3693
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
 
3694
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
 
3695
@@ -10,5 +10,5 @@
 
3696
   b = y
 
3697
   call sub(a, b)
 
3698
 end program main
 
3699
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
 
3700
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
 
3701
 ! { dg-final { cleanup-tree-dump "forwprop2" } }
 
3702
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
 
3703
===================================================================
 
3704
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../tags/gcc_4_8_3_release)
 
3705
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../branches/gcc-4_8-branch)
 
3706
@@ -0,0 +1,47 @@
 
3707
+! { dg-do run }
 
3708
+! Test the fix for PR61459.
 
3709
+!
 
3710
+! Contributed by John Wingate  <johnww@tds.net>
 
3711
+!
 
3712
+module a
 
3713
+
 
3714
+   implicit none
 
3715
+   private
 
3716
+   public :: f_segfault, f_segfault_plus, f_workaround
 
3717
+   integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
 
3718
+
 
3719
+contains
 
3720
+
 
3721
+   function f_segfault(x)
 
3722
+      real, dimension(:), allocatable :: f_segfault
 
3723
+      real, dimension(:), intent(in)  :: x
 
3724
+      allocate(f_segfault(2))
 
3725
+      f_segfault = matmul(b,x)
 
3726
+   end function f_segfault
 
3727
+
 
3728
+! Sefaulted without the ALLOCATE as well.
 
3729
+   function f_segfault_plus(x)
 
3730
+      real, dimension(:), allocatable :: f_segfault_plus
 
3731
+      real, dimension(:), intent(in)  :: x
 
3732
+      f_segfault_plus = matmul(b,x)
 
3733
+   end function f_segfault_plus
 
3734
+
 
3735
+   function f_workaround(x)
 
3736
+      real, dimension(:), allocatable :: f_workaround
 
3737
+      real, dimension(:), intent(in)  :: x
 
3738
+      real, dimension(:), allocatable :: tmp
 
3739
+      allocate(f_workaround(2),tmp(2))
 
3740
+      tmp = matmul(b,x)
 
3741
+      f_workaround = tmp
 
3742
+   end function f_workaround
 
3743
+
 
3744
+end module a
 
3745
+
 
3746
+program main
 
3747
+   use a
 
3748
+   implicit none
 
3749
+   real, dimension(2) :: x = 1.0, y
 
3750
+   y = f_workaround (x)
 
3751
+   if (any (f_segfault (x) .ne. y)) call abort
 
3752
+   if (any (f_segfault_plus (x) .ne. y)) call abort
 
3753
+end program main
 
3754
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
 
3755
===================================================================
 
3756
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../tags/gcc_4_8_3_release)
 
3757
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../branches/gcc-4_8-branch)
 
3758
@@ -16,7 +16,7 @@
 
3759
 implicit none
 
3760
 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] 
 
3761
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
 
3762
-                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
 
3763
+                  * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
 
3764
 ! The following is sufficient for me - the values above are a bit
 
3765
 ! more tolerant
 
3766
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
 
3767
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
 
3768
===================================================================
 
3769
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../tags/gcc_4_8_3_release)
 
3770
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../branches/gcc-4_8-branch)
 
3771
@@ -0,0 +1,39 @@
 
3772
+#ifdef __INT32_TYPE__
 
3773
+typedef __INT32_TYPE__ int32_t;
 
3774
+#else
 
3775
+typedef int int32_t;
 
3776
+#endif
 
3777
+
 
3778
+#ifdef __UINT32_TYPE__
 
3779
+typedef __UINT32_TYPE__ uint32_t;
 
3780
+#else
 
3781
+typedef unsigned uint32_t;
 
3782
+#endif
 
3783
+
 
3784
+#define __fake_const_swab32(x) ((uint32_t)(                  \
 
3785
+       (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |    \
 
3786
+       (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |    \
 
3787
+       (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |    \
 
3788
+       (( (int32_t)(x) &  (int32_t)0xff000000UL) >> 24)))
 
3789
+
 
3790
+/* Previous version of bswap optimization failed to consider sign extension
 
3791
+   and as a result would replace an expression *not* doing a bswap by a
 
3792
+   bswap.  */
 
3793
+
 
3794
+__attribute__ ((noinline, noclone)) uint32_t
 
3795
+fake_bswap32 (uint32_t in)
 
3796
+{
 
3797
+  return __fake_const_swab32 (in);
 
3798
+}
 
3799
+
 
3800
+int
 
3801
+main(void)
 
3802
+{
 
3803
+  if (sizeof (int32_t) * __CHAR_BIT__ != 32)
 
3804
+    return 0;
 
3805
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
3806
+    return 0;
 
3807
+  if (fake_bswap32 (0x87654321) != 0xffffff87)
 
3808
+    __builtin_abort ();
 
3809
+  return 0;
 
3810
+}
 
3811
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
 
3812
===================================================================
 
3813
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
 
3814
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
 
3815
@@ -0,0 +1,2 @@
 
3816
+set additional_flags "-Wno-psabi"
 
3817
+return 0
 
3818
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
 
3819
===================================================================
 
3820
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../tags/gcc_4_8_3_release)
 
3821
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../branches/gcc-4_8-branch)
 
3822
@@ -0,0 +1,23 @@
 
3823
+union U
 
3824
+{
 
3825
+  const int a;
 
3826
+  unsigned b : 20;
 
3827
+};
 
3828
+
 
3829
+static union U u = { 0x12345678 };
 
3830
+
 
3831
+/* Constant folding used to fail to account for endianness when folding a
 
3832
+   union.  */
 
3833
+
 
3834
+int
 
3835
+main (void)
 
3836
+{
 
3837
+#ifdef __BYTE_ORDER__
 
3838
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
3839
+  return u.b - 0x45678;
 
3840
+#else
 
3841
+  return u.b - 0x12345;
 
3842
+#endif
 
3843
+#endif
 
3844
+  return 0;
 
3845
+}
 
3846
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
 
3847
===================================================================
 
3848
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../tags/gcc_4_8_3_release)
 
3849
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../branches/gcc-4_8-branch)
 
3850
@@ -0,0 +1,13 @@
 
3851
+short a = -1;
 
3852
+int b;
 
3853
+char c;
 
3854
+
 
3855
+int
 
3856
+main ()
 
3857
+{
 
3858
+  c = a;
 
3859
+  b = a | c;
 
3860
+  if (b != -1)
 
3861
+    __builtin_abort ();
 
3862
+  return 0;
 
3863
+}
 
3864
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
 
3865
===================================================================
 
3866
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../tags/gcc_4_8_3_release)
 
3867
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../branches/gcc-4_8-branch)
 
3868
@@ -6,4 +6,5 @@
 
3869
        set additional_flags "-mno-mmx"
 
3870
 }
 
3871
 
 
3872
+set additional_flags "-Wno-psabi"
 
3873
 return 0
 
3874
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
 
3875
===================================================================
 
3876
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../tags/gcc_4_8_3_release)
 
3877
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../branches/gcc-4_8-branch)
 
3878
@@ -0,0 +1,40 @@
 
3879
+#ifdef __INT16_TYPE__
 
3880
+typedef __INT16_TYPE__ int16_t;
 
3881
+#else
 
3882
+typedef short int16_t;
 
3883
+#endif
 
3884
+
 
3885
+#ifdef __UINT32_TYPE__
 
3886
+typedef __UINT32_TYPE__ uint32_t;
 
3887
+#else
 
3888
+typedef unsigned uint32_t;
 
3889
+#endif
 
3890
+
 
3891
+#define __fake_const_swab32(x) ((uint32_t)(                          \
 
3892
+       (((uint32_t)         (x) & (uint32_t)0x000000ffUL) << 24) |   \
 
3893
+       (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) <<  8) |   \
 
3894
+       (((uint32_t)         (x) & (uint32_t)0x00ff0000UL) >>  8) |   \
 
3895
+       (((uint32_t)         (x) & (uint32_t)0xff000000UL) >> 24)))
 
3896
+
 
3897
+
 
3898
+/* Previous version of bswap optimization failed to consider sign extension
 
3899
+   and as a result would replace an expression *not* doing a bswap by a
 
3900
+   bswap.  */
 
3901
+
 
3902
+__attribute__ ((noinline, noclone)) uint32_t
 
3903
+fake_bswap32 (uint32_t in)
 
3904
+{
 
3905
+  return __fake_const_swab32 (in);
 
3906
+}
 
3907
+
 
3908
+int
 
3909
+main(void)
 
3910
+{
 
3911
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
3912
+    return 0;
 
3913
+  if (sizeof (int16_t) * __CHAR_BIT__ != 16)
 
3914
+    return 0;
 
3915
+  if (fake_bswap32 (0x81828384) != 0xff838281)
 
3916
+    __builtin_abort ();
 
3917
+  return 0;
 
3918
+}
 
3919
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
 
3920
===================================================================
 
3921
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
 
3922
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
 
3923
@@ -0,0 +1,35 @@
 
3924
+#ifdef __UINT64_TYPE__
 
3925
+typedef __UINT64_TYPE__ uint64_t;
 
3926
+#else
 
3927
+typedef unsigned long long uint64_t;
 
3928
+#endif
 
3929
+
 
3930
+#ifndef __SIZEOF_INT128__
 
3931
+#define __int128 long long
 
3932
+#endif
 
3933
+
 
3934
+/* Some version of bswap optimization would ICE when analyzing a mask constant
 
3935
+   too big for an HOST_WIDE_INT (PR61375).  */
 
3936
+
 
3937
+__attribute__ ((noinline, noclone)) uint64_t
 
3938
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
 
3939
+{
 
3940
+  __int128 mask = (__int128)0xffff << 56;
 
3941
+  return ((in1 & mask) >> 56) | in2;
 
3942
+}
 
3943
+
 
3944
+int
 
3945
+main (int argc)
 
3946
+{
 
3947
+  __int128 in = 1;
 
3948
+#ifdef __SIZEOF_INT128__
 
3949
+  in <<= 64;
 
3950
+#endif
 
3951
+  if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
 
3952
+    return 0;
 
3953
+  if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
 
3954
+    return 0;
 
3955
+  if (uint128_central_bitsi_ior (in, 2) != 0x102)
 
3956
+    __builtin_abort ();
 
3957
+  return 0;
 
3958
+}
 
3959
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
 
3960
===================================================================
 
3961
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../tags/gcc_4_8_3_release)
 
3962
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../branches/gcc-4_8-branch)
 
3963
@@ -4,4 +4,5 @@
 
3964
        return 1
 
3965
 }
 
3966
 
 
3967
+set additional_flags "-Wno-psabi"
 
3968
 return 0;
 
3969
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
 
3970
===================================================================
 
3971
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../tags/gcc_4_8_3_release)
 
3972
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../branches/gcc-4_8-branch)
 
3973
@@ -0,0 +1,2 @@
 
3974
+set additional_flags "-Wno-psabi"
 
3975
+return 0
 
3976
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
 
3977
===================================================================
 
3978
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
 
3979
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
 
3980
@@ -0,0 +1,15 @@
 
3981
+/* PR tree-optimization/61684 */
 
3982
+
 
3983
+int a, c;
 
3984
+static int *b = 0;
 
3985
+short d;
 
3986
+static short **e = 0;
 
3987
+
 
3988
+void
 
3989
+foo ()
 
3990
+{
 
3991
+  for (; c < 1; c++)
 
3992
+    ;
 
3993
+  *e = &d;
 
3994
+  a = d && (c && 1) & *b;
 
3995
+}
 
3996
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
 
3997
===================================================================
 
3998
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
 
3999
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
 
4000
@@ -0,0 +1,13 @@
 
4001
+/* PR inline-asm/63282 */
 
4002
+
 
4003
+void bar (void);
 
4004
+
 
4005
+void
 
4006
+foo (void)
 
4007
+{
 
4008
+  asm volatile goto ("" : : : : a, b);
 
4009
+a:
 
4010
+  bar ();
 
4011
+b:
 
4012
+  return;
 
4013
+}
 
4014
Index: gcc/testsuite/gnat.dg/opt39.adb
 
4015
===================================================================
 
4016
--- a/src/gcc/testsuite/gnat.dg/opt39.adb       (.../tags/gcc_4_8_3_release)
 
4017
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb       (.../branches/gcc-4_8-branch)
 
4018
@@ -0,0 +1,31 @@
 
4019
+-- { dg-do compile }
 
4020
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
 
4021
+
 
4022
+procedure Opt39 (I : Integer) is
 
4023
+
 
4024
+  type Rec is record
 
4025
+    I1 : Integer;
 
4026
+    I2 : Integer;
 
4027
+    I3 : Integer;
 
4028
+    I4 : Integer;
 
4029
+    I5 : Integer;
 
4030
+  end record;
 
4031
+
 
4032
+  procedure Set (A : access Rec; I : Integer) is
 
4033
+    Tmp : Rec := A.all;
 
4034
+  begin
 
4035
+    Tmp.I1 := I;
 
4036
+    A.all := Tmp;
 
4037
+  end;
 
4038
+
 
4039
+  R : aliased Rec;
 
4040
+
 
4041
+begin
 
4042
+  Set (R'Access, I);
 
4043
+  if R.I1 /= I then
 
4044
+    raise Program_Error;
 
4045
+  end if;
 
4046
+end;
 
4047
+
 
4048
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
 
4049
+-- { dg-final { cleanup-tree-dump "optimized" } }
 
4050
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
 
4051
===================================================================
 
4052
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../tags/gcc_4_8_3_release)
 
4053
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../branches/gcc-4_8-branch)
 
4054
@@ -0,0 +1,19 @@
 
4055
+-- { dg-do run }
 
4056
+-- { dg-options "-gnato -O" }
 
4057
+
 
4058
+procedure Overflow_Fixed is
 
4059
+
 
4060
+  type Unsigned_8_Bit is mod 2**8;
 
4061
+
 
4062
+  procedure Fixed_To_Eight (Value : Duration) is
 
4063
+    Item : Unsigned_8_Bit;
 
4064
+  begin
 
4065
+    Item := Unsigned_8_Bit(Value);
 
4066
+    raise Program_Error;
 
4067
+  exception
 
4068
+    when Constraint_Error => null; -- expected case
 
4069
+  end;
 
4070
+
 
4071
+begin
 
4072
+  Fixed_To_Eight (-0.5);
 
4073
+end;
 
4074
Index: gcc/testsuite/gnat.dg/aliasing1.adb
 
4075
===================================================================
 
4076
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../tags/gcc_4_8_3_release)
 
4077
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../branches/gcc-4_8-branch)
 
4078
@@ -18,5 +18,5 @@
 
4079
 
 
4080
 end Aliasing1;
 
4081
 
 
4082
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
 
4083
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
 
4084
 -- { dg-final { cleanup-tree-dump "optimized" } }
 
4085
Index: gcc/testsuite/gcc.dg/pr60866.c
 
4086
===================================================================
 
4087
--- a/src/gcc/testsuite/gcc.dg/pr60866.c        (.../tags/gcc_4_8_3_release)
 
4088
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c        (.../branches/gcc-4_8-branch)
 
4089
@@ -0,0 +1,18 @@
 
4090
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
 
4091
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns"  } */
 
4092
+
 
4093
+int n;
 
4094
+
 
4095
+void
 
4096
+foo (int w, int **dnroot, int **dn)
 
4097
+{
 
4098
+  int *child;
 
4099
+  int *xchild = xchild;
 
4100
+  for (; w < n; w++)
 
4101
+    if (!dnroot)
 
4102
+      {
 
4103
+       dnroot = dn;
 
4104
+       for (child = *dn; child; child = xchild)
 
4105
+         ;
 
4106
+      }
 
4107
+}
 
4108
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
 
4109
===================================================================
 
4110
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../tags/gcc_4_8_3_release)
 
4111
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../branches/gcc-4_8-branch)
 
4112
@@ -1,4 +1,5 @@
 
4113
 /* { dg-do compile } */
 
4114
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4115
 #include <altivec.h>
 
4116
 typedef const volatile unsigned int _1;
 
4117
 typedef const  unsigned int _2;
 
4118
Index: gcc/testsuite/gcc.dg/vmx/ops.c
 
4119
===================================================================
 
4120
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../tags/gcc_4_8_3_release)
 
4121
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../branches/gcc-4_8-branch)
 
4122
@@ -1,4 +1,5 @@
 
4123
 /* { dg-do compile } */
 
4124
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4125
 #include <altivec.h>
 
4126
 #include <stdlib.h>
 
4127
 extern char * *var_char_ptr;
 
4128
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
 
4129
===================================================================
 
4130
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
 
4131
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
 
4132
@@ -1,4 +1,5 @@
 
4133
 /* { dg-do compile } */
 
4134
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4135
 
 
4136
 /* Checks from the original ops.c that pass pointers to long or
 
4137
    unsigned long for operations that support that in released versions
 
4138
Index: gcc/testsuite/gcc.dg/pr63342.c
 
4139
===================================================================
 
4140
--- a/src/gcc/testsuite/gcc.dg/pr63342.c        (.../tags/gcc_4_8_3_release)
 
4141
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c        (.../branches/gcc-4_8-branch)
 
4142
@@ -0,0 +1,26 @@
 
4143
+/* PR debug/63342 */
 
4144
+/* { dg-do compile } */
 
4145
+/* { dg-options "-g -O2" } */
 
4146
+/* { dg-additional-options "-fpic" { target fpic } } */
 
4147
+
 
4148
+static __thread double u[9], v[9];
 
4149
+
 
4150
+void
 
4151
+foo (double **p, double **q)
 
4152
+{
 
4153
+  *p = u;
 
4154
+  *q = v;
 
4155
+}
 
4156
+
 
4157
+double
 
4158
+bar (double x)
 
4159
+{
 
4160
+  int i;
 
4161
+  double s = 0.0;
 
4162
+  for (i = 0; i < 9; i++)
 
4163
+    {
 
4164
+      double a = x + v[i];
 
4165
+      s += u[i] * a * a;
 
4166
+    }
 
4167
+  return s;
 
4168
+}
 
4169
Index: gcc/testsuite/gcc.dg/pr63284.c
 
4170
===================================================================
 
4171
--- a/src/gcc/testsuite/gcc.dg/pr63284.c        (.../tags/gcc_4_8_3_release)
 
4172
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c        (.../branches/gcc-4_8-branch)
 
4173
@@ -0,0 +1,42 @@
 
4174
+/* PR debug/63284 */
 
4175
+/* { dg-do compile } */
 
4176
+/* { dg-options "-O2 -fcompare-debug" } */
 
4177
+
 
4178
+int a[10], *b, *d, c, f;
 
4179
+int fn2 (void);
 
4180
+void fn3 (void);
 
4181
+void fn4 (int);
 
4182
+
 
4183
+static int
 
4184
+fn1 (int x)
 
4185
+{
 
4186
+  int e = a[0];
 
4187
+  if (e)
 
4188
+    return 1;
 
4189
+  if (b)
 
4190
+    switch (x)
 
4191
+      {
 
4192
+      case 1:
 
4193
+        if (d)
 
4194
+          e = fn2 ();
 
4195
+        else
 
4196
+          fn3 ();
 
4197
+        break;
 
4198
+      case 0:
 
4199
+        if (d)
 
4200
+          {
 
4201
+            fn3 ();
 
4202
+            if (c)
 
4203
+              fn4 (1);
 
4204
+          }
 
4205
+        else
 
4206
+          fn4 (0);
 
4207
+      }
 
4208
+  return e;
 
4209
+}
 
4210
+
 
4211
+void
 
4212
+fn6 (void)
 
4213
+{
 
4214
+  f = fn1 (0);
 
4215
+}
 
4216
Index: gcc/testsuite/gcc.dg/pr61045.c
 
4217
===================================================================
 
4218
--- a/src/gcc/testsuite/gcc.dg/pr61045.c        (.../tags/gcc_4_8_3_release)
 
4219
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c        (.../branches/gcc-4_8-branch)
 
4220
@@ -0,0 +1,12 @@
 
4221
+/* { dg-do run } */
 
4222
+/* { dg-options "-fstrict-overflow" } */
 
4223
+
 
4224
+int main ()
 
4225
+{
 
4226
+  int a = 0;
 
4227
+  int b = __INT_MAX__;
 
4228
+  int t = (a - 2) > (b - 1);
 
4229
+  if (t != 0)
 
4230
+    __builtin_abort();
 
4231
+  return 0;
 
4232
+}
 
4233
Index: gcc/testsuite/gcc.dg/pr62004.c
 
4234
===================================================================
 
4235
--- a/src/gcc/testsuite/gcc.dg/pr62004.c        (.../tags/gcc_4_8_3_release)
 
4236
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c        (.../branches/gcc-4_8-branch)
 
4237
@@ -0,0 +1,47 @@
 
4238
+/* { dg-do run } */
 
4239
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
 
4240
+
 
4241
+struct node
 
4242
+{
 
4243
+  struct node *next;
 
4244
+  struct node *prev;
 
4245
+};
 
4246
+
 
4247
+struct node node;
 
4248
+
 
4249
+struct head
 
4250
+{
 
4251
+  struct node *first;
 
4252
+};
 
4253
+
 
4254
+struct head heads[5];
 
4255
+
 
4256
+int k = 2;
 
4257
+
 
4258
+struct head *head = &heads[2];
 
4259
+
 
4260
+int
 
4261
+main ()
 
4262
+{
 
4263
+  struct node *p;
 
4264
+
 
4265
+  node.next = (void*)0;
 
4266
+
 
4267
+  node.prev = (void *)head;
 
4268
+
 
4269
+  head->first = &node;
 
4270
+
 
4271
+  struct node *n = head->first;
 
4272
+
 
4273
+  struct head *h = &heads[k];
 
4274
+
 
4275
+  heads[2].first = n->next;
 
4276
+
 
4277
+  if ((void*)n->prev == (void *)h)
 
4278
+    p = h->first;
 
4279
+  else
 
4280
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
4281
+    p = n->prev->next;
 
4282
+
 
4283
+  return !(p == (void*)0);
 
4284
+}
 
4285
Index: gcc/testsuite/gcc.dg/pr51879-18.c
 
4286
===================================================================
 
4287
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../tags/gcc_4_8_3_release)
 
4288
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../branches/gcc-4_8-branch)
 
4289
@@ -13,5 +13,5 @@
 
4290
     *q = foo ();
 
4291
 }
 
4292
 
 
4293
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
 
4294
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
 
4295
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
4296
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
 
4297
===================================================================
 
4298
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../tags/gcc_4_8_3_release)
 
4299
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../branches/gcc-4_8-branch)
 
4300
@@ -0,0 +1,33 @@
 
4301
+/* { dg-do run } */
 
4302
+
 
4303
+extern void abort (void);
 
4304
+
 
4305
+struct node { struct node *next, *prev; } node;
 
4306
+struct head { struct node *first; } heads[5];
 
4307
+int k = 2;
 
4308
+struct head *head = &heads[2];
 
4309
+
 
4310
+static int __attribute__((noinline))
 
4311
+foo()
 
4312
+{
 
4313
+  node.prev = (void *)head;
 
4314
+  head->first = &node;
 
4315
+
 
4316
+  struct node *n = head->first;
 
4317
+  struct head *h = &heads[k];
 
4318
+
 
4319
+  if (n->prev == (void *)h)
 
4320
+    h->first = n->next;
 
4321
+  else
 
4322
+    n->prev->next = n->next;
 
4323
+
 
4324
+  n->next = h->first;
 
4325
+  return n->next == &node;
 
4326
+}
 
4327
+
 
4328
+int main()
 
4329
+{
 
4330
+  if (foo ())
 
4331
+    abort ();
 
4332
+  return 0;
 
4333
+}
 
4334
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
 
4335
===================================================================
 
4336
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../tags/gcc_4_8_3_release)
 
4337
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../branches/gcc-4_8-branch)
 
4338
@@ -0,0 +1,8 @@
 
4339
+/* { dg-do compile } */
 
4340
+
 
4341
+int main (void)
 
4342
+{
 
4343
+  int a = 0;
 
4344
+  unsigned b = (a * 64 & 192) | 63U;
 
4345
+  return 0;
 
4346
+}
 
4347
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
 
4348
===================================================================
 
4349
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../tags/gcc_4_8_3_release)
 
4350
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../branches/gcc-4_8-branch)
 
4351
@@ -0,0 +1,31 @@
 
4352
+/* { dg-do run } */
 
4353
+
 
4354
+int a, b;
 
4355
+short c, d;
 
4356
+char e, f;
 
4357
+
 
4358
+int
 
4359
+fn1 (int p1, char p2)
 
4360
+{
 
4361
+  return p1 || p2 ? 0 : p2;
 
4362
+}
 
4363
+
 
4364
+void
 
4365
+fn2 ()
 
4366
+{
 
4367
+  for (; a;)
 
4368
+    {
 
4369
+      int g;
 
4370
+      g = c = e;
 
4371
+      for (; a;)
 
4372
+       b = fn1 (g = d = e, g);
 
4373
+      f = g; 
 
4374
+    }
 
4375
+}
 
4376
+
 
4377
+int
 
4378
+main ()
 
4379
+{
 
4380
+  fn2 (); 
 
4381
+  return 0;
 
4382
+}
 
4383
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
 
4384
===================================================================
 
4385
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../tags/gcc_4_8_3_release)
 
4386
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../branches/gcc-4_8-branch)
 
4387
@@ -0,0 +1,35 @@
 
4388
+/* { dg-do run } */
 
4389
+
 
4390
+int a, b = 1, c, d, e, f, g;
 
4391
+
 
4392
+int
 
4393
+fn1 ()
 
4394
+{
 
4395
+  int h;
 
4396
+  for (;;)
 
4397
+    {
 
4398
+      g = b;
 
4399
+      g = g ? 0 : 1 % g;
 
4400
+      e = a + 1;
 
4401
+      for (; d < 1; d = e)
 
4402
+       {
 
4403
+         if (f == 0)
 
4404
+           h = 0;
 
4405
+         else
 
4406
+           h = 1 % f;
 
4407
+         if (f < 1)
 
4408
+           c = 0;
 
4409
+         else if (h)
 
4410
+           break;
 
4411
+       }
 
4412
+      if (b)
 
4413
+       return 0;
 
4414
+    }
 
4415
+}
 
4416
+
 
4417
+int
 
4418
+main ()
 
4419
+{
 
4420
+  fn1 ();
 
4421
+  return 0;
 
4422
+}
 
4423
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
 
4424
===================================================================
 
4425
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../tags/gcc_4_8_3_release)
 
4426
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../branches/gcc-4_8-branch)
 
4427
@@ -0,0 +1,41 @@
 
4428
+/* Test that exact underflow in __float128 signals the underflow
 
4429
+   exception if trapping is enabled, but does not raise the flag
 
4430
+   otherwise.  */
 
4431
+
 
4432
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
 
4433
+/* { dg-options "-D_GNU_SOURCE" } */
 
4434
+/* { dg-require-effective-target fenv_exceptions } */
 
4435
+
 
4436
+#include <fenv.h>
 
4437
+#include <setjmp.h>
 
4438
+#include <signal.h>
 
4439
+#include <stdlib.h>
 
4440
+
 
4441
+volatile sig_atomic_t caught_sigfpe;
 
4442
+sigjmp_buf buf;
 
4443
+
 
4444
+static void
 
4445
+handle_sigfpe (int sig)
 
4446
+{
 
4447
+  caught_sigfpe = 1;
 
4448
+  siglongjmp (buf, 1);
 
4449
+}
 
4450
+
 
4451
+int
 
4452
+main (void)
 
4453
+{
 
4454
+  volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
 
4455
+  volatile __float128 r;
 
4456
+  r = a * b;
 
4457
+  if (fetestexcept (FE_UNDERFLOW))
 
4458
+    abort ();
 
4459
+  if (r != 0x1p-16384q)
 
4460
+    abort ();
 
4461
+  feenableexcept (FE_UNDERFLOW);
 
4462
+  signal (SIGFPE, handle_sigfpe);
 
4463
+  if (sigsetjmp (buf, 1) == 0)
 
4464
+    r = a * b;
 
4465
+  if (!caught_sigfpe)
 
4466
+    abort ();
 
4467
+  exit (0);
 
4468
+}
 
4469
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
 
4470
===================================================================
 
4471
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../tags/gcc_4_8_3_release)
 
4472
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../branches/gcc-4_8-branch)
 
4473
@@ -23,7 +23,8 @@
 
4474
 T (20, 0, 4, 1, 5) \
 
4475
 T (21, 2, 6, 3, 7) \
 
4476
 T (22, 1, 2, 3, 0) \
 
4477
-T (23, 2, 1, 0, 3)
 
4478
+T (23, 2, 1, 0, 3) \
 
4479
+T (24, 2, 5, 6, 3)
 
4480
 #define EXPTESTS \
 
4481
 T (116,        1, 2, 4, 3) \
 
4482
 T (117,        7, 3, 3, 0) \
 
4483
@@ -31,7 +32,6 @@
 
4484
 T (119,        0, 3, 5, 6) \
 
4485
 T (120,        0, 0, 1, 5) \
 
4486
 T (121,        4, 6, 2, 1) \
 
4487
-T (122,        2, 5, 6, 3) \
 
4488
 T (123,        4, 6, 3, 2) \
 
4489
 T (124,        4, 7, 5, 6) \
 
4490
 T (125,        0, 4, 2, 4) \
 
4491
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
 
4492
===================================================================
 
4493
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../tags/gcc_4_8_3_release)
 
4494
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../branches/gcc-4_8-branch)
 
4495
@@ -1,21 +1,21 @@
 
4496
 /* { dg-do compile } */
 
4497
 /* { dg-options "-Wstack-usage=512" } */
 
4498
 
 
4499
-int foo1 (void)
 
4500
+int foo1 (void)  /* { dg-bogus "stack usage" } */
 
4501
 {
 
4502
   char arr[16];
 
4503
   arr[0] = 1;
 
4504
   return 0;
 
4505
-} /* { dg-bogus "stack usage" } */
 
4506
+}
 
4507
 
 
4508
-int foo2 (void)
 
4509
+int foo2 (void)  /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
4510
 {
 
4511
   char arr[1024];
 
4512
   arr[0] = 1;
 
4513
   return 0;
 
4514
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
4515
+}
 
4516
 
 
4517
-int foo3 (void)
 
4518
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
4519
 {
 
4520
   char arr[1024] __attribute__((aligned (512)));
 
4521
   arr[0] = 1;
 
4522
@@ -22,12 +22,11 @@
 
4523
   /* Force dynamic realignment of argument pointer.  */
 
4524
   __builtin_apply ((void (*)()) foo2, 0, 0);
 
4525
   return 0;
 
4526
+}
 
4527
 
 
4528
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
4529
-
 
4530
-int foo4 (int n)
 
4531
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
 
4532
 {
 
4533
   char arr[n];
 
4534
   arr[0] = 1;
 
4535
   return 0;
 
4536
-} /* { dg-warning "stack usage might be unbounded" } */
 
4537
+}
 
4538
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
 
4539
===================================================================
 
4540
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../tags/gcc_4_8_3_release)
 
4541
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../branches/gcc-4_8-branch)
 
4542
@@ -0,0 +1,48 @@
 
4543
+/* { dg-do compile } */
 
4544
+/* { dg-options "-O3" } */
 
4545
+
 
4546
+int a, b, c;
 
4547
+
 
4548
+struct S
 
4549
+{
 
4550
+  int f0;
 
4551
+  int f1;
 
4552
+} d;
 
4553
+
 
4554
+static int fn2 (struct S);
 
4555
+void fn3 (struct S);
 
4556
+
 
4557
+void
 
4558
+fn1 (struct S p)
 
4559
+{
 
4560
+  struct S h = { 0, 0 };
 
4561
+  fn3 (p);
 
4562
+  fn2 (h);
 
4563
+}
 
4564
+
 
4565
+int
 
4566
+fn2 (struct S p)
 
4567
+{
 
4568
+  struct S j = { 0, 0 };
 
4569
+  fn3 (p);
 
4570
+  fn2 (j);
 
4571
+  return 0;
 
4572
+}
 
4573
+
 
4574
+void
 
4575
+fn3 (struct S p)
 
4576
+{
 
4577
+  for (; b; a++)
 
4578
+    c = p.f0;
 
4579
+  fn1 (d);
 
4580
+}
 
4581
+
 
4582
+void
 
4583
+fn4 ()
 
4584
+{
 
4585
+  for (;;)
 
4586
+    {
 
4587
+      struct S f = { 0, 0 };
 
4588
+      fn1 (f);
 
4589
+    }
 
4590
+}
 
4591
Index: gcc/testsuite/gcc.dg/pr62030.c
 
4592
===================================================================
 
4593
--- a/src/gcc/testsuite/gcc.dg/pr62030.c        (.../tags/gcc_4_8_3_release)
 
4594
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c        (.../branches/gcc-4_8-branch)
 
4595
@@ -0,0 +1,50 @@
 
4596
+/* { dg-do run } */
 
4597
+/* { dg-options "-O2" } */
 
4598
+
 
4599
+extern void abort (void);
 
4600
+
 
4601
+struct node
 
4602
+{
 
4603
+  struct node *next;
 
4604
+  struct node *prev;
 
4605
+};
 
4606
+
 
4607
+struct node node;
 
4608
+
 
4609
+struct head
 
4610
+{
 
4611
+  struct node *first;
 
4612
+};
 
4613
+
 
4614
+struct head heads[5];
 
4615
+
 
4616
+int k = 2;
 
4617
+
 
4618
+struct head *head = &heads[2];
 
4619
+
 
4620
+static int __attribute__((noinline))
 
4621
+foo (void)
 
4622
+{
 
4623
+  node.prev = (void *)head;
 
4624
+  head->first = &node;
 
4625
+
 
4626
+  struct node *n = head->first;
 
4627
+  struct head *h = &heads[k];
 
4628
+  struct node *next = n->next;
 
4629
+
 
4630
+  if (n->prev == (void *)h)
 
4631
+    h->first = next;
 
4632
+  else
 
4633
+    n->prev->next = next;
 
4634
+
 
4635
+  n->next = h->first;
 
4636
+  return n->next == &node;
 
4637
+}
 
4638
+
 
4639
+int
 
4640
+main (void)
 
4641
+{
 
4642
+  if (foo ())
 
4643
+    abort ();
 
4644
+  return 0;
 
4645
+}
 
4646
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
 
4647
===================================================================
 
4648
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
 
4649
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
 
4650
@@ -0,0 +1,35 @@
 
4651
+/* PR tree-optimization/63341 */
 
4652
+/* { dg-do run } */
 
4653
+
 
4654
+#include "tree-vect.h"
 
4655
+
 
4656
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
4657
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
4658
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
 
4659
+                 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
 
4660
+                 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
 
4661
+                 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
 
4662
+unsigned short d[32] = { 1 };
 
4663
+
 
4664
+__attribute__((noinline, noclone)) void
 
4665
+foo ()
 
4666
+{
 
4667
+  int i;
 
4668
+  for (i = 0; i < 32; i++)
 
4669
+    d[i] = t.s[i].s + 4;
 
4670
+  for (i = 0; i < 32; i++)
 
4671
+    if (d[i] != t.s[i].s + 4)
 
4672
+      abort ();
 
4673
+    else
 
4674
+      asm volatile ("" : : : "memory");
 
4675
+}
 
4676
+
 
4677
+int
 
4678
+main ()
 
4679
+{
 
4680
+  check_vect ();
 
4681
+  foo ();
 
4682
+  return 0;
 
4683
+}
 
4684
+
 
4685
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4686
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
 
4687
===================================================================
 
4688
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../tags/gcc_4_8_3_release)
 
4689
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../branches/gcc-4_8-branch)
 
4690
@@ -0,0 +1,26 @@
 
4691
+/* PR tree-optimization/63189 */
 
4692
+/* { dg-do run } */
 
4693
+
 
4694
+#include "tree-vect.h"
 
4695
+
 
4696
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
 
4697
+
 
4698
+__attribute__((noinline, noclone)) void
 
4699
+foo (void)
 
4700
+{
 
4701
+  int j, s = 0;
 
4702
+  for (j = 0; j < 8; j++)
 
4703
+    s += d[j] * j;
 
4704
+  if (s != 7)
 
4705
+    abort ();
 
4706
+}
 
4707
+
 
4708
+int
 
4709
+main ()
 
4710
+{
 
4711
+  check_vect ();
 
4712
+  foo ();
 
4713
+  return 0;
 
4714
+}
 
4715
+
 
4716
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4717
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
 
4718
===================================================================
 
4719
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../tags/gcc_4_8_3_release)
 
4720
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../branches/gcc-4_8-branch)
 
4721
@@ -0,0 +1,73 @@
 
4722
+/* { dg-require-effective-target vect_int } */
 
4723
+
 
4724
+#include <stdarg.h>
 
4725
+#include "tree-vect.h"
 
4726
+
 
4727
+#define N 64
 
4728
+#define DOT 43680
 
4729
+
 
4730
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
4731
+signed int   Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
4732
+
 
4733
+/* (short, int)->int->int dot product.
 
4734
+   Not detected as a dot-product pattern.  */
 
4735
+
 
4736
+__attribute__ ((noinline)) int
 
4737
+foo (int len)
 
4738
+{
 
4739
+  int i;
 
4740
+  int result = 0;
 
4741
+
 
4742
+  for (i = 0; i < len; i++)
 
4743
+    {
 
4744
+      result += (X[i] * Y[i]);
 
4745
+    }
 
4746
+  return result;
 
4747
+}
 
4748
+
 
4749
+
 
4750
+/* (int, short)->int->int dot product.
 
4751
+   Not detected as a dot-product pattern.  */
 
4752
+
 
4753
+__attribute__ ((noinline)) int
 
4754
+bar (int len)
 
4755
+{
 
4756
+  int i;
 
4757
+  int result = 0;
 
4758
+
 
4759
+  for (i = 0; i < len; i++)
 
4760
+    {
 
4761
+      result += (Y[i] * X[i]);
 
4762
+    }
 
4763
+  return result;
 
4764
+}
 
4765
+
 
4766
+int
 
4767
+main (void)
 
4768
+{
 
4769
+  int i;
 
4770
+  int dot;
 
4771
+
 
4772
+  check_vect ();
 
4773
+
 
4774
+  for (i = 0; i < N; i++)
 
4775
+    {
 
4776
+      X[i] = i;
 
4777
+      Y[i] = N - i;
 
4778
+      __asm__ volatile ("");
 
4779
+    }
 
4780
+
 
4781
+  dot = foo (N);
 
4782
+  if (dot != DOT)
 
4783
+    abort ();
 
4784
+
 
4785
+  dot = bar (N);
 
4786
+  if (dot != DOT)
 
4787
+    abort ();
 
4788
+
 
4789
+  return 0;
 
4790
+}
 
4791
+
 
4792
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
 
4793
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4794
+
 
4795
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
 
4796
===================================================================
 
4797
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../tags/gcc_4_8_3_release)
 
4798
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../branches/gcc-4_8-branch)
 
4799
@@ -0,0 +1,40 @@
 
4800
+/* { dg-do compile } */
 
4801
+/* { dg-additional-options "-O1" } */
 
4802
+
 
4803
+struct S0
 
4804
+{
 
4805
+  int f7;
 
4806
+};
 
4807
+struct S0 g_50;
 
4808
+int g_70;
 
4809
+int g_76;
 
4810
+
 
4811
+int foo (long long p_56, int * p_57)
 
4812
+{
 
4813
+  int *l_77;
 
4814
+  int l_101;
 
4815
+
 
4816
+  for (; g_70;)
 
4817
+    {
 
4818
+      int **l_78 = &l_77;
 
4819
+      if (g_50.f7)
 
4820
+       continue;
 
4821
+      *l_78 = 0;
 
4822
+    }
 
4823
+  for (g_76 = 1; g_76 >= 0; g_76--)
 
4824
+    {
 
4825
+      int *l_90;
 
4826
+      for (l_101 = 4; l_101 >= 0; l_101--)
 
4827
+       if (l_101)
 
4828
+         *l_90 = 0;
 
4829
+       else
 
4830
+         {
 
4831
+           int **l_113 = &l_77;
 
4832
+           *l_113 = p_57;
 
4833
+         }
 
4834
+    }
 
4835
+
 
4836
+  return *l_77;
 
4837
+}
 
4838
+
 
4839
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4840
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
 
4841
===================================================================
 
4842
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
 
4843
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
 
4844
@@ -0,0 +1,34 @@
 
4845
+/* PR tree-optimization/63189 */
 
4846
+/* { dg-additional-options "-fwrapv" } */
 
4847
+/* { dg-do run } */
 
4848
+
 
4849
+#include "tree-vect.h"
 
4850
+
 
4851
+__attribute__((noinline, noclone)) static int
 
4852
+bar (const short *a, int len)
 
4853
+{
 
4854
+  int x;
 
4855
+  int x1 = 0;
 
4856
+
 
4857
+  for (x = 0; x < len; x++)
 
4858
+    x1 += x * a[x];
 
4859
+  return x1;
 
4860
+}
 
4861
+
 
4862
+__attribute__((noinline, noclone)) void
 
4863
+foo (void)
 
4864
+{
 
4865
+  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
 
4866
+  if (bar (stuff, 9) != 36)
 
4867
+    abort ();
 
4868
+}
 
4869
+
 
4870
+int
 
4871
+main ()
 
4872
+{
 
4873
+  check_vect ();
 
4874
+  foo ();
 
4875
+  return 0;
 
4876
+}
 
4877
+
 
4878
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4879
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
 
4880
===================================================================
 
4881
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../tags/gcc_4_8_3_release)
 
4882
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../branches/gcc-4_8-branch)
 
4883
@@ -0,0 +1,22 @@
 
4884
+/* { dg-do compile } */
 
4885
+
 
4886
+int a[16][2];
 
4887
+struct A
 
4888
+{
 
4889
+  int b[16][2];
 
4890
+  int c[16][1];
 
4891
+};
 
4892
+
 
4893
+void
 
4894
+foo (struct A *x)
 
4895
+{
 
4896
+  int i;
 
4897
+  for (i = 0; i < 16; ++i)
 
4898
+    {
 
4899
+      x->b[i][0] = a[i][0];
 
4900
+      x->c[i][0] = 0 != a[i][0];
 
4901
+      x->b[i][1] = a[i][1];
 
4902
+    }
 
4903
+}
 
4904
+
 
4905
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4906
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
 
4907
===================================================================
 
4908
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
 
4909
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
 
4910
@@ -0,0 +1,33 @@
 
4911
+/* PR tree-optimization/63189 */
 
4912
+/* { dg-do run } */
 
4913
+
 
4914
+#include "tree-vect.h"
 
4915
+
 
4916
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
 
4917
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
 
4918
+
 
4919
+__attribute__((noinline, noclone)) static int
 
4920
+bar (void)
 
4921
+{
 
4922
+  int sum = 0, i;
 
4923
+  for (i = 0; i < 8; ++i)
 
4924
+    sum += a[i] * b[i];
 
4925
+  return sum;
 
4926
+}
 
4927
+
 
4928
+__attribute__((noinline, noclone)) void
 
4929
+foo (void)
 
4930
+{
 
4931
+  if (bar () != 0)
 
4932
+    abort ();
 
4933
+}
 
4934
+
 
4935
+int
 
4936
+main ()
 
4937
+{
 
4938
+  check_vect ();
 
4939
+  foo ();
 
4940
+  return 0;
 
4941
+}
 
4942
+
 
4943
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4944
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
 
4945
===================================================================
 
4946
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
 
4947
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
 
4948
@@ -0,0 +1,32 @@
 
4949
+/* PR tree-optimization/63341 */
 
4950
+/* { dg-do run } */
 
4951
+
 
4952
+#include "tree-vect.h"
 
4953
+
 
4954
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
4955
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
4956
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
 
4957
+                 {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
 
4958
+                 {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
 
4959
+                 {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
 
4960
+unsigned short d[32] = { 1 };
 
4961
+
 
4962
+__attribute__((noinline, noclone)) void
 
4963
+foo ()
 
4964
+{
 
4965
+  int i;
 
4966
+  for (i = 0; i < 32; i++)
 
4967
+    d[i] = t.s[i].s;
 
4968
+  if (__builtin_memcmp (d, t.s, sizeof d))
 
4969
+    abort ();
 
4970
+}
 
4971
+
 
4972
+int
 
4973
+main ()
 
4974
+{
 
4975
+  check_vect ();
 
4976
+  foo ();
 
4977
+  return 0;
 
4978
+}
 
4979
+
 
4980
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
4981
Index: gcc/testsuite/ChangeLog
 
4982
===================================================================
 
4983
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_8_3_release)
 
4984
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_8-branch)
 
4985
@@ -1,3 +1,419 @@
 
4986
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
4987
+
 
4988
+       Backport from mainline r215880
 
4989
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
4990
+
 
4991
+       * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
 
4992
+       failing with the new warning message.
 
4993
+       * gcc.dg/vmx/3c-01a.c: Likewise.
 
4994
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
4995
+       * gcc.dg/vmx/ops.c: Likewise.
 
4996
+       * gcc.target/powerpc/altivec-20.c: Likewise.
 
4997
+       * gcc.target/powerpc/altivec-6.c: Likewise.
 
4998
+       * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
 
4999
+       * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
 
5000
+       * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
 
5001
+
 
5002
+       Backport from mainline r215882
 
5003
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5004
+
 
5005
+       * gcc.target/powerpc/lvsl-lvsr.c: New test.
 
5006
+
 
5007
+       Backport from mainline r216017
 
5008
+       2014-10-08  Pat Haugen  <pthaugen@us.ibm.com>
 
5009
+
 
5010
+       * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
 
5011
+       * gcc.dg/vmx/ops.c: Likewise.
 
5012
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
5013
+
 
5014
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
5015
+
 
5016
+       PR fortran/59488
 
5017
+       * gfortran.dg/gomp/pr59488-1.f90: New test.
 
5018
+       * gfortran.dg/gomp/pr59488-2.f90: New test.
 
5019
+
 
5020
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
5021
+
 
5022
+       PR debug/63342
 
5023
+       * gcc.dg/pr63342.c: New test.
 
5024
+
 
5025
+       PR target/63428
 
5026
+       * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
 
5027
+       to test 24 in TESTS.
 
5028
+
 
5029
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
5030
+
 
5031
+       Backport from mainline
 
5032
+       2013-11-07  Joseph Myers  <joseph@codesourcery.com>
 
5033
+
 
5034
+       * lib/target-supports.exp
 
5035
+       (check_effective_target_fenv_exceptions): New function.
 
5036
+
 
5037
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
5038
+
 
5039
+       PR inline-asm/63282
 
5040
+       * gcc.c-torture/compile/pr63282.c: New test.
 
5041
+
 
5042
+2014-09-26  Jakub Jelinek  <jakub@redhat.com>
 
5043
+
 
5044
+       * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
 
5045
+       to default options.
 
5046
+
 
5047
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5048
+
 
5049
+       Backport from mainline r215559
 
5050
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5051
+
 
5052
+       PR target/63335
 
5053
+       * gcc.target/powerpc/pr63335.c: New test.
 
5054
+
 
5055
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
5056
+
 
5057
+       PR tree-optimization/63341
 
5058
+       * gcc.dg/vect/pr63341-1.c: New test.
 
5059
+       * gcc.dg/vect/pr63341-2.c: New test.
 
5060
+
 
5061
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
5062
+
 
5063
+       * gcc.dg/torture/float128-exact-underflow.c: New test.
 
5064
+
 
5065
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
5066
+
 
5067
+       PR debug/63284
 
5068
+       * gcc.dg/pr63284.c: New test.
 
5069
+
 
5070
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
5071
+
 
5072
+       Backport from mainline
 
5073
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
5074
+
 
5075
+       PR tree-optimization/61452
 
5076
+       * gcc.dg/torture/pr61452.c: New testcase.
 
5077
+
 
5078
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
5079
+
 
5080
+       Backport from mainline
 
5081
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
5082
+
 
5083
+       PR middle-end/61010
 
5084
+       * gcc.dg/torture/pr61010.c: New testcase.
 
5085
+
 
5086
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
5087
+
 
5088
+       PR middle-end/61045
 
5089
+       * gcc.dg/pr61045.c: New testcase.
 
5090
+
 
5091
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
5092
+
 
5093
+       PR tree-optimization/62075
 
5094
+       * gcc.dg/vect/pr62075.c: New testcase.
 
5095
+
 
5096
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
5097
+
 
5098
+       PR tree-optimization/60196
 
5099
+       PR tree-optimization/63189
 
5100
+       * gcc.dg/vect/pr63189.c: New test.
 
5101
+       * gcc.dg/vect/pr60196-1.c: New test.
 
5102
+       * gcc.dg/vect/pr60196-2.c: New test.
 
5103
+
 
5104
+       Backported from mainline
 
5105
+       2013-09-17  Cong Hou  <congh@google.com>
 
5106
+
 
5107
+       * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product 
 
5108
+       on two arrays with short and int types. This should not be recognized
 
5109
+       as a dot product pattern.
 
5110
+
 
5111
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
5112
+
 
5113
+       Backported from mainline
 
5114
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
5115
+
 
5116
+       PR debug/61923
 
5117
+       * gcc.target/i386/pr61923.c: New test.
 
5118
+
 
5119
+2014-09-06  John David Anglin  <danglin@gcc.gnu.org>
 
5120
+
 
5121
+       PR testsuite/56194
 
5122
+       * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
 
5123
+
 
5124
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
5125
+
 
5126
+       Backport from mainline
 
5127
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
 
5128
+
 
5129
+       PR fortran/62270
 
5130
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
 
5131
+
 
5132
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
5133
+
 
5134
+       PR ipa/62015
 
5135
+       * g++.dg/ipa/pr62015.C: New test.
 
5136
+
 
5137
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
5138
+
 
5139
+       PR ipa/61986
 
5140
+       * gcc.dg/ipa/pr61986.c: New test.
 
5141
+
 
5142
+2014-08-26  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
5143
+
 
5144
+       * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
 
5145
+       failure on s390*-*-linux-gnu.
 
5146
+
 
5147
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
5148
+
 
5149
+       Backport from mainline
 
5150
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
5151
+
 
5152
+       PR target/61996
 
5153
+       * gcc.target/sh/pr61996.c: New.
 
5154
+
 
5155
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
5156
+
 
5157
+       Backport from trunk
 
5158
+       PR fortran/62214
 
5159
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
5160
+
 
5161
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
5162
+
 
5163
+       Backport from mainline:
 
5164
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
5165
+
 
5166
+       PR rtl-optimization/62004
 
5167
+       PR rtl-optimization/62030
 
5168
+       * gcc.dg/pr62004.c: New test.
 
5169
+       * gcc.dg/pr62030.c: Same.
 
5170
+       * gcc.target/mips/pr62030-octeon.c: Same.
 
5171
+
 
5172
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
5173
+
 
5174
+       PR tree-optimization/62073
 
5175
+       * gcc.dg/vect/pr62073.c: New test.
 
5176
+
 
5177
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5178
+
 
5179
+       Backport from mainline
 
5180
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5181
+
 
5182
+       PR middle-end/62103
 
5183
+       * gcc.c-torture/execute/bitfld-6.c: New test.
 
5184
+
 
5185
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
5186
+
 
5187
+       Backport from trunk
 
5188
+       PR fortran/61999
 
5189
+       * gfortran.dg/dot_product_3.f90:  New test case.
 
5190
+
 
5191
+2014-08-07  John David Anglin  <danglin@gcc.gnu.org>
 
5192
+
 
5193
+       PR tree-optimization/60707
 
5194
+       * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
 
5195
+
 
5196
+2014-08-06  Jakub Jelinek  <jakub@redhat.com>
 
5197
+
 
5198
+       PR rtl-optimization/61801
 
5199
+       * gcc.target/i386/pr61801.c: Rewritten.
 
5200
+
 
5201
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5202
+
 
5203
+       Backport from mainline
 
5204
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5205
+
 
5206
+       PR tree-optimization/61375
 
5207
+       * gcc.c-torture/execute/pr61375-1.c: New test.
 
5208
+
 
5209
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
5210
+
 
5211
+       PR tree-optimization/61964
 
5212
+       * gcc.dg/torture/pr61964.c: New testcase.
 
5213
+       * gcc.dg/pr51879-18.c: XFAIL.
 
5214
+
 
5215
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
5216
+
 
5217
+       PR rtl-optimization/61801
 
5218
+       * gcc.target/i386/pr61801.c: Fix testcase.
 
5219
+
 
5220
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
5221
+
 
5222
+       PR rtl-optimization/61801
 
5223
+       * gcc.target/i386/pr61801.c: New testcase.
 
5224
+
 
5225
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5226
+
 
5227
+       Backport from mainline:
 
5228
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5229
+
 
5230
+       * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
 
5231
+
 
5232
+       * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
 
5233
+       * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
 
5234
+       * gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
 
5235
+       * gcc.c-torture/execute/pr23135.x: Likewise.
 
5236
+
 
5237
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5238
+
 
5239
+       Backport from mainline:
 
5240
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5241
+
 
5242
+       * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
 
5243
+
 
5244
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5245
+
 
5246
+       Backport from mainline:
 
5247
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5248
+
 
5249
+       * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
 
5250
+
 
5251
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5252
+
 
5253
+       Backport from mainline:
 
5254
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
5255
+
 
5256
+       * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
 
5257
+
 
5258
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
5259
+
 
5260
+       * gcc.dg/stack-usage-2.c: Adjust.
 
5261
+
 
5262
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
5263
+
 
5264
+       Backport from trunk.
 
5265
+       PR fortran/61780
 
5266
+       * gfortran.dg/dependency_44.f90 : New test
 
5267
+
 
5268
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
5269
+
 
5270
+       * gnat.dg/opt39.adb: New test.
 
5271
+
 
5272
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
5273
+
 
5274
+       PR fortran/61459
 
5275
+       PR fortran/58883
 
5276
+       * gfortran.dg/allocatable_function_8.f90 : New test
 
5277
+
 
5278
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
5279
+
 
5280
+       PR tree-optimization/61684
 
5281
+       * gcc.c-torture/compile/pr61684.c: New test.
 
5282
+
 
5283
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
5284
+           Fritz Reese  <Reese-Fritz@zai.com>
 
5285
+
 
5286
+       * gfortran.dg/oldstyle_5.f: New test.
 
5287
+
 
5288
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5289
+
 
5290
+       Backport from mainline
 
5291
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
5292
+
 
5293
+       PR tree-optimization/61306
 
5294
+       * gcc.c-torture/execute/pr61306-1.c: New test.
 
5295
+       * gcc.c-torture/execute/pr61306-2.c: Likewise.
 
5296
+       * gcc.c-torture/execute/pr61306-3.c: Likewise.
 
5297
+
 
5298
+2014-06-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5299
+
 
5300
+       * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
 
5301
+
 
5302
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
5303
+
 
5304
+       Backport from mainline
 
5305
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
5306
+
 
5307
+       PR target/61586
 
5308
+       * gcc.target/alpha/pr61586.c: New test.
 
5309
+
 
5310
+2014-06-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5311
+
 
5312
+       * gfortran.dg/default_format_denormal_2.f90:  Remove xfail for
 
5313
+       powerpc*-*-linux*.
 
5314
+
 
5315
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
5316
+
 
5317
+       Backport from mainline
 
5318
+       2014-06-13  Ilya Enkovich  <ilya.enkovich@intel.com>
 
5319
+
 
5320
+       PR rtl-optimization/61094
 
5321
+       PR rtl-optimization/61446
 
5322
+       * gcc.target/i386/pr61446.c : New.
 
5323
+
 
5324
+       Backport from mainline
 
5325
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
5326
+
 
5327
+       PR target/61423
 
5328
+       * gcc.target/i386/pr61423.c: New test.
 
5329
+
 
5330
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
5331
+
 
5332
+       Backport from mainline
 
5333
+
 
5334
+       PR target/61483
 
5335
+       * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
 
5336
+       * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
 
5337
+       * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
 
5338
+       * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
 
5339
+
 
5340
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
5341
+
 
5342
+       Backport from trunk.
 
5343
+       PR fortran/45187
 
5344
+       * gfortran.dg/cray_pointers_10.f90: New file.
 
5345
+
 
5346
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
5347
+
 
5348
+       Backport from mainline
 
5349
+
 
5350
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
5351
+       PR target/61415
 
5352
+       * lib/target-supports.exp (check_effective_target_longdouble128): New.
 
5353
+       * gcc.target/powerpc/pack02.c: Use it.
 
5354
+       * gcc.target/powerpc/tfmode_off.c: Likewise.
 
5355
+
 
5356
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
5357
+
 
5358
+       Backport from 2014-06-12 trunk r211491
 
5359
+
 
5360
+       PR target/61443
 
5361
+       * gcc.target/avr/torture/pr61443.c: New test.
 
5362
+
 
5363
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
5364
+
 
5365
+       PR tree-optimization/61383
 
5366
+       * gcc.dg/torture/pr61383-1.c: New testcase.
 
5367
+
 
5368
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
5369
+
 
5370
+       Backport from mainline
 
5371
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
5372
+
 
5373
+       PR rtl-optimization/60866
 
5374
+       * gcc.dg/pr60866.c: New test.
 
5375
+
 
5376
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
5377
+
 
5378
+       Backport from mainline
 
5379
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
5380
+
 
5381
+       PR rtl-optimization/60901
 
5382
+       * gcc.target/i386/pr60901.c: New test.
 
5383
+
 
5384
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
5385
+
 
5386
+       Backport from mainline
 
5387
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
5388
+
 
5389
+       * gnat.dg/overflow_fixed.adb: New test.
 
5390
+
 
5391
+2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
5392
+
 
5393
+       * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
 
5394
+
 
5395
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
5396
+
 
5397
+       Backport from mainline
 
5398
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
5399
+
 
5400
+       * gcc.target/powerpc/htm-ttest.c: New test.
 
5401
+
 
5402
 2014-05-22  Release Manager
 
5403
 
 
5404
        * GCC 4.8.3 released.
 
5405
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
 
5406
===================================================================
 
5407
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../tags/gcc_4_8_3_release)
 
5408
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../branches/gcc-4_8-branch)
 
5409
@@ -1,6 +1,6 @@
 
5410
 /* { dg-do compile { target powerpc*-*-* } } */
 
5411
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
5412
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
 
5413
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
 
5414
 
 
5415
 /* This test checks if AltiVec builtins accept const-qualified
 
5416
    arguments.  */
 
5417
Index: gcc/testsuite/g++.dg/expr/cond12.C
 
5418
===================================================================
 
5419
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../tags/gcc_4_8_3_release)
 
5420
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../branches/gcc-4_8-branch)
 
5421
@@ -0,0 +1,12 @@
 
5422
+// PR c++/58714
 
5423
+// { dg-do run }
 
5424
+
 
5425
+struct X {
 
5426
+    X& operator=(const X&){}
 
5427
+    X& operator=(X&){__builtin_abort();}
 
5428
+};
 
5429
+
 
5430
+int main(int argv,char**) {
 
5431
+  X a, b;
 
5432
+  ((argv > 2) ? a : b) = X();
 
5433
+}
 
5434
Index: gcc/testsuite/g++.dg/init/const9.C
 
5435
===================================================================
 
5436
--- a/src/gcc/testsuite/g++.dg/init/const9.C    (.../tags/gcc_4_8_3_release)
 
5437
+++ b/src/gcc/testsuite/g++.dg/init/const9.C    (.../branches/gcc-4_8-branch)
 
5438
@@ -1,5 +1,5 @@
 
5439
 // PR c++/55893
 
5440
-// { dg-final { scan-assembler-not "rodata" } }
 
5441
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
 
5442
 
 
5443
 struct foo
 
5444
 {
 
5445
Index: gcc/testsuite/g++.dg/parse/typename7.C
 
5446
===================================================================
 
5447
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../tags/gcc_4_8_3_release)
 
5448
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../branches/gcc-4_8-branch)
 
5449
@@ -7,10 +7,9 @@
 
5450
 
 
5451
 struct A
 
5452
 {
 
5453
-  template<typename>   void foo(int); // { dg-message "note" }
 
5454
-  template<typename T> void bar(T t) { // { dg-message "note" }
 
5455
+  template<typename>   void foo(int);
 
5456
+  template<typename T> void bar(T t) {
 
5457
     this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
5458
-  // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
 
5459
   template<typename T> void bad(T t) {
 
5460
     foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
5461
 };
 
5462
@@ -20,7 +19,6 @@
 
5463
 {
 
5464
   void bar(T t) {
 
5465
     A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
5466
-  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
 
5467
   void bad(T t) {
 
5468
     B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
 
5469
 };
 
5470
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
 
5471
===================================================================
 
5472
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../tags/gcc_4_8_3_release)
 
5473
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../branches/gcc-4_8-branch)
 
5474
@@ -1,2 +1,2 @@
 
5475
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
 
5476
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
 
5477
 // { dg-prune-output "array bound" }
 
5478
Index: gcc/testsuite/g++.dg/parse/ambig7.C
 
5479
===================================================================
 
5480
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../tags/gcc_4_8_3_release)
 
5481
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../branches/gcc-4_8-branch)
 
5482
@@ -0,0 +1,16 @@
 
5483
+// PR c++/60361
 
5484
+
 
5485
+struct Helper
 
5486
+{
 
5487
+  Helper(int a, void (*pfunc)());
 
5488
+};
 
5489
+
 
5490
+template <int I> void function();
 
5491
+
 
5492
+const int A = 1;
 
5493
+const int B = 2;
 
5494
+
 
5495
+Helper testOk(A, function<A>);
 
5496
+Helper testOk2(int(A), function<B>);
 
5497
+Helper testOk3((int(A)), function<A>);
 
5498
+Helper testFail(int(A), function<A>);
 
5499
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
 
5500
===================================================================
 
5501
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../tags/gcc_4_8_3_release)
 
5502
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../branches/gcc-4_8-branch)
 
5503
@@ -89,6 +89,9 @@
 
5504
 # This must be done after the compat-use-*-compiler definitions.
 
5505
 load_lib compat.exp
 
5506
 
 
5507
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
 
5508
+load_lib g++-dg.exp
 
5509
+
 
5510
 g++_init
 
5511
 
 
5512
 # Save variables for the C++ compiler under test, which each test will
 
5513
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
 
5514
===================================================================
 
5515
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../tags/gcc_4_8_3_release)
 
5516
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../branches/gcc-4_8-branch)
 
5517
@@ -1,5 +1,5 @@
 
5518
 /* Structure layout test generator.
 
5519
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
 
5520
+   Copyright (C) 2004-2014
 
5521
    Free Software Foundation, Inc.
 
5522
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
5523
 
 
5524
@@ -44,7 +44,7 @@
 
5525
 #endif
 
5526
 
 
5527
 const char *dg_options[] = {
 
5528
-"/* { dg-options \"%s-I%s\" } */\n",
 
5529
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 
5530
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 
5531
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 
5532
 "/* { 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",
 
5533
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
 
5534
===================================================================
 
5535
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
 
5536
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
 
5537
@@ -0,0 +1,28 @@
 
5538
+// PR c++/61959
 
5539
+// { dg-do compile { target c++11 } }
 
5540
+
 
5541
+template <class Coord> struct BasePoint
 
5542
+{
 
5543
+  Coord x, y;
 
5544
+  constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
 
5545
+};
 
5546
+template <class T> struct BaseCoord
 
5547
+{
 
5548
+  int value;
 
5549
+  constexpr BaseCoord (T) : value (1) {}
 
5550
+};
 
5551
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
 
5552
+{
 
5553
+  typedef BaseCoord Super;
 
5554
+  constexpr IntCoordTyped (int) : Super (0) {}
 
5555
+};
 
5556
+template <class units>
 
5557
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
 
5558
+{
 
5559
+  typedef BasePoint<IntCoordTyped<units> > Super;
 
5560
+  constexpr IntPointTyped (int, int) : Super (0, 0) {}
 
5561
+};
 
5562
+struct A
 
5563
+{
 
5564
+};
 
5565
+IntPointTyped<A> a (0, 0);
 
5566
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
 
5567
===================================================================
 
5568
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../tags/gcc_4_8_3_release)
 
5569
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../branches/gcc-4_8-branch)
 
5570
@@ -0,0 +1,24 @@
 
5571
+// PR c++/61134
 
5572
+// { dg-do compile { target c++11 } }
 
5573
+
 
5574
+struct Base { };
 
5575
+
 
5576
+template <typename>
 
5577
+struct Fixed {
 
5578
+  typedef const char* name;
 
5579
+};
 
5580
+
 
5581
+template <typename VT, typename... Fields>
 
5582
+void New(const char* name,
 
5583
+         typename Fixed<Fields>::name... field_names);
 
5584
+
 
5585
+template <typename VT, typename... Fields>
 
5586
+void CreateMetric(const char* name,
 
5587
+                  typename Fixed<Fields>::name... field_names,
 
5588
+                  const Base&) { }
 
5589
+
 
5590
+
 
5591
+void Fn()
 
5592
+{
 
5593
+  CreateMetric<int, const char*>("abcd", "def", Base());
 
5594
+}
 
5595
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
 
5596
===================================================================
 
5597
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../tags/gcc_4_8_3_release)
 
5598
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../branches/gcc-4_8-branch)
 
5599
@@ -0,0 +1,49 @@
 
5600
+// PR c++/61539
 
5601
+// { dg-do compile { target c++11 } }
 
5602
+
 
5603
+template <typename _CharT> class A;
 
5604
+template <typename> class B;
 
5605
+template <class charT> class C;
 
5606
+template <> class C<char>
 
5607
+{
 
5608
+  virtual void xparse (int &, const B<A<char> > &) const;
 
5609
+};
 
5610
+template <class T, class charT = char> class G : C<charT>
 
5611
+{
 
5612
+public:
 
5613
+  G (void *) {}
 
5614
+  void default_value (const T &);
 
5615
+  void xparse (int &, const B<A<charT> > &) const;
 
5616
+};
 
5617
+template <class T, class charT>
 
5618
+void validate (int &, const B<A<charT> > &, T *, int);
 
5619
+template <class T, class charT>
 
5620
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
 
5621
+{
 
5622
+  validate (p1, p2, (T *)0, 0);
 
5623
+}
 
5624
+template <class T> G<T> *value (T *) { return new G<T>(0); }
 
5625
+namespace Eigen
 
5626
+{
 
5627
+template <typename T> struct D;
 
5628
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
 
5629
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
 
5630
+          int _MaxCols>
 
5631
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
 
5632
+{
 
5633
+  typedef _Scalar Scalar;
 
5634
+};
 
5635
+template <typename, int, int, int, int, int _MaxCols> class F
 
5636
+{
 
5637
+public:
 
5638
+  typedef typename Eigen::D<F>::Scalar Scalar;
 
5639
+  F (const Scalar &, const Scalar &, const Scalar &);
 
5640
+};
 
5641
+template <class... T>
 
5642
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
 
5643
+}
 
5644
+int main (int, char *[])
 
5645
+{
 
5646
+  Eigen::F<double, 3, 1> a (0, 0, 0);
 
5647
+  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
 
5648
+}
 
5649
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
 
5650
===================================================================
 
5651
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
 
5652
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
 
5653
@@ -0,0 +1,13 @@
 
5654
+// PR c++/58714
 
5655
+// { dg-do compile { target c++11 } }
 
5656
+
 
5657
+struct X {
 
5658
+  X& operator=(const X&) = delete;
 
5659
+  X& operator=(X&& ) = default;
 
5660
+};
 
5661
+
 
5662
+void f(bool t) {
 
5663
+  X a, b;
 
5664
+  *(t ? &a : &b) = X();
 
5665
+  (t ? a : b) = X();
 
5666
+}
 
5667
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
 
5668
===================================================================
 
5669
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../tags/gcc_4_8_3_release)
 
5670
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../branches/gcc-4_8-branch)
 
5671
@@ -0,0 +1,17 @@
 
5672
+// PR c++/59823
 
5673
+// { dg-options "-std=c++11" }
 
5674
+
 
5675
+struct X { };
 
5676
+
 
5677
+void f(X&&);                   // { dg-message "void f" }
 
5678
+
 
5679
+struct wrap
 
5680
+{
 
5681
+  operator const X&() const;
 
5682
+};
 
5683
+
 
5684
+int main()
 
5685
+{
 
5686
+  wrap w;
 
5687
+  f(w);                                // { dg-error "lvalue" }
 
5688
+}
 
5689
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
 
5690
===================================================================
 
5691
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../tags/gcc_4_8_3_release)
 
5692
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../branches/gcc-4_8-branch)
 
5693
@@ -0,0 +1,55 @@
 
5694
+/* { dg-do run } */
 
5695
+/* { dg-options "-O3 -std=c++11"  } */
 
5696
+
 
5697
+
 
5698
+extern "C" int printf(const char *fmt, ...);
 
5699
+extern "C" void abort(void);
 
5700
+
 
5701
+struct Side {
 
5702
+    enum _Value { Left, Right, Invalid };
 
5703
+
 
5704
+    constexpr Side() : _value(Invalid) {}
 
5705
+    constexpr Side(_Value value) : _value(value) {}
 
5706
+    operator _Value() const { return (_Value)_value; }
 
5707
+
 
5708
+  private:
 
5709
+    char _value;
 
5710
+};
 
5711
+
 
5712
+struct A {
 
5713
+    void init();
 
5714
+    void adjust(Side side, bool final);
 
5715
+    void move(Side side);
 
5716
+};
 
5717
+
 
5718
+void A::init()
 
5719
+{
 
5720
+    adjust(Side::Invalid, false);
 
5721
+}
 
5722
+
 
5723
+static void __attribute__((noinline))
 
5724
+check (int v, int final)
 
5725
+{
 
5726
+    if (v != 0)
 
5727
+      abort();
 
5728
+}
 
5729
+
 
5730
+
 
5731
+__attribute__((noinline))
 
5732
+void A::adjust(Side side, bool final)
 
5733
+{
 
5734
+  check ((int)side, final);
 
5735
+}
 
5736
+
 
5737
+void A::move(Side side)
 
5738
+{
 
5739
+    adjust(side, false);
 
5740
+    adjust(side, true);
 
5741
+}
 
5742
+
 
5743
+int main()
 
5744
+{
 
5745
+    A t;
 
5746
+    t.move(Side::Left);
 
5747
+    return 0;
 
5748
+}
 
5749
Index: gcc/testsuite/g++.dg/template/local-fn1.C
 
5750
===================================================================
 
5751
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../tags/gcc_4_8_3_release)
 
5752
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../branches/gcc-4_8-branch)
 
5753
@@ -0,0 +1,8 @@
 
5754
+// PR c++/60605
 
5755
+
 
5756
+template <typename T = int>
 
5757
+struct Foo {
 
5758
+    void bar() {
 
5759
+        void bug();
 
5760
+    }
 
5761
+};
 
5762
Index: gcc/testsuite/g++.dg/template/conv14.C
 
5763
===================================================================
 
5764
--- a/src/gcc/testsuite/g++.dg/template/conv14.C        (.../tags/gcc_4_8_3_release)
 
5765
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C        (.../branches/gcc-4_8-branch)
 
5766
@@ -0,0 +1,30 @@
 
5767
+// PR c++/61647
 
5768
+
 
5769
+class XX;
 
5770
+
 
5771
+template<typename Container, typename Key>
 
5772
+struct Accessor;
 
5773
+
 
5774
+template<typename Container, typename Key, typename KeyStore = Key>
 
5775
+class Variant {
 
5776
+protected:
 
5777
+    KeyStore index;
 
5778
+    Container state;
 
5779
+public:
 
5780
+    Variant(Container st, const Key& i) : index(i), state(st) {}
 
5781
+
 
5782
+    template<typename T>
 
5783
+    operator T() const {
 
5784
+        return Accessor<Container, KeyStore>::template get<T>(state, index);
 
5785
+    }
 
5786
+};
 
5787
+
 
5788
+class AutoCleanVariant : public Variant<XX*, int> {
 
5789
+public:
 
5790
+    AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
 
5791
+
 
5792
+    template<typename T>
 
5793
+    operator T() const {
 
5794
+         return Variant<XX*, int>::operator T();
 
5795
+    }
 
5796
+};
 
5797
Index: gcc/testsuite/g++.dg/template/friend55.C
 
5798
===================================================================
 
5799
--- a/src/gcc/testsuite/g++.dg/template/friend55.C      (.../tags/gcc_4_8_3_release)
 
5800
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C      (.../branches/gcc-4_8-branch)
 
5801
@@ -0,0 +1,18 @@
 
5802
+// PR c++/59956
 
5803
+
 
5804
+template <int I> struct A;
 
5805
+template <int I> class B {
 
5806
+  int i;
 
5807
+  template <int A_S> friend void A<A_S>::impl();
 
5808
+};
 
5809
+
 
5810
+B<0> b1;
 
5811
+template<int I>struct A { void impl(); };
 
5812
+B<1> b2;
 
5813
+
 
5814
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
 
5815
+
 
5816
+int main()
 
5817
+{
 
5818
+  A<0>().impl();
 
5819
+}
 
5820
Index: gcc/testsuite/g++.dg/template/memclass5.C
 
5821
===================================================================
 
5822
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../tags/gcc_4_8_3_release)
 
5823
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../branches/gcc-4_8-branch)
 
5824
@@ -0,0 +1,26 @@
 
5825
+// PR c++/60241
 
5826
+
 
5827
+template <typename T>
 
5828
+struct x
 
5829
+{
 
5830
+    template <typename U>
 
5831
+    struct y
 
5832
+    {
 
5833
+        typedef T result2;
 
5834
+    };
 
5835
+
 
5836
+    typedef y<int> zy;
 
5837
+};
 
5838
+
 
5839
+template<>
 
5840
+template<class T>
 
5841
+struct x<int>::y
 
5842
+{
 
5843
+    typedef double result2;
 
5844
+};
 
5845
+
 
5846
+int main()
 
5847
+{
 
5848
+    x<int>::zy::result2 xxx;
 
5849
+    x<int>::y<int>::result2 xxx2;
 
5850
+}
 
5851
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
 
5852
===================================================================
 
5853
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../tags/gcc_4_8_3_release)
 
5854
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../branches/gcc-4_8-branch)
 
5855
@@ -0,0 +1,22 @@
 
5856
+// PR c++/61500
 
5857
+
 
5858
+struct X {
 
5859
+  int i;
 
5860
+  int j;
 
5861
+
 
5862
+  int foo(int X::* ptr);
 
5863
+
 
5864
+  template <int X::* ptr>
 
5865
+  int bar();
 
5866
+};
 
5867
+
 
5868
+int X::foo(int X::* ptr) {
 
5869
+  int* p = &(this->*ptr);  // OK.
 
5870
+  return *p;
 
5871
+}
 
5872
+
 
5873
+template <int X::* ptr>
 
5874
+int X::bar() {
 
5875
+  int* p = &(this->*ptr);  // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
 
5876
+  return *p;
 
5877
+}
 
5878
Index: gcc/cp/tree.c
 
5879
===================================================================
 
5880
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
 
5881
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
 
5882
@@ -97,6 +97,16 @@
 
5883
     case IMAGPART_EXPR:
 
5884
       return lvalue_kind (TREE_OPERAND (ref, 0));
 
5885
 
 
5886
+    case MEMBER_REF:
 
5887
+    case DOTSTAR_EXPR:
 
5888
+      if (TREE_CODE (ref) == MEMBER_REF)
 
5889
+       op1_lvalue_kind = clk_ordinary;
 
5890
+      else
 
5891
+       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
5892
+      if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
 
5893
+       op1_lvalue_kind = clk_none;
 
5894
+      return op1_lvalue_kind;
 
5895
+
 
5896
     case COMPONENT_REF:
 
5897
       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
5898
       /* Look at the member designator.  */
 
5899
@@ -3738,6 +3748,10 @@
 
5900
     {
 
5901
       init_expr = get_target_expr (exp);
 
5902
       exp = TARGET_EXPR_SLOT (init_expr);
 
5903
+      if (CLASS_TYPE_P (TREE_TYPE (exp)))
 
5904
+       exp = move (exp);
 
5905
+      else
 
5906
+       exp = rvalue (exp);
 
5907
     }
 
5908
   else
 
5909
     {
 
5910
Index: gcc/cp/ChangeLog
 
5911
===================================================================
 
5912
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
5913
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_8-branch)
 
5914
@@ -1,3 +1,67 @@
 
5915
+2014-08-07  Jason Merrill  <jason@redhat.com>
 
5916
+
 
5917
+       PR c++/61959
 
5918
+       * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
 
5919
+
 
5920
+       PR c++/58714
 
5921
+       * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
 
5922
+
 
5923
+2014-01-27  Jason Merrill  <jason@redhat.com>
 
5924
+
 
5925
+       PR c++/59823
 
5926
+       Core DR 1138
 
5927
+       * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
 
5928
+       list-initialization.  A conversion to rvalue ref that involves
 
5929
+       an lvalue-rvalue conversion is bad.
 
5930
+       (convert_like_real): Give helpful error message.
 
5931
+
 
5932
+2014-01-29  Jason Merrill  <jason@redhat.com>
 
5933
+
 
5934
+       PR c++/59956
 
5935
+       * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
 
5936
+       have a friend template in a class template.
 
5937
+       * pt.c (tsubst_friend_function): Look through it.
 
5938
+       (push_template_decl_real): A friend member template is
 
5939
+       primary.
 
5940
+
 
5941
+2014-02-21  Jason Merrill  <jason@redhat.com>
 
5942
+
 
5943
+       PR c++/60241
 
5944
+       * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
 
5945
+       of the partial instantiation, not the most general template.
 
5946
+       (maybe_process_partial_specialization): Reassign everything on
 
5947
+       that list.
 
5948
+
 
5949
+2014-03-05  Jason Merrill  <jason@redhat.com>
 
5950
+
 
5951
+       PR c++/60361
 
5952
+       * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
 
5953
+       if re-parsing might succeed.
 
5954
+       * semantics.c (finish_id_expression): Use of a parameter outside
 
5955
+       the function body is a parse error.
 
5956
+
 
5957
+2014-06-30  Jason Merrill  <jason@redhat.com>
 
5958
+
 
5959
+       PR c++/61647
 
5960
+       * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
 
5961
+
 
5962
+       PR c++/61539
 
5963
+       * pt.c (unify_one_argument): Type/expression mismatch just causes
 
5964
+       deduction failure.
 
5965
+
 
5966
+       PR c++/61500
 
5967
+       * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
 
5968
+
 
5969
+2014-06-17  Jason Merrill  <jason@redhat.com>
 
5970
+
 
5971
+       PR c++/60605
 
5972
+       * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
 
5973
+
 
5974
+2014-06-02  Jason Merrill  <jason@redhat.com>
 
5975
+
 
5976
+       PR c++/61134
 
5977
+       * pt.c (pack_deducible_p): Handle canonicalization.
 
5978
+
 
5979
 2014-05-22  Release Manager
 
5980
 
 
5981
        * GCC 4.8.3 released.
 
5982
Index: gcc/cp/pt.c
 
5983
===================================================================
 
5984
--- a/src/gcc/cp/pt.c   (.../tags/gcc_4_8_3_release)
 
5985
+++ b/src/gcc/cp/pt.c   (.../branches/gcc-4_8-branch)
 
5986
@@ -907,11 +907,13 @@
 
5987
               t; t = TREE_CHAIN (t))
 
5988
            {
 
5989
              tree inst = TREE_VALUE (t);
 
5990
-             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
 
5991
+             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
 
5992
+                 || !COMPLETE_OR_OPEN_TYPE_P (inst))
 
5993
                {
 
5994
                  /* We already have a full specialization of this partial
 
5995
-                    instantiation.  Reassign it to the new member
 
5996
-                    specialization template.  */
 
5997
+                    instantiation, or a full specialization has been
 
5998
+                    looked up but not instantiated.  Reassign it to the
 
5999
+                    new member specialization template.  */
 
6000
                  spec_entry elt;
 
6001
                  spec_entry *entry;
 
6002
                  void **slot;
 
6003
@@ -930,7 +932,7 @@
 
6004
                  *entry = elt;
 
6005
                  *slot = entry;
 
6006
                }
 
6007
-             else if (COMPLETE_OR_OPEN_TYPE_P (inst))
 
6008
+             else
 
6009
                /* But if we've had an implicit instantiation, that's a
 
6010
                   problem ([temp.expl.spec]/6).  */
 
6011
                error ("specialization %qT after instantiation %qT",
 
6012
@@ -4308,7 +4310,8 @@
 
6013
      in the template-parameter-list of the definition of a member of a
 
6014
      class template.  */
 
6015
 
 
6016
-  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
 
6017
+  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
 
6018
+      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
 
6019
     /* You can't have a function template declaration in a local
 
6020
        scope, nor you can you define a member of a class template in a
 
6021
        local scope.  */
 
6022
@@ -4572,7 +4575,8 @@
 
6023
     DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
 
6024
 
 
6025
   /* See if this is a primary template.  */
 
6026
-  if (is_friend && ctx)
 
6027
+  if (is_friend && ctx
 
6028
+      && uses_template_parms_level (ctx, processing_template_decl))
 
6029
     /* A friend template that specifies a class context, i.e.
 
6030
          template <typename T> friend void A<T>::f();
 
6031
        is not primary.  */
 
6032
@@ -7454,7 +7458,7 @@
 
6033
        }
 
6034
 
 
6035
       /* Let's consider the explicit specialization of a member
 
6036
-         of a class template specialization that is implicitely instantiated,
 
6037
+         of a class template specialization that is implicitly instantiated,
 
6038
         e.g.:
 
6039
             template<class T>
 
6040
             struct S
 
6041
@@ -7552,9 +7556,9 @@
 
6042
 
 
6043
       /* Note this use of the partial instantiation so we can check it
 
6044
         later in maybe_process_partial_specialization.  */
 
6045
-      DECL_TEMPLATE_INSTANTIATIONS (templ)
 
6046
+      DECL_TEMPLATE_INSTANTIATIONS (found)
 
6047
        = tree_cons (arglist, t,
 
6048
-                    DECL_TEMPLATE_INSTANTIATIONS (templ));
 
6049
+                    DECL_TEMPLATE_INSTANTIATIONS (found));
 
6050
 
 
6051
       if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
 
6052
        /* Now that the type has been registered on the instantiations
 
6053
@@ -8289,10 +8293,17 @@
 
6054
 
 
6055
       if (COMPLETE_TYPE_P (context))
 
6056
        {
 
6057
+         tree fn = new_friend;
 
6058
+         /* do_friend adds the TEMPLATE_DECL for any member friend
 
6059
+            template even if it isn't a member template, i.e.
 
6060
+              template <class T> friend A<T>::f();
 
6061
+            Look through it in that case.  */
 
6062
+         if (TREE_CODE (fn) == TEMPLATE_DECL
 
6063
+             && !PRIMARY_TEMPLATE_P (fn))
 
6064
+           fn = DECL_TEMPLATE_RESULT (fn);
 
6065
          /* Check to see that the declaration is really present, and,
 
6066
             possibly obtain an improved declaration.  */
 
6067
-         tree fn = check_classfn (context,
 
6068
-                                  new_friend, NULL_TREE);
 
6069
+         fn = check_classfn (context, fn, NULL_TREE);
 
6070
 
 
6071
          if (fn)
 
6072
            new_friend = fn;
 
6073
@@ -14934,7 +14945,7 @@
 
6074
        continue;
 
6075
       for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
 
6076
           packs; packs = TREE_CHAIN (packs))
 
6077
-       if (TREE_VALUE (packs) == parm)
 
6078
+       if (template_args_equal (TREE_VALUE (packs), parm))
 
6079
          {
 
6080
            /* The template parameter pack is used in a function parameter
 
6081
               pack.  If this is the end of the parameter list, the
 
6082
@@ -15502,8 +15513,9 @@
 
6083
        maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
 
6084
     }
 
6085
   else
 
6086
-    gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
6087
-               == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
 
6088
+    if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
6089
+       != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
 
6090
+      return unify_template_argument_mismatch (explain_p, parm, arg);
 
6091
 
 
6092
   /* For deduction from an init-list we need the actual list.  */
 
6093
   if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
 
6094
@@ -20009,7 +20021,12 @@
 
6095
        return true;
 
6096
 
 
6097
       if (BASELINK_P (expression))
 
6098
-       expression = BASELINK_FUNCTIONS (expression);
 
6099
+       {
 
6100
+         if (BASELINK_OPTYPE (expression)
 
6101
+             && dependent_type_p (BASELINK_OPTYPE (expression)))
 
6102
+           return true;
 
6103
+         expression = BASELINK_FUNCTIONS (expression);
 
6104
+       }
 
6105
 
 
6106
       if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
 
6107
        {
 
6108
Index: gcc/cp/semantics.c
 
6109
===================================================================
 
6110
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_8_3_release)
 
6111
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_8-branch)
 
6112
@@ -3108,7 +3108,7 @@
 
6113
          && DECL_CONTEXT (decl) == NULL_TREE
 
6114
          && !cp_unevaluated_operand)
 
6115
        {
 
6116
-         error ("use of parameter %qD outside function body", decl);
 
6117
+         *error_msg = "use of parameter outside function body";
 
6118
          return error_mark_node;
 
6119
        }
 
6120
     }
 
6121
@@ -7296,7 +7296,9 @@
 
6122
          constructor_elt *inner = base_field_constructor_elt (n, ce->index);
 
6123
          inner->value = elt;
 
6124
        }
 
6125
-      else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
 
6126
+      else if (ce->index
 
6127
+              && (TREE_CODE (ce->index) == NOP_EXPR
 
6128
+                  || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
 
6129
        {
 
6130
          /* This is an initializer for an empty base; now that we've
 
6131
             checked that it's constant, we can ignore it.  */
 
6132
Index: gcc/cp/parser.c
 
6133
===================================================================
 
6134
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_8_3_release)
 
6135
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_8-branch)
 
6136
@@ -12831,7 +12831,12 @@
 
6137
      the effort required to do the parse, nor will we issue duplicate
 
6138
      error messages about problems during instantiation of the
 
6139
      template.  */
 
6140
-  if (start_of_id)
 
6141
+  if (start_of_id
 
6142
+      /* Don't do this if we had a parse error in a declarator; re-parsing
 
6143
+        might succeed if a name changes meaning (60361).  */
 
6144
+      && !(cp_parser_error_occurred (parser)
 
6145
+          && cp_parser_parsing_tentatively (parser)
 
6146
+          && parser->in_declarator_p))
 
6147
     {
 
6148
       cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
 
6149
 
 
6150
Index: gcc/cp/call.c
 
6151
===================================================================
 
6152
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
 
6153
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
 
6154
@@ -1464,7 +1464,7 @@
 
6155
     {
 
6156
       maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
 
6157
       conv = implicit_conversion (to, from, expr, c_cast_p,
 
6158
-                                 flags, complain);
 
6159
+                                 flags|LOOKUP_NO_TEMP_BIND, complain);
 
6160
       if (!CLASS_TYPE_P (to)
 
6161
          && CONSTRUCTOR_NELTS (expr) == 1)
 
6162
        {
 
6163
@@ -1624,9 +1624,9 @@
 
6164
 
 
6165
   /* [dcl.init.ref]
 
6166
 
 
6167
-     Otherwise, the reference shall be to a non-volatile const type.
 
6168
-
 
6169
-     Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
 
6170
+     Otherwise, the reference shall be an lvalue reference to a
 
6171
+     non-volatile const type, or the reference shall be an rvalue
 
6172
+     reference.  */
 
6173
   if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
 
6174
     return NULL;
 
6175
 
 
6176
@@ -1664,7 +1664,16 @@
 
6177
   /* This reference binding, unlike those above, requires the
 
6178
      creation of a temporary.  */
 
6179
   conv->need_temporary_p = true;
 
6180
-  conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
 
6181
+  if (TYPE_REF_IS_RVALUE (rto))
 
6182
+    {
 
6183
+      conv->rvaluedness_matches_p = 1;
 
6184
+      /* In the second case, if the reference is an rvalue reference and
 
6185
+        the second standard conversion sequence of the user-defined
 
6186
+        conversion sequence includes an lvalue-to-rvalue conversion, the
 
6187
+        program is ill-formed.  */
 
6188
+      if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
 
6189
+       conv->bad_p = 1;
 
6190
+    }
 
6191
 
 
6192
   return conv;
 
6193
 }
 
6194
@@ -5811,7 +5820,7 @@
 
6195
       && convs->kind != ck_list
 
6196
       && convs->kind != ck_ambig
 
6197
       && (convs->kind != ck_ref_bind
 
6198
-         || convs->user_conv_p)
 
6199
+         || (convs->user_conv_p && next_conversion (convs)->bad_p))
 
6200
       && (convs->kind != ck_rvalue
 
6201
          || SCALAR_TYPE_P (totype))
 
6202
       && convs->kind != ck_base)
 
6203
@@ -6110,7 +6119,8 @@
 
6204
        if (convs->bad_p && !next_conversion (convs)->bad_p)
 
6205
          {
 
6206
            gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
 
6207
-                       && real_lvalue_p (expr));
 
6208
+                       && (real_lvalue_p (expr)
 
6209
+                           || next_conversion(convs)->kind == ck_rvalue));
 
6210
 
 
6211
            error_at (loc, "cannot bind %qT lvalue to %qT",
 
6212
                      TREE_TYPE (expr), totype);
 
6213
Index: gcc/cp/friend.c
 
6214
===================================================================
 
6215
--- a/src/gcc/cp/friend.c       (.../tags/gcc_4_8_3_release)
 
6216
+++ b/src/gcc/cp/friend.c       (.../branches/gcc-4_8-branch)
 
6217
@@ -502,7 +502,13 @@
 
6218
                                  ? current_template_parms
 
6219
                                  : NULL_TREE);
 
6220
 
 
6221
-         if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
6222
+         if ((template_member_p
 
6223
+              /* Always pull out the TEMPLATE_DECL if we have a friend
 
6224
+                 template in a class template so that it gets tsubsted
 
6225
+                 properly later on (59956).  tsubst_friend_function knows
 
6226
+                 how to tell this apart from a member template.  */
 
6227
+              || (class_template_depth && friend_depth))
 
6228
+             && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
6229
            decl = DECL_TI_TEMPLATE (decl);
 
6230
 
 
6231
          if (decl)
 
6232
Index: gcc/haifa-sched.c
 
6233
===================================================================
 
6234
--- a/src/gcc/haifa-sched.c     (.../tags/gcc_4_8_3_release)
 
6235
+++ b/src/gcc/haifa-sched.c     (.../branches/gcc-4_8-branch)
 
6236
@@ -2931,7 +2931,7 @@
 
6237
 {
 
6238
   advance_state (curr_state);
 
6239
   if (sched_verbose >= 6)
 
6240
-    fprintf (sched_dump, ";;\tAdvanced a state.\n");
 
6241
+    fprintf (sched_dump, ";;\tAdvance the current state.\n");
 
6242
 }
 
6243
 
 
6244
 /* Update register pressure after scheduling INSN.  */
 
6245
@@ -5964,6 +5964,7 @@
 
6246
   modulo_insns_scheduled = 0;
 
6247
 
 
6248
   ls.modulo_epilogue = false;
 
6249
+  ls.first_cycle_insn_p = true;
 
6250
 
 
6251
   /* Loop until all the insns in BB are scheduled.  */
 
6252
   while ((*current_sched_info->schedule_more_p) ())
 
6253
@@ -6034,7 +6035,6 @@
 
6254
       if (must_backtrack)
 
6255
        goto do_backtrack;
 
6256
 
 
6257
-      ls.first_cycle_insn_p = true;
 
6258
       ls.shadows_only_p = false;
 
6259
       cycle_issued_insns = 0;
 
6260
       ls.can_issue_more = issue_rate;
 
6261
@@ -6321,11 +6321,13 @@
 
6262
              break;
 
6263
            }
 
6264
        }
 
6265
+      ls.first_cycle_insn_p = true;
 
6266
     }
 
6267
   if (ls.modulo_epilogue)
 
6268
     success = true;
 
6269
  end_schedule:
 
6270
-  advance_one_cycle ();
 
6271
+  if (!ls.first_cycle_insn_p)
 
6272
+    advance_one_cycle ();
 
6273
   perform_replacements_new_cycle ();
 
6274
   if (modulo_ii > 0)
 
6275
     {
 
6276
Index: gcc/double-int.c
 
6277
===================================================================
 
6278
--- a/src/gcc/double-int.c      (.../tags/gcc_4_8_3_release)
 
6279
+++ b/src/gcc/double-int.c      (.../branches/gcc-4_8-branch)
 
6280
@@ -616,7 +616,7 @@
 
6281
                 == (unsigned HOST_WIDE_INT) htwice)
 
6282
                && (labs_den <= ltwice)))
 
6283
          {
 
6284
-           if (*hquo < 0)
 
6285
+           if (quo_neg)
 
6286
              /* quo = quo - 1;  */
 
6287
              add_double (*lquo, *hquo,
 
6288
                          (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
 
6289
Index: gcc/tree-ssa-math-opts.c
 
6290
===================================================================
 
6291
--- a/src/gcc/tree-ssa-math-opts.c      (.../tags/gcc_4_8_3_release)
 
6292
+++ b/src/gcc/tree-ssa-math-opts.c      (.../branches/gcc-4_8-branch)
 
6293
@@ -1537,7 +1537,7 @@
 
6294
 
 
6295
 struct symbolic_number {
 
6296
   unsigned HOST_WIDEST_INT n;
 
6297
-  int size;
 
6298
+  tree type;
 
6299
 };
 
6300
 
 
6301
 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
 
6302
@@ -1549,13 +1549,15 @@
 
6303
                 struct symbolic_number *n,
 
6304
                 int count)
 
6305
 {
 
6306
+  int bitsize = TYPE_PRECISION (n->type);
 
6307
+
 
6308
   if (count % 8 != 0)
 
6309
     return false;
 
6310
 
 
6311
   /* Zero out the extra bits of N in order to avoid them being shifted
 
6312
      into the significant bits.  */
 
6313
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
6314
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
6315
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
6316
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
6317
 
 
6318
   switch (code)
 
6319
     {
 
6320
@@ -1563,20 +1565,24 @@
 
6321
       n->n <<= count;
 
6322
       break;
 
6323
     case RSHIFT_EXPR:
 
6324
+      /* Arithmetic shift of signed type: result is dependent on the value.  */
 
6325
+      if (!TYPE_UNSIGNED (n->type)
 
6326
+         && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
 
6327
+       return false;
 
6328
       n->n >>= count;
 
6329
       break;
 
6330
     case LROTATE_EXPR:
 
6331
-      n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
 
6332
+      n->n = (n->n << count) | (n->n >> (bitsize - count));
 
6333
       break;
 
6334
     case RROTATE_EXPR:
 
6335
-      n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
 
6336
+      n->n = (n->n >> count) | (n->n << (bitsize - count));
 
6337
       break;
 
6338
     default:
 
6339
       return false;
 
6340
     }
 
6341
   /* Zero unused bits for size.  */
 
6342
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
6343
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
6344
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
6345
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
6346
   return true;
 
6347
 }
 
6348
 
 
6349
@@ -1593,7 +1599,7 @@
 
6350
   if (TREE_CODE (lhs_type) != INTEGER_TYPE)
 
6351
     return false;
 
6352
 
 
6353
-  if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
 
6354
+  if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
 
6355
     return false;
 
6356
 
 
6357
   return true;
 
6358
@@ -1650,20 +1656,25 @@
 
6359
         to initialize the symbolic number.  */
 
6360
       if (!source_expr1)
 
6361
        {
 
6362
+         int size;
 
6363
+
 
6364
          /* Set up the symbolic number N by setting each byte to a
 
6365
             value between 1 and the byte size of rhs1.  The highest
 
6366
             order byte is set to n->size and the lowest order
 
6367
             byte to 1.  */
 
6368
-         n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
 
6369
-         if (n->size % BITS_PER_UNIT != 0)
 
6370
+         n->type = TREE_TYPE (rhs1);
 
6371
+         size = TYPE_PRECISION (n->type);
 
6372
+         if (size % BITS_PER_UNIT != 0)
 
6373
            return NULL_TREE;
 
6374
-         n->size /= BITS_PER_UNIT;
 
6375
+         if (size > HOST_BITS_PER_WIDEST_INT)
 
6376
+           return NULL_TREE;
 
6377
+         size /= BITS_PER_UNIT;
 
6378
          n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
 
6379
                  (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
 
6380
 
 
6381
-         if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
6382
+         if (size < (int)sizeof (HOST_WIDEST_INT))
 
6383
            n->n &= ((unsigned HOST_WIDEST_INT)1 <<
 
6384
-                    (n->size * BITS_PER_UNIT)) - 1;
 
6385
+                    (size * BITS_PER_UNIT)) - 1;
 
6386
 
 
6387
          source_expr1 = rhs1;
 
6388
        }
 
6389
@@ -1672,12 +1683,12 @@
 
6390
        {
 
6391
        case BIT_AND_EXPR:
 
6392
          {
 
6393
-           int i;
 
6394
+           int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
6395
            unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
 
6396
            unsigned HOST_WIDEST_INT tmp = val;
 
6397
 
 
6398
            /* Only constants masking full bytes are allowed.  */
 
6399
-           for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
 
6400
+           for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
 
6401
              if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
 
6402
                return NULL_TREE;
 
6403
 
 
6404
@@ -1693,12 +1704,24 @@
 
6405
          break;
 
6406
        CASE_CONVERT:
 
6407
          {
 
6408
-           int type_size;
 
6409
+           int type_size, old_type_size;
 
6410
+           tree type;
 
6411
 
 
6412
-           type_size = TYPE_PRECISION (gimple_expr_type (stmt));
 
6413
+           type = gimple_expr_type (stmt);
 
6414
+           type_size = TYPE_PRECISION (type);
 
6415
            if (type_size % BITS_PER_UNIT != 0)
 
6416
              return NULL_TREE;
 
6417
+           if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
 
6418
+             return NULL_TREE;
 
6419
 
 
6420
+           /* Sign extension: result is dependent on the value.  */
 
6421
+           old_type_size = TYPE_PRECISION (n->type);
 
6422
+           if (!TYPE_UNSIGNED (n->type)
 
6423
+               && type_size > old_type_size
 
6424
+               && n->n &
 
6425
+                  ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
 
6426
+             return NULL_TREE;
 
6427
+
 
6428
            if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
 
6429
              {
 
6430
                /* If STMT casts to a smaller type mask out the bits not
 
6431
@@ -1705,7 +1728,7 @@
 
6432
                   belonging to the target type.  */
 
6433
                n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
 
6434
              }
 
6435
-           n->size = type_size / BITS_PER_UNIT;
 
6436
+           n->type = type;
 
6437
          }
 
6438
          break;
 
6439
        default:
 
6440
@@ -1718,7 +1741,7 @@
 
6441
 
 
6442
   if (rhs_class == GIMPLE_BINARY_RHS)
 
6443
     {
 
6444
-      int i;
 
6445
+      int i, size;
 
6446
       struct symbolic_number n1, n2;
 
6447
       unsigned HOST_WIDEST_INT mask;
 
6448
       tree source_expr2;
 
6449
@@ -1742,11 +1765,12 @@
 
6450
          source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
 
6451
 
 
6452
          if (source_expr1 != source_expr2
 
6453
-             || n1.size != n2.size)
 
6454
+             || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
 
6455
            return NULL_TREE;
 
6456
 
 
6457
-         n->size = n1.size;
 
6458
-         for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
 
6459
+         n->type = n1.type;
 
6460
+         size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
6461
+         for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
 
6462
            {
 
6463
              unsigned HOST_WIDEST_INT masked1, masked2;
 
6464
 
 
6465
@@ -1785,7 +1809,7 @@
 
6466
 
 
6467
   struct symbolic_number n;
 
6468
   tree source_expr;
 
6469
-  int limit;
 
6470
+  int limit, bitsize;
 
6471
 
 
6472
   /* The last parameter determines the depth search limit.  It usually
 
6473
      correlates directly to the number of bytes to be touched.  We
 
6474
@@ -1800,13 +1824,14 @@
 
6475
     return NULL_TREE;
 
6476
 
 
6477
   /* Zero out the extra bits of N and CMP.  */
 
6478
-  if (n.size < (int)sizeof (HOST_WIDEST_INT))
 
6479
+  bitsize = TYPE_PRECISION (n.type);
 
6480
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
6481
     {
 
6482
       unsigned HOST_WIDEST_INT mask =
 
6483
-       ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
 
6484
+       ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
6485
 
 
6486
       n.n &= mask;
 
6487
-      cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
 
6488
+      cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
 
6489
     }
 
6490
 
 
6491
   /* A complete byte swap should make the symbolic number to start
 
6492
@@ -1828,7 +1853,7 @@
 
6493
   bool changed = false;
 
6494
   tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
 
6495
 
 
6496
-  if (BITS_PER_UNIT != 8)
 
6497
+  if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
 
6498
     return 0;
 
6499
 
 
6500
   if (sizeof (HOST_WIDEST_INT) < 8)
 
6501
Index: gcc/ifcvt.c
 
6502
===================================================================
 
6503
--- a/src/gcc/ifcvt.c   (.../tags/gcc_4_8_3_release)
 
6504
+++ b/src/gcc/ifcvt.c   (.../branches/gcc-4_8-branch)
 
6505
@@ -294,6 +294,28 @@
 
6506
 
 
6507
   return (e) ? e->dest : NULL_BLOCK;
 
6508
 }
 
6509
+
 
6510
+/* Return true if RTXs A and B can be safely interchanged.  */
 
6511
+
 
6512
+static bool
 
6513
+rtx_interchangeable_p (const_rtx a, const_rtx b)
 
6514
+{
 
6515
+  if (!rtx_equal_p (a, b))
 
6516
+    return false;
 
6517
+
 
6518
+  if (GET_CODE (a) != MEM)
 
6519
+    return true;
 
6520
+
 
6521
+  /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
 
6522
+     reference is not.  Interchanging a dead type-unsafe memory reference with
 
6523
+     a live type-safe one creates a live type-unsafe memory reference, in other
 
6524
+     words, it makes the program illegal.
 
6525
+     We check here conservatively whether the two memory references have equal
 
6526
+     memory attributes.  */
 
6527
+
 
6528
+  return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
 
6529
+}
 
6530
+
 
6531
 
 
6532
 /* Go through a bunch of insns, converting them to conditional
 
6533
    execution format if possible.  Return TRUE if all of the non-note
 
6534
@@ -1014,6 +1036,9 @@
 
6535
       || (rtx_equal_p (if_info->a, XEXP (cond, 1))
 
6536
          && rtx_equal_p (if_info->b, XEXP (cond, 0))))
 
6537
     {
 
6538
+      if (!rtx_interchangeable_p (if_info->a, if_info->b))
 
6539
+       return FALSE;
 
6540
+
 
6541
       y = (code == EQ) ? if_info->a : if_info->b;
 
6542
 
 
6543
       /* Avoid generating the move if the source is the destination.  */
 
6544
@@ -2483,7 +2508,7 @@
 
6545
       if (! insn_b
 
6546
          || insn_b != last_active_insn (else_bb, FALSE)
 
6547
          || (set_b = single_set (insn_b)) == NULL_RTX
 
6548
-         || ! rtx_equal_p (x, SET_DEST (set_b)))
 
6549
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
 
6550
        return FALSE;
 
6551
     }
 
6552
   else
 
6553
@@ -2496,7 +2521,7 @@
 
6554
          || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
 
6555
          || !NONJUMP_INSN_P (insn_b)
 
6556
          || (set_b = single_set (insn_b)) == NULL_RTX
 
6557
-         || ! rtx_equal_p (x, SET_DEST (set_b))
 
6558
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b))
 
6559
          || ! noce_operand_ok (SET_SRC (set_b))
 
6560
          || reg_overlap_mentioned_p (x, SET_SRC (set_b))
 
6561
          || modified_between_p (SET_SRC (set_b), insn_b, jump)
 
6562
@@ -2562,7 +2587,7 @@
 
6563
 
 
6564
   /* Look and see if A and B are really the same.  Avoid creating silly
 
6565
      cmove constructs that no one will fix up later.  */
 
6566
-  if (rtx_equal_p (a, b))
 
6567
+  if (rtx_interchangeable_p (a, b))
 
6568
     {
 
6569
       /* If we have an INSN_B, we don't have to create any new rtl.  Just
 
6570
         move the instruction that we already have.  If we don't have an
 
6571
@@ -4246,6 +4271,9 @@
 
6572
   old_dest = JUMP_LABEL (jump);
 
6573
   if (other_bb != new_dest)
 
6574
     {
 
6575
+      if (!any_condjump_p (jump))
 
6576
+       goto cancel;
 
6577
+
 
6578
       if (JUMP_P (BB_END (dest_edge->src)))
 
6579
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
 
6580
       else if (new_dest == EXIT_BLOCK_PTR)
 
6581
Index: gcc/dwarf2out.c
 
6582
===================================================================
 
6583
--- a/src/gcc/dwarf2out.c       (.../tags/gcc_4_8_3_release)
 
6584
+++ b/src/gcc/dwarf2out.c       (.../branches/gcc-4_8-branch)
 
6585
@@ -12234,7 +12234,7 @@
 
6586
              op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
 
6587
                                        VAR_INIT_STATUS_INITIALIZED);
 
6588
              if (op1 == 0)
 
6589
-               break;
 
6590
+               return NULL;
 
6591
              add_loc_descr (&mem_loc_result, op1);
 
6592
              add_loc_descr (&mem_loc_result,
 
6593
                             new_loc_descr (DW_OP_plus, 0, 0));
 
6594
@@ -13882,6 +13882,10 @@
 
6595
       have_address = 1;
 
6596
       break;
 
6597
 
 
6598
+    case TARGET_MEM_REF:
 
6599
+    case SSA_NAME:
 
6600
+      return NULL;
 
6601
+
 
6602
     case COMPOUND_EXPR:
 
6603
       return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
 
6604
 
 
6605
Index: gcc/expr.c
 
6606
===================================================================
 
6607
--- a/src/gcc/expr.c    (.../tags/gcc_4_8_3_release)
 
6608
+++ b/src/gcc/expr.c    (.../branches/gcc-4_8-branch)
 
6609
@@ -10603,7 +10603,7 @@
 
6610
       || !host_integerp (TREE_OPERAND (offset, 1), 1)
 
6611
       || compare_tree_int (TREE_OPERAND (offset, 1),
 
6612
                           BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
 
6613
-      || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
6614
+      || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
6615
     return 0;
 
6616
 
 
6617
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
 
6618
Index: gcc/ada/socket.c
 
6619
===================================================================
 
6620
--- a/src/gcc/ada/socket.c      (.../tags/gcc_4_8_3_release)
 
6621
+++ b/src/gcc/ada/socket.c      (.../branches/gcc-4_8-branch)
 
6622
@@ -212,7 +212,7 @@
 
6623
   struct hostent *rh;
 
6624
   int ri;
 
6625
 
 
6626
-#if defined(__linux__) || defined(__GLIBC__)
 
6627
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
 
6628
   (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
 
6629
 #else
 
6630
   rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
 
6631
Index: gcc/ada/uintp.adb
 
6632
===================================================================
 
6633
--- a/src/gcc/ada/uintp.adb     (.../tags/gcc_4_8_3_release)
 
6634
+++ b/src/gcc/ada/uintp.adb     (.../branches/gcc-4_8-branch)
 
6635
@@ -171,22 +171,6 @@
 
6636
    --  If Discard_Quotient is True, Quotient is set to No_Uint
 
6637
    --  If Discard_Remainder is True, Remainder is set to No_Uint
 
6638
 
 
6639
-   function Vector_To_Uint
 
6640
-     (In_Vec   : UI_Vector;
 
6641
-      Negative : Boolean) return Uint;
 
6642
-   --  Functions that calculate values in UI_Vectors, call this function to
 
6643
-   --  create and return the Uint value. In_Vec contains the multiple precision
 
6644
-   --  (Base) representation of a non-negative value. Leading zeroes are
 
6645
-   --  permitted. Negative is set if the desired result is the negative of the
 
6646
-   --  given value. The result will be either the appropriate directly
 
6647
-   --  represented value, or a table entry in the proper canonical format is
 
6648
-   --  created and returned.
 
6649
-   --
 
6650
-   --  Note that Init_Operand puts a signed value in the result vector, but
 
6651
-   --  Vector_To_Uint is always presented with a non-negative value. The
 
6652
-   --  processing of signs is something that is done by the caller before
 
6653
-   --  calling Vector_To_Uint.
 
6654
-
 
6655
    ------------
 
6656
    -- Direct --
 
6657
    ------------
 
6658
Index: gcc/ada/uintp.ads
 
6659
===================================================================
 
6660
--- a/src/gcc/ada/uintp.ads     (.../tags/gcc_4_8_3_release)
 
6661
+++ b/src/gcc/ada/uintp.ads     (.../branches/gcc-4_8-branch)
 
6662
@@ -90,6 +90,18 @@
 
6663
    Uint_Minus_80  : constant Uint;
 
6664
    Uint_Minus_128 : constant Uint;
 
6665
 
 
6666
+   type UI_Vector is array (Pos range <>) of Int;
 
6667
+   --  Vector containing the integer values of a Uint value
 
6668
+
 
6669
+   --  Note: An earlier version of this package used pointers of arrays of Ints
 
6670
+   --  (dynamically allocated) for the Uint type. The change leads to a few
 
6671
+   --  less natural idioms used throughout this code, but eliminates all uses
 
6672
+   --  of the heap except for the table package itself. For example, Uint
 
6673
+   --  parameters are often converted to UI_Vectors for internal manipulation.
 
6674
+   --  This is done by creating the local UI_Vector using the function N_Digits
 
6675
+   --  on the Uint to find the size needed for the vector, and then calling
 
6676
+   --  Init_Operand to copy the values out of the table into the vector.
 
6677
+
 
6678
    -----------------
 
6679
    -- Subprograms --
 
6680
    -----------------
 
6681
@@ -252,6 +264,22 @@
 
6682
    --  function is used for capacity checks, and it can be one bit off
 
6683
    --  without affecting its usage.
 
6684
 
 
6685
+   function Vector_To_Uint
 
6686
+     (In_Vec   : UI_Vector;
 
6687
+      Negative : Boolean) return Uint;
 
6688
+   --  Functions that calculate values in UI_Vectors, call this function to
 
6689
+   --  create and return the Uint value. In_Vec contains the multiple precision
 
6690
+   --  (Base) representation of a non-negative value. Leading zeroes are
 
6691
+   --  permitted. Negative is set if the desired result is the negative of the
 
6692
+   --  given value. The result will be either the appropriate directly
 
6693
+   --  represented value, or a table entry in the proper canonical format is
 
6694
+   --  created and returned.
 
6695
+   --
 
6696
+   --  Note that Init_Operand puts a signed value in the result vector, but
 
6697
+   --  Vector_To_Uint is always presented with a non-negative value. The
 
6698
+   --  processing of signs is something that is done by the caller before
 
6699
+   --  calling Vector_To_Uint.
 
6700
+
 
6701
    ---------------------
 
6702
    -- Output Routines --
 
6703
    ---------------------
 
6704
@@ -494,18 +522,6 @@
 
6705
    --  UI_Vector is defined for this purpose and some internal subprograms
 
6706
    --  used for converting from one to the other are defined.
 
6707
 
 
6708
-   type UI_Vector is array (Pos range <>) of Int;
 
6709
-   --  Vector containing the integer values of a Uint value
 
6710
-
 
6711
-   --  Note: An earlier version of this package used pointers of arrays of Ints
 
6712
-   --  (dynamically allocated) for the Uint type. The change leads to a few
 
6713
-   --  less natural idioms used throughout this code, but eliminates all uses
 
6714
-   --  of the heap except for the table package itself. For example, Uint
 
6715
-   --  parameters are often converted to UI_Vectors for internal manipulation.
 
6716
-   --  This is done by creating the local UI_Vector using the function N_Digits
 
6717
-   --  on the Uint to find the size needed for the vector, and then calling
 
6718
-   --  Init_Operand to copy the values out of the table into the vector.
 
6719
-
 
6720
    type Uint_Entry is record
 
6721
       Length : Pos;
 
6722
       --  Length of entry in Udigits table in digits (i.e. in words)
 
6723
Index: gcc/ada/ChangeLog
 
6724
===================================================================
 
6725
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_8_3_release)
 
6726
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_8-branch)
 
6727
@@ -1,3 +1,20 @@
 
6728
+2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
 
6729
+            Alan Modra  <amodra@gmail.com>
 
6730
+
 
6731
+       PR ada/63225
 
6732
+       * uintp.adb (Vector_To_Uint): Move from here to...
 
6733
+       * uintp.ads (UI_Vector): Make public.
 
6734
+       (Vector_To_Uint): ...here.
 
6735
+
 
6736
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
6737
+
 
6738
+       * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
 
6739
+       * gsocket.h Add include of <unistd.h> on RTEMS.
 
6740
+
 
6741
+2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
 
6742
+
 
6743
+       * s-osinte-rtems.adb: Correct formatting of line in license block.
 
6744
+
 
6745
 2014-05-22  Release Manager
 
6746
 
 
6747
        * GCC 4.8.3 released.
 
6748
Index: gcc/ada/s-osinte-rtems.adb
 
6749
===================================================================
 
6750
--- a/src/gcc/ada/s-osinte-rtems.adb    (.../tags/gcc_4_8_3_release)
 
6751
+++ b/src/gcc/ada/s-osinte-rtems.adb    (.../branches/gcc-4_8-branch)
 
6752
@@ -22,7 +22,7 @@
 
6753
 -- You should have received a copy of the GNU General Public License and    --
 
6754
 -- a copy of the GCC Runtime Library Exception along with this program;     --
 
6755
 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
6756
--- <http://www.gnu.org/licenses/>.                                         
 
6757
+-- <http://www.gnu.org/licenses/>.                                          --
 
6758
 --                                                                          --
 
6759
 -- GNARL was developed by the GNARL team at Florida State University. It is --
 
6760
 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
 
6761
Index: gcc/ada/gsocket.h
 
6762
===================================================================
 
6763
--- a/src/gcc/ada/gsocket.h     (.../tags/gcc_4_8_3_release)
 
6764
+++ b/src/gcc/ada/gsocket.h     (.../branches/gcc-4_8-branch)
 
6765
@@ -183,6 +183,11 @@
 
6766
 #include <sys/time.h>
 
6767
 #endif
 
6768
 
 
6769
+#if defined(__rtems__)
 
6770
+#include <unistd.h>
 
6771
+/* Required, for read(), write(), and close() */
 
6772
+#endif
 
6773
+
 
6774
 /*
 
6775
  * RTEMS has these .h files but not until you have built and installed RTEMS.
 
6776
  * When building a C/C++ toolset, you also build the newlib C library, so the
 
6777
Index: gcc/tree-ssa-ifcombine.c
 
6778
===================================================================
 
6779
--- a/src/gcc/tree-ssa-ifcombine.c      (.../tags/gcc_4_8_3_release)
 
6780
+++ b/src/gcc/tree-ssa-ifcombine.c      (.../branches/gcc-4_8-branch)
 
6781
@@ -105,7 +105,11 @@
 
6782
     {
 
6783
       gimple stmt = gsi_stmt (gsi);
 
6784
 
 
6785
+      if (is_gimple_debug (stmt))
 
6786
+       continue;
 
6787
+
 
6788
       if (gimple_has_side_effects (stmt)
 
6789
+         || gimple_could_trap_p (stmt)
 
6790
          || gimple_vuse (stmt))
 
6791
        return false;
 
6792
     }
 
6793
@@ -197,7 +201,8 @@
 
6794
       while (is_gimple_assign (stmt)
 
6795
             && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
 
6796
                  && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
 
6797
-                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
 
6798
+                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
 
6799
+                 && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
 
6800
                 || gimple_assign_ssa_name_copy_p (stmt)))
 
6801
        stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
 
6802
 
 
6803
Index: gcc/sel-sched-ir.c
 
6804
===================================================================
 
6805
--- a/src/gcc/sel-sched-ir.c    (.../tags/gcc_4_8_3_release)
 
6806
+++ b/src/gcc/sel-sched-ir.c    (.../branches/gcc-4_8-branch)
 
6807
@@ -162,7 +162,7 @@
 
6808
 static void free_av_set (basic_block);
 
6809
 static void invalidate_av_set (basic_block);
 
6810
 static void extend_insn_data (void);
 
6811
-static void sel_init_new_insn (insn_t, int);
 
6812
+static void sel_init_new_insn (insn_t, int, int = -1);
 
6813
 static void finish_insns (void);
 
6814
 
 
6815
 /* Various list functions.  */
 
6816
@@ -4011,9 +4011,10 @@
 
6817
   return seqno;
 
6818
 }
 
6819
 
 
6820
-/* Compute seqno for INSN by its preds or succs.  */
 
6821
+/* Compute seqno for INSN by its preds or succs.  Use OLD_SEQNO to compute
 
6822
+   seqno in corner cases.  */
 
6823
 static int
 
6824
-get_seqno_for_a_jump (insn_t insn)
 
6825
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
 
6826
 {
 
6827
   int seqno;
 
6828
 
 
6829
@@ -4069,8 +4070,16 @@
 
6830
   if (seqno < 0)
 
6831
     seqno = get_seqno_by_succs (insn);
 
6832
 
 
6833
+  if (seqno < 0)
 
6834
+    {
 
6835
+      /* The only case where this could be here legally is that the only
 
6836
+        unscheduled insn was a conditional jump that got removed and turned
 
6837
+        into this unconditional one.  Initialize from the old seqno
 
6838
+        of that jump passed down to here.  */
 
6839
+      seqno = old_seqno;
 
6840
+    }
 
6841
+
 
6842
   gcc_assert (seqno >= 0);
 
6843
-
 
6844
   return seqno;
 
6845
 }
 
6846
 
 
6847
@@ -4250,22 +4259,24 @@
 
6848
 }
 
6849
 
 
6850
 /* This is used to initialize spurious jumps generated by
 
6851
-   sel_redirect_edge ().  */
 
6852
+   sel_redirect_edge ().  OLD_SEQNO is used for initializing seqnos
 
6853
+   in corner cases within get_seqno_for_a_jump.  */
 
6854
 static void
 
6855
-init_simplejump_data (insn_t insn)
 
6856
+init_simplejump_data (insn_t insn, int old_seqno)
 
6857
 {
 
6858
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
 
6859
             REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
 
6860
             vNULL, true, false, false,
 
6861
             false, true);
 
6862
-  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
 
6863
+  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
 
6864
   init_first_time_insn_data (insn);
 
6865
 }
 
6866
 
 
6867
 /* Perform deferred initialization of insns.  This is used to process
 
6868
-   a new jump that may be created by redirect_edge.  */
 
6869
-void
 
6870
-sel_init_new_insn (insn_t insn, int flags)
 
6871
+   a new jump that may be created by redirect_edge.  OLD_SEQNO is used
 
6872
+   for initializing simplejumps in init_simplejump_data.  */
 
6873
+static void
 
6874
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
 
6875
 {
 
6876
   /* We create data structures for bb when the first insn is emitted in it.  */
 
6877
   if (INSN_P (insn)
 
6878
@@ -4292,7 +4303,7 @@
 
6879
   if (flags & INSN_INIT_TODO_SIMPLEJUMP)
 
6880
     {
 
6881
       extend_insn_data ();
 
6882
-      init_simplejump_data (insn);
 
6883
+      init_simplejump_data (insn, old_seqno);
 
6884
     }
 
6885
 
 
6886
   gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
 
6887
@@ -5578,8 +5589,7 @@
 
6888
 }
 
6889
 
 
6890
 /* A wrapper for redirect_edge_and_branch_force, which also initializes
 
6891
-   data structures for possibly created bb and insns.  Returns the newly
 
6892
-   added bb or NULL, when a bb was not needed.  */
 
6893
+   data structures for possibly created bb and insns.  */
 
6894
 void
 
6895
 sel_redirect_edge_and_branch_force (edge e, basic_block to)
 
6896
 {
 
6897
@@ -5586,6 +5596,7 @@
 
6898
   basic_block jump_bb, src, orig_dest = e->dest;
 
6899
   int prev_max_uid;
 
6900
   rtx jump;
 
6901
+  int old_seqno = -1;
 
6902
 
 
6903
   /* This function is now used only for bookkeeping code creation, where
 
6904
      we'll never get the single pred of orig_dest block and thus will not
 
6905
@@ -5594,8 +5605,13 @@
 
6906
               && !single_pred_p (orig_dest));
 
6907
   src = e->src;
 
6908
   prev_max_uid = get_max_uid ();
 
6909
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
6910
+     when the conditional jump being redirected may become unconditional.  */
 
6911
+  if (any_condjump_p (BB_END (src))
 
6912
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
6913
+    old_seqno = INSN_SEQNO (BB_END (src));
 
6914
+
 
6915
   jump_bb = redirect_edge_and_branch_force (e, to);
 
6916
-
 
6917
   if (jump_bb != NULL)
 
6918
     sel_add_bb (jump_bb);
 
6919
 
 
6920
@@ -5607,7 +5623,8 @@
 
6921
 
 
6922
   jump = find_new_jump (src, jump_bb, prev_max_uid);
 
6923
   if (jump)
 
6924
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
6925
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
 
6926
+                      old_seqno);
 
6927
   set_immediate_dominator (CDI_DOMINATORS, to,
 
6928
                           recompute_dominator (CDI_DOMINATORS, to));
 
6929
   set_immediate_dominator (CDI_DOMINATORS, orig_dest,
 
6930
@@ -5626,6 +5643,7 @@
 
6931
   edge redirected;
 
6932
   bool recompute_toporder_p = false;
 
6933
   bool maybe_unreachable = single_pred_p (orig_dest);
 
6934
+  int old_seqno = -1;
 
6935
 
 
6936
   latch_edge_p = (pipelining_p
 
6937
                   && current_loop_nest
 
6938
@@ -5634,6 +5652,12 @@
 
6939
   src = e->src;
 
6940
   prev_max_uid = get_max_uid ();
 
6941
 
 
6942
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
6943
+     when the conditional jump being redirected may become unconditional.  */
 
6944
+  if (any_condjump_p (BB_END (src))
 
6945
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
6946
+    old_seqno = INSN_SEQNO (BB_END (src));
 
6947
+
 
6948
   redirected = redirect_edge_and_branch (e, to);
 
6949
 
 
6950
   gcc_assert (redirected && !last_added_blocks.exists ());
 
6951
@@ -5654,7 +5678,7 @@
 
6952
 
 
6953
   jump = find_new_jump (src, NULL, prev_max_uid);
 
6954
   if (jump)
 
6955
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
6956
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
 
6957
 
 
6958
   /* Only update dominator info when we don't have unreachable blocks.
 
6959
      Otherwise we'll update in maybe_tidy_empty_bb.  */
 
6960
Index: gcc/fortran/interface.c
 
6961
===================================================================
 
6962
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_8_3_release)
 
6963
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_8-branch)
 
6964
@@ -1923,7 +1923,7 @@
 
6965
   /* F2008, 12.5.2.5; IR F08/0073.  */
 
6966
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
 
6967
       && ((CLASS_DATA (formal)->attr.class_pointer
 
6968
-          && !formal->attr.intent == INTENT_IN)
 
6969
+          && formal->attr.intent != INTENT_IN)
 
6970
           || CLASS_DATA (formal)->attr.allocatable))
 
6971
     {
 
6972
       if (actual->ts.type != BT_CLASS)
 
6973
Index: gcc/fortran/trans-expr.c
 
6974
===================================================================
 
6975
--- a/src/gcc/fortran/trans-expr.c      (.../tags/gcc_4_8_3_release)
 
6976
+++ b/src/gcc/fortran/trans-expr.c      (.../branches/gcc-4_8-branch)
 
6977
@@ -7096,7 +7096,7 @@
 
6978
 
 
6979
   res_desc = gfc_evaluate_now (desc, &se->pre);
 
6980
   gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
 
6981
-  se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
 
6982
+  se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
 
6983
 
 
6984
   /* Free the lhs after the function call and copy the result data to
 
6985
      the lhs descriptor.  */
 
6986
Index: gcc/fortran/decl.c
 
6987
===================================================================
 
6988
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_8_3_release)
 
6989
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_8-branch)
 
6990
@@ -1996,6 +1996,13 @@
 
6991
       if (gfc_notify_std (GFC_STD_GNU, "Old-style "
 
6992
                          "initialization at %C") == FAILURE)
 
6993
        return MATCH_ERROR;
 
6994
+      else if (gfc_current_state () == COMP_DERIVED)
 
6995
+       {
 
6996
+         gfc_error ("Invalid old style initialization for derived type "
 
6997
+                    "component at %C");
 
6998
+         m = MATCH_ERROR;
 
6999
+         goto cleanup;
 
7000
+       }
 
7001
 
 
7002
       return match_old_style_init (name);
 
7003
     }
 
7004
Index: gcc/fortran/trans-openmp.c
 
7005
===================================================================
 
7006
--- a/src/gcc/fortran/trans-openmp.c    (.../tags/gcc_4_8_3_release)
 
7007
+++ b/src/gcc/fortran/trans-openmp.c    (.../branches/gcc-4_8-branch)
 
7008
@@ -115,6 +115,16 @@
 
7009
   if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
 
7010
     return OMP_CLAUSE_DEFAULT_SHARED;
 
7011
 
 
7012
+  /* These are either array or derived parameters, or vtables.
 
7013
+     In the former cases, the OpenMP standard doesn't consider them to be
 
7014
+     variables at all (they can't be redefined), but they can nevertheless appear
 
7015
+     in parallel/task regions and for default(none) purposes treat them as shared.
 
7016
+     For vtables likely the same handling is desirable.  */
 
7017
+  if (TREE_CODE (decl) == VAR_DECL
 
7018
+      && TREE_READONLY (decl)
 
7019
+      && TREE_STATIC (decl))
 
7020
+    return OMP_CLAUSE_DEFAULT_SHARED;
 
7021
+
 
7022
   return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
 
7023
 }
 
7024
 
 
7025
Index: gcc/fortran/ChangeLog
 
7026
===================================================================
 
7027
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
7028
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
 
7029
@@ -1,3 +1,63 @@
 
7030
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
7031
+
 
7032
+       PR fortran/59488
 
7033
+       * trans-openmp.c (gfc_omp_predetermined_sharing): Return
 
7034
+       OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
 
7035
+
 
7036
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
7037
+
 
7038
+       Backport from trunk
 
7039
+       PR fortran/62270
 
7040
+       * interface.c (compare_parameter): Fix condition.
 
7041
+
 
7042
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
7043
+
 
7044
+       Backport from trunk
 
7045
+       PR fortran/62214
 
7046
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
7047
+
 
7048
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
7049
+
 
7050
+       Backport from trunk
 
7051
+       PR fortran/61999
 
7052
+       * simplify.c (gfc_simplify_dot_product): Convert types of
 
7053
+       vectors before calculating the result.
 
7054
+
 
7055
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
7056
+
 
7057
+       Backport from trunk.
 
7058
+       PR fortran/61780
 
7059
+       * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
 
7060
+       that elements are skipped. This then correctly aligns 'reverse'
 
7061
+       with the scalarizer loops.
 
7062
+
 
7063
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
7064
+
 
7065
+       PR fortran/61459
 
7066
+       PR fortran/58883
 
7067
+       * trans-expr.c (fcncall_realloc_result): Use the natural type
 
7068
+       for the address expression of 'res_desc'.
 
7069
+
 
7070
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
7071
+           Fritz Reese  <Reese-Fritz@zai.com>
 
7072
+
 
7073
+       * decl.c (variable_decl): Reject old style initialization
 
7074
+       for derived type components.
 
7075
+
 
7076
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
7077
+
 
7078
+       Backport from trunk.
 
7079
+       PR fortran/45187
 
7080
+       * trans-decl.c (gfc_create_module_variable): Don't create
 
7081
+       Cray-pointee decls twice.
 
7082
+
 
7083
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
7084
+
 
7085
+       Backport from mainline
 
7086
+       PR libfortran/61310
 
7087
+       * intrinsics.texi (CTIME): Remove mention of locale-dependent
 
7088
+       behavior.
 
7089
+
 
7090
 2014-05-22  Release Manager
 
7091
 
 
7092
        * GCC 4.8.3 released.
 
7093
Index: gcc/fortran/frontend-passes.c
 
7094
===================================================================
 
7095
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
 
7096
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
 
7097
@@ -874,6 +874,10 @@
 
7098
            return true;
 
7099
          break;
 
7100
 
 
7101
+       case INTRINSIC_CONCAT:
 
7102
+         /* Do not do string concatenations.  */
 
7103
+         break;
 
7104
+
 
7105
        default:
 
7106
          /* Binary operators.  */
 
7107
          if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
 
7108
Index: gcc/fortran/trans-decl.c
 
7109
===================================================================
 
7110
--- a/src/gcc/fortran/trans-decl.c      (.../tags/gcc_4_8_3_release)
 
7111
+++ b/src/gcc/fortran/trans-decl.c      (.../branches/gcc-4_8-branch)
 
7112
@@ -4084,8 +4084,8 @@
 
7113
     }
 
7114
 
 
7115
   /* Don't generate variables from other modules. Variables from
 
7116
-     COMMONs will already have been generated.  */
 
7117
-  if (sym->attr.use_assoc || sym->attr.in_common)
 
7118
+     COMMONs and Cray pointees will already have been generated.  */
 
7119
+  if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
 
7120
     return;
 
7121
 
 
7122
   /* Equivalenced variables arrive here after creation.  */
 
7123
Index: gcc/fortran/dependency.c
 
7124
===================================================================
 
7125
--- a/src/gcc/fortran/dependency.c      (.../tags/gcc_4_8_3_release)
 
7126
+++ b/src/gcc/fortran/dependency.c      (.../branches/gcc-4_8-branch)
 
7127
@@ -1779,6 +1779,7 @@
 
7128
 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
 
7129
 {
 
7130
   int n;
 
7131
+  int m;
 
7132
   gfc_dependency fin_dep;
 
7133
   gfc_dependency this_dep;
 
7134
 
 
7135
@@ -1828,6 +1829,8 @@
 
7136
              break;
 
7137
            }
 
7138
 
 
7139
+         /* Index for the reverse array.  */
 
7140
+         m = -1;
 
7141
          for (n=0; n < lref->u.ar.dimen; n++)
 
7142
            {
 
7143
              /* Assume dependency when either of array reference is vector
 
7144
@@ -1862,31 +1865,37 @@
 
7145
                 The ability to reverse or not is set by previous conditions
 
7146
                 in this dimension.  If reversal is not activated, the
 
7147
                 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP.  */
 
7148
+
 
7149
+             /* Get the indexing right for the scalarizing loop. If this
 
7150
+                is an element, there is no corresponding loop.  */
 
7151
+             if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
 
7152
+               m++;
 
7153
+
 
7154
              if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
 
7155
                    && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
 
7156
                {
 
7157
                  /* Set reverse if backward dependence and not inhibited.  */
 
7158
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
7159
-                   reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
 
7160
-                                GFC_REVERSE_SET : reverse[n];
 
7161
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
7162
+                   reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
 
7163
+                                GFC_REVERSE_SET : reverse[m];
 
7164
 
 
7165
                  /* Set forward if forward dependence and not inhibited.  */
 
7166
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
7167
-                   reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
 
7168
-                                GFC_FORWARD_SET : reverse[n];
 
7169
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
7170
+                   reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
 
7171
+                                GFC_FORWARD_SET : reverse[m];
 
7172
 
 
7173
                  /* Flag up overlap if dependence not compatible with
 
7174
                     the overall state of the expression.  */
 
7175
-                 if (reverse && reverse[n] == GFC_REVERSE_SET
 
7176
+                 if (reverse && reverse[m] == GFC_REVERSE_SET
 
7177
                        && this_dep == GFC_DEP_FORWARD)
 
7178
                    {
 
7179
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
7180
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
7181
                      this_dep = GFC_DEP_OVERLAP;
 
7182
                    }
 
7183
-                 else if (reverse && reverse[n] == GFC_FORWARD_SET
 
7184
+                 else if (reverse && reverse[m] == GFC_FORWARD_SET
 
7185
                        && this_dep == GFC_DEP_BACKWARD)
 
7186
                    {
 
7187
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
7188
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
7189
                      this_dep = GFC_DEP_OVERLAP;
 
7190
                    }
 
7191
 
 
7192
@@ -1893,7 +1902,7 @@
 
7193
                  /* If no intention of reversing or reversing is explicitly
 
7194
                     inhibited, convert backward dependence to overlap.  */
 
7195
                  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
 
7196
-                     || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
 
7197
+                     || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
 
7198
                    this_dep = GFC_DEP_OVERLAP;
 
7199
                }
 
7200
 
 
7201
Index: gcc/fortran/simplify.c
 
7202
===================================================================
 
7203
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_8_3_release)
 
7204
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_8-branch)
 
7205
@@ -1877,6 +1877,9 @@
 
7206
 gfc_expr*
 
7207
 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
 
7208
 {
 
7209
+
 
7210
+  gfc_expr temp;
 
7211
+
 
7212
   if (!is_constant_array_expr (vector_a)
 
7213
       || !is_constant_array_expr (vector_b))
 
7214
     return NULL;
 
7215
@@ -1883,8 +1886,14 @@
 
7216
 
 
7217
   gcc_assert (vector_a->rank == 1);
 
7218
   gcc_assert (vector_b->rank == 1);
 
7219
-  gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
 
7220
 
 
7221
+  temp.expr_type = EXPR_OP;
 
7222
+  gfc_clear_ts (&temp.ts);
 
7223
+  temp.value.op.op = INTRINSIC_NONE;
 
7224
+  temp.value.op.op1 = vector_a;
 
7225
+  temp.value.op.op2 = vector_b;
 
7226
+  gfc_type_convert_binary (&temp, 1);
 
7227
+
 
7228
   return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
 
7229
 }
 
7230
 
 
7231
Index: gcc/function.c
 
7232
===================================================================
 
7233
--- a/src/gcc/function.c        (.../tags/gcc_4_8_3_release)
 
7234
+++ b/src/gcc/function.c        (.../branches/gcc-4_8-branch)
 
7235
@@ -1354,9 +1354,13 @@
 
7236
 #define STACK_POINTER_OFFSET   0
 
7237
 #endif
 
7238
 
 
7239
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
 
7240
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
 
7241
+#endif
 
7242
+
 
7243
 /* If not defined, pick an appropriate default for the offset of dynamically
 
7244
    allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
 
7245
-   REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
7246
+   INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
7247
 
 
7248
 #ifndef STACK_DYNAMIC_OFFSET
 
7249
 
 
7250
@@ -1368,12 +1372,12 @@
 
7251
    `crtl->outgoing_args_size'.  Nevertheless, we must allow
 
7252
    for it when allocating stack dynamic objects.  */
 
7253
 
 
7254
-#if defined(REG_PARM_STACK_SPACE)
 
7255
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
7256
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
7257
 ((ACCUMULATE_OUTGOING_ARGS                                                   \
 
7258
   ? (crtl->outgoing_args_size                                \
 
7259
      + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
 
7260
-                                              : REG_PARM_STACK_SPACE (FNDECL))) \
 
7261
+                                              : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
 
7262
   : 0) + (STACK_POINTER_OFFSET))
 
7263
 #else
 
7264
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
7265
@@ -2211,8 +2215,9 @@
 
7266
 #endif
 
7267
   all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
 
7268
 
 
7269
-#ifdef REG_PARM_STACK_SPACE
 
7270
-  all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
 
7271
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
7272
+  all->reg_parm_stack_space
 
7273
+    = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
 
7274
 #endif
 
7275
 }
 
7276
 
 
7277
@@ -4518,6 +4523,7 @@
 
7278
       /* ??? This could be set on a per-function basis by the front-end
 
7279
          but is this worth the hassle?  */
 
7280
       cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
 
7281
+      cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
 
7282
     }
 
7283
 }
 
7284
 
 
7285
Index: gcc/tree-vectorizer.h
 
7286
===================================================================
 
7287
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
 
7288
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
 
7289
@@ -324,9 +324,9 @@
 
7290
 #define LOOP_VINFO_OPERANDS_SWAPPED(L)     (L)->operands_swapped
 
7291
 
 
7292
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
 
7293
-(L)->may_misalign_stmts.length () > 0
 
7294
+((L)->may_misalign_stmts.length () > 0)
 
7295
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)     \
 
7296
-(L)->may_alias_ddrs.length () > 0
 
7297
+((L)->may_alias_ddrs.length () > 0)
 
7298
 
 
7299
 #define NITERS_KNOWN_P(n)                     \
 
7300
 (host_integerp ((n),0)                        \
 
7301
@@ -931,7 +931,8 @@
 
7302
 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
 
7303
 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
 
7304
                                      tree *, gimple_stmt_iterator *,
 
7305
-                                     gimple *, bool, bool *);
 
7306
+                                     gimple *, bool, bool *,
 
7307
+                                     tree = NULL_TREE);
 
7308
 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
 
7309
 extern tree vect_create_destination_var (tree, tree);
 
7310
 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
 
7311
@@ -949,7 +950,8 @@
 
7312
 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
 
7313
 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
 
7314
 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
 
7315
-                                                  tree, struct loop *);
 
7316
+                                                 tree, struct loop *,
 
7317
+                                                 tree = NULL_TREE);
 
7318
 
 
7319
 /* In tree-vect-loop.c.  */
 
7320
 /* FORNOW: Used in tree-parloops.c.  */
 
7321
Index: gcc/tree-vect-loop.c
 
7322
===================================================================
 
7323
--- a/src/gcc/tree-vect-loop.c  (.../tags/gcc_4_8_3_release)
 
7324
+++ b/src/gcc/tree-vect-loop.c  (.../branches/gcc-4_8-branch)
 
7325
@@ -2205,7 +2205,8 @@
 
7326
         }
 
7327
 
 
7328
       def1 = SSA_NAME_DEF_STMT (op1);
 
7329
-      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
7330
+      if (gimple_bb (def1)
 
7331
+         && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
7332
           && loop->inner
 
7333
           && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
 
7334
           && is_gimple_assign (def1))
 
7335
Index: gcc/tree-vect-data-refs.c
 
7336
===================================================================
 
7337
--- a/src/gcc/tree-vect-data-refs.c     (.../tags/gcc_4_8_3_release)
 
7338
+++ b/src/gcc/tree-vect-data-refs.c     (.../branches/gcc-4_8-branch)
 
7339
@@ -3553,6 +3553,9 @@
 
7340
            is as follows:
 
7341
            if LOOP=i_loop:     &in             (relative to i_loop)
 
7342
            if LOOP=j_loop:     &in+i*2B        (relative to j_loop)
 
7343
+   BYTE_OFFSET: Optional, defaulted to NULL.  If supplied, it is added to the
 
7344
+           initial address.  Unlike OFFSET, which is number of elements to
 
7345
+           be added, BYTE_OFFSET is measured in bytes.
 
7346
 
 
7347
    Output:
 
7348
    1. Return an SSA_NAME whose value is the address of the memory location of
 
7349
@@ -3566,7 +3569,8 @@
 
7350
 vect_create_addr_base_for_vector_ref (gimple stmt,
 
7351
                                      gimple_seq *new_stmt_list,
 
7352
                                      tree offset,
 
7353
-                                     struct loop *loop)
 
7354
+                                     struct loop *loop,
 
7355
+                                     tree byte_offset)
 
7356
 {
 
7357
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
7358
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
 
7359
@@ -3628,7 +3632,17 @@
 
7360
       base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
7361
       gimple_seq_add_seq (new_stmt_list, seq);
 
7362
     }
 
7363
+  if (byte_offset)
 
7364
+    {
 
7365
+      tree tmp = create_tmp_var (sizetype, "offset");
 
7366
 
 
7367
+      byte_offset = fold_convert (sizetype, byte_offset);
 
7368
+      base_offset = fold_build2 (PLUS_EXPR, sizetype,
 
7369
+                                base_offset, byte_offset);
 
7370
+      base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
7371
+      gimple_seq_add_seq (new_stmt_list, seq);
 
7372
+    }
 
7373
+
 
7374
   /* base + base_offset */
 
7375
   if (loop_vinfo)
 
7376
     addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
 
7377
@@ -3692,6 +3706,10 @@
 
7378
    5. BSI: location where the new stmts are to be placed if there is no loop
 
7379
    6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
 
7380
         pointing to the initial address.
 
7381
+   7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
 
7382
+       to the initial address accessed by the data-ref in STMT.  This is
 
7383
+       similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
 
7384
+       in bytes.
 
7385
 
 
7386
    Output:
 
7387
    1. Declare a new ptr to vector_type, and have it point to the base of the
 
7388
@@ -3705,6 +3723,8 @@
 
7389
          initial_address = &a[init];
 
7390
       if OFFSET is supplied:
 
7391
          initial_address = &a[init + OFFSET];
 
7392
+      if BYTE_OFFSET is supplied:
 
7393
+        initial_address = &a[init] + BYTE_OFFSET;
 
7394
 
 
7395
       Return the initial_address in INITIAL_ADDRESS.
 
7396
 
 
7397
@@ -3722,7 +3742,7 @@
 
7398
 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
 
7399
                          tree offset, tree *initial_address,
 
7400
                          gimple_stmt_iterator *gsi, gimple *ptr_incr,
 
7401
-                         bool only_init, bool *inv_p)
 
7402
+                         bool only_init, bool *inv_p, tree byte_offset)
 
7403
 {
 
7404
   const char *base_name;
 
7405
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
7406
@@ -3881,10 +3901,10 @@
 
7407
   /* (2) Calculate the initial address of the aggregate-pointer, and set
 
7408
      the aggregate-pointer to point to it before the loop.  */
 
7409
 
 
7410
-  /* Create: (&(base[init_val+offset]) in the loop preheader.  */
 
7411
+  /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader.  */
 
7412
 
 
7413
   new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
 
7414
-                                                   offset, loop);
 
7415
+                                                  offset, loop, byte_offset);
 
7416
   if (new_stmt_list)
 
7417
     {
 
7418
       if (pe)
 
7419
Index: gcc/emit-rtl.c
 
7420
===================================================================
 
7421
--- a/src/gcc/emit-rtl.c        (.../tags/gcc_4_8_3_release)
 
7422
+++ b/src/gcc/emit-rtl.c        (.../branches/gcc-4_8-branch)
 
7423
@@ -263,7 +263,7 @@
 
7424
 
 
7425
 /* Return true if the given memory attributes are equal.  */
 
7426
 
 
7427
-static bool
 
7428
+bool
 
7429
 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
 
7430
 {
 
7431
   return (p->alias == q->alias
 
7432
Index: gcc/gimple-fold.c
 
7433
===================================================================
 
7434
--- a/src/gcc/gimple-fold.c     (.../tags/gcc_4_8_3_release)
 
7435
+++ b/src/gcc/gimple-fold.c     (.../branches/gcc-4_8-branch)
 
7436
@@ -2955,8 +2955,8 @@
 
7437
      result.  */
 
7438
   if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
 
7439
       /* VIEW_CONVERT_EXPR is defined only for matching sizes.  */
 
7440
-      && operand_equal_p (TYPE_SIZE (type),
 
7441
-                         TYPE_SIZE (TREE_TYPE (ctor)), 0))
 
7442
+      && !compare_tree_int (TYPE_SIZE (type), size)
 
7443
+      && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
 
7444
     {
 
7445
       ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
 
7446
       ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
 
7447
Index: gcc/emit-rtl.h
 
7448
===================================================================
 
7449
--- a/src/gcc/emit-rtl.h        (.../tags/gcc_4_8_3_release)
 
7450
+++ b/src/gcc/emit-rtl.h        (.../branches/gcc-4_8-branch)
 
7451
@@ -20,6 +20,9 @@
 
7452
 #ifndef GCC_EMIT_RTL_H
 
7453
 #define GCC_EMIT_RTL_H
 
7454
 
 
7455
+/* Return whether two MEM_ATTRs are equal.  */
 
7456
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
 
7457
+
 
7458
 /* Set the alias set of MEM to SET.  */
 
7459
 extern void set_mem_alias_set (rtx, alias_set_type);
 
7460
 
 
7461
Index: gcc/tree-cfgcleanup.c
 
7462
===================================================================
 
7463
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
 
7464
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
 
7465
@@ -498,7 +498,20 @@
 
7466
 
 
7467
   /* First split basic block if stmt is not last.  */
 
7468
   if (stmt != gsi_stmt (gsi_last_bb (bb)))
 
7469
-    split_block (bb, stmt);
 
7470
+    {
 
7471
+      if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
 
7472
+       {
 
7473
+         /* Don't split if there are only debug stmts
 
7474
+            after stmt, that can result in -fcompare-debug
 
7475
+            failures.  Remove the debug stmts instead,
 
7476
+            they should be all unreachable anyway.  */
 
7477
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
 
7478
+         for (gsi_next (&gsi); !gsi_end_p (gsi); )
 
7479
+           gsi_remove (&gsi, true);
 
7480
+       }
 
7481
+      else
 
7482
+       split_block (bb, stmt);
 
7483
+    }
 
7484
 
 
7485
   changed |= remove_fallthru_edge (bb->succs);
 
7486
 
 
7487
Index: gcc/tree-sra.c
 
7488
===================================================================
 
7489
--- a/src/gcc/tree-sra.c        (.../tags/gcc_4_8_3_release)
 
7490
+++ b/src/gcc/tree-sra.c        (.../branches/gcc-4_8-branch)
 
7491
@@ -1030,6 +1030,11 @@
 
7492
                               "component.");
 
7493
       return NULL;
 
7494
     }
 
7495
+  if (TREE_THIS_VOLATILE (expr))
 
7496
+    {
 
7497
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
 
7498
+      return NULL;
 
7499
+    }
 
7500
 
 
7501
   switch (TREE_CODE (expr))
 
7502
     {
 
7503
Index: gcc/common.opt
 
7504
===================================================================
 
7505
--- a/src/gcc/common.opt        (.../tags/gcc_4_8_3_release)
 
7506
+++ b/src/gcc/common.opt        (.../branches/gcc-4_8-branch)
 
7507
@@ -1226,6 +1226,10 @@
 
7508
 Common Report Var(flag_tm)
 
7509
 Enable support for GNU transactional memory
 
7510
 
 
7511
+fgnu-unique
 
7512
+Common Report Var(flag_gnu_unique) Init(1)
 
7513
+Use STB_GNU_UNIQUE if supported by the assembler
 
7514
+
 
7515
 floop-flatten
 
7516
 Common Ignore
 
7517
 Does nothing. Preserved for backward compatibility.
 
7518
Index: gcc/tree-vect-patterns.c
 
7519
===================================================================
 
7520
--- a/src/gcc/tree-vect-patterns.c      (.../tags/gcc_4_8_3_release)
 
7521
+++ b/src/gcc/tree-vect-patterns.c      (.../branches/gcc-4_8-branch)
 
7522
@@ -395,7 +395,7 @@
 
7523
           || !promotion)
 
7524
         return NULL;
 
7525
       oprnd00 = gimple_assign_rhs1 (def_stmt);
 
7526
-      if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
 
7527
+      if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
 
7528
                                 &promotion)
 
7529
           || !promotion)
 
7530
         return NULL;
 
7531
Index: gcc/sched-deps.c
 
7532
===================================================================
 
7533
--- a/src/gcc/sched-deps.c      (.../tags/gcc_4_8_3_release)
 
7534
+++ b/src/gcc/sched-deps.c      (.../branches/gcc-4_8-branch)
 
7535
@@ -2744,7 +2744,8 @@
 
7536
           Consider for instance a volatile asm that changes the fpu rounding
 
7537
           mode.  An insn should not be moved across this even if it only uses
 
7538
           pseudo-regs because it might give an incorrectly rounded result.  */
 
7539
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
7540
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
7541
+           && !DEBUG_INSN_P (insn))
 
7542
          reg_pending_barrier = TRUE_BARRIER;
 
7543
 
 
7544
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
 
7545
Index: gcc/tree-vect-stmts.c
 
7546
===================================================================
 
7547
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
 
7548
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
 
7549
@@ -4319,6 +4319,7 @@
 
7550
   int i, j, group_size;
 
7551
   tree msq = NULL_TREE, lsq;
 
7552
   tree offset = NULL_TREE;
 
7553
+  tree byte_offset = NULL_TREE;
 
7554
   tree realignment_token = NULL_TREE;
 
7555
   gimple phi = NULL;
 
7556
   vec<tree> dr_chain = vNULL;
 
7557
@@ -4934,7 +4935,8 @@
 
7558
       if (alignment_support_scheme == dr_explicit_realign_optimized)
 
7559
        {
 
7560
          phi = SSA_NAME_DEF_STMT (msq);
 
7561
-         offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
 
7562
+         byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
 
7563
+                                   size_one_node);
 
7564
        }
 
7565
     }
 
7566
   else
 
7567
@@ -4955,7 +4957,8 @@
 
7568
       if (j == 0)
 
7569
         dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
 
7570
                                                offset, &dummy, gsi,
 
7571
-                                               &ptr_incr, false, &inv_p);
 
7572
+                                               &ptr_incr, false, &inv_p,
 
7573
+                                               byte_offset);
 
7574
       else
 
7575
         dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
 
7576
                                       TYPE_SIZE_UNIT (aggr_type));
 
7577
Index: gcc/config/alpha/elf.h
 
7578
===================================================================
 
7579
--- a/src/gcc/config/alpha/elf.h        (.../tags/gcc_4_8_3_release)
 
7580
+++ b/src/gcc/config/alpha/elf.h        (.../branches/gcc-4_8-branch)
 
7581
@@ -126,6 +126,10 @@
 
7582
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
 
7583
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
7584
 
 
7585
+/* This variable should be set to 'true' if the target ABI requires
 
7586
+   unwinding tables even when exceptions are not used.  */
 
7587
+#define TARGET_UNWIND_TABLES_DEFAULT true
 
7588
+
 
7589
 /* Select a format to encode pointers in exception handling data.  CODE
 
7590
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
 
7591
    true if the symbol may be affected by dynamic relocations.
 
7592
Index: gcc/config/alpha/alpha.c
 
7593
===================================================================
 
7594
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_8_3_release)
 
7595
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_8-branch)
 
7596
@@ -8658,6 +8658,11 @@
 
7597
                        }
 
7598
                      break;
 
7599
 
 
7600
+                   case BARRIER:
 
7601
+                     /* __builtin_unreachable can expand to no code at all,
 
7602
+                        leaving (barrier) RTXes in the instruction stream.  */
 
7603
+                     goto close_shadow_notrapb;
 
7604
+
 
7605
                    case JUMP_INSN:
 
7606
                    case CALL_INSN:
 
7607
                    case CODE_LABEL:
 
7608
@@ -8673,6 +8678,7 @@
 
7609
                  n = emit_insn_before (gen_trapb (), i);
 
7610
                  PUT_MODE (n, TImode);
 
7611
                  PUT_MODE (i, TImode);
 
7612
+               close_shadow_notrapb:
 
7613
                  trap_pending = 0;
 
7614
                  shadow.used.i = 0;
 
7615
                  shadow.used.fp = 0;
 
7616
Index: gcc/config/elfos.h
 
7617
===================================================================
 
7618
--- a/src/gcc/config/elfos.h    (.../tags/gcc_4_8_3_release)
 
7619
+++ b/src/gcc/config/elfos.h    (.../branches/gcc-4_8-branch)
 
7620
@@ -287,7 +287,7 @@
 
7621
 /* Write the extra assembler code needed to declare an object properly.  */
 
7622
 
 
7623
 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
 
7624
-#define USE_GNU_UNIQUE_OBJECT 1
 
7625
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
 
7626
 #else
 
7627
 #define USE_GNU_UNIQUE_OBJECT 0
 
7628
 #endif
 
7629
Index: gcc/config/sparc/sync.md
 
7630
===================================================================
 
7631
--- a/src/gcc/config/sparc/sync.md      (.../tags/gcc_4_8_3_release)
 
7632
+++ b/src/gcc/config/sparc/sync.md      (.../branches/gcc-4_8-branch)
 
7633
@@ -64,11 +64,19 @@
 
7634
   "stbar"
 
7635
   [(set_attr "type" "multi")])
 
7636
 
 
7637
+;; For LEON3, STB has the effect of membar #StoreLoad.
 
7638
+(define_insn "*membar_storeload_leon3"
 
7639
+  [(set (match_operand:BLK 0 "" "")
 
7640
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
7641
+  "TARGET_LEON3"
 
7642
+  "stb\t%%g0, [%%sp-1]"
 
7643
+  [(set_attr "type" "store")])
 
7644
+
 
7645
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
 
7646
 (define_insn "*membar_storeload"
 
7647
   [(set (match_operand:BLK 0 "" "")
 
7648
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
7649
-  "TARGET_V8"
 
7650
+  "TARGET_V8 && !TARGET_LEON3"
 
7651
   "ldstub\t[%%sp-1], %%g0"
 
7652
   [(set_attr "type" "multi")])
 
7653
 
 
7654
Index: gcc/config/i386/i386.md
 
7655
===================================================================
 
7656
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_8_3_release)
 
7657
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_8-branch)
 
7658
@@ -5339,66 +5339,37 @@
 
7659
 
 
7660
 ;; Avoid store forwarding (partial memory) stall penalty by extending
 
7661
 ;; SImode value to DImode through XMM register instead of pushing two
 
7662
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
 
7663
-;; targets benefit from this optimization. Also note that fild
 
7664
-;; loads from memory only.
 
7665
+;; SImode values to stack. Also note that fild loads from memory only.
 
7666
 
 
7667
-(define_insn "*floatunssi<mode>2_1"
 
7668
-  [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
 
7669
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
 
7670
+  [(set (match_operand:X87MODEF 0 "register_operand" "=f")
 
7671
        (unsigned_float:X87MODEF
 
7672
-         (match_operand:SI 1 "nonimmediate_operand" "x,m")))
 
7673
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
 
7674
-   (clobber (match_scratch:SI 3 "=X,x"))]
 
7675
+         (match_operand:SI 1 "nonimmediate_operand" "rm")))
 
7676
+   (clobber (match_scratch:DI 3 "=x"))
 
7677
+   (clobber (match_operand:DI 2 "memory_operand" "=m"))]
 
7678
   "!TARGET_64BIT
 
7679
    && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
7680
-   && TARGET_SSE"
 
7681
+   && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
 
7682
   "#"
 
7683
+  "&& reload_completed"
 
7684
+  [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
 
7685
+   (set (match_dup 2) (match_dup 3))
 
7686
+   (set (match_dup 0)
 
7687
+       (float:X87MODEF (match_dup 2)))]
 
7688
+  ""
 
7689
   [(set_attr "type" "multi")
 
7690
    (set_attr "mode" "<MODE>")])
 
7691
 
 
7692
-(define_split
 
7693
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
7694
-       (unsigned_float:X87MODEF
 
7695
-         (match_operand:SI 1 "register_operand")))
 
7696
-   (clobber (match_operand:DI 2 "memory_operand"))
 
7697
-   (clobber (match_scratch:SI 3))]
 
7698
-  "!TARGET_64BIT
 
7699
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
7700
-   && TARGET_SSE
 
7701
-   && reload_completed"
 
7702
-  [(set (match_dup 2) (match_dup 1))
 
7703
-   (set (match_dup 0)
 
7704
-       (float:X87MODEF (match_dup 2)))]
 
7705
-  "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
 
7706
-
 
7707
-(define_split
 
7708
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
7709
-       (unsigned_float:X87MODEF
 
7710
-         (match_operand:SI 1 "memory_operand")))
 
7711
-   (clobber (match_operand:DI 2 "memory_operand"))
 
7712
-   (clobber (match_scratch:SI 3))]
 
7713
-  "!TARGET_64BIT
 
7714
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
7715
-   && TARGET_SSE
 
7716
-   && reload_completed"
 
7717
-  [(set (match_dup 2) (match_dup 3))
 
7718
-   (set (match_dup 0)
 
7719
-       (float:X87MODEF (match_dup 2)))]
 
7720
-{
 
7721
-  emit_move_insn (operands[3], operands[1]);
 
7722
-  operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
 
7723
-})
 
7724
-
 
7725
 (define_expand "floatunssi<mode>2"
 
7726
   [(parallel
 
7727
      [(set (match_operand:X87MODEF 0 "register_operand")
 
7728
           (unsigned_float:X87MODEF
 
7729
             (match_operand:SI 1 "nonimmediate_operand")))
 
7730
-      (clobber (match_dup 2))
 
7731
-      (clobber (match_scratch:SI 3))])]
 
7732
+      (clobber (match_scratch:DI 3))
 
7733
+      (clobber (match_dup 2))])]
 
7734
   "!TARGET_64BIT
 
7735
    && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
7736
-       && TARGET_SSE)
 
7737
+       && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
 
7738
        || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
 
7739
 {
 
7740
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 
7741
@@ -13545,7 +13516,8 @@
 
7742
    (set (reg:CCFP FPSR_REG)
 
7743
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
7744
                     UNSPEC_C2_FLAG))]
 
7745
-  "TARGET_USE_FANCY_MATH_387"
 
7746
+  "TARGET_USE_FANCY_MATH_387
 
7747
+   && flag_finite_math_only"
 
7748
   "fprem"
 
7749
   [(set_attr "type" "fpspc")
 
7750
    (set_attr "mode" "XF")])
 
7751
@@ -13554,7 +13526,8 @@
 
7752
   [(use (match_operand:XF 0 "register_operand"))
 
7753
    (use (match_operand:XF 1 "general_operand"))
 
7754
    (use (match_operand:XF 2 "general_operand"))]
 
7755
-  "TARGET_USE_FANCY_MATH_387"
 
7756
+  "TARGET_USE_FANCY_MATH_387
 
7757
+   && flag_finite_math_only"
 
7758
 {
 
7759
   rtx label = gen_label_rtx ();
 
7760
 
 
7761
@@ -13577,7 +13550,8 @@
 
7762
   [(use (match_operand:MODEF 0 "register_operand"))
 
7763
    (use (match_operand:MODEF 1 "general_operand"))
 
7764
    (use (match_operand:MODEF 2 "general_operand"))]
 
7765
-  "TARGET_USE_FANCY_MATH_387"
 
7766
+  "TARGET_USE_FANCY_MATH_387
 
7767
+   && flag_finite_math_only"
 
7768
 {
 
7769
   rtx (*gen_truncxf) (rtx, rtx);
 
7770
 
 
7771
@@ -13616,7 +13590,8 @@
 
7772
    (set (reg:CCFP FPSR_REG)
 
7773
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
7774
                     UNSPEC_C2_FLAG))]
 
7775
-  "TARGET_USE_FANCY_MATH_387"
 
7776
+  "TARGET_USE_FANCY_MATH_387
 
7777
+   && flag_finite_math_only"
 
7778
   "fprem1"
 
7779
   [(set_attr "type" "fpspc")
 
7780
    (set_attr "mode" "XF")])
 
7781
@@ -13625,7 +13600,8 @@
 
7782
   [(use (match_operand:XF 0 "register_operand"))
 
7783
    (use (match_operand:XF 1 "general_operand"))
 
7784
    (use (match_operand:XF 2 "general_operand"))]
 
7785
-  "TARGET_USE_FANCY_MATH_387"
 
7786
+  "TARGET_USE_FANCY_MATH_387
 
7787
+   && flag_finite_math_only"
 
7788
 {
 
7789
   rtx label = gen_label_rtx ();
 
7790
 
 
7791
@@ -13648,7 +13624,8 @@
 
7792
   [(use (match_operand:MODEF 0 "register_operand"))
 
7793
    (use (match_operand:MODEF 1 "general_operand"))
 
7794
    (use (match_operand:MODEF 2 "general_operand"))]
 
7795
-  "TARGET_USE_FANCY_MATH_387"
 
7796
+  "TARGET_USE_FANCY_MATH_387
 
7797
+   && flag_finite_math_only"
 
7798
 {
 
7799
   rtx (*gen_truncxf) (rtx, rtx);
 
7800
 
 
7801
Index: gcc/config/i386/driver-i386.c
 
7802
===================================================================
 
7803
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
 
7804
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
 
7805
@@ -713,6 +713,11 @@
 
7806
                    /* Assume Core 2.  */
 
7807
                    cpu = "core2";
 
7808
                }
 
7809
+             else if (has_longmode)
 
7810
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
 
7811
+                  -march=native would be unusable for 64-bit compilations,
 
7812
+                  as all the CPUs below are 32-bit only.  */
 
7813
+               cpu = "x86-64";
 
7814
              else if (has_sse3)
 
7815
                /* It is Core Duo.  */
 
7816
                cpu = "pentium-m";
 
7817
Index: gcc/config/i386/i386.c
 
7818
===================================================================
 
7819
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_8_3_release)
 
7820
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_8-branch)
 
7821
@@ -20505,7 +20505,7 @@
 
7822
          t1 = gen_reg_rtx (V32QImode);
 
7823
          t2 = gen_reg_rtx (V32QImode);
 
7824
          t3 = gen_reg_rtx (V32QImode);
 
7825
-         vt2 = GEN_INT (128);
 
7826
+         vt2 = GEN_INT (-128);
 
7827
          for (i = 0; i < 32; i++)
 
7828
            vec[i] = vt2;
 
7829
          vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
 
7830
@@ -24640,13 +24640,17 @@
 
7831
              {
 
7832
                edge e;
 
7833
                edge_iterator ei;
 
7834
-               /* Assume that region is SCC, i.e. all immediate predecessors
 
7835
-                  of non-head block are in the same region.  */
 
7836
+
 
7837
+               /* Regions are SCCs with the exception of selective
 
7838
+                  scheduling with pipelining of outer blocks enabled.
 
7839
+                  So also check that immediate predecessors of a non-head
 
7840
+                  block are in the same region.  */
 
7841
                FOR_EACH_EDGE (e, ei, bb->preds)
 
7842
                  {
 
7843
                    /* Avoid creating of loop-carried dependencies through
 
7844
-                      using topological odering in region.  */
 
7845
-                   if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
7846
+                      using topological ordering in the region.  */
 
7847
+                   if (rgn == CONTAINING_RGN (e->src->index)
 
7848
+                       && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
7849
                      add_dependee_for_func_arg (first_arg, e->src); 
 
7850
                  }
 
7851
              }
 
7852
@@ -38807,8 +38811,8 @@
 
7853
              op0 = gen_lowpart (V4DImode, d->op0);
 
7854
              op1 = gen_lowpart (V4DImode, d->op1);
 
7855
              rperm[0]
 
7856
-               = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
 
7857
-                          || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
 
7858
+               = GEN_INT ((d->perm[0] / (nelt / 2))
 
7859
+                          | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
 
7860
              emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
 
7861
              return true;
 
7862
            }
 
7863
Index: gcc/config/sh/sh.c
 
7864
===================================================================
 
7865
--- a/src/gcc/config/sh/sh.c    (.../tags/gcc_4_8_3_release)
 
7866
+++ b/src/gcc/config/sh/sh.c    (.../branches/gcc-4_8-branch)
 
7867
@@ -808,6 +808,12 @@
 
7868
        targetm.asm_out.aligned_op.di = NULL;
 
7869
        targetm.asm_out.unaligned_op.di = NULL;
 
7870
     }
 
7871
+
 
7872
+  /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
 
7873
+     Disable it for everything else.  */
 
7874
+  if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
 
7875
+    TARGET_USERMODE = false;
 
7876
+
 
7877
   if (TARGET_SH1)
 
7878
     {
 
7879
       if (! strcmp (sh_div_str, "call-div1"))
 
7880
Index: gcc/config/sh/sync.md
 
7881
===================================================================
 
7882
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
 
7883
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
 
7884
@@ -466,6 +466,7 @@
 
7885
    (set (mem:SI (match_dup 1))
 
7886
        (unspec:SI
 
7887
          [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
 
7888
+   (set (reg:SI T_REG) (const_int 1))
 
7889
    (clobber (reg:SI R0_REG))]
 
7890
   "TARGET_ATOMIC_HARD_LLCS
 
7891
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
7892
@@ -484,6 +485,7 @@
 
7893
    (set (mem:QIHI (match_dup 1))
 
7894
        (unspec:QIHI
 
7895
          [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
 
7896
+   (set (reg:SI T_REG) (const_int 1))
 
7897
    (clobber (reg:SI R0_REG))
 
7898
    (clobber (match_scratch:SI 3 "=&r"))
 
7899
    (clobber (match_scratch:SI 4 "=1"))]
 
7900
@@ -617,6 +619,7 @@
 
7901
          [(FETCHOP:SI (mem:SI (match_dup 1))
 
7902
             (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
7903
          UNSPEC_ATOMIC))
 
7904
+   (set (reg:SI T_REG) (const_int 1))
 
7905
    (clobber (reg:SI R0_REG))]
 
7906
   "TARGET_ATOMIC_HARD_LLCS
 
7907
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
7908
@@ -637,6 +640,7 @@
 
7909
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
 
7910
             (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
7911
          UNSPEC_ATOMIC))
 
7912
+   (set (reg:SI T_REG) (const_int 1))
 
7913
    (clobber (reg:SI R0_REG))
 
7914
    (clobber (match_scratch:SI 3 "=&r"))
 
7915
    (clobber (match_scratch:SI 4 "=1"))]
 
7916
@@ -784,6 +788,7 @@
 
7917
          [(not:SI (and:SI (mem:SI (match_dup 1))
 
7918
                   (match_operand:SI 2 "logical_operand" "rK08")))]
 
7919
          UNSPEC_ATOMIC))
 
7920
+   (set (reg:SI T_REG) (const_int 1))
 
7921
    (clobber (reg:SI R0_REG))]
 
7922
   "TARGET_ATOMIC_HARD_LLCS
 
7923
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
7924
@@ -805,6 +810,7 @@
 
7925
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
 
7926
                     (match_operand:QIHI 2 "logical_operand" "rK08")))]
 
7927
          UNSPEC_ATOMIC))
 
7928
+   (set (reg:SI T_REG) (const_int 1))
 
7929
    (clobber (reg:SI R0_REG))
 
7930
    (clobber (match_scratch:SI 3 "=&r"))
 
7931
    (clobber (match_scratch:SI 4 "=1"))]
 
7932
@@ -903,7 +909,7 @@
 
7933
         "      and     %0,%3"                  "\n"
 
7934
         "      not     %3,%3"                  "\n"
 
7935
         "      mov.<bwl>       %3,@%1"         "\n"
 
7936
-        "      stc     %4,sr";
 
7937
+        "      ldc     %4,sr";
 
7938
 }
 
7939
   [(set_attr "length" "20")])
 
7940
 
 
7941
@@ -960,7 +966,8 @@
 
7942
    (set (mem:SI (match_dup 1))
 
7943
        (unspec:SI
 
7944
          [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
 
7945
-         UNSPEC_ATOMIC))]
 
7946
+         UNSPEC_ATOMIC))
 
7947
+   (set (reg:SI T_REG) (const_int 1))]
 
7948
   "TARGET_ATOMIC_HARD_LLCS
 
7949
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
7950
 {
 
7951
@@ -980,6 +987,7 @@
 
7952
        (unspec:QIHI
 
7953
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
 
7954
          UNSPEC_ATOMIC))
 
7955
+   (set (reg:SI T_REG) (const_int 1))
 
7956
    (clobber (reg:SI R0_REG))
 
7957
    (clobber (match_scratch:SI 3 "=&r"))
 
7958
    (clobber (match_scratch:SI 4 "=1"))]
 
7959
@@ -1124,7 +1132,8 @@
 
7960
    (set (mem:SI (match_dup 1))
 
7961
        (unspec:SI
 
7962
          [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
 
7963
-         UNSPEC_ATOMIC))]
 
7964
+         UNSPEC_ATOMIC))
 
7965
+   (set (reg:SI T_REG) (const_int 1))]
 
7966
   "TARGET_ATOMIC_HARD_LLCS
 
7967
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
7968
 {
 
7969
@@ -1145,6 +1154,7 @@
 
7970
        (unspec:QIHI
 
7971
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
 
7972
          UNSPEC_ATOMIC))
 
7973
+   (set (reg:SI T_REG) (const_int 1))
 
7974
    (clobber (reg:SI R0_REG))
 
7975
    (clobber (match_scratch:SI 3 "=&r"))
 
7976
    (clobber (match_scratch:SI 4 "=1"))]
 
7977
@@ -1353,7 +1363,7 @@
 
7978
         "      ldc     r0,sr"          "\n"
 
7979
         "      mov.b   @%0,r0"         "\n"
 
7980
         "      mov.b   %1,@%0"         "\n"
 
7981
-        "      stc     %2,sr"          "\n"
 
7982
+        "      ldc     %2,sr"          "\n"
 
7983
         "      tst     r0,r0";
 
7984
 }
 
7985
   [(set_attr "length" "16")])
 
7986
Index: gcc/config/sh/sh.opt
 
7987
===================================================================
 
7988
--- a/src/gcc/config/sh/sh.opt  (.../tags/gcc_4_8_3_release)
 
7989
+++ b/src/gcc/config/sh/sh.opt  (.../branches/gcc-4_8-branch)
 
7990
@@ -343,7 +343,7 @@
 
7991
 Cost to assume for a multiply insn
 
7992
 
 
7993
 musermode
 
7994
-Target Report RejectNegative Var(TARGET_USERMODE)
 
7995
+Target Var(TARGET_USERMODE)
 
7996
 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
 
7997
 
 
7998
 ;; We might want to enable this by default for TARGET_HARD_SH4, because
 
7999
Index: gcc/config/microblaze/predicates.md
 
8000
===================================================================
 
8001
--- a/src/gcc/config/microblaze/predicates.md   (.../tags/gcc_4_8_3_release)
 
8002
+++ b/src/gcc/config/microblaze/predicates.md   (.../branches/gcc-4_8-branch)
 
8003
@@ -85,10 +85,6 @@
 
8004
   (ior (match_operand 0 "const_0_operand")
 
8005
        (match_operand 0 "register_operand")))
 
8006
 
 
8007
-(define_predicate "reg_or_mem_operand"
 
8008
-  (ior (match_operand 0 "memory_operand")
 
8009
-       (match_operand 0 "register_operand")))
 
8010
-
 
8011
 ;;  Return if the operand is either the PC or a label_ref.  
 
8012
 (define_special_predicate "pc_or_label_operand"
 
8013
   (ior (match_code "pc,label_ref")
 
8014
Index: gcc/config/microblaze/microblaze.md
 
8015
===================================================================
 
8016
--- a/src/gcc/config/microblaze/microblaze.md   (.../tags/gcc_4_8_3_release)
 
8017
+++ b/src/gcc/config/microblaze/microblaze.md   (.../branches/gcc-4_8-branch)
 
8018
@@ -1119,18 +1119,6 @@
 
8019
   }
 
8020
 )
 
8021
 
 
8022
-;;Load and store reverse
 
8023
-(define_insn "movsi4_rev"
 
8024
-  [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
 
8025
-        (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
 
8026
-  "TARGET_REORDER"
 
8027
-  "@
 
8028
-   lwr\t%0,%y1,r0
 
8029
-   swr\t%1,%y0,r0"
 
8030
-  [(set_attr "type"     "load,store")
 
8031
-  (set_attr "mode"      "SI")
 
8032
-  (set_attr "length"    "4,4")])
 
8033
-
 
8034
 ;; 32-bit floating point moves
 
8035
 
 
8036
 (define_expand "movsf"
 
8037
Index: gcc/config/avr/avr-fixed.md
 
8038
===================================================================
 
8039
--- a/src/gcc/config/avr/avr-fixed.md   (.../tags/gcc_4_8_3_release)
 
8040
+++ b/src/gcc/config/avr/avr-fixed.md   (.../branches/gcc-4_8-branch)
 
8041
@@ -430,8 +430,8 @@
 
8042
       }
 
8043
 
 
8044
     // Input and output of the libgcc function
 
8045
-    const unsigned int regno_in[]  = { -1, 22, 22, -1, 18 };
 
8046
-    const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
 
8047
+    const unsigned int regno_in[]  = { -1U, 22, 22, -1U, 18 };
 
8048
+    const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
 
8049
 
 
8050
     operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
8051
     operands[4] = gen_rtx_REG (<MODE>mode,  regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
8052
Index: gcc/config/avr/avr.md
 
8053
===================================================================
 
8054
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
 
8055
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
 
8056
@@ -367,6 +367,15 @@
 
8057
   ""
 
8058
   {
 
8059
     int i;
 
8060
+
 
8061
+    // Avoid (subreg (mem)) for non-generic address spaces below.  Because
 
8062
+    // of the poor addressing capabilities of these spaces it's better to
 
8063
+    // load them in one chunk.  And it avoids PR61443.
 
8064
+
 
8065
+    if (MEM_P (operands[0])
 
8066
+        && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
 
8067
+      operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
 
8068
+
 
8069
     for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
 
8070
       {
 
8071
         rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
 
8072
Index: gcc/config/avr/avr.h
 
8073
===================================================================
 
8074
--- a/src/gcc/config/avr/avr.h  (.../tags/gcc_4_8_3_release)
 
8075
+++ b/src/gcc/config/avr/avr.h  (.../branches/gcc-4_8-branch)
 
8076
@@ -250,18 +250,18 @@
 
8077
 #define REG_CLASS_CONTENTS {                                           \
 
8078
   {0x00000000,0x00000000},     /* NO_REGS */                           \
 
8079
   {0x00000001,0x00000000},     /* R0_REG */                            \
 
8080
-  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */                \
 
8081
-  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */                \
 
8082
-  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */                \
 
8083
+  {3u << REG_X,0x00000000},     /* POINTER_X_REGS, r26 - r27 */                \
 
8084
+  {3u << REG_Y,0x00000000},     /* POINTER_Y_REGS, r28 - r29 */                \
 
8085
+  {3u << REG_Z,0x00000000},     /* POINTER_Z_REGS, r30 - r31 */                \
 
8086
   {0x00000000,0x00000003},     /* STACK_REG, STACK */                  \
 
8087
-  {(3 << REG_Y) | (3 << REG_Z),                                                \
 
8088
+  {(3u << REG_Y) | (3u << REG_Z),                                      \
 
8089
      0x00000000},              /* BASE_POINTER_REGS, r28 - r31 */      \
 
8090
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                         \
 
8091
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z),                      \
 
8092
      0x00000000},              /* POINTER_REGS, r26 - r31 */           \
 
8093
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),          \
 
8094
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W),      \
 
8095
      0x00000000},              /* ADDW_REGS, r24 - r31 */              \
 
8096
   {0x00ff0000,0x00000000},     /* SIMPLE_LD_REGS r16 - r23 */          \
 
8097
-  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),   \
 
8098
+  {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
 
8099
      0x00000000},      /* LD_REGS, r16 - r31 */                        \
 
8100
   {0x0000ffff,0x00000000},     /* NO_LD_REGS  r0 - r15 */              \
 
8101
   {0xffffffff,0x00000000},     /* GENERAL_REGS, r0 - r31 */            \
 
8102
Index: gcc/config/aarch64/arm_neon.h
 
8103
===================================================================
 
8104
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
 
8105
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
 
8106
@@ -13815,7 +13815,7 @@
 
8107
   int16x4_t result;
 
8108
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
 
8109
            : "=w"(result)
 
8110
-           : "w"(a), "w"(b)
 
8111
+           : "w"(a), "x"(b)
 
8112
            : /* No clobbers */);
 
8113
   return result;
 
8114
 }
 
8115
@@ -13837,7 +13837,7 @@
 
8116
   int16x8_t result;
 
8117
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
 
8118
            : "=w"(result)
 
8119
-           : "w"(a), "w"(b)
 
8120
+           : "w"(a), "x"(b)
 
8121
            : /* No clobbers */);
 
8122
   return result;
 
8123
 }
 
8124
Index: gcc/config/aarch64/aarch64.md
 
8125
===================================================================
 
8126
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
 
8127
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
 
8128
@@ -3292,6 +3292,7 @@
 
8129
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
 
8130
                   UNSPEC_TLSDESC))
 
8131
    (clobber (reg:DI LR_REGNUM))
 
8132
+   (clobber (reg:CC CC_REGNUM))
 
8133
    (clobber (match_scratch:DI 1 "=r"))]
 
8134
   "TARGET_TLS_DESC"
 
8135
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
 
8136
Index: gcc/config/aarch64/aarch64.c
 
8137
===================================================================
 
8138
--- a/src/gcc/config/aarch64/aarch64.c  (.../tags/gcc_4_8_3_release)
 
8139
+++ b/src/gcc/config/aarch64/aarch64.c  (.../branches/gcc-4_8-branch)
 
8140
@@ -1201,6 +1201,7 @@
 
8141
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
 
8142
   int ncrn, nvrn, nregs;
 
8143
   bool allocate_ncrn, allocate_nvrn;
 
8144
+  HOST_WIDE_INT size;
 
8145
 
 
8146
   /* We need to do this once per argument.  */
 
8147
   if (pcum->aapcs_arg_processed)
 
8148
@@ -1208,6 +1209,11 @@
 
8149
 
 
8150
   pcum->aapcs_arg_processed = true;
 
8151
 
 
8152
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
 
8153
+  size
 
8154
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
 
8155
+                       UNITS_PER_WORD);
 
8156
+
 
8157
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
 
8158
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
 
8159
                                                 mode,
 
8160
@@ -1258,10 +1264,8 @@
 
8161
     }
 
8162
 
 
8163
   ncrn = pcum->aapcs_ncrn;
 
8164
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
 
8165
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
 
8166
+  nregs = size / UNITS_PER_WORD;
 
8167
 
 
8168
-
 
8169
   /* C6 - C9.  though the sign and zero extension semantics are
 
8170
      handled elsewhere.  This is the case where the argument fits
 
8171
      entirely general registers.  */
 
8172
@@ -1309,13 +1313,12 @@
 
8173
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
 
8174
 
 
8175
   /* The argument is passed on stack; record the needed number of words for
 
8176
-     this argument (we can re-use NREGS) and align the total size if
 
8177
-     necessary.  */
 
8178
+     this argument and align the total size if necessary.  */
 
8179
 on_stack:
 
8180
-  pcum->aapcs_stack_words = nregs;
 
8181
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
 
8182
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
 
8183
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
 
8184
-                                              16 / UNITS_PER_WORD) + 1;
 
8185
+                                              16 / UNITS_PER_WORD);
 
8186
   return;
 
8187
 }
 
8188
 
 
8189
Index: gcc/config/aarch64/aarch64-linux.h
 
8190
===================================================================
 
8191
--- a/src/gcc/config/aarch64/aarch64-linux.h    (.../tags/gcc_4_8_3_release)
 
8192
+++ b/src/gcc/config/aarch64/aarch64-linux.h    (.../branches/gcc-4_8-branch)
 
8193
@@ -43,4 +43,6 @@
 
8194
     }                                          \
 
8195
   while (0)
 
8196
 
 
8197
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
8198
+
 
8199
 #endif  /* GCC_AARCH64_LINUX_H */
 
8200
Index: gcc/config/rs6000/constraints.md
 
8201
===================================================================
 
8202
--- a/src/gcc/config/rs6000/constraints.md      (.../tags/gcc_4_8_3_release)
 
8203
+++ b/src/gcc/config/rs6000/constraints.md      (.../branches/gcc-4_8-branch)
 
8204
@@ -65,6 +65,20 @@
 
8205
 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
 
8206
   "If -mmfpgpr was used, a floating point register or NO_REGS.")
 
8207
 
 
8208
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
 
8209
+  "Floating point register if direct moves are available, or NO_REGS.")
 
8210
+
 
8211
+;; At present, DImode is not allowed in the Altivec registers.  If in the
 
8212
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
 
8213
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
 
8214
+  "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
 
8215
+
 
8216
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
 
8217
+  "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
 
8218
+
 
8219
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
 
8220
+  "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
 
8221
+
 
8222
 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
 
8223
   "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
 
8224
 
 
8225
@@ -98,7 +112,7 @@
 
8226
   "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
 
8227
 
 
8228
 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
 
8229
-  "VSX vector register to hold scalar float values or NO_REGS.")
 
8230
+  "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
 
8231
 
 
8232
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
 
8233
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
 
8234
Index: gcc/config/rs6000/predicates.md
 
8235
===================================================================
 
8236
--- a/src/gcc/config/rs6000/predicates.md       (.../tags/gcc_4_8_3_release)
 
8237
+++ b/src/gcc/config/rs6000/predicates.md       (.../branches/gcc-4_8-branch)
 
8238
@@ -1795,7 +1795,7 @@
 
8239
 (define_predicate "fusion_gpr_mem_load"
 
8240
   (match_code "mem,sign_extend,zero_extend")
 
8241
 {
 
8242
-  rtx addr;
 
8243
+  rtx addr, base, offset;
 
8244
 
 
8245
   /* Handle sign/zero extend.  */
 
8246
   if (GET_CODE (op) == ZERO_EXTEND
 
8247
@@ -1825,24 +1825,79 @@
 
8248
     }
 
8249
 
 
8250
   addr = XEXP (op, 0);
 
8251
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
8252
+    return 0;
 
8253
+
 
8254
+  base = XEXP (addr, 0);
 
8255
+  if (!base_reg_operand (base, GET_MODE (base)))
 
8256
+    return 0;
 
8257
+
 
8258
+  offset = XEXP (addr, 1);
 
8259
+
 
8260
   if (GET_CODE (addr) == PLUS)
 
8261
+    return satisfies_constraint_I (offset);
 
8262
+
 
8263
+  else if (GET_CODE (addr) == LO_SUM)
 
8264
     {
 
8265
-      rtx base = XEXP (addr, 0);
 
8266
-      rtx offset = XEXP (addr, 1);
 
8267
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
8268
+       return small_toc_ref (offset, GET_MODE (offset));
 
8269
 
 
8270
-      return (base_reg_operand (base, GET_MODE (base))
 
8271
-             && satisfies_constraint_I (offset));
 
8272
+      else if (TARGET_ELF && !TARGET_POWERPC64)
 
8273
+       return CONSTANT_P (offset);
 
8274
     }
 
8275
 
 
8276
-  else if (GET_CODE (addr) == LO_SUM)
 
8277
+  return 0;
 
8278
+})
 
8279
+
 
8280
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
 
8281
+;; memory field with both the addis and the memory offset.  Sign extension
 
8282
+;; is not handled here, since lha and lwa are not fused.
 
8283
+(define_predicate "fusion_gpr_mem_combo"
 
8284
+  (match_code "mem,zero_extend")
 
8285
+{
 
8286
+  rtx addr, base, offset;
 
8287
+
 
8288
+  /* Handle zero extend.  */
 
8289
+  if (GET_CODE (op) == ZERO_EXTEND)
 
8290
     {
 
8291
-      rtx base = XEXP (addr, 0);
 
8292
-      rtx offset = XEXP (addr, 1);
 
8293
+      op = XEXP (op, 0);
 
8294
+      mode = GET_MODE (op);
 
8295
+    }
 
8296
 
 
8297
-      if (!base_reg_operand (base, GET_MODE (base)))
 
8298
+  if (!MEM_P (op))
 
8299
+    return 0;
 
8300
+
 
8301
+  switch (mode)
 
8302
+    {
 
8303
+    case QImode:
 
8304
+    case HImode:
 
8305
+    case SImode:
 
8306
+      break;
 
8307
+
 
8308
+    case DImode:
 
8309
+      if (!TARGET_POWERPC64)
 
8310
        return 0;
 
8311
+      break;
 
8312
 
 
8313
-      else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
8314
+    default:
 
8315
+      return 0;
 
8316
+    }
 
8317
+
 
8318
+  addr = XEXP (op, 0);
 
8319
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
8320
+    return 0;
 
8321
+
 
8322
+  base = XEXP (addr, 0);
 
8323
+  if (!fusion_gpr_addis (base, GET_MODE (base)))
 
8324
+    return 0;
 
8325
+
 
8326
+  offset = XEXP (addr, 1);
 
8327
+  if (GET_CODE (addr) == PLUS)
 
8328
+    return satisfies_constraint_I (offset);
 
8329
+
 
8330
+  else if (GET_CODE (addr) == LO_SUM)
 
8331
+    {
 
8332
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
8333
        return small_toc_ref (offset, GET_MODE (offset));
 
8334
 
 
8335
       else if (TARGET_ELF && !TARGET_POWERPC64)
 
8336
Index: gcc/config/rs6000/htm.md
 
8337
===================================================================
 
8338
--- a/src/gcc/config/rs6000/htm.md      (.../tags/gcc_4_8_3_release)
 
8339
+++ b/src/gcc/config/rs6000/htm.md      (.../branches/gcc-4_8-branch)
 
8340
@@ -179,7 +179,7 @@
 
8341
                             (const_int 0)]
 
8342
                            UNSPECV_HTM_TABORTWCI))
 
8343
    (set (subreg:CC (match_dup 2) 0) (match_dup 1))
 
8344
-   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
 
8345
+   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
 
8346
    (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
 
8347
                   (and:SI (match_dup 3) (const_int 15)))
 
8348
               (clobber (scratch:CC))])]
 
8349
Index: gcc/config/rs6000/freebsd64.h
 
8350
===================================================================
 
8351
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
 
8352
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
 
8353
@@ -367,7 +367,7 @@
 
8354
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
8355
 #undef  ADJUST_FIELD_ALIGN
 
8356
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
8357
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
8358
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
8359
    ? 128                                                                \
 
8360
    : (TARGET_64BIT                                                      \
 
8361
       && TARGET_ALIGN_NATURAL == 0                                      \
 
8362
Index: gcc/config/rs6000/rs6000-protos.h
 
8363
===================================================================
 
8364
--- a/src/gcc/config/rs6000/rs6000-protos.h     (.../tags/gcc_4_8_3_release)
 
8365
+++ b/src/gcc/config/rs6000/rs6000-protos.h     (.../branches/gcc-4_8-branch)
 
8366
@@ -79,9 +79,9 @@
 
8367
 extern bool gpr_or_gpr_p (rtx, rtx);
 
8368
 extern bool direct_move_p (rtx, rtx);
 
8369
 extern bool quad_load_store_p (rtx, rtx);
 
8370
-extern bool fusion_gpr_load_p (rtx *, bool);
 
8371
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
 
8372
 extern void expand_fusion_gpr_load (rtx *);
 
8373
-extern const char *emit_fusion_gpr_load (rtx *);
 
8374
+extern const char *emit_fusion_gpr_load (rtx, rtx);
 
8375
 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
 
8376
                                                            enum reg_class);
 
8377
 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
 
8378
@@ -153,6 +153,7 @@
 
8379
 
 
8380
 #ifdef TREE_CODE
 
8381
 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
 
8382
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
 
8383
 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
 
8384
                                                     unsigned int);
 
8385
 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
 
8386
@@ -161,7 +162,7 @@
 
8387
 extern rtx rs6000_libcall_value (enum machine_mode);
 
8388
 extern rtx rs6000_va_arg (tree, tree);
 
8389
 extern int function_ok_for_sibcall (tree);
 
8390
-extern int rs6000_reg_parm_stack_space (tree);
 
8391
+extern int rs6000_reg_parm_stack_space (tree, bool);
 
8392
 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
 
8393
 extern bool rs6000_elf_in_small_data_p (const_tree);
 
8394
 #ifdef ARGS_SIZE_RTX
 
8395
Index: gcc/config/rs6000/rs6000-builtin.def
 
8396
===================================================================
 
8397
--- a/src/gcc/config/rs6000/rs6000-builtin.def  (.../tags/gcc_4_8_3_release)
 
8398
+++ b/src/gcc/config/rs6000/rs6000-builtin.def  (.../branches/gcc-4_8-branch)
 
8399
@@ -622,20 +622,13 @@
 
8400
                     | RS6000_BTC_TERNARY),                             \
 
8401
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
8402
 
 
8403
-/* Miscellaneous builtins.  */
 
8404
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE)                             \
 
8405
+/* 128-bit long double floating point builtins.  */
 
8406
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE)                          \
 
8407
   RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
8408
                    "__builtin_" NAME,                  /* NAME */      \
 
8409
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
8410
+                   (RS6000_BTM_HARD_FLOAT              /* MASK */      \
 
8411
+                    | RS6000_BTM_LDBL128),                             \
 
8412
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
8413
-                    | RS6000_BTC_UNARY),                               \
 
8414
-                   CODE_FOR_ ## ICODE)                 /* ICODE */
 
8415
-
 
8416
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE)                             \
 
8417
-  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
8418
-                   "__builtin_" NAME,                  /* NAME */      \
 
8419
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
8420
-                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
8421
                     | RS6000_BTC_BINARY),                              \
 
8422
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
8423
 
 
8424
@@ -1593,10 +1586,8 @@
 
8425
 BU_DFP_MISC_2 (PACK_TD,                "pack_dec128",          CONST,  packtd)
 
8426
 BU_DFP_MISC_2 (UNPACK_TD,      "unpack_dec128",        CONST,  unpacktd)
 
8427
 
 
8428
-BU_MISC_2 (PACK_TF,            "pack_longdouble",      CONST,  packtf)
 
8429
-BU_MISC_2 (UNPACK_TF,          "unpack_longdouble",    CONST,  unpacktf)
 
8430
-BU_MISC_1 (UNPACK_TF_0,                "longdouble_dw0",       CONST,  unpacktf_0)
 
8431
-BU_MISC_1 (UNPACK_TF_1,                "longdouble_dw1",       CONST,  unpacktf_1)
 
8432
+BU_LDBL128_2 (PACK_TF,         "pack_longdouble",      CONST,  packtf)
 
8433
+BU_LDBL128_2 (UNPACK_TF,       "unpack_longdouble",    CONST,  unpacktf)
 
8434
 
 
8435
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
 
8436
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
 
8437
Index: gcc/config/rs6000/rs6000-c.c
 
8438
===================================================================
 
8439
--- a/src/gcc/config/rs6000/rs6000-c.c  (.../tags/gcc_4_8_3_release)
 
8440
+++ b/src/gcc/config/rs6000/rs6000-c.c  (.../branches/gcc-4_8-branch)
 
8441
@@ -4126,7 +4126,8 @@
 
8442
      argument) is reversed.  Patch the arguments here before building
 
8443
      the resolved CALL_EXPR.  */
 
8444
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
 
8445
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
 
8446
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
 
8447
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
 
8448
     {
 
8449
       tree t;
 
8450
       t = args[2], args[2] = args[1], args[1] = t;
 
8451
@@ -4184,6 +4185,14 @@
 
8452
   if (TARGET_DEBUG_BUILTIN)
 
8453
     fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
 
8454
             (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 
8455
 
8456
+  /* vec_lvsl and vec_lvsr are deprecated for use with LE element order.  */
 
8457
+  if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
 
8458
+    warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
 
8459
+assignment for unaligned loads and stores");
 
8460
+  else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
 
8461
+    warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
 
8462
+assignment for unaligned loads and stores");
 
8463
 
 
8464
   /* For now treat vec_splats and vec_promote as the same.  */
 
8465
   if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
 
8466
Index: gcc/config/rs6000/linux64.h
 
8467
===================================================================
 
8468
--- a/src/gcc/config/rs6000/linux64.h   (.../tags/gcc_4_8_3_release)
 
8469
+++ b/src/gcc/config/rs6000/linux64.h   (.../branches/gcc-4_8-branch)
 
8470
@@ -246,7 +246,7 @@
 
8471
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
8472
 #undef  ADJUST_FIELD_ALIGN
 
8473
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
8474
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)    \
 
8475
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
8476
    ? 128                                                               \
 
8477
    : (TARGET_64BIT                                                     \
 
8478
       && TARGET_ALIGN_NATURAL == 0                                     \
 
8479
Index: gcc/config/rs6000/rs6000.c
 
8480
===================================================================
 
8481
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_8_3_release)
 
8482
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_8-branch)
 
8483
@@ -369,6 +369,7 @@
 
8484
   enum insn_code reload_gpr_vsx;       /* INSN to move from GPR to VSX.  */
 
8485
   enum insn_code reload_vsx_gpr;       /* INSN to move from VSX to GPR.  */
 
8486
   addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks.  */
 
8487
+  bool scalar_in_vmx_p;                        /* Scalar value can go in VMX.  */
 
8488
 };
 
8489
 
 
8490
 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
 
8491
@@ -1704,8 +1705,7 @@
 
8492
      asked for it.  */
 
8493
   if (TARGET_VSX && VSX_REGNO_P (regno)
 
8494
       && (VECTOR_MEM_VSX_P (mode)
 
8495
-         || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
 
8496
-         || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
 
8497
+         || reg_addr[mode].scalar_in_vmx_p
 
8498
          || (TARGET_VSX_TIMODE && mode == TImode)
 
8499
          || (TARGET_VADDUQM && mode == V1TImode)))
 
8500
     {
 
8501
@@ -1714,12 +1714,9 @@
 
8502
 
 
8503
       if (ALTIVEC_REGNO_P (regno))
 
8504
        {
 
8505
-         if (mode == SFmode && !TARGET_UPPER_REGS_SF)
 
8506
+         if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
 
8507
            return 0;
 
8508
 
 
8509
-         if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
 
8510
-           return 0;
 
8511
-
 
8512
          return ALTIVEC_REGNO_P (last_regno);
 
8513
        }
 
8514
     }
 
8515
@@ -1897,14 +1894,16 @@
 
8516
   if (rs6000_vector_unit[m] != VECTOR_NONE
 
8517
       || rs6000_vector_mem[m] != VECTOR_NONE
 
8518
       || (reg_addr[m].reload_store != CODE_FOR_nothing)
 
8519
-      || (reg_addr[m].reload_load != CODE_FOR_nothing))
 
8520
+      || (reg_addr[m].reload_load != CODE_FOR_nothing)
 
8521
+      || reg_addr[m].scalar_in_vmx_p)
 
8522
     {
 
8523
       fprintf (stderr,
 
8524
-              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
 
8525
+              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
 
8526
               rs6000_debug_vector_unit (rs6000_vector_unit[m]),
 
8527
               rs6000_debug_vector_unit (rs6000_vector_mem[m]),
 
8528
               (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
 
8529
-              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
 
8530
+              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
 
8531
+              (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
 
8532
     }
 
8533
 
 
8534
   fputs ("\n", stderr);
 
8535
@@ -2021,6 +2020,10 @@
 
8536
           "wd reg_class = %s\n"
 
8537
           "wf reg_class = %s\n"
 
8538
           "wg reg_class = %s\n"
 
8539
+          "wh reg_class = %s\n"
 
8540
+          "wi reg_class = %s\n"
 
8541
+          "wj reg_class = %s\n"
 
8542
+          "wk reg_class = %s\n"
 
8543
           "wl reg_class = %s\n"
 
8544
           "wm reg_class = %s\n"
 
8545
           "wr reg_class = %s\n"
 
8546
@@ -2040,6 +2043,10 @@
 
8547
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
 
8548
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
 
8549
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
 
8550
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
 
8551
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
 
8552
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
 
8553
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
 
8554
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
 
8555
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
 
8556
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
 
8557
@@ -2324,6 +2331,8 @@
 
8558
 
 
8559
   for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
8560
     {
 
8561
+      enum machine_mode m2 = (enum machine_mode)m;
 
8562
+
 
8563
       /* SDmode is special in that we want to access it only via REG+REG
 
8564
         addressing on power7 and above, since we want to use the LFIWZX and
 
8565
         STFIWZX instructions to load it.  */
 
8566
@@ -2358,13 +2367,12 @@
 
8567
 
 
8568
              if (TARGET_UPDATE
 
8569
                  && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
 
8570
-                 && GET_MODE_SIZE (m) <= 8
 
8571
-                 && !VECTOR_MODE_P (m)
 
8572
-                 && !COMPLEX_MODE_P (m)
 
8573
+                 && GET_MODE_SIZE (m2) <= 8
 
8574
+                 && !VECTOR_MODE_P (m2)
 
8575
+                 && !COMPLEX_MODE_P (m2)
 
8576
                  && !indexed_only_p
 
8577
-                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
 
8578
-                 && !(m == DFmode && TARGET_UPPER_REGS_DF)
 
8579
-                 && !(m == SFmode && TARGET_UPPER_REGS_SF))
 
8580
+                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
 
8581
+                 && !reg_addr[m2].scalar_in_vmx_p)
 
8582
                {
 
8583
                  addr_mask |= RELOAD_REG_PRE_INCDEC;
 
8584
 
 
8585
@@ -2595,16 +2603,22 @@
 
8586
        f  - Register class to use with traditional SFmode instructions.
 
8587
        v  - Altivec register.
 
8588
        wa - Any VSX register.
 
8589
+       wc - Reserved to represent individual CR bits (used in LLVM).
 
8590
        wd - Preferred register class for V2DFmode.
 
8591
        wf - Preferred register class for V4SFmode.
 
8592
        wg - Float register for power6x move insns.
 
8593
+       wh - FP register for direct move instructions.
 
8594
+       wi - FP or VSX register to hold 64-bit integers for VSX insns.
 
8595
+       wj - FP or VSX register to hold 64-bit integers for direct moves.
 
8596
+       wk - FP or VSX register to hold 64-bit doubles for direct moves.
 
8597
        wl - Float register if we can do 32-bit signed int loads.
 
8598
        wm - VSX register for ISA 2.07 direct move operations.
 
8599
+       wn - always NO_REGS.
 
8600
        wr - GPR if 64-bit mode is permitted.
 
8601
        ws - Register class to do ISA 2.06 DF operations.
 
8602
+       wt - VSX register for TImode in VSX registers.
 
8603
        wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
 
8604
        wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
 
8605
-       wt - VSX register for TImode in VSX registers.
 
8606
        ww - Register class to do SF conversions in with VSX operations.
 
8607
        wx - Float register if we can do 32-bit int stores.
 
8608
        wy - Register class to do ISA 2.07 SF operations.
 
8609
@@ -2611,21 +2625,22 @@
 
8610
        wz - Float register if we can do 32-bit unsigned int loads.  */
 
8611
 
 
8612
   if (TARGET_HARD_FLOAT && TARGET_FPRS)
 
8613
-    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
 
8614
+    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;      /* SFmode  */
 
8615
 
 
8616
   if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
 
8617
-    rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
 
8618
+    rs6000_constraints[RS6000_CONSTRAINT_d]  = FLOAT_REGS;     /* DFmode  */
 
8619
 
 
8620
   if (TARGET_VSX)
 
8621
     {
 
8622
       rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
 
8623
-      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
 
8624
-      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
 
8625
+      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;     /* V2DFmode  */
 
8626
+      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;     /* V4SFmode  */
 
8627
+      rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS;   /* DImode  */
 
8628
 
 
8629
       if (TARGET_VSX_TIMODE)
 
8630
-       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
 
8631
+       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;    /* TImode  */
 
8632
 
 
8633
-      if (TARGET_UPPER_REGS_DF)
 
8634
+      if (TARGET_UPPER_REGS_DF)                                        /* DFmode  */
 
8635
        {
 
8636
          rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
 
8637
          rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
 
8638
@@ -2639,19 +2654,26 @@
 
8639
   if (TARGET_ALTIVEC)
 
8640
     rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
 
8641
 
 
8642
-  if (TARGET_MFPGPR)
 
8643
+  if (TARGET_MFPGPR)                                           /* DFmode  */
 
8644
     rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
 
8645
 
 
8646
   if (TARGET_LFIWAX)
 
8647
-    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
 
8648
+    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;     /* DImode  */
 
8649
 
 
8650
   if (TARGET_DIRECT_MOVE)
 
8651
-    rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
8652
+    {
 
8653
+      rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
 
8654
+      rs6000_constraints[RS6000_CONSTRAINT_wj]                 /* DImode  */
 
8655
+       = rs6000_constraints[RS6000_CONSTRAINT_wi];
 
8656
+      rs6000_constraints[RS6000_CONSTRAINT_wk]                 /* DFmode  */
 
8657
+       = rs6000_constraints[RS6000_CONSTRAINT_ws];
 
8658
+      rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
8659
+    }
 
8660
 
 
8661
   if (TARGET_POWERPC64)
 
8662
     rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
 
8663
 
 
8664
-  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
 
8665
+  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
 
8666
     {
 
8667
       rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
 
8668
       rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
 
8669
@@ -2666,10 +2688,10 @@
 
8670
     rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
 
8671
 
 
8672
   if (TARGET_STFIWX)
 
8673
-    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
 
8674
+    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;     /* DImode  */
 
8675
 
 
8676
   if (TARGET_LFIWZX)
 
8677
-    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
 
8678
+    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;     /* DImode  */
 
8679
 
 
8680
   /* Set up the reload helper and direct move functions.  */
 
8681
   if (TARGET_VSX || TARGET_ALTIVEC)
 
8682
@@ -2692,10 +2714,11 @@
 
8683
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_di_load;
 
8684
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
8685
            {
 
8686
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_di_store;
 
8687
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_di_load;
 
8688
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_di_store;
 
8689
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_di_load;
 
8690
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_di_store;
 
8691
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_di_load;
 
8692
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
8693
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_di_store;
 
8694
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_di_load;
 
8695
            }
 
8696
          if (TARGET_P8_VECTOR)
 
8697
            {
 
8698
@@ -2703,6 +2726,8 @@
 
8699
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_di_load;
 
8700
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_di_store;
 
8701
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_di_load;
 
8702
+             if (TARGET_UPPER_REGS_SF)
 
8703
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
8704
            }
 
8705
          if (TARGET_VSX_TIMODE)
 
8706
            {
 
8707
@@ -2759,10 +2784,11 @@
 
8708
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_si_load;
 
8709
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
8710
            {
 
8711
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_si_store;
 
8712
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_si_load;
 
8713
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_si_store;
 
8714
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_si_load;
 
8715
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_si_store;
 
8716
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_si_load;
 
8717
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
8718
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_si_store;
 
8719
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_si_load;
 
8720
            }
 
8721
          if (TARGET_P8_VECTOR)
 
8722
            {
 
8723
@@ -2770,6 +2796,8 @@
 
8724
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_si_load;
 
8725
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_si_store;
 
8726
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_si_load;
 
8727
+             if (TARGET_UPPER_REGS_SF)
 
8728
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
8729
            }
 
8730
          if (TARGET_VSX_TIMODE)
 
8731
            {
 
8732
@@ -2810,6 +2838,7 @@
 
8733
 
 
8734
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
8735
        {
 
8736
+         enum machine_mode m2 = (enum machine_mode)m;
 
8737
          int reg_size2 = reg_size;
 
8738
 
 
8739
          /* TFmode/TDmode always takes 2 registers, even in VSX.  */
 
8740
@@ -2818,7 +2847,7 @@
 
8741
            reg_size2 = UNITS_PER_FP_WORD;
 
8742
 
 
8743
          rs6000_class_max_nregs[m][c]
 
8744
-           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
 
8745
+           = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
 
8746
        }
 
8747
     }
 
8748
 
 
8749
@@ -3014,7 +3043,8 @@
 
8750
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
 
8751
          | ((TARGET_HTM)                   ? RS6000_BTM_HTM       : 0)
 
8752
          | ((TARGET_DFP)                   ? RS6000_BTM_DFP       : 0)
 
8753
-         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0));
 
8754
+         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0)
 
8755
+         | ((TARGET_LONG_DOUBLE_128)       ? RS6000_BTM_LDBL128 : 0));
 
8756
 }
 
8757
 
 
8758
 /* Override command line options.  Mostly we process the processor type and
 
8759
@@ -5861,6 +5891,34 @@
 
8760
   return align;
 
8761
 }
 
8762
 
 
8763
+/* Previous GCC releases forced all vector types to have 16-byte alignment.  */
 
8764
+
 
8765
+bool
 
8766
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
 
8767
+{
 
8768
+  if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
 
8769
+    {
 
8770
+      if (computed != 128)
 
8771
+       {
 
8772
+         static bool warned;
 
8773
+         if (!warned && warn_psabi)
 
8774
+           {
 
8775
+             warned = true;
 
8776
+             inform (input_location,
 
8777
+                     "the layout of aggregates containing vectors with"
 
8778
+                     " %d-byte alignment will change in a future GCC release",
 
8779
+                     computed / BITS_PER_UNIT);
 
8780
+           }
 
8781
+       }
 
8782
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
8783
+        keep the special treatment of vector types, but warn if there will
 
8784
+        be differences in future GCC releases.  */
 
8785
+      return true;
 
8786
+    }
 
8787
+
 
8788
+  return false;
 
8789
+}
 
8790
+
 
8791
 /* AIX increases natural record alignment to doubleword if the first
 
8792
    field is an FP double while the FP fields remain word aligned.  */
 
8793
 
 
8794
@@ -6109,7 +6167,8 @@
 
8795
     return false;
 
8796
 
 
8797
   extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
 
8798
-  gcc_assert (extra >= 0);
 
8799
+  if (extra < 0)
 
8800
+    extra = 0;
 
8801
 
 
8802
   if (GET_CODE (addr) == LO_SUM)
 
8803
     /* For lo_sum addresses, we must allow any offset except one that
 
8804
@@ -9198,14 +9257,51 @@
 
8805
           || (type && TREE_CODE (type) == VECTOR_TYPE
 
8806
               && int_size_in_bytes (type) >= 16))
 
8807
     return 128;
 
8808
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
 
8809
-           || DEFAULT_ABI == ABI_ELFv2
 
8810
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
 
8811
-          && mode == BLKmode
 
8812
-          && type && TYPE_ALIGN (type) > 64)
 
8813
+
 
8814
+  /* Aggregate types that need > 8 byte alignment are quadword-aligned
 
8815
+     in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
 
8816
+     -mcompat-align-parm is used.  */
 
8817
+  if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
 
8818
+       || DEFAULT_ABI == ABI_ELFv2)
 
8819
+      && type && TYPE_ALIGN (type) > 64)
 
8820
+    {
 
8821
+      /* "Aggregate" means any AGGREGATE_TYPE except for single-element
 
8822
+         or homogeneous float/vector aggregates here.  We already handled
 
8823
+         vector aggregates above, but still need to check for float here. */
 
8824
+      bool aggregate_p = (AGGREGATE_TYPE_P (type)
 
8825
+                         && !SCALAR_FLOAT_MODE_P (elt_mode));
 
8826
+
 
8827
+      /* We used to check for BLKmode instead of the above aggregate type
 
8828
+        check.  Warn when this results in any difference to the ABI.  */
 
8829
+      if (aggregate_p != (mode == BLKmode))
 
8830
+       {
 
8831
+         static bool warned;
 
8832
+         if (!warned && warn_psabi)
 
8833
+           {
 
8834
+             warned = true;
 
8835
+             inform (input_location,
 
8836
+                     "the ABI of passing aggregates with %d-byte alignment"
 
8837
+                     " will change in a future GCC release",
 
8838
+                     (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
 
8839
+           }
 
8840
+       }
 
8841
+
 
8842
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
8843
+        keep using the BLKmode check, but warn if there will be differences
 
8844
+        in future GCC releases.  */
 
8845
+      if (mode == BLKmode)
 
8846
+       return 128;
 
8847
+    }
 
8848
+
 
8849
+  /* Similar for the Darwin64 ABI.  Note that for historical reasons we
 
8850
+     implement the "aggregate type" check as a BLKmode check here; this
 
8851
+     means certain aggregate types are in fact not aligned.  */
 
8852
+  if (TARGET_MACHO && rs6000_darwin64_abi
 
8853
+      && mode == BLKmode
 
8854
+      && type && TYPE_ALIGN (type) > 64)
 
8855
     return 128;
 
8856
-  else
 
8857
-    return PARM_BOUNDARY;
 
8858
+
 
8859
+  return PARM_BOUNDARY;
 
8860
 }
 
8861
 
 
8862
 /* The offset in words to the start of the parameter save area.  */
 
8863
@@ -10243,6 +10339,7 @@
 
8864
          rtx r, off;
 
8865
          int i, k = 0;
 
8866
          unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
 
8867
+         int fpr_words;
 
8868
 
 
8869
          /* Do we also need to pass this argument in the parameter
 
8870
             save area?  */
 
8871
@@ -10271,6 +10368,37 @@
 
8872
              rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
 
8873
            }
 
8874
 
 
8875
+         /* If there were not enough FPRs to hold the argument, the rest
 
8876
+            usually goes into memory.  However, if the current position
 
8877
+            is still within the register parameter area, a portion may
 
8878
+            actually have to go into GPRs.
 
8879
+
 
8880
+            Note that it may happen that the portion of the argument
 
8881
+            passed in the first "half" of the first GPR was already
 
8882
+            passed in the last FPR as well.
 
8883
+
 
8884
+            For unnamed arguments, we already set up GPRs to cover the
 
8885
+            whole argument in rs6000_psave_function_arg, so there is
 
8886
+            nothing further to do at this point.
 
8887
+
 
8888
+            GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
 
8889
+            GCC releases.  To avoid any ABI change on the release branch,
 
8890
+            we retain that original implementation here, but warn if we
 
8891
+            encounter a case where the ABI will change in the future.  */
 
8892
+         fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
 
8893
+         if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
 
8894
+             && cum->nargs_prototype > 0)
 
8895
+            {
 
8896
+             static bool warned;
 
8897
+             if (!warned && warn_psabi)
 
8898
+               {
 
8899
+                 warned = true;
 
8900
+                 inform (input_location,
 
8901
+                         "the ABI of passing homogeneous float aggregates"
 
8902
+                         " will change in a future GCC release");
 
8903
+               }
 
8904
+           }
 
8905
+
 
8906
          return rs6000_finish_function_arg (mode, rvec, k);
 
8907
        }
 
8908
       else if (align_words < GP_ARG_NUM_REG)
 
8909
@@ -10497,10 +10625,9 @@
 
8910
    list, or passes any parameter in memory.  */
 
8911
 
 
8912
 static bool
 
8913
-rs6000_function_parms_need_stack (tree fun)
 
8914
+rs6000_function_parms_need_stack (tree fun, bool incoming)
 
8915
 {
 
8916
-  function_args_iterator args_iter;
 
8917
-  tree arg_type;
 
8918
+  tree fntype, result;
 
8919
   CUMULATIVE_ARGS args_so_far_v;
 
8920
   cumulative_args_t args_so_far;
 
8921
 
 
8922
@@ -10507,26 +10634,57 @@
 
8923
   if (!fun)
 
8924
     /* Must be a libcall, all of which only use reg parms.  */
 
8925
     return false;
 
8926
+
 
8927
+  fntype = fun;
 
8928
   if (!TYPE_P (fun))
 
8929
-    fun = TREE_TYPE (fun);
 
8930
+    fntype = TREE_TYPE (fun);
 
8931
 
 
8932
   /* Varargs functions need the parameter save area.  */
 
8933
-  if (!prototype_p (fun) || stdarg_p (fun))
 
8934
+  if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
 
8935
     return true;
 
8936
 
 
8937
-  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
 
8938
+  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
 
8939
   args_so_far = pack_cumulative_args (&args_so_far_v);
 
8940
 
 
8941
-  if (aggregate_value_p (TREE_TYPE (fun), fun))
 
8942
+  /* When incoming, we will have been passed the function decl.
 
8943
+     It is necessary to use the decl to handle K&R style functions,
 
8944
+     where TYPE_ARG_TYPES may not be available.  */
 
8945
+  if (incoming)
 
8946
     {
 
8947
-      tree type = build_pointer_type (TREE_TYPE (fun));
 
8948
-      rs6000_parm_needs_stack (args_so_far, type);
 
8949
+      gcc_assert (DECL_P (fun));
 
8950
+      result = DECL_RESULT (fun);
 
8951
     }
 
8952
+  else
 
8953
+    result = TREE_TYPE (fntype);
 
8954
 
 
8955
-  FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
 
8956
-    if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
8957
-      return true;
 
8958
+  if (result && aggregate_value_p (result, fntype))
 
8959
+    {
 
8960
+      if (!TYPE_P (result))
 
8961
+       result = TREE_TYPE (result);
 
8962
+      result = build_pointer_type (result);
 
8963
+      rs6000_parm_needs_stack (args_so_far, result);
 
8964
+    }
 
8965
 
 
8966
+  if (incoming)
 
8967
+    {
 
8968
+      tree parm;
 
8969
+
 
8970
+      for (parm = DECL_ARGUMENTS (fun);
 
8971
+          parm && parm != void_list_node;
 
8972
+          parm = TREE_CHAIN (parm))
 
8973
+       if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
 
8974
+         return true;
 
8975
+    }
 
8976
+  else
 
8977
+    {
 
8978
+      function_args_iterator args_iter;
 
8979
+      tree arg_type;
 
8980
+
 
8981
+      FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
 
8982
+       if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
8983
+         return true;
 
8984
+    }
 
8985
+
 
8986
   return false;
 
8987
 }
 
8988
 
 
8989
@@ -10537,7 +10695,7 @@
 
8990
    all parameters in registers.  */
 
8991
 
 
8992
 int
 
8993
-rs6000_reg_parm_stack_space (tree fun)
 
8994
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
 
8995
 {
 
8996
   int reg_parm_stack_space;
 
8997
 
 
8998
@@ -10555,7 +10713,7 @@
 
8999
     case ABI_ELFv2:
 
9000
       /* ??? Recomputing this every time is a bit expensive.  Is there
 
9001
         a place to cache this information?  */
 
9002
-      if (rs6000_function_parms_need_stack (fun))
 
9003
+      if (rs6000_function_parms_need_stack (fun, incoming))
 
9004
        reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
 
9005
       else
 
9006
        reg_parm_stack_space = 0;
 
9007
@@ -13544,11 +13702,15 @@
 
9008
   else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
9009
           == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
9010
     error ("Builtin function %s requires the -mhard-dfp and"
 
9011
-          "-mpower8-vector options", name);
 
9012
+          " -mpower8-vector options", name);
 
9013
   else if ((fnmask & RS6000_BTM_DFP) != 0)
 
9014
     error ("Builtin function %s requires the -mhard-dfp option", name);
 
9015
   else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
 
9016
     error ("Builtin function %s requires the -mpower8-vector option", name);
 
9017
+  else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
9018
+          == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
9019
+    error ("Builtin function %s requires the -mhard-float and"
 
9020
+          " -mlong-double-128 options", name);
 
9021
   else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
 
9022
     error ("Builtin function %s requires the -mhard-float option", name);
 
9023
   else
 
9024
@@ -13649,8 +13811,8 @@
 
9025
     case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
 
9026
     case ALTIVEC_BUILTIN_MASK_FOR_STORE:
 
9027
       {
 
9028
-       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
 
9029
-                    : (int) CODE_FOR_altivec_lvsl);
 
9030
+       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
 
9031
+                    : (int) CODE_FOR_altivec_lvsl_direct);
 
9032
        enum machine_mode tmode = insn_data[icode].operand[0].mode;
 
9033
        enum machine_mode mode = insn_data[icode].operand[1].mode;
 
9034
        tree arg;
 
9035
@@ -13678,7 +13840,6 @@
 
9036
            || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
 
9037
          target = gen_reg_rtx (tmode);
 
9038
 
 
9039
-       /*pat = gen_altivec_lvsr (target, op);*/
 
9040
        pat = GEN_FCN (icode) (target, op);
 
9041
        if (!pat)
 
9042
          return 0;
 
9043
@@ -17099,7 +17260,14 @@
 
9044
      prefer Altivec loads..  */
 
9045
   if (rclass == VSX_REGS)
 
9046
     {
 
9047
-      if (GET_MODE_SIZE (mode) <= 8)
 
9048
+      if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
 
9049
+       {
 
9050
+         rtx addr = XEXP (x, 0);
 
9051
+         if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
 
9052
+             || legitimate_lo_sum_address_p (mode, addr, false))
 
9053
+           return FLOAT_REGS;
 
9054
+       }
 
9055
+      else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
 
9056
        return FLOAT_REGS;
 
9057
 
 
9058
       if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
 
9059
@@ -31413,6 +31581,7 @@
 
9060
   { "htm",              RS6000_BTM_HTM,        false, false },
 
9061
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
 
9062
   { "hard-float",       RS6000_BTM_HARD_FLOAT, false, false },
 
9063
+  { "long-double-128",  RS6000_BTM_LDBL128,    false, false },
 
9064
 };
 
9065
 
 
9066
 /* Option variables that we want to support inside attribute((target)) and
 
9067
@@ -32663,25 +32832,14 @@
 
9068
 
 
9069
 /* Return true if the peephole2 can combine a load involving a combination of
 
9070
    an addis instruction and a load with an offset that can be fused together on
 
9071
-   a power8.
 
9072
+   a power8.  */
 
9073
 
 
9074
-   The operands are:
 
9075
-       operands[0]     register set with addis
 
9076
-       operands[1]     value set via addis
 
9077
-       operands[2]     target register being loaded
 
9078
-       operands[3]     D-form memory reference using operands[0].
 
9079
-
 
9080
-   In addition, we are passed a boolean that is true if this is a peephole2,
 
9081
-   and we can use see if the addis_reg is dead after the insn and can be
 
9082
-   replaced by the target register.  */
 
9083
-
 
9084
 bool
 
9085
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
 
9086
+fusion_gpr_load_p (rtx addis_reg,      /* register set via addis.  */
 
9087
+                  rtx addis_value,     /* addis value.  */
 
9088
+                  rtx target,          /* target register that is loaded.  */
 
9089
+                  rtx mem)             /* bottom part of the memory addr. */
 
9090
 {
 
9091
-  rtx addis_reg = operands[0];
 
9092
-  rtx addis_value = operands[1];
 
9093
-  rtx target = operands[2];
 
9094
-  rtx mem = operands[3];
 
9095
   rtx addr;
 
9096
   rtx base_reg;
 
9097
 
 
9098
@@ -32695,9 +32853,6 @@
 
9099
   if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
 
9100
     return false;
 
9101
 
 
9102
-  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
9103
-    return false;
 
9104
-
 
9105
   /* Allow sign/zero extension.  */
 
9106
   if (GET_CODE (mem) == ZERO_EXTEND
 
9107
       || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
 
9108
@@ -32706,22 +32861,22 @@
 
9109
   if (!MEM_P (mem))
 
9110
     return false;
 
9111
 
 
9112
+  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
9113
+    return false;
 
9114
+
 
9115
   addr = XEXP (mem, 0);                        /* either PLUS or LO_SUM.  */
 
9116
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
9117
     return false;
 
9118
 
 
9119
   /* Validate that the register used to load the high value is either the
 
9120
-     register being loaded, or we can safely replace its use in a peephole2.
 
9121
+     register being loaded, or we can safely replace its use.
 
9122
 
 
9123
-     If this is a peephole2, we assume that there are 2 instructions in the
 
9124
-     peephole (addis and load), so we want to check if the target register was
 
9125
-     not used in the memory address and the register to hold the addis result
 
9126
-     is dead after the peephole.  */
 
9127
+     This function is only called from the peephole2 pass and we assume that
 
9128
+     there are 2 instructions in the peephole (addis and load), so we want to
 
9129
+     check if the target register was not used in the memory address and the
 
9130
+     register to hold the addis result is dead after the peephole.  */
 
9131
   if (REGNO (addis_reg) != REGNO (target))
 
9132
     {
 
9133
-      if (!peep2_p)
 
9134
-       return false;
 
9135
-
 
9136
       if (reg_mentioned_p (target, mem))
 
9137
        return false;
 
9138
 
 
9139
@@ -32762,9 +32917,6 @@
 
9140
   enum machine_mode extend_mode = target_mode;
 
9141
   enum machine_mode ptr_mode = Pmode;
 
9142
   enum rtx_code extend = UNKNOWN;
 
9143
-  rtx addis_reg = ((ptr_mode == target_mode)
 
9144
-                  ? target
 
9145
-                  : simplify_subreg (ptr_mode, target, target_mode, 0));
 
9146
 
 
9147
   if (GET_CODE (orig_mem) == ZERO_EXTEND
 
9148
       || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
 
9149
@@ -32781,13 +32933,14 @@
 
9150
   gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
 
9151
 
 
9152
   offset = XEXP (orig_addr, 1);
 
9153
-  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
 
9154
-  new_mem = change_address (orig_mem, target_mode, new_addr);
 
9155
+  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
 
9156
+  new_mem = replace_equiv_address_nv (orig_mem, new_addr);
 
9157
 
 
9158
   if (extend != UNKNOWN)
 
9159
     new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
 
9160
 
 
9161
-  emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
 
9162
+  new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
 
9163
+                           UNSPEC_FUSION_GPR);
 
9164
   emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
 
9165
 
 
9166
   if (extend == SIGN_EXTEND)
 
9167
@@ -32806,55 +32959,40 @@
 
9168
 }
 
9169
 
 
9170
 /* Return a string to fuse an addis instruction with a gpr load to the same
 
9171
-   register that we loaded up the addis instruction.  The code is complicated,
 
9172
-   so we call output_asm_insn directly, and just return "".
 
9173
+   register that we loaded up the addis instruction.  The address that is used
 
9174
+   is the logical address that was formed during peephole2:
 
9175
+       (lo_sum (high) (low-part))
 
9176
 
 
9177
-   The operands are:
 
9178
-       operands[0]     register set with addis (must be same reg as target).
 
9179
-       operands[1]     value set via addis
 
9180
-       operands[2]     target register being loaded
 
9181
-       operands[3]     D-form memory reference using operands[0].  */
 
9182
+   The code is complicated, so we call output_asm_insn directly, and just
 
9183
+   return "".  */
 
9184
 
 
9185
 const char *
 
9186
-emit_fusion_gpr_load (rtx *operands)
 
9187
+emit_fusion_gpr_load (rtx target, rtx mem)
 
9188
 {
 
9189
-  rtx addis_reg = operands[0];
 
9190
-  rtx addis_value = operands[1];
 
9191
-  rtx target = operands[2];
 
9192
-  rtx mem = operands[3];
 
9193
+  rtx addis_value;
 
9194
   rtx fuse_ops[10];
 
9195
   rtx addr;
 
9196
   rtx load_offset;
 
9197
   const char *addis_str = NULL;
 
9198
   const char *load_str = NULL;
 
9199
-  const char *extend_insn = NULL;
 
9200
   const char *mode_name = NULL;
 
9201
   char insn_template[80];
 
9202
   enum machine_mode mode;
 
9203
   const char *comment_str = ASM_COMMENT_START;
 
9204
-  bool sign_p = false;
 
9205
 
 
9206
-  gcc_assert (REG_P (addis_reg) && REG_P (target));
 
9207
-  gcc_assert (REGNO (addis_reg) == REGNO (target));
 
9208
+  if (GET_CODE (mem) == ZERO_EXTEND)
 
9209
+    mem = XEXP (mem, 0);
 
9210
 
 
9211
+  gcc_assert (REG_P (target) && MEM_P (mem));
 
9212
+
 
9213
   if (*comment_str == ' ')
 
9214
     comment_str++;
 
9215
 
 
9216
-  /* Allow sign/zero extension.  */
 
9217
-  if (GET_CODE (mem) == ZERO_EXTEND)
 
9218
-    mem = XEXP (mem, 0);
 
9219
-
 
9220
-  else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
 
9221
-    {
 
9222
-      sign_p = true;
 
9223
-      mem = XEXP (mem, 0);
 
9224
-    }
 
9225
-
 
9226
-  gcc_assert (MEM_P (mem));
 
9227
   addr = XEXP (mem, 0);
 
9228
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
9229
     gcc_unreachable ();
 
9230
 
 
9231
+  addis_value = XEXP (addr, 0);
 
9232
   load_offset = XEXP (addr, 1);
 
9233
 
 
9234
   /* Now emit the load instruction to the same register.  */
 
9235
@@ -32864,29 +33002,22 @@
 
9236
     case QImode:
 
9237
       mode_name = "char";
 
9238
       load_str = "lbz";
 
9239
-      extend_insn = "extsb %0,%0";
 
9240
       break;
 
9241
 
 
9242
     case HImode:
 
9243
       mode_name = "short";
 
9244
       load_str = "lhz";
 
9245
-      extend_insn = "extsh %0,%0";
 
9246
       break;
 
9247
 
 
9248
     case SImode:
 
9249
       mode_name = "int";
 
9250
       load_str = "lwz";
 
9251
-      extend_insn = "extsw %0,%0";
 
9252
       break;
 
9253
 
 
9254
     case DImode:
 
9255
-      if (TARGET_POWERPC64)
 
9256
-       {
 
9257
-         mode_name = "long";
 
9258
-         load_str = "ld";
 
9259
-       }
 
9260
-      else
 
9261
-       gcc_unreachable ();
 
9262
+      gcc_assert (TARGET_POWERPC64);
 
9263
+      mode_name = "long";
 
9264
+      load_str = "ld";
 
9265
       break;
 
9266
 
 
9267
     default:
 
9268
@@ -33030,14 +33161,6 @@
 
9269
   else
 
9270
     fatal_insn ("Unable to generate load offset for fusion", load_offset);
 
9271
 
 
9272
-  /* Handle sign extension.  The peephole2 pass generates this as a separate
 
9273
-     insn, but we handle it just in case it got reattached.  */
 
9274
-  if (sign_p)
 
9275
-    {
 
9276
-      gcc_assert (extend_insn != NULL);
 
9277
-      output_asm_insn (extend_insn, fuse_ops);
 
9278
-    }
 
9279
-
 
9280
   return "";
 
9281
 }
 
9282
 
 
9283
Index: gcc/config/rs6000/vsx.md
 
9284
===================================================================
 
9285
--- a/src/gcc/config/rs6000/vsx.md      (.../tags/gcc_4_8_3_release)
 
9286
+++ b/src/gcc/config/rs6000/vsx.md      (.../branches/gcc-4_8-branch)
 
9287
@@ -24,6 +24,13 @@
 
9288
 ;; Iterator for the 2 64-bit vector types
 
9289
 (define_mode_iterator VSX_D [V2DF V2DI])
 
9290
 
 
9291
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
 
9292
+;; lxvd2x to properly handle swapping words on little endian
 
9293
+(define_mode_iterator VSX_LE [V2DF
 
9294
+                             V2DI
 
9295
+                             V1TI
 
9296
+                             (TI       "VECTOR_MEM_VSX_P (TImode)")])
 
9297
+
 
9298
 ;; Iterator for the 2 32-bit vector types
 
9299
 (define_mode_iterator VSX_W [V4SF V4SI])
 
9300
 
 
9301
@@ -79,19 +86,26 @@
 
9302
                         (V4SF  "wf")
 
9303
                         (V2DI  "wd")
 
9304
                         (V2DF  "wd")
 
9305
+                        (DI    "wi")
 
9306
                         (DF    "ws")
 
9307
-                        (SF    "d")
 
9308
+                        (SF    "ww")
 
9309
                         (V1TI  "v")
 
9310
                         (TI    "wt")])
 
9311
 
 
9312
-;; Map the register class used for float<->int conversions
 
9313
+;; Map the register class used for float<->int conversions (floating point side)
 
9314
+;; VSr2 is the preferred register class, VSr3 is any register class that will
 
9315
+;; hold the data
 
9316
 (define_mode_attr VSr2 [(V2DF  "wd")
 
9317
                         (V4SF  "wf")
 
9318
-                        (DF    "ws")])
 
9319
+                        (DF    "ws")
 
9320
+                        (SF    "ww")
 
9321
+                        (DI    "wi")])
 
9322
 
 
9323
 (define_mode_attr VSr3 [(V2DF  "wa")
 
9324
                         (V4SF  "wa")
 
9325
-                        (DF    "ws")])
 
9326
+                        (DF    "ws")
 
9327
+                        (SF    "ww")
 
9328
+                        (DI    "wi")])
 
9329
 
 
9330
 ;; Map the register class for sp<->dp float conversions, destination
 
9331
 (define_mode_attr VSr4 [(SF    "ws")
 
9332
@@ -99,12 +113,27 @@
 
9333
                         (V2DF  "wd")
 
9334
                         (V4SF  "v")])
 
9335
 
 
9336
-;; Map the register class for sp<->dp float conversions, destination
 
9337
+;; Map the register class for sp<->dp float conversions, source
 
9338
 (define_mode_attr VSr5 [(SF    "ws")
 
9339
                         (DF    "f")
 
9340
                         (V2DF  "v")
 
9341
                         (V4SF  "wd")])
 
9342
 
 
9343
+;; The VSX register class that a type can occupy, even if it is not the
 
9344
+;; preferred register class (VSr is the preferred register class that will get
 
9345
+;; allocated first).
 
9346
+(define_mode_attr VSa  [(V16QI "wa")
 
9347
+                        (V8HI  "wa")
 
9348
+                        (V4SI  "wa")
 
9349
+                        (V4SF  "wa")
 
9350
+                        (V2DI  "wa")
 
9351
+                        (V2DF  "wa")
 
9352
+                        (DI    "wi")
 
9353
+                        (DF    "ws")
 
9354
+                        (SF    "ww")
 
9355
+                        (V1TI  "wa")
 
9356
+                        (TI    "wt")])
 
9357
+
 
9358
 ;; Same size integer type for floating point data
 
9359
 (define_mode_attr VSi [(V4SF  "v4si")
 
9360
                       (V2DF  "v2di")
 
9361
@@ -200,6 +229,16 @@
 
9362
                             (V2DF      "V4DF")
 
9363
                             (V1TI      "V2TI")])
 
9364
 
 
9365
+;; Map register class for 64-bit element in 128-bit vector for direct moves
 
9366
+;; to/from gprs
 
9367
+(define_mode_attr VS_64dm [(V2DF       "wk")
 
9368
+                          (V2DI        "wj")])
 
9369
+
 
9370
+;; Map register class for 64-bit element in 128-bit vector for normal register
 
9371
+;; to register moves
 
9372
+(define_mode_attr VS_64reg [(V2DF      "ws")
 
9373
+                           (V2DI       "wi")])
 
9374
+
 
9375
 ;; Constants for creating unspecs
 
9376
 (define_c_enum "unspec"
 
9377
   [UNSPEC_VSX_CONCAT
 
9378
@@ -228,8 +267,8 @@
 
9379
 ;; The patterns for LE permuted loads and stores come before the general
 
9380
 ;; VSX moves so they match first.
 
9381
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
9382
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
9383
-        (match_operand:VSX_D 1 "memory_operand" "Z"))]
 
9384
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
9385
+        (match_operand:VSX_LE 1 "memory_operand" "Z"))]
 
9386
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
9387
   "#"
 
9388
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
9389
@@ -251,7 +290,7 @@
 
9390
    (set_attr "length" "8")])
 
9391
 
 
9392
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
9393
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
9394
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
9395
         (match_operand:VSX_W 1 "memory_operand" "Z"))]
 
9396
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
9397
   "#"
 
9398
@@ -342,8 +381,8 @@
 
9399
    (set_attr "length" "8")])
 
9400
 
 
9401
 (define_insn "*vsx_le_perm_store_<mode>"
 
9402
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
9403
-        (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
 
9404
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
9405
+        (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
 
9406
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
9407
   "#"
 
9408
   [(set_attr "type" "vecstore")
 
9409
@@ -350,8 +389,8 @@
 
9410
    (set_attr "length" "12")])
 
9411
 
 
9412
 (define_split
 
9413
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
9414
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
9415
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
9416
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
9417
   "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
 
9418
   [(set (match_dup 2)
 
9419
         (vec_select:<MODE>
 
9420
@@ -369,8 +408,8 @@
 
9421
 ;; The post-reload split requires that we re-permute the source
 
9422
 ;; register in case it is still live.
 
9423
 (define_split
 
9424
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
9425
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
9426
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
9427
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
9428
   "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
 
9429
   [(set (match_dup 1)
 
9430
         (vec_select:<MODE>
 
9431
@@ -388,7 +427,7 @@
 
9432
 
 
9433
 (define_insn "*vsx_le_perm_store_<mode>"
 
9434
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
9435
-        (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
 
9436
+        (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
 
9437
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
9438
   "#"
 
9439
   [(set_attr "type" "vecstore")
 
9440
@@ -578,8 +617,8 @@
 
9441
 
 
9442
 
 
9443
 (define_insn "*vsx_mov<mode>"
 
9444
-  [(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")
 
9445
-       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
9446
+  [(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")
 
9447
+       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
9448
   "VECTOR_MEM_VSX_P (<MODE>mode)
 
9449
    && (register_operand (operands[0], <MODE>mode) 
 
9450
        || register_operand (operands[1], <MODE>mode))"
 
9451
@@ -681,9 +720,9 @@
 
9452
 ;; instructions are now combined with the insn for the traditional floating
 
9453
 ;; point unit.
 
9454
 (define_insn "*vsx_add<mode>3"
 
9455
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9456
-        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9457
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9458
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9459
+        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9460
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9461
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9462
   "xvadd<VSs> %x0,%x1,%x2"
 
9463
   [(set_attr "type" "<VStype_simple>")
 
9464
@@ -690,9 +729,9 @@
 
9465
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9466
 
 
9467
 (define_insn "*vsx_sub<mode>3"
 
9468
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9469
-        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9470
-                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9471
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9472
+        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9473
+                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9474
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9475
   "xvsub<VSs> %x0,%x1,%x2"
 
9476
   [(set_attr "type" "<VStype_simple>")
 
9477
@@ -699,9 +738,9 @@
 
9478
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9479
 
 
9480
 (define_insn "*vsx_mul<mode>3"
 
9481
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9482
-        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9483
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9484
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9485
+        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9486
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9487
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9488
   "xvmul<VSs> %x0,%x1,%x2"
 
9489
   [(set_attr "type" "<VStype_simple>")
 
9490
@@ -708,9 +747,9 @@
 
9491
    (set_attr "fp_type" "<VSfptype_mul>")])
 
9492
 
 
9493
 (define_insn "*vsx_div<mode>3"
 
9494
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9495
-        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9496
-                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9497
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9498
+        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9499
+                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9500
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9501
   "xvdiv<VSs> %x0,%x1,%x2"
 
9502
   [(set_attr "type" "<VStype_div>")
 
9503
@@ -746,8 +785,8 @@
 
9504
 
 
9505
 (define_insn "*vsx_tdiv<mode>3_internal"
 
9506
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
9507
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
 
9508
-                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
 
9509
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9510
+                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
9511
                   UNSPEC_VSX_TDIV))]
 
9512
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9513
   "x<VSv>tdiv<VSs> %0,%x1,%x2"
 
9514
@@ -755,8 +794,8 @@
 
9515
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9516
 
 
9517
 (define_insn "vsx_fre<mode>2"
 
9518
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9519
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
9520
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9521
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9522
                      UNSPEC_FRES))]
 
9523
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9524
   "xvre<VSs> %x0,%x1"
 
9525
@@ -764,8 +803,8 @@
 
9526
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9527
 
 
9528
 (define_insn "*vsx_neg<mode>2"
 
9529
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9530
-        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
9531
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9532
+        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9533
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9534
   "xvneg<VSs> %x0,%x1"
 
9535
   [(set_attr "type" "<VStype_simple>")
 
9536
@@ -772,8 +811,8 @@
 
9537
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9538
 
 
9539
 (define_insn "*vsx_abs<mode>2"
 
9540
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9541
-        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
9542
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9543
+        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9544
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9545
   "xvabs<VSs> %x0,%x1"
 
9546
   [(set_attr "type" "<VStype_simple>")
 
9547
@@ -780,10 +819,10 @@
 
9548
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9549
 
 
9550
 (define_insn "vsx_nabs<mode>2"
 
9551
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9552
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9553
         (neg:VSX_F
 
9554
         (abs:VSX_F
 
9555
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
 
9556
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
 
9557
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9558
   "xvnabs<VSs> %x0,%x1"
 
9559
   [(set_attr "type" "<VStype_simple>")
 
9560
@@ -790,9 +829,9 @@
 
9561
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9562
 
 
9563
 (define_insn "vsx_smax<mode>3"
 
9564
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9565
-        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9566
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9567
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9568
+        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9569
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9570
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9571
   "xvmax<VSs> %x0,%x1,%x2"
 
9572
   [(set_attr "type" "<VStype_simple>")
 
9573
@@ -799,9 +838,9 @@
 
9574
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9575
 
 
9576
 (define_insn "*vsx_smin<mode>3"
 
9577
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9578
-        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9579
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9580
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9581
+        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9582
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9583
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9584
   "xvmin<VSs> %x0,%x1,%x2"
 
9585
   [(set_attr "type" "<VStype_simple>")
 
9586
@@ -808,8 +847,8 @@
 
9587
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9588
 
 
9589
 (define_insn "*vsx_sqrt<mode>2"
 
9590
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9591
-        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
9592
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9593
+        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9594
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9595
   "xvsqrt<VSs> %x0,%x1"
 
9596
   [(set_attr "type" "<VStype_sqrt>")
 
9597
@@ -816,8 +855,8 @@
 
9598
    (set_attr "fp_type" "<VSfptype_sqrt>")])
 
9599
 
 
9600
 (define_insn "*vsx_rsqrte<mode>2"
 
9601
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9602
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
9603
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9604
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9605
                      UNSPEC_RSQRT))]
 
9606
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9607
   "xvrsqrte<VSs> %x0,%x1"
 
9608
@@ -852,7 +891,7 @@
 
9609
 
 
9610
 (define_insn "*vsx_tsqrt<mode>2_internal"
 
9611
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
9612
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
9613
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9614
                     UNSPEC_VSX_TSQRT))]
 
9615
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9616
   "x<VSv>tsqrt<VSs> %0,%x1"
 
9617
@@ -865,11 +904,11 @@
 
9618
 ;; multiply.
 
9619
 
 
9620
 (define_insn "*vsx_fmav4sf4"
 
9621
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
 
9622
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
 
9623
        (fma:V4SF
 
9624
-         (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
 
9625
-         (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
 
9626
-         (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
 
9627
+         (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
 
9628
+         (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
 
9629
+         (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
 
9630
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
9631
   "@
 
9632
    xvmaddasp %x0,%x1,%x2
 
9633
@@ -880,11 +919,11 @@
 
9634
   [(set_attr "type" "vecfloat")])
 
9635
 
 
9636
 (define_insn "*vsx_fmav2df4"
 
9637
-  [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
 
9638
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
 
9639
        (fma:V2DF
 
9640
-         (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
 
9641
-         (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
 
9642
-         (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
 
9643
+         (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
 
9644
+         (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
 
9645
+         (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
 
9646
   "VECTOR_UNIT_VSX_P (V2DFmode)"
 
9647
   "@
 
9648
    xvmaddadp %x0,%x1,%x2
 
9649
@@ -894,12 +933,12 @@
 
9650
   [(set_attr "type" "vecdouble")])
 
9651
 
 
9652
 (define_insn "*vsx_fms<mode>4"
 
9653
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
9654
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
9655
        (fma:VSX_F
 
9656
-         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
 
9657
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
9658
+         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
 
9659
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
9660
          (neg:VSX_F
 
9661
-           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
9662
+           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
9663
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9664
   "@
 
9665
    xvmsuba<VSs> %x0,%x1,%x2
 
9666
@@ -909,12 +948,12 @@
 
9667
   [(set_attr "type" "<VStype_mul>")])
 
9668
 
 
9669
 (define_insn "*vsx_nfma<mode>4"
 
9670
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
9671
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
9672
        (neg:VSX_F
 
9673
         (fma:VSX_F
 
9674
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
 
9675
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
9676
-         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
9677
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
 
9678
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
9679
+         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
9680
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9681
   "@
 
9682
    xvnmadda<VSs> %x0,%x1,%x2
 
9683
@@ -959,9 +998,9 @@
 
9684
 
 
9685
 ;; Vector conditional expressions (no scalar version for these instructions)
 
9686
 (define_insn "vsx_eq<mode>"
 
9687
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9688
-       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9689
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9690
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9691
+       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9692
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9693
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9694
   "xvcmpeq<VSs> %x0,%x1,%x2"
 
9695
   [(set_attr "type" "<VStype_simple>")
 
9696
@@ -968,9 +1007,9 @@
 
9697
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9698
 
 
9699
 (define_insn "vsx_gt<mode>"
 
9700
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9701
-       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9702
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9703
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9704
+       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9705
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9706
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9707
   "xvcmpgt<VSs> %x0,%x1,%x2"
 
9708
   [(set_attr "type" "<VStype_simple>")
 
9709
@@ -977,9 +1016,9 @@
 
9710
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9711
 
 
9712
 (define_insn "*vsx_ge<mode>"
 
9713
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9714
-       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9715
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
9716
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9717
+       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9718
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9719
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9720
   "xvcmpge<VSs> %x0,%x1,%x2"
 
9721
   [(set_attr "type" "<VStype_simple>")
 
9722
@@ -990,10 +1029,10 @@
 
9723
 (define_insn "*vsx_eq_<mode>_p"
 
9724
   [(set (reg:CC 74)
 
9725
        (unspec:CC
 
9726
-        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
9727
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
9728
+        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
9729
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
9730
         UNSPEC_PREDICATE))
 
9731
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9732
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9733
        (eq:VSX_F (match_dup 1)
 
9734
                  (match_dup 2)))]
 
9735
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9736
@@ -1003,10 +1042,10 @@
 
9737
 (define_insn "*vsx_gt_<mode>_p"
 
9738
   [(set (reg:CC 74)
 
9739
        (unspec:CC
 
9740
-        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
9741
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
9742
+        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
9743
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
9744
         UNSPEC_PREDICATE))
 
9745
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9746
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9747
        (gt:VSX_F (match_dup 1)
 
9748
                  (match_dup 2)))]
 
9749
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9750
@@ -1016,10 +1055,10 @@
 
9751
 (define_insn "*vsx_ge_<mode>_p"
 
9752
   [(set (reg:CC 74)
 
9753
        (unspec:CC
 
9754
-        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
9755
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
9756
+        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
9757
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
9758
         UNSPEC_PREDICATE))
 
9759
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9760
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9761
        (ge:VSX_F (match_dup 1)
 
9762
                  (match_dup 2)))]
 
9763
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9764
@@ -1028,23 +1067,23 @@
 
9765
 
 
9766
 ;; Vector select
 
9767
 (define_insn "*vsx_xxsel<mode>"
 
9768
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
9769
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9770
        (if_then_else:VSX_L
 
9771
-        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
9772
+        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9773
                (match_operand:VSX_L 4 "zero_constant" ""))
 
9774
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
9775
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
9776
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
9777
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9778
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
9779
   "xxsel %x0,%x3,%x2,%x1"
 
9780
   [(set_attr "type" "vecperm")])
 
9781
 
 
9782
 (define_insn "*vsx_xxsel<mode>_uns"
 
9783
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
9784
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9785
        (if_then_else:VSX_L
 
9786
-        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
9787
+        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9788
                   (match_operand:VSX_L 4 "zero_constant" ""))
 
9789
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
9790
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
9791
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
9792
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9793
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
9794
   "xxsel %x0,%x3,%x2,%x1"
 
9795
   [(set_attr "type" "vecperm")])
 
9796
@@ -1051,10 +1090,10 @@
 
9797
 
 
9798
 ;; Copy sign
 
9799
 (define_insn "vsx_copysign<mode>3"
 
9800
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9801
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9802
        (unspec:VSX_F
 
9803
-        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
9804
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
 
9805
+        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
9806
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
9807
         UNSPEC_COPYSIGN))]
 
9808
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9809
   "xvcpsgn<VSs> %x0,%x2,%x1"
 
9810
@@ -1067,7 +1106,7 @@
 
9811
 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
 
9812
 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
 
9813
 (define_insn "vsx_float<VSi><mode>2"
 
9814
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
9815
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
9816
        (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
9817
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9818
   "x<VSv>cvsx<VSc><VSs> %x0,%x1"
 
9819
@@ -1075,7 +1114,7 @@
 
9820
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9821
 
 
9822
 (define_insn "vsx_floatuns<VSi><mode>2"
 
9823
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
9824
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
9825
        (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
9826
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9827
   "x<VSv>cvux<VSc><VSs> %x0,%x1"
 
9828
@@ -1084,7 +1123,7 @@
 
9829
 
 
9830
 (define_insn "vsx_fix_trunc<mode><VSi>2"
 
9831
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
9832
-       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
9833
+       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
9834
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9835
   "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
 
9836
   [(set_attr "type" "<VStype_simple>")
 
9837
@@ -1092,7 +1131,7 @@
 
9838
 
 
9839
 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
 
9840
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
9841
-       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
9842
+       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
9843
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9844
   "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
 
9845
   [(set_attr "type" "<VStype_simple>")
 
9846
@@ -1100,8 +1139,8 @@
 
9847
 
 
9848
 ;; Math rounding functions
 
9849
 (define_insn "vsx_x<VSv>r<VSs>i"
 
9850
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
9851
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
9852
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9853
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9854
                      UNSPEC_VSX_ROUND_I))]
 
9855
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9856
   "x<VSv>r<VSs>i %x0,%x1"
 
9857
@@ -1109,8 +1148,8 @@
 
9858
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9859
 
 
9860
 (define_insn "vsx_x<VSv>r<VSs>ic"
 
9861
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
9862
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
9863
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9864
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9865
                      UNSPEC_VSX_ROUND_IC))]
 
9866
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9867
   "x<VSv>r<VSs>ic %x0,%x1"
 
9868
@@ -1118,8 +1157,8 @@
 
9869
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9870
 
 
9871
 (define_insn "vsx_btrunc<mode>2"
 
9872
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9873
-       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
9874
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9875
+       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
9876
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9877
   "xvr<VSs>iz %x0,%x1"
 
9878
   [(set_attr "type" "<VStype_simple>")
 
9879
@@ -1126,8 +1165,8 @@
 
9880
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9881
 
 
9882
 (define_insn "*vsx_b2trunc<mode>2"
 
9883
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
9884
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
9885
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9886
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9887
                      UNSPEC_FRIZ))]
 
9888
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9889
   "x<VSv>r<VSs>iz %x0,%x1"
 
9890
@@ -1135,8 +1174,8 @@
 
9891
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9892
 
 
9893
 (define_insn "vsx_floor<mode>2"
 
9894
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9895
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
9896
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9897
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9898
                      UNSPEC_FRIM))]
 
9899
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9900
   "xvr<VSs>im %x0,%x1"
 
9901
@@ -1144,8 +1183,8 @@
 
9902
    (set_attr "fp_type" "<VSfptype_simple>")])
 
9903
 
 
9904
 (define_insn "vsx_ceil<mode>2"
 
9905
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
9906
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
9907
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9908
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
9909
                      UNSPEC_FRIP))]
 
9910
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9911
   "xvr<VSs>ip %x0,%x1"
 
9912
@@ -1160,8 +1199,8 @@
 
9913
 ;; scalar single precision instructions internally use the double format.
 
9914
 ;; Prefer the altivec registers, since we likely will need to do a vperm
 
9915
 (define_insn "vsx_<VS_spdp_insn>"
 
9916
-  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
 
9917
-       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
 
9918
+  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
 
9919
+       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
 
9920
                              UNSPEC_VSX_CVSPDP))]
 
9921
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
9922
   "<VS_spdp_insn> %x0,%x1"
 
9923
@@ -1169,8 +1208,8 @@
 
9924
 
 
9925
 ;; xscvspdp, represent the scalar SF type as V4SF
 
9926
 (define_insn "vsx_xscvspdp"
 
9927
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
9928
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
9929
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
 
9930
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
 
9931
                   UNSPEC_VSX_CVSPDP))]
 
9932
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
9933
   "xscvspdp %x0,%x1"
 
9934
@@ -1197,7 +1236,7 @@
 
9935
 
 
9936
 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
 
9937
 (define_insn "vsx_xscvdpspn"
 
9938
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
 
9939
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
 
9940
        (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
 
9941
                     UNSPEC_VSX_CVDPSPN))]
 
9942
   "TARGET_XSCVDPSPN"
 
9943
@@ -1205,8 +1244,8 @@
 
9944
   [(set_attr "type" "fp")])
 
9945
 
 
9946
 (define_insn "vsx_xscvspdpn"
 
9947
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
9948
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
9949
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
 
9950
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
 
9951
                   UNSPEC_VSX_CVSPDPN))]
 
9952
   "TARGET_XSCVSPDPN"
 
9953
   "xscvspdpn %x0,%x1"
 
9954
@@ -1213,8 +1252,8 @@
 
9955
   [(set_attr "type" "fp")])
 
9956
 
 
9957
 (define_insn "vsx_xscvdpspn_scalar"
 
9958
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
 
9959
-       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
 
9960
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
 
9961
+       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
 
9962
                     UNSPEC_VSX_CVDPSPN))]
 
9963
   "TARGET_XSCVDPSPN"
 
9964
   "xscvdpspn %x0,%x1"
 
9965
@@ -1302,10 +1341,10 @@
 
9966
 ;; since the xsrdpiz instruction does not truncate the value if the floating
 
9967
 ;; point value is < LONG_MIN or > LONG_MAX.
 
9968
 (define_insn "*vsx_float_fix_<mode>2"
 
9969
-  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
 
9970
+  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9971
        (float:VSX_DF
 
9972
         (fix:<VSI>
 
9973
-         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
 
9974
+         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
 
9975
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
9976
    && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
 
9977
    && !flag_trapping_math && TARGET_FRIZ"
 
9978
@@ -1318,10 +1357,10 @@
 
9979
 
 
9980
 ;; Build a V2DF/V2DI vector from two scalars
 
9981
 (define_insn "vsx_concat_<mode>"
 
9982
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
 
9983
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
9984
        (vec_concat:VSX_D
 
9985
-        (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
 
9986
-        (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
 
9987
+        (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
9988
+        (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
 
9989
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
9990
 {
 
9991
   if (BYTES_BIG_ENDIAN)
 
9992
@@ -1352,9 +1391,9 @@
 
9993
 ;; xxpermdi for little endian loads and stores.  We need several of
 
9994
 ;; these since the form of the PARALLEL differs by mode.
 
9995
 (define_insn "*vsx_xxpermdi2_le_<mode>"
 
9996
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
9997
-        (vec_select:VSX_D
 
9998
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
9999
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
10000
+        (vec_select:VSX_LE
 
10001
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
10002
           (parallel [(const_int 1) (const_int 0)])))]
 
10003
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
10004
   "xxpermdi %x0,%x1,%x1,2"
 
10005
@@ -1361,9 +1400,9 @@
 
10006
   [(set_attr "type" "vecperm")])
 
10007
 
 
10008
 (define_insn "*vsx_xxpermdi4_le_<mode>"
 
10009
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
10010
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
10011
         (vec_select:VSX_W
 
10012
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
10013
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
10014
           (parallel [(const_int 2) (const_int 3)
 
10015
                      (const_int 0) (const_int 1)])))]
 
10016
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
10017
@@ -1401,9 +1440,9 @@
 
10018
 ;; lxvd2x for little endian loads.  We need several of
 
10019
 ;; these since the form of the PARALLEL differs by mode.
 
10020
 (define_insn "*vsx_lxvd2x2_le_<mode>"
 
10021
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
10022
-        (vec_select:VSX_D
 
10023
-          (match_operand:VSX_D 1 "memory_operand" "Z")
 
10024
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
10025
+        (vec_select:VSX_LE
 
10026
+          (match_operand:VSX_LE 1 "memory_operand" "Z")
 
10027
           (parallel [(const_int 1) (const_int 0)])))]
 
10028
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
10029
   "lxvd2x %x0,%y1"
 
10030
@@ -1410,7 +1449,7 @@
 
10031
   [(set_attr "type" "vecload")])
 
10032
 
 
10033
 (define_insn "*vsx_lxvd2x4_le_<mode>"
 
10034
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
10035
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
10036
         (vec_select:VSX_W
 
10037
           (match_operand:VSX_W 1 "memory_operand" "Z")
 
10038
           (parallel [(const_int 2) (const_int 3)
 
10039
@@ -1450,9 +1489,9 @@
 
10040
 ;; stxvd2x for little endian stores.  We need several of
 
10041
 ;; these since the form of the PARALLEL differs by mode.
 
10042
 (define_insn "*vsx_stxvd2x2_le_<mode>"
 
10043
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
10044
-        (vec_select:VSX_D
 
10045
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
10046
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
10047
+        (vec_select:VSX_LE
 
10048
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
10049
           (parallel [(const_int 1) (const_int 0)])))]
 
10050
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
10051
   "stxvd2x %x1,%y0"
 
10052
@@ -1461,7 +1500,7 @@
 
10053
 (define_insn "*vsx_stxvd2x4_le_<mode>"
 
10054
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
10055
         (vec_select:VSX_W
 
10056
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
10057
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
10058
           (parallel [(const_int 2) (const_int 3)
 
10059
                      (const_int 0) (const_int 1)])))]
 
10060
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
10061
@@ -1513,11 +1552,12 @@
 
10062
 
 
10063
 ;; Set the element of a V2DI/VD2F mode
 
10064
 (define_insn "vsx_set_<mode>"
 
10065
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
 
10066
-       (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
 
10067
-                      (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
 
10068
-                      (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
10069
-                     UNSPEC_VSX_SET))]
 
10070
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
 
10071
+       (unspec:VSX_D
 
10072
+        [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
 
10073
+         (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
10074
+         (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
10075
+        UNSPEC_VSX_SET))]
 
10076
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10077
 {
 
10078
   int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
 
10079
@@ -1582,7 +1622,7 @@
 
10080
 (define_insn_and_split "vsx_extract_v4sf"
 
10081
   [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
 
10082
        (vec_select:SF
 
10083
-        (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
 
10084
+        (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
 
10085
         (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
 
10086
    (clobber (match_scratch:V4SF 3 "=X,0"))]
 
10087
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
10088
@@ -1606,7 +1646,7 @@
 
10089
     {
 
10090
       if (GET_CODE (op3) == SCRATCH)
 
10091
        op3 = gen_reg_rtx (V4SFmode);
 
10092
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
 
10093
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
 
10094
       tmp = op3;
 
10095
     }
 
10096
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
 
10097
@@ -1765,9 +1805,9 @@
 
10098
 
 
10099
 ;; V2DF/V2DI splat
 
10100
 (define_insn "vsx_splat_<mode>"
 
10101
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
 
10102
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
 
10103
        (vec_duplicate:VSX_D
 
10104
-        (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
 
10105
+        (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
 
10106
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10107
   "@
 
10108
    xxpermdi %x0,%x1,%x1,0
 
10109
@@ -1780,10 +1820,10 @@
 
10110
 
 
10111
 ;; V4SF/V4SI splat
 
10112
 (define_insn "vsx_xxspltw_<mode>"
 
10113
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
10114
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
10115
        (vec_duplicate:VSX_W
 
10116
         (vec_select:<VS_scalar>
 
10117
-         (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
10118
+         (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
10119
          (parallel
 
10120
           [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
 
10121
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10122
@@ -1796,8 +1836,8 @@
 
10123
   [(set_attr "type" "vecperm")])
 
10124
 
 
10125
 (define_insn "vsx_xxspltw_<mode>_direct"
 
10126
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
10127
-        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
10128
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
10129
+        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
10130
                        (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
 
10131
                       UNSPEC_VSX_XXSPLTW))]
 
10132
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10133
@@ -1806,11 +1846,11 @@
 
10134
 
 
10135
 ;; V4SF/V4SI interleave
 
10136
 (define_insn "vsx_xxmrghw_<mode>"
 
10137
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
10138
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
10139
         (vec_select:VSX_W
 
10140
          (vec_concat:<VS_double>
 
10141
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
10142
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
 
10143
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
10144
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
 
10145
          (parallel [(const_int 0) (const_int 4)
 
10146
                     (const_int 1) (const_int 5)])))]
 
10147
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10148
@@ -1823,11 +1863,11 @@
 
10149
   [(set_attr "type" "vecperm")])
 
10150
 
 
10151
 (define_insn "vsx_xxmrglw_<mode>"
 
10152
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
10153
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
10154
        (vec_select:VSX_W
 
10155
          (vec_concat:<VS_double>
 
10156
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
10157
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
 
10158
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
10159
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
 
10160
          (parallel [(const_int 2) (const_int 6)
 
10161
                     (const_int 3) (const_int 7)])))]
 
10162
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10163
@@ -1841,9 +1881,9 @@
 
10164
 
 
10165
 ;; Shift left double by word immediate
 
10166
 (define_insn "vsx_xxsldwi_<mode>"
 
10167
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
 
10168
-       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
 
10169
-                      (match_operand:VSX_L 2 "vsx_register_operand" "wa")
 
10170
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
 
10171
+       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
 
10172
+                      (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
 
10173
                       (match_operand:QI 3 "u5bit_cint_operand" "i")]
 
10174
                      UNSPEC_VSX_SLDWI))]
 
10175
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
10176
@@ -1924,7 +1964,7 @@
 
10177
 ;; to the top element of the V2DF array without doing an extract.
 
10178
 
 
10179
 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
 
10180
-  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
 
10181
+  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
 
10182
        (vec_select:DF
 
10183
         (VEC_reduc:V2DF
 
10184
          (vec_concat:V2DF
 
10185
Index: gcc/config/rs6000/rs6000.h
 
10186
===================================================================
 
10187
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_8_3_release)
 
10188
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_8-branch)
 
10189
@@ -1438,6 +1438,10 @@
 
10190
   RS6000_CONSTRAINT_wd,                /* VSX register for V2DF */
 
10191
   RS6000_CONSTRAINT_wf,                /* VSX register for V4SF */
 
10192
   RS6000_CONSTRAINT_wg,                /* FPR register for -mmfpgpr */
 
10193
+  RS6000_CONSTRAINT_wh,                /* FPR register for direct moves.  */
 
10194
+  RS6000_CONSTRAINT_wi,                /* FPR/VSX register to hold DImode */
 
10195
+  RS6000_CONSTRAINT_wj,                /* FPR/VSX register for DImode direct moves. */
 
10196
+  RS6000_CONSTRAINT_wk,                /* FPR/VSX register for DFmode direct moves. */
 
10197
   RS6000_CONSTRAINT_wl,                /* FPR register for LFIWAX */
 
10198
   RS6000_CONSTRAINT_wm,                /* VSX register for direct move */
 
10199
   RS6000_CONSTRAINT_wr,                /* GPR register if 64-bit  */
 
10200
@@ -1462,6 +1466,9 @@
 
10201
 #define VSX_REG_CLASS_P(CLASS)                 \
 
10202
   ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
 
10203
 
 
10204
+/* Return whether a given register class targets general purpose registers.  */
 
10205
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
 
10206
+
 
10207
 /* Given an rtx X being reloaded into a reg required to be
 
10208
    in class CLASS, return the class of reg to actually use.
 
10209
    In general this is just CLASS; but on some machines
 
10210
@@ -1593,8 +1600,15 @@
 
10211
 /* Define this if stack space is still allocated for a parameter passed
 
10212
    in a register.  The value is the number of bytes allocated to this
 
10213
    area.  */
 
10214
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
 
10215
+#define REG_PARM_STACK_SPACE(FNDECL) \
 
10216
+  rs6000_reg_parm_stack_space ((FNDECL), false)
 
10217
 
 
10218
+/* Define this macro if space guaranteed when compiling a function body
 
10219
+   is different to space required when making a call, a situation that
 
10220
+   can arise with K&R style function definitions.  */
 
10221
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
 
10222
+  rs6000_reg_parm_stack_space ((FNDECL), true)
 
10223
+
 
10224
 /* Define this if the above stack space is to be considered part of the
 
10225
    space allocated by the caller.  */
 
10226
 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
 
10227
@@ -2483,8 +2497,8 @@
 
10228
 #define RS6000_BTC_SAT         RS6000_BTC_MISC /* saturate sets VSCR.  */
 
10229
 
 
10230
 /* Builtin targets.  For now, we reuse the masks for those options that are in
 
10231
-   target flags, and pick two random bits for SPE and paired which aren't in
 
10232
-   target_flags.  */
 
10233
+   target flags, and pick three random bits for SPE, paired and ldbl128 which
 
10234
+   aren't in target_flags.  */
 
10235
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
 
10236
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
 
10237
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
 
10238
@@ -2501,6 +2515,7 @@
 
10239
 #define RS6000_BTM_CELL                MASK_FPRND      /* Target is cell powerpc.  */
 
10240
 #define RS6000_BTM_DFP         MASK_DFP        /* Decimal floating point.  */
 
10241
 #define RS6000_BTM_HARD_FLOAT  MASK_SOFT_FLOAT /* Hardware floating point.  */
 
10242
+#define RS6000_BTM_LDBL128     MASK_MULTIPLE   /* 128-bit long double.  */
 
10243
 
 
10244
 #define RS6000_BTM_COMMON      (RS6000_BTM_ALTIVEC                     \
 
10245
                                 | RS6000_BTM_VSX                       \
 
10246
@@ -2514,7 +2529,8 @@
 
10247
                                 | RS6000_BTM_POPCNTD                   \
 
10248
                                 | RS6000_BTM_CELL                      \
 
10249
                                 | RS6000_BTM_DFP                       \
 
10250
-                                | RS6000_BTM_HARD_FLOAT)
 
10251
+                                | RS6000_BTM_HARD_FLOAT                \
 
10252
+                                | RS6000_BTM_LDBL128)
 
10253
 
 
10254
 /* Define builtin enum index.  */
 
10255
 
 
10256
Index: gcc/config/rs6000/altivec.md
 
10257
===================================================================
 
10258
--- a/src/gcc/config/rs6000/altivec.md  (.../tags/gcc_4_8_3_release)
 
10259
+++ b/src/gcc/config/rs6000/altivec.md  (.../branches/gcc-4_8-branch)
 
10260
@@ -2297,7 +2297,31 @@
 
10261
   "dststt %0,%1,%2"
 
10262
   [(set_attr "type" "vecsimple")])
 
10263
 
 
10264
-(define_insn "altivec_lvsl"
 
10265
+(define_expand "altivec_lvsl"
 
10266
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
10267
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
10268
+  "TARGET_ALTIVEC"
 
10269
+{
 
10270
+  if (VECTOR_ELT_ORDER_BIG)
 
10271
+    emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
 
10272
+  else
 
10273
+    {
 
10274
+      int i;
 
10275
+      rtx mask, perm[16], constv, vperm;
 
10276
+      mask = gen_reg_rtx (V16QImode);
 
10277
+      emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
 
10278
+      for (i = 0; i < 16; ++i)
 
10279
+        perm[i] = GEN_INT (i);
 
10280
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
10281
+      constv = force_reg (V16QImode, constv);
 
10282
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
10283
+                              UNSPEC_VPERM);
 
10284
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
10285
+    }
 
10286
+  DONE;
 
10287
+})
 
10288
+
 
10289
+(define_insn "altivec_lvsl_direct"
 
10290
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
10291
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
10292
                      UNSPEC_LVSL))]
 
10293
@@ -2305,7 +2329,31 @@
 
10294
   "lvsl %0,%y1"
 
10295
   [(set_attr "type" "vecload")])
 
10296
 
 
10297
-(define_insn "altivec_lvsr"
 
10298
+(define_expand "altivec_lvsr"
 
10299
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
10300
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
10301
+  "TARGET_ALTIVEC"
 
10302
+{
 
10303
+  if (VECTOR_ELT_ORDER_BIG)
 
10304
+    emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
 
10305
+  else
 
10306
+    {
 
10307
+      int i;
 
10308
+      rtx mask, perm[16], constv, vperm;
 
10309
+      mask = gen_reg_rtx (V16QImode);
 
10310
+      emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
 
10311
+      for (i = 0; i < 16; ++i)
 
10312
+        perm[i] = GEN_INT (i);
 
10313
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
10314
+      constv = force_reg (V16QImode, constv);
 
10315
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
10316
+                              UNSPEC_VPERM);
 
10317
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
10318
+    }
 
10319
+  DONE;
 
10320
+})
 
10321
+
 
10322
+(define_insn "altivec_lvsr_direct"
 
10323
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
10324
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
10325
                      UNSPEC_LVSR))]
 
10326
Index: gcc/config/rs6000/rs6000.md
 
10327
===================================================================
 
10328
--- a/src/gcc/config/rs6000/rs6000.md   (.../tags/gcc_4_8_3_release)
 
10329
+++ b/src/gcc/config/rs6000/rs6000.md   (.../branches/gcc-4_8-branch)
 
10330
@@ -134,6 +134,7 @@
 
10331
    UNSPEC_UNPACK_128BIT
 
10332
    UNSPEC_PACK_128BIT
 
10333
    UNSPEC_LSQ
 
10334
+   UNSPEC_FUSION_GPR
 
10335
   ])
 
10336
 
 
10337
 ;;
 
10338
@@ -317,8 +318,25 @@
 
10339
 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0")  (SD "stxsiwzx %x1,%y0")])
 
10340
 
 
10341
 ; Definitions for 32-bit fpr direct move
 
10342
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
 
10343
+; At present, the decimal modes are not allowed in the traditional altivec
 
10344
+; registers, so restrict the constraints to just the traditional FPRs.
 
10345
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
 
10346
 
 
10347
+; Definitions for 32-bit VSX
 
10348
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
 
10349
+
 
10350
+; Definitions for 32-bit use of altivec registers
 
10351
+(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
 
10352
+
 
10353
+; Definitions for 64-bit VSX
 
10354
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
 
10355
+
 
10356
+; Definitions for 64-bit direct move
 
10357
+(define_mode_attr f64_dm  [(DF "wk") (DD "wh")])
 
10358
+
 
10359
+; Definitions for 64-bit use of altivec registers
 
10360
+(define_mode_attr f64_av  [(DF "wv") (DD "wn")])
 
10361
+
 
10362
 ; These modes do not fit in integer registers in 32-bit mode.
 
10363
 ; but on e500v2, the gpr are 64 bit registers
 
10364
 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
 
10365
@@ -424,7 +442,7 @@
 
10366
 ;; either.
 
10367
 
 
10368
 ;; Mode attribute for boolean operation register constraints for output
 
10369
-(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wa,v")
 
10370
+(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wt,v")
 
10371
                                         (PTI   "&r,r,r")
 
10372
                                         (V16QI "wa,v,&?r,?r,?r")
 
10373
                                         (V8HI  "wa,v,&?r,?r,?r")
 
10374
@@ -435,7 +453,7 @@
 
10375
                                         (V1TI  "wa,v,&?r,?r,?r")])
 
10376
 
 
10377
 ;; Mode attribute for boolean operation register constraints for operand1
 
10378
-(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wa,v")
 
10379
+(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wt,v")
 
10380
                                         (PTI   "r,0,r")
 
10381
                                         (V16QI "wa,v,r,0,r")
 
10382
                                         (V8HI  "wa,v,r,0,r")
 
10383
@@ -446,7 +464,7 @@
 
10384
                                         (V1TI  "wa,v,r,0,r")])
 
10385
 
 
10386
 ;; Mode attribute for boolean operation register constraints for operand2
 
10387
-(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wa,v")
 
10388
+(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wt,v")
 
10389
                                         (PTI   "r,r,0")
 
10390
                                         (V16QI "wa,v,r,r,0")
 
10391
                                         (V8HI  "wa,v,r,r,0")
 
10392
@@ -459,7 +477,7 @@
 
10393
 ;; Mode attribute for boolean operation register constraints for operand1
 
10394
 ;; for one_cmpl.  To simplify things, we repeat the constraint where 0
 
10395
 ;; is used for operand1 or operand2
 
10396
-(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wa,v")
 
10397
+(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wt,v")
 
10398
                                         (PTI   "r,0,0")
 
10399
                                         (V16QI "wa,v,r,0,0")
 
10400
                                         (V8HI  "wa,v,r,0,0")
 
10401
@@ -566,7 +584,7 @@
 
10402
   "")
 
10403
 
 
10404
 (define_insn "*zero_extendsidi2_lfiwzx"
 
10405
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
 
10406
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
 
10407
        (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
 
10408
   "TARGET_POWERPC64 && TARGET_LFIWZX"
 
10409
   "@
 
10410
@@ -736,8 +754,8 @@
 
10411
   "")
 
10412
 
 
10413
 (define_insn "*extendsidi2_lfiwax"
 
10414
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
 
10415
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
 
10416
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
 
10417
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
 
10418
   "TARGET_POWERPC64 && TARGET_LFIWAX"
 
10419
   "@
 
10420
    lwa%U1%X1 %0,%1
 
10421
@@ -760,7 +778,7 @@
 
10422
 
 
10423
 (define_insn "*extendsidi2_nocell"
 
10424
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 
10425
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
 
10426
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
 
10427
   "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
 
10428
   "@
 
10429
    lwa%U1%X1 %0,%1
 
10430
@@ -5614,7 +5632,7 @@
 
10431
 ; We don't define lfiwax/lfiwzx with the normal definition, because we
 
10432
 ; don't want to support putting SImode in FPR registers.
 
10433
 (define_insn "lfiwax"
 
10434
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
10435
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
10436
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
10437
                   UNSPEC_LFIWAX))]
 
10438
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
 
10439
@@ -5694,7 +5712,7 @@
 
10440
    (set_attr "type" "fpload")])
 
10441
 
 
10442
 (define_insn "lfiwzx"
 
10443
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
10444
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
10445
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
10446
                   UNSPEC_LFIWZX))]
 
10447
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
 
10448
@@ -9210,8 +9228,8 @@
 
10449
 }")
 
10450
 
 
10451
 (define_insn "mov<mode>_hardfloat"
 
10452
-  [(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")
 
10453
-       (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"))]
 
10454
+  [(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")
 
10455
+       (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"))]
 
10456
   "(gpc_reg_operand (operands[0], <MODE>mode)
 
10457
    || gpc_reg_operand (operands[1], <MODE>mode))
 
10458
    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
 
10459
@@ -9422,8 +9440,8 @@
 
10460
 ;; reloading.
 
10461
 
 
10462
 (define_insn "*mov<mode>_hardfloat32"
 
10463
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
 
10464
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
 
10465
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
 
10466
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
 
10467
   "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
 
10468
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
10469
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
10470
@@ -9491,8 +9509,8 @@
 
10471
 ; ld/std require word-aligned displacements -> 'Y' constraint.
 
10472
 ; List Y->r and r->Y before r->r for reload.
 
10473
 (define_insn "*mov<mode>_hardfloat64"
 
10474
-  [(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")
 
10475
-       (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"))]
 
10476
+  [(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>")
 
10477
+       (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"))]
 
10478
   "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
10479
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
10480
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
10481
@@ -10272,8 +10290,8 @@
 
10482
 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
 
10483
 
 
10484
 (define_insn "*movdi_internal64"
 
10485
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
 
10486
-       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
 
10487
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
 
10488
+       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
 
10489
   "TARGET_POWERPC64
 
10490
    && (gpc_reg_operand (operands[0], DImode)
 
10491
        || gpc_reg_operand (operands[1], DImode))"
 
10492
@@ -10293,7 +10311,8 @@
 
10493
    mftgpr %0,%1
 
10494
    mffgpr %0,%1
 
10495
    mfvsrd %0,%x1
 
10496
-   mtvsrd %x0,%1"
 
10497
+   mtvsrd %x0,%1
 
10498
+   xxlxor %x0,%x0,%x0"
 
10499
   [(set_attr_alternative "type"
 
10500
       [(if_then_else
 
10501
         (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
 
10502
@@ -10334,8 +10353,9 @@
 
10503
        (const_string "mftgpr")
 
10504
        (const_string "mffgpr")
 
10505
        (const_string "mftgpr")
 
10506
-       (const_string "mffgpr")])
 
10507
-   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
 
10508
+       (const_string "mffgpr")
 
10509
+       (const_string "vecsimple")])
 
10510
+   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
 
10511
 
 
10512
 ;; immediate value valid for a single instruction hiding in a const_double
 
10513
 (define_insn ""
 
10514
@@ -15751,23 +15771,10 @@
 
10515
 ;; a GPR.  The addis instruction must be adjacent to the load, and use the same
 
10516
 ;; register that is being loaded.  The fused ops must be physically adjacent.
 
10517
 
 
10518
-;; We use define_peephole for the actual addis/load, and the register used to
 
10519
-;; hold the addis value must be the same as the register being loaded.  We use
 
10520
-;; define_peephole2 to change the register used for addis to be the register
 
10521
-;; being loaded, since we can look at whether it is dead after the load insn.
 
10522
+;; Find cases where the addis that feeds into a load instruction is either used
 
10523
+;; once or is the same as the target register, and replace it with the fusion
 
10524
+;; insn
 
10525
 
 
10526
-(define_peephole
 
10527
-  [(set (match_operand:P 0 "base_reg_operand" "")
 
10528
-       (match_operand:P 1 "fusion_gpr_addis" ""))
 
10529
-   (set (match_operand:INT1 2 "base_reg_operand" "")
 
10530
-       (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
10531
-  "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
 
10532
-{
 
10533
-  return emit_fusion_gpr_load (operands);
 
10534
-}
 
10535
-  [(set_attr "type" "load")
 
10536
-   (set_attr "length" "8")])
 
10537
-
 
10538
 (define_peephole2
 
10539
   [(set (match_operand:P 0 "base_reg_operand" "")
 
10540
        (match_operand:P 1 "fusion_gpr_addis" ""))
 
10541
@@ -15774,9 +15781,8 @@
 
10542
    (set (match_operand:INT1 2 "base_reg_operand" "")
 
10543
        (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
10544
   "TARGET_P8_FUSION
 
10545
-   && (REGNO (operands[0]) != REGNO (operands[2])
 
10546
-       || GET_CODE (operands[3]) == SIGN_EXTEND)
 
10547
-   && fusion_gpr_load_p (operands, true)"
 
10548
+   && fusion_gpr_load_p (operands[0], operands[1], operands[2],
 
10549
+                        operands[3])"
 
10550
   [(const_int 0)]
 
10551
 {
 
10552
   expand_fusion_gpr_load (operands);
 
10553
@@ -15783,6 +15789,20 @@
 
10554
   DONE;
 
10555
 })
 
10556
 
 
10557
+;; Fusion insn, created by the define_peephole2 above (and eventually by
 
10558
+;; reload)
 
10559
+
 
10560
+(define_insn "fusion_gpr_load_<mode>"
 
10561
+  [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
 
10562
+       (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
 
10563
+                    UNSPEC_FUSION_GPR))]
 
10564
+  "TARGET_P8_FUSION"
 
10565
+{
 
10566
+  return emit_fusion_gpr_load (operands[0], operands[1]);
 
10567
+}
 
10568
+  [(set_attr "type" "load")
 
10569
+   (set_attr "length" "8")])
 
10570
+
 
10571
 
 
10572
 ;; Miscellaneous ISA 2.06 (power7) instructions
 
10573
 (define_insn "addg6s"
 
10574
@@ -15847,26 +15867,6 @@
 
10575
   ""
 
10576
   "")
 
10577
 
 
10578
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
 
10579
-;; and __builtin_longdouble_dw1 to optimize glibc.  Add support for these
 
10580
-;; builtins here.
 
10581
-
 
10582
-(define_expand "unpacktf_0"
 
10583
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
10584
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
10585
-                   (const_int 0)]
 
10586
-        UNSPEC_UNPACK_128BIT))]
 
10587
-  ""
 
10588
-  "")
 
10589
-
 
10590
-(define_expand "unpacktf_1"
 
10591
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
10592
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
10593
-                   (const_int 1)]
 
10594
-        UNSPEC_UNPACK_128BIT))]
 
10595
-  ""
 
10596
-  "")
 
10597
-
 
10598
 (define_insn_and_split "unpack<mode>_dm"
 
10599
   [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
 
10600
        (unspec:<FP128_64>
 
10601
Index: gcc/config/rs6000/sysv4.h
 
10602
===================================================================
 
10603
--- a/src/gcc/config/rs6000/sysv4.h     (.../tags/gcc_4_8_3_release)
 
10604
+++ b/src/gcc/config/rs6000/sysv4.h     (.../branches/gcc-4_8-branch)
 
10605
@@ -292,7 +292,7 @@
 
10606
 /* An expression for the alignment of a structure field FIELD if the
 
10607
    alignment computed in the usual way is COMPUTED.  */
 
10608
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                  \
 
10609
-       ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
10610
+       (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))            \
 
10611
         ? 128 : COMPUTED)
 
10612
 
 
10613
 #undef  BIGGEST_FIELD_ALIGNMENT
 
10614
@@ -949,3 +949,27 @@
 
10615
 #define TARGET_USES_SYSV4_OPT 1
 
10616
 
 
10617
 #undef DBX_REGISTER_NUMBER
 
10618
+
 
10619
+/* Link -lasan early on the command line.  For -static-libasan, don't link
 
10620
+   it for -shared link, the executable should be compiled with -static-libasan
 
10621
+   in that case, and for executable link link with --{,no-}whole-archive around
 
10622
+   it to force everything into the executable.  And similarly for -ltsan.  */
 
10623
+#if defined(HAVE_LD_STATIC_DYNAMIC)
 
10624
+#undef LIBASAN_EARLY_SPEC
 
10625
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
 
10626
+  "%{static-libasan:%{!shared:" \
 
10627
+  LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
 
10628
+  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
 
10629
+#undef LIBTSAN_EARLY_SPEC
 
10630
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
 
10631
+  LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
 
10632
+  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
 
10633
+#endif
 
10634
+
 
10635
+/* Additional libraries needed by -static-libasan.  */
 
10636
+#undef STATIC_LIBASAN_LIBS
 
10637
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
 
10638
+
 
10639
+/* Additional libraries needed by -static-libtsan.  */
 
10640
+#undef STATIC_LIBTSAN_LIBS
 
10641
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
 
10642
Index: gcc/config/arm/arm.c
 
10643
===================================================================
 
10644
--- a/src/gcc/config/arm/arm.c  (.../tags/gcc_4_8_3_release)
 
10645
+++ b/src/gcc/config/arm/arm.c  (.../branches/gcc-4_8-branch)
 
10646
@@ -82,7 +82,6 @@
 
10647
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
 
10648
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
 
10649
 inline static int thumb1_index_register_rtx_p (rtx, int);
 
10650
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
10651
 static int thumb_far_jump_used_p (void);
 
10652
 static bool thumb_force_lr_save (void);
 
10653
 static unsigned arm_size_return_regs (void);
 
10654
@@ -24476,9 +24475,13 @@
 
10655
       fputs (":\n", file);
 
10656
       if (flag_pic)
 
10657
        {
 
10658
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 
10659
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
 
10660
          rtx tem = XEXP (DECL_RTL (function), 0);
 
10661
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
 
10662
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
 
10663
+            pipeline offset is four rather than eight.  Adjust the offset
 
10664
+            accordingly.  */
 
10665
+         tem = plus_constant (GET_MODE (tem), tem,
 
10666
+                              TARGET_THUMB1_ONLY ? -3 : -7);
 
10667
          tem = gen_rtx_MINUS (GET_MODE (tem),
 
10668
                               tem,
 
10669
                               gen_rtx_SYMBOL_REF (Pmode,
 
10670
@@ -27462,4 +27465,13 @@
 
10671
 
 
10672
 }
 
10673
 
 
10674
+/* return TRUE if x is a reference to a value in a constant pool */
 
10675
+extern bool
 
10676
+arm_is_constant_pool_ref (rtx x)
 
10677
+{
 
10678
+  return (MEM_P (x)
 
10679
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
 
10680
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
 
10681
+}
 
10682
+
 
10683
 #include "gt-arm.h"
 
10684
Index: gcc/config/arm/arm-protos.h
 
10685
===================================================================
 
10686
--- a/src/gcc/config/arm/arm-protos.h   (.../tags/gcc_4_8_3_release)
 
10687
+++ b/src/gcc/config/arm/arm-protos.h   (.../branches/gcc-4_8-branch)
 
10688
@@ -55,6 +55,7 @@
 
10689
 extern int legitimate_pic_operand_p (rtx);
 
10690
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 
10691
 extern rtx legitimize_tls_address (rtx, rtx);
 
10692
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
10693
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
 
10694
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
 
10695
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
 
10696
@@ -286,4 +287,6 @@
 
10697
 
 
10698
 extern void arm_emit_eabi_attribute (const char *, int, int);
 
10699
 
 
10700
+extern bool arm_is_constant_pool_ref (rtx);
 
10701
+
 
10702
 #endif /* ! GCC_ARM_PROTOS_H */
 
10703
Index: gcc/config/arm/constraints.md
 
10704
===================================================================
 
10705
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
 
10706
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
 
10707
@@ -36,7 +36,7 @@
 
10708
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
 
10709
 
 
10710
 ;; The following memory constraints have been used:
 
10711
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
 
10712
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
 
10713
 ;; in ARM state: Uq
 
10714
 ;; in Thumb state: Uu, Uw
 
10715
 
 
10716
@@ -310,6 +310,12 @@
 
10717
   An address valid for loading/storing register exclusive"
 
10718
  (match_operand 0 "mem_noofs_operand"))
 
10719
 
 
10720
+(define_memory_constraint "Uh"
 
10721
+ "@internal
 
10722
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
 
10723
+ (and (match_code "mem")
 
10724
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
 
10725
+
 
10726
 (define_memory_constraint "Ut"
 
10727
  "@internal
 
10728
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
 
10729
@@ -356,7 +362,8 @@
 
10730
  (and (match_code "mem")
 
10731
       (match_test "TARGET_ARM
 
10732
                   && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
 
10733
-                                                     SIGN_EXTEND, 0)")))
 
10734
+                                                     SIGN_EXTEND, 0)
 
10735
+                  && !arm_is_constant_pool_ref (op)")))
 
10736
 
 
10737
 (define_memory_constraint "Q"
 
10738
  "@internal
 
10739
Index: gcc/config/arm/arm.md
 
10740
===================================================================
 
10741
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
 
10742
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
 
10743
@@ -4047,7 +4047,7 @@
 
10744
 (define_insn "unaligned_loadhis"
 
10745
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
 
10746
        (sign_extend:SI
 
10747
-         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 
10748
+         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
 
10749
                     UNSPEC_UNALIGNED_LOAD)))]
 
10750
   "unaligned_access && TARGET_32BIT"
 
10751
   "ldr%(sh%)\t%0, %1\t@ unaligned"
 
10752
@@ -4655,7 +4655,7 @@
 
10753
 
 
10754
 (define_insn "*arm_zero_extendhisi2_v6"
 
10755
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
10756
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
10757
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
10758
   "TARGET_ARM && arm_arch6"
 
10759
   "@
 
10760
    uxth%?\\t%0, %1
 
10761
@@ -4748,7 +4748,7 @@
 
10762
 
 
10763
 (define_insn "*arm_zero_extendqisi2_v6"
 
10764
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
10765
-       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
 
10766
+       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
 
10767
   "TARGET_ARM && arm_arch6"
 
10768
   "@
 
10769
    uxtb%(%)\\t%0, %1
 
10770
@@ -4980,7 +4980,7 @@
 
10771
 
 
10772
 (define_insn "*arm_extendhisi2"
 
10773
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
10774
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
10775
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
10776
   "TARGET_ARM && arm_arch4 && !arm_arch6"
 
10777
   "@
 
10778
    #
 
10779
@@ -4987,23 +4987,19 @@
 
10780
    ldr%(sh%)\\t%0, %1"
 
10781
   [(set_attr "length" "8,4")
 
10782
    (set_attr "type" "alu_shift,load_byte")
 
10783
-   (set_attr "predicable" "yes")
 
10784
-   (set_attr "pool_range" "*,256")
 
10785
-   (set_attr "neg_pool_range" "*,244")]
 
10786
+   (set_attr "predicable" "yes")]
 
10787
 )
 
10788
 
 
10789
 ;; ??? Check Thumb-2 pool range
 
10790
 (define_insn "*arm_extendhisi2_v6"
 
10791
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
10792
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
10793
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
10794
   "TARGET_32BIT && arm_arch6"
 
10795
   "@
 
10796
    sxth%?\\t%0, %1
 
10797
    ldr%(sh%)\\t%0, %1"
 
10798
   [(set_attr "type" "simple_alu_shift,load_byte")
 
10799
-   (set_attr "predicable" "yes")
 
10800
-   (set_attr "pool_range" "*,256")
 
10801
-   (set_attr "neg_pool_range" "*,244")]
 
10802
+   (set_attr "predicable" "yes")]
 
10803
 )
 
10804
 
 
10805
 (define_insn "*arm_extendhisi2addsi"
 
10806
@@ -5045,9 +5041,7 @@
 
10807
   "TARGET_ARM && arm_arch4"
 
10808
   "ldr%(sb%)\\t%0, %1"
 
10809
   [(set_attr "type" "load_byte")
 
10810
-   (set_attr "predicable" "yes")
 
10811
-   (set_attr "pool_range" "256")
 
10812
-   (set_attr "neg_pool_range" "244")]
 
10813
+   (set_attr "predicable" "yes")]
 
10814
 )
 
10815
 
 
10816
 (define_expand "extendqisi2"
 
10817
@@ -5087,9 +5081,7 @@
 
10818
    ldr%(sb%)\\t%0, %1"
 
10819
   [(set_attr "length" "8,4")
 
10820
    (set_attr "type" "alu_shift,load_byte")
 
10821
-   (set_attr "predicable" "yes")
 
10822
-   (set_attr "pool_range" "*,256")
 
10823
-   (set_attr "neg_pool_range" "*,244")]
 
10824
+   (set_attr "predicable" "yes")]
 
10825
 )
 
10826
 
 
10827
 (define_insn "*arm_extendqisi_v6"
 
10828
@@ -5101,9 +5093,7 @@
 
10829
    sxtb%?\\t%0, %1
 
10830
    ldr%(sb%)\\t%0, %1"
 
10831
   [(set_attr "type" "simple_alu_shift,load_byte")
 
10832
-   (set_attr "predicable" "yes")
 
10833
-   (set_attr "pool_range" "*,256")
 
10834
-   (set_attr "neg_pool_range" "*,244")]
 
10835
+   (set_attr "predicable" "yes")]
 
10836
 )
 
10837
 
 
10838
 (define_insn "*arm_extendqisi2addsi"
 
10839
@@ -7630,12 +7620,13 @@
 
10840
 
 
10841
 (define_insn "*arm_cmpdi_unsigned"
 
10842
   [(set (reg:CC_CZ CC_REGNUM)
 
10843
-       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
 
10844
-                      (match_operand:DI 1 "arm_di_operand"     "rDi")))]
 
10845
+       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
 
10846
+                      (match_operand:DI 1 "arm_di_operand"     "rDi,rDi")))]
 
10847
   "TARGET_32BIT"
 
10848
   "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
 
10849
   [(set_attr "conds" "set")
 
10850
-   (set_attr "length" "8")]
 
10851
+   (set_attr "arch" "a,t2")
 
10852
+   (set_attr "length" "8,10")]
 
10853
 )
 
10854
 
 
10855
 (define_insn "*arm_cmpdi_zero"
 
10856
Index: gcc/config/arm/t-rtems-eabi
 
10857
===================================================================
 
10858
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_8_3_release)
 
10859
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_8-branch)
 
10860
@@ -1,47 +1,167 @@
 
10861
 # Custom RTEMS EABI multilibs
 
10862
 
 
10863
-MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
 
10864
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
 
10865
+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
 
10866
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
 
10867
 
 
10868
 # Enumeration of multilibs
 
10869
 
 
10870
 MULTILIB_EXCEPTIONS =
 
10871
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
10872
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
 
10873
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10874
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
 
10875
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10876
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
10877
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
 
10878
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
 
10879
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
10880
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
 
10881
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
10882
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
 
10883
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10884
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
10885
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
 
10886
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
 
10887
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
10888
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
 
10889
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
10890
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
 
10891
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10892
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
10893
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
 
10894
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
 
10895
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
10896
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
 
10897
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10898
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
 
10899
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10900
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
10901
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
 
10902
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
 
10903
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
 
10904
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
 
10905
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
10906
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
 
10907
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10908
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
 
10909
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
 
10910
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
 
10911
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
10912
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
 
10913
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10914
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
 
10915
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10916
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
 
10917
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
 
10918
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
 
10919
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
10920
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
 
10921
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
10922
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
 
10923
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10924
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
 
10925
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
 
10926
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
 
10927
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
10928
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
 
10929
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
10930
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
 
10931
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10932
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
 
10933
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
 
10934
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
 
10935
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
10936
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
 
10937
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10938
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
 
10939
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10940
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
 
10941
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
 
10942
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
 
10943
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
 
10944
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
 
10945
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
 
10946
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
 
10947
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10948
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
 
10949
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
 
10950
+MULTILIB_EXCEPTIONS += mbig-endian
 
10951
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
10952
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
 
10953
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10954
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
 
10955
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10956
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
10957
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
 
10958
 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
 
10959
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
10960
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
 
10961
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
10962
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
 
10963
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10964
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
10965
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
 
10966
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
 
10967
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
10968
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
 
10969
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
10970
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
 
10971
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10972
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
10973
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
 
10974
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
 
10975
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
10976
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
 
10977
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10978
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
 
10979
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10980
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
10981
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
 
10982
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
 
10983
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
 
10984
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
 
10985
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
10986
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
 
10987
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10988
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
 
10989
 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
 
10990
 # MULTILIB_EXCEPTIONS += mthumb
 
10991
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
 
10992
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
 
10993
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
10994
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
 
10995
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
10996
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
 
10997
 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
 
10998
 MULTILIB_EXCEPTIONS += march=armv6-m
 
10999
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
 
11000
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
 
11001
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
11002
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
 
11003
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
11004
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
 
11005
 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
 
11006
 MULTILIB_EXCEPTIONS += march=armv7-a
 
11007
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
 
11008
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
 
11009
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
11010
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
 
11011
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
11012
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
 
11013
 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
 
11014
 MULTILIB_EXCEPTIONS += march=armv7-r
 
11015
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
 
11016
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
 
11017
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
11018
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
 
11019
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
11020
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
 
11021
 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
 
11022
 MULTILIB_EXCEPTIONS += march=armv7-m
 
11023
 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
 
11024
 MULTILIB_EXCEPTIONS += mfpu=neon
 
11025
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
 
11026
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
 
11027
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
 
11028
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
 
11029
 MULTILIB_EXCEPTIONS += mfloat-abi=hard
 
11030
Index: gcc/config/pa/pa.c
 
11031
===================================================================
 
11032
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_8_3_release)
 
11033
+++ b/src/gcc/config/pa/pa.c    (.../branches/gcc-4_8-branch)
 
11034
@@ -3237,7 +3237,12 @@
 
11035
       && aligned_p
 
11036
       && function_label_operand (x, VOIDmode))
 
11037
     {
 
11038
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
 
11039
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
 
11040
+
 
11041
+      /* We don't want an OPD when generating fast indirect calls.  */
 
11042
+      if (!TARGET_FAST_INDIRECT_CALLS)
 
11043
+       fputs ("P%", asm_out_file);
 
11044
+
 
11045
       output_addr_const (asm_out_file, x);
 
11046
       fputc ('\n', asm_out_file);
 
11047
       return true;
 
11048
@@ -4160,9 +4165,8 @@
 
11049
 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 
11050
 {
 
11051
   rtx insn = get_last_insn ();
 
11052
+  bool extra_nop;
 
11053
 
 
11054
-  last_address = 0;
 
11055
-
 
11056
   /* pa_expand_epilogue does the dirty work now.  We just need
 
11057
      to output the assembler directives which denote the end
 
11058
      of a function.
 
11059
@@ -4185,14 +4189,16 @@
 
11060
   if (insn && GET_CODE (insn) == CALL_INSN)
 
11061
     {
 
11062
       fputs ("\tnop\n", file);
 
11063
-      last_address += 4;
 
11064
+      extra_nop = true;
 
11065
     }
 
11066
+  else
 
11067
+    extra_nop = false;
 
11068
 
 
11069
   fputs ("\t.EXIT\n\t.PROCEND\n", file);
 
11070
 
 
11071
   if (TARGET_SOM && TARGET_GAS)
 
11072
     {
 
11073
-      /* We done with this subspace except possibly for some additional
 
11074
+      /* We are done with this subspace except possibly for some additional
 
11075
         debug information.  Forget that we are in this subspace to ensure
 
11076
         that the next function is output in its own subspace.  */
 
11077
       in_section = NULL;
 
11078
@@ -4199,12 +4205,20 @@
 
11079
       cfun->machine->in_nsubspa = 2;
 
11080
     }
 
11081
 
 
11082
+  /* Thunks do their own insn accounting.  */
 
11083
+  if (cfun->is_thunk)
 
11084
+    return;
 
11085
+
 
11086
   if (INSN_ADDRESSES_SET_P ())
 
11087
     {
 
11088
+      last_address = extra_nop ? 4 : 0;
 
11089
       insn = get_last_nonnote_insn ();
 
11090
-      last_address += INSN_ADDRESSES (INSN_UID (insn));
 
11091
-      if (INSN_P (insn))
 
11092
-       last_address += insn_default_length (insn);
 
11093
+      if (insn)
 
11094
+       {
 
11095
+         last_address += INSN_ADDRESSES (INSN_UID (insn));
 
11096
+         if (INSN_P (insn))
 
11097
+           last_address += insn_default_length (insn);
 
11098
+       }
 
11099
       last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
 
11100
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
 
11101
     }
 
11102
@@ -8270,8 +8284,7 @@
 
11103
   xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
 
11104
   xoperands[2] = GEN_INT (delta);
 
11105
 
 
11106
-  ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
 
11107
-  fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
 
11108
+  final_start_function (emit_barrier (), file, 1);
 
11109
 
 
11110
   /* Output the thunk.  We know that the function is in the same
 
11111
      translation unit (i.e., the same space) as the thunk, and that
 
11112
@@ -8301,12 +8314,16 @@
 
11113
                   || ((DECL_SECTION_NAME (thunk_fndecl)
 
11114
                        == DECL_SECTION_NAME (function))
 
11115
                       && last_address < 262132)))
 
11116
+             /* In this case, we need to be able to reach the start of
 
11117
+                the stub table even though the function is likely closer
 
11118
+                and can be jumped to directly.  */
 
11119
              || (targetm_common.have_named_sections
 
11120
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
 
11121
                  && DECL_SECTION_NAME (function) == NULL
 
11122
-                 && last_address < 262132)
 
11123
+                 && total_code_bytes < MAX_PCREL17F_OFFSET)
 
11124
+             /* Likewise.  */
 
11125
              || (!targetm_common.have_named_sections
 
11126
-                 && last_address < 262132))))
 
11127
+                 && total_code_bytes < MAX_PCREL17F_OFFSET))))
 
11128
     {
 
11129
       if (!val_14)
 
11130
        output_asm_insn ("addil L'%2,%%r26", xoperands);
 
11131
@@ -8477,17 +8494,8 @@
 
11132
        }
 
11133
     }
 
11134
 
 
11135
-  fprintf (file, "\t.EXIT\n\t.PROCEND\n");
 
11136
+  final_end_function ();
 
11137
 
 
11138
-  if (TARGET_SOM && TARGET_GAS)
 
11139
-    {
 
11140
-      /* We done with this subspace except possibly for some additional
 
11141
-        debug information.  Forget that we are in this subspace to ensure
 
11142
-        that the next function is output in its own subspace.  */
 
11143
-      in_section = NULL;
 
11144
-      cfun->machine->in_nsubspa = 2;
 
11145
-    }
 
11146
-
 
11147
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
 
11148
     {
 
11149
       switch_to_section (data_section);
 
11150
Index: gcc/tree-vect-slp.c
 
11151
===================================================================
 
11152
--- a/src/gcc/tree-vect-slp.c   (.../tags/gcc_4_8_3_release)
 
11153
+++ b/src/gcc/tree-vect-slp.c   (.../branches/gcc-4_8-branch)
 
11154
@@ -1837,7 +1837,10 @@
 
11155
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
 
11156
            && !STMT_SLP_TYPE (stmt_vinfo)
 
11157
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
 
11158
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
 
11159
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
 
11160
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
 
11161
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
 
11162
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
 
11163
            && !(gimple_code (use_stmt) == GIMPLE_PHI
 
11164
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
 
11165
                   == vect_reduction_def))
 
11166
Index: gcc/regcprop.c
 
11167
===================================================================
 
11168
--- a/src/gcc/regcprop.c        (.../tags/gcc_4_8_3_release)
 
11169
+++ b/src/gcc/regcprop.c        (.../branches/gcc-4_8-branch)
 
11170
@@ -1039,7 +1039,17 @@
 
11171
             but instead among CLOBBERs on the CALL_INSN, we could wrongly
 
11172
             assume the value in it is still live.  */
 
11173
          if (ksvd.ignore_set_reg)
 
11174
-           note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
11175
+           {
 
11176
+             note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
11177
+             for (exp = CALL_INSN_FUNCTION_USAGE (insn);
 
11178
+                  exp;
 
11179
+                  exp = XEXP (exp, 1))
 
11180
+               {
 
11181
+                 rtx x = XEXP (exp, 0);
 
11182
+                 if (GET_CODE (x) == CLOBBER)
 
11183
+                   kill_value (SET_DEST (x), vd);
 
11184
+               }
 
11185
+           }
 
11186
        }
 
11187
 
 
11188
       /* Notice stores.  */
 
11189
Index: libobjc/encoding.c
 
11190
===================================================================
 
11191
--- a/src/libobjc/encoding.c    (.../tags/gcc_4_8_3_release)
 
11192
+++ b/src/libobjc/encoding.c    (.../branches/gcc-4_8-branch)
 
11193
@@ -192,6 +192,8 @@
 
11194
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
 
11195
    : MAX (COMPUTED, SPECIFIED));})
 
11196
 
 
11197
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
 
11198
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
 
11199
 
 
11200
 /* Skip a variable name, enclosed in quotes (").  */
 
11201
 static inline
 
11202
Index: libobjc/ChangeLog
 
11203
===================================================================
 
11204
--- a/src/libobjc/ChangeLog     (.../tags/gcc_4_8_3_release)
 
11205
+++ b/src/libobjc/ChangeLog     (.../branches/gcc-4_8-branch)
 
11206
@@ -1,3 +1,16 @@
 
11207
+2014-07-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
11208
+
 
11209
+       PR libobjc/61920
 
11210
+       * encoding.c (rs6000_special_adjust_field_align_p): Use definition
 
11211
+       that matches the 4.8 branch ABI.
 
11212
+
 
11213
+2014-07-27  Alan Modra  <amodra@gmail.com>
 
11214
+           Matthias Klose  <doko@ubuntu.com>
 
11215
+
 
11216
+       PR libobjc/61920
 
11217
+
 
11218
+       * encoding.c: Define rs6000_special_adjust_field_align_p.
 
11219
+
 
11220
 2014-05-22  Release Manager
 
11221
 
 
11222
        * GCC 4.8.3 released.
 
11223
Index: libgfortran/m4/in_pack.m4
 
11224
===================================================================
 
11225
--- a/src/libgfortran/m4/in_pack.m4     (.../tags/gcc_4_8_3_release)
 
11226
+++ b/src/libgfortran/m4/in_pack.m4     (.../branches/gcc-4_8-branch)
 
11227
@@ -79,7 +79,7 @@
 
11228
     return source->base_addr;
 
11229
 
 
11230
   /* Allocate storage for the destination.  */
 
11231
-  destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
 
11232
+  destptr = xmallocarray (ssize, sizeof ('rtype_name`));
 
11233
   dest = destptr;
 
11234
   src = source->base_addr;
 
11235
   stride0 = stride[0];
 
11236
Index: libgfortran/m4/pack.m4
 
11237
===================================================================
 
11238
--- a/src/libgfortran/m4/pack.m4        (.../tags/gcc_4_8_3_release)
 
11239
+++ b/src/libgfortran/m4/pack.m4        (.../branches/gcc-4_8-branch)
 
11240
@@ -168,8 +168,8 @@
 
11241
 
 
11242
          ret->offset = 0;
 
11243
 
 
11244
-         /* xmalloc allocates a single byte for zero size.  */
 
11245
-         ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
 
11246
+         /* xmallocarray allocates a single byte for zero size.  */
 
11247
+         ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
 
11248
 
 
11249
          if (total == 0)
 
11250
            return;
 
11251
Index: libgfortran/m4/spread.m4
 
11252
===================================================================
 
11253
--- a/src/libgfortran/m4/spread.m4      (.../tags/gcc_4_8_3_release)
 
11254
+++ b/src/libgfortran/m4/spread.m4      (.../branches/gcc-4_8-branch)
 
11255
@@ -102,8 +102,8 @@
 
11256
        }
 
11257
       ret->offset = 0;
 
11258
 
 
11259
-      /* xmalloc allocates a single byte for zero size.  */
 
11260
-      ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
 
11261
+      /* xmallocarray allocates a single byte for zero size.  */
 
11262
+      ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
 
11263
       if (rs <= 0)
 
11264
         return;
 
11265
     }
 
11266
@@ -245,7 +245,7 @@
 
11267
 
 
11268
   if (ret->base_addr == NULL)
 
11269
     {
 
11270
-      ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
 
11271
+      ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
 
11272
       ret->offset = 0;
 
11273
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
11274
     }
 
11275
Index: libgfortran/m4/transpose.m4
 
11276
===================================================================
 
11277
--- a/src/libgfortran/m4/transpose.m4   (.../tags/gcc_4_8_3_release)
 
11278
+++ b/src/libgfortran/m4/transpose.m4   (.../branches/gcc-4_8-branch)
 
11279
@@ -61,7 +61,8 @@
 
11280
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
11281
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
11282
 
 
11283
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
 
11284
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
11285
+                                     sizeof ('rtype_name`));
 
11286
       ret->offset = 0;
 
11287
     } else if (unlikely (compile_options.bounds_check))
 
11288
     {
 
11289
Index: libgfortran/m4/iforeach.m4
 
11290
===================================================================
 
11291
--- a/src/libgfortran/m4/iforeach.m4    (.../tags/gcc_4_8_3_release)
 
11292
+++ b/src/libgfortran/m4/iforeach.m4    (.../branches/gcc-4_8-branch)
 
11293
@@ -30,7 +30,7 @@
 
11294
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
11295
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
11296
       retarray->offset = 0;
 
11297
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
11298
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
11299
     }
 
11300
   else
 
11301
     {
 
11302
@@ -133,7 +133,7 @@
 
11303
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
11304
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
11305
       retarray->offset = 0;
 
11306
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
11307
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
11308
     }
 
11309
   else
 
11310
     {
 
11311
@@ -264,7 +264,7 @@
 
11312
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
11313
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
11314
       retarray->offset = 0;
 
11315
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
11316
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
11317
     }
 
11318
   else if (unlikely (compile_options.bounds_check))
 
11319
     {
 
11320
Index: libgfortran/m4/eoshift1.m4
 
11321
===================================================================
 
11322
--- a/src/libgfortran/m4/eoshift1.m4    (.../tags/gcc_4_8_3_release)
 
11323
+++ b/src/libgfortran/m4/eoshift1.m4    (.../branches/gcc-4_8-branch)
 
11324
@@ -106,8 +106,8 @@
 
11325
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
11326
 
 
11327
         }
 
11328
-      /* xmalloc allocates a single byte for zero size.  */
 
11329
-      ret->base_addr = xmalloc (size * arraysize);
 
11330
+      /* xmallocarray allocates a single byte for zero size.  */
 
11331
+      ret->base_addr = xmallocarray (arraysize, size);
 
11332
 
 
11333
     }
 
11334
   else if (unlikely (compile_options.bounds_check))
 
11335
Index: libgfortran/m4/eoshift3.m4
 
11336
===================================================================
 
11337
--- a/src/libgfortran/m4/eoshift3.m4    (.../tags/gcc_4_8_3_release)
 
11338
+++ b/src/libgfortran/m4/eoshift3.m4    (.../branches/gcc-4_8-branch)
 
11339
@@ -90,7 +90,7 @@
 
11340
     {
 
11341
       int i;
 
11342
 
 
11343
-      ret->base_addr = xmalloc (size * arraysize);
 
11344
+      ret->base_addr = xmallocarray (arraysize, size);
 
11345
       ret->offset = 0;
 
11346
       ret->dtype = array->dtype;
 
11347
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
11348
@@ -108,8 +108,8 @@
 
11349
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
11350
 
 
11351
         }
 
11352
-      /* xmalloc allocates a single byte for zero size.  */
 
11353
-      ret->base_addr = xmalloc (size * arraysize);
 
11354
+      /* xmallocarray allocates a single byte for zero size.  */
 
11355
+      ret->base_addr = xmallocarray (arraysize, size);
 
11356
 
 
11357
     }
 
11358
   else if (unlikely (compile_options.bounds_check))
 
11359
Index: libgfortran/m4/shape.m4
 
11360
===================================================================
 
11361
--- a/src/libgfortran/m4/shape.m4       (.../tags/gcc_4_8_3_release)
 
11362
+++ b/src/libgfortran/m4/shape.m4       (.../branches/gcc-4_8-branch)
 
11363
@@ -50,7 +50,7 @@
 
11364
     {
 
11365
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
11366
       ret->offset = 0;
 
11367
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
 
11368
+      ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
 
11369
     }
 
11370
 
 
11371
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
11372
Index: libgfortran/m4/cshift1.m4
 
11373
===================================================================
 
11374
--- a/src/libgfortran/m4/cshift1.m4     (.../tags/gcc_4_8_3_release)
 
11375
+++ b/src/libgfortran/m4/cshift1.m4     (.../branches/gcc-4_8-branch)
 
11376
@@ -81,7 +81,7 @@
 
11377
     {
 
11378
       int i;
 
11379
 
 
11380
-      ret->base_addr = xmalloc (size * arraysize);
 
11381
+      ret->base_addr = xmallocarray (arraysize, size);
 
11382
       ret->offset = 0;
 
11383
       ret->dtype = array->dtype;
 
11384
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
11385
Index: libgfortran/m4/matmull.m4
 
11386
===================================================================
 
11387
--- a/src/libgfortran/m4/matmull.m4     (.../tags/gcc_4_8_3_release)
 
11388
+++ b/src/libgfortran/m4/matmull.m4     (.../branches/gcc-4_8-branch)
 
11389
@@ -89,7 +89,7 @@
 
11390
         }
 
11391
           
 
11392
       retarray->base_addr
 
11393
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
11394
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
11395
       retarray->offset = 0;
 
11396
     }
 
11397
     else if (unlikely (compile_options.bounds_check))
 
11398
Index: libgfortran/m4/bessel.m4
 
11399
===================================================================
 
11400
--- a/src/libgfortran/m4/bessel.m4      (.../tags/gcc_4_8_3_release)
 
11401
+++ b/src/libgfortran/m4/bessel.m4      (.../branches/gcc-4_8-branch)
 
11402
@@ -56,7 +56,7 @@
 
11403
     {
 
11404
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
11405
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
11406
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
11407
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
11408
       ret->offset = 0;
 
11409
     }
 
11410
 
 
11411
@@ -123,7 +123,7 @@
 
11412
     {
 
11413
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
11414
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
11415
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
11416
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
11417
       ret->offset = 0;
 
11418
     }
 
11419
 
 
11420
@@ -163,7 +163,7 @@
 
11421
 
 
11422
   x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
 
11423
 
 
11424
-  for (i = 2; i <= n1+n2; i++)
 
11425
+  for (i = 2; i <= n2 - n1; i++)
 
11426
     {
 
11427
 #if defined('rtype_name`_INFINITY)
 
11428
       if (unlikely (last2 == -'rtype_name`_INFINITY))
 
11429
Index: libgfortran/m4/unpack.m4
 
11430
===================================================================
 
11431
--- a/src/libgfortran/m4/unpack.m4      (.../tags/gcc_4_8_3_release)
 
11432
+++ b/src/libgfortran/m4/unpack.m4      (.../branches/gcc-4_8-branch)
 
11433
@@ -100,7 +100,7 @@
 
11434
          rs *= extent[n];
 
11435
        }
 
11436
       ret->offset = 0;
 
11437
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
11438
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
11439
     }
 
11440
   else
 
11441
     {
 
11442
@@ -245,7 +245,7 @@
 
11443
          rs *= extent[n];
 
11444
        }
 
11445
       ret->offset = 0;
 
11446
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
11447
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
11448
     }
 
11449
   else
 
11450
     {
 
11451
Index: libgfortran/m4/reshape.m4
 
11452
===================================================================
 
11453
--- a/src/libgfortran/m4/reshape.m4     (.../tags/gcc_4_8_3_release)
 
11454
+++ b/src/libgfortran/m4/reshape.m4     (.../branches/gcc-4_8-branch)
 
11455
@@ -115,11 +115,11 @@
 
11456
       ret->offset = 0;
 
11457
 
 
11458
       if (unlikely (rs < 1))
 
11459
-        alloc_size = 1;
 
11460
+        alloc_size = 0;
 
11461
       else
 
11462
-        alloc_size = rs * sizeof ('rtype_name`);
 
11463
+        alloc_size = rs;
 
11464
 
 
11465
-      ret->base_addr = xmalloc (alloc_size);
 
11466
+      ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
 
11467
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
11468
     }
 
11469
 
 
11470
Index: libgfortran/m4/ifunction_logical.m4
 
11471
===================================================================
 
11472
--- a/src/libgfortran/m4/ifunction_logical.m4   (.../tags/gcc_4_8_3_release)
 
11473
+++ b/src/libgfortran/m4/ifunction_logical.m4   (.../branches/gcc-4_8-branch)
 
11474
@@ -89,8 +89,7 @@
 
11475
       retarray->offset = 0;
 
11476
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
11477
 
 
11478
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
11479
-                  * extent[rank-1];
 
11480
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
11481
 
 
11482
       if (alloc_size == 0)
 
11483
        {
 
11484
@@ -99,7 +98,7 @@
 
11485
          return;
 
11486
        }
 
11487
       else
 
11488
-       retarray->base_addr = xmalloc (alloc_size);
 
11489
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
11490
     }
 
11491
   else
 
11492
     {
 
11493
Index: libgfortran/m4/ifunction.m4
 
11494
===================================================================
 
11495
--- a/src/libgfortran/m4/ifunction.m4   (.../tags/gcc_4_8_3_release)
 
11496
+++ b/src/libgfortran/m4/ifunction.m4   (.../branches/gcc-4_8-branch)
 
11497
@@ -85,10 +85,9 @@
 
11498
       retarray->offset = 0;
 
11499
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
11500
 
 
11501
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
11502
-                  * extent[rank-1];
 
11503
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
11504
 
 
11505
-      retarray->base_addr = xmalloc (alloc_size);
 
11506
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
11507
       if (alloc_size == 0)
 
11508
        {
 
11509
          /* Make sure we have a zero-sized array.  */
 
11510
@@ -260,8 +259,7 @@
 
11511
 
 
11512
        }
 
11513
 
 
11514
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
11515
-                  * extent[rank-1];
 
11516
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
11517
 
 
11518
       retarray->offset = 0;
 
11519
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
11520
@@ -273,7 +271,7 @@
 
11521
          return;
 
11522
        }
 
11523
       else
 
11524
-       retarray->base_addr = xmalloc (alloc_size);
 
11525
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
11526
 
 
11527
     }
 
11528
   else
 
11529
@@ -417,8 +415,7 @@
 
11530
       retarray->offset = 0;
 
11531
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
11532
 
 
11533
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
11534
-                  * extent[rank-1];
 
11535
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
11536
 
 
11537
       if (alloc_size == 0)
 
11538
        {
 
11539
@@ -427,7 +424,7 @@
 
11540
          return;
 
11541
        }
 
11542
       else
 
11543
-       retarray->base_addr = xmalloc (alloc_size);
 
11544
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
11545
     }
 
11546
   else
 
11547
     {
 
11548
Index: libgfortran/m4/matmul.m4
 
11549
===================================================================
 
11550
--- a/src/libgfortran/m4/matmul.m4      (.../tags/gcc_4_8_3_release)
 
11551
+++ b/src/libgfortran/m4/matmul.m4      (.../branches/gcc-4_8-branch)
 
11552
@@ -125,7 +125,7 @@
 
11553
         }
 
11554
 
 
11555
       retarray->base_addr
 
11556
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
11557
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
11558
       retarray->offset = 0;
 
11559
     }
 
11560
     else if (unlikely (compile_options.bounds_check))
 
11561
Index: libgfortran/runtime/in_pack_generic.c
 
11562
===================================================================
 
11563
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
 
11564
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
 
11565
@@ -180,7 +180,7 @@
 
11566
     return source->base_addr;
 
11567
 
 
11568
    /* Allocate storage for the destination.  */
 
11569
-  destptr = xmalloc (ssize * size);
 
11570
+  destptr = xmallocarray (ssize, size);
 
11571
   dest = (char *)destptr;
 
11572
   src = source->base_addr;
 
11573
   stride0 = stride[0] * size;
 
11574
Index: libgfortran/runtime/memory.c
 
11575
===================================================================
 
11576
--- a/src/libgfortran/runtime/memory.c  (.../tags/gcc_4_8_3_release)
 
11577
+++ b/src/libgfortran/runtime/memory.c  (.../branches/gcc-4_8-branch)
 
11578
@@ -25,8 +25,13 @@
 
11579
 
 
11580
 #include "libgfortran.h"
 
11581
 #include <stdlib.h>
 
11582
+#include <errno.h>
 
11583
 
 
11584
+#ifndef SIZE_MAX
 
11585
+#define SIZE_MAX ((size_t)-1)
 
11586
+#endif
 
11587
 
 
11588
+
 
11589
 void *
 
11590
 xmalloc (size_t n)
 
11591
 {
 
11592
@@ -44,12 +49,34 @@
 
11593
 }
 
11594
 
 
11595
 
 
11596
+void *
 
11597
+xmallocarray (size_t nmemb, size_t size)
 
11598
+{
 
11599
+  void *p;
 
11600
+
 
11601
+  if (!nmemb || !size)
 
11602
+    size = nmemb = 1;
 
11603
+  else if (nmemb > SIZE_MAX / size)
 
11604
+    {
 
11605
+      errno = ENOMEM;
 
11606
+      os_error ("Integer overflow in xmallocarray");
 
11607
+    }
 
11608
+
 
11609
+  p = malloc (nmemb * size);
 
11610
+
 
11611
+  if (!p)
 
11612
+    os_error ("Memory allocation failed in xmallocarray");
 
11613
+
 
11614
+  return p;
 
11615
+}
 
11616
+
 
11617
+
 
11618
 /* calloc wrapper that aborts on error.  */
 
11619
 
 
11620
 void *
 
11621
 xcalloc (size_t nmemb, size_t size)
 
11622
 {
 
11623
-  if (nmemb * size == 0)
 
11624
+  if (!nmemb || !size)
 
11625
     nmemb = size = 1;
 
11626
 
 
11627
   void *p = calloc (nmemb, size);
 
11628
Index: libgfortran/runtime/convert_char.c
 
11629
===================================================================
 
11630
--- a/src/libgfortran/runtime/convert_char.c    (.../tags/gcc_4_8_3_release)
 
11631
+++ b/src/libgfortran/runtime/convert_char.c    (.../branches/gcc-4_8-branch)
 
11632
@@ -44,7 +44,7 @@
 
11633
   gfc_charlen_type i, l;
 
11634
 
 
11635
   l = len > 0 ? len : 0;
 
11636
-  *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
 
11637
+  *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
 
11638
 
 
11639
   for (i = 0; i < l; i++)
 
11640
     (*dst)[i] = src[i];
 
11641
@@ -60,7 +60,7 @@
 
11642
   gfc_charlen_type i, l;
 
11643
 
 
11644
   l = len > 0 ? len : 0;
 
11645
-  *dst = xmalloc ((l + 1) * sizeof (unsigned char));
 
11646
+  *dst = xmalloc (l + 1);
 
11647
 
 
11648
   for (i = 0; i < l; i++)
 
11649
     (*dst)[i] = src[i];
 
11650
Index: libgfortran/runtime/environ.c
 
11651
===================================================================
 
11652
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
 
11653
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
 
11654
@@ -833,7 +833,7 @@
 
11655
     }
 
11656
   else
 
11657
     {
 
11658
-      elist = xmalloc (unit_count * sizeof (exception_t));
 
11659
+      elist = xmallocarray (unit_count, sizeof (exception_t));
 
11660
       do_count = 0;
 
11661
       p = val;
 
11662
       do_parse ();
 
11663
Index: libgfortran/intrinsics/string_intrinsics_inc.c
 
11664
===================================================================
 
11665
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../tags/gcc_4_8_3_release)
 
11666
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../branches/gcc-4_8-branch)
 
11667
@@ -164,7 +164,7 @@
 
11668
   else
 
11669
     {
 
11670
       /* Allocate space for result string.  */
 
11671
-      *dest = xmalloc (*len * sizeof (CHARTYPE));
 
11672
+      *dest = xmallocarray (*len, sizeof (CHARTYPE));
 
11673
 
 
11674
       /* Copy string if necessary.  */
 
11675
       memcpy (*dest, src, *len * sizeof (CHARTYPE));
 
11676
@@ -442,7 +442,7 @@
 
11677
     *dest = &zero_length_string;
 
11678
   else
 
11679
     {
 
11680
-      CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
 
11681
+      CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
 
11682
       memcpy (tmp, res, reslen * sizeof (CHARTYPE));
 
11683
       MEMSET (&tmp[reslen], ' ', *rlen - reslen);
 
11684
       *dest = tmp;
 
11685
Index: libgfortran/intrinsics/pack_generic.c
 
11686
===================================================================
 
11687
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
 
11688
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
 
11689
@@ -152,8 +152,8 @@
 
11690
          GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
 
11691
 
 
11692
          ret->offset = 0;
 
11693
-         /* xmalloc allocates a single byte for zero size.  */
 
11694
-         ret->base_addr = xmalloc (size * total);
 
11695
+         /* xmallocarray allocates a single byte for zero size.  */
 
11696
+         ret->base_addr = xmallocarray (total, size);
 
11697
 
 
11698
          if (total == 0)
 
11699
            return;      /* In this case, nothing remains to be done.  */
 
11700
@@ -519,7 +519,7 @@
 
11701
 
 
11702
       ret->offset = 0;
 
11703
 
 
11704
-      ret->base_addr = xmalloc (size * total);
 
11705
+      ret->base_addr = xmallocarray (total, size);
 
11706
 
 
11707
       if (total == 0)
 
11708
        return;
 
11709
Index: libgfortran/intrinsics/transpose_generic.c
 
11710
===================================================================
 
11711
--- a/src/libgfortran/intrinsics/transpose_generic.c    (.../tags/gcc_4_8_3_release)
 
11712
+++ b/src/libgfortran/intrinsics/transpose_generic.c    (.../branches/gcc-4_8-branch)
 
11713
@@ -60,7 +60,7 @@
 
11714
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
11715
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
11716
 
 
11717
-      ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
 
11718
+      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
 
11719
       ret->offset = 0;
 
11720
     }
 
11721
   else if (unlikely (compile_options.bounds_check))
 
11722
Index: libgfortran/intrinsics/cshift0.c
 
11723
===================================================================
 
11724
--- a/src/libgfortran/intrinsics/cshift0.c      (.../tags/gcc_4_8_3_release)
 
11725
+++ b/src/libgfortran/intrinsics/cshift0.c      (.../branches/gcc-4_8-branch)
 
11726
@@ -79,8 +79,8 @@
 
11727
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
11728
         }
 
11729
 
 
11730
-      /* xmalloc allocates a single byte for zero size.  */
 
11731
-      ret->base_addr = xmalloc (size * arraysize);
 
11732
+      /* xmallocarray allocates a single byte for zero size.  */
 
11733
+      ret->base_addr = xmallocarray (arraysize, size);
 
11734
     }
 
11735
   else if (unlikely (compile_options.bounds_check))
 
11736
     {
 
11737
Index: libgfortran/intrinsics/ctime.c
 
11738
===================================================================
 
11739
--- a/src/libgfortran/intrinsics/ctime.c        (.../tags/gcc_4_8_3_release)
 
11740
+++ b/src/libgfortran/intrinsics/ctime.c        (.../branches/gcc-4_8-branch)
 
11741
@@ -31,31 +31,53 @@
 
11742
 #include <string.h>
 
11743
 
 
11744
 
 
11745
-/* strftime-like function that fills a C string with %c format which
 
11746
-   is identical to ctime in the default locale. As ctime and ctime_r
 
11747
-   are poorly specified and their usage not recommended, the
 
11748
-   implementation instead uses strftime.  */
 
11749
+/* Maximum space a ctime-like string might need. A "normal" ctime
 
11750
+   string is 26 bytes, and in our case 24 bytes as we don't include
 
11751
+   the trailing newline and null. However, the longest possible year
 
11752
+   number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
 
11753
+   32-bit signed integer) so an extra 7 bytes are needed. */
 
11754
+#define CTIME_BUFSZ 31
 
11755
 
 
11756
-static size_t
 
11757
-strctime (char *s, size_t max, const time_t *timep)
 
11758
+
 
11759
+/* Thread-safe ctime-like function that fills a Fortran
 
11760
+   string. ctime_r is a portability headache and marked as obsolescent
 
11761
+   in POSIX 2008, which recommends strftime in its place. However,
 
11762
+   strftime(..., "%c",...)  doesn't produce ctime-like output on
 
11763
+   MinGW, so do it manually with snprintf.  */
 
11764
+
 
11765
+static int
 
11766
+gf_ctime (char *s, size_t max, const time_t timev)
 
11767
 {
 
11768
   struct tm ltm;
 
11769
   int failed;
 
11770
+  char buf[CTIME_BUFSZ + 1];
 
11771
   /* Some targets provide a localtime_r based on a draft of the POSIX
 
11772
      standard where the return type is int rather than the
 
11773
      standardized struct tm*.  */
 
11774
-  __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, &ltm)) 
 
11775
+  __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, &ltm)) 
 
11776
                         == 5,
 
11777
-                        failed = localtime_r (timep, &ltm) == NULL,
 
11778
-                        failed = localtime_r (timep, &ltm) != 0);
 
11779
+                        failed = localtime_r (&timev, &ltm) == NULL,
 
11780
+                        failed = localtime_r (&timev, &ltm) != 0);
 
11781
   if (failed)
 
11782
-    return 0;
 
11783
-  return strftime (s, max, "%c", &ltm);
 
11784
+    goto blank;
 
11785
+  int n = snprintf (buf, sizeof (buf), 
 
11786
+                   "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
 
11787
+                   "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
 
11788
+                   "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
 
11789
+                   ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 
 
11790
+                   1900 + ltm.tm_year);
 
11791
+  if (n < 0)
 
11792
+    goto blank;
 
11793
+  if ((size_t) n <= max)
 
11794
+    {
 
11795
+      cf_strcpy (s, max, buf);
 
11796
+      return n;
 
11797
+    }
 
11798
+ blank:
 
11799
+  memset (s, ' ', max);
 
11800
+  return 0;
 
11801
 }
 
11802
 
 
11803
-/* In the default locale, the date and time representation fits in 26
 
11804
-   bytes. However, other locales might need more space.  */
 
11805
-#define CSZ 100
 
11806
 
 
11807
 extern void fdate (char **, gfc_charlen_type *);
 
11808
 export_proto(fdate);
 
11809
@@ -64,8 +86,8 @@
 
11810
 fdate (char ** date, gfc_charlen_type * date_len)
 
11811
 {
 
11812
   time_t now = time(NULL);
 
11813
-  *date = xmalloc (CSZ);
 
11814
-  *date_len = strctime (*date, CSZ, &now);
 
11815
+  *date = xmalloc (CTIME_BUFSZ);
 
11816
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
11817
 }
 
11818
 
 
11819
 
 
11820
@@ -76,10 +98,7 @@
 
11821
 fdate_sub (char * date, gfc_charlen_type date_len)
 
11822
 {
 
11823
   time_t now = time(NULL);
 
11824
-  char *s = xmalloc (date_len + 1);
 
11825
-  size_t n = strctime (s, date_len + 1, &now);
 
11826
-  fstrcpy (date, date_len, s, n);
 
11827
-  free (s);
 
11828
+  gf_ctime (date, date_len, now);
 
11829
 }
 
11830
 
 
11831
 
 
11832
@@ -91,8 +110,8 @@
 
11833
 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
 
11834
 {
 
11835
   time_t now = t;
 
11836
-  *date = xmalloc (CSZ);
 
11837
-  *date_len = strctime (*date, CSZ, &now);
 
11838
+  *date = xmalloc (CTIME_BUFSZ);
 
11839
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
11840
 }
 
11841
 
 
11842
 
 
11843
@@ -103,8 +122,5 @@
 
11844
 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
 
11845
 {
 
11846
   time_t now = *t;
 
11847
-  char *s = xmalloc (date_len + 1);
 
11848
-  size_t n = strctime (s, date_len + 1, &now);
 
11849
-  fstrcpy (date, date_len, s, n);
 
11850
-  free (s);
 
11851
+  gf_ctime (date, date_len, now);
 
11852
 }
 
11853
Index: libgfortran/intrinsics/spread_generic.c
 
11854
===================================================================
 
11855
--- a/src/libgfortran/intrinsics/spread_generic.c       (.../tags/gcc_4_8_3_release)
 
11856
+++ b/src/libgfortran/intrinsics/spread_generic.c       (.../branches/gcc-4_8-branch)
 
11857
@@ -100,7 +100,7 @@
 
11858
          GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
 
11859
        }
 
11860
       ret->offset = 0;
 
11861
-      ret->base_addr = xmalloc (rs * size);
 
11862
+      ret->base_addr = xmallocarray (rs, size);
 
11863
 
 
11864
       if (rs <= 0)
 
11865
        return;
 
11866
@@ -245,7 +245,7 @@
 
11867
 
 
11868
   if (ret->base_addr == NULL)
 
11869
     {
 
11870
-      ret->base_addr = xmalloc (ncopies * size);
 
11871
+      ret->base_addr = xmallocarray (ncopies, size);
 
11872
       ret->offset = 0;
 
11873
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
11874
     }
 
11875
Index: libgfortran/intrinsics/unpack_generic.c
 
11876
===================================================================
 
11877
--- a/src/libgfortran/intrinsics/unpack_generic.c       (.../tags/gcc_4_8_3_release)
 
11878
+++ b/src/libgfortran/intrinsics/unpack_generic.c       (.../branches/gcc-4_8-branch)
 
11879
@@ -125,7 +125,7 @@
 
11880
          rs *= extent[n];
 
11881
        }
 
11882
       ret->offset = 0;
 
11883
-      ret->base_addr = xmalloc (rs * size);
 
11884
+      ret->base_addr = xmallocarray (rs, size);
 
11885
     }
 
11886
   else
 
11887
     {
 
11888
Index: libgfortran/intrinsics/eoshift0.c
 
11889
===================================================================
 
11890
--- a/src/libgfortran/intrinsics/eoshift0.c     (.../tags/gcc_4_8_3_release)
 
11891
+++ b/src/libgfortran/intrinsics/eoshift0.c     (.../branches/gcc-4_8-branch)
 
11892
@@ -86,8 +86,8 @@
 
11893
 
 
11894
         }
 
11895
 
 
11896
-      /* xmalloc allocates a single byte for zero size.  */
 
11897
-      ret->base_addr = xmalloc (size * arraysize);
 
11898
+      /* xmallocarray allocates a single byte for zero size.  */
 
11899
+      ret->base_addr = xmallocarray (arraysize, size);
 
11900
     }
 
11901
   else if (unlikely (compile_options.bounds_check))
 
11902
     {
 
11903
Index: libgfortran/intrinsics/eoshift2.c
 
11904
===================================================================
 
11905
--- a/src/libgfortran/intrinsics/eoshift2.c     (.../tags/gcc_4_8_3_release)
 
11906
+++ b/src/libgfortran/intrinsics/eoshift2.c     (.../branches/gcc-4_8-branch)
 
11907
@@ -78,8 +78,8 @@
 
11908
       ret->offset = 0;
 
11909
       ret->dtype = array->dtype;
 
11910
 
 
11911
-      /* xmalloc allocates a single byte for zero size.  */
 
11912
-      ret->base_addr = xmalloc (size * arraysize);
 
11913
+      /* xmallocarray allocates a single byte for zero size.  */
 
11914
+      ret->base_addr = xmallocarray (arraysize, size);
 
11915
 
 
11916
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
11917
         {
 
11918
Index: libgfortran/intrinsics/reshape_generic.c
 
11919
===================================================================
 
11920
--- a/src/libgfortran/intrinsics/reshape_generic.c      (.../tags/gcc_4_8_3_release)
 
11921
+++ b/src/libgfortran/intrinsics/reshape_generic.c      (.../branches/gcc-4_8-branch)
 
11922
@@ -99,11 +99,11 @@
 
11923
       ret->offset = 0;
 
11924
 
 
11925
       if (unlikely (rs < 1))
 
11926
-       alloc_size = 1;
 
11927
+       alloc_size = 0; /* xmalloc will allocate 1 byte.  */
 
11928
       else
 
11929
-       alloc_size = rs * size;
 
11930
+       alloc_size = rs;
 
11931
 
 
11932
-      ret->base_addr = xmalloc (alloc_size);
 
11933
+      ret->base_addr = xmallocarray (alloc_size, size);
 
11934
 
 
11935
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
11936
     }
 
11937
Index: libgfortran/ChangeLog
 
11938
===================================================================
 
11939
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
11940
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
 
11941
@@ -1,3 +1,84 @@
 
11942
+2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
 
11943
+
 
11944
+       PR libgfortran/62188
 
11945
+       * m4/bessel.m4: Avoid indexing off the end of an array.
 
11946
+       * generated/bessel_r10.c: Regenerated.
 
11947
+       * generated/bessel_r16.c: Ditto.
 
11948
+       * generated/bessel_r4.c: Ditto.
 
11949
+       * generated/bessel_r8.c: Ditto.
 
11950
+
 
11951
+2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>
 
11952
+
 
11953
+       Backport from mainline
 
11954
+       CVE-2014-5044
 
11955
+        * libgfortran.h (xmallocarray): New prototype.
 
11956
+        * runtime/memory.c (xmallocarray): New function.
 
11957
+        (xcalloc): Check for nonzero separately instead of multiplying.
 
11958
+        * generated/*.c: Regenerated.
 
11959
+        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
 
11960
+        xmalloc.
 
11961
+        * intrinsics/eoshift0.c (eoshift0): Likewise.
 
11962
+        * intrinsics/eoshift2.c (eoshift2): Likewise.
 
11963
+        * intrinsics/pack_generic.c (pack_internal): Likewise.
 
11964
+        (pack_s_internal): Likewise.
 
11965
+        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
 
11966
+        * intrinsics/spread_generic.c (spread_internal): Likewise.
 
11967
+        (spread_internal_scalar): Likewise.
 
11968
+        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
 
11969
+        (string_minmax): Likewise.
 
11970
+        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
 
11971
+        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
 
11972
+        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
 
11973
+        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
 
11974
+        xmalloc.
 
11975
+        * io/unit.c (get_internal_unit): Likewise.
 
11976
+        (filename_from_unit): Don't cast xmalloc return value.
 
11977
+        * io/write.c (nml_write_obj): Likewise, formatting.
 
11978
+        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
 
11979
+        instead of xmalloc.
 
11980
+        (besse_yn_r'rtype_kind`): Likewise.
 
11981
+        * m4/cshift1.m4 (cshift1): Likewise.
 
11982
+        * m4/eoshift1.m4 (eoshift1): Likewise.
 
11983
+        * m4/eoshift3.m4 (eoshift3): Likewise.
 
11984
+        * m4/iforeach.m4: Likewise.
 
11985
+        * m4/ifunction.m4: Likewise.
 
11986
+        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
 
11987
+        Likewise.
 
11988
+        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
 
11989
+        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
 
11990
+        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
 
11991
+        * m4/pack.m4 (pack_'rtype_code`): Likewise.
 
11992
+        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
 
11993
+        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
 
11994
+        * m4/spread.m4 (spread_'rtype_code`): Likewise.
 
11995
+        (spread_scalar_'rtype_code`): Likewise.
 
11996
+        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
 
11997
+        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
 
11998
+        (unpack1_'rtype_code`): Likewise.
 
11999
+        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
 
12000
+        (convert_char4_to_char1): Simplify.
 
12001
+        * runtime/environ.c (init_unformatted): Call xmallocarray instead
 
12002
+        of xmalloc.
 
12003
+        * runtime/in_pack_generic.c (internal_pack): Likewise.
 
12004
+
 
12005
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
12006
+
 
12007
+       Backport from mainline
 
12008
+       PR libfortran/61310
 
12009
+       * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
 
12010
+       instead of strftime.
 
12011
+       (fdate): Use gf_ctime.
 
12012
+       (fdate_sub): Likewise.
 
12013
+       (ctime): Likewise.
 
12014
+       (ctime_sub): Likewise.
 
12015
+
 
12016
+2014-05-25  Janne Blomqvist  <jb@gcc.gnu.org>
 
12017
+
 
12018
+       Backport from trunk.
 
12019
+       PR libfortran/61187
 
12020
+       * io/unix.c (raw_close): Check if s->fd is -1.
 
12021
+       (fd_to_stream): Check return value of fstat(), handle error.
 
12022
+
 
12023
 2014-05-22  Release Manager
 
12024
 
 
12025
        * GCC 4.8.3 released.
 
12026
Index: libgfortran/generated/spread_r10.c
 
12027
===================================================================
 
12028
--- a/src/libgfortran/generated/spread_r10.c    (.../tags/gcc_4_8_3_release)
 
12029
+++ b/src/libgfortran/generated/spread_r10.c    (.../branches/gcc-4_8-branch)
 
12030
@@ -101,8 +101,8 @@
 
12031
        }
 
12032
       ret->offset = 0;
 
12033
 
 
12034
-      /* xmalloc allocates a single byte for zero size.  */
 
12035
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
 
12036
+      /* xmallocarray allocates a single byte for zero size.  */
 
12037
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
 
12038
       if (rs <= 0)
 
12039
         return;
 
12040
     }
 
12041
@@ -244,7 +244,7 @@
 
12042
 
 
12043
   if (ret->base_addr == NULL)
 
12044
     {
 
12045
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
 
12046
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
 
12047
       ret->offset = 0;
 
12048
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
12049
     }
 
12050
Index: libgfortran/generated/maxloc1_4_r8.c
 
12051
===================================================================
 
12052
--- a/src/libgfortran/generated/maxloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
12053
+++ b/src/libgfortran/generated/maxloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
12054
@@ -98,10 +98,9 @@
 
12055
       retarray->offset = 0;
 
12056
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12057
 
 
12058
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12059
-                  * extent[rank-1];
 
12060
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12061
 
 
12062
-      retarray->base_addr = xmalloc (alloc_size);
 
12063
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12064
       if (alloc_size == 0)
 
12065
        {
 
12066
          /* Make sure we have a zero-sized array.  */
 
12067
@@ -294,8 +293,7 @@
 
12068
 
 
12069
        }
 
12070
 
 
12071
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12072
-                  * extent[rank-1];
 
12073
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12074
 
 
12075
       retarray->offset = 0;
 
12076
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12077
@@ -307,7 +305,7 @@
 
12078
          return;
 
12079
        }
 
12080
       else
 
12081
-       retarray->base_addr = xmalloc (alloc_size);
 
12082
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12083
 
 
12084
     }
 
12085
   else
 
12086
@@ -485,8 +483,7 @@
 
12087
       retarray->offset = 0;
 
12088
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12089
 
 
12090
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12091
-                  * extent[rank-1];
 
12092
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12093
 
 
12094
       if (alloc_size == 0)
 
12095
        {
 
12096
@@ -495,7 +492,7 @@
 
12097
          return;
 
12098
        }
 
12099
       else
 
12100
-       retarray->base_addr = xmalloc (alloc_size);
 
12101
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12102
     }
 
12103
   else
 
12104
     {
 
12105
Index: libgfortran/generated/norm2_r4.c
 
12106
===================================================================
 
12107
--- a/src/libgfortran/generated/norm2_r4.c      (.../tags/gcc_4_8_3_release)
 
12108
+++ b/src/libgfortran/generated/norm2_r4.c      (.../branches/gcc-4_8-branch)
 
12109
@@ -101,10 +101,9 @@
 
12110
       retarray->offset = 0;
 
12111
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12112
 
 
12113
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12114
-                  * extent[rank-1];
 
12115
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12116
 
 
12117
-      retarray->base_addr = xmalloc (alloc_size);
 
12118
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
12119
       if (alloc_size == 0)
 
12120
        {
 
12121
          /* Make sure we have a zero-sized array.  */
 
12122
Index: libgfortran/generated/parity_l2.c
 
12123
===================================================================
 
12124
--- a/src/libgfortran/generated/parity_l2.c     (.../tags/gcc_4_8_3_release)
 
12125
+++ b/src/libgfortran/generated/parity_l2.c     (.../branches/gcc-4_8-branch)
 
12126
@@ -98,10 +98,9 @@
 
12127
       retarray->offset = 0;
 
12128
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12129
 
 
12130
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12131
-                  * extent[rank-1];
 
12132
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12133
 
 
12134
-      retarray->base_addr = xmalloc (alloc_size);
 
12135
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
12136
       if (alloc_size == 0)
 
12137
        {
 
12138
          /* Make sure we have a zero-sized array.  */
 
12139
Index: libgfortran/generated/eoshift3_4.c
 
12140
===================================================================
 
12141
--- a/src/libgfortran/generated/eoshift3_4.c    (.../tags/gcc_4_8_3_release)
 
12142
+++ b/src/libgfortran/generated/eoshift3_4.c    (.../branches/gcc-4_8-branch)
 
12143
@@ -89,7 +89,7 @@
 
12144
     {
 
12145
       int i;
 
12146
 
 
12147
-      ret->base_addr = xmalloc (size * arraysize);
 
12148
+      ret->base_addr = xmallocarray (arraysize, size);
 
12149
       ret->offset = 0;
 
12150
       ret->dtype = array->dtype;
 
12151
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
12152
@@ -107,8 +107,8 @@
 
12153
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
12154
 
 
12155
         }
 
12156
-      /* xmalloc allocates a single byte for zero size.  */
 
12157
-      ret->base_addr = xmalloc (size * arraysize);
 
12158
+      /* xmallocarray allocates a single byte for zero size.  */
 
12159
+      ret->base_addr = xmallocarray (arraysize, size);
 
12160
 
 
12161
     }
 
12162
   else if (unlikely (compile_options.bounds_check))
 
12163
Index: libgfortran/generated/transpose_c8.c
 
12164
===================================================================
 
12165
--- a/src/libgfortran/generated/transpose_c8.c  (.../tags/gcc_4_8_3_release)
 
12166
+++ b/src/libgfortran/generated/transpose_c8.c  (.../branches/gcc-4_8-branch)
 
12167
@@ -60,7 +60,8 @@
 
12168
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
12169
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
12170
 
 
12171
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
 
12172
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
12173
+                                     sizeof (GFC_COMPLEX_8));
 
12174
       ret->offset = 0;
 
12175
     } else if (unlikely (compile_options.bounds_check))
 
12176
     {
 
12177
Index: libgfortran/generated/eoshift1_8.c
 
12178
===================================================================
 
12179
--- a/src/libgfortran/generated/eoshift1_8.c    (.../tags/gcc_4_8_3_release)
 
12180
+++ b/src/libgfortran/generated/eoshift1_8.c    (.../branches/gcc-4_8-branch)
 
12181
@@ -105,8 +105,8 @@
 
12182
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
12183
 
 
12184
         }
 
12185
-      /* xmalloc allocates a single byte for zero size.  */
 
12186
-      ret->base_addr = xmalloc (size * arraysize);
 
12187
+      /* xmallocarray allocates a single byte for zero size.  */
 
12188
+      ret->base_addr = xmallocarray (arraysize, size);
 
12189
 
 
12190
     }
 
12191
   else if (unlikely (compile_options.bounds_check))
 
12192
Index: libgfortran/generated/reshape_r16.c
 
12193
===================================================================
 
12194
--- a/src/libgfortran/generated/reshape_r16.c   (.../tags/gcc_4_8_3_release)
 
12195
+++ b/src/libgfortran/generated/reshape_r16.c   (.../branches/gcc-4_8-branch)
 
12196
@@ -111,11 +111,11 @@
 
12197
       ret->offset = 0;
 
12198
 
 
12199
       if (unlikely (rs < 1))
 
12200
-        alloc_size = 1;
 
12201
+        alloc_size = 0;
 
12202
       else
 
12203
-        alloc_size = rs * sizeof (GFC_REAL_16);
 
12204
+        alloc_size = rs;
 
12205
 
 
12206
-      ret->base_addr = xmalloc (alloc_size);
 
12207
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
12208
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
12209
     }
 
12210
 
 
12211
Index: libgfortran/generated/bessel_r4.c
 
12212
===================================================================
 
12213
--- a/src/libgfortran/generated/bessel_r4.c     (.../tags/gcc_4_8_3_release)
 
12214
+++ b/src/libgfortran/generated/bessel_r4.c     (.../branches/gcc-4_8-branch)
 
12215
@@ -55,7 +55,7 @@
 
12216
     {
 
12217
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
12218
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
12219
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
12220
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
12221
       ret->offset = 0;
 
12222
     }
 
12223
 
 
12224
@@ -122,7 +122,7 @@
 
12225
     {
 
12226
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
12227
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
12228
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
12229
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
12230
       ret->offset = 0;
 
12231
     }
 
12232
 
 
12233
@@ -162,7 +162,7 @@
 
12234
 
 
12235
   x2rev = GFC_REAL_4_LITERAL(2.)/x;
 
12236
 
 
12237
-  for (i = 2; i <= n1+n2; i++)
 
12238
+  for (i = 2; i <= n2 - n1; i++)
 
12239
     {
 
12240
 #if defined(GFC_REAL_4_INFINITY)
 
12241
       if (unlikely (last2 == -GFC_REAL_4_INFINITY))
 
12242
Index: libgfortran/generated/any_l2.c
 
12243
===================================================================
 
12244
--- a/src/libgfortran/generated/any_l2.c        (.../tags/gcc_4_8_3_release)
 
12245
+++ b/src/libgfortran/generated/any_l2.c        (.../branches/gcc-4_8-branch)
 
12246
@@ -101,8 +101,7 @@
 
12247
       retarray->offset = 0;
 
12248
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12249
 
 
12250
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12251
-                  * extent[rank-1];
 
12252
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12253
 
 
12254
       if (alloc_size == 0)
 
12255
        {
 
12256
@@ -111,7 +110,7 @@
 
12257
          return;
 
12258
        }
 
12259
       else
 
12260
-       retarray->base_addr = xmalloc (alloc_size);
 
12261
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
12262
     }
 
12263
   else
 
12264
     {
 
12265
Index: libgfortran/generated/product_r4.c
 
12266
===================================================================
 
12267
--- a/src/libgfortran/generated/product_r4.c    (.../tags/gcc_4_8_3_release)
 
12268
+++ b/src/libgfortran/generated/product_r4.c    (.../branches/gcc-4_8-branch)
 
12269
@@ -97,10 +97,9 @@
 
12270
       retarray->offset = 0;
 
12271
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12272
 
 
12273
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12274
-                  * extent[rank-1];
 
12275
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12276
 
 
12277
-      retarray->base_addr = xmalloc (alloc_size);
 
12278
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
12279
       if (alloc_size == 0)
 
12280
        {
 
12281
          /* Make sure we have a zero-sized array.  */
 
12282
@@ -272,8 +271,7 @@
 
12283
 
 
12284
        }
 
12285
 
 
12286
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12287
-                  * extent[rank-1];
 
12288
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12289
 
 
12290
       retarray->offset = 0;
 
12291
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12292
@@ -285,7 +283,7 @@
 
12293
          return;
 
12294
        }
 
12295
       else
 
12296
-       retarray->base_addr = xmalloc (alloc_size);
 
12297
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
12298
 
 
12299
     }
 
12300
   else
 
12301
@@ -430,8 +428,7 @@
 
12302
       retarray->offset = 0;
 
12303
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12304
 
 
12305
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12306
-                  * extent[rank-1];
 
12307
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12308
 
 
12309
       if (alloc_size == 0)
 
12310
        {
 
12311
@@ -440,7 +437,7 @@
 
12312
          return;
 
12313
        }
 
12314
       else
 
12315
-       retarray->base_addr = xmalloc (alloc_size);
 
12316
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
12317
     }
 
12318
   else
 
12319
     {
 
12320
Index: libgfortran/generated/iany_i1.c
 
12321
===================================================================
 
12322
--- a/src/libgfortran/generated/iany_i1.c       (.../tags/gcc_4_8_3_release)
 
12323
+++ b/src/libgfortran/generated/iany_i1.c       (.../branches/gcc-4_8-branch)
 
12324
@@ -97,10 +97,9 @@
 
12325
       retarray->offset = 0;
 
12326
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12327
 
 
12328
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12329
-                  * extent[rank-1];
 
12330
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12331
 
 
12332
-      retarray->base_addr = xmalloc (alloc_size);
 
12333
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12334
       if (alloc_size == 0)
 
12335
        {
 
12336
          /* Make sure we have a zero-sized array.  */
 
12337
@@ -272,8 +271,7 @@
 
12338
 
 
12339
        }
 
12340
 
 
12341
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12342
-                  * extent[rank-1];
 
12343
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12344
 
 
12345
       retarray->offset = 0;
 
12346
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12347
@@ -285,7 +283,7 @@
 
12348
          return;
 
12349
        }
 
12350
       else
 
12351
-       retarray->base_addr = xmalloc (alloc_size);
 
12352
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12353
 
 
12354
     }
 
12355
   else
 
12356
@@ -430,8 +428,7 @@
 
12357
       retarray->offset = 0;
 
12358
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12359
 
 
12360
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12361
-                  * extent[rank-1];
 
12362
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12363
 
 
12364
       if (alloc_size == 0)
 
12365
        {
 
12366
@@ -440,7 +437,7 @@
 
12367
          return;
 
12368
        }
 
12369
       else
 
12370
-       retarray->base_addr = xmalloc (alloc_size);
 
12371
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12372
     }
 
12373
   else
 
12374
     {
 
12375
Index: libgfortran/generated/parity_l16.c
 
12376
===================================================================
 
12377
--- a/src/libgfortran/generated/parity_l16.c    (.../tags/gcc_4_8_3_release)
 
12378
+++ b/src/libgfortran/generated/parity_l16.c    (.../branches/gcc-4_8-branch)
 
12379
@@ -98,10 +98,9 @@
 
12380
       retarray->offset = 0;
 
12381
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12382
 
 
12383
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12384
-                  * extent[rank-1];
 
12385
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12386
 
 
12387
-      retarray->base_addr = xmalloc (alloc_size);
 
12388
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
12389
       if (alloc_size == 0)
 
12390
        {
 
12391
          /* Make sure we have a zero-sized array.  */
 
12392
Index: libgfortran/generated/in_pack_r4.c
 
12393
===================================================================
 
12394
--- a/src/libgfortran/generated/in_pack_r4.c    (.../tags/gcc_4_8_3_release)
 
12395
+++ b/src/libgfortran/generated/in_pack_r4.c    (.../branches/gcc-4_8-branch)
 
12396
@@ -76,7 +76,7 @@
 
12397
     return source->base_addr;
 
12398
 
 
12399
   /* Allocate storage for the destination.  */
 
12400
-  destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
 
12401
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
 
12402
   dest = destptr;
 
12403
   src = source->base_addr;
 
12404
   stride0 = stride[0];
 
12405
Index: libgfortran/generated/product_i2.c
 
12406
===================================================================
 
12407
--- a/src/libgfortran/generated/product_i2.c    (.../tags/gcc_4_8_3_release)
 
12408
+++ b/src/libgfortran/generated/product_i2.c    (.../branches/gcc-4_8-branch)
 
12409
@@ -97,10 +97,9 @@
 
12410
       retarray->offset = 0;
 
12411
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12412
 
 
12413
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12414
-                  * extent[rank-1];
 
12415
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12416
 
 
12417
-      retarray->base_addr = xmalloc (alloc_size);
 
12418
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
12419
       if (alloc_size == 0)
 
12420
        {
 
12421
          /* Make sure we have a zero-sized array.  */
 
12422
@@ -272,8 +271,7 @@
 
12423
 
 
12424
        }
 
12425
 
 
12426
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12427
-                  * extent[rank-1];
 
12428
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12429
 
 
12430
       retarray->offset = 0;
 
12431
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12432
@@ -285,7 +283,7 @@
 
12433
          return;
 
12434
        }
 
12435
       else
 
12436
-       retarray->base_addr = xmalloc (alloc_size);
 
12437
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
12438
 
 
12439
     }
 
12440
   else
 
12441
@@ -430,8 +428,7 @@
 
12442
       retarray->offset = 0;
 
12443
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12444
 
 
12445
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12446
-                  * extent[rank-1];
 
12447
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12448
 
 
12449
       if (alloc_size == 0)
 
12450
        {
 
12451
@@ -440,7 +437,7 @@
 
12452
          return;
 
12453
        }
 
12454
       else
 
12455
-       retarray->base_addr = xmalloc (alloc_size);
 
12456
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
12457
     }
 
12458
   else
 
12459
     {
 
12460
Index: libgfortran/generated/iparity_i4.c
 
12461
===================================================================
 
12462
--- a/src/libgfortran/generated/iparity_i4.c    (.../tags/gcc_4_8_3_release)
 
12463
+++ b/src/libgfortran/generated/iparity_i4.c    (.../branches/gcc-4_8-branch)
 
12464
@@ -97,10 +97,9 @@
 
12465
       retarray->offset = 0;
 
12466
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12467
 
 
12468
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12469
-                  * extent[rank-1];
 
12470
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12471
 
 
12472
-      retarray->base_addr = xmalloc (alloc_size);
 
12473
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12474
       if (alloc_size == 0)
 
12475
        {
 
12476
          /* Make sure we have a zero-sized array.  */
 
12477
@@ -272,8 +271,7 @@
 
12478
 
 
12479
        }
 
12480
 
 
12481
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12482
-                  * extent[rank-1];
 
12483
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12484
 
 
12485
       retarray->offset = 0;
 
12486
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12487
@@ -285,7 +283,7 @@
 
12488
          return;
 
12489
        }
 
12490
       else
 
12491
-       retarray->base_addr = xmalloc (alloc_size);
 
12492
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12493
 
 
12494
     }
 
12495
   else
 
12496
@@ -430,8 +428,7 @@
 
12497
       retarray->offset = 0;
 
12498
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12499
 
 
12500
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12501
-                  * extent[rank-1];
 
12502
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12503
 
 
12504
       if (alloc_size == 0)
 
12505
        {
 
12506
@@ -440,7 +437,7 @@
 
12507
          return;
 
12508
        }
 
12509
       else
 
12510
-       retarray->base_addr = xmalloc (alloc_size);
 
12511
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
12512
     }
 
12513
   else
 
12514
     {
 
12515
Index: libgfortran/generated/minloc0_4_i1.c
 
12516
===================================================================
 
12517
--- a/src/libgfortran/generated/minloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
12518
+++ b/src/libgfortran/generated/minloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
12519
@@ -58,7 +58,7 @@
 
12520
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
12521
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12522
       retarray->offset = 0;
 
12523
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12524
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12525
     }
 
12526
   else
 
12527
     {
 
12528
@@ -199,7 +199,7 @@
 
12529
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
12530
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12531
       retarray->offset = 0;
 
12532
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12533
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12534
     }
 
12535
   else
 
12536
     {
 
12537
@@ -367,7 +367,7 @@
 
12538
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
12539
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12540
       retarray->offset = 0;
 
12541
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12542
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12543
     }
 
12544
   else if (unlikely (compile_options.bounds_check))
 
12545
     {
 
12546
Index: libgfortran/generated/reshape_c4.c
 
12547
===================================================================
 
12548
--- a/src/libgfortran/generated/reshape_c4.c    (.../tags/gcc_4_8_3_release)
 
12549
+++ b/src/libgfortran/generated/reshape_c4.c    (.../branches/gcc-4_8-branch)
 
12550
@@ -111,11 +111,11 @@
 
12551
       ret->offset = 0;
 
12552
 
 
12553
       if (unlikely (rs < 1))
 
12554
-        alloc_size = 1;
 
12555
+        alloc_size = 0;
 
12556
       else
 
12557
-        alloc_size = rs * sizeof (GFC_COMPLEX_4);
 
12558
+        alloc_size = rs;
 
12559
 
 
12560
-      ret->base_addr = xmalloc (alloc_size);
 
12561
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
12562
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
12563
     }
 
12564
 
 
12565
Index: libgfortran/generated/maxloc0_4_r16.c
 
12566
===================================================================
 
12567
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
12568
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
12569
@@ -58,7 +58,7 @@
 
12570
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
12571
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12572
       retarray->offset = 0;
 
12573
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12574
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12575
     }
 
12576
   else
 
12577
     {
 
12578
@@ -199,7 +199,7 @@
 
12579
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
12580
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12581
       retarray->offset = 0;
 
12582
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12583
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12584
     }
 
12585
   else
 
12586
     {
 
12587
@@ -367,7 +367,7 @@
 
12588
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
12589
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12590
       retarray->offset = 0;
 
12591
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
12592
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
12593
     }
 
12594
   else if (unlikely (compile_options.bounds_check))
 
12595
     {
 
12596
Index: libgfortran/generated/iall_i8.c
 
12597
===================================================================
 
12598
--- a/src/libgfortran/generated/iall_i8.c       (.../tags/gcc_4_8_3_release)
 
12599
+++ b/src/libgfortran/generated/iall_i8.c       (.../branches/gcc-4_8-branch)
 
12600
@@ -97,10 +97,9 @@
 
12601
       retarray->offset = 0;
 
12602
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12603
 
 
12604
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12605
-                  * extent[rank-1];
 
12606
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12607
 
 
12608
-      retarray->base_addr = xmalloc (alloc_size);
 
12609
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12610
       if (alloc_size == 0)
 
12611
        {
 
12612
          /* Make sure we have a zero-sized array.  */
 
12613
@@ -272,8 +271,7 @@
 
12614
 
 
12615
        }
 
12616
 
 
12617
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12618
-                  * extent[rank-1];
 
12619
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12620
 
 
12621
       retarray->offset = 0;
 
12622
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12623
@@ -285,7 +283,7 @@
 
12624
          return;
 
12625
        }
 
12626
       else
 
12627
-       retarray->base_addr = xmalloc (alloc_size);
 
12628
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12629
 
 
12630
     }
 
12631
   else
 
12632
@@ -430,8 +428,7 @@
 
12633
       retarray->offset = 0;
 
12634
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12635
 
 
12636
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12637
-                  * extent[rank-1];
 
12638
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12639
 
 
12640
       if (alloc_size == 0)
 
12641
        {
 
12642
@@ -440,7 +437,7 @@
 
12643
          return;
 
12644
        }
 
12645
       else
 
12646
-       retarray->base_addr = xmalloc (alloc_size);
 
12647
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12648
     }
 
12649
   else
 
12650
     {
 
12651
Index: libgfortran/generated/maxloc1_8_r16.c
 
12652
===================================================================
 
12653
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
12654
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
12655
@@ -98,10 +98,9 @@
 
12656
       retarray->offset = 0;
 
12657
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12658
 
 
12659
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12660
-                  * extent[rank-1];
 
12661
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12662
 
 
12663
-      retarray->base_addr = xmalloc (alloc_size);
 
12664
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12665
       if (alloc_size == 0)
 
12666
        {
 
12667
          /* Make sure we have a zero-sized array.  */
 
12668
@@ -294,8 +293,7 @@
 
12669
 
 
12670
        }
 
12671
 
 
12672
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12673
-                  * extent[rank-1];
 
12674
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12675
 
 
12676
       retarray->offset = 0;
 
12677
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12678
@@ -307,7 +305,7 @@
 
12679
          return;
 
12680
        }
 
12681
       else
 
12682
-       retarray->base_addr = xmalloc (alloc_size);
 
12683
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12684
 
 
12685
     }
 
12686
   else
 
12687
@@ -485,8 +483,7 @@
 
12688
       retarray->offset = 0;
 
12689
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12690
 
 
12691
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12692
-                  * extent[rank-1];
 
12693
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12694
 
 
12695
       if (alloc_size == 0)
 
12696
        {
 
12697
@@ -495,7 +492,7 @@
 
12698
          return;
 
12699
        }
 
12700
       else
 
12701
-       retarray->base_addr = xmalloc (alloc_size);
 
12702
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
12703
     }
 
12704
   else
 
12705
     {
 
12706
Index: libgfortran/generated/sum_r16.c
 
12707
===================================================================
 
12708
--- a/src/libgfortran/generated/sum_r16.c       (.../tags/gcc_4_8_3_release)
 
12709
+++ b/src/libgfortran/generated/sum_r16.c       (.../branches/gcc-4_8-branch)
 
12710
@@ -97,10 +97,9 @@
 
12711
       retarray->offset = 0;
 
12712
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12713
 
 
12714
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12715
-                  * extent[rank-1];
 
12716
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12717
 
 
12718
-      retarray->base_addr = xmalloc (alloc_size);
 
12719
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
12720
       if (alloc_size == 0)
 
12721
        {
 
12722
          /* Make sure we have a zero-sized array.  */
 
12723
@@ -272,8 +271,7 @@
 
12724
 
 
12725
        }
 
12726
 
 
12727
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12728
-                  * extent[rank-1];
 
12729
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12730
 
 
12731
       retarray->offset = 0;
 
12732
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12733
@@ -285,7 +283,7 @@
 
12734
          return;
 
12735
        }
 
12736
       else
 
12737
-       retarray->base_addr = xmalloc (alloc_size);
 
12738
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
12739
 
 
12740
     }
 
12741
   else
 
12742
@@ -430,8 +428,7 @@
 
12743
       retarray->offset = 0;
 
12744
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12745
 
 
12746
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12747
-                  * extent[rank-1];
 
12748
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12749
 
 
12750
       if (alloc_size == 0)
 
12751
        {
 
12752
@@ -440,7 +437,7 @@
 
12753
          return;
 
12754
        }
 
12755
       else
 
12756
-       retarray->base_addr = xmalloc (alloc_size);
 
12757
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
12758
     }
 
12759
   else
 
12760
     {
 
12761
Index: libgfortran/generated/sum_i1.c
 
12762
===================================================================
 
12763
--- a/src/libgfortran/generated/sum_i1.c        (.../tags/gcc_4_8_3_release)
 
12764
+++ b/src/libgfortran/generated/sum_i1.c        (.../branches/gcc-4_8-branch)
 
12765
@@ -97,10 +97,9 @@
 
12766
       retarray->offset = 0;
 
12767
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12768
 
 
12769
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12770
-                  * extent[rank-1];
 
12771
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12772
 
 
12773
-      retarray->base_addr = xmalloc (alloc_size);
 
12774
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12775
       if (alloc_size == 0)
 
12776
        {
 
12777
          /* Make sure we have a zero-sized array.  */
 
12778
@@ -272,8 +271,7 @@
 
12779
 
 
12780
        }
 
12781
 
 
12782
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12783
-                  * extent[rank-1];
 
12784
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12785
 
 
12786
       retarray->offset = 0;
 
12787
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12788
@@ -285,7 +283,7 @@
 
12789
          return;
 
12790
        }
 
12791
       else
 
12792
-       retarray->base_addr = xmalloc (alloc_size);
 
12793
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12794
 
 
12795
     }
 
12796
   else
 
12797
@@ -430,8 +428,7 @@
 
12798
       retarray->offset = 0;
 
12799
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12800
 
 
12801
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12802
-                  * extent[rank-1];
 
12803
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12804
 
 
12805
       if (alloc_size == 0)
 
12806
        {
 
12807
@@ -440,7 +437,7 @@
 
12808
          return;
 
12809
        }
 
12810
       else
 
12811
-       retarray->base_addr = xmalloc (alloc_size);
 
12812
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
12813
     }
 
12814
   else
 
12815
     {
 
12816
Index: libgfortran/generated/in_pack_i2.c
 
12817
===================================================================
 
12818
--- a/src/libgfortran/generated/in_pack_i2.c    (.../tags/gcc_4_8_3_release)
 
12819
+++ b/src/libgfortran/generated/in_pack_i2.c    (.../branches/gcc-4_8-branch)
 
12820
@@ -76,7 +76,7 @@
 
12821
     return source->base_addr;
 
12822
 
 
12823
   /* Allocate storage for the destination.  */
 
12824
-  destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
 
12825
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
 
12826
   dest = destptr;
 
12827
   src = source->base_addr;
 
12828
   stride0 = stride[0];
 
12829
Index: libgfortran/generated/transpose_r10.c
 
12830
===================================================================
 
12831
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
 
12832
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
 
12833
@@ -60,7 +60,8 @@
 
12834
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
12835
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
12836
 
 
12837
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
 
12838
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
12839
+                                     sizeof (GFC_REAL_10));
 
12840
       ret->offset = 0;
 
12841
     } else if (unlikely (compile_options.bounds_check))
 
12842
     {
 
12843
Index: libgfortran/generated/maxloc1_16_r16.c
 
12844
===================================================================
 
12845
--- a/src/libgfortran/generated/maxloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
12846
+++ b/src/libgfortran/generated/maxloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
12847
@@ -98,10 +98,9 @@
 
12848
       retarray->offset = 0;
 
12849
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12850
 
 
12851
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12852
-                  * extent[rank-1];
 
12853
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12854
 
 
12855
-      retarray->base_addr = xmalloc (alloc_size);
 
12856
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12857
       if (alloc_size == 0)
 
12858
        {
 
12859
          /* Make sure we have a zero-sized array.  */
 
12860
@@ -294,8 +293,7 @@
 
12861
 
 
12862
        }
 
12863
 
 
12864
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12865
-                  * extent[rank-1];
 
12866
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12867
 
 
12868
       retarray->offset = 0;
 
12869
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12870
@@ -307,7 +305,7 @@
 
12871
          return;
 
12872
        }
 
12873
       else
 
12874
-       retarray->base_addr = xmalloc (alloc_size);
 
12875
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12876
 
 
12877
     }
 
12878
   else
 
12879
@@ -485,8 +483,7 @@
 
12880
       retarray->offset = 0;
 
12881
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12882
 
 
12883
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12884
-                  * extent[rank-1];
 
12885
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12886
 
 
12887
       if (alloc_size == 0)
 
12888
        {
 
12889
@@ -495,7 +492,7 @@
 
12890
          return;
 
12891
        }
 
12892
       else
 
12893
-       retarray->base_addr = xmalloc (alloc_size);
 
12894
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12895
     }
 
12896
   else
 
12897
     {
 
12898
Index: libgfortran/generated/maxloc1_16_i4.c
 
12899
===================================================================
 
12900
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
12901
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
12902
@@ -98,10 +98,9 @@
 
12903
       retarray->offset = 0;
 
12904
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12905
 
 
12906
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12907
-                  * extent[rank-1];
 
12908
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12909
 
 
12910
-      retarray->base_addr = xmalloc (alloc_size);
 
12911
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12912
       if (alloc_size == 0)
 
12913
        {
 
12914
          /* Make sure we have a zero-sized array.  */
 
12915
@@ -294,8 +293,7 @@
 
12916
 
 
12917
        }
 
12918
 
 
12919
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12920
-                  * extent[rank-1];
 
12921
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12922
 
 
12923
       retarray->offset = 0;
 
12924
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12925
@@ -307,7 +305,7 @@
 
12926
          return;
 
12927
        }
 
12928
       else
 
12929
-       retarray->base_addr = xmalloc (alloc_size);
 
12930
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12931
 
 
12932
     }
 
12933
   else
 
12934
@@ -485,8 +483,7 @@
 
12935
       retarray->offset = 0;
 
12936
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
12937
 
 
12938
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
12939
-                  * extent[rank-1];
 
12940
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
12941
 
 
12942
       if (alloc_size == 0)
 
12943
        {
 
12944
@@ -495,7 +492,7 @@
 
12945
          return;
 
12946
        }
 
12947
       else
 
12948
-       retarray->base_addr = xmalloc (alloc_size);
 
12949
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
12950
     }
 
12951
   else
 
12952
     {
 
12953
Index: libgfortran/generated/spread_i1.c
 
12954
===================================================================
 
12955
--- a/src/libgfortran/generated/spread_i1.c     (.../tags/gcc_4_8_3_release)
 
12956
+++ b/src/libgfortran/generated/spread_i1.c     (.../branches/gcc-4_8-branch)
 
12957
@@ -101,8 +101,8 @@
 
12958
        }
 
12959
       ret->offset = 0;
 
12960
 
 
12961
-      /* xmalloc allocates a single byte for zero size.  */
 
12962
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
 
12963
+      /* xmallocarray allocates a single byte for zero size.  */
 
12964
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
 
12965
       if (rs <= 0)
 
12966
         return;
 
12967
     }
 
12968
@@ -244,7 +244,7 @@
 
12969
 
 
12970
   if (ret->base_addr == NULL)
 
12971
     {
 
12972
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
 
12973
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
 
12974
       ret->offset = 0;
 
12975
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
12976
     }
 
12977
Index: libgfortran/generated/maxloc0_16_i8.c
 
12978
===================================================================
 
12979
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
12980
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
12981
@@ -58,7 +58,7 @@
 
12982
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
12983
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12984
       retarray->offset = 0;
 
12985
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
12986
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
12987
     }
 
12988
   else
 
12989
     {
 
12990
@@ -199,7 +199,7 @@
 
12991
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
12992
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
12993
       retarray->offset = 0;
 
12994
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
12995
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
12996
     }
 
12997
   else
 
12998
     {
 
12999
@@ -367,7 +367,7 @@
 
13000
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13001
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13002
       retarray->offset = 0;
 
13003
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13004
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13005
     }
 
13006
   else if (unlikely (compile_options.bounds_check))
 
13007
     {
 
13008
Index: libgfortran/generated/maxval_r16.c
 
13009
===================================================================
 
13010
--- a/src/libgfortran/generated/maxval_r16.c    (.../tags/gcc_4_8_3_release)
 
13011
+++ b/src/libgfortran/generated/maxval_r16.c    (.../branches/gcc-4_8-branch)
 
13012
@@ -97,10 +97,9 @@
 
13013
       retarray->offset = 0;
 
13014
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13015
 
 
13016
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13017
-                  * extent[rank-1];
 
13018
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13019
 
 
13020
-      retarray->base_addr = xmalloc (alloc_size);
 
13021
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
13022
       if (alloc_size == 0)
 
13023
        {
 
13024
          /* Make sure we have a zero-sized array.  */
 
13025
@@ -286,8 +285,7 @@
 
13026
 
 
13027
        }
 
13028
 
 
13029
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13030
-                  * extent[rank-1];
 
13031
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13032
 
 
13033
       retarray->offset = 0;
 
13034
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13035
@@ -299,7 +297,7 @@
 
13036
          return;
 
13037
        }
 
13038
       else
 
13039
-       retarray->base_addr = xmalloc (alloc_size);
 
13040
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
13041
 
 
13042
     }
 
13043
   else
 
13044
@@ -472,8 +470,7 @@
 
13045
       retarray->offset = 0;
 
13046
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13047
 
 
13048
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13049
-                  * extent[rank-1];
 
13050
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13051
 
 
13052
       if (alloc_size == 0)
 
13053
        {
 
13054
@@ -482,7 +479,7 @@
 
13055
          return;
 
13056
        }
 
13057
       else
 
13058
-       retarray->base_addr = xmalloc (alloc_size);
 
13059
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
13060
     }
 
13061
   else
 
13062
     {
 
13063
Index: libgfortran/generated/product_c10.c
 
13064
===================================================================
 
13065
--- a/src/libgfortran/generated/product_c10.c   (.../tags/gcc_4_8_3_release)
 
13066
+++ b/src/libgfortran/generated/product_c10.c   (.../branches/gcc-4_8-branch)
 
13067
@@ -97,10 +97,9 @@
 
13068
       retarray->offset = 0;
 
13069
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13070
 
 
13071
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13072
-                  * extent[rank-1];
 
13073
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13074
 
 
13075
-      retarray->base_addr = xmalloc (alloc_size);
 
13076
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
13077
       if (alloc_size == 0)
 
13078
        {
 
13079
          /* Make sure we have a zero-sized array.  */
 
13080
@@ -272,8 +271,7 @@
 
13081
 
 
13082
        }
 
13083
 
 
13084
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13085
-                  * extent[rank-1];
 
13086
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13087
 
 
13088
       retarray->offset = 0;
 
13089
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13090
@@ -285,7 +283,7 @@
 
13091
          return;
 
13092
        }
 
13093
       else
 
13094
-       retarray->base_addr = xmalloc (alloc_size);
 
13095
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
13096
 
 
13097
     }
 
13098
   else
 
13099
@@ -430,8 +428,7 @@
 
13100
       retarray->offset = 0;
 
13101
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13102
 
 
13103
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13104
-                  * extent[rank-1];
 
13105
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13106
 
 
13107
       if (alloc_size == 0)
 
13108
        {
 
13109
@@ -440,7 +437,7 @@
 
13110
          return;
 
13111
        }
 
13112
       else
 
13113
-       retarray->base_addr = xmalloc (alloc_size);
 
13114
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
13115
     }
 
13116
   else
 
13117
     {
 
13118
Index: libgfortran/generated/minloc1_8_i4.c
 
13119
===================================================================
 
13120
--- a/src/libgfortran/generated/minloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
13121
+++ b/src/libgfortran/generated/minloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
13122
@@ -98,10 +98,9 @@
 
13123
       retarray->offset = 0;
 
13124
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13125
 
 
13126
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13127
-                  * extent[rank-1];
 
13128
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13129
 
 
13130
-      retarray->base_addr = xmalloc (alloc_size);
 
13131
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
13132
       if (alloc_size == 0)
 
13133
        {
 
13134
          /* Make sure we have a zero-sized array.  */
 
13135
@@ -294,8 +293,7 @@
 
13136
 
 
13137
        }
 
13138
 
 
13139
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13140
-                  * extent[rank-1];
 
13141
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13142
 
 
13143
       retarray->offset = 0;
 
13144
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13145
@@ -307,7 +305,7 @@
 
13146
          return;
 
13147
        }
 
13148
       else
 
13149
-       retarray->base_addr = xmalloc (alloc_size);
 
13150
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
13151
 
 
13152
     }
 
13153
   else
 
13154
@@ -485,8 +483,7 @@
 
13155
       retarray->offset = 0;
 
13156
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13157
 
 
13158
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13159
-                  * extent[rank-1];
 
13160
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13161
 
 
13162
       if (alloc_size == 0)
 
13163
        {
 
13164
@@ -495,7 +492,7 @@
 
13165
          return;
 
13166
        }
 
13167
       else
 
13168
-       retarray->base_addr = xmalloc (alloc_size);
 
13169
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
13170
     }
 
13171
   else
 
13172
     {
 
13173
Index: libgfortran/generated/minloc0_16_i16.c
 
13174
===================================================================
 
13175
--- a/src/libgfortran/generated/minloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
13176
+++ b/src/libgfortran/generated/minloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
13177
@@ -58,7 +58,7 @@
 
13178
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13179
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13180
       retarray->offset = 0;
 
13181
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13182
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13183
     }
 
13184
   else
 
13185
     {
 
13186
@@ -199,7 +199,7 @@
 
13187
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13188
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13189
       retarray->offset = 0;
 
13190
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13191
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13192
     }
 
13193
   else
 
13194
     {
 
13195
@@ -367,7 +367,7 @@
 
13196
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13197
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13198
       retarray->offset = 0;
 
13199
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13200
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13201
     }
 
13202
   else if (unlikely (compile_options.bounds_check))
 
13203
     {
 
13204
Index: libgfortran/generated/matmul_r16.c
 
13205
===================================================================
 
13206
--- a/src/libgfortran/generated/matmul_r16.c    (.../tags/gcc_4_8_3_release)
 
13207
+++ b/src/libgfortran/generated/matmul_r16.c    (.../branches/gcc-4_8-branch)
 
13208
@@ -124,7 +124,7 @@
 
13209
         }
 
13210
 
 
13211
       retarray->base_addr
 
13212
-       = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
 
13213
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
 
13214
       retarray->offset = 0;
 
13215
     }
 
13216
     else if (unlikely (compile_options.bounds_check))
 
13217
Index: libgfortran/generated/minloc0_4_r4.c
 
13218
===================================================================
 
13219
--- a/src/libgfortran/generated/minloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
13220
+++ b/src/libgfortran/generated/minloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
13221
@@ -58,7 +58,7 @@
 
13222
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13223
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13224
       retarray->offset = 0;
 
13225
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13226
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13227
     }
 
13228
   else
 
13229
     {
 
13230
@@ -199,7 +199,7 @@
 
13231
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13232
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13233
       retarray->offset = 0;
 
13234
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13235
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13236
     }
 
13237
   else
 
13238
     {
 
13239
@@ -367,7 +367,7 @@
 
13240
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13241
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13242
       retarray->offset = 0;
 
13243
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13244
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13245
     }
 
13246
   else if (unlikely (compile_options.bounds_check))
 
13247
     {
 
13248
Index: libgfortran/generated/iany_i2.c
 
13249
===================================================================
 
13250
--- a/src/libgfortran/generated/iany_i2.c       (.../tags/gcc_4_8_3_release)
 
13251
+++ b/src/libgfortran/generated/iany_i2.c       (.../branches/gcc-4_8-branch)
 
13252
@@ -97,10 +97,9 @@
 
13253
       retarray->offset = 0;
 
13254
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13255
 
 
13256
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13257
-                  * extent[rank-1];
 
13258
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13259
 
 
13260
-      retarray->base_addr = xmalloc (alloc_size);
 
13261
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13262
       if (alloc_size == 0)
 
13263
        {
 
13264
          /* Make sure we have a zero-sized array.  */
 
13265
@@ -272,8 +271,7 @@
 
13266
 
 
13267
        }
 
13268
 
 
13269
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13270
-                  * extent[rank-1];
 
13271
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13272
 
 
13273
       retarray->offset = 0;
 
13274
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13275
@@ -285,7 +283,7 @@
 
13276
          return;
 
13277
        }
 
13278
       else
 
13279
-       retarray->base_addr = xmalloc (alloc_size);
 
13280
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13281
 
 
13282
     }
 
13283
   else
 
13284
@@ -430,8 +428,7 @@
 
13285
       retarray->offset = 0;
 
13286
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13287
 
 
13288
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13289
-                  * extent[rank-1];
 
13290
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13291
 
 
13292
       if (alloc_size == 0)
 
13293
        {
 
13294
@@ -440,7 +437,7 @@
 
13295
          return;
 
13296
        }
 
13297
       else
 
13298
-       retarray->base_addr = xmalloc (alloc_size);
 
13299
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13300
     }
 
13301
   else
 
13302
     {
 
13303
Index: libgfortran/generated/sum_r4.c
 
13304
===================================================================
 
13305
--- a/src/libgfortran/generated/sum_r4.c        (.../tags/gcc_4_8_3_release)
 
13306
+++ b/src/libgfortran/generated/sum_r4.c        (.../branches/gcc-4_8-branch)
 
13307
@@ -97,10 +97,9 @@
 
13308
       retarray->offset = 0;
 
13309
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13310
 
 
13311
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13312
-                  * extent[rank-1];
 
13313
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13314
 
 
13315
-      retarray->base_addr = xmalloc (alloc_size);
 
13316
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
13317
       if (alloc_size == 0)
 
13318
        {
 
13319
          /* Make sure we have a zero-sized array.  */
 
13320
@@ -272,8 +271,7 @@
 
13321
 
 
13322
        }
 
13323
 
 
13324
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13325
-                  * extent[rank-1];
 
13326
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13327
 
 
13328
       retarray->offset = 0;
 
13329
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13330
@@ -285,7 +283,7 @@
 
13331
          return;
 
13332
        }
 
13333
       else
 
13334
-       retarray->base_addr = xmalloc (alloc_size);
 
13335
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
13336
 
 
13337
     }
 
13338
   else
 
13339
@@ -430,8 +428,7 @@
 
13340
       retarray->offset = 0;
 
13341
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13342
 
 
13343
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13344
-                  * extent[rank-1];
 
13345
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13346
 
 
13347
       if (alloc_size == 0)
 
13348
        {
 
13349
@@ -440,7 +437,7 @@
 
13350
          return;
 
13351
        }
 
13352
       else
 
13353
-       retarray->base_addr = xmalloc (alloc_size);
 
13354
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
13355
     }
 
13356
   else
 
13357
     {
 
13358
Index: libgfortran/generated/unpack_c8.c
 
13359
===================================================================
 
13360
--- a/src/libgfortran/generated/unpack_c8.c     (.../tags/gcc_4_8_3_release)
 
13361
+++ b/src/libgfortran/generated/unpack_c8.c     (.../branches/gcc-4_8-branch)
 
13362
@@ -99,7 +99,7 @@
 
13363
          rs *= extent[n];
 
13364
        }
 
13365
       ret->offset = 0;
 
13366
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
13367
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
13368
     }
 
13369
   else
 
13370
     {
 
13371
@@ -244,7 +244,7 @@
 
13372
          rs *= extent[n];
 
13373
        }
 
13374
       ret->offset = 0;
 
13375
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
13376
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
13377
     }
 
13378
   else
 
13379
     {
 
13380
Index: libgfortran/generated/in_pack_c16.c
 
13381
===================================================================
 
13382
--- a/src/libgfortran/generated/in_pack_c16.c   (.../tags/gcc_4_8_3_release)
 
13383
+++ b/src/libgfortran/generated/in_pack_c16.c   (.../branches/gcc-4_8-branch)
 
13384
@@ -76,7 +76,7 @@
 
13385
     return source->base_addr;
 
13386
 
 
13387
   /* Allocate storage for the destination.  */
 
13388
-  destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
 
13389
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
 
13390
   dest = destptr;
 
13391
   src = source->base_addr;
 
13392
   stride0 = stride[0];
 
13393
Index: libgfortran/generated/minloc0_4_i2.c
 
13394
===================================================================
 
13395
--- a/src/libgfortran/generated/minloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
13396
+++ b/src/libgfortran/generated/minloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
13397
@@ -58,7 +58,7 @@
 
13398
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13399
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13400
       retarray->offset = 0;
 
13401
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13402
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13403
     }
 
13404
   else
 
13405
     {
 
13406
@@ -199,7 +199,7 @@
 
13407
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13408
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13409
       retarray->offset = 0;
 
13410
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13411
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13412
     }
 
13413
   else
 
13414
     {
 
13415
@@ -367,7 +367,7 @@
 
13416
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13417
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13418
       retarray->offset = 0;
 
13419
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13420
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13421
     }
 
13422
   else if (unlikely (compile_options.bounds_check))
 
13423
     {
 
13424
Index: libgfortran/generated/spread_c10.c
 
13425
===================================================================
 
13426
--- a/src/libgfortran/generated/spread_c10.c    (.../tags/gcc_4_8_3_release)
 
13427
+++ b/src/libgfortran/generated/spread_c10.c    (.../branches/gcc-4_8-branch)
 
13428
@@ -101,8 +101,8 @@
 
13429
        }
 
13430
       ret->offset = 0;
 
13431
 
 
13432
-      /* xmalloc allocates a single byte for zero size.  */
 
13433
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
 
13434
+      /* xmallocarray allocates a single byte for zero size.  */
 
13435
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
 
13436
       if (rs <= 0)
 
13437
         return;
 
13438
     }
 
13439
@@ -244,7 +244,7 @@
 
13440
 
 
13441
   if (ret->base_addr == NULL)
 
13442
     {
 
13443
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
 
13444
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
 
13445
       ret->offset = 0;
 
13446
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
13447
     }
 
13448
Index: libgfortran/generated/maxloc0_8_i1.c
 
13449
===================================================================
 
13450
--- a/src/libgfortran/generated/maxloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
13451
+++ b/src/libgfortran/generated/maxloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
13452
@@ -58,7 +58,7 @@
 
13453
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13454
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13455
       retarray->offset = 0;
 
13456
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13457
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13458
     }
 
13459
   else
 
13460
     {
 
13461
@@ -199,7 +199,7 @@
 
13462
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13463
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13464
       retarray->offset = 0;
 
13465
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13466
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13467
     }
 
13468
   else
 
13469
     {
 
13470
@@ -367,7 +367,7 @@
 
13471
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13472
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13473
       retarray->offset = 0;
 
13474
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13475
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13476
     }
 
13477
   else if (unlikely (compile_options.bounds_check))
 
13478
     {
 
13479
Index: libgfortran/generated/spread_r4.c
 
13480
===================================================================
 
13481
--- a/src/libgfortran/generated/spread_r4.c     (.../tags/gcc_4_8_3_release)
 
13482
+++ b/src/libgfortran/generated/spread_r4.c     (.../branches/gcc-4_8-branch)
 
13483
@@ -101,8 +101,8 @@
 
13484
        }
 
13485
       ret->offset = 0;
 
13486
 
 
13487
-      /* xmalloc allocates a single byte for zero size.  */
 
13488
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
 
13489
+      /* xmallocarray allocates a single byte for zero size.  */
 
13490
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
 
13491
       if (rs <= 0)
 
13492
         return;
 
13493
     }
 
13494
@@ -244,7 +244,7 @@
 
13495
 
 
13496
   if (ret->base_addr == NULL)
 
13497
     {
 
13498
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
 
13499
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
 
13500
       ret->offset = 0;
 
13501
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
13502
     }
 
13503
Index: libgfortran/generated/minloc0_8_i8.c
 
13504
===================================================================
 
13505
--- a/src/libgfortran/generated/minloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
13506
+++ b/src/libgfortran/generated/minloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
13507
@@ -58,7 +58,7 @@
 
13508
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13509
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13510
       retarray->offset = 0;
 
13511
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13512
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13513
     }
 
13514
   else
 
13515
     {
 
13516
@@ -199,7 +199,7 @@
 
13517
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13518
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13519
       retarray->offset = 0;
 
13520
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13521
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13522
     }
 
13523
   else
 
13524
     {
 
13525
@@ -367,7 +367,7 @@
 
13526
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13527
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13528
       retarray->offset = 0;
 
13529
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13530
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13531
     }
 
13532
   else if (unlikely (compile_options.bounds_check))
 
13533
     {
 
13534
Index: libgfortran/generated/matmul_c8.c
 
13535
===================================================================
 
13536
--- a/src/libgfortran/generated/matmul_c8.c     (.../tags/gcc_4_8_3_release)
 
13537
+++ b/src/libgfortran/generated/matmul_c8.c     (.../branches/gcc-4_8-branch)
 
13538
@@ -124,7 +124,7 @@
 
13539
         }
 
13540
 
 
13541
       retarray->base_addr
 
13542
-       = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
 
13543
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
 
13544
       retarray->offset = 0;
 
13545
     }
 
13546
     else if (unlikely (compile_options.bounds_check))
 
13547
Index: libgfortran/generated/minloc1_16_r10.c
 
13548
===================================================================
 
13549
--- a/src/libgfortran/generated/minloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
13550
+++ b/src/libgfortran/generated/minloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
13551
@@ -98,10 +98,9 @@
 
13552
       retarray->offset = 0;
 
13553
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13554
 
 
13555
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13556
-                  * extent[rank-1];
 
13557
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13558
 
 
13559
-      retarray->base_addr = xmalloc (alloc_size);
 
13560
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13561
       if (alloc_size == 0)
 
13562
        {
 
13563
          /* Make sure we have a zero-sized array.  */
 
13564
@@ -294,8 +293,7 @@
 
13565
 
 
13566
        }
 
13567
 
 
13568
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13569
-                  * extent[rank-1];
 
13570
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13571
 
 
13572
       retarray->offset = 0;
 
13573
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13574
@@ -307,7 +305,7 @@
 
13575
          return;
 
13576
        }
 
13577
       else
 
13578
-       retarray->base_addr = xmalloc (alloc_size);
 
13579
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13580
 
 
13581
     }
 
13582
   else
 
13583
@@ -485,8 +483,7 @@
 
13584
       retarray->offset = 0;
 
13585
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13586
 
 
13587
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13588
-                  * extent[rank-1];
 
13589
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13590
 
 
13591
       if (alloc_size == 0)
 
13592
        {
 
13593
@@ -495,7 +492,7 @@
 
13594
          return;
 
13595
        }
 
13596
       else
 
13597
-       retarray->base_addr = xmalloc (alloc_size);
 
13598
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13599
     }
 
13600
   else
 
13601
     {
 
13602
Index: libgfortran/generated/sum_i2.c
 
13603
===================================================================
 
13604
--- a/src/libgfortran/generated/sum_i2.c        (.../tags/gcc_4_8_3_release)
 
13605
+++ b/src/libgfortran/generated/sum_i2.c        (.../branches/gcc-4_8-branch)
 
13606
@@ -97,10 +97,9 @@
 
13607
       retarray->offset = 0;
 
13608
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13609
 
 
13610
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13611
-                  * extent[rank-1];
 
13612
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13613
 
 
13614
-      retarray->base_addr = xmalloc (alloc_size);
 
13615
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13616
       if (alloc_size == 0)
 
13617
        {
 
13618
          /* Make sure we have a zero-sized array.  */
 
13619
@@ -272,8 +271,7 @@
 
13620
 
 
13621
        }
 
13622
 
 
13623
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13624
-                  * extent[rank-1];
 
13625
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13626
 
 
13627
       retarray->offset = 0;
 
13628
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13629
@@ -285,7 +283,7 @@
 
13630
          return;
 
13631
        }
 
13632
       else
 
13633
-       retarray->base_addr = xmalloc (alloc_size);
 
13634
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13635
 
 
13636
     }
 
13637
   else
 
13638
@@ -430,8 +428,7 @@
 
13639
       retarray->offset = 0;
 
13640
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13641
 
 
13642
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13643
-                  * extent[rank-1];
 
13644
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13645
 
 
13646
       if (alloc_size == 0)
 
13647
        {
 
13648
@@ -440,7 +437,7 @@
 
13649
          return;
 
13650
        }
 
13651
       else
 
13652
-       retarray->base_addr = xmalloc (alloc_size);
 
13653
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
13654
     }
 
13655
   else
 
13656
     {
 
13657
Index: libgfortran/generated/iparity_i16.c
 
13658
===================================================================
 
13659
--- a/src/libgfortran/generated/iparity_i16.c   (.../tags/gcc_4_8_3_release)
 
13660
+++ b/src/libgfortran/generated/iparity_i16.c   (.../branches/gcc-4_8-branch)
 
13661
@@ -97,10 +97,9 @@
 
13662
       retarray->offset = 0;
 
13663
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13664
 
 
13665
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13666
-                  * extent[rank-1];
 
13667
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13668
 
 
13669
-      retarray->base_addr = xmalloc (alloc_size);
 
13670
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13671
       if (alloc_size == 0)
 
13672
        {
 
13673
          /* Make sure we have a zero-sized array.  */
 
13674
@@ -272,8 +271,7 @@
 
13675
 
 
13676
        }
 
13677
 
 
13678
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13679
-                  * extent[rank-1];
 
13680
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13681
 
 
13682
       retarray->offset = 0;
 
13683
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13684
@@ -285,7 +283,7 @@
 
13685
          return;
 
13686
        }
 
13687
       else
 
13688
-       retarray->base_addr = xmalloc (alloc_size);
 
13689
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13690
 
 
13691
     }
 
13692
   else
 
13693
@@ -430,8 +428,7 @@
 
13694
       retarray->offset = 0;
 
13695
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13696
 
 
13697
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13698
-                  * extent[rank-1];
 
13699
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13700
 
 
13701
       if (alloc_size == 0)
 
13702
        {
 
13703
@@ -440,7 +437,7 @@
 
13704
          return;
 
13705
        }
 
13706
       else
 
13707
-       retarray->base_addr = xmalloc (alloc_size);
 
13708
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
13709
     }
 
13710
   else
 
13711
     {
 
13712
Index: libgfortran/generated/minloc0_16_i1.c
 
13713
===================================================================
 
13714
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
13715
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
13716
@@ -58,7 +58,7 @@
 
13717
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13718
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13719
       retarray->offset = 0;
 
13720
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13721
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13722
     }
 
13723
   else
 
13724
     {
 
13725
@@ -199,7 +199,7 @@
 
13726
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13727
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13728
       retarray->offset = 0;
 
13729
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13730
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13731
     }
 
13732
   else
 
13733
     {
 
13734
@@ -367,7 +367,7 @@
 
13735
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13736
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13737
       retarray->offset = 0;
 
13738
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
13739
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
13740
     }
 
13741
   else if (unlikely (compile_options.bounds_check))
 
13742
     {
 
13743
Index: libgfortran/generated/reshape_c16.c
 
13744
===================================================================
 
13745
--- a/src/libgfortran/generated/reshape_c16.c   (.../tags/gcc_4_8_3_release)
 
13746
+++ b/src/libgfortran/generated/reshape_c16.c   (.../branches/gcc-4_8-branch)
 
13747
@@ -111,11 +111,11 @@
 
13748
       ret->offset = 0;
 
13749
 
 
13750
       if (unlikely (rs < 1))
 
13751
-        alloc_size = 1;
 
13752
+        alloc_size = 0;
 
13753
       else
 
13754
-        alloc_size = rs * sizeof (GFC_COMPLEX_16);
 
13755
+        alloc_size = rs;
 
13756
 
 
13757
-      ret->base_addr = xmalloc (alloc_size);
 
13758
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
13759
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
13760
     }
 
13761
 
 
13762
Index: libgfortran/generated/pack_c4.c
 
13763
===================================================================
 
13764
--- a/src/libgfortran/generated/pack_c4.c       (.../tags/gcc_4_8_3_release)
 
13765
+++ b/src/libgfortran/generated/pack_c4.c       (.../branches/gcc-4_8-branch)
 
13766
@@ -167,8 +167,8 @@
 
13767
 
 
13768
          ret->offset = 0;
 
13769
 
 
13770
-         /* xmalloc allocates a single byte for zero size.  */
 
13771
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
 
13772
+         /* xmallocarray allocates a single byte for zero size.  */
 
13773
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
 
13774
 
 
13775
          if (total == 0)
 
13776
            return;
 
13777
Index: libgfortran/generated/parity_l4.c
 
13778
===================================================================
 
13779
--- a/src/libgfortran/generated/parity_l4.c     (.../tags/gcc_4_8_3_release)
 
13780
+++ b/src/libgfortran/generated/parity_l4.c     (.../branches/gcc-4_8-branch)
 
13781
@@ -98,10 +98,9 @@
 
13782
       retarray->offset = 0;
 
13783
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13784
 
 
13785
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13786
-                  * extent[rank-1];
 
13787
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13788
 
 
13789
-      retarray->base_addr = xmalloc (alloc_size);
 
13790
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
13791
       if (alloc_size == 0)
 
13792
        {
 
13793
          /* Make sure we have a zero-sized array.  */
 
13794
Index: libgfortran/generated/spread_i2.c
 
13795
===================================================================
 
13796
--- a/src/libgfortran/generated/spread_i2.c     (.../tags/gcc_4_8_3_release)
 
13797
+++ b/src/libgfortran/generated/spread_i2.c     (.../branches/gcc-4_8-branch)
 
13798
@@ -101,8 +101,8 @@
 
13799
        }
 
13800
       ret->offset = 0;
 
13801
 
 
13802
-      /* xmalloc allocates a single byte for zero size.  */
 
13803
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
 
13804
+      /* xmallocarray allocates a single byte for zero size.  */
 
13805
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
 
13806
       if (rs <= 0)
 
13807
         return;
 
13808
     }
 
13809
@@ -244,7 +244,7 @@
 
13810
 
 
13811
   if (ret->base_addr == NULL)
 
13812
     {
 
13813
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
 
13814
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
 
13815
       ret->offset = 0;
 
13816
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
13817
     }
 
13818
Index: libgfortran/generated/any_l4.c
 
13819
===================================================================
 
13820
--- a/src/libgfortran/generated/any_l4.c        (.../tags/gcc_4_8_3_release)
 
13821
+++ b/src/libgfortran/generated/any_l4.c        (.../branches/gcc-4_8-branch)
 
13822
@@ -101,8 +101,7 @@
 
13823
       retarray->offset = 0;
 
13824
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13825
 
 
13826
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13827
-                  * extent[rank-1];
 
13828
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13829
 
 
13830
       if (alloc_size == 0)
 
13831
        {
 
13832
@@ -111,7 +110,7 @@
 
13833
          return;
 
13834
        }
 
13835
       else
 
13836
-       retarray->base_addr = xmalloc (alloc_size);
 
13837
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
13838
     }
 
13839
   else
 
13840
     {
 
13841
Index: libgfortran/generated/maxloc1_4_i8.c
 
13842
===================================================================
 
13843
--- a/src/libgfortran/generated/maxloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
13844
+++ b/src/libgfortran/generated/maxloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
13845
@@ -98,10 +98,9 @@
 
13846
       retarray->offset = 0;
 
13847
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13848
 
 
13849
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13850
-                  * extent[rank-1];
 
13851
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13852
 
 
13853
-      retarray->base_addr = xmalloc (alloc_size);
 
13854
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13855
       if (alloc_size == 0)
 
13856
        {
 
13857
          /* Make sure we have a zero-sized array.  */
 
13858
@@ -294,8 +293,7 @@
 
13859
 
 
13860
        }
 
13861
 
 
13862
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13863
-                  * extent[rank-1];
 
13864
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13865
 
 
13866
       retarray->offset = 0;
 
13867
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13868
@@ -307,7 +305,7 @@
 
13869
          return;
 
13870
        }
 
13871
       else
 
13872
-       retarray->base_addr = xmalloc (alloc_size);
 
13873
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13874
 
 
13875
     }
 
13876
   else
 
13877
@@ -485,8 +483,7 @@
 
13878
       retarray->offset = 0;
 
13879
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13880
 
 
13881
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13882
-                  * extent[rank-1];
 
13883
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13884
 
 
13885
       if (alloc_size == 0)
 
13886
        {
 
13887
@@ -495,7 +492,7 @@
 
13888
          return;
 
13889
        }
 
13890
       else
 
13891
-       retarray->base_addr = xmalloc (alloc_size);
 
13892
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13893
     }
 
13894
   else
 
13895
     {
 
13896
Index: libgfortran/generated/maxloc0_8_r4.c
 
13897
===================================================================
 
13898
--- a/src/libgfortran/generated/maxloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
13899
+++ b/src/libgfortran/generated/maxloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
13900
@@ -58,7 +58,7 @@
 
13901
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13902
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13903
       retarray->offset = 0;
 
13904
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13905
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13906
     }
 
13907
   else
 
13908
     {
 
13909
@@ -199,7 +199,7 @@
 
13910
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13911
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13912
       retarray->offset = 0;
 
13913
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13914
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13915
     }
 
13916
   else
 
13917
     {
 
13918
@@ -367,7 +367,7 @@
 
13919
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13920
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13921
       retarray->offset = 0;
 
13922
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
13923
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
13924
     }
 
13925
   else if (unlikely (compile_options.bounds_check))
 
13926
     {
 
13927
Index: libgfortran/generated/maxloc1_4_i16.c
 
13928
===================================================================
 
13929
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
13930
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
13931
@@ -98,10 +98,9 @@
 
13932
       retarray->offset = 0;
 
13933
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13934
 
 
13935
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13936
-                  * extent[rank-1];
 
13937
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13938
 
 
13939
-      retarray->base_addr = xmalloc (alloc_size);
 
13940
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13941
       if (alloc_size == 0)
 
13942
        {
 
13943
          /* Make sure we have a zero-sized array.  */
 
13944
@@ -294,8 +293,7 @@
 
13945
 
 
13946
        }
 
13947
 
 
13948
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13949
-                  * extent[rank-1];
 
13950
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13951
 
 
13952
       retarray->offset = 0;
 
13953
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13954
@@ -307,7 +305,7 @@
 
13955
          return;
 
13956
        }
 
13957
       else
 
13958
-       retarray->base_addr = xmalloc (alloc_size);
 
13959
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13960
 
 
13961
     }
 
13962
   else
 
13963
@@ -485,8 +483,7 @@
 
13964
       retarray->offset = 0;
 
13965
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13966
 
 
13967
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13968
-                  * extent[rank-1];
 
13969
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13970
 
 
13971
       if (alloc_size == 0)
 
13972
        {
 
13973
@@ -495,7 +492,7 @@
 
13974
          return;
 
13975
        }
 
13976
       else
 
13977
-       retarray->base_addr = xmalloc (alloc_size);
 
13978
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
13979
     }
 
13980
   else
 
13981
     {
 
13982
Index: libgfortran/generated/minloc0_4_r10.c
 
13983
===================================================================
 
13984
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
13985
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
13986
@@ -58,7 +58,7 @@
 
13987
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13988
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13989
       retarray->offset = 0;
 
13990
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
13991
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
13992
     }
 
13993
   else
 
13994
     {
 
13995
@@ -199,7 +199,7 @@
 
13996
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13997
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13998
       retarray->offset = 0;
 
13999
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14000
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14001
     }
 
14002
   else
 
14003
     {
 
14004
@@ -367,7 +367,7 @@
 
14005
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14006
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14007
       retarray->offset = 0;
 
14008
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14009
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14010
     }
 
14011
   else if (unlikely (compile_options.bounds_check))
 
14012
     {
 
14013
Index: libgfortran/generated/minloc0_8_i16.c
 
14014
===================================================================
 
14015
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
14016
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
14017
@@ -58,7 +58,7 @@
 
14018
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14019
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14020
       retarray->offset = 0;
 
14021
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14022
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14023
     }
 
14024
   else
 
14025
     {
 
14026
@@ -199,7 +199,7 @@
 
14027
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14028
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14029
       retarray->offset = 0;
 
14030
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14031
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14032
     }
 
14033
   else
 
14034
     {
 
14035
@@ -367,7 +367,7 @@
 
14036
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14037
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14038
       retarray->offset = 0;
 
14039
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14040
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14041
     }
 
14042
   else if (unlikely (compile_options.bounds_check))
 
14043
     {
 
14044
Index: libgfortran/generated/minloc1_8_r10.c
 
14045
===================================================================
 
14046
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
14047
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
14048
@@ -98,10 +98,9 @@
 
14049
       retarray->offset = 0;
 
14050
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14051
 
 
14052
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14053
-                  * extent[rank-1];
 
14054
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14055
 
 
14056
-      retarray->base_addr = xmalloc (alloc_size);
 
14057
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14058
       if (alloc_size == 0)
 
14059
        {
 
14060
          /* Make sure we have a zero-sized array.  */
 
14061
@@ -294,8 +293,7 @@
 
14062
 
 
14063
        }
 
14064
 
 
14065
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14066
-                  * extent[rank-1];
 
14067
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14068
 
 
14069
       retarray->offset = 0;
 
14070
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14071
@@ -307,7 +305,7 @@
 
14072
          return;
 
14073
        }
 
14074
       else
 
14075
-       retarray->base_addr = xmalloc (alloc_size);
 
14076
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14077
 
 
14078
     }
 
14079
   else
 
14080
@@ -485,8 +483,7 @@
 
14081
       retarray->offset = 0;
 
14082
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14083
 
 
14084
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14085
-                  * extent[rank-1];
 
14086
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14087
 
 
14088
       if (alloc_size == 0)
 
14089
        {
 
14090
@@ -495,7 +492,7 @@
 
14091
          return;
 
14092
        }
 
14093
       else
 
14094
-       retarray->base_addr = xmalloc (alloc_size);
 
14095
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14096
     }
 
14097
   else
 
14098
     {
 
14099
Index: libgfortran/generated/minloc0_16_r4.c
 
14100
===================================================================
 
14101
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
14102
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
14103
@@ -58,7 +58,7 @@
 
14104
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14105
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14106
       retarray->offset = 0;
 
14107
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14108
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14109
     }
 
14110
   else
 
14111
     {
 
14112
@@ -199,7 +199,7 @@
 
14113
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14114
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14115
       retarray->offset = 0;
 
14116
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14117
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14118
     }
 
14119
   else
 
14120
     {
 
14121
@@ -367,7 +367,7 @@
 
14122
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14123
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14124
       retarray->offset = 0;
 
14125
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14126
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14127
     }
 
14128
   else if (unlikely (compile_options.bounds_check))
 
14129
     {
 
14130
Index: libgfortran/generated/product_i4.c
 
14131
===================================================================
 
14132
--- a/src/libgfortran/generated/product_i4.c    (.../tags/gcc_4_8_3_release)
 
14133
+++ b/src/libgfortran/generated/product_i4.c    (.../branches/gcc-4_8-branch)
 
14134
@@ -97,10 +97,9 @@
 
14135
       retarray->offset = 0;
 
14136
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14137
 
 
14138
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14139
-                  * extent[rank-1];
 
14140
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14141
 
 
14142
-      retarray->base_addr = xmalloc (alloc_size);
 
14143
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14144
       if (alloc_size == 0)
 
14145
        {
 
14146
          /* Make sure we have a zero-sized array.  */
 
14147
@@ -272,8 +271,7 @@
 
14148
 
 
14149
        }
 
14150
 
 
14151
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14152
-                  * extent[rank-1];
 
14153
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14154
 
 
14155
       retarray->offset = 0;
 
14156
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14157
@@ -285,7 +283,7 @@
 
14158
          return;
 
14159
        }
 
14160
       else
 
14161
-       retarray->base_addr = xmalloc (alloc_size);
 
14162
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14163
 
 
14164
     }
 
14165
   else
 
14166
@@ -430,8 +428,7 @@
 
14167
       retarray->offset = 0;
 
14168
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14169
 
 
14170
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14171
-                  * extent[rank-1];
 
14172
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14173
 
 
14174
       if (alloc_size == 0)
 
14175
        {
 
14176
@@ -440,7 +437,7 @@
 
14177
          return;
 
14178
        }
 
14179
       else
 
14180
-       retarray->base_addr = xmalloc (alloc_size);
 
14181
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14182
     }
 
14183
   else
 
14184
     {
 
14185
Index: libgfortran/generated/sum_c16.c
 
14186
===================================================================
 
14187
--- a/src/libgfortran/generated/sum_c16.c       (.../tags/gcc_4_8_3_release)
 
14188
+++ b/src/libgfortran/generated/sum_c16.c       (.../branches/gcc-4_8-branch)
 
14189
@@ -97,10 +97,9 @@
 
14190
       retarray->offset = 0;
 
14191
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14192
 
 
14193
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14194
-                  * extent[rank-1];
 
14195
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14196
 
 
14197
-      retarray->base_addr = xmalloc (alloc_size);
 
14198
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
14199
       if (alloc_size == 0)
 
14200
        {
 
14201
          /* Make sure we have a zero-sized array.  */
 
14202
@@ -272,8 +271,7 @@
 
14203
 
 
14204
        }
 
14205
 
 
14206
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14207
-                  * extent[rank-1];
 
14208
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14209
 
 
14210
       retarray->offset = 0;
 
14211
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14212
@@ -285,7 +283,7 @@
 
14213
          return;
 
14214
        }
 
14215
       else
 
14216
-       retarray->base_addr = xmalloc (alloc_size);
 
14217
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
14218
 
 
14219
     }
 
14220
   else
 
14221
@@ -430,8 +428,7 @@
 
14222
       retarray->offset = 0;
 
14223
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14224
 
 
14225
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14226
-                  * extent[rank-1];
 
14227
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14228
 
 
14229
       if (alloc_size == 0)
 
14230
        {
 
14231
@@ -440,7 +437,7 @@
 
14232
          return;
 
14233
        }
 
14234
       else
 
14235
-       retarray->base_addr = xmalloc (alloc_size);
 
14236
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
14237
     }
 
14238
   else
 
14239
     {
 
14240
Index: libgfortran/generated/transpose_c10.c
 
14241
===================================================================
 
14242
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
 
14243
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
 
14244
@@ -60,7 +60,8 @@
 
14245
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
14246
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
14247
 
 
14248
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
 
14249
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
14250
+                                     sizeof (GFC_COMPLEX_10));
 
14251
       ret->offset = 0;
 
14252
     } else if (unlikely (compile_options.bounds_check))
 
14253
     {
 
14254
Index: libgfortran/generated/maxloc1_16_r8.c
 
14255
===================================================================
 
14256
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
14257
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
14258
@@ -98,10 +98,9 @@
 
14259
       retarray->offset = 0;
 
14260
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14261
 
 
14262
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14263
-                  * extent[rank-1];
 
14264
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14265
 
 
14266
-      retarray->base_addr = xmalloc (alloc_size);
 
14267
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14268
       if (alloc_size == 0)
 
14269
        {
 
14270
          /* Make sure we have a zero-sized array.  */
 
14271
@@ -294,8 +293,7 @@
 
14272
 
 
14273
        }
 
14274
 
 
14275
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14276
-                  * extent[rank-1];
 
14277
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14278
 
 
14279
       retarray->offset = 0;
 
14280
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14281
@@ -307,7 +305,7 @@
 
14282
          return;
 
14283
        }
 
14284
       else
 
14285
-       retarray->base_addr = xmalloc (alloc_size);
 
14286
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14287
 
 
14288
     }
 
14289
   else
 
14290
@@ -485,8 +483,7 @@
 
14291
       retarray->offset = 0;
 
14292
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14293
 
 
14294
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14295
-                  * extent[rank-1];
 
14296
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14297
 
 
14298
       if (alloc_size == 0)
 
14299
        {
 
14300
@@ -495,7 +492,7 @@
 
14301
          return;
 
14302
        }
 
14303
       else
 
14304
-       retarray->base_addr = xmalloc (alloc_size);
 
14305
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14306
     }
 
14307
   else
 
14308
     {
 
14309
Index: libgfortran/generated/transpose_r4.c
 
14310
===================================================================
 
14311
--- a/src/libgfortran/generated/transpose_r4.c  (.../tags/gcc_4_8_3_release)
 
14312
+++ b/src/libgfortran/generated/transpose_r4.c  (.../branches/gcc-4_8-branch)
 
14313
@@ -60,7 +60,8 @@
 
14314
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
14315
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
14316
 
 
14317
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
 
14318
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
14319
+                                     sizeof (GFC_REAL_4));
 
14320
       ret->offset = 0;
 
14321
     } else if (unlikely (compile_options.bounds_check))
 
14322
     {
 
14323
Index: libgfortran/generated/cshift1_4.c
 
14324
===================================================================
 
14325
--- a/src/libgfortran/generated/cshift1_4.c     (.../tags/gcc_4_8_3_release)
 
14326
+++ b/src/libgfortran/generated/cshift1_4.c     (.../branches/gcc-4_8-branch)
 
14327
@@ -80,7 +80,7 @@
 
14328
     {
 
14329
       int i;
 
14330
 
 
14331
-      ret->base_addr = xmalloc (size * arraysize);
 
14332
+      ret->base_addr = xmallocarray (arraysize, size);
 
14333
       ret->offset = 0;
 
14334
       ret->dtype = array->dtype;
 
14335
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14336
Index: libgfortran/generated/maxloc0_8_i2.c
 
14337
===================================================================
 
14338
--- a/src/libgfortran/generated/maxloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
14339
+++ b/src/libgfortran/generated/maxloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
14340
@@ -58,7 +58,7 @@
 
14341
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14342
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14343
       retarray->offset = 0;
 
14344
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14345
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14346
     }
 
14347
   else
 
14348
     {
 
14349
@@ -199,7 +199,7 @@
 
14350
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14351
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14352
       retarray->offset = 0;
 
14353
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14354
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14355
     }
 
14356
   else
 
14357
     {
 
14358
@@ -367,7 +367,7 @@
 
14359
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14360
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14361
       retarray->offset = 0;
 
14362
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
14363
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
14364
     }
 
14365
   else if (unlikely (compile_options.bounds_check))
 
14366
     {
 
14367
Index: libgfortran/generated/count_8_l.c
 
14368
===================================================================
 
14369
--- a/src/libgfortran/generated/count_8_l.c     (.../tags/gcc_4_8_3_release)
 
14370
+++ b/src/libgfortran/generated/count_8_l.c     (.../branches/gcc-4_8-branch)
 
14371
@@ -101,8 +101,7 @@
 
14372
       retarray->offset = 0;
 
14373
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14374
 
 
14375
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14376
-                  * extent[rank-1];
 
14377
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14378
 
 
14379
       if (alloc_size == 0)
 
14380
        {
 
14381
@@ -111,7 +110,7 @@
 
14382
          return;
 
14383
        }
 
14384
       else
 
14385
-       retarray->base_addr = xmalloc (alloc_size);
 
14386
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14387
     }
 
14388
   else
 
14389
     {
 
14390
Index: libgfortran/generated/in_pack_i4.c
 
14391
===================================================================
 
14392
--- a/src/libgfortran/generated/in_pack_i4.c    (.../tags/gcc_4_8_3_release)
 
14393
+++ b/src/libgfortran/generated/in_pack_i4.c    (.../branches/gcc-4_8-branch)
 
14394
@@ -76,7 +76,7 @@
 
14395
     return source->base_addr;
 
14396
 
 
14397
   /* Allocate storage for the destination.  */
 
14398
-  destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
 
14399
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
 
14400
   dest = destptr;
 
14401
   src = source->base_addr;
 
14402
   stride0 = stride[0];
 
14403
Index: libgfortran/generated/minloc0_16_i2.c
 
14404
===================================================================
 
14405
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
14406
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
14407
@@ -58,7 +58,7 @@
 
14408
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14409
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14410
       retarray->offset = 0;
 
14411
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14412
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14413
     }
 
14414
   else
 
14415
     {
 
14416
@@ -199,7 +199,7 @@
 
14417
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14418
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14419
       retarray->offset = 0;
 
14420
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14421
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14422
     }
 
14423
   else
 
14424
     {
 
14425
@@ -367,7 +367,7 @@
 
14426
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14427
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14428
       retarray->offset = 0;
 
14429
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14430
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14431
     }
 
14432
   else if (unlikely (compile_options.bounds_check))
 
14433
     {
 
14434
Index: libgfortran/generated/minloc1_8_r8.c
 
14435
===================================================================
 
14436
--- a/src/libgfortran/generated/minloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
14437
+++ b/src/libgfortran/generated/minloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
14438
@@ -98,10 +98,9 @@
 
14439
       retarray->offset = 0;
 
14440
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14441
 
 
14442
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14443
-                  * extent[rank-1];
 
14444
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14445
 
 
14446
-      retarray->base_addr = xmalloc (alloc_size);
 
14447
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14448
       if (alloc_size == 0)
 
14449
        {
 
14450
          /* Make sure we have a zero-sized array.  */
 
14451
@@ -294,8 +293,7 @@
 
14452
 
 
14453
        }
 
14454
 
 
14455
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14456
-                  * extent[rank-1];
 
14457
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14458
 
 
14459
       retarray->offset = 0;
 
14460
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14461
@@ -307,7 +305,7 @@
 
14462
          return;
 
14463
        }
 
14464
       else
 
14465
-       retarray->base_addr = xmalloc (alloc_size);
 
14466
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14467
 
 
14468
     }
 
14469
   else
 
14470
@@ -485,8 +483,7 @@
 
14471
       retarray->offset = 0;
 
14472
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14473
 
 
14474
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14475
-                  * extent[rank-1];
 
14476
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14477
 
 
14478
       if (alloc_size == 0)
 
14479
        {
 
14480
@@ -495,7 +492,7 @@
 
14481
          return;
 
14482
        }
 
14483
       else
 
14484
-       retarray->base_addr = xmalloc (alloc_size);
 
14485
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14486
     }
 
14487
   else
 
14488
     {
 
14489
Index: libgfortran/generated/matmul_c16.c
 
14490
===================================================================
 
14491
--- a/src/libgfortran/generated/matmul_c16.c    (.../tags/gcc_4_8_3_release)
 
14492
+++ b/src/libgfortran/generated/matmul_c16.c    (.../branches/gcc-4_8-branch)
 
14493
@@ -124,7 +124,7 @@
 
14494
         }
 
14495
 
 
14496
       retarray->base_addr
 
14497
-       = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
 
14498
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
 
14499
       retarray->offset = 0;
 
14500
     }
 
14501
     else if (unlikely (compile_options.bounds_check))
 
14502
Index: libgfortran/generated/minval_i1.c
 
14503
===================================================================
 
14504
--- a/src/libgfortran/generated/minval_i1.c     (.../tags/gcc_4_8_3_release)
 
14505
+++ b/src/libgfortran/generated/minval_i1.c     (.../branches/gcc-4_8-branch)
 
14506
@@ -97,10 +97,9 @@
 
14507
       retarray->offset = 0;
 
14508
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14509
 
 
14510
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14511
-                  * extent[rank-1];
 
14512
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14513
 
 
14514
-      retarray->base_addr = xmalloc (alloc_size);
 
14515
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14516
       if (alloc_size == 0)
 
14517
        {
 
14518
          /* Make sure we have a zero-sized array.  */
 
14519
@@ -286,8 +285,7 @@
 
14520
 
 
14521
        }
 
14522
 
 
14523
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14524
-                  * extent[rank-1];
 
14525
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14526
 
 
14527
       retarray->offset = 0;
 
14528
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14529
@@ -299,7 +297,7 @@
 
14530
          return;
 
14531
        }
 
14532
       else
 
14533
-       retarray->base_addr = xmalloc (alloc_size);
 
14534
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14535
 
 
14536
     }
 
14537
   else
 
14538
@@ -472,8 +470,7 @@
 
14539
       retarray->offset = 0;
 
14540
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14541
 
 
14542
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14543
-                  * extent[rank-1];
 
14544
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14545
 
 
14546
       if (alloc_size == 0)
 
14547
        {
 
14548
@@ -482,7 +479,7 @@
 
14549
          return;
 
14550
        }
 
14551
       else
 
14552
-       retarray->base_addr = xmalloc (alloc_size);
 
14553
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14554
     }
 
14555
   else
 
14556
     {
 
14557
Index: libgfortran/generated/shape_i16.c
 
14558
===================================================================
 
14559
--- a/src/libgfortran/generated/shape_i16.c     (.../tags/gcc_4_8_3_release)
 
14560
+++ b/src/libgfortran/generated/shape_i16.c     (.../branches/gcc-4_8-branch)
 
14561
@@ -49,7 +49,7 @@
 
14562
     {
 
14563
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
14564
       ret->offset = 0;
 
14565
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14566
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14567
     }
 
14568
 
 
14569
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
14570
Index: libgfortran/generated/iany_i4.c
 
14571
===================================================================
 
14572
--- a/src/libgfortran/generated/iany_i4.c       (.../tags/gcc_4_8_3_release)
 
14573
+++ b/src/libgfortran/generated/iany_i4.c       (.../branches/gcc-4_8-branch)
 
14574
@@ -97,10 +97,9 @@
 
14575
       retarray->offset = 0;
 
14576
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14577
 
 
14578
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14579
-                  * extent[rank-1];
 
14580
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14581
 
 
14582
-      retarray->base_addr = xmalloc (alloc_size);
 
14583
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14584
       if (alloc_size == 0)
 
14585
        {
 
14586
          /* Make sure we have a zero-sized array.  */
 
14587
@@ -272,8 +271,7 @@
 
14588
 
 
14589
        }
 
14590
 
 
14591
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14592
-                  * extent[rank-1];
 
14593
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14594
 
 
14595
       retarray->offset = 0;
 
14596
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14597
@@ -285,7 +283,7 @@
 
14598
          return;
 
14599
        }
 
14600
       else
 
14601
-       retarray->base_addr = xmalloc (alloc_size);
 
14602
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14603
 
 
14604
     }
 
14605
   else
 
14606
@@ -430,8 +428,7 @@
 
14607
       retarray->offset = 0;
 
14608
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14609
 
 
14610
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14611
-                  * extent[rank-1];
 
14612
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14613
 
 
14614
       if (alloc_size == 0)
 
14615
        {
 
14616
@@ -440,7 +437,7 @@
 
14617
          return;
 
14618
        }
 
14619
       else
 
14620
-       retarray->base_addr = xmalloc (alloc_size);
 
14621
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14622
     }
 
14623
   else
 
14624
     {
 
14625
Index: libgfortran/generated/minloc0_16_r16.c
 
14626
===================================================================
 
14627
--- a/src/libgfortran/generated/minloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
14628
+++ b/src/libgfortran/generated/minloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
14629
@@ -58,7 +58,7 @@
 
14630
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14631
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14632
       retarray->offset = 0;
 
14633
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14634
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14635
     }
 
14636
   else
 
14637
     {
 
14638
@@ -199,7 +199,7 @@
 
14639
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14640
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14641
       retarray->offset = 0;
 
14642
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14643
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14644
     }
 
14645
   else
 
14646
     {
 
14647
@@ -367,7 +367,7 @@
 
14648
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14649
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14650
       retarray->offset = 0;
 
14651
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
14652
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
14653
     }
 
14654
   else if (unlikely (compile_options.bounds_check))
 
14655
     {
 
14656
Index: libgfortran/generated/product_i16.c
 
14657
===================================================================
 
14658
--- a/src/libgfortran/generated/product_i16.c   (.../tags/gcc_4_8_3_release)
 
14659
+++ b/src/libgfortran/generated/product_i16.c   (.../branches/gcc-4_8-branch)
 
14660
@@ -97,10 +97,9 @@
 
14661
       retarray->offset = 0;
 
14662
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14663
 
 
14664
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14665
-                  * extent[rank-1];
 
14666
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14667
 
 
14668
-      retarray->base_addr = xmalloc (alloc_size);
 
14669
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14670
       if (alloc_size == 0)
 
14671
        {
 
14672
          /* Make sure we have a zero-sized array.  */
 
14673
@@ -272,8 +271,7 @@
 
14674
 
 
14675
        }
 
14676
 
 
14677
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14678
-                  * extent[rank-1];
 
14679
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14680
 
 
14681
       retarray->offset = 0;
 
14682
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14683
@@ -285,7 +283,7 @@
 
14684
          return;
 
14685
        }
 
14686
       else
 
14687
-       retarray->base_addr = xmalloc (alloc_size);
 
14688
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14689
 
 
14690
     }
 
14691
   else
 
14692
@@ -430,8 +428,7 @@
 
14693
       retarray->offset = 0;
 
14694
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14695
 
 
14696
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14697
-                  * extent[rank-1];
 
14698
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14699
 
 
14700
       if (alloc_size == 0)
 
14701
        {
 
14702
@@ -440,7 +437,7 @@
 
14703
          return;
 
14704
        }
 
14705
       else
 
14706
-       retarray->base_addr = xmalloc (alloc_size);
 
14707
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
14708
     }
 
14709
   else
 
14710
     {
 
14711
Index: libgfortran/generated/unpack_i1.c
 
14712
===================================================================
 
14713
--- a/src/libgfortran/generated/unpack_i1.c     (.../tags/gcc_4_8_3_release)
 
14714
+++ b/src/libgfortran/generated/unpack_i1.c     (.../branches/gcc-4_8-branch)
 
14715
@@ -99,7 +99,7 @@
 
14716
          rs *= extent[n];
 
14717
        }
 
14718
       ret->offset = 0;
 
14719
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
14720
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
14721
     }
 
14722
   else
 
14723
     {
 
14724
@@ -244,7 +244,7 @@
 
14725
          rs *= extent[n];
 
14726
        }
 
14727
       ret->offset = 0;
 
14728
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
14729
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
14730
     }
 
14731
   else
 
14732
     {
 
14733
Index: libgfortran/generated/minloc0_4_i4.c
 
14734
===================================================================
 
14735
--- a/src/libgfortran/generated/minloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
14736
+++ b/src/libgfortran/generated/minloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
14737
@@ -58,7 +58,7 @@
 
14738
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14739
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14740
       retarray->offset = 0;
 
14741
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14742
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14743
     }
 
14744
   else
 
14745
     {
 
14746
@@ -199,7 +199,7 @@
 
14747
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14748
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14749
       retarray->offset = 0;
 
14750
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14751
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14752
     }
 
14753
   else
 
14754
     {
 
14755
@@ -367,7 +367,7 @@
 
14756
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14757
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14758
       retarray->offset = 0;
 
14759
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14760
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14761
     }
 
14762
   else if (unlikely (compile_options.bounds_check))
 
14763
     {
 
14764
Index: libgfortran/generated/matmul_i1.c
 
14765
===================================================================
 
14766
--- a/src/libgfortran/generated/matmul_i1.c     (.../tags/gcc_4_8_3_release)
 
14767
+++ b/src/libgfortran/generated/matmul_i1.c     (.../branches/gcc-4_8-branch)
 
14768
@@ -124,7 +124,7 @@
 
14769
         }
 
14770
 
 
14771
       retarray->base_addr
 
14772
-       = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
 
14773
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
 
14774
       retarray->offset = 0;
 
14775
     }
 
14776
     else if (unlikely (compile_options.bounds_check))
 
14777
Index: libgfortran/generated/minval_r4.c
 
14778
===================================================================
 
14779
--- a/src/libgfortran/generated/minval_r4.c     (.../tags/gcc_4_8_3_release)
 
14780
+++ b/src/libgfortran/generated/minval_r4.c     (.../branches/gcc-4_8-branch)
 
14781
@@ -97,10 +97,9 @@
 
14782
       retarray->offset = 0;
 
14783
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14784
 
 
14785
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14786
-                  * extent[rank-1];
 
14787
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14788
 
 
14789
-      retarray->base_addr = xmalloc (alloc_size);
 
14790
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14791
       if (alloc_size == 0)
 
14792
        {
 
14793
          /* Make sure we have a zero-sized array.  */
 
14794
@@ -286,8 +285,7 @@
 
14795
 
 
14796
        }
 
14797
 
 
14798
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14799
-                  * extent[rank-1];
 
14800
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14801
 
 
14802
       retarray->offset = 0;
 
14803
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14804
@@ -299,7 +297,7 @@
 
14805
          return;
 
14806
        }
 
14807
       else
 
14808
-       retarray->base_addr = xmalloc (alloc_size);
 
14809
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14810
 
 
14811
     }
 
14812
   else
 
14813
@@ -472,8 +470,7 @@
 
14814
       retarray->offset = 0;
 
14815
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14816
 
 
14817
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14818
-                  * extent[rank-1];
 
14819
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14820
 
 
14821
       if (alloc_size == 0)
 
14822
        {
 
14823
@@ -482,7 +479,7 @@
 
14824
          return;
 
14825
        }
 
14826
       else
 
14827
-       retarray->base_addr = xmalloc (alloc_size);
 
14828
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14829
     }
 
14830
   else
 
14831
     {
 
14832
Index: libgfortran/generated/spread_i16.c
 
14833
===================================================================
 
14834
--- a/src/libgfortran/generated/spread_i16.c    (.../tags/gcc_4_8_3_release)
 
14835
+++ b/src/libgfortran/generated/spread_i16.c    (.../branches/gcc-4_8-branch)
 
14836
@@ -101,8 +101,8 @@
 
14837
        }
 
14838
       ret->offset = 0;
 
14839
 
 
14840
-      /* xmalloc allocates a single byte for zero size.  */
 
14841
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
 
14842
+      /* xmallocarray allocates a single byte for zero size.  */
 
14843
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
 
14844
       if (rs <= 0)
 
14845
         return;
 
14846
     }
 
14847
@@ -244,7 +244,7 @@
 
14848
 
 
14849
   if (ret->base_addr == NULL)
 
14850
     {
 
14851
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
 
14852
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
 
14853
       ret->offset = 0;
 
14854
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14855
     }
 
14856
Index: libgfortran/generated/sum_i4.c
 
14857
===================================================================
 
14858
--- a/src/libgfortran/generated/sum_i4.c        (.../tags/gcc_4_8_3_release)
 
14859
+++ b/src/libgfortran/generated/sum_i4.c        (.../branches/gcc-4_8-branch)
 
14860
@@ -97,10 +97,9 @@
 
14861
       retarray->offset = 0;
 
14862
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14863
 
 
14864
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14865
-                  * extent[rank-1];
 
14866
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14867
 
 
14868
-      retarray->base_addr = xmalloc (alloc_size);
 
14869
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14870
       if (alloc_size == 0)
 
14871
        {
 
14872
          /* Make sure we have a zero-sized array.  */
 
14873
@@ -272,8 +271,7 @@
 
14874
 
 
14875
        }
 
14876
 
 
14877
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14878
-                  * extent[rank-1];
 
14879
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14880
 
 
14881
       retarray->offset = 0;
 
14882
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14883
@@ -285,7 +283,7 @@
 
14884
          return;
 
14885
        }
 
14886
       else
 
14887
-       retarray->base_addr = xmalloc (alloc_size);
 
14888
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14889
 
 
14890
     }
 
14891
   else
 
14892
@@ -430,8 +428,7 @@
 
14893
       retarray->offset = 0;
 
14894
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14895
 
 
14896
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14897
-                  * extent[rank-1];
 
14898
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14899
 
 
14900
       if (alloc_size == 0)
 
14901
        {
 
14902
@@ -440,7 +437,7 @@
 
14903
          return;
 
14904
        }
 
14905
       else
 
14906
-       retarray->base_addr = xmalloc (alloc_size);
 
14907
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14908
     }
 
14909
   else
 
14910
     {
 
14911
Index: libgfortran/generated/unpack_r10.c
 
14912
===================================================================
 
14913
--- a/src/libgfortran/generated/unpack_r10.c    (.../tags/gcc_4_8_3_release)
 
14914
+++ b/src/libgfortran/generated/unpack_r10.c    (.../branches/gcc-4_8-branch)
 
14915
@@ -99,7 +99,7 @@
 
14916
          rs *= extent[n];
 
14917
        }
 
14918
       ret->offset = 0;
 
14919
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
14920
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
14921
     }
 
14922
   else
 
14923
     {
 
14924
@@ -244,7 +244,7 @@
 
14925
          rs *= extent[n];
 
14926
        }
 
14927
       ret->offset = 0;
 
14928
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
14929
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
14930
     }
 
14931
   else
 
14932
     {
 
14933
Index: libgfortran/generated/bessel_r16.c
 
14934
===================================================================
 
14935
--- a/src/libgfortran/generated/bessel_r16.c    (.../tags/gcc_4_8_3_release)
 
14936
+++ b/src/libgfortran/generated/bessel_r16.c    (.../branches/gcc-4_8-branch)
 
14937
@@ -59,7 +59,7 @@
 
14938
     {
 
14939
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14940
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14941
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
14942
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
14943
       ret->offset = 0;
 
14944
     }
 
14945
 
 
14946
@@ -126,7 +126,7 @@
 
14947
     {
 
14948
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14949
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14950
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
14951
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
14952
       ret->offset = 0;
 
14953
     }
 
14954
 
 
14955
@@ -166,7 +166,7 @@
 
14956
 
 
14957
   x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
14958
 
 
14959
-  for (i = 2; i <= n1+n2; i++)
 
14960
+  for (i = 2; i <= n2 - n1; i++)
 
14961
     {
 
14962
 #if defined(GFC_REAL_16_INFINITY)
 
14963
       if (unlikely (last2 == -GFC_REAL_16_INFINITY))
 
14964
Index: libgfortran/generated/norm2_r8.c
 
14965
===================================================================
 
14966
--- a/src/libgfortran/generated/norm2_r8.c      (.../tags/gcc_4_8_3_release)
 
14967
+++ b/src/libgfortran/generated/norm2_r8.c      (.../branches/gcc-4_8-branch)
 
14968
@@ -101,10 +101,9 @@
 
14969
       retarray->offset = 0;
 
14970
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14971
 
 
14972
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14973
-                  * extent[rank-1];
 
14974
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14975
 
 
14976
-      retarray->base_addr = xmalloc (alloc_size);
 
14977
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
14978
       if (alloc_size == 0)
 
14979
        {
 
14980
          /* Make sure we have a zero-sized array.  */
 
14981
Index: libgfortran/generated/spread_i4.c
 
14982
===================================================================
 
14983
--- a/src/libgfortran/generated/spread_i4.c     (.../tags/gcc_4_8_3_release)
 
14984
+++ b/src/libgfortran/generated/spread_i4.c     (.../branches/gcc-4_8-branch)
 
14985
@@ -101,8 +101,8 @@
 
14986
        }
 
14987
       ret->offset = 0;
 
14988
 
 
14989
-      /* xmalloc allocates a single byte for zero size.  */
 
14990
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
 
14991
+      /* xmallocarray allocates a single byte for zero size.  */
 
14992
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
 
14993
       if (rs <= 0)
 
14994
         return;
 
14995
     }
 
14996
@@ -244,7 +244,7 @@
 
14997
 
 
14998
   if (ret->base_addr == NULL)
 
14999
     {
 
15000
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
 
15001
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
 
15002
       ret->offset = 0;
 
15003
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15004
     }
 
15005
Index: libgfortran/generated/eoshift3_8.c
 
15006
===================================================================
 
15007
--- a/src/libgfortran/generated/eoshift3_8.c    (.../tags/gcc_4_8_3_release)
 
15008
+++ b/src/libgfortran/generated/eoshift3_8.c    (.../branches/gcc-4_8-branch)
 
15009
@@ -89,7 +89,7 @@
 
15010
     {
 
15011
       int i;
 
15012
 
 
15013
-      ret->base_addr = xmalloc (size * arraysize);
 
15014
+      ret->base_addr = xmallocarray (arraysize, size);
 
15015
       ret->offset = 0;
 
15016
       ret->dtype = array->dtype;
 
15017
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
15018
@@ -107,8 +107,8 @@
 
15019
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
15020
 
 
15021
         }
 
15022
-      /* xmalloc allocates a single byte for zero size.  */
 
15023
-      ret->base_addr = xmalloc (size * arraysize);
 
15024
+      /* xmallocarray allocates a single byte for zero size.  */
 
15025
+      ret->base_addr = xmallocarray (arraysize, size);
 
15026
 
 
15027
     }
 
15028
   else if (unlikely (compile_options.bounds_check))
 
15029
Index: libgfortran/generated/minloc1_4_i1.c
 
15030
===================================================================
 
15031
--- a/src/libgfortran/generated/minloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
15032
+++ b/src/libgfortran/generated/minloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
15033
@@ -98,10 +98,9 @@
 
15034
       retarray->offset = 0;
 
15035
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15036
 
 
15037
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15038
-                  * extent[rank-1];
 
15039
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15040
 
 
15041
-      retarray->base_addr = xmalloc (alloc_size);
 
15042
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15043
       if (alloc_size == 0)
 
15044
        {
 
15045
          /* Make sure we have a zero-sized array.  */
 
15046
@@ -294,8 +293,7 @@
 
15047
 
 
15048
        }
 
15049
 
 
15050
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15051
-                  * extent[rank-1];
 
15052
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15053
 
 
15054
       retarray->offset = 0;
 
15055
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15056
@@ -307,7 +305,7 @@
 
15057
          return;
 
15058
        }
 
15059
       else
 
15060
-       retarray->base_addr = xmalloc (alloc_size);
 
15061
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15062
 
 
15063
     }
 
15064
   else
 
15065
@@ -485,8 +483,7 @@
 
15066
       retarray->offset = 0;
 
15067
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15068
 
 
15069
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15070
-                  * extent[rank-1];
 
15071
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15072
 
 
15073
       if (alloc_size == 0)
 
15074
        {
 
15075
@@ -495,7 +492,7 @@
 
15076
          return;
 
15077
        }
 
15078
       else
 
15079
-       retarray->base_addr = xmalloc (alloc_size);
 
15080
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15081
     }
 
15082
   else
 
15083
     {
 
15084
Index: libgfortran/generated/minval_i2.c
 
15085
===================================================================
 
15086
--- a/src/libgfortran/generated/minval_i2.c     (.../tags/gcc_4_8_3_release)
 
15087
+++ b/src/libgfortran/generated/minval_i2.c     (.../branches/gcc-4_8-branch)
 
15088
@@ -97,10 +97,9 @@
 
15089
       retarray->offset = 0;
 
15090
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15091
 
 
15092
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15093
-                  * extent[rank-1];
 
15094
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15095
 
 
15096
-      retarray->base_addr = xmalloc (alloc_size);
 
15097
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15098
       if (alloc_size == 0)
 
15099
        {
 
15100
          /* Make sure we have a zero-sized array.  */
 
15101
@@ -286,8 +285,7 @@
 
15102
 
 
15103
        }
 
15104
 
 
15105
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15106
-                  * extent[rank-1];
 
15107
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15108
 
 
15109
       retarray->offset = 0;
 
15110
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15111
@@ -299,7 +297,7 @@
 
15112
          return;
 
15113
        }
 
15114
       else
 
15115
-       retarray->base_addr = xmalloc (alloc_size);
 
15116
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15117
 
 
15118
     }
 
15119
   else
 
15120
@@ -472,8 +470,7 @@
 
15121
       retarray->offset = 0;
 
15122
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15123
 
 
15124
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15125
-                  * extent[rank-1];
 
15126
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15127
 
 
15128
       if (alloc_size == 0)
 
15129
        {
 
15130
@@ -482,7 +479,7 @@
 
15131
          return;
 
15132
        }
 
15133
       else
 
15134
-       retarray->base_addr = xmalloc (alloc_size);
 
15135
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15136
     }
 
15137
   else
 
15138
     {
 
15139
Index: libgfortran/generated/bessel_r8.c
 
15140
===================================================================
 
15141
--- a/src/libgfortran/generated/bessel_r8.c     (.../tags/gcc_4_8_3_release)
 
15142
+++ b/src/libgfortran/generated/bessel_r8.c     (.../branches/gcc-4_8-branch)
 
15143
@@ -55,7 +55,7 @@
 
15144
     {
 
15145
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15146
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15147
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
15148
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
15149
       ret->offset = 0;
 
15150
     }
 
15151
 
 
15152
@@ -122,7 +122,7 @@
 
15153
     {
 
15154
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
15155
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
15156
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
15157
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
15158
       ret->offset = 0;
 
15159
     }
 
15160
 
 
15161
@@ -162,7 +162,7 @@
 
15162
 
 
15163
   x2rev = GFC_REAL_8_LITERAL(2.)/x;
 
15164
 
 
15165
-  for (i = 2; i <= n1+n2; i++)
 
15166
+  for (i = 2; i <= n2 - n1; i++)
 
15167
     {
 
15168
 #if defined(GFC_REAL_8_INFINITY)
 
15169
       if (unlikely (last2 == -GFC_REAL_8_INFINITY))
 
15170
Index: libgfortran/generated/unpack_r4.c
 
15171
===================================================================
 
15172
--- a/src/libgfortran/generated/unpack_r4.c     (.../tags/gcc_4_8_3_release)
 
15173
+++ b/src/libgfortran/generated/unpack_r4.c     (.../branches/gcc-4_8-branch)
 
15174
@@ -99,7 +99,7 @@
 
15175
          rs *= extent[n];
 
15176
        }
 
15177
       ret->offset = 0;
 
15178
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
15179
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
15180
     }
 
15181
   else
 
15182
     {
 
15183
@@ -244,7 +244,7 @@
 
15184
          rs *= extent[n];
 
15185
        }
 
15186
       ret->offset = 0;
 
15187
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
15188
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
15189
     }
 
15190
   else
 
15191
     {
 
15192
Index: libgfortran/generated/product_r8.c
 
15193
===================================================================
 
15194
--- a/src/libgfortran/generated/product_r8.c    (.../tags/gcc_4_8_3_release)
 
15195
+++ b/src/libgfortran/generated/product_r8.c    (.../branches/gcc-4_8-branch)
 
15196
@@ -97,10 +97,9 @@
 
15197
       retarray->offset = 0;
 
15198
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15199
 
 
15200
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15201
-                  * extent[rank-1];
 
15202
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15203
 
 
15204
-      retarray->base_addr = xmalloc (alloc_size);
 
15205
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
15206
       if (alloc_size == 0)
 
15207
        {
 
15208
          /* Make sure we have a zero-sized array.  */
 
15209
@@ -272,8 +271,7 @@
 
15210
 
 
15211
        }
 
15212
 
 
15213
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15214
-                  * extent[rank-1];
 
15215
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15216
 
 
15217
       retarray->offset = 0;
 
15218
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15219
@@ -285,7 +283,7 @@
 
15220
          return;
 
15221
        }
 
15222
       else
 
15223
-       retarray->base_addr = xmalloc (alloc_size);
 
15224
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
15225
 
 
15226
     }
 
15227
   else
 
15228
@@ -430,8 +428,7 @@
 
15229
       retarray->offset = 0;
 
15230
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15231
 
 
15232
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15233
-                  * extent[rank-1];
 
15234
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15235
 
 
15236
       if (alloc_size == 0)
 
15237
        {
 
15238
@@ -440,7 +437,7 @@
 
15239
          return;
 
15240
        }
 
15241
       else
 
15242
-       retarray->base_addr = xmalloc (alloc_size);
 
15243
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
15244
     }
 
15245
   else
 
15246
     {
 
15247
Index: libgfortran/generated/matmul_r4.c
 
15248
===================================================================
 
15249
--- a/src/libgfortran/generated/matmul_r4.c     (.../tags/gcc_4_8_3_release)
 
15250
+++ b/src/libgfortran/generated/matmul_r4.c     (.../branches/gcc-4_8-branch)
 
15251
@@ -124,7 +124,7 @@
 
15252
         }
 
15253
 
 
15254
       retarray->base_addr
 
15255
-       = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
 
15256
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
 
15257
       retarray->offset = 0;
 
15258
     }
 
15259
     else if (unlikely (compile_options.bounds_check))
 
15260
Index: libgfortran/generated/unpack_i2.c
 
15261
===================================================================
 
15262
--- a/src/libgfortran/generated/unpack_i2.c     (.../tags/gcc_4_8_3_release)
 
15263
+++ b/src/libgfortran/generated/unpack_i2.c     (.../branches/gcc-4_8-branch)
 
15264
@@ -99,7 +99,7 @@
 
15265
          rs *= extent[n];
 
15266
        }
 
15267
       ret->offset = 0;
 
15268
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
15269
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
15270
     }
 
15271
   else
 
15272
     {
 
15273
@@ -244,7 +244,7 @@
 
15274
          rs *= extent[n];
 
15275
        }
 
15276
       ret->offset = 0;
 
15277
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
15278
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
15279
     }
 
15280
   else
 
15281
     {
 
15282
Index: libgfortran/generated/in_pack_r8.c
 
15283
===================================================================
 
15284
--- a/src/libgfortran/generated/in_pack_r8.c    (.../tags/gcc_4_8_3_release)
 
15285
+++ b/src/libgfortran/generated/in_pack_r8.c    (.../branches/gcc-4_8-branch)
 
15286
@@ -76,7 +76,7 @@
 
15287
     return source->base_addr;
 
15288
 
 
15289
   /* Allocate storage for the destination.  */
 
15290
-  destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
 
15291
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
 
15292
   dest = destptr;
 
15293
   src = source->base_addr;
 
15294
   stride0 = stride[0];
 
15295
Index: libgfortran/generated/maxloc1_4_r16.c
 
15296
===================================================================
 
15297
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
15298
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
15299
@@ -98,10 +98,9 @@
 
15300
       retarray->offset = 0;
 
15301
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15302
 
 
15303
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15304
-                  * extent[rank-1];
 
15305
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15306
 
 
15307
-      retarray->base_addr = xmalloc (alloc_size);
 
15308
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15309
       if (alloc_size == 0)
 
15310
        {
 
15311
          /* Make sure we have a zero-sized array.  */
 
15312
@@ -294,8 +293,7 @@
 
15313
 
 
15314
        }
 
15315
 
 
15316
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15317
-                  * extent[rank-1];
 
15318
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15319
 
 
15320
       retarray->offset = 0;
 
15321
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15322
@@ -307,7 +305,7 @@
 
15323
          return;
 
15324
        }
 
15325
       else
 
15326
-       retarray->base_addr = xmalloc (alloc_size);
 
15327
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15328
 
 
15329
     }
 
15330
   else
 
15331
@@ -485,8 +483,7 @@
 
15332
       retarray->offset = 0;
 
15333
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15334
 
 
15335
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15336
-                  * extent[rank-1];
 
15337
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15338
 
 
15339
       if (alloc_size == 0)
 
15340
        {
 
15341
@@ -495,7 +492,7 @@
 
15342
          return;
 
15343
        }
 
15344
       else
 
15345
-       retarray->base_addr = xmalloc (alloc_size);
 
15346
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15347
     }
 
15348
   else
 
15349
     {
 
15350
Index: libgfortran/generated/minloc0_8_r16.c
 
15351
===================================================================
 
15352
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
15353
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
15354
@@ -58,7 +58,7 @@
 
15355
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15356
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15357
       retarray->offset = 0;
 
15358
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15359
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15360
     }
 
15361
   else
 
15362
     {
 
15363
@@ -199,7 +199,7 @@
 
15364
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15365
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15366
       retarray->offset = 0;
 
15367
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15368
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15369
     }
 
15370
   else
 
15371
     {
 
15372
@@ -367,7 +367,7 @@
 
15373
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15374
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15375
       retarray->offset = 0;
 
15376
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15377
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15378
     }
 
15379
   else if (unlikely (compile_options.bounds_check))
 
15380
     {
 
15381
Index: libgfortran/generated/reshape_c8.c
 
15382
===================================================================
 
15383
--- a/src/libgfortran/generated/reshape_c8.c    (.../tags/gcc_4_8_3_release)
 
15384
+++ b/src/libgfortran/generated/reshape_c8.c    (.../branches/gcc-4_8-branch)
 
15385
@@ -111,11 +111,11 @@
 
15386
       ret->offset = 0;
 
15387
 
 
15388
       if (unlikely (rs < 1))
 
15389
-        alloc_size = 1;
 
15390
+        alloc_size = 0;
 
15391
       else
 
15392
-        alloc_size = rs * sizeof (GFC_COMPLEX_8);
 
15393
+        alloc_size = rs;
 
15394
 
 
15395
-      ret->base_addr = xmalloc (alloc_size);
 
15396
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
15397
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
15398
     }
 
15399
 
 
15400
Index: libgfortran/generated/iparity_i8.c
 
15401
===================================================================
 
15402
--- a/src/libgfortran/generated/iparity_i8.c    (.../tags/gcc_4_8_3_release)
 
15403
+++ b/src/libgfortran/generated/iparity_i8.c    (.../branches/gcc-4_8-branch)
 
15404
@@ -97,10 +97,9 @@
 
15405
       retarray->offset = 0;
 
15406
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15407
 
 
15408
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15409
-                  * extent[rank-1];
 
15410
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15411
 
 
15412
-      retarray->base_addr = xmalloc (alloc_size);
 
15413
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15414
       if (alloc_size == 0)
 
15415
        {
 
15416
          /* Make sure we have a zero-sized array.  */
 
15417
@@ -272,8 +271,7 @@
 
15418
 
 
15419
        }
 
15420
 
 
15421
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15422
-                  * extent[rank-1];
 
15423
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15424
 
 
15425
       retarray->offset = 0;
 
15426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15427
@@ -285,7 +283,7 @@
 
15428
          return;
 
15429
        }
 
15430
       else
 
15431
-       retarray->base_addr = xmalloc (alloc_size);
 
15432
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15433
 
 
15434
     }
 
15435
   else
 
15436
@@ -430,8 +428,7 @@
 
15437
       retarray->offset = 0;
 
15438
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15439
 
 
15440
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15441
-                  * extent[rank-1];
 
15442
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15443
 
 
15444
       if (alloc_size == 0)
 
15445
        {
 
15446
@@ -440,7 +437,7 @@
 
15447
          return;
 
15448
        }
 
15449
       else
 
15450
-       retarray->base_addr = xmalloc (alloc_size);
 
15451
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15452
     }
 
15453
   else
 
15454
     {
 
15455
Index: libgfortran/generated/count_1_l.c
 
15456
===================================================================
 
15457
--- a/src/libgfortran/generated/count_1_l.c     (.../tags/gcc_4_8_3_release)
 
15458
+++ b/src/libgfortran/generated/count_1_l.c     (.../branches/gcc-4_8-branch)
 
15459
@@ -101,8 +101,7 @@
 
15460
       retarray->offset = 0;
 
15461
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15462
 
 
15463
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15464
-                  * extent[rank-1];
 
15465
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15466
 
 
15467
       if (alloc_size == 0)
 
15468
        {
 
15469
@@ -111,7 +110,7 @@
 
15470
          return;
 
15471
        }
 
15472
       else
 
15473
-       retarray->base_addr = xmalloc (alloc_size);
 
15474
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15475
     }
 
15476
   else
 
15477
     {
 
15478
Index: libgfortran/generated/maxloc0_8_i4.c
 
15479
===================================================================
 
15480
--- a/src/libgfortran/generated/maxloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
15481
+++ b/src/libgfortran/generated/maxloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
15482
@@ -58,7 +58,7 @@
 
15483
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15484
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15485
       retarray->offset = 0;
 
15486
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15487
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15488
     }
 
15489
   else
 
15490
     {
 
15491
@@ -199,7 +199,7 @@
 
15492
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15493
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15494
       retarray->offset = 0;
 
15495
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15496
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15497
     }
 
15498
   else
 
15499
     {
 
15500
@@ -367,7 +367,7 @@
 
15501
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15502
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15503
       retarray->offset = 0;
 
15504
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15505
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15506
     }
 
15507
   else if (unlikely (compile_options.bounds_check))
 
15508
     {
 
15509
Index: libgfortran/generated/matmul_i2.c
 
15510
===================================================================
 
15511
--- a/src/libgfortran/generated/matmul_i2.c     (.../tags/gcc_4_8_3_release)
 
15512
+++ b/src/libgfortran/generated/matmul_i2.c     (.../branches/gcc-4_8-branch)
 
15513
@@ -124,7 +124,7 @@
 
15514
         }
 
15515
 
 
15516
       retarray->base_addr
 
15517
-       = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
 
15518
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
 
15519
       retarray->offset = 0;
 
15520
     }
 
15521
     else if (unlikely (compile_options.bounds_check))
 
15522
Index: libgfortran/generated/minloc1_4_r4.c
 
15523
===================================================================
 
15524
--- a/src/libgfortran/generated/minloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
15525
+++ b/src/libgfortran/generated/minloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
15526
@@ -98,10 +98,9 @@
 
15527
       retarray->offset = 0;
 
15528
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15529
 
 
15530
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15531
-                  * extent[rank-1];
 
15532
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15533
 
 
15534
-      retarray->base_addr = xmalloc (alloc_size);
 
15535
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15536
       if (alloc_size == 0)
 
15537
        {
 
15538
          /* Make sure we have a zero-sized array.  */
 
15539
@@ -294,8 +293,7 @@
 
15540
 
 
15541
        }
 
15542
 
 
15543
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15544
-                  * extent[rank-1];
 
15545
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15546
 
 
15547
       retarray->offset = 0;
 
15548
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15549
@@ -307,7 +305,7 @@
 
15550
          return;
 
15551
        }
 
15552
       else
 
15553
-       retarray->base_addr = xmalloc (alloc_size);
 
15554
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15555
 
 
15556
     }
 
15557
   else
 
15558
@@ -485,8 +483,7 @@
 
15559
       retarray->offset = 0;
 
15560
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15561
 
 
15562
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15563
-                  * extent[rank-1];
 
15564
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15565
 
 
15566
       if (alloc_size == 0)
 
15567
        {
 
15568
@@ -495,7 +492,7 @@
 
15569
          return;
 
15570
        }
 
15571
       else
 
15572
-       retarray->base_addr = xmalloc (alloc_size);
 
15573
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15574
     }
 
15575
   else
 
15576
     {
 
15577
Index: libgfortran/generated/transpose_i16.c
 
15578
===================================================================
 
15579
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
 
15580
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
 
15581
@@ -60,7 +60,8 @@
 
15582
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15583
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15584
 
 
15585
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
 
15586
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
15587
+                                     sizeof (GFC_INTEGER_16));
 
15588
       ret->offset = 0;
 
15589
     } else if (unlikely (compile_options.bounds_check))
 
15590
     {
 
15591
Index: libgfortran/generated/minloc0_16_i4.c
 
15592
===================================================================
 
15593
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
15594
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
15595
@@ -58,7 +58,7 @@
 
15596
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15597
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15598
       retarray->offset = 0;
 
15599
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15600
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15601
     }
 
15602
   else
 
15603
     {
 
15604
@@ -199,7 +199,7 @@
 
15605
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15606
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15607
       retarray->offset = 0;
 
15608
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15609
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15610
     }
 
15611
   else
 
15612
     {
 
15613
@@ -367,7 +367,7 @@
 
15614
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15615
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15616
       retarray->offset = 0;
 
15617
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15618
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15619
     }
 
15620
   else if (unlikely (compile_options.bounds_check))
 
15621
     {
 
15622
Index: libgfortran/generated/transpose_i4.c
 
15623
===================================================================
 
15624
--- a/src/libgfortran/generated/transpose_i4.c  (.../tags/gcc_4_8_3_release)
 
15625
+++ b/src/libgfortran/generated/transpose_i4.c  (.../branches/gcc-4_8-branch)
 
15626
@@ -60,7 +60,8 @@
 
15627
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15628
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15629
 
 
15630
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
 
15631
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
15632
+                                     sizeof (GFC_INTEGER_4));
 
15633
       ret->offset = 0;
 
15634
     } else if (unlikely (compile_options.bounds_check))
 
15635
     {
 
15636
Index: libgfortran/generated/maxloc1_16_i8.c
 
15637
===================================================================
 
15638
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
15639
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
15640
@@ -98,10 +98,9 @@
 
15641
       retarray->offset = 0;
 
15642
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15643
 
 
15644
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15645
-                  * extent[rank-1];
 
15646
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15647
 
 
15648
-      retarray->base_addr = xmalloc (alloc_size);
 
15649
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15650
       if (alloc_size == 0)
 
15651
        {
 
15652
          /* Make sure we have a zero-sized array.  */
 
15653
@@ -294,8 +293,7 @@
 
15654
 
 
15655
        }
 
15656
 
 
15657
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15658
-                  * extent[rank-1];
 
15659
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15660
 
 
15661
       retarray->offset = 0;
 
15662
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15663
@@ -307,7 +305,7 @@
 
15664
          return;
 
15665
        }
 
15666
       else
 
15667
-       retarray->base_addr = xmalloc (alloc_size);
 
15668
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15669
 
 
15670
     }
 
15671
   else
 
15672
@@ -485,8 +483,7 @@
 
15673
       retarray->offset = 0;
 
15674
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15675
 
 
15676
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15677
-                  * extent[rank-1];
 
15678
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15679
 
 
15680
       if (alloc_size == 0)
 
15681
        {
 
15682
@@ -495,7 +492,7 @@
 
15683
          return;
 
15684
        }
 
15685
       else
 
15686
-       retarray->base_addr = xmalloc (alloc_size);
 
15687
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15688
     }
 
15689
   else
 
15690
     {
 
15691
Index: libgfortran/generated/minloc1_4_i2.c
 
15692
===================================================================
 
15693
--- a/src/libgfortran/generated/minloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
15694
+++ b/src/libgfortran/generated/minloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
15695
@@ -98,10 +98,9 @@
 
15696
       retarray->offset = 0;
 
15697
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15698
 
 
15699
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15700
-                  * extent[rank-1];
 
15701
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15702
 
 
15703
-      retarray->base_addr = xmalloc (alloc_size);
 
15704
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15705
       if (alloc_size == 0)
 
15706
        {
 
15707
          /* Make sure we have a zero-sized array.  */
 
15708
@@ -294,8 +293,7 @@
 
15709
 
 
15710
        }
 
15711
 
 
15712
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15713
-                  * extent[rank-1];
 
15714
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15715
 
 
15716
       retarray->offset = 0;
 
15717
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15718
@@ -307,7 +305,7 @@
 
15719
          return;
 
15720
        }
 
15721
       else
 
15722
-       retarray->base_addr = xmalloc (alloc_size);
 
15723
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15724
 
 
15725
     }
 
15726
   else
 
15727
@@ -485,8 +483,7 @@
 
15728
       retarray->offset = 0;
 
15729
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15730
 
 
15731
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15732
-                  * extent[rank-1];
 
15733
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15734
 
 
15735
       if (alloc_size == 0)
 
15736
        {
 
15737
@@ -495,7 +492,7 @@
 
15738
          return;
 
15739
        }
 
15740
       else
 
15741
-       retarray->base_addr = xmalloc (alloc_size);
 
15742
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
15743
     }
 
15744
   else
 
15745
     {
 
15746
Index: libgfortran/generated/matmul_l16.c
 
15747
===================================================================
 
15748
--- a/src/libgfortran/generated/matmul_l16.c    (.../tags/gcc_4_8_3_release)
 
15749
+++ b/src/libgfortran/generated/matmul_l16.c    (.../branches/gcc-4_8-branch)
 
15750
@@ -88,7 +88,7 @@
 
15751
         }
 
15752
           
 
15753
       retarray->base_addr
 
15754
-       = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
 
15755
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
 
15756
       retarray->offset = 0;
 
15757
     }
 
15758
     else if (unlikely (compile_options.bounds_check))
 
15759
Index: libgfortran/generated/maxloc1_8_i1.c
 
15760
===================================================================
 
15761
--- a/src/libgfortran/generated/maxloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
15762
+++ b/src/libgfortran/generated/maxloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
15763
@@ -98,10 +98,9 @@
 
15764
       retarray->offset = 0;
 
15765
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15766
 
 
15767
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15768
-                  * extent[rank-1];
 
15769
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15770
 
 
15771
-      retarray->base_addr = xmalloc (alloc_size);
 
15772
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15773
       if (alloc_size == 0)
 
15774
        {
 
15775
          /* Make sure we have a zero-sized array.  */
 
15776
@@ -294,8 +293,7 @@
 
15777
 
 
15778
        }
 
15779
 
 
15780
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15781
-                  * extent[rank-1];
 
15782
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15783
 
 
15784
       retarray->offset = 0;
 
15785
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15786
@@ -307,7 +305,7 @@
 
15787
          return;
 
15788
        }
 
15789
       else
 
15790
-       retarray->base_addr = xmalloc (alloc_size);
 
15791
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15792
 
 
15793
     }
 
15794
   else
 
15795
@@ -485,8 +483,7 @@
 
15796
       retarray->offset = 0;
 
15797
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15798
 
 
15799
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15800
-                  * extent[rank-1];
 
15801
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15802
 
 
15803
       if (alloc_size == 0)
 
15804
        {
 
15805
@@ -495,7 +492,7 @@
 
15806
          return;
 
15807
        }
 
15808
       else
 
15809
-       retarray->base_addr = xmalloc (alloc_size);
 
15810
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15811
     }
 
15812
   else
 
15813
     {
 
15814
Index: libgfortran/generated/minloc1_8_i8.c
 
15815
===================================================================
 
15816
--- a/src/libgfortran/generated/minloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
15817
+++ b/src/libgfortran/generated/minloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
15818
@@ -98,10 +98,9 @@
 
15819
       retarray->offset = 0;
 
15820
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15821
 
 
15822
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15823
-                  * extent[rank-1];
 
15824
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15825
 
 
15826
-      retarray->base_addr = xmalloc (alloc_size);
 
15827
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15828
       if (alloc_size == 0)
 
15829
        {
 
15830
          /* Make sure we have a zero-sized array.  */
 
15831
@@ -294,8 +293,7 @@
 
15832
 
 
15833
        }
 
15834
 
 
15835
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15836
-                  * extent[rank-1];
 
15837
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15838
 
 
15839
       retarray->offset = 0;
 
15840
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15841
@@ -307,7 +305,7 @@
 
15842
          return;
 
15843
        }
 
15844
       else
 
15845
-       retarray->base_addr = xmalloc (alloc_size);
 
15846
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15847
 
 
15848
     }
 
15849
   else
 
15850
@@ -485,8 +483,7 @@
 
15851
       retarray->offset = 0;
 
15852
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15853
 
 
15854
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15855
-                  * extent[rank-1];
 
15856
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15857
 
 
15858
       if (alloc_size == 0)
 
15859
        {
 
15860
@@ -495,7 +492,7 @@
 
15861
          return;
 
15862
        }
 
15863
       else
 
15864
-       retarray->base_addr = xmalloc (alloc_size);
 
15865
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15866
     }
 
15867
   else
 
15868
     {
 
15869
Index: libgfortran/generated/minloc0_4_r8.c
 
15870
===================================================================
 
15871
--- a/src/libgfortran/generated/minloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
15872
+++ b/src/libgfortran/generated/minloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
15873
@@ -58,7 +58,7 @@
 
15874
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15875
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15876
       retarray->offset = 0;
 
15877
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15878
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15879
     }
 
15880
   else
 
15881
     {
 
15882
@@ -199,7 +199,7 @@
 
15883
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15884
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15885
       retarray->offset = 0;
 
15886
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15887
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15888
     }
 
15889
   else
 
15890
     {
 
15891
@@ -367,7 +367,7 @@
 
15892
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15893
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15894
       retarray->offset = 0;
 
15895
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15896
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15897
     }
 
15898
   else if (unlikely (compile_options.bounds_check))
 
15899
     {
 
15900
Index: libgfortran/generated/product_r16.c
 
15901
===================================================================
 
15902
--- a/src/libgfortran/generated/product_r16.c   (.../tags/gcc_4_8_3_release)
 
15903
+++ b/src/libgfortran/generated/product_r16.c   (.../branches/gcc-4_8-branch)
 
15904
@@ -97,10 +97,9 @@
 
15905
       retarray->offset = 0;
 
15906
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15907
 
 
15908
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15909
-                  * extent[rank-1];
 
15910
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15911
 
 
15912
-      retarray->base_addr = xmalloc (alloc_size);
 
15913
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15914
       if (alloc_size == 0)
 
15915
        {
 
15916
          /* Make sure we have a zero-sized array.  */
 
15917
@@ -272,8 +271,7 @@
 
15918
 
 
15919
        }
 
15920
 
 
15921
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15922
-                  * extent[rank-1];
 
15923
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15924
 
 
15925
       retarray->offset = 0;
 
15926
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15927
@@ -285,7 +283,7 @@
 
15928
          return;
 
15929
        }
 
15930
       else
 
15931
-       retarray->base_addr = xmalloc (alloc_size);
 
15932
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15933
 
 
15934
     }
 
15935
   else
 
15936
@@ -430,8 +428,7 @@
 
15937
       retarray->offset = 0;
 
15938
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15939
 
 
15940
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15941
-                  * extent[rank-1];
 
15942
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15943
 
 
15944
       if (alloc_size == 0)
 
15945
        {
 
15946
@@ -440,7 +437,7 @@
 
15947
          return;
 
15948
        }
 
15949
       else
 
15950
-       retarray->base_addr = xmalloc (alloc_size);
 
15951
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15952
     }
 
15953
   else
 
15954
     {
 
15955
Index: libgfortran/generated/sum_r8.c
 
15956
===================================================================
 
15957
--- a/src/libgfortran/generated/sum_r8.c        (.../tags/gcc_4_8_3_release)
 
15958
+++ b/src/libgfortran/generated/sum_r8.c        (.../branches/gcc-4_8-branch)
 
15959
@@ -97,10 +97,9 @@
 
15960
       retarray->offset = 0;
 
15961
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15962
 
 
15963
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15964
-                  * extent[rank-1];
 
15965
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15966
 
 
15967
-      retarray->base_addr = xmalloc (alloc_size);
 
15968
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
15969
       if (alloc_size == 0)
 
15970
        {
 
15971
          /* Make sure we have a zero-sized array.  */
 
15972
@@ -272,8 +271,7 @@
 
15973
 
 
15974
        }
 
15975
 
 
15976
-      alloc_size = sizeof (GFC_REAL_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
       retarray->offset = 0;
 
15981
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15982
@@ -285,7 +283,7 @@
 
15983
          return;
 
15984
        }
 
15985
       else
 
15986
-       retarray->base_addr = xmalloc (alloc_size);
 
15987
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
15988
 
 
15989
     }
 
15990
   else
 
15991
@@ -430,8 +428,7 @@
 
15992
       retarray->offset = 0;
 
15993
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15994
 
 
15995
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15996
-                  * extent[rank-1];
 
15997
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15998
 
 
15999
       if (alloc_size == 0)
 
16000
        {
 
16001
@@ -440,7 +437,7 @@
 
16002
          return;
 
16003
        }
 
16004
       else
 
16005
-       retarray->base_addr = xmalloc (alloc_size);
 
16006
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
16007
     }
 
16008
   else
 
16009
     {
 
16010
Index: libgfortran/generated/norm2_r10.c
 
16011
===================================================================
 
16012
--- a/src/libgfortran/generated/norm2_r10.c     (.../tags/gcc_4_8_3_release)
 
16013
+++ b/src/libgfortran/generated/norm2_r10.c     (.../branches/gcc-4_8-branch)
 
16014
@@ -101,10 +101,9 @@
 
16015
       retarray->offset = 0;
 
16016
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16017
 
 
16018
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16019
-                  * extent[rank-1];
 
16020
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16021
 
 
16022
-      retarray->base_addr = xmalloc (alloc_size);
 
16023
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
16024
       if (alloc_size == 0)
 
16025
        {
 
16026
          /* Make sure we have a zero-sized array.  */
 
16027
Index: libgfortran/generated/unpack_c10.c
 
16028
===================================================================
 
16029
--- a/src/libgfortran/generated/unpack_c10.c    (.../tags/gcc_4_8_3_release)
 
16030
+++ b/src/libgfortran/generated/unpack_c10.c    (.../branches/gcc-4_8-branch)
 
16031
@@ -99,7 +99,7 @@
 
16032
          rs *= extent[n];
 
16033
        }
 
16034
       ret->offset = 0;
 
16035
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
16036
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
16037
     }
 
16038
   else
 
16039
     {
 
16040
@@ -244,7 +244,7 @@
 
16041
          rs *= extent[n];
 
16042
        }
 
16043
       ret->offset = 0;
 
16044
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
16045
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
16046
     }
 
16047
   else
 
16048
     {
 
16049
Index: libgfortran/generated/spread_r8.c
 
16050
===================================================================
 
16051
--- a/src/libgfortran/generated/spread_r8.c     (.../tags/gcc_4_8_3_release)
 
16052
+++ b/src/libgfortran/generated/spread_r8.c     (.../branches/gcc-4_8-branch)
 
16053
@@ -101,8 +101,8 @@
 
16054
        }
 
16055
       ret->offset = 0;
 
16056
 
 
16057
-      /* xmalloc allocates a single byte for zero size.  */
 
16058
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
 
16059
+      /* xmallocarray allocates a single byte for zero size.  */
 
16060
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
 
16061
       if (rs <= 0)
 
16062
         return;
 
16063
     }
 
16064
@@ -244,7 +244,7 @@
 
16065
 
 
16066
   if (ret->base_addr == NULL)
 
16067
     {
 
16068
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
 
16069
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
 
16070
       ret->offset = 0;
 
16071
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16072
     }
 
16073
Index: libgfortran/generated/minloc1_16_i16.c
 
16074
===================================================================
 
16075
--- a/src/libgfortran/generated/minloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
16076
+++ b/src/libgfortran/generated/minloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
16077
@@ -98,10 +98,9 @@
 
16078
       retarray->offset = 0;
 
16079
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16080
 
 
16081
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16082
-                  * extent[rank-1];
 
16083
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16084
 
 
16085
-      retarray->base_addr = xmalloc (alloc_size);
 
16086
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16087
       if (alloc_size == 0)
 
16088
        {
 
16089
          /* Make sure we have a zero-sized array.  */
 
16090
@@ -294,8 +293,7 @@
 
16091
 
 
16092
        }
 
16093
 
 
16094
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16095
-                  * extent[rank-1];
 
16096
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16097
 
 
16098
       retarray->offset = 0;
 
16099
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16100
@@ -307,7 +305,7 @@
 
16101
          return;
 
16102
        }
 
16103
       else
 
16104
-       retarray->base_addr = xmalloc (alloc_size);
 
16105
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16106
 
 
16107
     }
 
16108
   else
 
16109
@@ -485,8 +483,7 @@
 
16110
       retarray->offset = 0;
 
16111
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16112
 
 
16113
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16114
-                  * extent[rank-1];
 
16115
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16116
 
 
16117
       if (alloc_size == 0)
 
16118
        {
 
16119
@@ -495,7 +492,7 @@
 
16120
          return;
 
16121
        }
 
16122
       else
 
16123
-       retarray->base_addr = xmalloc (alloc_size);
 
16124
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16125
     }
 
16126
   else
 
16127
     {
 
16128
Index: libgfortran/generated/maxloc1_8_r4.c
 
16129
===================================================================
 
16130
--- a/src/libgfortran/generated/maxloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
16131
+++ b/src/libgfortran/generated/maxloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
16132
@@ -98,10 +98,9 @@
 
16133
       retarray->offset = 0;
 
16134
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16135
 
 
16136
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16137
-                  * extent[rank-1];
 
16138
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16139
 
 
16140
-      retarray->base_addr = xmalloc (alloc_size);
 
16141
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16142
       if (alloc_size == 0)
 
16143
        {
 
16144
          /* Make sure we have a zero-sized array.  */
 
16145
@@ -294,8 +293,7 @@
 
16146
 
 
16147
        }
 
16148
 
 
16149
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16150
-                  * extent[rank-1];
 
16151
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16152
 
 
16153
       retarray->offset = 0;
 
16154
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16155
@@ -307,7 +305,7 @@
 
16156
          return;
 
16157
        }
 
16158
       else
 
16159
-       retarray->base_addr = xmalloc (alloc_size);
 
16160
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16161
 
 
16162
     }
 
16163
   else
 
16164
@@ -485,8 +483,7 @@
 
16165
       retarray->offset = 0;
 
16166
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16167
 
 
16168
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16169
-                  * extent[rank-1];
 
16170
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16171
 
 
16172
       if (alloc_size == 0)
 
16173
        {
 
16174
@@ -495,7 +492,7 @@
 
16175
          return;
 
16176
        }
 
16177
       else
 
16178
-       retarray->base_addr = xmalloc (alloc_size);
 
16179
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16180
     }
 
16181
   else
 
16182
     {
 
16183
Index: libgfortran/generated/minloc1_16_i1.c
 
16184
===================================================================
 
16185
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
16186
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
16187
@@ -98,10 +98,9 @@
 
16188
       retarray->offset = 0;
 
16189
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16190
 
 
16191
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16192
-                  * extent[rank-1];
 
16193
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16194
 
 
16195
-      retarray->base_addr = xmalloc (alloc_size);
 
16196
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16197
       if (alloc_size == 0)
 
16198
        {
 
16199
          /* Make sure we have a zero-sized array.  */
 
16200
@@ -294,8 +293,7 @@
 
16201
 
 
16202
        }
 
16203
 
 
16204
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16205
-                  * extent[rank-1];
 
16206
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16207
 
 
16208
       retarray->offset = 0;
 
16209
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16210
@@ -307,7 +305,7 @@
 
16211
          return;
 
16212
        }
 
16213
       else
 
16214
-       retarray->base_addr = xmalloc (alloc_size);
 
16215
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16216
 
 
16217
     }
 
16218
   else
 
16219
@@ -485,8 +483,7 @@
 
16220
       retarray->offset = 0;
 
16221
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16222
 
 
16223
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16224
-                  * extent[rank-1];
 
16225
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16226
 
 
16227
       if (alloc_size == 0)
 
16228
        {
 
16229
@@ -495,7 +492,7 @@
 
16230
          return;
 
16231
        }
 
16232
       else
 
16233
-       retarray->base_addr = xmalloc (alloc_size);
 
16234
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16235
     }
 
16236
   else
 
16237
     {
 
16238
Index: libgfortran/generated/spread_r16.c
 
16239
===================================================================
 
16240
--- a/src/libgfortran/generated/spread_r16.c    (.../tags/gcc_4_8_3_release)
 
16241
+++ b/src/libgfortran/generated/spread_r16.c    (.../branches/gcc-4_8-branch)
 
16242
@@ -101,8 +101,8 @@
 
16243
        }
 
16244
       ret->offset = 0;
 
16245
 
 
16246
-      /* xmalloc allocates a single byte for zero size.  */
 
16247
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
 
16248
+      /* xmallocarray allocates a single byte for zero size.  */
 
16249
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
 
16250
       if (rs <= 0)
 
16251
         return;
 
16252
     }
 
16253
@@ -244,7 +244,7 @@
 
16254
 
 
16255
   if (ret->base_addr == NULL)
 
16256
     {
 
16257
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
 
16258
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
 
16259
       ret->offset = 0;
 
16260
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16261
     }
 
16262
Index: libgfortran/generated/pack_c8.c
 
16263
===================================================================
 
16264
--- a/src/libgfortran/generated/pack_c8.c       (.../tags/gcc_4_8_3_release)
 
16265
+++ b/src/libgfortran/generated/pack_c8.c       (.../branches/gcc-4_8-branch)
 
16266
@@ -167,8 +167,8 @@
 
16267
 
 
16268
          ret->offset = 0;
 
16269
 
 
16270
-         /* xmalloc allocates a single byte for zero size.  */
 
16271
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
 
16272
+         /* xmallocarray allocates a single byte for zero size.  */
 
16273
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
 
16274
 
 
16275
          if (total == 0)
 
16276
            return;
 
16277
Index: libgfortran/generated/minval_r10.c
 
16278
===================================================================
 
16279
--- a/src/libgfortran/generated/minval_r10.c    (.../tags/gcc_4_8_3_release)
 
16280
+++ b/src/libgfortran/generated/minval_r10.c    (.../branches/gcc-4_8-branch)
 
16281
@@ -97,10 +97,9 @@
 
16282
       retarray->offset = 0;
 
16283
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16284
 
 
16285
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16286
-                  * extent[rank-1];
 
16287
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16288
 
 
16289
-      retarray->base_addr = xmalloc (alloc_size);
 
16290
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
16291
       if (alloc_size == 0)
 
16292
        {
 
16293
          /* Make sure we have a zero-sized array.  */
 
16294
@@ -286,8 +285,7 @@
 
16295
 
 
16296
        }
 
16297
 
 
16298
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16299
-                  * extent[rank-1];
 
16300
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16301
 
 
16302
       retarray->offset = 0;
 
16303
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16304
@@ -299,7 +297,7 @@
 
16305
          return;
 
16306
        }
 
16307
       else
 
16308
-       retarray->base_addr = xmalloc (alloc_size);
 
16309
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
16310
 
 
16311
     }
 
16312
   else
 
16313
@@ -472,8 +470,7 @@
 
16314
       retarray->offset = 0;
 
16315
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16316
 
 
16317
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16318
-                  * extent[rank-1];
 
16319
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16320
 
 
16321
       if (alloc_size == 0)
 
16322
        {
 
16323
@@ -482,7 +479,7 @@
 
16324
          return;
 
16325
        }
 
16326
       else
 
16327
-       retarray->base_addr = xmalloc (alloc_size);
 
16328
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
16329
     }
 
16330
   else
 
16331
     {
 
16332
Index: libgfortran/generated/parity_l8.c
 
16333
===================================================================
 
16334
--- a/src/libgfortran/generated/parity_l8.c     (.../tags/gcc_4_8_3_release)
 
16335
+++ b/src/libgfortran/generated/parity_l8.c     (.../branches/gcc-4_8-branch)
 
16336
@@ -98,10 +98,9 @@
 
16337
       retarray->offset = 0;
 
16338
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16339
 
 
16340
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16341
-                  * extent[rank-1];
 
16342
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16343
 
 
16344
-      retarray->base_addr = xmalloc (alloc_size);
 
16345
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
16346
       if (alloc_size == 0)
 
16347
        {
 
16348
          /* Make sure we have a zero-sized array.  */
 
16349
Index: libgfortran/generated/minval_i4.c
 
16350
===================================================================
 
16351
--- a/src/libgfortran/generated/minval_i4.c     (.../tags/gcc_4_8_3_release)
 
16352
+++ b/src/libgfortran/generated/minval_i4.c     (.../branches/gcc-4_8-branch)
 
16353
@@ -97,10 +97,9 @@
 
16354
       retarray->offset = 0;
 
16355
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16356
 
 
16357
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16358
-                  * extent[rank-1];
 
16359
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16360
 
 
16361
-      retarray->base_addr = xmalloc (alloc_size);
 
16362
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16363
       if (alloc_size == 0)
 
16364
        {
 
16365
          /* Make sure we have a zero-sized array.  */
 
16366
@@ -286,8 +285,7 @@
 
16367
 
 
16368
        }
 
16369
 
 
16370
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16371
-                  * extent[rank-1];
 
16372
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16373
 
 
16374
       retarray->offset = 0;
 
16375
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16376
@@ -299,7 +297,7 @@
 
16377
          return;
 
16378
        }
 
16379
       else
 
16380
-       retarray->base_addr = xmalloc (alloc_size);
 
16381
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16382
 
 
16383
     }
 
16384
   else
 
16385
@@ -472,8 +470,7 @@
 
16386
       retarray->offset = 0;
 
16387
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16388
 
 
16389
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16390
-                  * extent[rank-1];
 
16391
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16392
 
 
16393
       if (alloc_size == 0)
 
16394
        {
 
16395
@@ -482,7 +479,7 @@
 
16396
          return;
 
16397
        }
 
16398
       else
 
16399
-       retarray->base_addr = xmalloc (alloc_size);
 
16400
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16401
     }
 
16402
   else
 
16403
     {
 
16404
Index: libgfortran/generated/maxloc1_8_i2.c
 
16405
===================================================================
 
16406
--- a/src/libgfortran/generated/maxloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
16407
+++ b/src/libgfortran/generated/maxloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
16408
@@ -98,10 +98,9 @@
 
16409
       retarray->offset = 0;
 
16410
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16411
 
 
16412
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16413
-                  * extent[rank-1];
 
16414
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16415
 
 
16416
-      retarray->base_addr = xmalloc (alloc_size);
 
16417
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16418
       if (alloc_size == 0)
 
16419
        {
 
16420
          /* Make sure we have a zero-sized array.  */
 
16421
@@ -294,8 +293,7 @@
 
16422
 
 
16423
        }
 
16424
 
 
16425
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16426
-                  * extent[rank-1];
 
16427
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16428
 
 
16429
       retarray->offset = 0;
 
16430
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16431
@@ -307,7 +305,7 @@
 
16432
          return;
 
16433
        }
 
16434
       else
 
16435
-       retarray->base_addr = xmalloc (alloc_size);
 
16436
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16437
 
 
16438
     }
 
16439
   else
 
16440
@@ -485,8 +483,7 @@
 
16441
       retarray->offset = 0;
 
16442
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16443
 
 
16444
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16445
-                  * extent[rank-1];
 
16446
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16447
 
 
16448
       if (alloc_size == 0)
 
16449
        {
 
16450
@@ -495,7 +492,7 @@
 
16451
          return;
 
16452
        }
 
16453
       else
 
16454
-       retarray->base_addr = xmalloc (alloc_size);
 
16455
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16456
     }
 
16457
   else
 
16458
     {
 
16459
Index: libgfortran/generated/any_l8.c
 
16460
===================================================================
 
16461
--- a/src/libgfortran/generated/any_l8.c        (.../tags/gcc_4_8_3_release)
 
16462
+++ b/src/libgfortran/generated/any_l8.c        (.../branches/gcc-4_8-branch)
 
16463
@@ -101,8 +101,7 @@
 
16464
       retarray->offset = 0;
 
16465
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16466
 
 
16467
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16468
-                  * extent[rank-1];
 
16469
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16470
 
 
16471
       if (alloc_size == 0)
 
16472
        {
 
16473
@@ -111,7 +110,7 @@
 
16474
          return;
 
16475
        }
 
16476
       else
 
16477
-       retarray->base_addr = xmalloc (alloc_size);
 
16478
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
16479
     }
 
16480
   else
 
16481
     {
 
16482
Index: libgfortran/generated/maxloc0_16_r10.c
 
16483
===================================================================
 
16484
--- a/src/libgfortran/generated/maxloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
16485
+++ b/src/libgfortran/generated/maxloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
16486
@@ -58,7 +58,7 @@
 
16487
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16488
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16489
       retarray->offset = 0;
 
16490
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16491
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16492
     }
 
16493
   else
 
16494
     {
 
16495
@@ -199,7 +199,7 @@
 
16496
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16497
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16498
       retarray->offset = 0;
 
16499
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16500
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16501
     }
 
16502
   else
 
16503
     {
 
16504
@@ -367,7 +367,7 @@
 
16505
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16506
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16507
       retarray->offset = 0;
 
16508
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16509
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16510
     }
 
16511
   else if (unlikely (compile_options.bounds_check))
 
16512
     {
 
16513
Index: libgfortran/generated/minloc0_4_i16.c
 
16514
===================================================================
 
16515
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
16516
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
16517
@@ -58,7 +58,7 @@
 
16518
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16519
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16520
       retarray->offset = 0;
 
16521
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16522
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16523
     }
 
16524
   else
 
16525
     {
 
16526
@@ -199,7 +199,7 @@
 
16527
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16528
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16529
       retarray->offset = 0;
 
16530
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16531
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16532
     }
 
16533
   else
 
16534
     {
 
16535
@@ -367,7 +367,7 @@
 
16536
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16537
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16538
       retarray->offset = 0;
 
16539
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16540
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16541
     }
 
16542
   else if (unlikely (compile_options.bounds_check))
 
16543
     {
 
16544
Index: libgfortran/generated/maxloc0_8_r8.c
 
16545
===================================================================
 
16546
--- a/src/libgfortran/generated/maxloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
16547
+++ b/src/libgfortran/generated/maxloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
16548
@@ -58,7 +58,7 @@
 
16549
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16550
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16551
       retarray->offset = 0;
 
16552
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16553
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16554
     }
 
16555
   else
 
16556
     {
 
16557
@@ -199,7 +199,7 @@
 
16558
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16559
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16560
       retarray->offset = 0;
 
16561
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16562
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16563
     }
 
16564
   else
 
16565
     {
 
16566
@@ -367,7 +367,7 @@
 
16567
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16568
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16569
       retarray->offset = 0;
 
16570
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16571
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16572
     }
 
16573
   else if (unlikely (compile_options.bounds_check))
 
16574
     {
 
16575
Index: libgfortran/generated/minloc1_4_r10.c
 
16576
===================================================================
 
16577
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
16578
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
16579
@@ -98,10 +98,9 @@
 
16580
       retarray->offset = 0;
 
16581
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16582
 
 
16583
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16584
-                  * extent[rank-1];
 
16585
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16586
 
 
16587
-      retarray->base_addr = xmalloc (alloc_size);
 
16588
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16589
       if (alloc_size == 0)
 
16590
        {
 
16591
          /* Make sure we have a zero-sized array.  */
 
16592
@@ -294,8 +293,7 @@
 
16593
 
 
16594
        }
 
16595
 
 
16596
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16597
-                  * extent[rank-1];
 
16598
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16599
 
 
16600
       retarray->offset = 0;
 
16601
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16602
@@ -307,7 +305,7 @@
 
16603
          return;
 
16604
        }
 
16605
       else
 
16606
-       retarray->base_addr = xmalloc (alloc_size);
 
16607
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16608
 
 
16609
     }
 
16610
   else
 
16611
@@ -485,8 +483,7 @@
 
16612
       retarray->offset = 0;
 
16613
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16614
 
 
16615
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16616
-                  * extent[rank-1];
 
16617
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16618
 
 
16619
       if (alloc_size == 0)
 
16620
        {
 
16621
@@ -495,7 +492,7 @@
 
16622
          return;
 
16623
        }
 
16624
       else
 
16625
-       retarray->base_addr = xmalloc (alloc_size);
 
16626
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16627
     }
 
16628
   else
 
16629
     {
 
16630
Index: libgfortran/generated/minloc1_8_i16.c
 
16631
===================================================================
 
16632
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
16633
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
16634
@@ -98,10 +98,9 @@
 
16635
       retarray->offset = 0;
 
16636
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16637
 
 
16638
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16639
-                  * extent[rank-1];
 
16640
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16641
 
 
16642
-      retarray->base_addr = xmalloc (alloc_size);
 
16643
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16644
       if (alloc_size == 0)
 
16645
        {
 
16646
          /* Make sure we have a zero-sized array.  */
 
16647
@@ -294,8 +293,7 @@
 
16648
 
 
16649
        }
 
16650
 
 
16651
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16652
-                  * extent[rank-1];
 
16653
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16654
 
 
16655
       retarray->offset = 0;
 
16656
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16657
@@ -307,7 +305,7 @@
 
16658
          return;
 
16659
        }
 
16660
       else
 
16661
-       retarray->base_addr = xmalloc (alloc_size);
 
16662
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16663
 
 
16664
     }
 
16665
   else
 
16666
@@ -485,8 +483,7 @@
 
16667
       retarray->offset = 0;
 
16668
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16669
 
 
16670
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16671
-                  * extent[rank-1];
 
16672
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16673
 
 
16674
       if (alloc_size == 0)
 
16675
        {
 
16676
@@ -495,7 +492,7 @@
 
16677
          return;
 
16678
        }
 
16679
       else
 
16680
-       retarray->base_addr = xmalloc (alloc_size);
 
16681
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16682
     }
 
16683
   else
 
16684
     {
 
16685
Index: libgfortran/generated/maxloc0_8_r10.c
 
16686
===================================================================
 
16687
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
16688
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
16689
@@ -58,7 +58,7 @@
 
16690
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16691
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16692
       retarray->offset = 0;
 
16693
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16694
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16695
     }
 
16696
   else
 
16697
     {
 
16698
@@ -199,7 +199,7 @@
 
16699
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16700
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16701
       retarray->offset = 0;
 
16702
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16703
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16704
     }
 
16705
   else
 
16706
     {
 
16707
@@ -367,7 +367,7 @@
 
16708
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16709
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16710
       retarray->offset = 0;
 
16711
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16712
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16713
     }
 
16714
   else if (unlikely (compile_options.bounds_check))
 
16715
     {
 
16716
Index: libgfortran/generated/unpack_i4.c
 
16717
===================================================================
 
16718
--- a/src/libgfortran/generated/unpack_i4.c     (.../tags/gcc_4_8_3_release)
 
16719
+++ b/src/libgfortran/generated/unpack_i4.c     (.../branches/gcc-4_8-branch)
 
16720
@@ -99,7 +99,7 @@
 
16721
          rs *= extent[n];
 
16722
        }
 
16723
       ret->offset = 0;
 
16724
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
16725
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
16726
     }
 
16727
   else
 
16728
     {
 
16729
@@ -244,7 +244,7 @@
 
16730
          rs *= extent[n];
 
16731
        }
 
16732
       ret->offset = 0;
 
16733
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
16734
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
16735
     }
 
16736
   else
 
16737
     {
 
16738
Index: libgfortran/generated/minloc1_16_r4.c
 
16739
===================================================================
 
16740
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
16741
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
16742
@@ -98,10 +98,9 @@
 
16743
       retarray->offset = 0;
 
16744
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16745
 
 
16746
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16747
-                  * extent[rank-1];
 
16748
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16749
 
 
16750
-      retarray->base_addr = xmalloc (alloc_size);
 
16751
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16752
       if (alloc_size == 0)
 
16753
        {
 
16754
          /* Make sure we have a zero-sized array.  */
 
16755
@@ -294,8 +293,7 @@
 
16756
 
 
16757
        }
 
16758
 
 
16759
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16760
-                  * extent[rank-1];
 
16761
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16762
 
 
16763
       retarray->offset = 0;
 
16764
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16765
@@ -307,7 +305,7 @@
 
16766
          return;
 
16767
        }
 
16768
       else
 
16769
-       retarray->base_addr = xmalloc (alloc_size);
 
16770
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16771
 
 
16772
     }
 
16773
   else
 
16774
@@ -485,8 +483,7 @@
 
16775
       retarray->offset = 0;
 
16776
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16777
 
 
16778
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16779
-                  * extent[rank-1];
 
16780
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16781
 
 
16782
       if (alloc_size == 0)
 
16783
        {
 
16784
@@ -495,7 +492,7 @@
 
16785
          return;
 
16786
        }
 
16787
       else
 
16788
-       retarray->base_addr = xmalloc (alloc_size);
 
16789
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16790
     }
 
16791
   else
 
16792
     {
 
16793
Index: libgfortran/generated/product_i8.c
 
16794
===================================================================
 
16795
--- a/src/libgfortran/generated/product_i8.c    (.../tags/gcc_4_8_3_release)
 
16796
+++ b/src/libgfortran/generated/product_i8.c    (.../branches/gcc-4_8-branch)
 
16797
@@ -97,10 +97,9 @@
 
16798
       retarray->offset = 0;
 
16799
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16800
 
 
16801
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16802
-                  * extent[rank-1];
 
16803
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16804
 
 
16805
-      retarray->base_addr = xmalloc (alloc_size);
 
16806
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16807
       if (alloc_size == 0)
 
16808
        {
 
16809
          /* Make sure we have a zero-sized array.  */
 
16810
@@ -272,8 +271,7 @@
 
16811
 
 
16812
        }
 
16813
 
 
16814
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16815
-                  * extent[rank-1];
 
16816
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16817
 
 
16818
       retarray->offset = 0;
 
16819
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16820
@@ -285,7 +283,7 @@
 
16821
          return;
 
16822
        }
 
16823
       else
 
16824
-       retarray->base_addr = xmalloc (alloc_size);
 
16825
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16826
 
 
16827
     }
 
16828
   else
 
16829
@@ -430,8 +428,7 @@
 
16830
       retarray->offset = 0;
 
16831
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16832
 
 
16833
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16834
-                  * extent[rank-1];
 
16835
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16836
 
 
16837
       if (alloc_size == 0)
 
16838
        {
 
16839
@@ -440,7 +437,7 @@
 
16840
          return;
 
16841
        }
 
16842
       else
 
16843
-       retarray->base_addr = xmalloc (alloc_size);
 
16844
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16845
     }
 
16846
   else
 
16847
     {
 
16848
Index: libgfortran/generated/minloc0_16_r8.c
 
16849
===================================================================
 
16850
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
16851
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
16852
@@ -58,7 +58,7 @@
 
16853
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16854
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16855
       retarray->offset = 0;
 
16856
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16857
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16858
     }
 
16859
   else
 
16860
     {
 
16861
@@ -199,7 +199,7 @@
 
16862
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16863
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16864
       retarray->offset = 0;
 
16865
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16866
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16867
     }
 
16868
   else
 
16869
     {
 
16870
@@ -367,7 +367,7 @@
 
16871
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16872
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16873
       retarray->offset = 0;
 
16874
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16875
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16876
     }
 
16877
   else if (unlikely (compile_options.bounds_check))
 
16878
     {
 
16879
Index: libgfortran/generated/count_2_l.c
 
16880
===================================================================
 
16881
--- a/src/libgfortran/generated/count_2_l.c     (.../tags/gcc_4_8_3_release)
 
16882
+++ b/src/libgfortran/generated/count_2_l.c     (.../branches/gcc-4_8-branch)
 
16883
@@ -101,8 +101,7 @@
 
16884
       retarray->offset = 0;
 
16885
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16886
 
 
16887
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16888
-                  * extent[rank-1];
 
16889
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16890
 
 
16891
       if (alloc_size == 0)
 
16892
        {
 
16893
@@ -111,7 +110,7 @@
 
16894
          return;
 
16895
        }
 
16896
       else
 
16897
-       retarray->base_addr = xmalloc (alloc_size);
 
16898
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
16899
     }
 
16900
   else
 
16901
     {
 
16902
Index: libgfortran/generated/transpose_r8.c
 
16903
===================================================================
 
16904
--- a/src/libgfortran/generated/transpose_r8.c  (.../tags/gcc_4_8_3_release)
 
16905
+++ b/src/libgfortran/generated/transpose_r8.c  (.../branches/gcc-4_8-branch)
 
16906
@@ -60,7 +60,8 @@
 
16907
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
16908
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
16909
 
 
16910
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
 
16911
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
16912
+                                     sizeof (GFC_REAL_8));
 
16913
       ret->offset = 0;
 
16914
     } else if (unlikely (compile_options.bounds_check))
 
16915
     {
 
16916
Index: libgfortran/generated/cshift1_8.c
 
16917
===================================================================
 
16918
--- a/src/libgfortran/generated/cshift1_8.c     (.../tags/gcc_4_8_3_release)
 
16919
+++ b/src/libgfortran/generated/cshift1_8.c     (.../branches/gcc-4_8-branch)
 
16920
@@ -80,7 +80,7 @@
 
16921
     {
 
16922
       int i;
 
16923
 
 
16924
-      ret->base_addr = xmalloc (size * arraysize);
 
16925
+      ret->base_addr = xmallocarray (arraysize, size);
 
16926
       ret->offset = 0;
 
16927
       ret->dtype = array->dtype;
 
16928
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
16929
Index: libgfortran/generated/matmul_i4.c
 
16930
===================================================================
 
16931
--- a/src/libgfortran/generated/matmul_i4.c     (.../tags/gcc_4_8_3_release)
 
16932
+++ b/src/libgfortran/generated/matmul_i4.c     (.../branches/gcc-4_8-branch)
 
16933
@@ -124,7 +124,7 @@
 
16934
         }
 
16935
 
 
16936
       retarray->base_addr
 
16937
-       = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
 
16938
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
 
16939
       retarray->offset = 0;
 
16940
     }
 
16941
     else if (unlikely (compile_options.bounds_check))
 
16942
Index: libgfortran/generated/pack_r10.c
 
16943
===================================================================
 
16944
--- a/src/libgfortran/generated/pack_r10.c      (.../tags/gcc_4_8_3_release)
 
16945
+++ b/src/libgfortran/generated/pack_r10.c      (.../branches/gcc-4_8-branch)
 
16946
@@ -167,8 +167,8 @@
 
16947
 
 
16948
          ret->offset = 0;
 
16949
 
 
16950
-         /* xmalloc allocates a single byte for zero size.  */
 
16951
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
 
16952
+         /* xmallocarray allocates a single byte for zero size.  */
 
16953
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
 
16954
 
 
16955
          if (total == 0)
 
16956
            return;
 
16957
Index: libgfortran/generated/minloc1_16_i2.c
 
16958
===================================================================
 
16959
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
16960
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
16961
@@ -98,10 +98,9 @@
 
16962
       retarray->offset = 0;
 
16963
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16964
 
 
16965
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16966
-                  * extent[rank-1];
 
16967
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16968
 
 
16969
-      retarray->base_addr = xmalloc (alloc_size);
 
16970
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16971
       if (alloc_size == 0)
 
16972
        {
 
16973
          /* Make sure we have a zero-sized array.  */
 
16974
@@ -294,8 +293,7 @@
 
16975
 
 
16976
        }
 
16977
 
 
16978
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16979
-                  * extent[rank-1];
 
16980
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16981
 
 
16982
       retarray->offset = 0;
 
16983
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16984
@@ -307,7 +305,7 @@
 
16985
          return;
 
16986
        }
 
16987
       else
 
16988
-       retarray->base_addr = xmalloc (alloc_size);
 
16989
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16990
 
 
16991
     }
 
16992
   else
 
16993
@@ -485,8 +483,7 @@
 
16994
       retarray->offset = 0;
 
16995
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16996
 
 
16997
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16998
-                  * extent[rank-1];
 
16999
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17000
 
 
17001
       if (alloc_size == 0)
 
17002
        {
 
17003
@@ -495,7 +492,7 @@
 
17004
          return;
 
17005
        }
 
17006
       else
 
17007
-       retarray->base_addr = xmalloc (alloc_size);
 
17008
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17009
     }
 
17010
   else
 
17011
     {
 
17012
Index: libgfortran/generated/in_pack_i8.c
 
17013
===================================================================
 
17014
--- a/src/libgfortran/generated/in_pack_i8.c    (.../tags/gcc_4_8_3_release)
 
17015
+++ b/src/libgfortran/generated/in_pack_i8.c    (.../branches/gcc-4_8-branch)
 
17016
@@ -76,7 +76,7 @@
 
17017
     return source->base_addr;
 
17018
 
 
17019
   /* Allocate storage for the destination.  */
 
17020
-  destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
 
17021
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
 
17022
   dest = destptr;
 
17023
   src = source->base_addr;
 
17024
   stride0 = stride[0];
 
17025
Index: libgfortran/generated/transpose_r16.c
 
17026
===================================================================
 
17027
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
 
17028
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
 
17029
@@ -60,7 +60,8 @@
 
17030
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
17031
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
17032
 
 
17033
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
 
17034
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
17035
+                                     sizeof (GFC_REAL_16));
 
17036
       ret->offset = 0;
 
17037
     } else if (unlikely (compile_options.bounds_check))
 
17038
     {
 
17039
Index: libgfortran/generated/minloc1_4_i4.c
 
17040
===================================================================
 
17041
--- a/src/libgfortran/generated/minloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
17042
+++ b/src/libgfortran/generated/minloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
17043
@@ -98,10 +98,9 @@
 
17044
       retarray->offset = 0;
 
17045
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17046
 
 
17047
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17048
-                  * extent[rank-1];
 
17049
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17050
 
 
17051
-      retarray->base_addr = xmalloc (alloc_size);
 
17052
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17053
       if (alloc_size == 0)
 
17054
        {
 
17055
          /* Make sure we have a zero-sized array.  */
 
17056
@@ -294,8 +293,7 @@
 
17057
 
 
17058
        }
 
17059
 
 
17060
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17061
-                  * extent[rank-1];
 
17062
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17063
 
 
17064
       retarray->offset = 0;
 
17065
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17066
@@ -307,7 +305,7 @@
 
17067
          return;
 
17068
        }
 
17069
       else
 
17070
-       retarray->base_addr = xmalloc (alloc_size);
 
17071
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17072
 
 
17073
     }
 
17074
   else
 
17075
@@ -485,8 +483,7 @@
 
17076
       retarray->offset = 0;
 
17077
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17078
 
 
17079
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17080
-                  * extent[rank-1];
 
17081
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17082
 
 
17083
       if (alloc_size == 0)
 
17084
        {
 
17085
@@ -495,7 +492,7 @@
 
17086
          return;
 
17087
        }
 
17088
       else
 
17089
-       retarray->base_addr = xmalloc (alloc_size);
 
17090
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17091
     }
 
17092
   else
 
17093
     {
 
17094
Index: libgfortran/generated/maxval_i1.c
 
17095
===================================================================
 
17096
--- a/src/libgfortran/generated/maxval_i1.c     (.../tags/gcc_4_8_3_release)
 
17097
+++ b/src/libgfortran/generated/maxval_i1.c     (.../branches/gcc-4_8-branch)
 
17098
@@ -97,10 +97,9 @@
 
17099
       retarray->offset = 0;
 
17100
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17101
 
 
17102
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17103
-                  * extent[rank-1];
 
17104
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17105
 
 
17106
-      retarray->base_addr = xmalloc (alloc_size);
 
17107
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17108
       if (alloc_size == 0)
 
17109
        {
 
17110
          /* Make sure we have a zero-sized array.  */
 
17111
@@ -286,8 +285,7 @@
 
17112
 
 
17113
        }
 
17114
 
 
17115
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17116
-                  * extent[rank-1];
 
17117
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17118
 
 
17119
       retarray->offset = 0;
 
17120
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17121
@@ -299,7 +297,7 @@
 
17122
          return;
 
17123
        }
 
17124
       else
 
17125
-       retarray->base_addr = xmalloc (alloc_size);
 
17126
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17127
 
 
17128
     }
 
17129
   else
 
17130
@@ -472,8 +470,7 @@
 
17131
       retarray->offset = 0;
 
17132
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17133
 
 
17134
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17135
-                  * extent[rank-1];
 
17136
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17137
 
 
17138
       if (alloc_size == 0)
 
17139
        {
 
17140
@@ -482,7 +479,7 @@
 
17141
          return;
 
17142
        }
 
17143
       else
 
17144
-       retarray->base_addr = xmalloc (alloc_size);
 
17145
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17146
     }
 
17147
   else
 
17148
     {
 
17149
Index: libgfortran/generated/product_c16.c
 
17150
===================================================================
 
17151
--- a/src/libgfortran/generated/product_c16.c   (.../tags/gcc_4_8_3_release)
 
17152
+++ b/src/libgfortran/generated/product_c16.c   (.../branches/gcc-4_8-branch)
 
17153
@@ -97,10 +97,9 @@
 
17154
       retarray->offset = 0;
 
17155
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17156
 
 
17157
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17158
-                  * extent[rank-1];
 
17159
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17160
 
 
17161
-      retarray->base_addr = xmalloc (alloc_size);
 
17162
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17163
       if (alloc_size == 0)
 
17164
        {
 
17165
          /* Make sure we have a zero-sized array.  */
 
17166
@@ -272,8 +271,7 @@
 
17167
 
 
17168
        }
 
17169
 
 
17170
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17171
-                  * extent[rank-1];
 
17172
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17173
 
 
17174
       retarray->offset = 0;
 
17175
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17176
@@ -285,7 +283,7 @@
 
17177
          return;
 
17178
        }
 
17179
       else
 
17180
-       retarray->base_addr = xmalloc (alloc_size);
 
17181
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17182
 
 
17183
     }
 
17184
   else
 
17185
@@ -430,8 +428,7 @@
 
17186
       retarray->offset = 0;
 
17187
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17188
 
 
17189
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17190
-                  * extent[rank-1];
 
17191
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17192
 
 
17193
       if (alloc_size == 0)
 
17194
        {
 
17195
@@ -440,7 +437,7 @@
 
17196
          return;
 
17197
        }
 
17198
       else
 
17199
-       retarray->base_addr = xmalloc (alloc_size);
 
17200
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
17201
     }
 
17202
   else
 
17203
     {
 
17204
Index: libgfortran/generated/reshape_r4.c
 
17205
===================================================================
 
17206
--- a/src/libgfortran/generated/reshape_r4.c    (.../tags/gcc_4_8_3_release)
 
17207
+++ b/src/libgfortran/generated/reshape_r4.c    (.../branches/gcc-4_8-branch)
 
17208
@@ -111,11 +111,11 @@
 
17209
       ret->offset = 0;
 
17210
 
 
17211
       if (unlikely (rs < 1))
 
17212
-        alloc_size = 1;
 
17213
+        alloc_size = 0;
 
17214
       else
 
17215
-        alloc_size = rs * sizeof (GFC_REAL_4);
 
17216
+        alloc_size = rs;
 
17217
 
 
17218
-      ret->base_addr = xmalloc (alloc_size);
 
17219
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17220
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
17221
     }
 
17222
 
 
17223
Index: libgfortran/generated/iany_i8.c
 
17224
===================================================================
 
17225
--- a/src/libgfortran/generated/iany_i8.c       (.../tags/gcc_4_8_3_release)
 
17226
+++ b/src/libgfortran/generated/iany_i8.c       (.../branches/gcc-4_8-branch)
 
17227
@@ -97,10 +97,9 @@
 
17228
       retarray->offset = 0;
 
17229
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17230
 
 
17231
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17232
-                  * extent[rank-1];
 
17233
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17234
 
 
17235
-      retarray->base_addr = xmalloc (alloc_size);
 
17236
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17237
       if (alloc_size == 0)
 
17238
        {
 
17239
          /* Make sure we have a zero-sized array.  */
 
17240
@@ -272,8 +271,7 @@
 
17241
 
 
17242
        }
 
17243
 
 
17244
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17245
-                  * extent[rank-1];
 
17246
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17247
 
 
17248
       retarray->offset = 0;
 
17249
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17250
@@ -285,7 +283,7 @@
 
17251
          return;
 
17252
        }
 
17253
       else
 
17254
-       retarray->base_addr = xmalloc (alloc_size);
 
17255
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17256
 
 
17257
     }
 
17258
   else
 
17259
@@ -430,8 +428,7 @@
 
17260
       retarray->offset = 0;
 
17261
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17262
 
 
17263
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17264
-                  * extent[rank-1];
 
17265
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17266
 
 
17267
       if (alloc_size == 0)
 
17268
        {
 
17269
@@ -440,7 +437,7 @@
 
17270
          return;
 
17271
        }
 
17272
       else
 
17273
-       retarray->base_addr = xmalloc (alloc_size);
 
17274
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17275
     }
 
17276
   else
 
17277
     {
 
17278
Index: libgfortran/generated/cshift1_16.c
 
17279
===================================================================
 
17280
--- a/src/libgfortran/generated/cshift1_16.c    (.../tags/gcc_4_8_3_release)
 
17281
+++ b/src/libgfortran/generated/cshift1_16.c    (.../branches/gcc-4_8-branch)
 
17282
@@ -80,7 +80,7 @@
 
17283
     {
 
17284
       int i;
 
17285
 
 
17286
-      ret->base_addr = xmalloc (size * arraysize);
 
17287
+      ret->base_addr = xmallocarray (arraysize, size);
 
17288
       ret->offset = 0;
 
17289
       ret->dtype = array->dtype;
 
17290
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
17291
Index: libgfortran/generated/maxloc0_4_i1.c
 
17292
===================================================================
 
17293
--- a/src/libgfortran/generated/maxloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
17294
+++ b/src/libgfortran/generated/maxloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
17295
@@ -58,7 +58,7 @@
 
17296
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17297
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17298
       retarray->offset = 0;
 
17299
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17300
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17301
     }
 
17302
   else
 
17303
     {
 
17304
@@ -199,7 +199,7 @@
 
17305
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17306
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17307
       retarray->offset = 0;
 
17308
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17309
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17310
     }
 
17311
   else
 
17312
     {
 
17313
@@ -367,7 +367,7 @@
 
17314
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17315
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17316
       retarray->offset = 0;
 
17317
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17318
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17319
     }
 
17320
   else if (unlikely (compile_options.bounds_check))
 
17321
     {
 
17322
Index: libgfortran/generated/minloc0_4_i8.c
 
17323
===================================================================
 
17324
--- a/src/libgfortran/generated/minloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
17325
+++ b/src/libgfortran/generated/minloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
17326
@@ -58,7 +58,7 @@
 
17327
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17328
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17329
       retarray->offset = 0;
 
17330
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17331
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17332
     }
 
17333
   else
 
17334
     {
 
17335
@@ -199,7 +199,7 @@
 
17336
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17337
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17338
       retarray->offset = 0;
 
17339
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17340
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17341
     }
 
17342
   else
 
17343
     {
 
17344
@@ -367,7 +367,7 @@
 
17345
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17346
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17347
       retarray->offset = 0;
 
17348
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17349
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17350
     }
 
17351
   else if (unlikely (compile_options.bounds_check))
 
17352
     {
 
17353
Index: libgfortran/generated/spread_c16.c
 
17354
===================================================================
 
17355
--- a/src/libgfortran/generated/spread_c16.c    (.../tags/gcc_4_8_3_release)
 
17356
+++ b/src/libgfortran/generated/spread_c16.c    (.../branches/gcc-4_8-branch)
 
17357
@@ -101,8 +101,8 @@
 
17358
        }
 
17359
       ret->offset = 0;
 
17360
 
 
17361
-      /* xmalloc allocates a single byte for zero size.  */
 
17362
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
 
17363
+      /* xmallocarray allocates a single byte for zero size.  */
 
17364
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
 
17365
       if (rs <= 0)
 
17366
         return;
 
17367
     }
 
17368
@@ -244,7 +244,7 @@
 
17369
 
 
17370
   if (ret->base_addr == NULL)
 
17371
     {
 
17372
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
 
17373
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
 
17374
       ret->offset = 0;
 
17375
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17376
     }
 
17377
Index: libgfortran/generated/maxval_r4.c
 
17378
===================================================================
 
17379
--- a/src/libgfortran/generated/maxval_r4.c     (.../tags/gcc_4_8_3_release)
 
17380
+++ b/src/libgfortran/generated/maxval_r4.c     (.../branches/gcc-4_8-branch)
 
17381
@@ -97,10 +97,9 @@
 
17382
       retarray->offset = 0;
 
17383
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17384
 
 
17385
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17386
-                  * extent[rank-1];
 
17387
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17388
 
 
17389
-      retarray->base_addr = xmalloc (alloc_size);
 
17390
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17391
       if (alloc_size == 0)
 
17392
        {
 
17393
          /* Make sure we have a zero-sized array.  */
 
17394
@@ -286,8 +285,7 @@
 
17395
 
 
17396
        }
 
17397
 
 
17398
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17399
-                  * extent[rank-1];
 
17400
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17401
 
 
17402
       retarray->offset = 0;
 
17403
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17404
@@ -299,7 +297,7 @@
 
17405
          return;
 
17406
        }
 
17407
       else
 
17408
-       retarray->base_addr = xmalloc (alloc_size);
 
17409
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17410
 
 
17411
     }
 
17412
   else
 
17413
@@ -472,8 +470,7 @@
 
17414
       retarray->offset = 0;
 
17415
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17416
 
 
17417
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17418
-                  * extent[rank-1];
 
17419
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17420
 
 
17421
       if (alloc_size == 0)
 
17422
        {
 
17423
@@ -482,7 +479,7 @@
 
17424
          return;
 
17425
        }
 
17426
       else
 
17427
-       retarray->base_addr = xmalloc (alloc_size);
 
17428
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17429
     }
 
17430
   else
 
17431
     {
 
17432
Index: libgfortran/generated/minval_r8.c
 
17433
===================================================================
 
17434
--- a/src/libgfortran/generated/minval_r8.c     (.../tags/gcc_4_8_3_release)
 
17435
+++ b/src/libgfortran/generated/minval_r8.c     (.../branches/gcc-4_8-branch)
 
17436
@@ -97,10 +97,9 @@
 
17437
       retarray->offset = 0;
 
17438
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17439
 
 
17440
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17441
-                  * extent[rank-1];
 
17442
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17443
 
 
17444
-      retarray->base_addr = xmalloc (alloc_size);
 
17445
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17446
       if (alloc_size == 0)
 
17447
        {
 
17448
          /* Make sure we have a zero-sized array.  */
 
17449
@@ -286,8 +285,7 @@
 
17450
 
 
17451
        }
 
17452
 
 
17453
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17454
-                  * extent[rank-1];
 
17455
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17456
 
 
17457
       retarray->offset = 0;
 
17458
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17459
@@ -299,7 +297,7 @@
 
17460
          return;
 
17461
        }
 
17462
       else
 
17463
-       retarray->base_addr = xmalloc (alloc_size);
 
17464
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17465
 
 
17466
     }
 
17467
   else
 
17468
@@ -472,8 +470,7 @@
 
17469
       retarray->offset = 0;
 
17470
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17471
 
 
17472
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17473
-                  * extent[rank-1];
 
17474
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17475
 
 
17476
       if (alloc_size == 0)
 
17477
        {
 
17478
@@ -482,7 +479,7 @@
 
17479
          return;
 
17480
        }
 
17481
       else
 
17482
-       retarray->base_addr = xmalloc (alloc_size);
 
17483
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17484
     }
 
17485
   else
 
17486
     {
 
17487
Index: libgfortran/generated/minloc1_16_r16.c
 
17488
===================================================================
 
17489
--- a/src/libgfortran/generated/minloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
17490
+++ b/src/libgfortran/generated/minloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
17491
@@ -98,10 +98,9 @@
 
17492
       retarray->offset = 0;
 
17493
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
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->base_addr = xmalloc (alloc_size);
 
17500
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17501
       if (alloc_size == 0)
 
17502
        {
 
17503
          /* Make sure we have a zero-sized array.  */
 
17504
@@ -294,8 +293,7 @@
 
17505
 
 
17506
        }
 
17507
 
 
17508
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17509
-                  * extent[rank-1];
 
17510
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17511
 
 
17512
       retarray->offset = 0;
 
17513
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17514
@@ -307,7 +305,7 @@
 
17515
          return;
 
17516
        }
 
17517
       else
 
17518
-       retarray->base_addr = xmalloc (alloc_size);
 
17519
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17520
 
 
17521
     }
 
17522
   else
 
17523
@@ -485,8 +483,7 @@
 
17524
       retarray->offset = 0;
 
17525
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17526
 
 
17527
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17528
-                  * extent[rank-1];
 
17529
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17530
 
 
17531
       if (alloc_size == 0)
 
17532
        {
 
17533
@@ -495,7 +492,7 @@
 
17534
          return;
 
17535
        }
 
17536
       else
 
17537
-       retarray->base_addr = xmalloc (alloc_size);
 
17538
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17539
     }
 
17540
   else
 
17541
     {
 
17542
Index: libgfortran/generated/unpack_i16.c
 
17543
===================================================================
 
17544
--- a/src/libgfortran/generated/unpack_i16.c    (.../tags/gcc_4_8_3_release)
 
17545
+++ b/src/libgfortran/generated/unpack_i16.c    (.../branches/gcc-4_8-branch)
 
17546
@@ -99,7 +99,7 @@
 
17547
          rs *= extent[n];
 
17548
        }
 
17549
       ret->offset = 0;
 
17550
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
17551
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
17552
     }
 
17553
   else
 
17554
     {
 
17555
@@ -244,7 +244,7 @@
 
17556
          rs *= extent[n];
 
17557
        }
 
17558
       ret->offset = 0;
 
17559
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
17560
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
17561
     }
 
17562
   else
 
17563
     {
 
17564
Index: libgfortran/generated/sum_i8.c
 
17565
===================================================================
 
17566
--- a/src/libgfortran/generated/sum_i8.c        (.../tags/gcc_4_8_3_release)
 
17567
+++ b/src/libgfortran/generated/sum_i8.c        (.../branches/gcc-4_8-branch)
 
17568
@@ -97,10 +97,9 @@
 
17569
       retarray->offset = 0;
 
17570
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17571
 
 
17572
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17573
-                  * extent[rank-1];
 
17574
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17575
 
 
17576
-      retarray->base_addr = xmalloc (alloc_size);
 
17577
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17578
       if (alloc_size == 0)
 
17579
        {
 
17580
          /* Make sure we have a zero-sized array.  */
 
17581
@@ -272,8 +271,7 @@
 
17582
 
 
17583
        }
 
17584
 
 
17585
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17586
-                  * extent[rank-1];
 
17587
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17588
 
 
17589
       retarray->offset = 0;
 
17590
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17591
@@ -285,7 +283,7 @@
 
17592
          return;
 
17593
        }
 
17594
       else
 
17595
-       retarray->base_addr = xmalloc (alloc_size);
 
17596
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17597
 
 
17598
     }
 
17599
   else
 
17600
@@ -430,8 +428,7 @@
 
17601
       retarray->offset = 0;
 
17602
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17603
 
 
17604
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17605
-                  * extent[rank-1];
 
17606
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17607
 
 
17608
       if (alloc_size == 0)
 
17609
        {
 
17610
@@ -440,7 +437,7 @@
 
17611
          return;
 
17612
        }
 
17613
       else
 
17614
-       retarray->base_addr = xmalloc (alloc_size);
 
17615
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17616
     }
 
17617
   else
 
17618
     {
 
17619
Index: libgfortran/generated/pack_i1.c
 
17620
===================================================================
 
17621
--- a/src/libgfortran/generated/pack_i1.c       (.../tags/gcc_4_8_3_release)
 
17622
+++ b/src/libgfortran/generated/pack_i1.c       (.../branches/gcc-4_8-branch)
 
17623
@@ -167,8 +167,8 @@
 
17624
 
 
17625
          ret->offset = 0;
 
17626
 
 
17627
-         /* xmalloc allocates a single byte for zero size.  */
 
17628
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
 
17629
+         /* xmallocarray allocates a single byte for zero size.  */
 
17630
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
 
17631
 
 
17632
          if (total == 0)
 
17633
            return;
 
17634
Index: libgfortran/generated/any_l16.c
 
17635
===================================================================
 
17636
--- a/src/libgfortran/generated/any_l16.c       (.../tags/gcc_4_8_3_release)
 
17637
+++ b/src/libgfortran/generated/any_l16.c       (.../branches/gcc-4_8-branch)
 
17638
@@ -101,8 +101,7 @@
 
17639
       retarray->offset = 0;
 
17640
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17641
 
 
17642
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17643
-                  * extent[rank-1];
 
17644
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17645
 
 
17646
       if (alloc_size == 0)
 
17647
        {
 
17648
@@ -111,7 +110,7 @@
 
17649
          return;
 
17650
        }
 
17651
       else
 
17652
-       retarray->base_addr = xmalloc (alloc_size);
 
17653
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
17654
     }
 
17655
   else
 
17656
     {
 
17657
Index: libgfortran/generated/spread_i8.c
 
17658
===================================================================
 
17659
--- a/src/libgfortran/generated/spread_i8.c     (.../tags/gcc_4_8_3_release)
 
17660
+++ b/src/libgfortran/generated/spread_i8.c     (.../branches/gcc-4_8-branch)
 
17661
@@ -101,8 +101,8 @@
 
17662
        }
 
17663
       ret->offset = 0;
 
17664
 
 
17665
-      /* xmalloc allocates a single byte for zero size.  */
 
17666
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
 
17667
+      /* xmallocarray allocates a single byte for zero size.  */
 
17668
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
 
17669
       if (rs <= 0)
 
17670
         return;
 
17671
     }
 
17672
@@ -244,7 +244,7 @@
 
17673
 
 
17674
   if (ret->base_addr == NULL)
 
17675
     {
 
17676
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
 
17677
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
 
17678
       ret->offset = 0;
 
17679
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17680
     }
 
17681
Index: libgfortran/generated/maxval_i2.c
 
17682
===================================================================
 
17683
--- a/src/libgfortran/generated/maxval_i2.c     (.../tags/gcc_4_8_3_release)
 
17684
+++ b/src/libgfortran/generated/maxval_i2.c     (.../branches/gcc-4_8-branch)
 
17685
@@ -97,10 +97,9 @@
 
17686
       retarray->offset = 0;
 
17687
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17688
 
 
17689
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17690
-                  * extent[rank-1];
 
17691
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17692
 
 
17693
-      retarray->base_addr = xmalloc (alloc_size);
 
17694
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17695
       if (alloc_size == 0)
 
17696
        {
 
17697
          /* Make sure we have a zero-sized array.  */
 
17698
@@ -286,8 +285,7 @@
 
17699
 
 
17700
        }
 
17701
 
 
17702
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17703
-                  * extent[rank-1];
 
17704
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17705
 
 
17706
       retarray->offset = 0;
 
17707
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17708
@@ -299,7 +297,7 @@
 
17709
          return;
 
17710
        }
 
17711
       else
 
17712
-       retarray->base_addr = xmalloc (alloc_size);
 
17713
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17714
 
 
17715
     }
 
17716
   else
 
17717
@@ -472,8 +470,7 @@
 
17718
       retarray->offset = 0;
 
17719
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17720
 
 
17721
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17722
-                  * extent[rank-1];
 
17723
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17724
 
 
17725
       if (alloc_size == 0)
 
17726
        {
 
17727
@@ -482,7 +479,7 @@
 
17728
          return;
 
17729
        }
 
17730
       else
 
17731
-       retarray->base_addr = xmalloc (alloc_size);
 
17732
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17733
     }
 
17734
   else
 
17735
     {
 
17736
Index: libgfortran/generated/maxloc1_8_i4.c
 
17737
===================================================================
 
17738
--- a/src/libgfortran/generated/maxloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
17739
+++ b/src/libgfortran/generated/maxloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
17740
@@ -98,10 +98,9 @@
 
17741
       retarray->offset = 0;
 
17742
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17743
 
 
17744
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17745
-                  * extent[rank-1];
 
17746
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17747
 
 
17748
-      retarray->base_addr = xmalloc (alloc_size);
 
17749
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17750
       if (alloc_size == 0)
 
17751
        {
 
17752
          /* Make sure we have a zero-sized array.  */
 
17753
@@ -294,8 +293,7 @@
 
17754
 
 
17755
        }
 
17756
 
 
17757
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17758
-                  * extent[rank-1];
 
17759
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17760
 
 
17761
       retarray->offset = 0;
 
17762
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17763
@@ -307,7 +305,7 @@
 
17764
          return;
 
17765
        }
 
17766
       else
 
17767
-       retarray->base_addr = xmalloc (alloc_size);
 
17768
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17769
 
 
17770
     }
 
17771
   else
 
17772
@@ -485,8 +483,7 @@
 
17773
       retarray->offset = 0;
 
17774
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17775
 
 
17776
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17777
-                  * extent[rank-1];
 
17778
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17779
 
 
17780
       if (alloc_size == 0)
 
17781
        {
 
17782
@@ -495,7 +492,7 @@
 
17783
          return;
 
17784
        }
 
17785
       else
 
17786
-       retarray->base_addr = xmalloc (alloc_size);
 
17787
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17788
     }
 
17789
   else
 
17790
     {
 
17791
Index: libgfortran/generated/unpack_r8.c
 
17792
===================================================================
 
17793
--- a/src/libgfortran/generated/unpack_r8.c     (.../tags/gcc_4_8_3_release)
 
17794
+++ b/src/libgfortran/generated/unpack_r8.c     (.../branches/gcc-4_8-branch)
 
17795
@@ -99,7 +99,7 @@
 
17796
          rs *= extent[n];
 
17797
        }
 
17798
       ret->offset = 0;
 
17799
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
17800
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
17801
     }
 
17802
   else
 
17803
     {
 
17804
@@ -244,7 +244,7 @@
 
17805
          rs *= extent[n];
 
17806
        }
 
17807
       ret->offset = 0;
 
17808
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
17809
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
17810
     }
 
17811
   else
 
17812
     {
 
17813
Index: libgfortran/generated/maxloc0_4_r4.c
 
17814
===================================================================
 
17815
--- a/src/libgfortran/generated/maxloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
17816
+++ b/src/libgfortran/generated/maxloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
17817
@@ -58,7 +58,7 @@
 
17818
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17819
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17820
       retarray->offset = 0;
 
17821
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17822
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17823
     }
 
17824
   else
 
17825
     {
 
17826
@@ -199,7 +199,7 @@
 
17827
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17828
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17829
       retarray->offset = 0;
 
17830
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17831
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17832
     }
 
17833
   else
 
17834
     {
 
17835
@@ -367,7 +367,7 @@
 
17836
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17837
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17838
       retarray->offset = 0;
 
17839
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17840
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17841
     }
 
17842
   else if (unlikely (compile_options.bounds_check))
 
17843
     {
 
17844
Index: libgfortran/generated/all_l1.c
 
17845
===================================================================
 
17846
--- a/src/libgfortran/generated/all_l1.c        (.../tags/gcc_4_8_3_release)
 
17847
+++ b/src/libgfortran/generated/all_l1.c        (.../branches/gcc-4_8-branch)
 
17848
@@ -101,8 +101,7 @@
 
17849
       retarray->offset = 0;
 
17850
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17851
 
 
17852
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17853
-                  * extent[rank-1];
 
17854
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17855
 
 
17856
       if (alloc_size == 0)
 
17857
        {
 
17858
@@ -111,7 +110,7 @@
 
17859
          return;
 
17860
        }
 
17861
       else
 
17862
-       retarray->base_addr = xmalloc (alloc_size);
 
17863
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
17864
     }
 
17865
   else
 
17866
     {
 
17867
Index: libgfortran/generated/matmul_r8.c
 
17868
===================================================================
 
17869
--- a/src/libgfortran/generated/matmul_r8.c     (.../tags/gcc_4_8_3_release)
 
17870
+++ b/src/libgfortran/generated/matmul_r8.c     (.../branches/gcc-4_8-branch)
 
17871
@@ -124,7 +124,7 @@
 
17872
         }
 
17873
 
 
17874
       retarray->base_addr
 
17875
-       = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
 
17876
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
 
17877
       retarray->offset = 0;
 
17878
     }
 
17879
     else if (unlikely (compile_options.bounds_check))
 
17880
Index: libgfortran/generated/minloc0_4_r16.c
 
17881
===================================================================
 
17882
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
17883
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
17884
@@ -58,7 +58,7 @@
 
17885
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17886
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17887
       retarray->offset = 0;
 
17888
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17889
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17890
     }
 
17891
   else
 
17892
     {
 
17893
@@ -199,7 +199,7 @@
 
17894
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17895
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17896
       retarray->offset = 0;
 
17897
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17898
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17899
     }
 
17900
   else
 
17901
     {
 
17902
@@ -367,7 +367,7 @@
 
17903
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17904
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17905
       retarray->offset = 0;
 
17906
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17907
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17908
     }
 
17909
   else if (unlikely (compile_options.bounds_check))
 
17910
     {
 
17911
Index: libgfortran/generated/maxloc0_4_i2.c
 
17912
===================================================================
 
17913
--- a/src/libgfortran/generated/maxloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
17914
+++ b/src/libgfortran/generated/maxloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
17915
@@ -58,7 +58,7 @@
 
17916
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17917
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17918
       retarray->offset = 0;
 
17919
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17920
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17921
     }
 
17922
   else
 
17923
     {
 
17924
@@ -199,7 +199,7 @@
 
17925
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17926
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17927
       retarray->offset = 0;
 
17928
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17929
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17930
     }
 
17931
   else
 
17932
     {
 
17933
@@ -367,7 +367,7 @@
 
17934
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17935
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17936
       retarray->offset = 0;
 
17937
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17938
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17939
     }
 
17940
   else if (unlikely (compile_options.bounds_check))
 
17941
     {
 
17942
Index: libgfortran/generated/minloc1_8_r16.c
 
17943
===================================================================
 
17944
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
17945
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
17946
@@ -98,10 +98,9 @@
 
17947
       retarray->offset = 0;
 
17948
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17949
 
 
17950
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17951
-                  * extent[rank-1];
 
17952
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17953
 
 
17954
-      retarray->base_addr = xmalloc (alloc_size);
 
17955
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17956
       if (alloc_size == 0)
 
17957
        {
 
17958
          /* Make sure we have a zero-sized array.  */
 
17959
@@ -294,8 +293,7 @@
 
17960
 
 
17961
        }
 
17962
 
 
17963
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17964
-                  * extent[rank-1];
 
17965
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17966
 
 
17967
       retarray->offset = 0;
 
17968
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17969
@@ -307,7 +305,7 @@
 
17970
          return;
 
17971
        }
 
17972
       else
 
17973
-       retarray->base_addr = xmalloc (alloc_size);
 
17974
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17975
 
 
17976
     }
 
17977
   else
 
17978
@@ -485,8 +483,7 @@
 
17979
       retarray->offset = 0;
 
17980
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17981
 
 
17982
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17983
-                  * extent[rank-1];
 
17984
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17985
 
 
17986
       if (alloc_size == 0)
 
17987
        {
 
17988
@@ -495,7 +492,7 @@
 
17989
          return;
 
17990
        }
 
17991
       else
 
17992
-       retarray->base_addr = xmalloc (alloc_size);
 
17993
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17994
     }
 
17995
   else
 
17996
     {
 
17997
Index: libgfortran/generated/pack_c10.c
 
17998
===================================================================
 
17999
--- a/src/libgfortran/generated/pack_c10.c      (.../tags/gcc_4_8_3_release)
 
18000
+++ b/src/libgfortran/generated/pack_c10.c      (.../branches/gcc-4_8-branch)
 
18001
@@ -167,8 +167,8 @@
 
18002
 
 
18003
          ret->offset = 0;
 
18004
 
 
18005
-         /* xmalloc allocates a single byte for zero size.  */
 
18006
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
 
18007
+         /* xmallocarray allocates a single byte for zero size.  */
 
18008
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
 
18009
 
 
18010
          if (total == 0)
 
18011
            return;
 
18012
Index: libgfortran/generated/pack_r4.c
 
18013
===================================================================
 
18014
--- a/src/libgfortran/generated/pack_r4.c       (.../tags/gcc_4_8_3_release)
 
18015
+++ b/src/libgfortran/generated/pack_r4.c       (.../branches/gcc-4_8-branch)
 
18016
@@ -167,8 +167,8 @@
 
18017
 
 
18018
          ret->offset = 0;
 
18019
 
 
18020
-         /* xmalloc allocates a single byte for zero size.  */
 
18021
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
 
18022
+         /* xmallocarray allocates a single byte for zero size.  */
 
18023
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
 
18024
 
 
18025
          if (total == 0)
 
18026
            return;
 
18027
Index: libgfortran/generated/transpose_c16.c
 
18028
===================================================================
 
18029
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
 
18030
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
 
18031
@@ -60,7 +60,8 @@
 
18032
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18033
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18034
 
 
18035
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
 
18036
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18037
+                                     sizeof (GFC_COMPLEX_16));
 
18038
       ret->offset = 0;
 
18039
     } else if (unlikely (compile_options.bounds_check))
 
18040
     {
 
18041
Index: libgfortran/generated/maxloc0_8_i8.c
 
18042
===================================================================
 
18043
--- a/src/libgfortran/generated/maxloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
18044
+++ b/src/libgfortran/generated/maxloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
18045
@@ -58,7 +58,7 @@
 
18046
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18047
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18048
       retarray->offset = 0;
 
18049
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18050
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18051
     }
 
18052
   else
 
18053
     {
 
18054
@@ -199,7 +199,7 @@
 
18055
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18056
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18057
       retarray->offset = 0;
 
18058
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18059
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18060
     }
 
18061
   else
 
18062
     {
 
18063
@@ -367,7 +367,7 @@
 
18064
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18065
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18066
       retarray->offset = 0;
 
18067
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18068
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18069
     }
 
18070
   else if (unlikely (compile_options.bounds_check))
 
18071
     {
 
18072
Index: libgfortran/generated/minloc1_4_r8.c
 
18073
===================================================================
 
18074
--- a/src/libgfortran/generated/minloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
18075
+++ b/src/libgfortran/generated/minloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
18076
@@ -98,10 +98,9 @@
 
18077
       retarray->offset = 0;
 
18078
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18079
 
 
18080
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18081
-                  * extent[rank-1];
 
18082
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18083
 
 
18084
-      retarray->base_addr = xmalloc (alloc_size);
 
18085
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18086
       if (alloc_size == 0)
 
18087
        {
 
18088
          /* Make sure we have a zero-sized array.  */
 
18089
@@ -294,8 +293,7 @@
 
18090
 
 
18091
        }
 
18092
 
 
18093
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18094
-                  * extent[rank-1];
 
18095
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18096
 
 
18097
       retarray->offset = 0;
 
18098
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18099
@@ -307,7 +305,7 @@
 
18100
          return;
 
18101
        }
 
18102
       else
 
18103
-       retarray->base_addr = xmalloc (alloc_size);
 
18104
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18105
 
 
18106
     }
 
18107
   else
 
18108
@@ -485,8 +483,7 @@
 
18109
       retarray->offset = 0;
 
18110
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18111
 
 
18112
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18113
-                  * extent[rank-1];
 
18114
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18115
 
 
18116
       if (alloc_size == 0)
 
18117
        {
 
18118
@@ -495,7 +492,7 @@
 
18119
          return;
 
18120
        }
 
18121
       else
 
18122
-       retarray->base_addr = xmalloc (alloc_size);
 
18123
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18124
     }
 
18125
   else
 
18126
     {
 
18127
Index: libgfortran/generated/minloc1_16_i4.c
 
18128
===================================================================
 
18129
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
18130
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
18131
@@ -98,10 +98,9 @@
 
18132
       retarray->offset = 0;
 
18133
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18134
 
 
18135
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18136
-                  * extent[rank-1];
 
18137
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18138
 
 
18139
-      retarray->base_addr = xmalloc (alloc_size);
 
18140
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18141
       if (alloc_size == 0)
 
18142
        {
 
18143
          /* Make sure we have a zero-sized array.  */
 
18144
@@ -294,8 +293,7 @@
 
18145
 
 
18146
        }
 
18147
 
 
18148
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18149
-                  * extent[rank-1];
 
18150
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18151
 
 
18152
       retarray->offset = 0;
 
18153
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18154
@@ -307,7 +305,7 @@
 
18155
          return;
 
18156
        }
 
18157
       else
 
18158
-       retarray->base_addr = xmalloc (alloc_size);
 
18159
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18160
 
 
18161
     }
 
18162
   else
 
18163
@@ -485,8 +483,7 @@
 
18164
       retarray->offset = 0;
 
18165
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18166
 
 
18167
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18168
-                  * extent[rank-1];
 
18169
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18170
 
 
18171
       if (alloc_size == 0)
 
18172
        {
 
18173
@@ -495,7 +492,7 @@
 
18174
          return;
 
18175
        }
 
18176
       else
 
18177
-       retarray->base_addr = xmalloc (alloc_size);
 
18178
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18179
     }
 
18180
   else
 
18181
     {
 
18182
Index: libgfortran/generated/minloc0_16_i8.c
 
18183
===================================================================
 
18184
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
18185
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
18186
@@ -58,7 +58,7 @@
 
18187
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18188
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18189
       retarray->offset = 0;
 
18190
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18191
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18192
     }
 
18193
   else
 
18194
     {
 
18195
@@ -199,7 +199,7 @@
 
18196
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18197
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18198
       retarray->offset = 0;
 
18199
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18200
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18201
     }
 
18202
   else
 
18203
     {
 
18204
@@ -367,7 +367,7 @@
 
18205
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18206
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18207
       retarray->offset = 0;
 
18208
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18209
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18210
     }
 
18211
   else if (unlikely (compile_options.bounds_check))
 
18212
     {
 
18213
Index: libgfortran/generated/pack_i2.c
 
18214
===================================================================
 
18215
--- a/src/libgfortran/generated/pack_i2.c       (.../tags/gcc_4_8_3_release)
 
18216
+++ b/src/libgfortran/generated/pack_i2.c       (.../branches/gcc-4_8-branch)
 
18217
@@ -167,8 +167,8 @@
 
18218
 
 
18219
          ret->offset = 0;
 
18220
 
 
18221
-         /* xmalloc allocates a single byte for zero size.  */
 
18222
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
 
18223
+         /* xmallocarray allocates a single byte for zero size.  */
 
18224
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
 
18225
 
 
18226
          if (total == 0)
 
18227
            return;
 
18228
Index: libgfortran/generated/transpose_i8.c
 
18229
===================================================================
 
18230
--- a/src/libgfortran/generated/transpose_i8.c  (.../tags/gcc_4_8_3_release)
 
18231
+++ b/src/libgfortran/generated/transpose_i8.c  (.../branches/gcc-4_8-branch)
 
18232
@@ -60,7 +60,8 @@
 
18233
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
18234
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
18235
 
 
18236
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
 
18237
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
18238
+                                     sizeof (GFC_INTEGER_8));
 
18239
       ret->offset = 0;
 
18240
     } else if (unlikely (compile_options.bounds_check))
 
18241
     {
 
18242
Index: libgfortran/generated/eoshift1_16.c
 
18243
===================================================================
 
18244
--- a/src/libgfortran/generated/eoshift1_16.c   (.../tags/gcc_4_8_3_release)
 
18245
+++ b/src/libgfortran/generated/eoshift1_16.c   (.../branches/gcc-4_8-branch)
 
18246
@@ -105,8 +105,8 @@
 
18247
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
18248
 
 
18249
         }
 
18250
-      /* xmalloc allocates a single byte for zero size.  */
 
18251
-      ret->base_addr = xmalloc (size * arraysize);
 
18252
+      /* xmallocarray allocates a single byte for zero size.  */
 
18253
+      ret->base_addr = xmallocarray (arraysize, size);
 
18254
 
 
18255
     }
 
18256
   else if (unlikely (compile_options.bounds_check))
 
18257
Index: libgfortran/generated/all_l2.c
 
18258
===================================================================
 
18259
--- a/src/libgfortran/generated/all_l2.c        (.../tags/gcc_4_8_3_release)
 
18260
+++ b/src/libgfortran/generated/all_l2.c        (.../branches/gcc-4_8-branch)
 
18261
@@ -101,8 +101,7 @@
 
18262
       retarray->offset = 0;
 
18263
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18264
 
 
18265
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18266
-                  * extent[rank-1];
 
18267
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18268
 
 
18269
       if (alloc_size == 0)
 
18270
        {
 
18271
@@ -111,7 +110,7 @@
 
18272
          return;
 
18273
        }
 
18274
       else
 
18275
-       retarray->base_addr = xmalloc (alloc_size);
 
18276
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
18277
     }
 
18278
   else
 
18279
     {
 
18280
Index: libgfortran/generated/product_c4.c
 
18281
===================================================================
 
18282
--- a/src/libgfortran/generated/product_c4.c    (.../tags/gcc_4_8_3_release)
 
18283
+++ b/src/libgfortran/generated/product_c4.c    (.../branches/gcc-4_8-branch)
 
18284
@@ -97,10 +97,9 @@
 
18285
       retarray->offset = 0;
 
18286
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18287
 
 
18288
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18289
-                  * extent[rank-1];
 
18290
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18291
 
 
18292
-      retarray->base_addr = xmalloc (alloc_size);
 
18293
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
18294
       if (alloc_size == 0)
 
18295
        {
 
18296
          /* Make sure we have a zero-sized array.  */
 
18297
@@ -272,8 +271,7 @@
 
18298
 
 
18299
        }
 
18300
 
 
18301
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18302
-                  * extent[rank-1];
 
18303
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18304
 
 
18305
       retarray->offset = 0;
 
18306
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18307
@@ -285,7 +283,7 @@
 
18308
          return;
 
18309
        }
 
18310
       else
 
18311
-       retarray->base_addr = xmalloc (alloc_size);
 
18312
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
18313
 
 
18314
     }
 
18315
   else
 
18316
@@ -430,8 +428,7 @@
 
18317
       retarray->offset = 0;
 
18318
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18319
 
 
18320
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18321
-                  * extent[rank-1];
 
18322
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18323
 
 
18324
       if (alloc_size == 0)
 
18325
        {
 
18326
@@ -440,7 +437,7 @@
 
18327
          return;
 
18328
        }
 
18329
       else
 
18330
-       retarray->base_addr = xmalloc (alloc_size);
 
18331
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
18332
     }
 
18333
   else
 
18334
     {
 
18335
Index: libgfortran/generated/iall_i1.c
 
18336
===================================================================
 
18337
--- a/src/libgfortran/generated/iall_i1.c       (.../tags/gcc_4_8_3_release)
 
18338
+++ b/src/libgfortran/generated/iall_i1.c       (.../branches/gcc-4_8-branch)
 
18339
@@ -97,10 +97,9 @@
 
18340
       retarray->offset = 0;
 
18341
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18342
 
 
18343
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18344
-                  * extent[rank-1];
 
18345
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18346
 
 
18347
-      retarray->base_addr = xmalloc (alloc_size);
 
18348
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18349
       if (alloc_size == 0)
 
18350
        {
 
18351
          /* Make sure we have a zero-sized array.  */
 
18352
@@ -272,8 +271,7 @@
 
18353
 
 
18354
        }
 
18355
 
 
18356
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18357
-                  * extent[rank-1];
 
18358
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18359
 
 
18360
       retarray->offset = 0;
 
18361
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18362
@@ -285,7 +283,7 @@
 
18363
          return;
 
18364
        }
 
18365
       else
 
18366
-       retarray->base_addr = xmalloc (alloc_size);
 
18367
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18368
 
 
18369
     }
 
18370
   else
 
18371
@@ -430,8 +428,7 @@
 
18372
       retarray->offset = 0;
 
18373
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18374
 
 
18375
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18376
-                  * extent[rank-1];
 
18377
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18378
 
 
18379
       if (alloc_size == 0)
 
18380
        {
 
18381
@@ -440,7 +437,7 @@
 
18382
          return;
 
18383
        }
 
18384
       else
 
18385
-       retarray->base_addr = xmalloc (alloc_size);
 
18386
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
18387
     }
 
18388
   else
 
18389
     {
 
18390
Index: libgfortran/generated/reshape_i4.c
 
18391
===================================================================
 
18392
--- a/src/libgfortran/generated/reshape_i4.c    (.../tags/gcc_4_8_3_release)
 
18393
+++ b/src/libgfortran/generated/reshape_i4.c    (.../branches/gcc-4_8-branch)
 
18394
@@ -111,11 +111,11 @@
 
18395
       ret->offset = 0;
 
18396
 
 
18397
       if (unlikely (rs < 1))
 
18398
-        alloc_size = 1;
 
18399
+        alloc_size = 0;
 
18400
       else
 
18401
-        alloc_size = rs * sizeof (GFC_INTEGER_4);
 
18402
+        alloc_size = rs;
 
18403
 
 
18404
-      ret->base_addr = xmalloc (alloc_size);
 
18405
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18406
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
18407
     }
 
18408
 
 
18409
Index: libgfortran/generated/in_pack_r10.c
 
18410
===================================================================
 
18411
--- a/src/libgfortran/generated/in_pack_r10.c   (.../tags/gcc_4_8_3_release)
 
18412
+++ b/src/libgfortran/generated/in_pack_r10.c   (.../branches/gcc-4_8-branch)
 
18413
@@ -76,7 +76,7 @@
 
18414
     return source->base_addr;
 
18415
 
 
18416
   /* Allocate storage for the destination.  */
 
18417
-  destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
 
18418
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
 
18419
   dest = destptr;
 
18420
   src = source->base_addr;
 
18421
   stride0 = stride[0];
 
18422
Index: libgfortran/generated/in_pack_c4.c
 
18423
===================================================================
 
18424
--- a/src/libgfortran/generated/in_pack_c4.c    (.../tags/gcc_4_8_3_release)
 
18425
+++ b/src/libgfortran/generated/in_pack_c4.c    (.../branches/gcc-4_8-branch)
 
18426
@@ -76,7 +76,7 @@
 
18427
     return source->base_addr;
 
18428
 
 
18429
   /* Allocate storage for the destination.  */
 
18430
-  destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
 
18431
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
 
18432
   dest = destptr;
 
18433
   src = source->base_addr;
 
18434
   stride0 = stride[0];
 
18435
Index: libgfortran/generated/all_l16.c
 
18436
===================================================================
 
18437
--- a/src/libgfortran/generated/all_l16.c       (.../tags/gcc_4_8_3_release)
 
18438
+++ b/src/libgfortran/generated/all_l16.c       (.../branches/gcc-4_8-branch)
 
18439
@@ -101,8 +101,7 @@
 
18440
       retarray->offset = 0;
 
18441
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18442
 
 
18443
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18444
-                  * extent[rank-1];
 
18445
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18446
 
 
18447
       if (alloc_size == 0)
 
18448
        {
 
18449
@@ -111,7 +110,7 @@
 
18450
          return;
 
18451
        }
 
18452
       else
 
18453
-       retarray->base_addr = xmalloc (alloc_size);
 
18454
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
18455
     }
 
18456
   else
 
18457
     {
 
18458
Index: libgfortran/generated/maxloc0_16_i1.c
 
18459
===================================================================
 
18460
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
18461
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
18462
@@ -58,7 +58,7 @@
 
18463
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18464
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18465
       retarray->offset = 0;
 
18466
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18467
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18468
     }
 
18469
   else
 
18470
     {
 
18471
@@ -199,7 +199,7 @@
 
18472
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18473
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18474
       retarray->offset = 0;
 
18475
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18476
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18477
     }
 
18478
   else
 
18479
     {
 
18480
@@ -367,7 +367,7 @@
 
18481
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18482
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18483
       retarray->offset = 0;
 
18484
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18485
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18486
     }
 
18487
   else if (unlikely (compile_options.bounds_check))
 
18488
     {
 
18489
Index: libgfortran/generated/maxloc1_8_r8.c
 
18490
===================================================================
 
18491
--- a/src/libgfortran/generated/maxloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
18492
+++ b/src/libgfortran/generated/maxloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
18493
@@ -98,10 +98,9 @@
 
18494
       retarray->offset = 0;
 
18495
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18496
 
 
18497
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18498
-                  * extent[rank-1];
 
18499
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18500
 
 
18501
-      retarray->base_addr = xmalloc (alloc_size);
 
18502
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18503
       if (alloc_size == 0)
 
18504
        {
 
18505
          /* Make sure we have a zero-sized array.  */
 
18506
@@ -294,8 +293,7 @@
 
18507
 
 
18508
        }
 
18509
 
 
18510
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18511
-                  * extent[rank-1];
 
18512
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18513
 
 
18514
       retarray->offset = 0;
 
18515
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18516
@@ -307,7 +305,7 @@
 
18517
          return;
 
18518
        }
 
18519
       else
 
18520
-       retarray->base_addr = xmalloc (alloc_size);
 
18521
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18522
 
 
18523
     }
 
18524
   else
 
18525
@@ -485,8 +483,7 @@
 
18526
       retarray->offset = 0;
 
18527
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18528
 
 
18529
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18530
-                  * extent[rank-1];
 
18531
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18532
 
 
18533
       if (alloc_size == 0)
 
18534
        {
 
18535
@@ -495,7 +492,7 @@
 
18536
          return;
 
18537
        }
 
18538
       else
 
18539
-       retarray->base_addr = xmalloc (alloc_size);
 
18540
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18541
     }
 
18542
   else
 
18543
     {
 
18544
Index: libgfortran/generated/minval_i16.c
 
18545
===================================================================
 
18546
--- a/src/libgfortran/generated/minval_i16.c    (.../tags/gcc_4_8_3_release)
 
18547
+++ b/src/libgfortran/generated/minval_i16.c    (.../branches/gcc-4_8-branch)
 
18548
@@ -97,10 +97,9 @@
 
18549
       retarray->offset = 0;
 
18550
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18551
 
 
18552
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18553
-                  * extent[rank-1];
 
18554
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18555
 
 
18556
-      retarray->base_addr = xmalloc (alloc_size);
 
18557
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18558
       if (alloc_size == 0)
 
18559
        {
 
18560
          /* Make sure we have a zero-sized array.  */
 
18561
@@ -286,8 +285,7 @@
 
18562
 
 
18563
        }
 
18564
 
 
18565
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18566
-                  * extent[rank-1];
 
18567
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18568
 
 
18569
       retarray->offset = 0;
 
18570
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18571
@@ -299,7 +297,7 @@
 
18572
          return;
 
18573
        }
 
18574
       else
 
18575
-       retarray->base_addr = xmalloc (alloc_size);
 
18576
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18577
 
 
18578
     }
 
18579
   else
 
18580
@@ -472,8 +470,7 @@
 
18581
       retarray->offset = 0;
 
18582
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18583
 
 
18584
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18585
-                  * extent[rank-1];
 
18586
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18587
 
 
18588
       if (alloc_size == 0)
 
18589
        {
 
18590
@@ -482,7 +479,7 @@
 
18591
          return;
 
18592
        }
 
18593
       else
 
18594
-       retarray->base_addr = xmalloc (alloc_size);
 
18595
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18596
     }
 
18597
   else
 
18598
     {
 
18599
Index: libgfortran/generated/reshape_r10.c
 
18600
===================================================================
 
18601
--- a/src/libgfortran/generated/reshape_r10.c   (.../tags/gcc_4_8_3_release)
 
18602
+++ b/src/libgfortran/generated/reshape_r10.c   (.../branches/gcc-4_8-branch)
 
18603
@@ -111,11 +111,11 @@
 
18604
       ret->offset = 0;
 
18605
 
 
18606
       if (unlikely (rs < 1))
 
18607
-        alloc_size = 1;
 
18608
+        alloc_size = 0;
 
18609
       else
 
18610
-        alloc_size = rs * sizeof (GFC_REAL_10);
 
18611
+        alloc_size = rs;
 
18612
 
 
18613
-      ret->base_addr = xmalloc (alloc_size);
 
18614
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18615
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
18616
     }
 
18617
 
 
18618
Index: libgfortran/generated/unpack_r16.c
 
18619
===================================================================
 
18620
--- a/src/libgfortran/generated/unpack_r16.c    (.../tags/gcc_4_8_3_release)
 
18621
+++ b/src/libgfortran/generated/unpack_r16.c    (.../branches/gcc-4_8-branch)
 
18622
@@ -99,7 +99,7 @@
 
18623
          rs *= extent[n];
 
18624
        }
 
18625
       ret->offset = 0;
 
18626
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
18627
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
18628
     }
 
18629
   else
 
18630
     {
 
18631
@@ -244,7 +244,7 @@
 
18632
          rs *= extent[n];
 
18633
        }
 
18634
       ret->offset = 0;
 
18635
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
18636
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
18637
     }
 
18638
   else
 
18639
     {
 
18640
Index: libgfortran/generated/maxval_i4.c
 
18641
===================================================================
 
18642
--- a/src/libgfortran/generated/maxval_i4.c     (.../tags/gcc_4_8_3_release)
 
18643
+++ b/src/libgfortran/generated/maxval_i4.c     (.../branches/gcc-4_8-branch)
 
18644
@@ -97,10 +97,9 @@
 
18645
       retarray->offset = 0;
 
18646
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18647
 
 
18648
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18649
-                  * extent[rank-1];
 
18650
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18651
 
 
18652
-      retarray->base_addr = xmalloc (alloc_size);
 
18653
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18654
       if (alloc_size == 0)
 
18655
        {
 
18656
          /* Make sure we have a zero-sized array.  */
 
18657
@@ -286,8 +285,7 @@
 
18658
 
 
18659
        }
 
18660
 
 
18661
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18662
-                  * extent[rank-1];
 
18663
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18664
 
 
18665
       retarray->offset = 0;
 
18666
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18667
@@ -299,7 +297,7 @@
 
18668
          return;
 
18669
        }
 
18670
       else
 
18671
-       retarray->base_addr = xmalloc (alloc_size);
 
18672
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18673
 
 
18674
     }
 
18675
   else
 
18676
@@ -472,8 +470,7 @@
 
18677
       retarray->offset = 0;
 
18678
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18679
 
 
18680
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18681
-                  * extent[rank-1];
 
18682
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18683
 
 
18684
       if (alloc_size == 0)
 
18685
        {
 
18686
@@ -482,7 +479,7 @@
 
18687
          return;
 
18688
        }
 
18689
       else
 
18690
-       retarray->base_addr = xmalloc (alloc_size);
 
18691
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18692
     }
 
18693
   else
 
18694
     {
 
18695
Index: libgfortran/generated/minval_i8.c
 
18696
===================================================================
 
18697
--- a/src/libgfortran/generated/minval_i8.c     (.../tags/gcc_4_8_3_release)
 
18698
+++ b/src/libgfortran/generated/minval_i8.c     (.../branches/gcc-4_8-branch)
 
18699
@@ -97,10 +97,9 @@
 
18700
       retarray->offset = 0;
 
18701
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18702
 
 
18703
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18704
-                  * extent[rank-1];
 
18705
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18706
 
 
18707
-      retarray->base_addr = xmalloc (alloc_size);
 
18708
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18709
       if (alloc_size == 0)
 
18710
        {
 
18711
          /* Make sure we have a zero-sized array.  */
 
18712
@@ -286,8 +285,7 @@
 
18713
 
 
18714
        }
 
18715
 
 
18716
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18717
-                  * extent[rank-1];
 
18718
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18719
 
 
18720
       retarray->offset = 0;
 
18721
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18722
@@ -299,7 +297,7 @@
 
18723
          return;
 
18724
        }
 
18725
       else
 
18726
-       retarray->base_addr = xmalloc (alloc_size);
 
18727
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18728
 
 
18729
     }
 
18730
   else
 
18731
@@ -472,8 +470,7 @@
 
18732
       retarray->offset = 0;
 
18733
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18734
 
 
18735
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18736
-                  * extent[rank-1];
 
18737
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18738
 
 
18739
       if (alloc_size == 0)
 
18740
        {
 
18741
@@ -482,7 +479,7 @@
 
18742
          return;
 
18743
        }
 
18744
       else
 
18745
-       retarray->base_addr = xmalloc (alloc_size);
 
18746
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18747
     }
 
18748
   else
 
18749
     {
 
18750
Index: libgfortran/generated/maxloc0_16_i16.c
 
18751
===================================================================
 
18752
--- a/src/libgfortran/generated/maxloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
18753
+++ b/src/libgfortran/generated/maxloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
18754
@@ -58,7 +58,7 @@
 
18755
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18756
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18757
       retarray->offset = 0;
 
18758
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18759
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18760
     }
 
18761
   else
 
18762
     {
 
18763
@@ -199,7 +199,7 @@
 
18764
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18765
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18766
       retarray->offset = 0;
 
18767
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18768
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18769
     }
 
18770
   else
 
18771
     {
 
18772
@@ -367,7 +367,7 @@
 
18773
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18774
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18775
       retarray->offset = 0;
 
18776
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18777
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18778
     }
 
18779
   else if (unlikely (compile_options.bounds_check))
 
18780
     {
 
18781
Index: libgfortran/generated/shape_i4.c
 
18782
===================================================================
 
18783
--- a/src/libgfortran/generated/shape_i4.c      (.../tags/gcc_4_8_3_release)
 
18784
+++ b/src/libgfortran/generated/shape_i4.c      (.../branches/gcc-4_8-branch)
 
18785
@@ -49,7 +49,7 @@
 
18786
     {
 
18787
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
18788
       ret->offset = 0;
 
18789
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18790
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18791
     }
 
18792
 
 
18793
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
18794
Index: libgfortran/generated/minloc1_4_i16.c
 
18795
===================================================================
 
18796
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
18797
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
18798
@@ -98,10 +98,9 @@
 
18799
       retarray->offset = 0;
 
18800
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18801
 
 
18802
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18803
-                  * extent[rank-1];
 
18804
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18805
 
 
18806
-      retarray->base_addr = xmalloc (alloc_size);
 
18807
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18808
       if (alloc_size == 0)
 
18809
        {
 
18810
          /* Make sure we have a zero-sized array.  */
 
18811
@@ -294,8 +293,7 @@
 
18812
 
 
18813
        }
 
18814
 
 
18815
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18816
-                  * extent[rank-1];
 
18817
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18818
 
 
18819
       retarray->offset = 0;
 
18820
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18821
@@ -307,7 +305,7 @@
 
18822
          return;
 
18823
        }
 
18824
       else
 
18825
-       retarray->base_addr = xmalloc (alloc_size);
 
18826
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18827
 
 
18828
     }
 
18829
   else
 
18830
@@ -485,8 +483,7 @@
 
18831
       retarray->offset = 0;
 
18832
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18833
 
 
18834
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18835
-                  * extent[rank-1];
 
18836
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18837
 
 
18838
       if (alloc_size == 0)
 
18839
        {
 
18840
@@ -495,7 +492,7 @@
 
18841
          return;
 
18842
        }
 
18843
       else
 
18844
-       retarray->base_addr = xmalloc (alloc_size);
 
18845
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18846
     }
 
18847
   else
 
18848
     {
 
18849
Index: libgfortran/generated/maxloc0_4_r10.c
 
18850
===================================================================
 
18851
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
18852
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
18853
@@ -58,7 +58,7 @@
 
18854
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18855
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18856
       retarray->offset = 0;
 
18857
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18858
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18859
     }
 
18860
   else
 
18861
     {
 
18862
@@ -199,7 +199,7 @@
 
18863
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18864
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18865
       retarray->offset = 0;
 
18866
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18867
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18868
     }
 
18869
   else
 
18870
     {
 
18871
@@ -367,7 +367,7 @@
 
18872
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18873
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18874
       retarray->offset = 0;
 
18875
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18876
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18877
     }
 
18878
   else if (unlikely (compile_options.bounds_check))
 
18879
     {
 
18880
Index: libgfortran/generated/maxloc0_8_i16.c
 
18881
===================================================================
 
18882
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
18883
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
18884
@@ -58,7 +58,7 @@
 
18885
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18886
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18887
       retarray->offset = 0;
 
18888
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18889
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18890
     }
 
18891
   else
 
18892
     {
 
18893
@@ -199,7 +199,7 @@
 
18894
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18895
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18896
       retarray->offset = 0;
 
18897
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18898
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18899
     }
 
18900
   else
 
18901
     {
 
18902
@@ -367,7 +367,7 @@
 
18903
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18904
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18905
       retarray->offset = 0;
 
18906
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18907
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18908
     }
 
18909
   else if (unlikely (compile_options.bounds_check))
 
18910
     {
 
18911
Index: libgfortran/generated/iall_i2.c
 
18912
===================================================================
 
18913
--- a/src/libgfortran/generated/iall_i2.c       (.../tags/gcc_4_8_3_release)
 
18914
+++ b/src/libgfortran/generated/iall_i2.c       (.../branches/gcc-4_8-branch)
 
18915
@@ -97,10 +97,9 @@
 
18916
       retarray->offset = 0;
 
18917
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18918
 
 
18919
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18920
-                  * extent[rank-1];
 
18921
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18922
 
 
18923
-      retarray->base_addr = xmalloc (alloc_size);
 
18924
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18925
       if (alloc_size == 0)
 
18926
        {
 
18927
          /* Make sure we have a zero-sized array.  */
 
18928
@@ -272,8 +271,7 @@
 
18929
 
 
18930
        }
 
18931
 
 
18932
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18933
-                  * extent[rank-1];
 
18934
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18935
 
 
18936
       retarray->offset = 0;
 
18937
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18938
@@ -285,7 +283,7 @@
 
18939
          return;
 
18940
        }
 
18941
       else
 
18942
-       retarray->base_addr = xmalloc (alloc_size);
 
18943
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18944
 
 
18945
     }
 
18946
   else
 
18947
@@ -430,8 +428,7 @@
 
18948
       retarray->offset = 0;
 
18949
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18950
 
 
18951
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18952
-                  * extent[rank-1];
 
18953
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18954
 
 
18955
       if (alloc_size == 0)
 
18956
        {
 
18957
@@ -440,7 +437,7 @@
 
18958
          return;
 
18959
        }
 
18960
       else
 
18961
-       retarray->base_addr = xmalloc (alloc_size);
 
18962
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
18963
     }
 
18964
   else
 
18965
     {
 
18966
Index: libgfortran/generated/maxloc1_8_r10.c
 
18967
===================================================================
 
18968
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
18969
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
18970
@@ -98,10 +98,9 @@
 
18971
       retarray->offset = 0;
 
18972
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18973
 
 
18974
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18975
-                  * extent[rank-1];
 
18976
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18977
 
 
18978
-      retarray->base_addr = xmalloc (alloc_size);
 
18979
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18980
       if (alloc_size == 0)
 
18981
        {
 
18982
          /* Make sure we have a zero-sized array.  */
 
18983
@@ -294,8 +293,7 @@
 
18984
 
 
18985
        }
 
18986
 
 
18987
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18988
-                  * extent[rank-1];
 
18989
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18990
 
 
18991
       retarray->offset = 0;
 
18992
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18993
@@ -307,7 +305,7 @@
 
18994
          return;
 
18995
        }
 
18996
       else
 
18997
-       retarray->base_addr = xmalloc (alloc_size);
 
18998
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18999
 
 
19000
     }
 
19001
   else
 
19002
@@ -485,8 +483,7 @@
 
19003
       retarray->offset = 0;
 
19004
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19005
 
 
19006
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19007
-                  * extent[rank-1];
 
19008
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19009
 
 
19010
       if (alloc_size == 0)
 
19011
        {
 
19012
@@ -495,7 +492,7 @@
 
19013
          return;
 
19014
        }
 
19015
       else
 
19016
-       retarray->base_addr = xmalloc (alloc_size);
 
19017
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19018
     }
 
19019
   else
 
19020
     {
 
19021
Index: libgfortran/generated/maxloc0_16_r4.c
 
19022
===================================================================
 
19023
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
19024
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
19025
@@ -58,7 +58,7 @@
 
19026
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19027
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19028
       retarray->offset = 0;
 
19029
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19030
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19031
     }
 
19032
   else
 
19033
     {
 
19034
@@ -199,7 +199,7 @@
 
19035
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19036
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19037
       retarray->offset = 0;
 
19038
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19039
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19040
     }
 
19041
   else
 
19042
     {
 
19043
@@ -367,7 +367,7 @@
 
19044
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19045
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19046
       retarray->offset = 0;
 
19047
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19048
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19049
     }
 
19050
   else if (unlikely (compile_options.bounds_check))
 
19051
     {
 
19052
Index: libgfortran/generated/minloc0_8_i1.c
 
19053
===================================================================
 
19054
--- a/src/libgfortran/generated/minloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
19055
+++ b/src/libgfortran/generated/minloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
19056
@@ -58,7 +58,7 @@
 
19057
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19058
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19059
       retarray->offset = 0;
 
19060
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19061
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19062
     }
 
19063
   else
 
19064
     {
 
19065
@@ -199,7 +199,7 @@
 
19066
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19067
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19068
       retarray->offset = 0;
 
19069
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19070
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19071
     }
 
19072
   else
 
19073
     {
 
19074
@@ -367,7 +367,7 @@
 
19075
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19076
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19077
       retarray->offset = 0;
 
19078
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19079
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19080
     }
 
19081
   else if (unlikely (compile_options.bounds_check))
 
19082
     {
 
19083
Index: libgfortran/generated/minloc1_16_r8.c
 
19084
===================================================================
 
19085
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
19086
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
19087
@@ -98,10 +98,9 @@
 
19088
       retarray->offset = 0;
 
19089
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19090
 
 
19091
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19092
-                  * extent[rank-1];
 
19093
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19094
 
 
19095
-      retarray->base_addr = xmalloc (alloc_size);
 
19096
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19097
       if (alloc_size == 0)
 
19098
        {
 
19099
          /* Make sure we have a zero-sized array.  */
 
19100
@@ -294,8 +293,7 @@
 
19101
 
 
19102
        }
 
19103
 
 
19104
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19105
-                  * extent[rank-1];
 
19106
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19107
 
 
19108
       retarray->offset = 0;
 
19109
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19110
@@ -307,7 +305,7 @@
 
19111
          return;
 
19112
        }
 
19113
       else
 
19114
-       retarray->base_addr = xmalloc (alloc_size);
 
19115
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19116
 
 
19117
     }
 
19118
   else
 
19119
@@ -485,8 +483,7 @@
 
19120
       retarray->offset = 0;
 
19121
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19122
 
 
19123
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19124
-                  * extent[rank-1];
 
19125
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19126
 
 
19127
       if (alloc_size == 0)
 
19128
        {
 
19129
@@ -495,7 +492,7 @@
 
19130
          return;
 
19131
        }
 
19132
       else
 
19133
-       retarray->base_addr = xmalloc (alloc_size);
 
19134
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19135
     }
 
19136
   else
 
19137
     {
 
19138
Index: libgfortran/generated/unpack_i8.c
 
19139
===================================================================
 
19140
--- a/src/libgfortran/generated/unpack_i8.c     (.../tags/gcc_4_8_3_release)
 
19141
+++ b/src/libgfortran/generated/unpack_i8.c     (.../branches/gcc-4_8-branch)
 
19142
@@ -99,7 +99,7 @@
 
19143
          rs *= extent[n];
 
19144
        }
 
19145
       ret->offset = 0;
 
19146
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
19147
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
19148
     }
 
19149
   else
 
19150
     {
 
19151
@@ -244,7 +244,7 @@
 
19152
          rs *= extent[n];
 
19153
        }
 
19154
       ret->offset = 0;
 
19155
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
19156
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
19157
     }
 
19158
   else
 
19159
     {
 
19160
Index: libgfortran/generated/maxloc0_4_i4.c
 
19161
===================================================================
 
19162
--- a/src/libgfortran/generated/maxloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
19163
+++ b/src/libgfortran/generated/maxloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
19164
@@ -58,7 +58,7 @@
 
19165
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19166
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19167
       retarray->offset = 0;
 
19168
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19169
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19170
     }
 
19171
   else
 
19172
     {
 
19173
@@ -199,7 +199,7 @@
 
19174
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19175
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19176
       retarray->offset = 0;
 
19177
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19178
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19179
     }
 
19180
   else
 
19181
     {
 
19182
@@ -367,7 +367,7 @@
 
19183
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19184
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19185
       retarray->offset = 0;
 
19186
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19187
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19188
     }
 
19189
   else if (unlikely (compile_options.bounds_check))
 
19190
     {
 
19191
Index: libgfortran/generated/count_4_l.c
 
19192
===================================================================
 
19193
--- a/src/libgfortran/generated/count_4_l.c     (.../tags/gcc_4_8_3_release)
 
19194
+++ b/src/libgfortran/generated/count_4_l.c     (.../branches/gcc-4_8-branch)
 
19195
@@ -101,8 +101,7 @@
 
19196
       retarray->offset = 0;
 
19197
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19198
 
 
19199
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19200
-                  * extent[rank-1];
 
19201
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19202
 
 
19203
       if (alloc_size == 0)
 
19204
        {
 
19205
@@ -111,7 +110,7 @@
 
19206
          return;
 
19207
        }
 
19208
       else
 
19209
-       retarray->base_addr = xmalloc (alloc_size);
 
19210
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19211
     }
 
19212
   else
 
19213
     {
 
19214
Index: libgfortran/generated/sum_r10.c
 
19215
===================================================================
 
19216
--- a/src/libgfortran/generated/sum_r10.c       (.../tags/gcc_4_8_3_release)
 
19217
+++ b/src/libgfortran/generated/sum_r10.c       (.../branches/gcc-4_8-branch)
 
19218
@@ -97,10 +97,9 @@
 
19219
       retarray->offset = 0;
 
19220
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19221
 
 
19222
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19223
-                  * extent[rank-1];
 
19224
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19225
 
 
19226
-      retarray->base_addr = xmalloc (alloc_size);
 
19227
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19228
       if (alloc_size == 0)
 
19229
        {
 
19230
          /* Make sure we have a zero-sized array.  */
 
19231
@@ -272,8 +271,7 @@
 
19232
 
 
19233
        }
 
19234
 
 
19235
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19236
-                  * extent[rank-1];
 
19237
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19238
 
 
19239
       retarray->offset = 0;
 
19240
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19241
@@ -285,7 +283,7 @@
 
19242
          return;
 
19243
        }
 
19244
       else
 
19245
-       retarray->base_addr = xmalloc (alloc_size);
 
19246
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19247
 
 
19248
     }
 
19249
   else
 
19250
@@ -430,8 +428,7 @@
 
19251
       retarray->offset = 0;
 
19252
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19253
 
 
19254
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19255
-                  * extent[rank-1];
 
19256
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19257
 
 
19258
       if (alloc_size == 0)
 
19259
        {
 
19260
@@ -440,7 +437,7 @@
 
19261
          return;
 
19262
        }
 
19263
       else
 
19264
-       retarray->base_addr = xmalloc (alloc_size);
 
19265
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19266
     }
 
19267
   else
 
19268
     {
 
19269
Index: libgfortran/generated/sum_c4.c
 
19270
===================================================================
 
19271
--- a/src/libgfortran/generated/sum_c4.c        (.../tags/gcc_4_8_3_release)
 
19272
+++ b/src/libgfortran/generated/sum_c4.c        (.../branches/gcc-4_8-branch)
 
19273
@@ -97,10 +97,9 @@
 
19274
       retarray->offset = 0;
 
19275
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19276
 
 
19277
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19278
-                  * extent[rank-1];
 
19279
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19280
 
 
19281
-      retarray->base_addr = xmalloc (alloc_size);
 
19282
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
19283
       if (alloc_size == 0)
 
19284
        {
 
19285
          /* Make sure we have a zero-sized array.  */
 
19286
@@ -272,8 +271,7 @@
 
19287
 
 
19288
        }
 
19289
 
 
19290
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19291
-                  * extent[rank-1];
 
19292
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19293
 
 
19294
       retarray->offset = 0;
 
19295
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19296
@@ -285,7 +283,7 @@
 
19297
          return;
 
19298
        }
 
19299
       else
 
19300
-       retarray->base_addr = xmalloc (alloc_size);
 
19301
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
19302
 
 
19303
     }
 
19304
   else
 
19305
@@ -430,8 +428,7 @@
 
19306
       retarray->offset = 0;
 
19307
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19308
 
 
19309
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19310
-                  * extent[rank-1];
 
19311
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19312
 
 
19313
       if (alloc_size == 0)
 
19314
        {
 
19315
@@ -440,7 +437,7 @@
 
19316
          return;
 
19317
        }
 
19318
       else
 
19319
-       retarray->base_addr = xmalloc (alloc_size);
 
19320
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
19321
     }
 
19322
   else
 
19323
     {
 
19324
Index: libgfortran/generated/maxloc1_16_r10.c
 
19325
===================================================================
 
19326
--- a/src/libgfortran/generated/maxloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
19327
+++ b/src/libgfortran/generated/maxloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
19328
@@ -98,10 +98,9 @@
 
19329
       retarray->offset = 0;
 
19330
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19331
 
 
19332
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19333
-                  * extent[rank-1];
 
19334
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19335
 
 
19336
-      retarray->base_addr = xmalloc (alloc_size);
 
19337
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19338
       if (alloc_size == 0)
 
19339
        {
 
19340
          /* Make sure we have a zero-sized array.  */
 
19341
@@ -294,8 +293,7 @@
 
19342
 
 
19343
        }
 
19344
 
 
19345
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19346
-                  * extent[rank-1];
 
19347
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19348
 
 
19349
       retarray->offset = 0;
 
19350
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19351
@@ -307,7 +305,7 @@
 
19352
          return;
 
19353
        }
 
19354
       else
 
19355
-       retarray->base_addr = xmalloc (alloc_size);
 
19356
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19357
 
 
19358
     }
 
19359
   else
 
19360
@@ -485,8 +483,7 @@
 
19361
       retarray->offset = 0;
 
19362
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19363
 
 
19364
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19365
-                  * extent[rank-1];
 
19366
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19367
 
 
19368
       if (alloc_size == 0)
 
19369
        {
 
19370
@@ -495,7 +492,7 @@
 
19371
          return;
 
19372
        }
 
19373
       else
 
19374
-       retarray->base_addr = xmalloc (alloc_size);
 
19375
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19376
     }
 
19377
   else
 
19378
     {
 
19379
Index: libgfortran/generated/pack_i16.c
 
19380
===================================================================
 
19381
--- a/src/libgfortran/generated/pack_i16.c      (.../tags/gcc_4_8_3_release)
 
19382
+++ b/src/libgfortran/generated/pack_i16.c      (.../branches/gcc-4_8-branch)
 
19383
@@ -167,8 +167,8 @@
 
19384
 
 
19385
          ret->offset = 0;
 
19386
 
 
19387
-         /* xmalloc allocates a single byte for zero size.  */
 
19388
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
 
19389
+         /* xmallocarray allocates a single byte for zero size.  */
 
19390
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
 
19391
 
 
19392
          if (total == 0)
 
19393
            return;
 
19394
Index: libgfortran/generated/matmul_i8.c
 
19395
===================================================================
 
19396
--- a/src/libgfortran/generated/matmul_i8.c     (.../tags/gcc_4_8_3_release)
 
19397
+++ b/src/libgfortran/generated/matmul_i8.c     (.../branches/gcc-4_8-branch)
 
19398
@@ -124,7 +124,7 @@
 
19399
         }
 
19400
 
 
19401
       retarray->base_addr
 
19402
-       = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
 
19403
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
 
19404
       retarray->offset = 0;
 
19405
     }
 
19406
     else if (unlikely (compile_options.bounds_check))
 
19407
Index: libgfortran/generated/maxloc0_16_i2.c
 
19408
===================================================================
 
19409
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
19410
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
19411
@@ -58,7 +58,7 @@
 
19412
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19413
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19414
       retarray->offset = 0;
 
19415
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19416
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19417
     }
 
19418
   else
 
19419
     {
 
19420
@@ -199,7 +199,7 @@
 
19421
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19422
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19423
       retarray->offset = 0;
 
19424
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19425
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19426
     }
 
19427
   else
 
19428
     {
 
19429
@@ -367,7 +367,7 @@
 
19430
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19431
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19432
       retarray->offset = 0;
 
19433
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19434
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19435
     }
 
19436
   else if (unlikely (compile_options.bounds_check))
 
19437
     {
 
19438
Index: libgfortran/generated/spread_c4.c
 
19439
===================================================================
 
19440
--- a/src/libgfortran/generated/spread_c4.c     (.../tags/gcc_4_8_3_release)
 
19441
+++ b/src/libgfortran/generated/spread_c4.c     (.../branches/gcc-4_8-branch)
 
19442
@@ -101,8 +101,8 @@
 
19443
        }
 
19444
       ret->offset = 0;
 
19445
 
 
19446
-      /* xmalloc allocates a single byte for zero size.  */
 
19447
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
 
19448
+      /* xmallocarray allocates a single byte for zero size.  */
 
19449
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
 
19450
       if (rs <= 0)
 
19451
         return;
 
19452
     }
 
19453
@@ -244,7 +244,7 @@
 
19454
 
 
19455
   if (ret->base_addr == NULL)
 
19456
     {
 
19457
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
 
19458
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
 
19459
       ret->offset = 0;
 
19460
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
19461
     }
 
19462
Index: libgfortran/generated/maxval_r10.c
 
19463
===================================================================
 
19464
--- a/src/libgfortran/generated/maxval_r10.c    (.../tags/gcc_4_8_3_release)
 
19465
+++ b/src/libgfortran/generated/maxval_r10.c    (.../branches/gcc-4_8-branch)
 
19466
@@ -97,10 +97,9 @@
 
19467
       retarray->offset = 0;
 
19468
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19469
 
 
19470
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19471
-                  * extent[rank-1];
 
19472
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19473
 
 
19474
-      retarray->base_addr = xmalloc (alloc_size);
 
19475
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19476
       if (alloc_size == 0)
 
19477
        {
 
19478
          /* Make sure we have a zero-sized array.  */
 
19479
@@ -286,8 +285,7 @@
 
19480
 
 
19481
        }
 
19482
 
 
19483
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19484
-                  * extent[rank-1];
 
19485
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19486
 
 
19487
       retarray->offset = 0;
 
19488
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19489
@@ -299,7 +297,7 @@
 
19490
          return;
 
19491
        }
 
19492
       else
 
19493
-       retarray->base_addr = xmalloc (alloc_size);
 
19494
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19495
 
 
19496
     }
 
19497
   else
 
19498
@@ -472,8 +470,7 @@
 
19499
       retarray->offset = 0;
 
19500
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19501
 
 
19502
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19503
-                  * extent[rank-1];
 
19504
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19505
 
 
19506
       if (alloc_size == 0)
 
19507
        {
 
19508
@@ -482,7 +479,7 @@
 
19509
          return;
 
19510
        }
 
19511
       else
 
19512
-       retarray->base_addr = xmalloc (alloc_size);
 
19513
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
19514
     }
 
19515
   else
 
19516
     {
 
19517
Index: libgfortran/generated/pack_i4.c
 
19518
===================================================================
 
19519
--- a/src/libgfortran/generated/pack_i4.c       (.../tags/gcc_4_8_3_release)
 
19520
+++ b/src/libgfortran/generated/pack_i4.c       (.../branches/gcc-4_8-branch)
 
19521
@@ -167,8 +167,8 @@
 
19522
 
 
19523
          ret->offset = 0;
 
19524
 
 
19525
-         /* xmalloc allocates a single byte for zero size.  */
 
19526
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
 
19527
+         /* xmallocarray allocates a single byte for zero size.  */
 
19528
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
 
19529
 
 
19530
          if (total == 0)
 
19531
            return;
 
19532
Index: libgfortran/generated/maxloc1_4_i1.c
 
19533
===================================================================
 
19534
--- a/src/libgfortran/generated/maxloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
19535
+++ b/src/libgfortran/generated/maxloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
19536
@@ -98,10 +98,9 @@
 
19537
       retarray->offset = 0;
 
19538
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19539
 
 
19540
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19541
-                  * extent[rank-1];
 
19542
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19543
 
 
19544
-      retarray->base_addr = xmalloc (alloc_size);
 
19545
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19546
       if (alloc_size == 0)
 
19547
        {
 
19548
          /* Make sure we have a zero-sized array.  */
 
19549
@@ -294,8 +293,7 @@
 
19550
 
 
19551
        }
 
19552
 
 
19553
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19554
-                  * extent[rank-1];
 
19555
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19556
 
 
19557
       retarray->offset = 0;
 
19558
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19559
@@ -307,7 +305,7 @@
 
19560
          return;
 
19561
        }
 
19562
       else
 
19563
-       retarray->base_addr = xmalloc (alloc_size);
 
19564
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19565
 
 
19566
     }
 
19567
   else
 
19568
@@ -485,8 +483,7 @@
 
19569
       retarray->offset = 0;
 
19570
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19571
 
 
19572
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19573
-                  * extent[rank-1];
 
19574
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19575
 
 
19576
       if (alloc_size == 0)
 
19577
        {
 
19578
@@ -495,7 +492,7 @@
 
19579
          return;
 
19580
        }
 
19581
       else
 
19582
-       retarray->base_addr = xmalloc (alloc_size);
 
19583
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19584
     }
 
19585
   else
 
19586
     {
 
19587
Index: libgfortran/generated/matmul_r10.c
 
19588
===================================================================
 
19589
--- a/src/libgfortran/generated/matmul_r10.c    (.../tags/gcc_4_8_3_release)
 
19590
+++ b/src/libgfortran/generated/matmul_r10.c    (.../branches/gcc-4_8-branch)
 
19591
@@ -124,7 +124,7 @@
 
19592
         }
 
19593
 
 
19594
       retarray->base_addr
 
19595
-       = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
 
19596
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
 
19597
       retarray->offset = 0;
 
19598
     }
 
19599
     else if (unlikely (compile_options.bounds_check))
 
19600
Index: libgfortran/generated/minloc1_4_i8.c
 
19601
===================================================================
 
19602
--- a/src/libgfortran/generated/minloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
19603
+++ b/src/libgfortran/generated/minloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
19604
@@ -98,10 +98,9 @@
 
19605
       retarray->offset = 0;
 
19606
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19607
 
 
19608
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19609
-                  * extent[rank-1];
 
19610
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19611
 
 
19612
-      retarray->base_addr = xmalloc (alloc_size);
 
19613
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19614
       if (alloc_size == 0)
 
19615
        {
 
19616
          /* Make sure we have a zero-sized array.  */
 
19617
@@ -294,8 +293,7 @@
 
19618
 
 
19619
        }
 
19620
 
 
19621
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19622
-                  * extent[rank-1];
 
19623
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19624
 
 
19625
       retarray->offset = 0;
 
19626
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19627
@@ -307,7 +305,7 @@
 
19628
          return;
 
19629
        }
 
19630
       else
 
19631
-       retarray->base_addr = xmalloc (alloc_size);
 
19632
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19633
 
 
19634
     }
 
19635
   else
 
19636
@@ -485,8 +483,7 @@
 
19637
       retarray->offset = 0;
 
19638
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19639
 
 
19640
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19641
-                  * extent[rank-1];
 
19642
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19643
 
 
19644
       if (alloc_size == 0)
 
19645
        {
 
19646
@@ -495,7 +492,7 @@
 
19647
          return;
 
19648
        }
 
19649
       else
 
19650
-       retarray->base_addr = xmalloc (alloc_size);
 
19651
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19652
     }
 
19653
   else
 
19654
     {
 
19655
Index: libgfortran/generated/minloc0_8_r4.c
 
19656
===================================================================
 
19657
--- a/src/libgfortran/generated/minloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
19658
+++ b/src/libgfortran/generated/minloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
19659
@@ -58,7 +58,7 @@
 
19660
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19661
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19662
       retarray->offset = 0;
 
19663
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19664
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19665
     }
 
19666
   else
 
19667
     {
 
19668
@@ -199,7 +199,7 @@
 
19669
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19670
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19671
       retarray->offset = 0;
 
19672
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19673
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19674
     }
 
19675
   else
 
19676
     {
 
19677
@@ -367,7 +367,7 @@
 
19678
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19679
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19680
       retarray->offset = 0;
 
19681
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19682
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19683
     }
 
19684
   else if (unlikely (compile_options.bounds_check))
 
19685
     {
 
19686
Index: libgfortran/generated/matmul_l4.c
 
19687
===================================================================
 
19688
--- a/src/libgfortran/generated/matmul_l4.c     (.../tags/gcc_4_8_3_release)
 
19689
+++ b/src/libgfortran/generated/matmul_l4.c     (.../branches/gcc-4_8-branch)
 
19690
@@ -88,7 +88,7 @@
 
19691
         }
 
19692
           
 
19693
       retarray->base_addr
 
19694
-       = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
 
19695
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
 
19696
       retarray->offset = 0;
 
19697
     }
 
19698
     else if (unlikely (compile_options.bounds_check))
 
19699
Index: libgfortran/generated/reshape_r8.c
 
19700
===================================================================
 
19701
--- a/src/libgfortran/generated/reshape_r8.c    (.../tags/gcc_4_8_3_release)
 
19702
+++ b/src/libgfortran/generated/reshape_r8.c    (.../branches/gcc-4_8-branch)
 
19703
@@ -111,11 +111,11 @@
 
19704
       ret->offset = 0;
 
19705
 
 
19706
       if (unlikely (rs < 1))
 
19707
-        alloc_size = 1;
 
19708
+        alloc_size = 0;
 
19709
       else
 
19710
-        alloc_size = rs * sizeof (GFC_REAL_8);
 
19711
+        alloc_size = rs;
 
19712
 
 
19713
-      ret->base_addr = xmalloc (alloc_size);
 
19714
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19715
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
19716
     }
 
19717
 
 
19718
Index: libgfortran/generated/in_pack_c10.c
 
19719
===================================================================
 
19720
--- a/src/libgfortran/generated/in_pack_c10.c   (.../tags/gcc_4_8_3_release)
 
19721
+++ b/src/libgfortran/generated/in_pack_c10.c   (.../branches/gcc-4_8-branch)
 
19722
@@ -76,7 +76,7 @@
 
19723
     return source->base_addr;
 
19724
 
 
19725
   /* Allocate storage for the destination.  */
 
19726
-  destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
 
19727
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
 
19728
   dest = destptr;
 
19729
   src = source->base_addr;
 
19730
   stride0 = stride[0];
 
19731
Index: libgfortran/generated/all_l4.c
 
19732
===================================================================
 
19733
--- a/src/libgfortran/generated/all_l4.c        (.../tags/gcc_4_8_3_release)
 
19734
+++ b/src/libgfortran/generated/all_l4.c        (.../branches/gcc-4_8-branch)
 
19735
@@ -101,8 +101,7 @@
 
19736
       retarray->offset = 0;
 
19737
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19738
 
 
19739
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19740
-                  * extent[rank-1];
 
19741
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19742
 
 
19743
       if (alloc_size == 0)
 
19744
        {
 
19745
@@ -111,7 +110,7 @@
 
19746
          return;
 
19747
        }
 
19748
       else
 
19749
-       retarray->base_addr = xmalloc (alloc_size);
 
19750
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
19751
     }
 
19752
   else
 
19753
     {
 
19754
Index: libgfortran/generated/minloc0_8_i2.c
 
19755
===================================================================
 
19756
--- a/src/libgfortran/generated/minloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
19757
+++ b/src/libgfortran/generated/minloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
19758
@@ -58,7 +58,7 @@
 
19759
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19760
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19761
       retarray->offset = 0;
 
19762
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19763
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19764
     }
 
19765
   else
 
19766
     {
 
19767
@@ -199,7 +199,7 @@
 
19768
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19769
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19770
       retarray->offset = 0;
 
19771
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19772
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19773
     }
 
19774
   else
 
19775
     {
 
19776
@@ -367,7 +367,7 @@
 
19777
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19778
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19779
       retarray->offset = 0;
 
19780
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
19781
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
19782
     }
 
19783
   else if (unlikely (compile_options.bounds_check))
 
19784
     {
 
19785
Index: libgfortran/generated/norm2_r16.c
 
19786
===================================================================
 
19787
--- a/src/libgfortran/generated/norm2_r16.c     (.../tags/gcc_4_8_3_release)
 
19788
+++ b/src/libgfortran/generated/norm2_r16.c     (.../branches/gcc-4_8-branch)
 
19789
@@ -105,10 +105,9 @@
 
19790
       retarray->offset = 0;
 
19791
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19792
 
 
19793
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19794
-                  * extent[rank-1];
 
19795
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19796
 
 
19797
-      retarray->base_addr = xmalloc (alloc_size);
 
19798
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
19799
       if (alloc_size == 0)
 
19800
        {
 
19801
          /* Make sure we have a zero-sized array.  */
 
19802
Index: libgfortran/generated/reshape_c10.c
 
19803
===================================================================
 
19804
--- a/src/libgfortran/generated/reshape_c10.c   (.../tags/gcc_4_8_3_release)
 
19805
+++ b/src/libgfortran/generated/reshape_c10.c   (.../branches/gcc-4_8-branch)
 
19806
@@ -111,11 +111,11 @@
 
19807
       ret->offset = 0;
 
19808
 
 
19809
       if (unlikely (rs < 1))
 
19810
-        alloc_size = 1;
 
19811
+        alloc_size = 0;
 
19812
       else
 
19813
-        alloc_size = rs * sizeof (GFC_COMPLEX_10);
 
19814
+        alloc_size = rs;
 
19815
 
 
19816
-      ret->base_addr = xmalloc (alloc_size);
 
19817
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
19818
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
19819
     }
 
19820
 
 
19821
Index: libgfortran/generated/unpack_c16.c
 
19822
===================================================================
 
19823
--- a/src/libgfortran/generated/unpack_c16.c    (.../tags/gcc_4_8_3_release)
 
19824
+++ b/src/libgfortran/generated/unpack_c16.c    (.../branches/gcc-4_8-branch)
 
19825
@@ -99,7 +99,7 @@
 
19826
          rs *= extent[n];
 
19827
        }
 
19828
       ret->offset = 0;
 
19829
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
19830
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
19831
     }
 
19832
   else
 
19833
     {
 
19834
@@ -244,7 +244,7 @@
 
19835
          rs *= extent[n];
 
19836
        }
 
19837
       ret->offset = 0;
 
19838
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
19839
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
19840
     }
 
19841
   else
 
19842
     {
 
19843
Index: libgfortran/generated/maxloc1_4_r4.c
 
19844
===================================================================
 
19845
--- a/src/libgfortran/generated/maxloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
19846
+++ b/src/libgfortran/generated/maxloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
19847
@@ -98,10 +98,9 @@
 
19848
       retarray->offset = 0;
 
19849
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19850
 
 
19851
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19852
-                  * extent[rank-1];
 
19853
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19854
 
 
19855
-      retarray->base_addr = xmalloc (alloc_size);
 
19856
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19857
       if (alloc_size == 0)
 
19858
        {
 
19859
          /* Make sure we have a zero-sized array.  */
 
19860
@@ -294,8 +293,7 @@
 
19861
 
 
19862
        }
 
19863
 
 
19864
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19865
-                  * extent[rank-1];
 
19866
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19867
 
 
19868
       retarray->offset = 0;
 
19869
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19870
@@ -307,7 +305,7 @@
 
19871
          return;
 
19872
        }
 
19873
       else
 
19874
-       retarray->base_addr = xmalloc (alloc_size);
 
19875
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19876
 
 
19877
     }
 
19878
   else
 
19879
@@ -485,8 +483,7 @@
 
19880
       retarray->offset = 0;
 
19881
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19882
 
 
19883
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19884
-                  * extent[rank-1];
 
19885
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19886
 
 
19887
       if (alloc_size == 0)
 
19888
        {
 
19889
@@ -495,7 +492,7 @@
 
19890
          return;
 
19891
        }
 
19892
       else
 
19893
-       retarray->base_addr = xmalloc (alloc_size);
 
19894
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19895
     }
 
19896
   else
 
19897
     {
 
19898
Index: libgfortran/generated/maxval_r8.c
 
19899
===================================================================
 
19900
--- a/src/libgfortran/generated/maxval_r8.c     (.../tags/gcc_4_8_3_release)
 
19901
+++ b/src/libgfortran/generated/maxval_r8.c     (.../branches/gcc-4_8-branch)
 
19902
@@ -97,10 +97,9 @@
 
19903
       retarray->offset = 0;
 
19904
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19905
 
 
19906
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19907
-                  * extent[rank-1];
 
19908
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19909
 
 
19910
-      retarray->base_addr = xmalloc (alloc_size);
 
19911
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19912
       if (alloc_size == 0)
 
19913
        {
 
19914
          /* Make sure we have a zero-sized array.  */
 
19915
@@ -286,8 +285,7 @@
 
19916
 
 
19917
        }
 
19918
 
 
19919
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19920
-                  * extent[rank-1];
 
19921
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19922
 
 
19923
       retarray->offset = 0;
 
19924
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19925
@@ -299,7 +297,7 @@
 
19926
          return;
 
19927
        }
 
19928
       else
 
19929
-       retarray->base_addr = xmalloc (alloc_size);
 
19930
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19931
 
 
19932
     }
 
19933
   else
 
19934
@@ -472,8 +470,7 @@
 
19935
       retarray->offset = 0;
 
19936
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19937
 
 
19938
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19939
-                  * extent[rank-1];
 
19940
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19941
 
 
19942
       if (alloc_size == 0)
 
19943
        {
 
19944
@@ -482,7 +479,7 @@
 
19945
          return;
 
19946
        }
 
19947
       else
 
19948
-       retarray->base_addr = xmalloc (alloc_size);
 
19949
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19950
     }
 
19951
   else
 
19952
     {
 
19953
Index: libgfortran/generated/transpose_c4.c
 
19954
===================================================================
 
19955
--- a/src/libgfortran/generated/transpose_c4.c  (.../tags/gcc_4_8_3_release)
 
19956
+++ b/src/libgfortran/generated/transpose_c4.c  (.../branches/gcc-4_8-branch)
 
19957
@@ -60,7 +60,8 @@
 
19958
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19959
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19960
 
 
19961
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
 
19962
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19963
+                                     sizeof (GFC_COMPLEX_4));
 
19964
       ret->offset = 0;
 
19965
     } else if (unlikely (compile_options.bounds_check))
 
19966
     {
 
19967
Index: libgfortran/generated/eoshift1_4.c
 
19968
===================================================================
 
19969
--- a/src/libgfortran/generated/eoshift1_4.c    (.../tags/gcc_4_8_3_release)
 
19970
+++ b/src/libgfortran/generated/eoshift1_4.c    (.../branches/gcc-4_8-branch)
 
19971
@@ -105,8 +105,8 @@
 
19972
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
19973
 
 
19974
         }
 
19975
-      /* xmalloc allocates a single byte for zero size.  */
 
19976
-      ret->base_addr = xmalloc (size * arraysize);
 
19977
+      /* xmallocarray allocates a single byte for zero size.  */
 
19978
+      ret->base_addr = xmallocarray (arraysize, size);
 
19979
 
 
19980
     }
 
19981
   else if (unlikely (compile_options.bounds_check))
 
19982
Index: libgfortran/generated/minval_r16.c
 
19983
===================================================================
 
19984
--- a/src/libgfortran/generated/minval_r16.c    (.../tags/gcc_4_8_3_release)
 
19985
+++ b/src/libgfortran/generated/minval_r16.c    (.../branches/gcc-4_8-branch)
 
19986
@@ -97,10 +97,9 @@
 
19987
       retarray->offset = 0;
 
19988
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19989
 
 
19990
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19991
-                  * extent[rank-1];
 
19992
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19993
 
 
19994
-      retarray->base_addr = xmalloc (alloc_size);
 
19995
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
19996
       if (alloc_size == 0)
 
19997
        {
 
19998
          /* Make sure we have a zero-sized array.  */
 
19999
@@ -286,8 +285,7 @@
 
20000
 
 
20001
        }
 
20002
 
 
20003
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20004
-                  * extent[rank-1];
 
20005
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20006
 
 
20007
       retarray->offset = 0;
 
20008
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20009
@@ -299,7 +297,7 @@
 
20010
          return;
 
20011
        }
 
20012
       else
 
20013
-       retarray->base_addr = xmalloc (alloc_size);
 
20014
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
20015
 
 
20016
     }
 
20017
   else
 
20018
@@ -472,8 +470,7 @@
 
20019
       retarray->offset = 0;
 
20020
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20021
 
 
20022
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20023
-                  * extent[rank-1];
 
20024
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20025
 
 
20026
       if (alloc_size == 0)
 
20027
        {
 
20028
@@ -482,7 +479,7 @@
 
20029
          return;
 
20030
        }
 
20031
       else
 
20032
-       retarray->base_addr = xmalloc (alloc_size);
 
20033
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
20034
     }
 
20035
   else
 
20036
     {
 
20037
Index: libgfortran/generated/iany_i16.c
 
20038
===================================================================
 
20039
--- a/src/libgfortran/generated/iany_i16.c      (.../tags/gcc_4_8_3_release)
 
20040
+++ b/src/libgfortran/generated/iany_i16.c      (.../branches/gcc-4_8-branch)
 
20041
@@ -97,10 +97,9 @@
 
20042
       retarray->offset = 0;
 
20043
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20044
 
 
20045
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20046
-                  * extent[rank-1];
 
20047
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20048
 
 
20049
-      retarray->base_addr = xmalloc (alloc_size);
 
20050
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20051
       if (alloc_size == 0)
 
20052
        {
 
20053
          /* Make sure we have a zero-sized array.  */
 
20054
@@ -272,8 +271,7 @@
 
20055
 
 
20056
        }
 
20057
 
 
20058
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20059
-                  * extent[rank-1];
 
20060
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20061
 
 
20062
       retarray->offset = 0;
 
20063
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20064
@@ -285,7 +283,7 @@
 
20065
          return;
 
20066
        }
 
20067
       else
 
20068
-       retarray->base_addr = xmalloc (alloc_size);
 
20069
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20070
 
 
20071
     }
 
20072
   else
 
20073
@@ -430,8 +428,7 @@
 
20074
       retarray->offset = 0;
 
20075
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20076
 
 
20077
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20078
-                  * extent[rank-1];
 
20079
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20080
 
 
20081
       if (alloc_size == 0)
 
20082
        {
 
20083
@@ -440,7 +437,7 @@
 
20084
          return;
 
20085
        }
 
20086
       else
 
20087
-       retarray->base_addr = xmalloc (alloc_size);
 
20088
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20089
     }
 
20090
   else
 
20091
     {
 
20092
Index: libgfortran/generated/maxloc1_4_i2.c
 
20093
===================================================================
 
20094
--- a/src/libgfortran/generated/maxloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
20095
+++ b/src/libgfortran/generated/maxloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
20096
@@ -98,10 +98,9 @@
 
20097
       retarray->offset = 0;
 
20098
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20099
 
 
20100
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20101
-                  * extent[rank-1];
 
20102
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20103
 
 
20104
-      retarray->base_addr = xmalloc (alloc_size);
 
20105
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20106
       if (alloc_size == 0)
 
20107
        {
 
20108
          /* Make sure we have a zero-sized array.  */
 
20109
@@ -294,8 +293,7 @@
 
20110
 
 
20111
        }
 
20112
 
 
20113
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20114
-                  * extent[rank-1];
 
20115
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20116
 
 
20117
       retarray->offset = 0;
 
20118
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20119
@@ -307,7 +305,7 @@
 
20120
          return;
 
20121
        }
 
20122
       else
 
20123
-       retarray->base_addr = xmalloc (alloc_size);
 
20124
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20125
 
 
20126
     }
 
20127
   else
 
20128
@@ -485,8 +483,7 @@
 
20129
       retarray->offset = 0;
 
20130
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20131
 
 
20132
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20133
-                  * extent[rank-1];
 
20134
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20135
 
 
20136
       if (alloc_size == 0)
 
20137
        {
 
20138
@@ -495,7 +492,7 @@
 
20139
          return;
 
20140
        }
 
20141
       else
 
20142
-       retarray->base_addr = xmalloc (alloc_size);
 
20143
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20144
     }
 
20145
   else
 
20146
     {
 
20147
Index: libgfortran/generated/maxloc1_8_i8.c
 
20148
===================================================================
 
20149
--- a/src/libgfortran/generated/maxloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
20150
+++ b/src/libgfortran/generated/maxloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
20151
@@ -98,10 +98,9 @@
 
20152
       retarray->offset = 0;
 
20153
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20154
 
 
20155
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20156
-                  * extent[rank-1];
 
20157
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20158
 
 
20159
-      retarray->base_addr = xmalloc (alloc_size);
 
20160
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20161
       if (alloc_size == 0)
 
20162
        {
 
20163
          /* Make sure we have a zero-sized array.  */
 
20164
@@ -294,8 +293,7 @@
 
20165
 
 
20166
        }
 
20167
 
 
20168
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20169
-                  * extent[rank-1];
 
20170
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20171
 
 
20172
       retarray->offset = 0;
 
20173
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20174
@@ -307,7 +305,7 @@
 
20175
          return;
 
20176
        }
 
20177
       else
 
20178
-       retarray->base_addr = xmalloc (alloc_size);
 
20179
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20180
 
 
20181
     }
 
20182
   else
 
20183
@@ -485,8 +483,7 @@
 
20184
       retarray->offset = 0;
 
20185
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20186
 
 
20187
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20188
-                  * extent[rank-1];
 
20189
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20190
 
 
20191
       if (alloc_size == 0)
 
20192
        {
 
20193
@@ -495,7 +492,7 @@
 
20194
          return;
 
20195
        }
 
20196
       else
 
20197
-       retarray->base_addr = xmalloc (alloc_size);
 
20198
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20199
     }
 
20200
   else
 
20201
     {
 
20202
Index: libgfortran/generated/maxloc0_4_r8.c
 
20203
===================================================================
 
20204
--- a/src/libgfortran/generated/maxloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
20205
+++ b/src/libgfortran/generated/maxloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
20206
@@ -58,7 +58,7 @@
 
20207
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20208
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20209
       retarray->offset = 0;
 
20210
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20211
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20212
     }
 
20213
   else
 
20214
     {
 
20215
@@ -199,7 +199,7 @@
 
20216
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20217
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20218
       retarray->offset = 0;
 
20219
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20220
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20221
     }
 
20222
   else
 
20223
     {
 
20224
@@ -367,7 +367,7 @@
 
20225
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20226
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20227
       retarray->offset = 0;
 
20228
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20229
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20230
     }
 
20231
   else if (unlikely (compile_options.bounds_check))
 
20232
     {
 
20233
Index: libgfortran/generated/maxloc0_16_r16.c
 
20234
===================================================================
 
20235
--- a/src/libgfortran/generated/maxloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
20236
+++ b/src/libgfortran/generated/maxloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
20237
@@ -58,7 +58,7 @@
 
20238
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20239
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20240
       retarray->offset = 0;
 
20241
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20242
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20243
     }
 
20244
   else
 
20245
     {
 
20246
@@ -199,7 +199,7 @@
 
20247
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20248
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20249
       retarray->offset = 0;
 
20250
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20251
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20252
     }
 
20253
   else
 
20254
     {
 
20255
@@ -367,7 +367,7 @@
 
20256
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20257
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20258
       retarray->offset = 0;
 
20259
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20260
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20261
     }
 
20262
   else if (unlikely (compile_options.bounds_check))
 
20263
     {
 
20264
Index: libgfortran/generated/sum_c10.c
 
20265
===================================================================
 
20266
--- a/src/libgfortran/generated/sum_c10.c       (.../tags/gcc_4_8_3_release)
 
20267
+++ b/src/libgfortran/generated/sum_c10.c       (.../branches/gcc-4_8-branch)
 
20268
@@ -97,10 +97,9 @@
 
20269
       retarray->offset = 0;
 
20270
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20271
 
 
20272
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20273
-                  * extent[rank-1];
 
20274
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20275
 
 
20276
-      retarray->base_addr = xmalloc (alloc_size);
 
20277
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
20278
       if (alloc_size == 0)
 
20279
        {
 
20280
          /* Make sure we have a zero-sized array.  */
 
20281
@@ -272,8 +271,7 @@
 
20282
 
 
20283
        }
 
20284
 
 
20285
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20286
-                  * extent[rank-1];
 
20287
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20288
 
 
20289
       retarray->offset = 0;
 
20290
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20291
@@ -285,7 +283,7 @@
 
20292
          return;
 
20293
        }
 
20294
       else
 
20295
-       retarray->base_addr = xmalloc (alloc_size);
 
20296
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
20297
 
 
20298
     }
 
20299
   else
 
20300
@@ -430,8 +428,7 @@
 
20301
       retarray->offset = 0;
 
20302
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20303
 
 
20304
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20305
-                  * extent[rank-1];
 
20306
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20307
 
 
20308
       if (alloc_size == 0)
 
20309
        {
 
20310
@@ -440,7 +437,7 @@
 
20311
          return;
 
20312
        }
 
20313
       else
 
20314
-       retarray->base_addr = xmalloc (alloc_size);
 
20315
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
20316
     }
 
20317
   else
 
20318
     {
 
20319
Index: libgfortran/generated/iall_i4.c
 
20320
===================================================================
 
20321
--- a/src/libgfortran/generated/iall_i4.c       (.../tags/gcc_4_8_3_release)
 
20322
+++ b/src/libgfortran/generated/iall_i4.c       (.../branches/gcc-4_8-branch)
 
20323
@@ -97,10 +97,9 @@
 
20324
       retarray->offset = 0;
 
20325
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20326
 
 
20327
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20328
-                  * extent[rank-1];
 
20329
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20330
 
 
20331
-      retarray->base_addr = xmalloc (alloc_size);
 
20332
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20333
       if (alloc_size == 0)
 
20334
        {
 
20335
          /* Make sure we have a zero-sized array.  */
 
20336
@@ -272,8 +271,7 @@
 
20337
 
 
20338
        }
 
20339
 
 
20340
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20341
-                  * extent[rank-1];
 
20342
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20343
 
 
20344
       retarray->offset = 0;
 
20345
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20346
@@ -285,7 +283,7 @@
 
20347
          return;
 
20348
        }
 
20349
       else
 
20350
-       retarray->base_addr = xmalloc (alloc_size);
 
20351
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20352
 
 
20353
     }
 
20354
   else
 
20355
@@ -430,8 +428,7 @@
 
20356
       retarray->offset = 0;
 
20357
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20358
 
 
20359
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20360
-                  * extent[rank-1];
 
20361
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20362
 
 
20363
       if (alloc_size == 0)
 
20364
        {
 
20365
@@ -440,7 +437,7 @@
 
20366
          return;
 
20367
        }
 
20368
       else
 
20369
-       retarray->base_addr = xmalloc (alloc_size);
 
20370
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20371
     }
 
20372
   else
 
20373
     {
 
20374
Index: libgfortran/generated/minloc1_4_r16.c
 
20375
===================================================================
 
20376
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
20377
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
20378
@@ -98,10 +98,9 @@
 
20379
       retarray->offset = 0;
 
20380
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20381
 
 
20382
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20383
-                  * extent[rank-1];
 
20384
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20385
 
 
20386
-      retarray->base_addr = xmalloc (alloc_size);
 
20387
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20388
       if (alloc_size == 0)
 
20389
        {
 
20390
          /* Make sure we have a zero-sized array.  */
 
20391
@@ -294,8 +293,7 @@
 
20392
 
 
20393
        }
 
20394
 
 
20395
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20396
-                  * extent[rank-1];
 
20397
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20398
 
 
20399
       retarray->offset = 0;
 
20400
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20401
@@ -307,7 +305,7 @@
 
20402
          return;
 
20403
        }
 
20404
       else
 
20405
-       retarray->base_addr = xmalloc (alloc_size);
 
20406
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20407
 
 
20408
     }
 
20409
   else
 
20410
@@ -485,8 +483,7 @@
 
20411
       retarray->offset = 0;
 
20412
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20413
 
 
20414
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20415
-                  * extent[rank-1];
 
20416
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20417
 
 
20418
       if (alloc_size == 0)
 
20419
        {
 
20420
@@ -495,7 +492,7 @@
 
20421
          return;
 
20422
        }
 
20423
       else
 
20424
-       retarray->base_addr = xmalloc (alloc_size);
 
20425
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20426
     }
 
20427
   else
 
20428
     {
 
20429
Index: libgfortran/generated/maxloc0_8_r16.c
 
20430
===================================================================
 
20431
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
20432
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
20433
@@ -58,7 +58,7 @@
 
20434
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20435
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20436
       retarray->offset = 0;
 
20437
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20438
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20439
     }
 
20440
   else
 
20441
     {
 
20442
@@ -199,7 +199,7 @@
 
20443
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20444
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20445
       retarray->offset = 0;
 
20446
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20447
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20448
     }
 
20449
   else
 
20450
     {
 
20451
@@ -367,7 +367,7 @@
 
20452
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20453
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20454
       retarray->offset = 0;
 
20455
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20456
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20457
     }
 
20458
   else if (unlikely (compile_options.bounds_check))
 
20459
     {
 
20460
Index: libgfortran/generated/pack_r8.c
 
20461
===================================================================
 
20462
--- a/src/libgfortran/generated/pack_r8.c       (.../tags/gcc_4_8_3_release)
 
20463
+++ b/src/libgfortran/generated/pack_r8.c       (.../branches/gcc-4_8-branch)
 
20464
@@ -167,8 +167,8 @@
 
20465
 
 
20466
          ret->offset = 0;
 
20467
 
 
20468
-         /* xmalloc allocates a single byte for zero size.  */
 
20469
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
 
20470
+         /* xmallocarray allocates a single byte for zero size.  */
 
20471
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
 
20472
 
 
20473
          if (total == 0)
 
20474
            return;
 
20475
Index: libgfortran/generated/matmul_c10.c
 
20476
===================================================================
 
20477
--- a/src/libgfortran/generated/matmul_c10.c    (.../tags/gcc_4_8_3_release)
 
20478
+++ b/src/libgfortran/generated/matmul_c10.c    (.../branches/gcc-4_8-branch)
 
20479
@@ -124,7 +124,7 @@
 
20480
         }
 
20481
 
 
20482
       retarray->base_addr
 
20483
-       = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
 
20484
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
 
20485
       retarray->offset = 0;
 
20486
     }
 
20487
     else if (unlikely (compile_options.bounds_check))
 
20488
Index: libgfortran/generated/maxloc0_16_i4.c
 
20489
===================================================================
 
20490
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
20491
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
20492
@@ -58,7 +58,7 @@
 
20493
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20494
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20495
       retarray->offset = 0;
 
20496
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20497
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20498
     }
 
20499
   else
 
20500
     {
 
20501
@@ -199,7 +199,7 @@
 
20502
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20503
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20504
       retarray->offset = 0;
 
20505
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20506
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20507
     }
 
20508
   else
 
20509
     {
 
20510
@@ -367,7 +367,7 @@
 
20511
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20512
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20513
       retarray->offset = 0;
 
20514
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20515
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20516
     }
 
20517
   else if (unlikely (compile_options.bounds_check))
 
20518
     {
 
20519
Index: libgfortran/generated/pack_r16.c
 
20520
===================================================================
 
20521
--- a/src/libgfortran/generated/pack_r16.c      (.../tags/gcc_4_8_3_release)
 
20522
+++ b/src/libgfortran/generated/pack_r16.c      (.../branches/gcc-4_8-branch)
 
20523
@@ -167,8 +167,8 @@
 
20524
 
 
20525
          ret->offset = 0;
 
20526
 
 
20527
-         /* xmalloc allocates a single byte for zero size.  */
 
20528
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
 
20529
+         /* xmallocarray allocates a single byte for zero size.  */
 
20530
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
 
20531
 
 
20532
          if (total == 0)
 
20533
            return;
 
20534
Index: libgfortran/generated/minloc1_16_i8.c
 
20535
===================================================================
 
20536
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
20537
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
20538
@@ -98,10 +98,9 @@
 
20539
       retarray->offset = 0;
 
20540
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20541
 
 
20542
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20543
-                  * extent[rank-1];
 
20544
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20545
 
 
20546
-      retarray->base_addr = xmalloc (alloc_size);
 
20547
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20548
       if (alloc_size == 0)
 
20549
        {
 
20550
          /* Make sure we have a zero-sized array.  */
 
20551
@@ -294,8 +293,7 @@
 
20552
 
 
20553
        }
 
20554
 
 
20555
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20556
-                  * extent[rank-1];
 
20557
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20558
 
 
20559
       retarray->offset = 0;
 
20560
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20561
@@ -307,7 +305,7 @@
 
20562
          return;
 
20563
        }
 
20564
       else
 
20565
-       retarray->base_addr = xmalloc (alloc_size);
 
20566
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20567
 
 
20568
     }
 
20569
   else
 
20570
@@ -485,8 +483,7 @@
 
20571
       retarray->offset = 0;
 
20572
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20573
 
 
20574
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20575
-                  * extent[rank-1];
 
20576
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20577
 
 
20578
       if (alloc_size == 0)
 
20579
        {
 
20580
@@ -495,7 +492,7 @@
 
20581
          return;
 
20582
        }
 
20583
       else
 
20584
-       retarray->base_addr = xmalloc (alloc_size);
 
20585
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20586
     }
 
20587
   else
 
20588
     {
 
20589
Index: libgfortran/generated/minloc0_16_r10.c
 
20590
===================================================================
 
20591
--- a/src/libgfortran/generated/minloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
20592
+++ b/src/libgfortran/generated/minloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
20593
@@ -58,7 +58,7 @@
 
20594
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20595
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20596
       retarray->offset = 0;
 
20597
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20598
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20599
     }
 
20600
   else
 
20601
     {
 
20602
@@ -199,7 +199,7 @@
 
20603
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20604
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20605
       retarray->offset = 0;
 
20606
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20607
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20608
     }
 
20609
   else
 
20610
     {
 
20611
@@ -367,7 +367,7 @@
 
20612
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20613
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20614
       retarray->offset = 0;
 
20615
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20616
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20617
     }
 
20618
   else if (unlikely (compile_options.bounds_check))
 
20619
     {
 
20620
Index: libgfortran/generated/unpack_c4.c
 
20621
===================================================================
 
20622
--- a/src/libgfortran/generated/unpack_c4.c     (.../tags/gcc_4_8_3_release)
 
20623
+++ b/src/libgfortran/generated/unpack_c4.c     (.../branches/gcc-4_8-branch)
 
20624
@@ -99,7 +99,7 @@
 
20625
          rs *= extent[n];
 
20626
        }
 
20627
       ret->offset = 0;
 
20628
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
20629
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
20630
     }
 
20631
   else
 
20632
     {
 
20633
@@ -244,7 +244,7 @@
 
20634
          rs *= extent[n];
 
20635
        }
 
20636
       ret->offset = 0;
 
20637
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
20638
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
20639
     }
 
20640
   else
 
20641
     {
 
20642
Index: libgfortran/generated/iparity_i1.c
 
20643
===================================================================
 
20644
--- a/src/libgfortran/generated/iparity_i1.c    (.../tags/gcc_4_8_3_release)
 
20645
+++ b/src/libgfortran/generated/iparity_i1.c    (.../branches/gcc-4_8-branch)
 
20646
@@ -97,10 +97,9 @@
 
20647
       retarray->offset = 0;
 
20648
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20649
 
 
20650
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20651
-                  * extent[rank-1];
 
20652
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20653
 
 
20654
-      retarray->base_addr = xmalloc (alloc_size);
 
20655
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20656
       if (alloc_size == 0)
 
20657
        {
 
20658
          /* Make sure we have a zero-sized array.  */
 
20659
@@ -272,8 +271,7 @@
 
20660
 
 
20661
        }
 
20662
 
 
20663
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20664
-                  * extent[rank-1];
 
20665
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20666
 
 
20667
       retarray->offset = 0;
 
20668
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20669
@@ -285,7 +283,7 @@
 
20670
          return;
 
20671
        }
 
20672
       else
 
20673
-       retarray->base_addr = xmalloc (alloc_size);
 
20674
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20675
 
 
20676
     }
 
20677
   else
 
20678
@@ -430,8 +428,7 @@
 
20679
       retarray->offset = 0;
 
20680
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20681
 
 
20682
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20683
-                  * extent[rank-1];
 
20684
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20685
 
 
20686
       if (alloc_size == 0)
 
20687
        {
 
20688
@@ -440,7 +437,7 @@
 
20689
          return;
 
20690
        }
 
20691
       else
 
20692
-       retarray->base_addr = xmalloc (alloc_size);
 
20693
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20694
     }
 
20695
   else
 
20696
     {
 
20697
Index: libgfortran/generated/product_c8.c
 
20698
===================================================================
 
20699
--- a/src/libgfortran/generated/product_c8.c    (.../tags/gcc_4_8_3_release)
 
20700
+++ b/src/libgfortran/generated/product_c8.c    (.../branches/gcc-4_8-branch)
 
20701
@@ -97,10 +97,9 @@
 
20702
       retarray->offset = 0;
 
20703
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20704
 
 
20705
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20706
-                  * extent[rank-1];
 
20707
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20708
 
 
20709
-      retarray->base_addr = xmalloc (alloc_size);
 
20710
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
20711
       if (alloc_size == 0)
 
20712
        {
 
20713
          /* Make sure we have a zero-sized array.  */
 
20714
@@ -272,8 +271,7 @@
 
20715
 
 
20716
        }
 
20717
 
 
20718
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20719
-                  * extent[rank-1];
 
20720
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20721
 
 
20722
       retarray->offset = 0;
 
20723
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20724
@@ -285,7 +283,7 @@
 
20725
          return;
 
20726
        }
 
20727
       else
 
20728
-       retarray->base_addr = xmalloc (alloc_size);
 
20729
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
20730
 
 
20731
     }
 
20732
   else
 
20733
@@ -430,8 +428,7 @@
 
20734
       retarray->offset = 0;
 
20735
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20736
 
 
20737
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20738
-                  * extent[rank-1];
 
20739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20740
 
 
20741
       if (alloc_size == 0)
 
20742
        {
 
20743
@@ -440,7 +437,7 @@
 
20744
          return;
 
20745
        }
 
20746
       else
 
20747
-       retarray->base_addr = xmalloc (alloc_size);
 
20748
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
20749
     }
 
20750
   else
 
20751
     {
 
20752
Index: libgfortran/generated/in_pack_i16.c
 
20753
===================================================================
 
20754
--- a/src/libgfortran/generated/in_pack_i16.c   (.../tags/gcc_4_8_3_release)
 
20755
+++ b/src/libgfortran/generated/in_pack_i16.c   (.../branches/gcc-4_8-branch)
 
20756
@@ -76,7 +76,7 @@
 
20757
     return source->base_addr;
 
20758
 
 
20759
   /* Allocate storage for the destination.  */
 
20760
-  destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
 
20761
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
 
20762
   dest = destptr;
 
20763
   src = source->base_addr;
 
20764
   stride0 = stride[0];
 
20765
Index: libgfortran/generated/minloc0_8_i4.c
 
20766
===================================================================
 
20767
--- a/src/libgfortran/generated/minloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
20768
+++ b/src/libgfortran/generated/minloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
20769
@@ -58,7 +58,7 @@
 
20770
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20771
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20772
       retarray->offset = 0;
 
20773
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20774
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20775
     }
 
20776
   else
 
20777
     {
 
20778
@@ -199,7 +199,7 @@
 
20779
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20780
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20781
       retarray->offset = 0;
 
20782
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20783
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20784
     }
 
20785
   else
 
20786
     {
 
20787
@@ -367,7 +367,7 @@
 
20788
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20789
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20790
       retarray->offset = 0;
 
20791
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20792
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20793
     }
 
20794
   else if (unlikely (compile_options.bounds_check))
 
20795
     {
 
20796
Index: libgfortran/generated/matmul_c4.c
 
20797
===================================================================
 
20798
--- a/src/libgfortran/generated/matmul_c4.c     (.../tags/gcc_4_8_3_release)
 
20799
+++ b/src/libgfortran/generated/matmul_c4.c     (.../branches/gcc-4_8-branch)
 
20800
@@ -124,7 +124,7 @@
 
20801
         }
 
20802
 
 
20803
       retarray->base_addr
 
20804
-       = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
 
20805
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
 
20806
       retarray->offset = 0;
 
20807
     }
 
20808
     else if (unlikely (compile_options.bounds_check))
 
20809
Index: libgfortran/generated/reshape_i8.c
 
20810
===================================================================
 
20811
--- a/src/libgfortran/generated/reshape_i8.c    (.../tags/gcc_4_8_3_release)
 
20812
+++ b/src/libgfortran/generated/reshape_i8.c    (.../branches/gcc-4_8-branch)
 
20813
@@ -111,11 +111,11 @@
 
20814
       ret->offset = 0;
 
20815
 
 
20816
       if (unlikely (rs < 1))
 
20817
-        alloc_size = 1;
 
20818
+        alloc_size = 0;
 
20819
       else
 
20820
-        alloc_size = rs * sizeof (GFC_INTEGER_8);
 
20821
+        alloc_size = rs;
 
20822
 
 
20823
-      ret->base_addr = xmalloc (alloc_size);
 
20824
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20825
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
20826
     }
 
20827
 
 
20828
Index: libgfortran/generated/in_pack_c8.c
 
20829
===================================================================
 
20830
--- a/src/libgfortran/generated/in_pack_c8.c    (.../tags/gcc_4_8_3_release)
 
20831
+++ b/src/libgfortran/generated/in_pack_c8.c    (.../branches/gcc-4_8-branch)
 
20832
@@ -76,7 +76,7 @@
 
20833
     return source->base_addr;
 
20834
 
 
20835
   /* Allocate storage for the destination.  */
 
20836
-  destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
 
20837
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
 
20838
   dest = destptr;
 
20839
   src = source->base_addr;
 
20840
   stride0 = stride[0];
 
20841
Index: libgfortran/generated/bessel_r10.c
 
20842
===================================================================
 
20843
--- a/src/libgfortran/generated/bessel_r10.c    (.../tags/gcc_4_8_3_release)
 
20844
+++ b/src/libgfortran/generated/bessel_r10.c    (.../branches/gcc-4_8-branch)
 
20845
@@ -55,7 +55,7 @@
 
20846
     {
 
20847
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
20848
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
20849
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
20850
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
20851
       ret->offset = 0;
 
20852
     }
 
20853
 
 
20854
@@ -122,7 +122,7 @@
 
20855
     {
 
20856
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
20857
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
20858
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
20859
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
20860
       ret->offset = 0;
 
20861
     }
 
20862
 
 
20863
@@ -162,7 +162,7 @@
 
20864
 
 
20865
   x2rev = GFC_REAL_10_LITERAL(2.)/x;
 
20866
 
 
20867
-  for (i = 2; i <= n1+n2; i++)
 
20868
+  for (i = 2; i <= n2 - n1; i++)
 
20869
     {
 
20870
 #if defined(GFC_REAL_10_INFINITY)
 
20871
       if (unlikely (last2 == -GFC_REAL_10_INFINITY))
 
20872
Index: libgfortran/generated/iall_i16.c
 
20873
===================================================================
 
20874
--- a/src/libgfortran/generated/iall_i16.c      (.../tags/gcc_4_8_3_release)
 
20875
+++ b/src/libgfortran/generated/iall_i16.c      (.../branches/gcc-4_8-branch)
 
20876
@@ -97,10 +97,9 @@
 
20877
       retarray->offset = 0;
 
20878
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20879
 
 
20880
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20881
-                  * extent[rank-1];
 
20882
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20883
 
 
20884
-      retarray->base_addr = xmalloc (alloc_size);
 
20885
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20886
       if (alloc_size == 0)
 
20887
        {
 
20888
          /* Make sure we have a zero-sized array.  */
 
20889
@@ -272,8 +271,7 @@
 
20890
 
 
20891
        }
 
20892
 
 
20893
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20894
-                  * extent[rank-1];
 
20895
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20896
 
 
20897
       retarray->offset = 0;
 
20898
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20899
@@ -285,7 +283,7 @@
 
20900
          return;
 
20901
        }
 
20902
       else
 
20903
-       retarray->base_addr = xmalloc (alloc_size);
 
20904
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20905
 
 
20906
     }
 
20907
   else
 
20908
@@ -430,8 +428,7 @@
 
20909
       retarray->offset = 0;
 
20910
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20911
 
 
20912
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20913
-                  * extent[rank-1];
 
20914
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20915
 
 
20916
       if (alloc_size == 0)
 
20917
        {
 
20918
@@ -440,7 +437,7 @@
 
20919
          return;
 
20920
        }
 
20921
       else
 
20922
-       retarray->base_addr = xmalloc (alloc_size);
 
20923
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20924
     }
 
20925
   else
 
20926
     {
 
20927
Index: libgfortran/generated/maxloc1_16_i1.c
 
20928
===================================================================
 
20929
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
20930
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
20931
@@ -98,10 +98,9 @@
 
20932
       retarray->offset = 0;
 
20933
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20934
 
 
20935
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20936
-                  * extent[rank-1];
 
20937
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20938
 
 
20939
-      retarray->base_addr = xmalloc (alloc_size);
 
20940
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20941
       if (alloc_size == 0)
 
20942
        {
 
20943
          /* Make sure we have a zero-sized array.  */
 
20944
@@ -294,8 +293,7 @@
 
20945
 
 
20946
        }
 
20947
 
 
20948
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20949
-                  * extent[rank-1];
 
20950
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20951
 
 
20952
       retarray->offset = 0;
 
20953
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20954
@@ -307,7 +305,7 @@
 
20955
          return;
 
20956
        }
 
20957
       else
 
20958
-       retarray->base_addr = xmalloc (alloc_size);
 
20959
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20960
 
 
20961
     }
 
20962
   else
 
20963
@@ -485,8 +483,7 @@
 
20964
       retarray->offset = 0;
 
20965
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20966
 
 
20967
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20968
-                  * extent[rank-1];
 
20969
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20970
 
 
20971
       if (alloc_size == 0)
 
20972
        {
 
20973
@@ -495,7 +492,7 @@
 
20974
          return;
 
20975
        }
 
20976
       else
 
20977
-       retarray->base_addr = xmalloc (alloc_size);
 
20978
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20979
     }
 
20980
   else
 
20981
     {
 
20982
Index: libgfortran/generated/reshape_i16.c
 
20983
===================================================================
 
20984
--- a/src/libgfortran/generated/reshape_i16.c   (.../tags/gcc_4_8_3_release)
 
20985
+++ b/src/libgfortran/generated/reshape_i16.c   (.../branches/gcc-4_8-branch)
 
20986
@@ -111,11 +111,11 @@
 
20987
       ret->offset = 0;
 
20988
 
 
20989
       if (unlikely (rs < 1))
 
20990
-        alloc_size = 1;
 
20991
+        alloc_size = 0;
 
20992
       else
 
20993
-        alloc_size = rs * sizeof (GFC_INTEGER_16);
 
20994
+        alloc_size = rs;
 
20995
 
 
20996
-      ret->base_addr = xmalloc (alloc_size);
 
20997
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20998
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
20999
     }
 
21000
 
 
21001
Index: libgfortran/generated/count_16_l.c
 
21002
===================================================================
 
21003
--- a/src/libgfortran/generated/count_16_l.c    (.../tags/gcc_4_8_3_release)
 
21004
+++ b/src/libgfortran/generated/count_16_l.c    (.../branches/gcc-4_8-branch)
 
21005
@@ -101,8 +101,7 @@
 
21006
       retarray->offset = 0;
 
21007
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21008
 
 
21009
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21010
-                  * extent[rank-1];
 
21011
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21012
 
 
21013
       if (alloc_size == 0)
 
21014
        {
 
21015
@@ -111,7 +110,7 @@
 
21016
          return;
 
21017
        }
 
21018
       else
 
21019
-       retarray->base_addr = xmalloc (alloc_size);
 
21020
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21021
     }
 
21022
   else
 
21023
     {
 
21024
Index: libgfortran/generated/minloc1_8_i1.c
 
21025
===================================================================
 
21026
--- a/src/libgfortran/generated/minloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
21027
+++ b/src/libgfortran/generated/minloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
21028
@@ -98,10 +98,9 @@
 
21029
       retarray->offset = 0;
 
21030
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21031
 
 
21032
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21033
-                  * extent[rank-1];
 
21034
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21035
 
 
21036
-      retarray->base_addr = xmalloc (alloc_size);
 
21037
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21038
       if (alloc_size == 0)
 
21039
        {
 
21040
          /* Make sure we have a zero-sized array.  */
 
21041
@@ -294,8 +293,7 @@
 
21042
 
 
21043
        }
 
21044
 
 
21045
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21046
-                  * extent[rank-1];
 
21047
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21048
 
 
21049
       retarray->offset = 0;
 
21050
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21051
@@ -307,7 +305,7 @@
 
21052
          return;
 
21053
        }
 
21054
       else
 
21055
-       retarray->base_addr = xmalloc (alloc_size);
 
21056
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21057
 
 
21058
     }
 
21059
   else
 
21060
@@ -485,8 +483,7 @@
 
21061
       retarray->offset = 0;
 
21062
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21063
 
 
21064
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21065
-                  * extent[rank-1];
 
21066
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21067
 
 
21068
       if (alloc_size == 0)
 
21069
        {
 
21070
@@ -495,7 +492,7 @@
 
21071
          return;
 
21072
        }
 
21073
       else
 
21074
-       retarray->base_addr = xmalloc (alloc_size);
 
21075
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21076
     }
 
21077
   else
 
21078
     {
 
21079
Index: libgfortran/generated/maxloc1_4_i4.c
 
21080
===================================================================
 
21081
--- a/src/libgfortran/generated/maxloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
21082
+++ b/src/libgfortran/generated/maxloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
21083
@@ -98,10 +98,9 @@
 
21084
       retarray->offset = 0;
 
21085
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21086
 
 
21087
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21088
-                  * extent[rank-1];
 
21089
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21090
 
 
21091
-      retarray->base_addr = xmalloc (alloc_size);
 
21092
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21093
       if (alloc_size == 0)
 
21094
        {
 
21095
          /* Make sure we have a zero-sized array.  */
 
21096
@@ -294,8 +293,7 @@
 
21097
 
 
21098
        }
 
21099
 
 
21100
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21101
-                  * extent[rank-1];
 
21102
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21103
 
 
21104
       retarray->offset = 0;
 
21105
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21106
@@ -307,7 +305,7 @@
 
21107
          return;
 
21108
        }
 
21109
       else
 
21110
-       retarray->base_addr = xmalloc (alloc_size);
 
21111
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21112
 
 
21113
     }
 
21114
   else
 
21115
@@ -485,8 +483,7 @@
 
21116
       retarray->offset = 0;
 
21117
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21118
 
 
21119
-      alloc_size = sizeof (GFC_INTEGER_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
       if (alloc_size == 0)
 
21124
        {
 
21125
@@ -495,7 +492,7 @@
 
21126
          return;
 
21127
        }
 
21128
       else
 
21129
-       retarray->base_addr = xmalloc (alloc_size);
 
21130
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21131
     }
 
21132
   else
 
21133
     {
 
21134
Index: libgfortran/generated/maxval_i8.c
 
21135
===================================================================
 
21136
--- a/src/libgfortran/generated/maxval_i8.c     (.../tags/gcc_4_8_3_release)
 
21137
+++ b/src/libgfortran/generated/maxval_i8.c     (.../branches/gcc-4_8-branch)
 
21138
@@ -97,10 +97,9 @@
 
21139
       retarray->offset = 0;
 
21140
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21141
 
 
21142
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21143
-                  * extent[rank-1];
 
21144
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21145
 
 
21146
-      retarray->base_addr = xmalloc (alloc_size);
 
21147
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21148
       if (alloc_size == 0)
 
21149
        {
 
21150
          /* Make sure we have a zero-sized array.  */
 
21151
@@ -286,8 +285,7 @@
 
21152
 
 
21153
        }
 
21154
 
 
21155
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21156
-                  * extent[rank-1];
 
21157
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21158
 
 
21159
       retarray->offset = 0;
 
21160
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21161
@@ -299,7 +297,7 @@
 
21162
          return;
 
21163
        }
 
21164
       else
 
21165
-       retarray->base_addr = xmalloc (alloc_size);
 
21166
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21167
 
 
21168
     }
 
21169
   else
 
21170
@@ -472,8 +470,7 @@
 
21171
       retarray->offset = 0;
 
21172
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21173
 
 
21174
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21175
-                  * extent[rank-1];
 
21176
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21177
 
 
21178
       if (alloc_size == 0)
 
21179
        {
 
21180
@@ -482,7 +479,7 @@
 
21181
          return;
 
21182
        }
 
21183
       else
 
21184
-       retarray->base_addr = xmalloc (alloc_size);
 
21185
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21186
     }
 
21187
   else
 
21188
     {
 
21189
Index: libgfortran/generated/eoshift3_16.c
 
21190
===================================================================
 
21191
--- a/src/libgfortran/generated/eoshift3_16.c   (.../tags/gcc_4_8_3_release)
 
21192
+++ b/src/libgfortran/generated/eoshift3_16.c   (.../branches/gcc-4_8-branch)
 
21193
@@ -89,7 +89,7 @@
 
21194
     {
 
21195
       int i;
 
21196
 
 
21197
-      ret->base_addr = xmalloc (size * arraysize);
 
21198
+      ret->base_addr = xmallocarray (arraysize, size);
 
21199
       ret->offset = 0;
 
21200
       ret->dtype = array->dtype;
 
21201
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
21202
@@ -107,8 +107,8 @@
 
21203
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
21204
 
 
21205
         }
 
21206
-      /* xmalloc allocates a single byte for zero size.  */
 
21207
-      ret->base_addr = xmalloc (size * arraysize);
 
21208
+      /* xmallocarray allocates a single byte for zero size.  */
 
21209
+      ret->base_addr = xmallocarray (arraysize, size);
 
21210
 
 
21211
     }
 
21212
   else if (unlikely (compile_options.bounds_check))
 
21213
Index: libgfortran/generated/shape_i8.c
 
21214
===================================================================
 
21215
--- a/src/libgfortran/generated/shape_i8.c      (.../tags/gcc_4_8_3_release)
 
21216
+++ b/src/libgfortran/generated/shape_i8.c      (.../branches/gcc-4_8-branch)
 
21217
@@ -49,7 +49,7 @@
 
21218
     {
 
21219
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
21220
       ret->offset = 0;
 
21221
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21222
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21223
     }
 
21224
 
 
21225
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
21226
Index: libgfortran/generated/maxloc0_4_i16.c
 
21227
===================================================================
 
21228
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
21229
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
21230
@@ -58,7 +58,7 @@
 
21231
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21232
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21233
       retarray->offset = 0;
 
21234
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21235
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21236
     }
 
21237
   else
 
21238
     {
 
21239
@@ -199,7 +199,7 @@
 
21240
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21241
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21242
       retarray->offset = 0;
 
21243
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21244
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21245
     }
 
21246
   else
 
21247
     {
 
21248
@@ -367,7 +367,7 @@
 
21249
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21250
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21251
       retarray->offset = 0;
 
21252
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21253
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21254
     }
 
21255
   else if (unlikely (compile_options.bounds_check))
 
21256
     {
 
21257
Index: libgfortran/generated/maxloc1_4_r10.c
 
21258
===================================================================
 
21259
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
21260
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
21261
@@ -98,10 +98,9 @@
 
21262
       retarray->offset = 0;
 
21263
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21264
 
 
21265
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21266
-                  * extent[rank-1];
 
21267
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21268
 
 
21269
-      retarray->base_addr = xmalloc (alloc_size);
 
21270
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21271
       if (alloc_size == 0)
 
21272
        {
 
21273
          /* Make sure we have a zero-sized array.  */
 
21274
@@ -294,8 +293,7 @@
 
21275
 
 
21276
        }
 
21277
 
 
21278
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21279
-                  * extent[rank-1];
 
21280
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21281
 
 
21282
       retarray->offset = 0;
 
21283
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21284
@@ -307,7 +305,7 @@
 
21285
          return;
 
21286
        }
 
21287
       else
 
21288
-       retarray->base_addr = xmalloc (alloc_size);
 
21289
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21290
 
 
21291
     }
 
21292
   else
 
21293
@@ -485,8 +483,7 @@
 
21294
       retarray->offset = 0;
 
21295
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21296
 
 
21297
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21298
-                  * extent[rank-1];
 
21299
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21300
 
 
21301
       if (alloc_size == 0)
 
21302
        {
 
21303
@@ -495,7 +492,7 @@
 
21304
          return;
 
21305
        }
 
21306
       else
 
21307
-       retarray->base_addr = xmalloc (alloc_size);
 
21308
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21309
     }
 
21310
   else
 
21311
     {
 
21312
Index: libgfortran/generated/maxloc1_8_i16.c
 
21313
===================================================================
 
21314
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
21315
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
21316
@@ -98,10 +98,9 @@
 
21317
       retarray->offset = 0;
 
21318
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21319
 
 
21320
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21321
-                  * extent[rank-1];
 
21322
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21323
 
 
21324
-      retarray->base_addr = xmalloc (alloc_size);
 
21325
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21326
       if (alloc_size == 0)
 
21327
        {
 
21328
          /* Make sure we have a zero-sized array.  */
 
21329
@@ -294,8 +293,7 @@
 
21330
 
 
21331
        }
 
21332
 
 
21333
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21334
-                  * extent[rank-1];
 
21335
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21336
 
 
21337
       retarray->offset = 0;
 
21338
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21339
@@ -307,7 +305,7 @@
 
21340
          return;
 
21341
        }
 
21342
       else
 
21343
-       retarray->base_addr = xmalloc (alloc_size);
 
21344
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21345
 
 
21346
     }
 
21347
   else
 
21348
@@ -485,8 +483,7 @@
 
21349
       retarray->offset = 0;
 
21350
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21351
 
 
21352
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21353
-                  * extent[rank-1];
 
21354
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21355
 
 
21356
       if (alloc_size == 0)
 
21357
        {
 
21358
@@ -495,7 +492,7 @@
 
21359
          return;
 
21360
        }
 
21361
       else
 
21362
-       retarray->base_addr = xmalloc (alloc_size);
 
21363
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21364
     }
 
21365
   else
 
21366
     {
 
21367
Index: libgfortran/generated/minloc0_8_r10.c
 
21368
===================================================================
 
21369
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
21370
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
21371
@@ -58,7 +58,7 @@
 
21372
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21373
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21374
       retarray->offset = 0;
 
21375
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21376
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21377
     }
 
21378
   else
 
21379
     {
 
21380
@@ -199,7 +199,7 @@
 
21381
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21382
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21383
       retarray->offset = 0;
 
21384
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21385
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21386
     }
 
21387
   else
 
21388
     {
 
21389
@@ -367,7 +367,7 @@
 
21390
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21391
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21392
       retarray->offset = 0;
 
21393
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21394
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21395
     }
 
21396
   else if (unlikely (compile_options.bounds_check))
 
21397
     {
 
21398
Index: libgfortran/generated/iparity_i2.c
 
21399
===================================================================
 
21400
--- a/src/libgfortran/generated/iparity_i2.c    (.../tags/gcc_4_8_3_release)
 
21401
+++ b/src/libgfortran/generated/iparity_i2.c    (.../branches/gcc-4_8-branch)
 
21402
@@ -97,10 +97,9 @@
 
21403
       retarray->offset = 0;
 
21404
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21405
 
 
21406
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21407
-                  * extent[rank-1];
 
21408
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21409
 
 
21410
-      retarray->base_addr = xmalloc (alloc_size);
 
21411
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21412
       if (alloc_size == 0)
 
21413
        {
 
21414
          /* Make sure we have a zero-sized array.  */
 
21415
@@ -272,8 +271,7 @@
 
21416
 
 
21417
        }
 
21418
 
 
21419
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21420
-                  * extent[rank-1];
 
21421
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21422
 
 
21423
       retarray->offset = 0;
 
21424
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21425
@@ -285,7 +283,7 @@
 
21426
          return;
 
21427
        }
 
21428
       else
 
21429
-       retarray->base_addr = xmalloc (alloc_size);
 
21430
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21431
 
 
21432
     }
 
21433
   else
 
21434
@@ -430,8 +428,7 @@
 
21435
       retarray->offset = 0;
 
21436
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21437
 
 
21438
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21439
-                  * extent[rank-1];
 
21440
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21441
 
 
21442
       if (alloc_size == 0)
 
21443
        {
 
21444
@@ -440,7 +437,7 @@
 
21445
          return;
 
21446
        }
 
21447
       else
 
21448
-       retarray->base_addr = xmalloc (alloc_size);
 
21449
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21450
     }
 
21451
   else
 
21452
     {
 
21453
Index: libgfortran/generated/maxloc1_16_r4.c
 
21454
===================================================================
 
21455
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
21456
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
21457
@@ -98,10 +98,9 @@
 
21458
       retarray->offset = 0;
 
21459
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21460
 
 
21461
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21462
-                  * extent[rank-1];
 
21463
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21464
 
 
21465
-      retarray->base_addr = xmalloc (alloc_size);
 
21466
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21467
       if (alloc_size == 0)
 
21468
        {
 
21469
          /* Make sure we have a zero-sized array.  */
 
21470
@@ -294,8 +293,7 @@
 
21471
 
 
21472
        }
 
21473
 
 
21474
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21475
-                  * extent[rank-1];
 
21476
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21477
 
 
21478
       retarray->offset = 0;
 
21479
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21480
@@ -307,7 +305,7 @@
 
21481
          return;
 
21482
        }
 
21483
       else
 
21484
-       retarray->base_addr = xmalloc (alloc_size);
 
21485
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21486
 
 
21487
     }
 
21488
   else
 
21489
@@ -485,8 +483,7 @@
 
21490
       retarray->offset = 0;
 
21491
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21492
 
 
21493
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21494
-                  * extent[rank-1];
 
21495
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21496
 
 
21497
       if (alloc_size == 0)
 
21498
        {
 
21499
@@ -495,7 +492,7 @@
 
21500
          return;
 
21501
        }
 
21502
       else
 
21503
-       retarray->base_addr = xmalloc (alloc_size);
 
21504
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21505
     }
 
21506
   else
 
21507
     {
 
21508
Index: libgfortran/generated/maxloc0_16_r8.c
 
21509
===================================================================
 
21510
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
21511
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
21512
@@ -58,7 +58,7 @@
 
21513
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21514
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21515
       retarray->offset = 0;
 
21516
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21517
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21518
     }
 
21519
   else
 
21520
     {
 
21521
@@ -199,7 +199,7 @@
 
21522
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21523
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21524
       retarray->offset = 0;
 
21525
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21526
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21527
     }
 
21528
   else
 
21529
     {
 
21530
@@ -367,7 +367,7 @@
 
21531
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21532
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21533
       retarray->offset = 0;
 
21534
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21535
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21536
     }
 
21537
   else if (unlikely (compile_options.bounds_check))
 
21538
     {
 
21539
Index: libgfortran/generated/sum_i16.c
 
21540
===================================================================
 
21541
--- a/src/libgfortran/generated/sum_i16.c       (.../tags/gcc_4_8_3_release)
 
21542
+++ b/src/libgfortran/generated/sum_i16.c       (.../branches/gcc-4_8-branch)
 
21543
@@ -97,10 +97,9 @@
 
21544
       retarray->offset = 0;
 
21545
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21546
 
 
21547
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21548
-                  * extent[rank-1];
 
21549
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21550
 
 
21551
-      retarray->base_addr = xmalloc (alloc_size);
 
21552
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21553
       if (alloc_size == 0)
 
21554
        {
 
21555
          /* Make sure we have a zero-sized array.  */
 
21556
@@ -272,8 +271,7 @@
 
21557
 
 
21558
        }
 
21559
 
 
21560
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21561
-                  * extent[rank-1];
 
21562
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21563
 
 
21564
       retarray->offset = 0;
 
21565
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21566
@@ -285,7 +283,7 @@
 
21567
          return;
 
21568
        }
 
21569
       else
 
21570
-       retarray->base_addr = xmalloc (alloc_size);
 
21571
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21572
 
 
21573
     }
 
21574
   else
 
21575
@@ -430,8 +428,7 @@
 
21576
       retarray->offset = 0;
 
21577
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21578
 
 
21579
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21580
-                  * extent[rank-1];
 
21581
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21582
 
 
21583
       if (alloc_size == 0)
 
21584
        {
 
21585
@@ -440,7 +437,7 @@
 
21586
          return;
 
21587
        }
 
21588
       else
 
21589
-       retarray->base_addr = xmalloc (alloc_size);
 
21590
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21591
     }
 
21592
   else
 
21593
     {
 
21594
Index: libgfortran/generated/maxloc0_4_i8.c
 
21595
===================================================================
 
21596
--- a/src/libgfortran/generated/maxloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
21597
+++ b/src/libgfortran/generated/maxloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
21598
@@ -58,7 +58,7 @@
 
21599
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21600
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21601
       retarray->offset = 0;
 
21602
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21603
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21604
     }
 
21605
   else
 
21606
     {
 
21607
@@ -199,7 +199,7 @@
 
21608
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21609
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21610
       retarray->offset = 0;
 
21611
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21612
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21613
     }
 
21614
   else
 
21615
     {
 
21616
@@ -367,7 +367,7 @@
 
21617
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21618
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21619
       retarray->offset = 0;
 
21620
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21621
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21622
     }
 
21623
   else if (unlikely (compile_options.bounds_check))
 
21624
     {
 
21625
Index: libgfortran/generated/pack_c16.c
 
21626
===================================================================
 
21627
--- a/src/libgfortran/generated/pack_c16.c      (.../tags/gcc_4_8_3_release)
 
21628
+++ b/src/libgfortran/generated/pack_c16.c      (.../branches/gcc-4_8-branch)
 
21629
@@ -167,8 +167,8 @@
 
21630
 
 
21631
          ret->offset = 0;
 
21632
 
 
21633
-         /* xmalloc allocates a single byte for zero size.  */
 
21634
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
 
21635
+         /* xmallocarray allocates a single byte for zero size.  */
 
21636
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
 
21637
 
 
21638
          if (total == 0)
 
21639
            return;
 
21640
Index: libgfortran/generated/maxloc1_16_i16.c
 
21641
===================================================================
 
21642
--- a/src/libgfortran/generated/maxloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
21643
+++ b/src/libgfortran/generated/maxloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
21644
@@ -98,10 +98,9 @@
 
21645
       retarray->offset = 0;
 
21646
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21647
 
 
21648
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21649
-                  * extent[rank-1];
 
21650
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21651
 
 
21652
-      retarray->base_addr = xmalloc (alloc_size);
 
21653
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21654
       if (alloc_size == 0)
 
21655
        {
 
21656
          /* Make sure we have a zero-sized array.  */
 
21657
@@ -294,8 +293,7 @@
 
21658
 
 
21659
        }
 
21660
 
 
21661
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21662
-                  * extent[rank-1];
 
21663
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21664
 
 
21665
       retarray->offset = 0;
 
21666
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21667
@@ -307,7 +305,7 @@
 
21668
          return;
 
21669
        }
 
21670
       else
 
21671
-       retarray->base_addr = xmalloc (alloc_size);
 
21672
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21673
 
 
21674
     }
 
21675
   else
 
21676
@@ -485,8 +483,7 @@
 
21677
       retarray->offset = 0;
 
21678
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21679
 
 
21680
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21681
-                  * extent[rank-1];
 
21682
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21683
 
 
21684
       if (alloc_size == 0)
 
21685
        {
 
21686
@@ -495,7 +492,7 @@
 
21687
          return;
 
21688
        }
 
21689
       else
 
21690
-       retarray->base_addr = xmalloc (alloc_size);
 
21691
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21692
     }
 
21693
   else
 
21694
     {
 
21695
Index: libgfortran/generated/minloc1_8_r4.c
 
21696
===================================================================
 
21697
--- a/src/libgfortran/generated/minloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
21698
+++ b/src/libgfortran/generated/minloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
21699
@@ -98,10 +98,9 @@
 
21700
       retarray->offset = 0;
 
21701
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21702
 
 
21703
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21704
-                  * extent[rank-1];
 
21705
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21706
 
 
21707
-      retarray->base_addr = xmalloc (alloc_size);
 
21708
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21709
       if (alloc_size == 0)
 
21710
        {
 
21711
          /* Make sure we have a zero-sized array.  */
 
21712
@@ -294,8 +293,7 @@
 
21713
 
 
21714
        }
 
21715
 
 
21716
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21717
-                  * extent[rank-1];
 
21718
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21719
 
 
21720
       retarray->offset = 0;
 
21721
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21722
@@ -307,7 +305,7 @@
 
21723
          return;
 
21724
        }
 
21725
       else
 
21726
-       retarray->base_addr = xmalloc (alloc_size);
 
21727
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21728
 
 
21729
     }
 
21730
   else
 
21731
@@ -485,8 +483,7 @@
 
21732
       retarray->offset = 0;
 
21733
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21734
 
 
21735
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21736
-                  * extent[rank-1];
 
21737
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21738
 
 
21739
       if (alloc_size == 0)
 
21740
        {
 
21741
@@ -495,7 +492,7 @@
 
21742
          return;
 
21743
        }
 
21744
       else
 
21745
-       retarray->base_addr = xmalloc (alloc_size);
 
21746
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21747
     }
 
21748
   else
 
21749
     {
 
21750
Index: libgfortran/generated/sum_c8.c
 
21751
===================================================================
 
21752
--- a/src/libgfortran/generated/sum_c8.c        (.../tags/gcc_4_8_3_release)
 
21753
+++ b/src/libgfortran/generated/sum_c8.c        (.../branches/gcc-4_8-branch)
 
21754
@@ -97,10 +97,9 @@
 
21755
       retarray->offset = 0;
 
21756
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21757
 
 
21758
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21759
-                  * extent[rank-1];
 
21760
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21761
 
 
21762
-      retarray->base_addr = xmalloc (alloc_size);
 
21763
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
21764
       if (alloc_size == 0)
 
21765
        {
 
21766
          /* Make sure we have a zero-sized array.  */
 
21767
@@ -272,8 +271,7 @@
 
21768
 
 
21769
        }
 
21770
 
 
21771
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21772
-                  * extent[rank-1];
 
21773
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21774
 
 
21775
       retarray->offset = 0;
 
21776
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21777
@@ -285,7 +283,7 @@
 
21778
          return;
 
21779
        }
 
21780
       else
 
21781
-       retarray->base_addr = xmalloc (alloc_size);
 
21782
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
21783
 
 
21784
     }
 
21785
   else
 
21786
@@ -430,8 +428,7 @@
 
21787
       retarray->offset = 0;
 
21788
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21789
 
 
21790
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21791
-                  * extent[rank-1];
 
21792
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21793
 
 
21794
       if (alloc_size == 0)
 
21795
        {
 
21796
@@ -440,7 +437,7 @@
 
21797
          return;
 
21798
        }
 
21799
       else
 
21800
-       retarray->base_addr = xmalloc (alloc_size);
 
21801
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
21802
     }
 
21803
   else
 
21804
     {
 
21805
Index: libgfortran/generated/maxloc1_16_i2.c
 
21806
===================================================================
 
21807
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
21808
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
21809
@@ -98,10 +98,9 @@
 
21810
       retarray->offset = 0;
 
21811
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21812
 
 
21813
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21814
-                  * extent[rank-1];
 
21815
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21816
 
 
21817
-      retarray->base_addr = xmalloc (alloc_size);
 
21818
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21819
       if (alloc_size == 0)
 
21820
        {
 
21821
          /* Make sure we have a zero-sized array.  */
 
21822
@@ -294,8 +293,7 @@
 
21823
 
 
21824
        }
 
21825
 
 
21826
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21827
-                  * extent[rank-1];
 
21828
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21829
 
 
21830
       retarray->offset = 0;
 
21831
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21832
@@ -307,7 +305,7 @@
 
21833
          return;
 
21834
        }
 
21835
       else
 
21836
-       retarray->base_addr = xmalloc (alloc_size);
 
21837
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21838
 
 
21839
     }
 
21840
   else
 
21841
@@ -485,8 +483,7 @@
 
21842
       retarray->offset = 0;
 
21843
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21844
 
 
21845
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21846
-                  * extent[rank-1];
 
21847
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21848
 
 
21849
       if (alloc_size == 0)
 
21850
        {
 
21851
@@ -495,7 +492,7 @@
 
21852
          return;
 
21853
        }
 
21854
       else
 
21855
-       retarray->base_addr = xmalloc (alloc_size);
 
21856
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21857
     }
 
21858
   else
 
21859
     {
 
21860
Index: libgfortran/generated/parity_l1.c
 
21861
===================================================================
 
21862
--- a/src/libgfortran/generated/parity_l1.c     (.../tags/gcc_4_8_3_release)
 
21863
+++ b/src/libgfortran/generated/parity_l1.c     (.../branches/gcc-4_8-branch)
 
21864
@@ -98,10 +98,9 @@
 
21865
       retarray->offset = 0;
 
21866
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21867
 
 
21868
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21869
-                  * extent[rank-1];
 
21870
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21871
 
 
21872
-      retarray->base_addr = xmalloc (alloc_size);
 
21873
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
21874
       if (alloc_size == 0)
 
21875
        {
 
21876
          /* Make sure we have a zero-sized array.  */
 
21877
Index: libgfortran/generated/maxval_i16.c
 
21878
===================================================================
 
21879
--- a/src/libgfortran/generated/maxval_i16.c    (.../tags/gcc_4_8_3_release)
 
21880
+++ b/src/libgfortran/generated/maxval_i16.c    (.../branches/gcc-4_8-branch)
 
21881
@@ -97,10 +97,9 @@
 
21882
       retarray->offset = 0;
 
21883
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21884
 
 
21885
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21886
-                  * extent[rank-1];
 
21887
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21888
 
 
21889
-      retarray->base_addr = xmalloc (alloc_size);
 
21890
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21891
       if (alloc_size == 0)
 
21892
        {
 
21893
          /* Make sure we have a zero-sized array.  */
 
21894
@@ -286,8 +285,7 @@
 
21895
 
 
21896
        }
 
21897
 
 
21898
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21899
-                  * extent[rank-1];
 
21900
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21901
 
 
21902
       retarray->offset = 0;
 
21903
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21904
@@ -299,7 +297,7 @@
 
21905
          return;
 
21906
        }
 
21907
       else
 
21908
-       retarray->base_addr = xmalloc (alloc_size);
 
21909
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21910
 
 
21911
     }
 
21912
   else
 
21913
@@ -472,8 +470,7 @@
 
21914
       retarray->offset = 0;
 
21915
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21916
 
 
21917
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21918
-                  * extent[rank-1];
 
21919
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21920
 
 
21921
       if (alloc_size == 0)
 
21922
        {
 
21923
@@ -482,7 +479,7 @@
 
21924
          return;
 
21925
        }
 
21926
       else
 
21927
-       retarray->base_addr = xmalloc (alloc_size);
 
21928
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21929
     }
 
21930
   else
 
21931
     {
 
21932
Index: libgfortran/generated/spread_c8.c
 
21933
===================================================================
 
21934
--- a/src/libgfortran/generated/spread_c8.c     (.../tags/gcc_4_8_3_release)
 
21935
+++ b/src/libgfortran/generated/spread_c8.c     (.../branches/gcc-4_8-branch)
 
21936
@@ -101,8 +101,8 @@
 
21937
        }
 
21938
       ret->offset = 0;
 
21939
 
 
21940
-      /* xmalloc allocates a single byte for zero size.  */
 
21941
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
 
21942
+      /* xmallocarray allocates a single byte for zero size.  */
 
21943
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
 
21944
       if (rs <= 0)
 
21945
         return;
 
21946
     }
 
21947
@@ -244,7 +244,7 @@
 
21948
 
 
21949
   if (ret->base_addr == NULL)
 
21950
     {
 
21951
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
 
21952
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
 
21953
       ret->offset = 0;
 
21954
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
21955
     }
 
21956
Index: libgfortran/generated/matmul_i16.c
 
21957
===================================================================
 
21958
--- a/src/libgfortran/generated/matmul_i16.c    (.../tags/gcc_4_8_3_release)
 
21959
+++ b/src/libgfortran/generated/matmul_i16.c    (.../branches/gcc-4_8-branch)
 
21960
@@ -124,7 +124,7 @@
 
21961
         }
 
21962
 
 
21963
       retarray->base_addr
 
21964
-       = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
 
21965
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
 
21966
       retarray->offset = 0;
 
21967
     }
 
21968
     else if (unlikely (compile_options.bounds_check))
 
21969
Index: libgfortran/generated/pack_i8.c
 
21970
===================================================================
 
21971
--- a/src/libgfortran/generated/pack_i8.c       (.../tags/gcc_4_8_3_release)
 
21972
+++ b/src/libgfortran/generated/pack_i8.c       (.../branches/gcc-4_8-branch)
 
21973
@@ -167,8 +167,8 @@
 
21974
 
 
21975
          ret->offset = 0;
 
21976
 
 
21977
-         /* xmalloc allocates a single byte for zero size.  */
 
21978
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
 
21979
+         /* xmallocarray allocates a single byte for zero size.  */
 
21980
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
 
21981
 
 
21982
          if (total == 0)
 
21983
            return;
 
21984
Index: libgfortran/generated/any_l1.c
 
21985
===================================================================
 
21986
--- a/src/libgfortran/generated/any_l1.c        (.../tags/gcc_4_8_3_release)
 
21987
+++ b/src/libgfortran/generated/any_l1.c        (.../branches/gcc-4_8-branch)
 
21988
@@ -101,8 +101,7 @@
 
21989
       retarray->offset = 0;
 
21990
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21991
 
 
21992
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21993
-                  * extent[rank-1];
 
21994
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21995
 
 
21996
       if (alloc_size == 0)
 
21997
        {
 
21998
@@ -111,7 +110,7 @@
 
21999
          return;
 
22000
        }
 
22001
       else
 
22002
-       retarray->base_addr = xmalloc (alloc_size);
 
22003
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
22004
     }
 
22005
   else
 
22006
     {
 
22007
Index: libgfortran/generated/minloc1_8_i2.c
 
22008
===================================================================
 
22009
--- a/src/libgfortran/generated/minloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
22010
+++ b/src/libgfortran/generated/minloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
22011
@@ -98,10 +98,9 @@
 
22012
       retarray->offset = 0;
 
22013
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22014
 
 
22015
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22016
-                  * extent[rank-1];
 
22017
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22018
 
 
22019
-      retarray->base_addr = xmalloc (alloc_size);
 
22020
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22021
       if (alloc_size == 0)
 
22022
        {
 
22023
          /* Make sure we have a zero-sized array.  */
 
22024
@@ -294,8 +293,7 @@
 
22025
 
 
22026
        }
 
22027
 
 
22028
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22029
-                  * extent[rank-1];
 
22030
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22031
 
 
22032
       retarray->offset = 0;
 
22033
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22034
@@ -307,7 +305,7 @@
 
22035
          return;
 
22036
        }
 
22037
       else
 
22038
-       retarray->base_addr = xmalloc (alloc_size);
 
22039
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22040
 
 
22041
     }
 
22042
   else
 
22043
@@ -485,8 +483,7 @@
 
22044
       retarray->offset = 0;
 
22045
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22046
 
 
22047
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22048
-                  * extent[rank-1];
 
22049
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22050
 
 
22051
       if (alloc_size == 0)
 
22052
        {
 
22053
@@ -495,7 +492,7 @@
 
22054
          return;
 
22055
        }
 
22056
       else
 
22057
-       retarray->base_addr = xmalloc (alloc_size);
 
22058
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22059
     }
 
22060
   else
 
22061
     {
 
22062
Index: libgfortran/generated/minloc0_8_r8.c
 
22063
===================================================================
 
22064
--- a/src/libgfortran/generated/minloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
22065
+++ b/src/libgfortran/generated/minloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
22066
@@ -58,7 +58,7 @@
 
22067
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22068
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22069
       retarray->offset = 0;
 
22070
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22071
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22072
     }
 
22073
   else
 
22074
     {
 
22075
@@ -199,7 +199,7 @@
 
22076
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22077
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22078
       retarray->offset = 0;
 
22079
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22080
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22081
     }
 
22082
   else
 
22083
     {
 
22084
@@ -367,7 +367,7 @@
 
22085
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22086
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22087
       retarray->offset = 0;
 
22088
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22089
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22090
     }
 
22091
   else if (unlikely (compile_options.bounds_check))
 
22092
     {
 
22093
Index: libgfortran/generated/matmul_l8.c
 
22094
===================================================================
 
22095
--- a/src/libgfortran/generated/matmul_l8.c     (.../tags/gcc_4_8_3_release)
 
22096
+++ b/src/libgfortran/generated/matmul_l8.c     (.../branches/gcc-4_8-branch)
 
22097
@@ -88,7 +88,7 @@
 
22098
         }
 
22099
           
 
22100
       retarray->base_addr
 
22101
-       = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
 
22102
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
 
22103
       retarray->offset = 0;
 
22104
     }
 
22105
     else if (unlikely (compile_options.bounds_check))
 
22106
Index: libgfortran/generated/product_r10.c
 
22107
===================================================================
 
22108
--- a/src/libgfortran/generated/product_r10.c   (.../tags/gcc_4_8_3_release)
 
22109
+++ b/src/libgfortran/generated/product_r10.c   (.../branches/gcc-4_8-branch)
 
22110
@@ -97,10 +97,9 @@
 
22111
       retarray->offset = 0;
 
22112
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22113
 
 
22114
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22115
-                  * extent[rank-1];
 
22116
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22117
 
 
22118
-      retarray->base_addr = xmalloc (alloc_size);
 
22119
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22120
       if (alloc_size == 0)
 
22121
        {
 
22122
          /* Make sure we have a zero-sized array.  */
 
22123
@@ -272,8 +271,7 @@
 
22124
 
 
22125
        }
 
22126
 
 
22127
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22128
-                  * extent[rank-1];
 
22129
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22130
 
 
22131
       retarray->offset = 0;
 
22132
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22133
@@ -285,7 +283,7 @@
 
22134
          return;
 
22135
        }
 
22136
       else
 
22137
-       retarray->base_addr = xmalloc (alloc_size);
 
22138
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22139
 
 
22140
     }
 
22141
   else
 
22142
@@ -430,8 +428,7 @@
 
22143
       retarray->offset = 0;
 
22144
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22145
 
 
22146
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22147
-                  * extent[rank-1];
 
22148
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22149
 
 
22150
       if (alloc_size == 0)
 
22151
        {
 
22152
@@ -440,7 +437,7 @@
 
22153
          return;
 
22154
        }
 
22155
       else
 
22156
-       retarray->base_addr = xmalloc (alloc_size);
 
22157
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
22158
     }
 
22159
   else
 
22160
     {
 
22161
Index: libgfortran/generated/product_i1.c
 
22162
===================================================================
 
22163
--- a/src/libgfortran/generated/product_i1.c    (.../tags/gcc_4_8_3_release)
 
22164
+++ b/src/libgfortran/generated/product_i1.c    (.../branches/gcc-4_8-branch)
 
22165
@@ -97,10 +97,9 @@
 
22166
       retarray->offset = 0;
 
22167
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22168
 
 
22169
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22170
-                  * extent[rank-1];
 
22171
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22172
 
 
22173
-      retarray->base_addr = xmalloc (alloc_size);
 
22174
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22175
       if (alloc_size == 0)
 
22176
        {
 
22177
          /* Make sure we have a zero-sized array.  */
 
22178
@@ -272,8 +271,7 @@
 
22179
 
 
22180
        }
 
22181
 
 
22182
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22183
-                  * extent[rank-1];
 
22184
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22185
 
 
22186
       retarray->offset = 0;
 
22187
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22188
@@ -285,7 +283,7 @@
 
22189
          return;
 
22190
        }
 
22191
       else
 
22192
-       retarray->base_addr = xmalloc (alloc_size);
 
22193
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22194
 
 
22195
     }
 
22196
   else
 
22197
@@ -430,8 +428,7 @@
 
22198
       retarray->offset = 0;
 
22199
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22200
 
 
22201
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22202
-                  * extent[rank-1];
 
22203
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22204
 
 
22205
       if (alloc_size == 0)
 
22206
        {
 
22207
@@ -440,7 +437,7 @@
 
22208
          return;
 
22209
        }
 
22210
       else
 
22211
-       retarray->base_addr = xmalloc (alloc_size);
 
22212
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22213
     }
 
22214
   else
 
22215
     {
 
22216
Index: libgfortran/generated/all_l8.c
 
22217
===================================================================
 
22218
--- a/src/libgfortran/generated/all_l8.c        (.../tags/gcc_4_8_3_release)
 
22219
+++ b/src/libgfortran/generated/all_l8.c        (.../branches/gcc-4_8-branch)
 
22220
@@ -101,8 +101,7 @@
 
22221
       retarray->offset = 0;
 
22222
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22223
 
 
22224
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22225
-                  * extent[rank-1];
 
22226
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22227
 
 
22228
       if (alloc_size == 0)
 
22229
        {
 
22230
@@ -111,7 +110,7 @@
 
22231
          return;
 
22232
        }
 
22233
       else
 
22234
-       retarray->base_addr = xmalloc (alloc_size);
 
22235
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
22236
     }
 
22237
   else
 
22238
     {
 
22239
Index: libgfortran/generated/in_pack_r16.c
 
22240
===================================================================
 
22241
--- a/src/libgfortran/generated/in_pack_r16.c   (.../tags/gcc_4_8_3_release)
 
22242
+++ b/src/libgfortran/generated/in_pack_r16.c   (.../branches/gcc-4_8-branch)
 
22243
@@ -76,7 +76,7 @@
 
22244
     return source->base_addr;
 
22245
 
 
22246
   /* Allocate storage for the destination.  */
 
22247
-  destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
 
22248
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
 
22249
   dest = destptr;
 
22250
   src = source->base_addr;
 
22251
   stride0 = stride[0];
 
22252
Index: libgfortran/generated/in_pack_i1.c
 
22253
===================================================================
 
22254
--- a/src/libgfortran/generated/in_pack_i1.c    (.../tags/gcc_4_8_3_release)
 
22255
+++ b/src/libgfortran/generated/in_pack_i1.c    (.../branches/gcc-4_8-branch)
 
22256
@@ -76,7 +76,7 @@
 
22257
     return source->base_addr;
 
22258
 
 
22259
   /* Allocate storage for the destination.  */
 
22260
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
 
22261
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
 
22262
   dest = destptr;
 
22263
   src = source->base_addr;
 
22264
   stride0 = stride[0];
 
22265
Index: libgfortran/libgfortran.h
 
22266
===================================================================
 
22267
--- a/src/libgfortran/libgfortran.h     (.../tags/gcc_4_8_3_release)
 
22268
+++ b/src/libgfortran/libgfortran.h     (.../branches/gcc-4_8-branch)
 
22269
@@ -751,6 +751,9 @@
 
22270
 extern void *xmalloc (size_t) __attribute__ ((malloc));
 
22271
 internal_proto(xmalloc);
 
22272
 
 
22273
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
 
22274
+internal_proto(xmallocarray);
 
22275
+
 
22276
 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
 
22277
 internal_proto(xcalloc);
 
22278
 
 
22279
Index: libgfortran/io/list_read.c
 
22280
===================================================================
 
22281
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_8_3_release)
 
22282
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_8-branch)
 
22283
@@ -2354,7 +2354,7 @@
 
22284
 {
 
22285
   index_type len = strlen (nl->var_name) + 1;
 
22286
   int dim;
 
22287
-  char * ext_name = (char*)xmalloc (len + 1);
 
22288
+  char * ext_name = xmalloc (len + 1);
 
22289
   memcpy (ext_name, nl->var_name, len-1);
 
22290
   memcpy (ext_name + len - 1, "%", 2);
 
22291
   for (nl = nl->next; nl; nl = nl->next)
 
22292
Index: libgfortran/io/unit.c
 
22293
===================================================================
 
22294
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
 
22295
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
 
22296
@@ -455,7 +455,7 @@
 
22297
     {
 
22298
       iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
 
22299
       iunit->ls = (array_loop_spec *)
 
22300
-       xmalloc (iunit->rank * sizeof (array_loop_spec));
 
22301
+       xmallocarray (iunit->rank, sizeof (array_loop_spec));
 
22302
       dtp->internal_unit_len *=
 
22303
        init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
 
22304
 
 
22305
Index: libgfortran/io/unix.c
 
22306
===================================================================
 
22307
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
 
22308
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
 
22309
@@ -407,7 +407,9 @@
 
22310
 {
 
22311
   int retval;
 
22312
   
 
22313
-  if (s->fd != STDOUT_FILENO
 
22314
+  if (s->fd == -1)
 
22315
+    retval = -1;
 
22316
+  else if (s->fd != STDOUT_FILENO
 
22317
       && s->fd != STDERR_FILENO
 
22318
       && s->fd != STDIN_FILENO)
 
22319
     retval = close (s->fd);
 
22320
@@ -983,7 +985,15 @@
 
22321
 
 
22322
   /* Get the current length of the file. */
 
22323
 
 
22324
-  fstat (fd, &statbuf);
 
22325
+  if (fstat (fd, &statbuf) == -1)
 
22326
+    {
 
22327
+      s->st_dev = s->st_ino = -1;
 
22328
+      s->file_length = 0;
 
22329
+      if (errno == EBADF)
 
22330
+       s->fd = -1;
 
22331
+      raw_init (s);
 
22332
+      return (stream *) s;
 
22333
+    }
 
22334
 
 
22335
   s->st_dev = statbuf.st_dev;
 
22336
   s->st_ino = statbuf.st_ino;
 
22337
Index: libgfortran/io/transfer.c
 
22338
===================================================================
 
22339
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_8_3_release)
 
22340
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_8-branch)
 
22341
@@ -3776,9 +3776,9 @@
 
22342
   if (nml->var_rank > 0)
 
22343
     {
 
22344
       nml->dim = (descriptor_dimension*)
 
22345
-                  xmalloc (nml->var_rank * sizeof (descriptor_dimension));
 
22346
+       xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
 
22347
       nml->ls = (array_loop_spec*)
 
22348
-                 xmalloc (nml->var_rank * sizeof (array_loop_spec));
 
22349
+       xmallocarray (nml->var_rank, sizeof (array_loop_spec));
 
22350
     }
 
22351
   else
 
22352
     {
 
22353
Index: libgfortran/io/write.c
 
22354
===================================================================
 
22355
--- a/src/libgfortran/io/write.c        (.../tags/gcc_4_8_3_release)
 
22356
+++ b/src/libgfortran/io/write.c        (.../branches/gcc-4_8-branch)
 
22357
@@ -1863,7 +1863,7 @@
 
22358
              base_var_name_len = base ? strlen (base->var_name) : 0;
 
22359
              ext_name_len = base_name_len + base_var_name_len 
 
22360
                + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
 
22361
-             ext_name = (char*)xmalloc (ext_name_len);
 
22362
+             ext_name = xmalloc (ext_name_len);
 
22363
 
 
22364
              memcpy (ext_name, base_name, base_name_len);
 
22365
              clen = strlen (obj->var_name + base_var_name_len);
 
22366
@@ -1892,7 +1892,7 @@
 
22367
              /* Now obj_name.  */
 
22368
 
 
22369
              obj_name_len = strlen (obj->var_name) + 1;
 
22370
-             obj_name = xmalloc (obj_name_len+1);
 
22371
+             obj_name = xmalloc (obj_name_len + 1);
 
22372
              memcpy (obj_name, obj->var_name, obj_name_len-1);
 
22373
              memcpy (obj_name + obj_name_len-1, "%", 2);
 
22374
 
 
22375
Index: libada/Makefile.in
 
22376
===================================================================
 
22377
--- a/src/libada/Makefile.in    (.../tags/gcc_4_8_3_release)
 
22378
+++ b/src/libada/Makefile.in    (.../branches/gcc-4_8-branch)
 
22379
@@ -60,7 +60,7 @@
 
22380
 PICFLAG = @PICFLAG@
 
22381
 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
 
22382
 GNATLIBCFLAGS= -g -O2
 
22383
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
 
22384
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
 
22385
        -fexceptions -DIN_RTS @have_getipinfo@
 
22386
 
 
22387
 host_subdir = @host_subdir@
 
22388
Index: libada/ChangeLog
 
22389
===================================================================
 
22390
--- a/src/libada/ChangeLog      (.../tags/gcc_4_8_3_release)
 
22391
+++ b/src/libada/ChangeLog      (.../branches/gcc-4_8-branch)
 
22392
@@ -1,3 +1,7 @@
 
22393
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
22394
+
 
22395
+       * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
 
22396
+
 
22397
 2014-05-22  Release Manager
 
22398
 
 
22399
        * GCC 4.8.3 released.
 
22400
Index: libffi/src/powerpc/linux64_closure.S
 
22401
===================================================================
 
22402
--- a/src/libffi/src/powerpc/linux64_closure.S  (.../tags/gcc_4_8_3_release)
 
22403
+++ b/src/libffi/src/powerpc/linux64_closure.S  (.../branches/gcc-4_8-branch)
 
22404
@@ -381,7 +381,8 @@
 
22405
        .align 3
 
22406
 .LEFDE1:
 
22407
 
 
22408
-# if defined __ELF__ && defined __linux__
 
22409
+#endif
 
22410
+
 
22411
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
22412
        .section        .note.GNU-stack,"",@progbits
 
22413
-# endif
 
22414
 #endif
 
22415
Index: libffi/src/powerpc/linux64.S
 
22416
===================================================================
 
22417
--- a/src/libffi/src/powerpc/linux64.S  (.../tags/gcc_4_8_3_release)
 
22418
+++ b/src/libffi/src/powerpc/linux64.S  (.../branches/gcc-4_8-branch)
 
22419
@@ -254,7 +254,8 @@
 
22420
        .align 3
 
22421
 .LEFDE1:
 
22422
 
 
22423
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
22424
+#endif
 
22425
+
 
22426
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
22427
        .section        .note.GNU-stack,"",@progbits
 
22428
-# endif
 
22429
 #endif
 
22430
Index: libffi/ChangeLog
 
22431
===================================================================
 
22432
--- a/src/libffi/ChangeLog      (.../tags/gcc_4_8_3_release)
 
22433
+++ b/src/libffi/ChangeLog      (.../branches/gcc-4_8-branch)
 
22434
@@ -1,3 +1,9 @@
 
22435
+2014-09-11  Jakub Jelinek  <jakub@redhat.com>
 
22436
+
 
22437
+       * src/powerpc/linux64.S: Emit .note.GNU-stack even when
 
22438
+       POWERPC64 is not defined.
 
22439
+       * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.
 
22440
+
 
22441
 2014-05-22  Release Manager
 
22442
 
 
22443
        * GCC 4.8.3 released.
 
22444
Index: libcpp/ChangeLog
 
22445
===================================================================
 
22446
--- a/src/libcpp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
22447
+++ b/src/libcpp/ChangeLog      (.../branches/gcc-4_8-branch)
 
22448
@@ -1,3 +1,14 @@
 
22449
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
22450
+
 
22451
+       Backport from mainline r215873
 
22452
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
22453
+
 
22454
+       * lex.c (search_line_fast): Add new version to be used for Power8
 
22455
+       and later targets when Altivec is enabled.  Restrict the existing
 
22456
+       Altivec version to big-endian systems so that lvsr is not used on
 
22457
+       little endian, where it is deprecated.  Remove LE-specific code
 
22458
+       from the now-BE-only version.
 
22459
+
 
22460
 2014-05-22  Release Manager
 
22461
 
 
22462
        * GCC 4.8.3 released.
 
22463
Index: libcpp/lex.c
 
22464
===================================================================
 
22465
--- a/src/libcpp/lex.c  (.../tags/gcc_4_8_3_release)
 
22466
+++ b/src/libcpp/lex.c  (.../branches/gcc-4_8-branch)
 
22467
@@ -515,9 +515,111 @@
 
22468
   search_line_fast = impl;
 
22469
 }
 
22470
 
 
22471
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
 
22472
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
 
22473
 
 
22474
-/* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 
22475
+/* A vection of the fast scanner using AltiVec vectorized byte compares
 
22476
+   and VSX unaligned loads (when VSX is available).  This is otherwise
 
22477
+   the same as the pre-GCC 5 version.  */
 
22478
+
 
22479
+static const uchar *
 
22480
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 
22481
+{
 
22482
+  typedef __attribute__((altivec(vector))) unsigned char vc;
 
22483
+
 
22484
+  const vc repl_nl = {
 
22485
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
 
22486
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
 
22487
+  };
 
22488
+  const vc repl_cr = {
 
22489
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', 
 
22490
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
 
22491
+  };
 
22492
+  const vc repl_bs = {
 
22493
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
 
22494
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
 
22495
+  };
 
22496
+  const vc repl_qm = {
 
22497
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
22498
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
22499
+  };
 
22500
+  const vc zero = { 0 };
 
22501
+
 
22502
+  vc data, t;
 
22503
+
 
22504
+  /* Main loop processing 16 bytes at a time.  */
 
22505
+  do
 
22506
+    {
 
22507
+      vc m_nl, m_cr, m_bs, m_qm;
 
22508
+
 
22509
+      data = *((const vc *)s);
 
22510
+      s += 16;
 
22511
+
 
22512
+      m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
 
22513
+      m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
 
22514
+      m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
 
22515
+      m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
 
22516
+      t = (m_nl | m_cr) | (m_bs | m_qm);
 
22517
+
 
22518
+      /* T now contains 0xff in bytes for which we matched one of the relevant
 
22519
+        characters.  We want to exit the loop if any byte in T is non-zero.
 
22520
+        Below is the expansion of vec_any_ne(t, zero).  */
 
22521
+    }
 
22522
+  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
 
22523
+
 
22524
+  /* Restore s to to point to the 16 bytes we just processed.  */
 
22525
+  s -= 16;
 
22526
+
 
22527
+  {
 
22528
+#define N  (sizeof(vc) / sizeof(long))
 
22529
+
 
22530
+    union {
 
22531
+      vc v;
 
22532
+      /* Statically assert that N is 2 or 4.  */
 
22533
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
 
22534
+    } u;
 
22535
+    unsigned long l, i = 0;
 
22536
+
 
22537
+    u.v = t;
 
22538
+
 
22539
+    /* Find the first word of T that is non-zero.  */
 
22540
+    switch (N)
 
22541
+      {
 
22542
+      case 4:
 
22543
+       l = u.l[i++];
 
22544
+       if (l != 0)
 
22545
+         break;
 
22546
+       s += sizeof(unsigned long);
 
22547
+       l = u.l[i++];
 
22548
+       if (l != 0)
 
22549
+         break;
 
22550
+       s += sizeof(unsigned long);
 
22551
+      case 2:
 
22552
+       l = u.l[i++];
 
22553
+       if (l != 0)
 
22554
+         break;
 
22555
+       s += sizeof(unsigned long);
 
22556
+       l = u.l[i];
 
22557
+      }
 
22558
+
 
22559
+    /* L now contains 0xff in bytes for which we matched one of the
 
22560
+       relevant characters.  We can find the byte index by finding
 
22561
+       its bit index and dividing by 8.  */
 
22562
+#ifdef __BIG_ENDIAN__
 
22563
+    l = __builtin_clzl(l) >> 3;
 
22564
+#else
 
22565
+    l = __builtin_ctzl(l) >> 3;
 
22566
+#endif
 
22567
+    return s + l;
 
22568
+
 
22569
+#undef N
 
22570
+  }
 
22571
+}
 
22572
+
 
22573
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
 
22574
+
 
22575
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
 
22576
+   This cannot be used for little endian because vec_lvsl/lvsr are
 
22577
+   deprecated for little endian and the code won't work properly.  */
 
22578
 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
 
22579
    so we can't compile this function without -maltivec on the command line
 
22580
    (or implied by some other switch).  */
 
22581
@@ -559,13 +661,8 @@
 
22582
      beginning with all ones and shifting in zeros according to the
 
22583
      mis-alignment.  The LVSR instruction pulls the exact shift we
 
22584
      want from the address.  */
 
22585
-#ifdef __BIG_ENDIAN__
 
22586
   mask = __builtin_vec_lvsr(0, s);
 
22587
   mask = __builtin_vec_perm(zero, ones, mask);
 
22588
-#else
 
22589
-  mask = __builtin_vec_lvsl(0, s);
 
22590
-  mask = __builtin_vec_perm(ones, zero, mask);
 
22591
-#endif
 
22592
   data &= mask;
 
22593
 
 
22594
   /* While altivec loads mask addresses, we still need to align S so
 
22595
@@ -629,11 +726,7 @@
 
22596
     /* L now contains 0xff in bytes for which we matched one of the
 
22597
        relevant characters.  We can find the byte index by finding
 
22598
        its bit index and dividing by 8.  */
 
22599
-#ifdef __BIG_ENDIAN__
 
22600
     l = __builtin_clzl(l) >> 3;
 
22601
-#else
 
22602
-    l = __builtin_ctzl(l) >> 3;
 
22603
-#endif
 
22604
     return s + l;
 
22605
 
 
22606
 #undef N
 
22607
Index: .
 
22608
===================================================================
 
22609
--- a/src/.     (.../tags/gcc_4_8_3_release)
 
22610
+++ b/src/.     (.../branches/gcc-4_8-branch)
 
22611
 
 
22612
Property changes on: .
 
22613
___________________________________________________________________
 
22614
Modified: svn:mergeinfo
 
22615
   Merged /trunk:r211733,215049