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

« back to all changes in this revision

Viewing changes to .svn/pristine/b4/b434cd8179643bcfce302b5130f28dc64d5584a6.svn-base

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: updates from the 4.8 branch upto 20141128 (r218162).
 
2
 
 
3
last_updated()
 
4
{
 
5
        cat > ${dir}LAST_UPDATED <<EOF
 
6
Fri Nov 28 16:58:49 CET 2014
 
7
Fri Nov 28 15:58:49 UTC 2014 (revision 218162)
 
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/configure.host
 
345
===================================================================
 
346
--- a/src/libstdc++-v3/configure.host   (.../tags/gcc_4_8_3_release)
 
347
+++ b/src/libstdc++-v3/configure.host   (.../branches/gcc-4_8-branch)
 
348
@@ -219,7 +219,6 @@
 
349
     os_include_dir="os/aix"
 
350
     atomicity_dir="os/aix"
 
351
     atomic_word_dir="os/aix"
 
352
-    OPT_LDFLAGS="-Wl,-G"
 
353
     ;;
 
354
   aix4.*)
 
355
     os_include_dir="os/generic"
 
356
Index: libstdc++-v3/doc/xml/manual/containers.xml
 
357
===================================================================
 
358
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../tags/gcc_4_8_3_release)
 
359
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml    (.../branches/gcc-4_8-branch)
 
360
@@ -25,8 +25,9 @@
 
361
   <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
 
362
     
 
363
    <para>
 
364
-     Yes it is, and that's okay.  This is a decision that we preserved
 
365
-     when we imported SGI's STL implementation.  The following is
 
366
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
367
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
368
+     preserved when we imported SGI's STL implementation.  The following is
 
369
      quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
 
370
    </para>
 
371
    <blockquote>
 
372
@@ -72,26 +73,6 @@
 
373
   </section>
 
374
 </section>
 
375
 
 
376
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
 
377
-<?dbhtml filename="vector.html"?>
 
378
-  
 
379
-  <para>
 
380
-  </para>
 
381
-  <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
 
382
-    
 
383
-   <para>
 
384
-     In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
 
385
-     message to the list</link>, Daniel Kostecky announced work on an
 
386
-     alternate form of <code>std::vector</code> that would support
 
387
-     hints on the number of elements to be over-allocated.  The design
 
388
-     was also described, along with possible implementation choices.
 
389
-   </para>
 
390
-   <para>
 
391
-     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>
 
392
-     and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
 
393
-   </para>
 
394
-
 
395
-  </section></section>
 
396
 </section>
 
397
 
 
398
 <!-- Sect1 02 : Associative -->
 
399
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
 
400
===================================================================
 
401
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../tags/gcc_4_8_3_release)
 
402
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml        (.../branches/gcc-4_8-branch)
 
403
@@ -226,10 +226,12 @@
 
404
       <entry/>
 
405
     </row>
 
406
     <row>
 
407
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
408
       <entry>18.8.6</entry>
 
409
       <entry><code>nested_exception</code></entry>
 
410
-      <entry>Y</entry>
 
411
-      <entry/>
 
412
+      <entry>Partial</entry>
 
413
+      <entry>Follows an earlier C++0x draft, not the final specification.
 
414
+      </entry>
 
415
     </row>
 
416
     <row>
 
417
       <entry>18.9</entry>
 
418
@@ -612,10 +614,11 @@
 
419
       <entry/>
 
420
     </row>
 
421
     <row>
 
422
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
423
       <entry>20.6.12.4</entry>
 
424
       <entry><code>uninitialized_fill_n</code></entry>
 
425
-      <entry>Y</entry>
 
426
-      <entry/>
 
427
+      <entry>Partial</entry>
 
428
+      <entry>Returns <code>void</code>.</entry>
 
429
     </row>
 
430
     <row>
 
431
       <entry>20.6.13</entry>
 
432
@@ -1119,10 +1122,13 @@
 
433
       <entry/>
 
434
     </row>
 
435
     <row>
 
436
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
437
       <entry>21.4</entry>
 
438
       <entry>Class template <code>basic_string</code></entry>
 
439
-      <entry>Y</entry>
 
440
-      <entry/>
 
441
+      <entry>Partial</entry>
 
442
+      <entry>Non-conforming Copy-On-Write implementation.
 
443
+             Missing <code>getline</code> overloads for rvalue streams.
 
444
+      </entry>
 
445
     </row>
 
446
     <row>
 
447
       <entry>21.5</entry>
 
448
@@ -1190,10 +1196,11 @@
 
449
       <entry/>
 
450
     </row>
 
451
     <row>
 
452
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
453
       <entry>22.3.3.1</entry>
 
454
       <entry>Character classification</entry>
 
455
-      <entry>Y</entry>
 
456
-      <entry/>
 
457
+      <entry>Partial</entry>
 
458
+      <entry>Missing <code>isblank</code>.</entry>
 
459
     </row>
 
460
     <row>
 
461
       <entry>22.3.3.2</entry>
 
462
@@ -1272,16 +1279,18 @@
 
463
       <entry/>
 
464
     </row>
 
465
     <row>
 
466
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
467
       <entry>22.4.5.1</entry>
 
468
       <entry>Class template <code>time_get</code></entry>
 
469
-      <entry>Y</entry>
 
470
-      <entry/>
 
471
+      <entry>Partial</entry>
 
472
+      <entry>Missing <code>get</code> and <code>do_get</code></entry>
 
473
     </row>
 
474
     <row>
 
475
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
476
       <entry>22.4.5.2</entry>
 
477
       <entry>Class template <code>time_get_byname</code></entry>
 
478
-      <entry>Y</entry>
 
479
-      <entry/>
 
480
+      <entry>Partial</entry>
 
481
+      <entry>Likewise</entry>
 
482
     </row>
 
483
     <row>
 
484
       <entry>22.4.5.3</entry>
 
485
@@ -1434,8 +1443,10 @@
 
486
       <entry>23.3.5</entry>
 
487
       <entry>Class template <code>list</code></entry>
 
488
       <entry>Partial</entry>
 
489
-      <entry><code>insert</code> and <code>erase</code> members do not
 
490
-             take <code>const_iterator</code> arguments (N2350).</entry>
 
491
+      <entry>O(N) size.
 
492
+             <code>insert</code> and <code>erase</code> members do not
 
493
+             take <code>const_iterator</code> arguments (N2350).
 
494
+      </entry>
 
495
     </row>
 
496
     <row>
 
497
       <?dbhtml bgcolor="#B0B0B0" ?>
 
498
@@ -1650,10 +1661,11 @@
 
499
       <entry/>
 
500
     </row>
 
501
     <row>
 
502
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
503
       <entry>25.3</entry>
 
504
       <entry>Mutating sequence operations</entry>
 
505
-      <entry>Y</entry>
 
506
-      <entry/>
 
507
+      <entry>Partial</entry>
 
508
+      <entry><code>rotate</code> returns <code>void</code>.</entry>
 
509
     </row>
 
510
     <row>
 
511
       <entry>25.4</entry>
 
512
@@ -2060,10 +2072,13 @@
 
513
       <entry/>
 
514
     </row>
 
515
     <row>
 
516
+      <?dbhtml bgcolor="#B0B0B0" ?>
 
517
       <entry>26.8</entry>
 
518
       <entry>C Library</entry>
 
519
-      <entry>Y</entry>
 
520
-      <entry/>
 
521
+      <entry>Partial</entry>
 
522
+      <entry><code>&lt;ctgmath&gt;</code> doesn't include
 
523
+       <code>&lt;ccomplex&gt;</code>
 
524
+      </entry>
 
525
     </row>
 
526
     <row>
 
527
       <entry>
 
528
@@ -2143,6 +2158,7 @@
 
529
         Missing move and swap operations on <code>basic_ios</code>.
 
530
         Missing <code>io_errc</code> and <code>iostream_category</code>.
 
531
         <code>ios_base::failure</code> is not derived from <code>system_error</code>.
 
532
+       Missing <code>ios_base::hexfloat</code>.
 
533
       </entry>
 
534
     </row>
 
535
     <row>
 
536
Index: libstdc++-v3/doc/html/index.html
 
537
===================================================================
 
538
--- a/src/libstdc++-v3/doc/html/index.html      (.../tags/gcc_4_8_3_release)
 
539
+++ b/src/libstdc++-v3/doc/html/index.html      (.../branches/gcc-4_8-branch)
 
540
@@ -43,7 +43,7 @@
 
541
 </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. 
 
542
   Containers
 
543
   
 
544
-</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. 
 
545
+</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. 
 
546
   Iterators
 
547
   
 
548
 </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. 
 
549
@@ -162,4 +162,4 @@
 
550
   
 
551
 </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D. 
 
552
     <acronym class="acronym">GNU</acronym> General Public License version 3
 
553
-  </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>
 
554
\ No newline at end of file
 
555
+  </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>
 
556
Index: libstdc++-v3/doc/html/manual/status.html
 
557
===================================================================
 
558
--- a/src/libstdc++-v3/doc/html/manual/status.html      (.../tags/gcc_4_8_3_release)
 
559
+++ b/src/libstdc++-v3/doc/html/manual/status.html      (.../branches/gcc-4_8-branch)
 
560
@@ -165,7 +165,8 @@
 
561
              <code class="code">set_new_handler</code> is not thread-safe.
 
562
       </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>.
 
563
              <code class="code">set_terminate</code> is not thread-safe.
 
564
-      </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">
 
565
+      </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.
 
566
+      </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">
 
567
        <span class="emphasis"><em>19</em></span>
 
568
       </td><td colspan="3" align="left">
 
569
        <span class="emphasis"><em>Diagnostics</em></span>
 
570
@@ -173,7 +174,7 @@
 
571
        <span class="emphasis"><em>20</em></span>
 
572
       </td><td colspan="3" align="left">
 
573
        <span class="emphasis"><em>General utilities</em></span>
 
574
-      </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">
 
575
+      </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">
 
576
        <p>
 
577
          Uses code from
 
578
          <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
 
579
@@ -187,14 +188,16 @@
 
580
        <span class="emphasis"><em>21</em></span>
 
581
       </td><td colspan="3" align="left">
 
582
        <span class="emphasis"><em>Strings</em></span>
 
583
-      </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.
 
584
+      </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.
 
585
+             Missing <code class="code">getline</code> overloads for rvalue streams.
 
586
+      </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.
 
587
       Missing <code class="filename">&lt;cuchar&gt;</code>
 
588
       </td></tr><tr><td align="left">
 
589
        <span class="emphasis"><em>22</em></span>
 
590
       </td><td colspan="3" align="left">
 
591
        <span class="emphasis"><em>Localization</em></span>
 
592
-      </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
 
593
-             <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">
 
594
+      </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
 
595
+             <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">
 
596
        <span class="emphasis"><em>23</em></span>
 
597
       </td><td colspan="3" align="left">
 
598
        <span class="emphasis"><em>Containers</em></span>
 
599
@@ -201,8 +204,10 @@
 
600
       </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>
 
601
              meet the requirements
 
602
              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
 
603
-             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
 
604
-             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
 
605
+             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.
 
606
+             <code class="code">insert</code> and <code class="code">erase</code> members do not
 
607
+             take <code class="code">const_iterator</code> arguments (N2350).
 
608
+      </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
 
609
              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
 
610
              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">
 
611
        <span class="emphasis"><em>24</em></span>
 
612
@@ -212,11 +217,13 @@
 
613
        <span class="emphasis"><em>25</em></span>
 
614
       </td><td colspan="3" align="left">
 
615
        <span class="emphasis"><em>Algorithms</em></span>
 
616
-      </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">
 
617
+      </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">
 
618
       <span class="emphasis"><em>26</em></span>
 
619
       </td><td colspan="3" align="left">
 
620
        <span class="emphasis"><em>Numerics</em></span>
 
621
-      </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">
 
622
+      </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
 
623
+       <code class="code">&lt;ccomplex&gt;</code>
 
624
+      </td></tr><tr><td align="left">
 
625
        <span class="emphasis"><em>27</em></span>
 
626
       </td><td colspan="3" align="left">
 
627
        <span class="emphasis"><em>Input/output library</em></span>
 
628
@@ -224,6 +231,7 @@
 
629
         Missing move and swap operations on <code class="code">basic_ios</code>.
 
630
         Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
 
631
         <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
 
632
+       Missing <code class="code">ios_base::hexfloat</code>.
 
633
       </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">
 
634
         Missing move and swap operations
 
635
         Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
 
636
Index: libstdc++-v3/doc/html/manual/abi.html
 
637
===================================================================
 
638
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
 
639
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
 
640
@@ -96,7 +96,7 @@
 
641
    definitions, where the version definition is the maximum for a
 
642
    particular release. Labels are cumulative. If a particular release
 
643
    is not listed, it has the same version labels as the preceding
 
644
-   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>
 
645
+   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>
 
646
        Release versioning on the libstdc++.so binary, implemented in
 
647
        the same way as the libgcc_s.so binary above. Listed is the
 
648
        filename: <code class="constant">DT_SONAME</code> can be deduced from
 
649
@@ -111,7 +111,7 @@
 
650
        has the same filename and <code class="constant">DT_SONAME</code> as the
 
651
        preceding release.
 
652
       </p><p>It is versioned as follows:
 
653
-    </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>
 
654
+    </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>
 
655
       Note 1: Error should be libstdc++.so.3.0.3.
 
656
     </p><p>
 
657
       Note 2: Not strictly required.
 
658
@@ -129,7 +129,7 @@
 
659
    GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
 
660
    release.) If a particular release is not listed, it has the same
 
661
    version labels as the preceding release.
 
662
-   </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,
 
663
+   </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,
 
664
     __GXX_ABI_VERSION. This macro is defined as the version of the
 
665
     compiler v3 ABI, with g++ 3.0 being version 100. This macro will
 
666
     be automatically defined whenever g++ is used (the curious can
 
667
Index: libstdc++-v3/doc/html/manual/std_contents.html
 
668
===================================================================
 
669
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../tags/gcc_4_8_3_release)
 
670
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html        (.../branches/gcc-4_8-branch)
 
671
@@ -21,7 +21,7 @@
 
672
 </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. 
 
673
   Containers
 
674
   
 
675
-</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. 
 
676
+</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. 
 
677
   Iterators
 
678
   
 
679
 </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. 
 
680
@@ -42,4 +42,4 @@
 
681
 </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. 
 
682
   Support
 
683
   
 
684
-</td></tr></table></div></body></html>
 
685
\ No newline at end of file
 
686
+</td></tr></table></div></body></html>
 
687
Index: libstdc++-v3/doc/html/manual/containers.html
 
688
===================================================================
 
689
--- a/src/libstdc++-v3/doc/html/manual/containers.html  (.../tags/gcc_4_8_3_release)
 
690
+++ b/src/libstdc++-v3/doc/html/manual/containers.html  (.../branches/gcc-4_8-branch)
 
691
@@ -7,9 +7,10 @@
 
692
   </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. 
 
693
   Containers
 
694
   <a id="idm269999493408" class="indexterm"></a>
 
695
-</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>
 
696
-     Yes it is, and that's okay.  This is a decision that we preserved
 
697
-     when we imported SGI's STL implementation.  The following is
 
698
+</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>
 
699
+     Yes it is, and that was okay until the 2011 edition of the C++ standard.
 
700
+     In future GCC will change it to O(1) but O(N) was a decision that we
 
701
+     preserved when we imported SGI's STL implementation.  The following is
 
702
      quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
 
703
    </p><div class="blockquote"><blockquote class="blockquote"><p>
 
704
        The size() member function, for list and slist, takes time
 
705
@@ -41,14 +42,4 @@
 
706
         </p><pre class="programlisting">
 
707
         if (L.empty())
 
708
             ...
 
709
-        </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>
 
710
-  </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>
 
711
-     In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
 
712
-     message to the list</a>, Daniel Kostecky announced work on an
 
713
-     alternate form of <code class="code">std::vector</code> that would support
 
714
-     hints on the number of elements to be over-allocated.  The design
 
715
-     was also described, along with possible implementation choices.
 
716
-   </p><p>
 
717
-     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>
 
718
-     and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
 
719
-   </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>
 
720
\ No newline at end of file
 
721
+        </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>
 
722
Index: libstdc++-v3/doc/html/manual/index.html
 
723
===================================================================
 
724
--- a/src/libstdc++-v3/doc/html/manual/index.html       (.../tags/gcc_4_8_3_release)
 
725
+++ b/src/libstdc++-v3/doc/html/manual/index.html       (.../branches/gcc-4_8-branch)
 
726
@@ -24,7 +24,7 @@
 
727
 </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. 
 
728
   Containers
 
729
   
 
730
-</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. 
 
731
+</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. 
 
732
   Iterators
 
733
   
 
734
 </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. 
 
735
@@ -160,4 +160,4 @@
 
736
              </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. 
 
737
   Introduction
 
738
   
 
739
-</td></tr></table></div></body></html>
 
740
\ No newline at end of file
 
741
+</td></tr></table></div></body></html>
 
742
Index: libstdc++-v3/include/std/future
 
743
===================================================================
 
744
--- a/src/libstdc++-v3/include/std/future       (.../tags/gcc_4_8_3_release)
 
745
+++ b/src/libstdc++-v3/include/std/future       (.../branches/gcc-4_8-branch)
 
746
@@ -351,12 +351,14 @@
 
747
       void
 
748
       _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
 
749
       {
 
750
-        bool __set = __ignore_failure;
 
751
+        bool __set = false;
 
752
         // all calls to this function are serialized,
 
753
         // side-effects of invoking __res only happen once
 
754
         call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
 
755
             ref(__set));
 
756
-        if (!__set)
 
757
+       if (__set)
 
758
+         _M_cond.notify_all();
 
759
+       else if (!__ignore_failure)
 
760
           __throw_future_error(int(future_errc::promise_already_satisfied));
 
761
       }
 
762
 
 
763
@@ -471,7 +473,6 @@
 
764
           lock_guard<mutex> __lock(_M_mutex);
 
765
           _M_result.swap(__res);
 
766
         }
 
767
-        _M_cond.notify_all();
 
768
         __set = true;
 
769
       }
 
770
 
 
771
@@ -983,22 +984,25 @@
 
772
       void
 
773
       set_value(const _Res& __r)
 
774
       {
 
775
+       auto __future = _M_future;
 
776
         auto __setter = _State::__setter(this, __r);
 
777
-        _M_future->_M_set_result(std::move(__setter));
 
778
+        __future->_M_set_result(std::move(__setter));
 
779
       }
 
780
 
 
781
       void
 
782
       set_value(_Res&& __r)
 
783
       {
 
784
+       auto __future = _M_future;
 
785
         auto __setter = _State::__setter(this, std::move(__r));
 
786
-        _M_future->_M_set_result(std::move(__setter));
 
787
+        __future->_M_set_result(std::move(__setter));
 
788
       }
 
789
 
 
790
       void
 
791
       set_exception(exception_ptr __p)
 
792
       {
 
793
+       auto __future = _M_future;
 
794
         auto __setter = _State::__setter(__p, this);
 
795
-        _M_future->_M_set_result(std::move(__setter));
 
796
+        __future->_M_set_result(std::move(__setter));
 
797
       }
 
798
     };
 
799
 
 
800
@@ -1081,15 +1085,17 @@
 
801
       void
 
802
       set_value(_Res& __r)
 
803
       {
 
804
+       auto __future = _M_future;
 
805
         auto __setter = _State::__setter(this, __r);
 
806
-        _M_future->_M_set_result(std::move(__setter));
 
807
+        __future->_M_set_result(std::move(__setter));
 
808
       }
 
809
 
 
810
       void
 
811
       set_exception(exception_ptr __p)
 
812
       {
 
813
+       auto __future = _M_future;
 
814
         auto __setter = _State::__setter(__p, this);
 
815
-        _M_future->_M_set_result(std::move(__setter));
 
816
+        __future->_M_set_result(std::move(__setter));
 
817
       }
 
818
     };
 
819
 
 
820
@@ -1166,8 +1172,9 @@
 
821
       void
 
822
       set_exception(exception_ptr __p)
 
823
       {
 
824
+       auto __future = _M_future;
 
825
         auto __setter = _State::__setter(__p, this);
 
826
-        _M_future->_M_set_result(std::move(__setter));
 
827
+        __future->_M_set_result(std::move(__setter));
 
828
       }
 
829
     };
 
830
 
 
831
@@ -1193,8 +1200,9 @@
 
832
   inline void
 
833
   promise<void>::set_value()
 
834
   {
 
835
+    auto __future = _M_future;
 
836
     auto __setter = _State::__setter(this);
 
837
-    _M_future->_M_set_result(std::move(__setter));
 
838
+    __future->_M_set_result(std::move(__setter));
 
839
   }
 
840
 
 
841
 
 
842
Index: libstdc++-v3/include/ext/rope
 
843
===================================================================
 
844
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
 
845
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
 
846
@@ -1544,7 +1544,7 @@
 
847
       typedef typename _Base::allocator_type allocator_type;
 
848
       using _Base::_M_tree_ptr;
 
849
       using _Base::get_allocator;
 
850
-      using _Base::_M_get_allocator;      
 
851
+      using _Base::_M_get_allocator;
 
852
       typedef __GC_CONST _CharT* _Cstrptr;
 
853
       
 
854
       static _CharT _S_empty_c_str[1];
 
855
@@ -1876,8 +1876,9 @@
 
856
           const allocator_type& __a = allocator_type())
 
857
       : _Base(__a)
 
858
       {
 
859
-       this->_M_tree_ptr = (0 == __len) ?
 
860
-         0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
 
861
+       this->_M_tree_ptr = (0 == __len)
 
862
+         ? 0
 
863
+         : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
 
864
       }
 
865
 
 
866
       rope(const rope& __x, const allocator_type& __a = allocator_type())
 
867
Index: libstdc++-v3/include/bits/stl_tree.h
 
868
===================================================================
 
869
--- a/src/libstdc++-v3/include/bits/stl_tree.h  (.../tags/gcc_4_8_3_release)
 
870
+++ b/src/libstdc++-v3/include/bits/stl_tree.h  (.../branches/gcc-4_8-branch)
 
871
@@ -510,11 +510,11 @@
 
872
 
 
873
       _Link_type
 
874
       _M_end()
 
875
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
 
876
+      { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
 
877
 
 
878
       _Const_Link_type
 
879
       _M_end() const
 
880
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
881
+      { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
882
 
 
883
       static const_reference
 
884
       _S_value(_Const_Link_type __x)
 
885
Index: libstdc++-v3/include/tr2/bool_set
 
886
===================================================================
 
887
--- a/src/libstdc++-v3/include/tr2/bool_set     (.../tags/gcc_4_8_3_release)
 
888
+++ b/src/libstdc++-v3/include/tr2/bool_set     (.../branches/gcc-4_8-branch)
 
889
@@ -44,7 +44,7 @@
 
890
    *  bool_set
 
891
    *
 
892
    *  See N2136, Bool_set: multi-valued logic
 
893
-   *  by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
 
894
+   *  by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
 
895
    *
 
896
    *  The implicit conversion to bool is slippery!  I may use the new
 
897
    *  explicit conversion.  This has been specialized in the language
 
898
Index: libstdc++-v3/ChangeLog
 
899
===================================================================
 
900
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_8_3_release)
 
901
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_8-branch)
 
902
@@ -1,3 +1,113 @@
 
903
+2014-11-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
904
+
 
905
+       Backport from mainline
 
906
+       2014-09-10  Tony Wang  <tony.wang@arm.com>
 
907
+
 
908
+       PR target/56846
 
909
+       * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
 
910
+       Return with CONTINUE_UNWINDING when the state pattern
 
911
+       contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
 
912
+
 
913
+2014-11-05  David Edelsohn  <dje.gcc@gmail.com>
 
914
+
 
915
+       Backported from mainline.
 
916
+       2014-10-30  David Edelsohn  <dje.gcc@gmail.com>
 
917
+
 
918
+       * configure.host (aix4.3+, 5+): Do not use -G in link command.
 
919
+
 
920
+2014-10-15  Jason Merrill  <jason@redhat.com>
 
921
+
 
922
+       * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
 
923
+       dynamic_cast more gracefully.
 
924
+
 
925
+2014-10-14  Kai Tietz  <ktietz@redhat.com>
 
926
+
 
927
+       PR libstdc++/57440
 
928
+       * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
 
929
+       Define to avoid leak.
 
930
+       * config/os/mingw32-w64/os_defines.h: Likewise.
 
931
+
 
932
+2014-10-03  Jonathan Wakely  <jwakely@redhat.com>
 
933
+
 
934
+       PR libstdc++/63449
 
935
+       * doc/xml/manual/containers.xml: Remove outdated section. Update
 
936
+       std::list notes.
 
937
+       * doc/html/*: Regenerate.
 
938
+
 
939
+2014-10-01  Jonathan Wakely  <jwakely@redhat.com>
 
940
+
 
941
+       * doc/xml/manual/status_cxx2011.xml: Corrections.
 
942
+       * doc/html/manual/status.html: Regenerate.
 
943
+
 
944
+2014-08-28  Samuel Bronson  <naesten@gmail.com>
 
945
+
 
946
+       Backport r212453 from trunk
 
947
+       2014-07-11  Samuel Bronson  <naesten@gmail.com>
 
948
+                   Matthias Klose  <doko@ubuntu.com>
 
949
+
 
950
+       PR libstdc++/58962
 
951
+       * python/libstdcxx/v6/printers.py: Port to Python 2+3
 
952
+       (imap): New compat function.
 
953
+       (izip): Likewise.
 
954
+       (Iterator): New mixin to allow writing iterators in Python 3 style
 
955
+       regardless of which version we're running on.
 
956
+       [Python3] (long) New compat alias for "int".
 
957
+       * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
 
958
+
 
959
+       Backport r210625 from trunk
 
960
+       2014-05-19  Jonathan Wakely  <jwakely@redhat.com>
 
961
+
 
962
+       * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
 
963
+
 
964
+2014-08-26  John David Anglin  <danglin@gcc.gnu.org>
 
965
+
 
966
+       * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
 
967
+
 
968
+2014-08-26  Jonathan Wakely  <jwakely@redhat.com>
 
969
+
 
970
+       * doc/xml/manual/status_cxx2011.xml: Correct status table.
 
971
+       * doc/html/manual/*: Regenerate.
 
972
+
 
973
+2014-08-04  Jonathan Wakely  <jwakely@redhat.com>
 
974
+
 
975
+       Backported from mainline
 
976
+       2014-07-29  Jonathan Wakely  <jwakely@redhat.com>
 
977
+
 
978
+       PR libstdc++/61946
 
979
+       * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
 
980
+       const allocator_type&)): Pass non-const allocator to
 
981
+       _S_new_RopeFunction.
 
982
+       * testsuite/ext/rope/61946.cc: New.
 
983
+
 
984
+2014-08-04  Zifei Tong  <zifeitong@gmail.com>
 
985
+
 
986
+       * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
 
987
+       _GLIBCXX_ prefix to macro.
 
988
+
 
989
+2014-06-03  Jonathan Wakely  <jwakely@redhat.com>
 
990
+
 
991
+       Backport from mainline
 
992
+       2014-04-15  Jonathan Wakely  <jwakely@redhat.com>
 
993
+
 
994
+       PR libstdc++/60734
 
995
+       * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
 
996
+
 
997
+       Backport from mainline
 
998
+       2014-05-16  Jonathan Wakely  <jwakely@redhat.com>
 
999
+
 
1000
+       PR libstdc++/60966
 
1001
+       * include/std/future (__future_base::_State_baseV2::_M_set_result):
 
1002
+       Signal condition variable after call_once returns.
 
1003
+       (__future_base::_State_baseV2::_M_do_set): Do not signal here.
 
1004
+       (promise::set_value, promise::set_exception): Increment the reference
 
1005
+       count on the shared state until the function returns.
 
1006
+       * testsuite/30_threads/promise/60966.cc: New.
 
1007
+
 
1008
+2014-05-29  Jonathan Wakely  <jwakely@redhat.com>
 
1009
+
 
1010
+       * include/tr2/bool_set: Use UTF-8 for accented characters.
 
1011
+       * scripts/run_doxygen: Handle Doxygen 1.8.x change.
 
1012
+
 
1013
 2014-05-22  Release Manager
 
1014
 
 
1015
        * GCC 4.8.3 released.
 
1016
Index: libstdc++-v3/libsupc++/atexit_thread.cc
 
1017
===================================================================
 
1018
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../tags/gcc_4_8_3_release)
 
1019
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc       (.../branches/gcc-4_8-branch)
 
1020
@@ -26,7 +26,7 @@
 
1021
 #include <new>
 
1022
 #include "bits/gthr.h"
 
1023
 
 
1024
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
 
1025
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
 
1026
 
 
1027
 extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
 
1028
                                         void *arg, void *d);
 
1029
@@ -38,7 +38,7 @@
 
1030
   return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
 
1031
 }
 
1032
 
 
1033
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1034
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1035
 
 
1036
 namespace {
 
1037
   // One element in a singly-linked stack of cleanups.
 
1038
@@ -142,4 +142,4 @@
 
1039
   return 0;
 
1040
 }
 
1041
 
 
1042
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1043
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
 
1044
Index: libstdc++-v3/libsupc++/eh_personality.cc
 
1045
===================================================================
 
1046
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../tags/gcc_4_8_3_release)
 
1047
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc      (.../branches/gcc-4_8-branch)
 
1048
@@ -378,6 +378,12 @@
 
1049
   switch (state & _US_ACTION_MASK)
 
1050
     {
 
1051
     case _US_VIRTUAL_UNWIND_FRAME:
 
1052
+      // If the unwind state pattern is
 
1053
+      // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
 
1054
+      // then we don't need to search for any handler as it is not a real
 
1055
+      // exception. Just unwind the stack.
 
1056
+      if (state & _US_FORCE_UNWIND)
 
1057
+       CONTINUE_UNWINDING;
 
1058
       actions = _UA_SEARCH_PHASE;
 
1059
       break;
 
1060
 
 
1061
Index: libstdc++-v3/libsupc++/dyncast.cc
 
1062
===================================================================
 
1063
--- a/src/libstdc++-v3/libsupc++/dyncast.cc     (.../tags/gcc_4_8_3_release)
 
1064
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc     (.../branches/gcc-4_8-branch)
 
1065
@@ -55,6 +55,18 @@
 
1066
       adjust_pointer <void> (src_ptr, prefix->whole_object);
 
1067
   const __class_type_info *whole_type = prefix->whole_type;
 
1068
   __class_type_info::__dyncast_result result;
 
1069
+
 
1070
+  // If the whole object vptr doesn't refer to the whole object type, we're
 
1071
+  // in the middle of constructing a primary base, and src is a separate
 
1072
+  // base.  This has undefined behavior and we can't find anything outside
 
1073
+  // of the base we're actually constructing, so fail now rather than
 
1074
+  // segfault later trying to use a vbase offset that doesn't exist.
 
1075
+  const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
 
1076
+  const vtable_prefix *whole_prefix =
 
1077
+    adjust_pointer <vtable_prefix> (whole_vtable,
 
1078
+                                   -offsetof (vtable_prefix, origin));
 
1079
+  if (whole_prefix->whole_type != whole_type)
 
1080
+    return NULL;
 
1081
   
 
1082
   whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
 
1083
                             dst_type, whole_ptr, src_type, src_ptr, result);
 
1084
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
 
1085
===================================================================
 
1086
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../tags/gcc_4_8_3_release)
 
1087
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc    (.../branches/gcc-4_8-branch)
 
1088
@@ -0,0 +1,67 @@
 
1089
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
 
1090
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
 
1091
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
 
1092
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
 
1093
+// { dg-require-cstdint "" }
 
1094
+// { dg-require-gthreads "" }
 
1095
+// { dg-require-atomic-builtins "" }
 
1096
+
 
1097
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1098
+//
 
1099
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1100
+// software; you can redistribute it and/or modify it under the
 
1101
+// terms of the GNU General Public License as published by the
 
1102
+// Free Software Foundation; either version 3, or (at your option)
 
1103
+// any later version.
 
1104
+
 
1105
+// This library is distributed in the hope that it will be useful,
 
1106
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1107
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1108
+// GNU General Public License for more details.
 
1109
+
 
1110
+// You should have received a copy of the GNU General Public License along
 
1111
+// with this library; see the file COPYING3.  If not see
 
1112
+// <http://www.gnu.org/licenses/>.
 
1113
+
 
1114
+// libstdc++/60966
 
1115
+// This test hangs if std::promise::~promise() destroys the
 
1116
+// shared state before std::promise::set_value() finishes using it.
 
1117
+
 
1118
+#include <future>
 
1119
+#include <thread>
 
1120
+#include <vector>
 
1121
+
 
1122
+const int THREADS = 10;
 
1123
+
 
1124
+void run_task(std::promise<void>* pr)
 
1125
+{
 
1126
+  std::this_thread::sleep_for(std::chrono::milliseconds(100));
 
1127
+  pr->set_value();
 
1128
+}
 
1129
+
 
1130
+int main()
 
1131
+{
 
1132
+  std::vector<std::promise<void>*> tasks(THREADS);
 
1133
+  std::vector<std::thread> threads(THREADS);
 
1134
+  std::vector<std::future<void>> futures(THREADS);
 
1135
+
 
1136
+  for (int i = 0; i < THREADS; ++i)
 
1137
+  {
 
1138
+    std::promise<void>* task = new std::promise<void>;
 
1139
+    tasks[i] = task;
 
1140
+    futures[i] = task->get_future();
 
1141
+    threads[i] = std::thread(run_task, task);
 
1142
+  }
 
1143
+
 
1144
+  for (int i = 0; i < THREADS; ++i)
 
1145
+  {
 
1146
+    // the temporary future releases the state as soon as wait() returns
 
1147
+    std::future<void>(std::move(futures[i])).wait();
 
1148
+    // state is ready, should now be safe to delete promise, so it
 
1149
+    // releases the shared state too
 
1150
+    delete tasks[i];
 
1151
+  }
 
1152
+
 
1153
+  for (auto& t : threads)
 
1154
+    t.join();
 
1155
+}
 
1156
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
 
1157
===================================================================
 
1158
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../tags/gcc_4_8_3_release)
 
1159
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc      (.../branches/gcc-4_8-branch)
 
1160
@@ -0,0 +1,31 @@
 
1161
+// Copyright (C) 2014 Free Software Foundation, Inc.
 
1162
+//
 
1163
+// This file is part of the GNU ISO C++ Library.  This library is free
 
1164
+// software; you can redistribute it and/or modify it under the
 
1165
+// terms of the GNU General Public License as published by the
 
1166
+// Free Software Foundation; either version 3, or (at your option)
 
1167
+// any later version.
 
1168
+
 
1169
+// This library is distributed in the hope that it will be useful,
 
1170
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1171
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1172
+// GNU General Public License for more details.
 
1173
+
 
1174
+// You should have received a copy of the GNU General Public License along
 
1175
+// with this library; see the file COPYING3.  If not see
 
1176
+// <http://www.gnu.org/licenses/>.
 
1177
+
 
1178
+// { dg-do compile }
 
1179
+
 
1180
+#include <ext/rope>
 
1181
+
 
1182
+struct empty_char_prod : __gnu_cxx::char_producer<char>
 
1183
+{
 
1184
+  virtual void operator()(size_t, size_t, char*) {}
 
1185
+};
 
1186
+
 
1187
+int main ()
 
1188
+{
 
1189
+  empty_char_prod* ecp = new empty_char_prod;
 
1190
+  __gnu_cxx::crope excrope( ecp, 10L, true );
 
1191
+}
 
1192
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
 
1193
===================================================================
 
1194
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../tags/gcc_4_8_3_release)
 
1195
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp       (.../branches/gcc-4_8-branch)
 
1196
@@ -91,7 +91,7 @@
 
1197
        }
 
1198
     }
 
1199
 
 
1200
-    set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
 
1201
+    set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
 
1202
                           "\\\[\\\]"]
 
1203
     if {!$do_whatis_tests} {
 
1204
        send_log "skipping 'whatis' tests - gdb too old"
 
1205
@@ -252,6 +252,6 @@
 
1206
 # but not earlier versions.
 
1207
 # Return 1 if the version is ok, 0 otherwise.
 
1208
 proc gdb_version_check {} {
 
1209
-    return [gdb_batch_check "python print gdb.lookup_global_symbol" \
 
1210
+    return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
 
1211
              "<built-in function lookup_global_symbol>"]
 
1212
 }
 
1213
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
 
1214
===================================================================
 
1215
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../tags/gcc_4_8_3_release)
 
1216
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h       (.../branches/gcc-4_8-branch)
 
1217
@@ -78,4 +78,7 @@
 
1218
 #define _GLIBCXX_LLP64 1
 
1219
 #endif
 
1220
 
 
1221
+// See libstdc++/59807
 
1222
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
 
1223
+
 
1224
 #endif
 
1225
Index: libstdc++-v3/config/os/mingw32/os_defines.h
 
1226
===================================================================
 
1227
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../tags/gcc_4_8_3_release)
 
1228
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h   (.../branches/gcc-4_8-branch)
 
1229
@@ -75,4 +75,7 @@
 
1230
 #define _GLIBCXX_LLP64 1
 
1231
 #endif
 
1232
 
 
1233
+// See libstdc++/59807
 
1234
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
 
1235
+
 
1236
 #endif
 
1237
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
 
1238
===================================================================
 
1239
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../tags/gcc_4_8_3_release)
 
1240
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt      (.../branches/gcc-4_8-branch)
 
1241
@@ -400,6 +400,7 @@
 
1242
 FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
 
1243
 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1244
 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1245
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
 
1246
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 
1247
 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
 
1248
 FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 
1249
@@ -587,6 +588,8 @@
 
1250
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
 
1251
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
 
1252
 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
 
1253
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
 
1254
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
 
1255
 FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
 
1256
 FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
 
1257
 FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
 
1258
@@ -1204,6 +1207,7 @@
 
1259
 FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
 
1260
 FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
 
1261
 FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
 
1262
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
 
1263
 FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
 
1264
 FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
 
1265
 FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
 
1266
@@ -1471,6 +1475,11 @@
 
1267
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
 
1268
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
 
1269
 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
 
1270
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
 
1271
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
 
1272
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
 
1273
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
 
1274
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
 
1275
 FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
 
1276
 FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
 
1277
 FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
 
1278
@@ -1900,6 +1909,8 @@
 
1279
 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
 
1280
 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
 
1281
 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
 
1282
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
 
1283
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
 
1284
 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1285
 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
 
1286
 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
 
1287
@@ -2436,6 +2447,7 @@
 
1288
 FUNC:__cxa_guard_release@@CXXABI_1.3
 
1289
 FUNC:__cxa_pure_virtual@@CXXABI_1.3
 
1290
 FUNC:__cxa_rethrow@@CXXABI_1.3
 
1291
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
 
1292
 FUNC:__cxa_throw@@CXXABI_1.3
 
1293
 FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
 
1294
 FUNC:__cxa_vec_cctor@@CXXABI_1.3
 
1295
@@ -2482,6 +2494,7 @@
 
1296
 OBJECT:0:CXXABI_1.3.4
 
1297
 OBJECT:0:CXXABI_1.3.5
 
1298
 OBJECT:0:CXXABI_1.3.6
 
1299
+OBJECT:0:CXXABI_1.3.7
 
1300
 OBJECT:0:CXXABI_TM_1
 
1301
 OBJECT:0:GLIBCXX_3.4
 
1302
 OBJECT:0:GLIBCXX_3.4.1
 
1303
@@ -2493,6 +2506,8 @@
 
1304
 OBJECT:0:GLIBCXX_3.4.15
 
1305
 OBJECT:0:GLIBCXX_3.4.16
 
1306
 OBJECT:0:GLIBCXX_3.4.17
 
1307
+OBJECT:0:GLIBCXX_3.4.18
 
1308
+OBJECT:0:GLIBCXX_3.4.19
 
1309
 OBJECT:0:GLIBCXX_3.4.2
 
1310
 OBJECT:0:GLIBCXX_3.4.3
 
1311
 OBJECT:0:GLIBCXX_3.4.4
 
1312
@@ -2992,6 +3007,8 @@
 
1313
 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
 
1314
 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
 
1315
 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
 
1316
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
 
1317
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
 
1318
 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
 
1319
 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
 
1320
 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
 
1321
Index: configure.ac
 
1322
===================================================================
 
1323
--- a/src/configure.ac  (.../tags/gcc_4_8_3_release)
 
1324
+++ b/src/configure.ac  (.../branches/gcc-4_8-branch)
 
1325
@@ -1154,6 +1154,9 @@
 
1326
   *-mingw*)
 
1327
     host_makefile_frag="config/mh-mingw"
 
1328
     ;;
 
1329
+  alpha*-*-linux*)
 
1330
+    host_makefile_frag="config/mh-alpha-linux"
 
1331
+    ;;
 
1332
   hppa*-hp-hpux10*)
 
1333
     host_makefile_frag="config/mh-pa-hpux10"
 
1334
     ;;
 
1335
Index: ChangeLog
 
1336
===================================================================
 
1337
--- a/src/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1338
+++ b/src/ChangeLog     (.../branches/gcc-4_8-branch)
 
1339
@@ -1,3 +1,9 @@
 
1340
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1341
+
 
1342
+       PR target/47230
 
1343
+       * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
 
1344
+       * configure: Regenerate.
 
1345
+
 
1346
 2014-05-22  Release Manager
 
1347
 
 
1348
        * GCC 4.8.3 released.
 
1349
Index: contrib/ChangeLog
 
1350
===================================================================
 
1351
--- a/src/contrib/ChangeLog     (.../tags/gcc_4_8_3_release)
 
1352
+++ b/src/contrib/ChangeLog     (.../branches/gcc-4_8-branch)
 
1353
@@ -1,3 +1,7 @@
 
1354
+2014-07-07  Richard Biener  <rguenther@suse.de>
 
1355
+
 
1356
+        * gennews: Use gcc-3.0/index.html.
 
1357
+
 
1358
 2014-05-22  Release Manager
 
1359
 
 
1360
        * GCC 4.8.3 released.
 
1361
Index: contrib/gennews
 
1362
===================================================================
 
1363
--- a/src/contrib/gennews       (.../tags/gcc_4_8_3_release)
 
1364
+++ b/src/contrib/gennews       (.../branches/gcc-4_8-branch)
 
1365
@@ -37,7 +37,7 @@
 
1366
     gcc-3.3/index.html gcc-3.3/changes.html
 
1367
     gcc-3.2/index.html gcc-3.2/changes.html
 
1368
     gcc-3.1/index.html gcc-3.1/changes.html
 
1369
-    gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1370
+    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
 
1371
     gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
 
1372
     egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
 
1373
     egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
 
1374
Index: config/mh-alpha-linux
 
1375
===================================================================
 
1376
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
 
1377
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
 
1378
@@ -0,0 +1,3 @@
 
1379
+# Prevent GPREL16 relocation truncation
 
1380
+LDFLAGS += -Wl,--no-relax
 
1381
+BOOT_LDFLAGS += -Wl,--no-relax
 
1382
Index: config/ChangeLog
 
1383
===================================================================
 
1384
--- a/src/config/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1385
+++ b/src/config/ChangeLog      (.../branches/gcc-4_8-branch)
 
1386
@@ -1,3 +1,8 @@
 
1387
+2014-07-26  Uros Bizjak  <ubizjak@gmail.com>
 
1388
+
 
1389
+       PR target/47230
 
1390
+       * mh-alpha-linux: New file.
 
1391
+
 
1392
 2014-05-22  Release Manager
 
1393
 
 
1394
        * GCC 4.8.3 released.
 
1395
Index: libjava/classpath
 
1396
===================================================================
 
1397
--- a/src/libjava/classpath     (.../tags/gcc_4_8_3_release)
 
1398
+++ b/src/libjava/classpath     (.../branches/gcc-4_8-branch)
 
1399
 
 
1400
Property changes on: libjava/classpath
 
1401
___________________________________________________________________
 
1402
Modified: svn:mergeinfo
 
1403
   Merged /trunk/libjava/classpath:r211733,215049
 
1404
Index: configure
 
1405
===================================================================
 
1406
--- a/src/configure     (.../tags/gcc_4_8_3_release)
 
1407
+++ b/src/configure     (.../branches/gcc-4_8-branch)
 
1408
@@ -3834,6 +3834,9 @@
 
1409
   *-mingw*)
 
1410
     host_makefile_frag="config/mh-mingw"
 
1411
     ;;
 
1412
+  alpha*-*-linux*)
 
1413
+    host_makefile_frag="config/mh-alpha-linux"
 
1414
+    ;;
 
1415
   hppa*-hp-hpux10*)
 
1416
     host_makefile_frag="config/mh-pa-hpux10"
 
1417
     ;;
 
1418
Index: libgcc/ChangeLog
 
1419
===================================================================
 
1420
--- a/src/libgcc/ChangeLog      (.../tags/gcc_4_8_3_release)
 
1421
+++ b/src/libgcc/ChangeLog      (.../branches/gcc-4_8-branch)
 
1422
@@ -1,3 +1,14 @@
 
1423
+2014-10-26  John David Anglin  <danglin@gcc.gnu.org>
 
1424
+
 
1425
+       * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
 
1426
+       (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
 
1427
+       memory read accesses are ok.
 
1428
+
 
1429
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
1430
+
 
1431
+       * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
 
1432
+       bits not set bits as indicating trapping exceptions.
 
1433
+
 
1434
 2014-05-22  Release Manager
 
1435
 
 
1436
        * GCC 4.8.3 released.
 
1437
Index: libgcc/config/i386/sfp-machine.h
 
1438
===================================================================
 
1439
--- a/src/libgcc/config/i386/sfp-machine.h      (.../tags/gcc_4_8_3_release)
 
1440
+++ b/src/libgcc/config/i386/sfp-machine.h      (.../branches/gcc-4_8-branch)
 
1441
@@ -59,7 +59,7 @@
 
1442
       __sfp_handle_exceptions (_fex);          \
 
1443
   } while (0);
 
1444
 
 
1445
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1446
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
 
1447
 
 
1448
 #define FP_ROUNDMODE           (_fcw & FP_RND_MASK)
 
1449
 #endif
 
1450
Index: libgcc/config/pa/linux-unwind.h
 
1451
===================================================================
 
1452
--- a/src/libgcc/config/pa/linux-unwind.h       (.../tags/gcc_4_8_3_release)
 
1453
+++ b/src/libgcc/config/pa/linux-unwind.h       (.../branches/gcc-4_8-branch)
 
1454
@@ -32,6 +32,17 @@
 
1455
 #include <signal.h>
 
1456
 #include <sys/ucontext.h>
 
1457
 
 
1458
+/* Return TRUE if read access to *P is allowed.  */
 
1459
+
 
1460
+static inline long
 
1461
+pa32_read_access_ok (void *p)
 
1462
+{
 
1463
+  long ret;
 
1464
+
 
1465
+  __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
 
1466
+  return ret;
 
1467
+}
 
1468
+
 
1469
 /* Unfortunately, because of various bugs and changes to the kernel,
 
1470
    we have several cases to deal with.
 
1471
 
 
1472
@@ -48,8 +59,13 @@
 
1473
    tell us how to locate the sigcontext structure.
 
1474
 
 
1475
    Note that with a 2.4 64-bit kernel, the signal context is not properly
 
1476
-   passed back to userspace so the unwind will not work correctly.  */
 
1477
+   passed back to userspace so the unwind will not work correctly.
 
1478
 
 
1479
+   There is also a bug in various glibc versions.  The (CONTEXT)->ra
 
1480
+   for the outermost frame is not marked as undefined, so we need to
 
1481
+   check whether read access is allowed for all the accesses used in
 
1482
+   searching for the signal trampoline.  */
 
1483
+
 
1484
 #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
 
1485
 
 
1486
 static _Unwind_Reason_Code
 
1487
@@ -73,14 +89,17 @@
 
1488
      e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
 
1489
      08000240 nop  */
 
1490
 
 
1491
-  if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
 
1492
+  if (pa32_read_access_ok (pc)
 
1493
+      && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
1494
     off = 4*4;
 
1495
-  else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
 
1496
+  else if (pa32_read_access_ok (&pc[4])
 
1497
+          && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
 
1498
     {
 
1499
       pc += 4;
 
1500
       off = 10 * 4;
 
1501
     }
 
1502
-  else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
 
1503
+  else if (pa32_read_access_ok (&pc[5])
 
1504
+          && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
 
1505
     {
 
1506
       pc += 5;
 
1507
       off = 10 * 4;
 
1508
@@ -96,13 +115,16 @@
 
1509
         word boundary and we can then determine the frame offset.  */
 
1510
       sp = (unsigned long)context->ra;
 
1511
       pc = (unsigned int *)sp;
 
1512
-      if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
 
1513
+      if ((sp & 4)
 
1514
+         && pa32_read_access_ok (pc)
 
1515
+         && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
 
1516
        off = 5 * 4;
 
1517
       else
 
1518
        return _URC_END_OF_STACK;
 
1519
     }
 
1520
 
 
1521
-  if (pc[1] != 0x3414015a
 
1522
+  if (!pa32_read_access_ok (&pc[3])
 
1523
+      || pc[1] != 0x3414015a
 
1524
       || pc[2] != 0xe4008200
 
1525
       || pc[3] != 0x08000240)
 
1526
     return _URC_END_OF_STACK;
 
1527
Index: gcc/tree-ssa-tail-merge.c
 
1528
===================================================================
 
1529
--- a/src/gcc/tree-ssa-tail-merge.c     (.../tags/gcc_4_8_3_release)
 
1530
+++ b/src/gcc/tree-ssa-tail-merge.c     (.../branches/gcc-4_8-branch)
 
1531
@@ -298,7 +298,8 @@
 
1532
   def_operand_p def_p;
 
1533
 
 
1534
   if (gimple_has_side_effects (stmt)
 
1535
-      || gimple_vdef (stmt) != NULL_TREE)
 
1536
+      || gimple_vdef (stmt) != NULL_TREE
 
1537
+      || gimple_vuse (stmt) != NULL_TREE)
 
1538
     return false;
 
1539
 
 
1540
   def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
 
1541
@@ -1060,6 +1061,24 @@
 
1542
     gcc_unreachable ();
 
1543
 }
 
1544
 
 
1545
+/* Return true if gimple operands T1 and T2 have the same value.  */
 
1546
+
 
1547
+static bool
 
1548
+gimple_operand_equal_value_p (tree t1, tree t2)
 
1549
+{
 
1550
+  if (t1 == t2)
 
1551
+    return true;
 
1552
+
 
1553
+  if (t1 == NULL_TREE
 
1554
+      || t2 == NULL_TREE)
 
1555
+    return false;
 
1556
+
 
1557
+  if (operand_equal_p (t1, t2, 0))
 
1558
+    return true;
 
1559
+
 
1560
+  return gvn_uses_equal (t1, t2);
 
1561
+}
 
1562
+
 
1563
 /* Return true if gimple statements S1 and S2 are equal.  Gimple_bb (s1) and
 
1564
    gimple_bb (s2) are members of SAME_SUCC.  */
 
1565
 
 
1566
@@ -1122,11 +1141,13 @@
 
1567
       lhs2 = gimple_get_lhs (s2);
 
1568
       if (TREE_CODE (lhs1) != SSA_NAME
 
1569
          && TREE_CODE (lhs2) != SSA_NAME)
 
1570
-       return (vn_valueize (gimple_vdef (s1))
 
1571
-               == vn_valueize (gimple_vdef (s2)));
 
1572
+       return (operand_equal_p (lhs1, lhs2, 0)
 
1573
+               && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
 
1574
+                                                gimple_assign_rhs1 (s2)));
 
1575
       else if (TREE_CODE (lhs1) == SSA_NAME
 
1576
               && TREE_CODE (lhs2) == SSA_NAME)
 
1577
-       return vn_valueize (lhs1) == vn_valueize (lhs2);
 
1578
+       return operand_equal_p (gimple_assign_rhs1 (s1),
 
1579
+                               gimple_assign_rhs1 (s2), 0);
 
1580
       return false;
 
1581
 
 
1582
     case GIMPLE_COND:
 
1583
Index: gcc/DATESTAMP
 
1584
===================================================================
 
1585
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
 
1586
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
 
1587
@@ -1 +1 @@
 
1588
-20140522
 
1589
+20141128
 
1590
Index: gcc/tree-ssa-strlen.c
 
1591
===================================================================
 
1592
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
 
1593
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
 
1594
@@ -1777,7 +1777,7 @@
 
1595
            break;
 
1596
          }
 
1597
     }
 
1598
-  else if (is_gimple_assign (stmt))
 
1599
+  else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
 
1600
     {
 
1601
       tree lhs = gimple_assign_lhs (stmt);
 
1602
 
 
1603
Index: gcc/ipa-cp.c
 
1604
===================================================================
 
1605
--- a/src/gcc/ipa-cp.c  (.../tags/gcc_4_8_3_release)
 
1606
+++ b/src/gcc/ipa-cp.c  (.../branches/gcc-4_8-branch)
 
1607
@@ -447,6 +447,8 @@
 
1608
   else if (!opt_for_fn (node->symbol.decl, optimize)
 
1609
           || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
 
1610
     reason = "non-optimized function";
 
1611
+  else if (node->tm_clone)
 
1612
+    reason = "transactional memory clone";
 
1613
 
 
1614
   if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
 
1615
     fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
 
1616
@@ -2902,6 +2904,11 @@
 
1617
                intersect_with_agg_replacements (cs->caller, src_idx,
 
1618
                                                 &inter, 0);
 
1619
            }
 
1620
+         else
 
1621
+           {
 
1622
+             inter.release ();
 
1623
+             return vNULL;
 
1624
+           }
 
1625
        }
 
1626
       else
 
1627
        {
 
1628
@@ -2917,6 +2924,11 @@
 
1629
              else
 
1630
                intersect_with_plats (src_plats, &inter, 0);
 
1631
            }
 
1632
+         else
 
1633
+           {
 
1634
+             inter.release ();
 
1635
+             return vNULL;
 
1636
+           }
 
1637
        }
 
1638
     }
 
1639
   else if (jfunc->type == IPA_JF_ANCESTOR
 
1640
@@ -3000,7 +3012,8 @@
 
1641
                                          vec<cgraph_edge_p> callers)
 
1642
 {
 
1643
   struct ipa_node_params *dest_info = IPA_NODE_REF (node);
 
1644
-  struct ipa_agg_replacement_value *res = NULL;
 
1645
+  struct ipa_agg_replacement_value *res;
 
1646
+  struct ipa_agg_replacement_value **tail = &res;
 
1647
   struct cgraph_edge *cs;
 
1648
   int i, j, count = ipa_get_param_count (dest_info);
 
1649
 
 
1650
@@ -3044,8 +3057,8 @@
 
1651
          v->offset = item->offset;
 
1652
          v->value = item->value;
 
1653
          v->by_ref = plats->aggs_by_ref;
 
1654
-         v->next = res;
 
1655
-         res = v;
 
1656
+         *tail = v;
 
1657
+         tail = &v->next;
 
1658
        }
 
1659
 
 
1660
     next_param:
 
1661
@@ -3052,6 +3065,7 @@
 
1662
       if (inter.exists ())
 
1663
        inter.release ();
 
1664
     }
 
1665
+  *tail = NULL;
 
1666
   return res;
 
1667
 }
 
1668
 
 
1669
@@ -3060,7 +3074,8 @@
 
1670
 static struct ipa_agg_replacement_value *
 
1671
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
 
1672
 {
 
1673
-  struct ipa_agg_replacement_value *res = NULL;
 
1674
+  struct ipa_agg_replacement_value *res;
 
1675
+  struct ipa_agg_replacement_value **tail = &res;
 
1676
   struct ipa_agg_jump_function *aggjf;
 
1677
   struct ipa_agg_jf_item *item;
 
1678
   int i, j;
 
1679
@@ -3074,9 +3089,10 @@
 
1680
        v->offset = item->offset;
 
1681
        v->value = item->value;
 
1682
        v->by_ref = aggjf->by_ref;
 
1683
-       v->next = res;
 
1684
-       res = v;
 
1685
+       *tail = v;
 
1686
+       tail = &v->next;
 
1687
       }
 
1688
+  *tail = NULL;
 
1689
   return res;
 
1690
 }
 
1691
 
 
1692
Index: gcc/configure
 
1693
===================================================================
 
1694
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
 
1695
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
 
1696
@@ -910,6 +910,7 @@
 
1697
 enable_gnu_indirect_function
 
1698
 enable_initfini_array
 
1699
 enable_comdat
 
1700
+enable_fix_cortex_a53_835769
 
1701
 enable_gnu_unique_object
 
1702
 enable_linker_build_id
 
1703
 with_long_double_128
 
1704
@@ -1619,6 +1620,14 @@
 
1705
                           glibc systems
 
1706
   --enable-initfini-array      use .init_array/.fini_array sections
 
1707
   --enable-comdat         enable COMDAT group support
 
1708
+
 
1709
+  --enable-fix-cortex-a53-835769
 
1710
+                          enable workaround for AArch64 Cortex-A53 erratum
 
1711
+                          835769 by default
 
1712
+  --disable-fix-cortex-a53-835769
 
1713
+                          disable workaround for AArch64 Cortex-A53 erratum
 
1714
+                          835769 by default
 
1715
+
 
1716
   --enable-gnu-unique-object
 
1717
                           enable the use of the @gnu_unique_object ELF
 
1718
                           extension on glibc systems
 
1719
@@ -17838,7 +17847,7 @@
 
1720
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1721
   lt_status=$lt_dlunknown
 
1722
   cat > conftest.$ac_ext <<_LT_EOF
 
1723
-#line 17841 "configure"
 
1724
+#line 17850 "configure"
 
1725
 #include "confdefs.h"
 
1726
 
 
1727
 #if HAVE_DLFCN_H
 
1728
@@ -17944,7 +17953,7 @@
 
1729
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1730
   lt_status=$lt_dlunknown
 
1731
   cat > conftest.$ac_ext <<_LT_EOF
 
1732
-#line 17947 "configure"
 
1733
+#line 17956 "configure"
 
1734
 #include "confdefs.h"
 
1735
 
 
1736
 #if HAVE_DLFCN_H
 
1737
@@ -23796,6 +23805,28 @@
 
1738
 $as_echo "$gcc_cv_lto_plugin" >&6; }
 
1739
 
 
1740
 case "$target" in
 
1741
+
 
1742
+  aarch64*-*-*)
 
1743
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
1744
+    # Check whether --enable-fix-cortex-a53-835769 was given.
 
1745
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
 
1746
+  enableval=$enable_fix_cortex_a53_835769;
 
1747
+        case $enableval in
 
1748
+          yes)
 
1749
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
1750
+            ;;
 
1751
+          no)
 
1752
+            ;;
 
1753
+          *)
 
1754
+            as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
1755
+  Valid choices are 'yes' and 'no'." "$LINENO" 5
 
1756
+            ;;
 
1757
+
 
1758
+        esac
 
1759
+
 
1760
+fi
 
1761
+
 
1762
+  ;;
 
1763
   # All TARGET_ABI_OSF targets.
 
1764
   alpha*-*-linux* | alpha*-*-*bsd*)
 
1765
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
 
1766
Index: gcc/fold-const.c
 
1767
===================================================================
 
1768
--- a/src/gcc/fold-const.c      (.../tags/gcc_4_8_3_release)
 
1769
+++ b/src/gcc/fold-const.c      (.../branches/gcc-4_8-branch)
 
1770
@@ -8929,7 +8929,8 @@
 
1771
       /* If the constant operation overflowed this can be
 
1772
         simplified as a comparison against INT_MAX/INT_MIN.  */
 
1773
       if (TREE_CODE (lhs) == INTEGER_CST
 
1774
-         && TREE_OVERFLOW (lhs))
 
1775
+         && TREE_OVERFLOW (lhs)
 
1776
+         && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
 
1777
        {
 
1778
          int const1_sgn = tree_int_cst_sgn (const1);
 
1779
          enum tree_code code2 = code;
 
1780
@@ -9213,7 +9214,7 @@
 
1781
   /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
 
1782
      X CMP Y +- C2 +- C1 for signed X, Y.  This is valid if
 
1783
      the resulting offset is smaller in absolute value than the
 
1784
-     original one.  */
 
1785
+     original one and has the same sign.  */
 
1786
   if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
 
1787
       && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
 
1788
       && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
 
1789
@@ -9232,19 +9233,20 @@
 
1790
                                      "a comparison");
 
1791
 
 
1792
       /* Put the constant on the side where it doesn't overflow and is
 
1793
-        of lower absolute value than before.  */
 
1794
+        of lower absolute value and of same sign than before.  */
 
1795
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1796
                             ? MINUS_EXPR : PLUS_EXPR,
 
1797
                             const2, const1);
 
1798
       if (!TREE_OVERFLOW (cst)
 
1799
-         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
 
1800
+         && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
 
1801
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
 
1802
        {
 
1803
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1804
          return fold_build2_loc (loc, code, type,
 
1805
-                             variable1,
 
1806
-                             fold_build2_loc (loc,
 
1807
-                                          TREE_CODE (arg1), TREE_TYPE (arg1),
 
1808
-                                          variable2, cst));
 
1809
+                                 variable1,
 
1810
+                                 fold_build2_loc (loc, TREE_CODE (arg1),
 
1811
+                                                  TREE_TYPE (arg1),
 
1812
+                                                  variable2, cst));
 
1813
        }
 
1814
 
 
1815
       cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
 
1816
@@ -9251,13 +9253,15 @@
 
1817
                             ? MINUS_EXPR : PLUS_EXPR,
 
1818
                             const1, const2);
 
1819
       if (!TREE_OVERFLOW (cst)
 
1820
-         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
 
1821
+         && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
 
1822
+         && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
 
1823
        {
 
1824
          fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
 
1825
          return fold_build2_loc (loc, code, type,
 
1826
-                             fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
 
1827
-                                          variable1, cst),
 
1828
-                             variable2);
 
1829
+                                 fold_build2_loc (loc, TREE_CODE (arg0),
 
1830
+                                                  TREE_TYPE (arg0),
 
1831
+                                                  variable1, cst),
 
1832
+                                 variable2);
 
1833
        }
 
1834
     }
 
1835
 
 
1836
@@ -11218,7 +11222,6 @@
 
1837
        {
 
1838
          double_int c1, c2, c3, msk;
 
1839
          int width = TYPE_PRECISION (type), w;
 
1840
-         bool try_simplify = true;
 
1841
 
 
1842
          c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
 
1843
          c2 = tree_to_double_int (arg1);
 
1844
@@ -11255,20 +11258,7 @@
 
1845
                }
 
1846
            }
 
1847
 
 
1848
-         /* If X is a tree of the form (Y * K1) & K2, this might conflict
 
1849
-            with that optimization from the BIT_AND_EXPR optimizations.
 
1850
-            This could end up in an infinite recursion.  */
 
1851
-         if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
 
1852
-             && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
 
1853
-                           == INTEGER_CST)
 
1854
-         {
 
1855
-           tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
 
1856
-           double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
 
1857
-
 
1858
-           try_simplify = (masked != c1);
 
1859
-         }
 
1860
-
 
1861
-         if (try_simplify && c3 != c1)
 
1862
+         if (c3 != c1)
 
1863
            return fold_build2_loc (loc, BIT_IOR_EXPR, type,
 
1864
                                    fold_build2_loc (loc, BIT_AND_EXPR, type,
 
1865
                                                     TREE_OPERAND (arg0, 0),
 
1866
@@ -11658,16 +11648,25 @@
 
1867
          && TREE_CODE (arg0) == MULT_EXPR
 
1868
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
 
1869
        {
 
1870
+         double_int darg1 = tree_to_double_int (arg1);
 
1871
          double_int masked
 
1872
-           = mask_with_tz (type, tree_to_double_int (arg1),
 
1873
+           = mask_with_tz (type, darg1,
 
1874
                            tree_to_double_int (TREE_OPERAND (arg0, 1)));
 
1875
 
 
1876
          if (masked.is_zero ())
 
1877
            return omit_two_operands_loc (loc, type, build_zero_cst (type),
 
1878
                                          arg0, arg1);
 
1879
-         else if (masked != tree_to_double_int (arg1))
 
1880
-           return fold_build2_loc (loc, code, type, op0,
 
1881
-                                   double_int_to_tree (type, masked));
 
1882
+         else if (masked != darg1)
 
1883
+           {
 
1884
+             /* Avoid the transform if arg1 is a mask of some
 
1885
+                mode which allows further optimizations.  */
 
1886
+             int pop = darg1.popcount ();
 
1887
+             if (!(pop >= BITS_PER_UNIT
 
1888
+                   && exact_log2 (pop) != -1
 
1889
+                   && double_int::mask (pop) == darg1))
 
1890
+               return fold_build2_loc (loc, code, type, op0,
 
1891
+                                       double_int_to_tree (type, masked));
 
1892
+           }
 
1893
        }
 
1894
 
 
1895
       /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
 
1896
@@ -13083,6 +13082,8 @@
 
1897
          tree arg01 = TREE_OPERAND (arg0, 1);
 
1898
          tree itype = TREE_TYPE (arg00);
 
1899
          if (TREE_INT_CST_HIGH (arg01) == 0
 
1900
+             && !(TREE_CODE (itype) == COMPLEX_TYPE
 
1901
+                  || TREE_CODE (itype) == VECTOR_TYPE)
 
1902
              && TREE_INT_CST_LOW (arg01)
 
1903
                 == (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
 
1904
            {
 
1905
Index: gcc/omp-low.c
 
1906
===================================================================
 
1907
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
 
1908
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
 
1909
@@ -1586,7 +1586,6 @@
 
1910
   TREE_STATIC (decl) = 1;
 
1911
   TREE_USED (decl) = 1;
 
1912
   DECL_ARTIFICIAL (decl) = 1;
 
1913
-  DECL_NAMELESS (decl) = 1;
 
1914
   DECL_IGNORED_P (decl) = 0;
 
1915
   TREE_PUBLIC (decl) = 0;
 
1916
   DECL_UNINLINABLE (decl) = 1;
 
1917
Index: gcc/toplev.c
 
1918
===================================================================
 
1919
--- a/src/gcc/toplev.c  (.../tags/gcc_4_8_3_release)
 
1920
+++ b/src/gcc/toplev.c  (.../branches/gcc-4_8-branch)
 
1921
@@ -1036,16 +1036,19 @@
 
1922
 
 
1923
   if (warn_stack_usage >= 0)
 
1924
     {
 
1925
+      const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
 
1926
+
 
1927
       if (stack_usage_kind == DYNAMIC)
 
1928
-       warning (OPT_Wstack_usage_, "stack usage might be unbounded");
 
1929
+       warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
 
1930
       else if (stack_usage > warn_stack_usage)
 
1931
        {
 
1932
          if (stack_usage_kind == DYNAMIC_BOUNDED)
 
1933
-           warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
1934
-                    stack_usage);
 
1935
+           warning_at (loc,
 
1936
+                       OPT_Wstack_usage_, "stack usage might be %wd bytes",
 
1937
+                       stack_usage);
 
1938
          else
 
1939
-           warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
 
1940
-                    stack_usage);
 
1941
+           warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
 
1942
+                       stack_usage);
 
1943
        }
 
1944
     }
 
1945
 }
 
1946
Index: gcc/tree-ssa-sccvn.c
 
1947
===================================================================
 
1948
--- a/src/gcc/tree-ssa-sccvn.c  (.../tags/gcc_4_8_3_release)
 
1949
+++ b/src/gcc/tree-ssa-sccvn.c  (.../branches/gcc-4_8-branch)
 
1950
@@ -3015,33 +3015,12 @@
 
1951
   /* If all value numbered to the same value, the phi node has that
 
1952
      value.  */
 
1953
   if (allsame)
 
1954
-    {
 
1955
-      if (is_gimple_min_invariant (sameval))
 
1956
-       {
 
1957
-         VN_INFO (PHI_RESULT (phi))->has_constants = true;
 
1958
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
1959
-       }
 
1960
-      else
 
1961
-       {
 
1962
-         VN_INFO (PHI_RESULT (phi))->has_constants = false;
 
1963
-         VN_INFO (PHI_RESULT (phi))->expr = sameval;
 
1964
-       }
 
1965
+    return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
1966
 
 
1967
-      if (TREE_CODE (sameval) == SSA_NAME)
 
1968
-       return visit_copy (PHI_RESULT (phi), sameval);
 
1969
-
 
1970
-      return set_ssa_val_to (PHI_RESULT (phi), sameval);
 
1971
-    }
 
1972
-
 
1973
   /* Otherwise, see if it is equivalent to a phi node in this block.  */
 
1974
   result = vn_phi_lookup (phi);
 
1975
   if (result)
 
1976
-    {
 
1977
-      if (TREE_CODE (result) == SSA_NAME)
 
1978
-       changed = visit_copy (PHI_RESULT (phi), result);
 
1979
-      else
 
1980
-       changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
1981
-    }
 
1982
+    changed = set_ssa_val_to (PHI_RESULT (phi), result);
 
1983
   else
 
1984
     {
 
1985
       vn_phi_insert (phi, PHI_RESULT (phi));
 
1986
@@ -3142,24 +3121,18 @@
 
1987
      catch those with constants.  The goal here is to simultaneously
 
1988
      combine constants between expressions, but avoid infinite
 
1989
      expansion of expressions during simplification.  */
 
1990
-  if (TREE_CODE (op0) == SSA_NAME)
 
1991
-    {
 
1992
-      if (VN_INFO (op0)->has_constants
 
1993
+  op0 = vn_valueize (op0);
 
1994
+  if (TREE_CODE (op0) == SSA_NAME
 
1995
+      && (VN_INFO (op0)->has_constants
 
1996
          || TREE_CODE_CLASS (code) == tcc_comparison
 
1997
-         || code == COMPLEX_EXPR)
 
1998
-       op0 = valueize_expr (vn_get_expr_for (op0));
 
1999
-      else
 
2000
-       op0 = vn_valueize (op0);
 
2001
-    }
 
2002
+         || code == COMPLEX_EXPR))
 
2003
+    op0 = valueize_expr (vn_get_expr_for (op0));
 
2004
 
 
2005
-  if (TREE_CODE (op1) == SSA_NAME)
 
2006
-    {
 
2007
-      if (VN_INFO (op1)->has_constants
 
2008
-         || code == COMPLEX_EXPR)
 
2009
-       op1 = valueize_expr (vn_get_expr_for (op1));
 
2010
-      else
 
2011
-       op1 = vn_valueize (op1);
 
2012
-    }
 
2013
+  op1 = vn_valueize (op1);
 
2014
+  if (TREE_CODE (op1) == SSA_NAME
 
2015
+      && (VN_INFO (op1)->has_constants
 
2016
+         || code == COMPLEX_EXPR))
 
2017
+    op1 = valueize_expr (vn_get_expr_for (op1));
 
2018
 
 
2019
   /* Pointer plus constant can be represented as invariant address.
 
2020
      Do so to allow further propatation, see also tree forwprop.  */
 
2021
@@ -3217,27 +3190,31 @@
 
2022
     return NULL_TREE;
 
2023
 
 
2024
   orig_op0 = op0;
 
2025
-  if (VN_INFO (op0)->has_constants)
 
2026
-    op0 = valueize_expr (vn_get_expr_for (op0));
 
2027
-  else if (CONVERT_EXPR_CODE_P (code)
 
2028
-          || code == REALPART_EXPR
 
2029
-          || code == IMAGPART_EXPR
 
2030
-          || code == VIEW_CONVERT_EXPR
 
2031
-          || code == BIT_FIELD_REF)
 
2032
+  op0 = vn_valueize (op0);
 
2033
+  if (TREE_CODE (op0) == SSA_NAME)
 
2034
     {
 
2035
-      /* We want to do tree-combining on conversion-like expressions.
 
2036
-         Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2037
-      tree tem = valueize_expr (vn_get_expr_for (op0));
 
2038
-      if (UNARY_CLASS_P (tem)
 
2039
-         || BINARY_CLASS_P (tem)
 
2040
-         || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2041
-         || TREE_CODE (tem) == SSA_NAME
 
2042
-         || TREE_CODE (tem) == CONSTRUCTOR
 
2043
-         || is_gimple_min_invariant (tem))
 
2044
-       op0 = tem;
 
2045
+      if (VN_INFO (op0)->has_constants)
 
2046
+       op0 = valueize_expr (vn_get_expr_for (op0));
 
2047
+      else if (CONVERT_EXPR_CODE_P (code)
 
2048
+              || code == REALPART_EXPR
 
2049
+              || code == IMAGPART_EXPR
 
2050
+              || code == VIEW_CONVERT_EXPR
 
2051
+              || code == BIT_FIELD_REF)
 
2052
+       {
 
2053
+         /* We want to do tree-combining on conversion-like expressions.
 
2054
+            Make sure we feed only SSA_NAMEs or constants to fold though.  */
 
2055
+         tree tem = valueize_expr (vn_get_expr_for (op0));
 
2056
+         if (UNARY_CLASS_P (tem)
 
2057
+             || BINARY_CLASS_P (tem)
 
2058
+             || TREE_CODE (tem) == VIEW_CONVERT_EXPR
 
2059
+             || TREE_CODE (tem) == SSA_NAME
 
2060
+             || TREE_CODE (tem) == CONSTRUCTOR
 
2061
+             || is_gimple_min_invariant (tem))
 
2062
+           op0 = tem;
 
2063
+       }
 
2064
     }
 
2065
 
 
2066
-  /* Avoid folding if nothing changed, but remember the expression.  */
 
2067
+  /* Avoid folding if nothing changed.  */
 
2068
   if (op0 == orig_op0)
 
2069
     return NULL_TREE;
 
2070
 
 
2071
Index: gcc/cgraphunit.c
 
2072
===================================================================
 
2073
--- a/src/gcc/cgraphunit.c      (.../tags/gcc_4_8_3_release)
 
2074
+++ b/src/gcc/cgraphunit.c      (.../branches/gcc-4_8-branch)
 
2075
@@ -1097,7 +1097,7 @@
 
2076
          /* We use local aliases for C++ thunks to force the tailcall
 
2077
             to bind locally.  This is a hack - to keep it working do
 
2078
             the following (which is not strictly correct).  */
 
2079
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
 
2080
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
 
2081
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
 
2082
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
 
2083
        {
 
2084
Index: gcc/ChangeLog
 
2085
===================================================================
 
2086
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
 
2087
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
 
2088
@@ -1,3 +1,1067 @@
 
2089
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
2090
+
 
2091
+       Backport from mainline
 
2092
+       2014-10-08  Richard Biener  <rguenther@suse.de>
 
2093
+
 
2094
+       PR tree-optimization/61969
 
2095
+       * tree-nrv.c (pass_nrv::execute): Properly test for automatic
 
2096
+       variables.
 
2097
+
 
2098
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
2099
+
 
2100
+       PR tree-optimization/62031
 
2101
+       * tree-data-ref.c (dr_analyze_indices): Do not set
 
2102
+       DR_UNCONSTRAINED_BASE.
 
2103
+       (dr_may_alias_p): All indirect accesses have to go the
 
2104
+       formerly DR_UNCONSTRAINED_BASE path.
 
2105
+       * tree-data-ref.h (struct indices): Remove
 
2106
+       unconstrained_base member.
 
2107
+       (DR_UNCONSTRAINED_BASE): Remove.
 
2108
+
 
2109
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
2110
+
 
2111
+       PR tree-optimization/63379
 
2112
+       * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
 
2113
+       a neutral operand for min/max when it is not a reduction chain.
 
2114
+
 
2115
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
2116
+
 
2117
+       PR tree-optimization/63605
 
2118
+       * fold-const.c (fold_binary_loc): Properly use element_precision
 
2119
+       for types that may not be scalar.
 
2120
+
 
2121
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
2122
+
 
2123
+       PR middle-end/63665
 
2124
+       * fold-const.c (fold_comparison): Properly guard simplifying
 
2125
+       against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
 
2126
+
 
2127
+2014-11-22  Oleg Endo  <olegendo@gcc.gnu.org>
 
2128
+
 
2129
+       Backport from mainline
 
2130
+       2014-11-20  Segher Boessenkool  <segher@kernel.crashing.org>
 
2131
+
 
2132
+       PR target/60111
 
2133
+       * config/sh/sh.c: Use signed char for signed field.
 
2134
+
 
2135
+2014-11-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2136
+
 
2137
+       PR target/63673
 
2138
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
 
2139
+       the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
 
2140
+       double.
 
2141
+
 
2142
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
2143
+
 
2144
+       PR target/63947
 
2145
+       * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
 
2146
+       Output "b" and "nb" suffix for FP mode.
 
2147
+
 
2148
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
2149
+
 
2150
+       Backport from mainline
 
2151
+       PR tree-optimization/62167
 
2152
+       * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
 
2153
+       conservatively.
 
2154
+       (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
 
2155
+       assigns.
 
2156
+
 
2157
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
2158
+
 
2159
+       Backport from mainline and gcc-4_9 branch.
 
2160
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
2161
+
 
2162
+       PR tree-optimization/63841
 
2163
+       * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
 
2164
+
 
2165
+2014-11-16  Eric Botcazou  <ebotcazou@adacore.com>
 
2166
+
 
2167
+       * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
 
2168
+       * doc/tm.texi: Regenerate.
 
2169
+
 
2170
+       Backport from mainline
 
2171
+       2013-09-16  Andreas Schwab  <schwab@linux-m68k.org>
 
2172
+
 
2173
+       * doc/tm.texi.in (Cond Exec Macros): Remove node.
 
2174
+       (Condition Code): Don't reference it.
 
2175
+       * doc/tm.texi: Regenerate.
 
2176
+
 
2177
+2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>
 
2178
+
 
2179
+       Backport from mainline
 
2180
+       2014-11-02  Michael Collison  <michael.collison@linaro.org>
 
2181
+
 
2182
+       * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
 
2183
+       to support vector modes.
 
2184
+       (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
 
2185
+
 
2186
+2014-11-13  Eric Botcazou  <ebotcazou@adacore.com>
 
2187
+
 
2188
+       * doc/tm.texi.in (SELECT_CC_MODE): Update example.
 
2189
+       (REVERSIBLE_CC_MODE): Fix example.
 
2190
+       (REVERSE_CONDITION): Fix typo.
 
2191
+       * doc/tm.texi: Regenerate.
 
2192
+
 
2193
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
2194
+
 
2195
+       PR ipa/63838
 
2196
+       * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
 
2197
+       chain instead of node->indirect_calls.
 
2198
+
 
2199
+2014-11-10  Daniel Hellstrom  <daniel@gaisler.com>
 
2200
+
 
2201
+       Backport from mainline
 
2202
+       * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
 
2203
+       * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
 
2204
+
 
2205
+2014-11-07  Daniel Hellstrom  <daniel@gaisler.com>
 
2206
+
 
2207
+       * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
 
2208
+       * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
 
2209
+       * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
 
2210
+       leon3v7 as leon3.
 
2211
+       * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
 
2212
+       * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
 
2213
+       * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
 
2214
+       * config/sparc/sparc.md (cpu): Add leon3v7.
 
2215
+       * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
 
2216
+
 
2217
+2014-11-06  John David Anglin  <danglin@gcc.gnu.org>
 
2218
+
 
2219
+       * config/pa/pa.md (trap): New insn.  Add "trap" to attribute type.
 
2220
+       Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
 
2221
+       or in_call_delay.
 
2222
+       
 
2223
+2014-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2224
+
 
2225
+       * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
 
2226
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
2227
+       * config/aarch64/aarch64-linux.h
 
2228
+       (CA53_ERR_835769_SPEC): Define.
 
2229
+       (LINK_SPEC): Include CA53_ERR_835769_SPEC.
 
2230
+
 
2231
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2232
+
 
2233
+       * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
 
2234
+       recog state after aarch64_prev_real_insn call.
 
2235
+
 
2236
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2237
+
 
2238
+       * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
 
2239
+       if asked.
 
2240
+       * configure.ac: Add --enable-fix-cortex-a53-835769 option.
 
2241
+       * configure: Regenerate.
 
2242
+       * config/aarch64/aarch64.c (aarch64_override_options): Handle
 
2243
+       TARGET_FIX_ERR_A53_835769_DEFAULT.
 
2244
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
 
2245
+       to 2.
 
2246
+       * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
 
2247
+
 
2248
+2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
2249
+
 
2250
+       * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
 
2251
+       * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
 
2252
+       (FINAL_PRESCAN_INSN): Likewise.
 
2253
+       * config/aarch64/aarch64.h (is_mem_p): New function.
 
2254
+       (has_memory_op): Likewise.
 
2255
+       (aarch64_prev_real_insn): Likewise.
 
2256
+       (is_madd_op): Likewise.
 
2257
+       (dep_between_memop_and_curr): Likewise.
 
2258
+       (aarch64_madd_needs_nop): Likewise.
 
2259
+       (aarch64_final_prescan_insn): Likewise.
 
2260
+       * doc/invoke.texi (Document new option).
 
2261
+
 
2262
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
2263
+
 
2264
+       * stor-layout.c (self_referential_size): Do not promote arguments.
 
2265
+
 
2266
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2267
+
 
2268
+       Backport from mainline r215880
 
2269
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2270
+
 
2271
+       * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
 
2272
+       Issue a warning message when vec_lvsl or vec_lvsr is used with a
 
2273
+       little endian target.
 
2274
+
 
2275
+       Backport from mainline r215882
 
2276
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2277
+
 
2278
+       * altivec.md (altivec_lvsl): New define_expand.
 
2279
+       (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
 
2280
+       (altivec_lvsr): New define_expand.
 
2281
+       (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
 
2282
+       * rs6000.c (rs6000_expand_builtin): Change to use
 
2283
+       altivec_lvs[lr]_direct; remove commented-out code.
 
2284
+
 
2285
+2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
2286
+
 
2287
+       Backport from mainline
 
2288
+       2014-10-09  Uros Bizjak  <ubizjak@gmail.com>
 
2289
+
 
2290
+       PR rtl-optimization/57003
 
2291
+       * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
 
2292
+       also check CALL_INSN_FUNCTION_USAGE for clobbers again after
 
2293
+       killing regs_invalidated_by_call.
 
2294
+
 
2295
+2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
2296
+
 
2297
+       Backport from mainline
 
2298
+       2014-10-08  Oleg Endo  <olegendo@gcc.gnu.org>
 
2299
+
 
2300
+       PR target/52941
 
2301
+       * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
 
2302
+       atomic_fetch_<fetchop_name>si_hard,
 
2303
+       atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
 
2304
+       atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
 
2305
+       atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
 
2306
+       atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
 
2307
+
 
2308
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
 
2309
+
 
2310
+       PR tree-optimization/63375
 
2311
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
 
2312
+       references.
 
2313
+
 
2314
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
2315
+
 
2316
+       PR debug/63342
 
2317
+       * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
 
2318
+       SSA_NAME.
 
2319
+
 
2320
+       PR target/63428
 
2321
+       * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
 
2322
+       argument to avx2_permv2ti.
 
2323
+
 
2324
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
2325
+
 
2326
+       Backport from mainline
 
2327
+       2014-09-30  Uros Bizjak  <ubizjak@gmail.com>
 
2328
+
 
2329
+       * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
 
2330
+       (fmod<mode>3): Ditto.
 
2331
+       (fpremxf4_i387): Ditto.
 
2332
+       (reminderxf3): Ditto.
 
2333
+       (reminder<mode>3): Ditto.
 
2334
+       (fprem1xf4_i387): Ditto.
 
2335
+
 
2336
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
2337
+
 
2338
+       PR inline-asm/63282
 
2339
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
 
2340
+       or invert_jump_1 if jump isn't any_condjump_p.
 
2341
+
 
2342
+2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
 
2343
+
 
2344
+       Backport from mainline r212303
 
2345
+       PR target/49423
 
2346
+       * config/arm/arm-protos.h (arm_legitimate_address_p,
 
2347
+       arm_is_constant_pool_ref): Add prototypes.
 
2348
+       * config/arm/arm.c (arm_legitimate_address_p): Remove static.
 
2349
+       (arm_is_constant_pool_ref) New function.
 
2350
+       * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
 
2351
+       arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
 
2352
+       (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
 
2353
+       operand and remove pool_range and neg_pool_range attributes.
 
2354
+       (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
 
2355
+       pool_range and neg_pool_range attributes.
 
2356
+       * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
 
2357
+       constant pool references.
 
2358
+
 
2359
+2014-09-28  John David Anglin  <danglin@gcc.gnu.org>
 
2360
+
 
2361
+       * config/pa/pa.c (pa_output_function_epilogue): Only update
 
2362
+       last_address when a nonnote insn is found.
 
2363
+
 
2364
+2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
2365
+
 
2366
+       Backport from mainline
 
2367
+       2014-09-25  Nick Clifton  <nickc@redhat.com>
 
2368
+       2014-09-25  Oleg Endo  <olegendo@gcc.gnu.org>
 
2369
+
 
2370
+       PR target/62218
 
2371
+       * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
 
2372
+       atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
 
2373
+
 
2374
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2375
+
 
2376
+       Backport from mainline r215559
 
2377
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2378
+
 
2379
+       PR target/63335
 
2380
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
 
2381
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
 
2382
+
 
2383
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
2384
+
 
2385
+       PR tree-optimization/63341
 
2386
+       * tree-vectorizer.h (vect_create_data_ref_ptr,
 
2387
+       vect_create_addr_base_for_vector_ref): Add another tree argument
 
2388
+       defaulting to NULL_TREE.
 
2389
+       * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
 
2390
+       argument, pass it down to vect_create_addr_base_for_vector_ref.
 
2391
+       (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
 
2392
+       add that to base_offset too if non-NULL.
 
2393
+       * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
 
2394
+       for dr_explicit_realign_optimized set it to vector byte size
 
2395
+       - 1 instead of setting offset, pass byte_offset down to
 
2396
+       vect_create_data_ref_ptr.
 
2397
+
 
2398
+2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2399
+
 
2400
+       Back port from trunk:
 
2401
+       2014-09-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2402
+
 
2403
+       * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
 
2404
+       refine the constraints used on 32/64-bit floating point moves.
 
2405
+       (f32_av): Likewise.
 
2406
+       (f64_vsx): Likewise.
 
2407
+       (f64_dm): Likewise.
 
2408
+       (f64_av): Likewise.
 
2409
+       (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
 
2410
+       (BOOL_REGS_OP1): Likewise.
 
2411
+       (BOOL_REGS_OP2): Likewise.
 
2412
+       (BOOL_REGS_UNARY): Likewise.
 
2413
+       (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
 
2414
+       32/64-bit floating point moves.  Do not use wa, instead use ww/ws
 
2415
+       for moves involving VSX registers.  Do not use constraints that
 
2416
+       target VSX registers for decimal types.
 
2417
+       (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
 
2418
+       (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
 
2419
+
 
2420
+2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2421
+
 
2422
+       Back port from trunk:
 
2423
+       2014-09-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2424
+
 
2425
+       * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
 
2426
+       for base_reg_operand to be common between LO_SUM and PLUS.
 
2427
+       (fusion_gpr_mem_combo): New predicate to match a fused address
 
2428
+       that combines the addis and memory offset address.
 
2429
+
 
2430
+       * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
 
2431
+       calling signature.
 
2432
+       (emit_fusion_gpr_load): Likewise.
 
2433
+
 
2434
+       * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
 
2435
+       signature to pass each argument separately, rather than
 
2436
+       using an operands array.  Rewrite the insns found by peephole2 to
 
2437
+       be a single insn, rather than hoping the insns will still be
 
2438
+       together when the peephole pass is done.  Drop being called via a
 
2439
+       normal peephole.
 
2440
+       (emit_fusion_gpr_load): Change calling signature to be called from
 
2441
+       the fusion_gpr_load_<mode> insns with a combined memory address
 
2442
+       instead of the peephole pass passing the addis and offset
 
2443
+       separately.
 
2444
+
 
2445
+       * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
 
2446
+       fusion.
 
2447
+       (power8 fusion peephole): Drop support for doing power8 via a
 
2448
+       normal peephole that was created by the peephole2 pass.
 
2449
+       (power8 fusion peephole2): Create a new insn with the fused
 
2450
+       address, so that the fused operation is kept together after
 
2451
+       register allocation is done.
 
2452
+       (fusion_gpr_load_<mode>): Likewise.
 
2453
+
 
2454
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
2455
+
 
2456
+       PR debug/63284
 
2457
+       * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
 
2458
+       if there are only debug stmts after the noreturn call, instead
 
2459
+       remove the debug stmts.
 
2460
+
 
2461
+2014-09-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2462
+
 
2463
+       * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
 
2464
+       V2DF, V4SF, DF, and DI modes.
 
2465
+       (vsx_fmav2df2): Likewise.
 
2466
+       (vsx_float_fix_<mode>2): Likewise.
 
2467
+       (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
 
2468
+
 
2469
+2014-09-10  Alan Modra  <amodra@gmail.com>
 
2470
+
 
2471
+       PR debug/60655
 
2472
+       * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
 
2473
+       can't be output.
 
2474
+
 
2475
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
2476
+
 
2477
+       Backport from mainline
 
2478
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
2479
+
 
2480
+       PR tree-optimization/61452
 
2481
+       * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
 
2482
+       expr and has_constants in case we found a leader.
 
2483
+       (simplify_binary_expression): Always valueize operands first.
 
2484
+       (simplify_unary_expression): Likewise.
 
2485
+
 
2486
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
2487
+
 
2488
+       Backport from mainline
 
2489
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
2490
+
 
2491
+       PR middle-end/61010
 
2492
+       * fold-const.c (fold_binary_loc): Consistently avoid
 
2493
+       canonicalizing X & CST away from a CST that is the mask
 
2494
+       of a mode.
 
2495
+
 
2496
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
2497
+
 
2498
+       PR middle-end/61045
 
2499
+       * fold-const.c (fold_comparison): When folding
 
2500
+       X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
 
2501
+       the sign of the remaining constant operand stays the same.
 
2502
+
 
2503
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
2504
+
 
2505
+       PR tree-optimization/62075
 
2506
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
 
2507
+       handle uses in patterns.
 
2508
+
 
2509
+2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2510
+
 
2511
+       Backport from mainline.
 
2512
+       2014-09-09  James Greenhalgh  <james.greenhalgh@arm.com>
 
2513
+
 
2514
+       * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
 
2515
+       (-mtune): Likewise.
 
2516
+       (-mcpu): Likewise.
 
2517
+
 
2518
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2519
+
 
2520
+       PR tree-optimization/60196
 
2521
+       PR tree-optimization/63189
 
2522
+       Backported from mainline
 
2523
+       2013-09-17  Cong Hou  <congh@google.com>
 
2524
+
 
2525
+       * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
 
2526
+       when checking the dot production pattern. The type of rhs operand
 
2527
+       of multiply is now checked correctly.
 
2528
+
 
2529
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
2530
+
 
2531
+       Backported from mainline
 
2532
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
2533
+
 
2534
+       PR debug/61923
 
2535
+       * haifa-sched.c (advance_one_cycle): Fix dump.
 
2536
+       (schedule_block): Don't advance cycle if we are already at the
 
2537
+       beginning of the cycle.
 
2538
+
 
2539
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2540
+
 
2541
+       PR ipa/62015
 
2542
+       * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
 
2543
+       pass-trough jump functions correctly.
 
2544
+
 
2545
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
2546
+
 
2547
+       PR ipa/61986
 
2548
+       * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
 
2549
+       created replacements in ascending order of offsets.
 
2550
+       (known_aggs_to_agg_replacement_list): Likewise.
 
2551
+
 
2552
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2553
+
 
2554
+       Backport from mainline
 
2555
+       2014-08-21  Marek Polacek  <polacek@redhat.com>
 
2556
+
 
2557
+       PR c/61271
 
2558
+       * expr.c (is_aligning_offset): Remove logical not.
 
2559
+
 
2560
+2014-09-01  Marek Polacek  <polacek@redhat.com>
 
2561
+
 
2562
+       Backport from mainline
 
2563
+       2014-08-19  Marek Polacek  <polacek@redhat.com>
 
2564
+
 
2565
+       PR c/61271
 
2566
+       * cgraphunit.c (handle_alias_pairs): Fix condition.
 
2567
+
 
2568
+2014-08-30  John David Anglin  <danglin@gcc.gnu.org>
 
2569
+
 
2570
+       * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
 
2571
+       prefix to function labels when generating fast indirect calls.
 
2572
+
 
2573
+2014-08-26  Joel Sherrill <joel.sherrill@oarcorp.com>
 
2574
+
 
2575
+       * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
 
2576
+
 
2577
+2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2578
+
 
2579
+       Backport from mainline
 
2580
+       2014-08-26  Marek Polacek  <polacek@redhat.com>
 
2581
+
 
2582
+       PR c/61271
 
2583
+       * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
 
2584
+       LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
 
2585
+
 
2586
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2587
+
 
2588
+       Backport from mainline
 
2589
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
2590
+
 
2591
+       PR target/61996
 
2592
+       * config/sh/sh.opt (musermode): Allow negative form.
 
2593
+       * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
 
2594
+       targets that don't support it.
 
2595
+       * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
 
2596
+       Document -mno-usermode option.
 
2597
+
 
2598
+2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
 
2599
+
 
2600
+       PR target/62038
 
2601
+       * config/pa/pa.c (pa_output_function_epilogue): Don't set
 
2602
+       last_address when the current function is a thunk.
 
2603
+       (pa_asm_output_mi_thunk): When we don't have named sections or they
 
2604
+       are not being used, check that thunk can reach the stub table with a
 
2605
+       short branch.
 
2606
+
 
2607
+2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2608
+
 
2609
+       Backport fro mainline
 
2610
+       2014-08-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2611
+
 
2612
+       PR target/62195
 
2613
+       * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
 
2614
+       documentation to state it is only for VSX operations.
 
2615
+
 
2616
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
 
2617
+       constraint only active if VSX.
 
2618
+
 
2619
+       * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
 
2620
+       wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
 
2621
+       (lfiwzx): Likewise.
 
2622
+
 
2623
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
2624
+
 
2625
+       Backport from mainline:
 
2626
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
2627
+
 
2628
+       PR rtl-optimization/62004
 
2629
+       PR rtl-optimization/62030
 
2630
+       * ifcvt.c (rtx_interchangeable_p): New function.
 
2631
+       (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
 
2632
+
 
2633
+       2014-08-05  Richard Biener  <rguenther@suse.de>
 
2634
+
 
2635
+       * emit-rtl.h (mem_attrs_eq_p): Declare.
 
2636
+       * emit-rtl.c (mem_attrs_eq_p): Export.
 
2637
+
 
2638
+2014-08-16  John David Anglin  <danglin@gcc.gnu.org>
 
2639
+
 
2640
+       Backport from trunk:
 
2641
+       2014-04-06  John David Anglin  <danglin@gcc.gnu.org>
 
2642
+
 
2643
+       PR debug/55794
 
2644
+       * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
 
2645
+       size accounting for thunks.
 
2646
+       (pa_asm_output_mi_thunk): Use final_start_function() and
 
2647
+       final_end_function() to output function start and end directives.
 
2648
+
 
2649
+2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2650
+
 
2651
+       Backport from mainline:
 
2652
+       2014-08-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
2653
+
 
2654
+       * doc/invoke.texi (SH options): Document missing processor variant
 
2655
+       options.  Remove references to Hitachi.  Undocument deprecated mspace
 
2656
+       option.
 
2657
+
 
2658
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
2659
+
 
2660
+       PR tree-optimization/62073
 
2661
+       * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
 
2662
+       a basic block.
 
2663
+
 
2664
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2665
+
 
2666
+       Backport from mainline
 
2667
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2668
+
 
2669
+       PR middle-end/62103
 
2670
+       * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
 
2671
+       bitfields, that is when size doesn't match the size of type or the
 
2672
+       size of the constructor.
 
2673
+
 
2674
+2014-08-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2675
+
 
2676
+       Backport patch from mainline
 
2677
+       2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
2678
+
 
2679
+       * config/rs6000/constraints.md (wh constraint): New constraint,
 
2680
+       for FP registers if direct move is available.
 
2681
+       (wi constraint): New constraint, for VSX/FP registers that can
 
2682
+       handle 64-bit integers.
 
2683
+       (wj constraint): New constraint for VSX/FP registers that can
 
2684
+       handle 64-bit integers for direct moves.
 
2685
+       (wk constraint): New constraint for VSX/FP registers that can
 
2686
+       handle 64-bit doubles for direct moves.
 
2687
+       (wy constraint): Make documentation match implementation.
 
2688
+
 
2689
+       * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
 
2690
+       scalar_in_vmx_p field to simplify tests of whether SFmode or
 
2691
+       DFmode can go in the Altivec registers.
 
2692
+       (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
 
2693
+       (rs6000_setup_reg_addr_masks): Likewise.
 
2694
+       (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
 
2695
+       field, and wh/wi/wj/wk constraints.
 
2696
+       (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
 
2697
+       the wh/wi/wj/wk constraints.
 
2698
+       (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
 
2699
+       upper registers, prefer VSX registers unless the operation is a
 
2700
+       memory operation with REG+OFFSET addressing.
 
2701
+
 
2702
+       * config/rs6000/vsx.md (VSr mode attribute): Add support for
 
2703
+       DImode.  Change SFmode to use ww constraint instead of d to allow
 
2704
+       SF registers in the upper registers.
 
2705
+       (VSr2): Likewise.
 
2706
+       (VSr3): Likewise.
 
2707
+       (VSr5): Fix thinko in comment.
 
2708
+       (VSa): New mode attribute that is an alternative to wa, that
 
2709
+       returns the VSX register class that a mode can go in, but may not
 
2710
+       be the preferred register class.
 
2711
+       (VS_64dm): New mode attribute for appropriate register classes for
 
2712
+       referencing 64-bit elements of vectors for direct moves and normal
 
2713
+       moves.
 
2714
+       (VS_64reg): Likewise.
 
2715
+       (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
 
2716
+       register allocator to only registers the data type can handle.
 
2717
+       (vsx_le_perm_load_<mode>): Likewise.
 
2718
+       (vsx_le_perm_store_<mode>): Likewise.
 
2719
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
2720
+       (vsx_xxpermdi4_le_<mode>): Likewise.
 
2721
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
2722
+       (vsx_lxvd2x4_le_<mode>): Likewise.
 
2723
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
2724
+       (vsx_add<mode>3): Likewise.
 
2725
+       (vsx_sub<mode>3): Likewise.
 
2726
+       (vsx_mul<mode>3): Likewise.
 
2727
+       (vsx_div<mode>3): Likewise.
 
2728
+       (vsx_tdiv<mode>3_internal): Likewise.
 
2729
+       (vsx_fre<mode>2): Likewise.
 
2730
+       (vsx_neg<mode>2): Likewise.
 
2731
+       (vsx_abs<mode>2): Likewise.
 
2732
+       (vsx_nabs<mode>2): Likewise.
 
2733
+       (vsx_smax<mode>3): Likewise.
 
2734
+       (vsx_smin<mode>3): Likewise.
 
2735
+       (vsx_sqrt<mode>2): Likewise.
 
2736
+       (vsx_rsqrte<mode>2): Likewise.
 
2737
+       (vsx_tsqrt<mode>2_internal): Likewise.
 
2738
+       (vsx_fms<mode>4): Likewise.
 
2739
+       (vsx_nfma<mode>4): Likewise.
 
2740
+       (vsx_eq<mode>): Likewise.
 
2741
+       (vsx_gt<mode>): Likewise.
 
2742
+       (vsx_ge<mode>): Likewise.
 
2743
+       (vsx_eq<mode>_p): Likewise.
 
2744
+       (vsx_gt<mode>_p): Likewise.
 
2745
+       (vsx_ge<mode>_p): Likewise.
 
2746
+       (vsx_xxsel<mode>): Likewise.
 
2747
+       (vsx_xxsel<mode>_uns): Likewise.
 
2748
+       (vsx_copysign<mode>3): Likewise.
 
2749
+       (vsx_float<VSi><mode>2): Likewise.
 
2750
+       (vsx_floatuns<VSi><mode>2): Likewise.
 
2751
+       (vsx_fix_trunc<mode><VSi>2): Likewise.
 
2752
+       (vsx_fixuns_trunc<mode><VSi>2): Likewise.
 
2753
+       (vsx_x<VSv>r<VSs>i): Likewise.
 
2754
+       (vsx_x<VSv>r<VSs>ic): Likewise.
 
2755
+       (vsx_btrunc<mode>2): Likewise.
 
2756
+       (vsx_b2trunc<mode>2): Likewise.
 
2757
+       (vsx_floor<mode>2): Likewise.
 
2758
+       (vsx_ceil<mode>2): Likewise.
 
2759
+       (vsx_<VS_spdp_insn>): Likewise.
 
2760
+       (vsx_xscvspdp): Likewise.
 
2761
+       (vsx_xvcvspuxds): Likewise.
 
2762
+       (vsx_float_fix_<mode>2): Likewise.
 
2763
+       (vsx_set_<mode>): Likewise.
 
2764
+       (vsx_extract_<mode>_internal1): Likewise.
 
2765
+       (vsx_extract_<mode>_internal2): Likewise.
 
2766
+       (vsx_extract_<mode>_load): Likewise.
 
2767
+       (vsx_extract_<mode>_store): Likewise.
 
2768
+       (vsx_splat_<mode>): Likewise.
 
2769
+       (vsx_xxspltw_<mode>): Likewise.
 
2770
+       (vsx_xxspltw_<mode>_direct): Likewise.
 
2771
+       (vsx_xxmrghw_<mode>): Likewise.
 
2772
+       (vsx_xxmrglw_<mode>): Likewise.
 
2773
+       (vsx_xxsldwi_<mode>): Likewise.
 
2774
+       (vsx_xscvdpspn): Tighten constraints to only use register classes
 
2775
+       the types use.
 
2776
+       (vsx_xscvspdpn): Likewise.
 
2777
+       (vsx_xscvdpspn_scalar): Likewise.
 
2778
+
 
2779
+       * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
 
2780
+       wj, and wk constraints.
 
2781
+       (GPR_REG_CLASS_P): New helper macro for register classes targeting
 
2782
+       general purpose registers.
 
2783
+
 
2784
+       * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
 
2785
+       direct moves.
 
2786
+       (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
 
2787
+       DImode instead of wm.  Use wk constraint for direct move of DFmode
 
2788
+       instead of wm.
 
2789
+       (extendsidi2_lfiwax): Likewise.
 
2790
+       (lfiwax): Likewise.
 
2791
+       (lfiwzx): Likewise.
 
2792
+       (movdi_internal64): Likewise.
 
2793
+
 
2794
+       * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
 
2795
+       wk constraints. Make the wy constraint documentation match them
 
2796
+       implementation.
 
2797
+
 
2798
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2799
+
 
2800
+       Backport from mainline
 
2801
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2802
+
 
2803
+       PR tree-optimization/61375
 
2804
+       * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
 
2805
+       symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
 
2806
+       (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
 
2807
+
 
2808
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
2809
+
 
2810
+       PR tree-optimization/61964
 
2811
+       * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
 
2812
+       function merged from trunk.
 
2813
+       (gimple_equal_p): Handle non-SSA LHS solely by structural
 
2814
+       equality.
 
2815
+
 
2816
+2014-07-25  Uros Bizjak  <ubizjak@gmail.com>
 
2817
+
 
2818
+       * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
 
2819
+
 
2820
+2014-07-24  Kyle McMartin  <kyle@redhat.com>
 
2821
+
 
2822
+       * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
 
2823
+
 
2824
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2825
+
 
2826
+       * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
 
2827
+       Add prototype.
 
2828
+       * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
 
2829
+       function.  Issue -Wpsabi warning if future GCC releases will use
 
2830
+       different field alignment rules for this type.
 
2831
+       * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
 
2832
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
 
2833
+       * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
 
2834
+
 
2835
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2836
+
 
2837
+       * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
 
2838
+       -Wpsabi note when encountering a type where future GCC releases
 
2839
+       will apply different alignment requirements.
 
2840
+
 
2841
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
2842
+
 
2843
+       * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
 
2844
+       does not fit fully into floating-point registers, and there is still
 
2845
+       space in the register parameter area, issue -Wpsabi note that the ABI
 
2846
+       will change in a future GCC release.
 
2847
+
 
2848
+2014-07-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
2849
+
 
2850
+       * config/arm/t-rtems-eabi: Add
 
2851
+       mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
 
2852
+       mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
 
2853
+       mbig-endian/mthumb/march=armv7-r, and
 
2854
+       mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
2855
+       multilibs.
 
2856
+
 
2857
+2014-07-21  Peter Bergner  <bergner@vnet.ibm.com>
 
2858
+
 
2859
+       * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
 
2860
+       (LIBTSAN_EARLY_SPEC): Likewise.
 
2861
+       (STATIC_LIBASAN_LIBS): Likewise.
 
2862
+       (STATIC_LIBTSAN_LIBS): Likewise.
 
2863
+
 
2864
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
2865
+
 
2866
+       * toplev.c (output_stack_usage): Adjust the location of the warning.
 
2867
+
 
2868
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
 
2869
+
 
2870
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
 
2871
+       (*membar_storeload): Disable for LEON3.
 
2872
+
 
2873
+2014-07-17  Richard Biener  <rguenther@suse.de>
 
2874
+
 
2875
+       PR rtl-optimization/61801
 
2876
+       * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
 
2877
+       ASM_INPUT don't set reg_pending_barrier if it appears in a
 
2878
+       debug-insn.
 
2879
+
 
2880
+2014-07-16  Jakub Jelinek  <jakub@redhat.com>
 
2881
+
 
2882
+       * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
 
2883
+       on the FUNCTION_DECL.
 
2884
+
 
2885
+2014-07-10  Tom G. Christensen  <tgc@jupiterrise.com>
 
2886
+
 
2887
+       * doc/install.texi: Remove links to defunct package providers for
 
2888
+       Solaris.
 
2889
+
 
2890
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
2891
+
 
2892
+       PR middle-end/53590
 
2893
+       * function.c (allocate_struct_function): Revert r188667 change.
 
2894
+
 
2895
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
2896
+
 
2897
+       PR tree-optimization/61684
 
2898
+       * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
 
2899
+       rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
 
2900
+
 
2901
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2902
+
 
2903
+       Backport from Mainline
 
2904
+       2014-06-20  Jakub Jelinek  <jakub@redhat.com>
 
2905
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
2906
+
 
2907
+       PR tree-optimization/61306
 
2908
+       * tree-ssa-math-opts.c (struct symbolic_number): Store type of
 
2909
+       expression instead of its size.
 
2910
+       (do_shift_rotate): Adapt to change in struct symbolic_number. Return
 
2911
+       false to prevent optimization when the result is unpredictable due to
 
2912
+       arithmetic right shift of signed type with highest byte is set.
 
2913
+       (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
 
2914
+       (find_bswap_1): Likewise. Return NULL to prevent optimization when the
 
2915
+       result is unpredictable due to sign extension.
 
2916
+       (find_bswap): Adapt to change in struct symbolic_number.
 
2917
+
 
2918
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
2919
+
 
2920
+       Backport from mainline
 
2921
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
2922
+
 
2923
+       PR target/61586
 
2924
+       * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
 
2925
+
 
2926
+2014-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
2927
+
 
2928
+       PR target/61542
 
2929
+       * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
 
2930
+       extraction other than index 3.
 
2931
+
 
2932
+2014-06-24  Jakub Jelinek  <jakub@redhat.com>
 
2933
+
 
2934
+       PR target/61570
 
2935
+       * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
 
2936
+       model family 6 CPU with has_longmode never use a CPU without
 
2937
+       64-bit support.
 
2938
+
 
2939
+2014-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
 
2940
+
 
2941
+       Backport from mainline
 
2942
+
 
2943
+       2014-06-20  Julian Brown  <julian@codesourcery.com>
 
2944
+                   Chung-Lin Tang  <cltang@codesourcery.com>
 
2945
+
 
2946
+       * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
 
2947
+       TARGET_THUMB1_ONLY. Add comments.
 
2948
+
 
2949
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
2950
+
 
2951
+       Backport from mainline
 
2952
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
2953
+
 
2954
+       PR target/61423
 
2955
+       * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
 
2956
+       define_insn_and_split pattern, merged from *floatunssi<mode>2_1
 
2957
+       and corresponding splitters.  Zero extend general register
 
2958
+       or memory input operand to XMM temporary.  Enable for
 
2959
+       TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
 
2960
+       (floatunssi<mode>2): Update expander predicate.
 
2961
+
 
2962
+2014-06-18  Richard Henderson  <rth@redhat.com>
 
2963
+
 
2964
+       PR target/61545
 
2965
+       * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
 
2966
+
 
2967
+2014-06-17  Nagaraju Mekala <nagaraju.mekala@xilinx.com>
 
2968
+
 
2969
+       Revert on gcc-4_8-branch.
 
2970
+       * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
 
2971
+       * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
 
2972
+
 
2973
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
2974
+
 
2975
+       Backport from mainline
 
2976
+
 
2977
+       PR target/61483
 
2978
+       * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
 
2979
+       variable 'size'; calculate 'size' right in the front; use
 
2980
+       'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
 
2981
+       pcum->aapcs_stack_words.
 
2982
+
 
2983
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
2984
+
 
2985
+       Backport from mainline
 
2986
+
 
2987
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
2988
+       PR target/61415
 
2989
+       * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
 
2990
+       (BU_MISC_2): Rename to ...
 
2991
+       (BU_LDBL128_2): ... this.
 
2992
+       * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
 
2993
+       (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
 
2994
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
 
2995
+       RS6000_BTM_LDBL128.
 
2996
+       (rs6000_invalid_builtin): Add long double 128-bit builtin support.
 
2997
+       (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
 
2998
+       * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
 
2999
+       (unpacktf_1): Likewise.
 
3000
+       * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
 
3001
+       (__builtin_longdouble_dw1): Likewise.
 
3002
+       * doc/sourcebuild.texi (longdouble128): Document.
 
3003
+
 
3004
+2014-06-13  Jason Merrill  <jason@redhat.com>
 
3005
+
 
3006
+       PR c++/60731
 
3007
+       * common.opt (-fno-gnu-unique): Add.
 
3008
+       * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
 
3009
+
 
3010
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
3011
+
 
3012
+       Backport from 2014-05-09 trunk r210272
 
3013
+
 
3014
+       * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
 
3015
+       unsigned int initializers for regno_in, regno_out.
 
3016
+
 
3017
+       Backport from 2014-05-14 trunk r210418
 
3018
+       * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
 
3019
+       shifted values to avoid build warning.
 
3020
+
 
3021
+       Backport from 2014-06-12 trunk r211491
 
3022
+
 
3023
+       PR target/61443
 
3024
+       * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
 
3025
+       loading from address spaces.
 
3026
+
 
3027
+2014-06-12  Alan Modra  <amodra@gmail.com>
 
3028
+
 
3029
+       PR target/61300
 
3030
+       * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
 
3031
+       * doc/tm.texi: Regenerate.
 
3032
+       * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
 
3033
+       Use throughout in place of REG_PARM_STACK_SPACE.
 
3034
+       * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
 
3035
+       "incoming" param.  Pass to rs6000_function_parms_need_stack.
 
3036
+       (rs6000_function_parms_need_stack): Add "incoming" param, ignore
 
3037
+       prototype_p when incoming.  Use function decl when incoming
 
3038
+       to handle K&R style functions.
 
3039
+       * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
 
3040
+       (INCOMING_REG_PARM_STACK_SPACE): Define.
 
3041
+
 
3042
+2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3043
+
 
3044
+       Back port from trunk
 
3045
+       2014-06-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
3046
+
 
3047
+       PR target/61431
 
3048
+       * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
 
3049
+       iterators, VSX_D that handles 64-bit types, and VSX_LE that
 
3050
+       handles swapping the two 64-bit double words on little endian
 
3051
+       systems.  Include V1TImode and optionally TImode in VSX_LE so that
 
3052
+       these types are properly swapped.  Change all of the insns and
 
3053
+       splits that do the 64-bit swaps to use VSX_LE.
 
3054
+       (vsx_le_perm_load_<mode>): Likewise.
 
3055
+       (vsx_le_perm_store_<mode>): Likewise.
 
3056
+       (splitters for little endian memory operations): Likewise.
 
3057
+       (vsx_xxpermdi2_le_<mode>): Likewise.
 
3058
+       (vsx_lxvd2x2_le_<mode>): Likewise.
 
3059
+       (vsx_stxvd2x2_le_<mode>): Likewise.
 
3060
+
 
3061
+2014-06-05  Martin Jambor  <mjambor@suse.cz>
 
3062
+
 
3063
+       PR ipa/61393
 
3064
+       * ipa-cp.c (determine_versionability): Pretend that tm_clones are
 
3065
+       not versionable.
 
3066
+
 
3067
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
3068
+
 
3069
+       PR tree-optimization/61383
 
3070
+       * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
 
3071
+       stmts can't trap.
 
3072
+
 
3073
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
3074
+
 
3075
+       Backport from mainline
 
3076
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
3077
+
 
3078
+       PR rtl-optimization/60866
 
3079
+       * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
 
3080
+       Default it to -1.  Pass it down to init_simplejump_data.
 
3081
+       (init_simplejump_data): New parameter old_seqno.  Pass it down
 
3082
+       to get_seqno_for_a_jump.
 
3083
+       (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
 
3084
+       initializing new jump seqno as a last resort.  Add comment.
 
3085
+       (sel_redirect_edge_and_branch): Save old seqno of the conditional
 
3086
+       jump and pass it down to sel_init_new_insn.
 
3087
+       (sel_redirect_edge_and_branch_force): Likewise.
 
3088
+
 
3089
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
3090
+
 
3091
+       Backport from mainline
 
3092
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
3093
+
 
3094
+       PR rtl-optimization/60901
 
3095
+       * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
 
3096
+       bb predecessor belongs to the same scheduling region.  Adjust comment.
 
3097
+
 
3098
+2014-06-03  Uros Bizjak  <ubizjak@gmail.com>
 
3099
+
 
3100
+       Backport from mainline
 
3101
+       2014-06-02  Uros Bizjak  <ubizjak@gmail.com>
 
3102
+
 
3103
+       PR target/61239
 
3104
+       * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
 
3105
+       GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
 
3106
+
 
3107
+2014-05-28  Guozhi Wei  <carrot@google.com>
 
3108
+
 
3109
+       PR target/61202
 
3110
+       * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
 
3111
+       constraint.
 
3112
+       (vqdmulhq_n_s16): Likewise.
 
3113
+
 
3114
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
3115
+
 
3116
+       Backport from mainline
 
3117
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
3118
+
 
3119
+       * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
 
3120
+       predicate to detect a negative quotient.
 
3121
+
 
3122
+2014-05-28  Georg-Johann Lay  <avr@gjlay.de>
 
3123
+
 
3124
+       PR target/61044
 
3125
+       * doc/extend.texi (Local Labels): Note that label differences are
 
3126
+       not supported for AVR.
 
3127
+
 
3128
+2014-05-26  Michael Tautschnig  <mt@debian.org>
 
3129
+
 
3130
+       PR target/61249
 
3131
+       * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
 
3132
+       __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
 
3133
+
 
3134
+2014-05-23  Alan Modra  <amodra@gmail.com>
 
3135
+
 
3136
+       PR target/61231
 
3137
+       * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
 
3138
+       * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
 
3139
+       Use "Y" constraint rather than "m".
 
3140
+
 
3141
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
3142
+
 
3143
+       Backport from mainline
 
3144
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
3145
+
 
3146
+       * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
 
3147
+
 
3148
+2014-05-22  Richard Earnshaw  <rearnsha@arm.com>
 
3149
+
 
3150
+       PR target/61208
 
3151
+       * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
 
3152
+
 
3153
 2014-05-22  Release Manager
 
3154
 
 
3155
        * GCC 4.8.3 released.
 
3156
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
 
3157
===================================================================
 
3158
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../tags/gcc_4_8_3_release)
 
3159
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c     (.../branches/gcc-4_8-branch)
 
3160
@@ -0,0 +1,14 @@
 
3161
+/* Test for deprecation messages on use of lvsl and lvsr for little endian.  */
 
3162
+
 
3163
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
3164
+/* { dg-options "-O0 -Wdeprecated" } */
 
3165
+
 
3166
+#include <altivec.h>
 
3167
+
 
3168
+float f[20];
 
3169
+
 
3170
+void foo ()
 
3171
+{
 
3172
+  vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
3173
+  vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
 
3174
+}
 
3175
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
 
3176
===================================================================
 
3177
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../tags/gcc_4_8_3_release)
 
3178
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c    (.../branches/gcc-4_8-branch)
 
3179
@@ -0,0 +1,30 @@
 
3180
+/* { dg-do run { target { powerpc64*-*-* } } } */
 
3181
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
3182
+/* { dg-options "-mvsx" } */
 
3183
+
 
3184
+#include <altivec.h>
 
3185
+
 
3186
+void abort (void);
 
3187
+
 
3188
+vector double vec = (vector double) {99.0, 99.0};
 
3189
+
 
3190
+int main() {
 
3191
+
 
3192
+  int actual = vec_all_nge(vec, vec);
 
3193
+  if ( actual != 0)
 
3194
+    abort();
 
3195
+
 
3196
+  actual = vec_all_nle(vec, vec);
 
3197
+  if ( actual != 0)
 
3198
+    abort();
 
3199
+
 
3200
+  actual = vec_any_nge(vec, vec);
 
3201
+  if ( actual != 0)
 
3202
+    abort();
 
3203
+
 
3204
+  actual = vec_any_nle(vec, vec);
 
3205
+  if ( actual != 0)
 
3206
+    abort();
 
3207
+
 
3208
+  return 0;
 
3209
+}
 
3210
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
 
3211
===================================================================
 
3212
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../tags/gcc_4_8_3_release)
 
3213
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c      (.../branches/gcc-4_8-branch)
 
3214
@@ -1,7 +1,7 @@
 
3215
 /* { dg-do compile { target { powerpc*-*-* } } } */
 
3216
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3217
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
3218
-/* { dg-options "-O3 -mcpu=power7" } */
 
3219
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
 
3220
 
 
3221
 /* Test the various load/store varients.  */
 
3222
 
 
3223
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
 
3224
===================================================================
 
3225
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
 
3226
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
 
3227
@@ -1,6 +1,7 @@
 
3228
 /* { dg-do assemble } */
 
3229
 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
 
3230
 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
 
3231
+/* { dg-require-effective-target longdouble128 } */
 
3232
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
 
3233
 
 
3234
 typedef float TFmode __attribute__ ((mode (TF)));
 
3235
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
 
3236
===================================================================
 
3237
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../tags/gcc_4_8_3_release)
 
3238
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c     (.../branches/gcc-4_8-branch)
 
3239
@@ -2,6 +2,7 @@
 
3240
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3241
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 
3242
 /* { dg-require-effective-target powerpc_fprs } */
 
3243
+/* { dg-require-effective-target longdouble128 } */
 
3244
 /* { dg-options "-O2 -mhard-float" } */
 
3245
 
 
3246
 #include <stddef.h>
 
3247
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
 
3248
===================================================================
 
3249
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../tags/gcc_4_8_3_release)
 
3250
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c   (.../branches/gcc-4_8-branch)
 
3251
@@ -0,0 +1,12 @@
 
3252
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3253
+/* { dg-options "-mabi=elfv2" } */
 
3254
+
 
3255
+struct f8
 
3256
+  {
 
3257
+    float x[8];
 
3258
+  };
 
3259
+
 
3260
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
 
3261
+{
 
3262
+}
 
3263
+
 
3264
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
 
3265
===================================================================
 
3266
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../tags/gcc_4_8_3_release)
 
3267
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c  (.../branches/gcc-4_8-branch)
 
3268
@@ -0,0 +1,14 @@
 
3269
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
3270
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
3271
+/* { dg-require-effective-target powerpc_htm_ok } */
 
3272
+/* { dg-options "-O2 -mhtm" } */
 
3273
+
 
3274
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
 
3275
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
 
3276
+
 
3277
+#include <htmintrin.h>
 
3278
+long
 
3279
+ttest (void)
 
3280
+{
 
3281
+  return _HTM_STATE(__builtin_ttest());
 
3282
+}
 
3283
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
 
3284
===================================================================
 
3285
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../tags/gcc_4_8_3_release)
 
3286
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c  (.../branches/gcc-4_8-branch)
 
3287
@@ -0,0 +1,21 @@
 
3288
+/* Test expected code generation for lvsl and lvsr on little endian.
 
3289
+   Note that lvsl and lvsr are each produced once, but the filename
 
3290
+   causes them to appear twice in the file.  */
 
3291
+
 
3292
+/* { dg-do compile { target { powerpc64le-*-* } } } */
 
3293
+/* { dg-options "-O0 -Wno-deprecated" } */
 
3294
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
 
3295
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
 
3296
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
 
3297
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
 
3298
+
 
3299
+
 
3300
+#include <altivec.h>
 
3301
+
 
3302
+float f[20];
 
3303
+
 
3304
+void foo ()
 
3305
+{
 
3306
+  vector unsigned char a = vec_lvsl (4, f);
 
3307
+  vector unsigned char b = vec_lvsr (8, f);
 
3308
+}
 
3309
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
 
3310
===================================================================
 
3311
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../tags/gcc_4_8_3_release)
 
3312
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c   (.../branches/gcc-4_8-branch)
 
3313
@@ -0,0 +1,12 @@
 
3314
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3315
+/* { dg-options "-mno-compat-align-parm" } */
 
3316
+
 
3317
+struct test
 
3318
+  {
 
3319
+    long a __attribute__((aligned (16)));
 
3320
+  };
 
3321
+
 
3322
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
 
3323
+{
 
3324
+}
 
3325
+
 
3326
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
 
3327
===================================================================
 
3328
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../tags/gcc_4_8_3_release)
 
3329
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c   (.../branches/gcc-4_8-branch)
 
3330
@@ -0,0 +1,9 @@
 
3331
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
 
3332
+/* { dg-require-effective-target powerpc_altivec_ok } */
 
3333
+/* { dg-options "-maltivec" } */
 
3334
+
 
3335
+struct test
 
3336
+  {
 
3337
+    int a __attribute__((vector_size (8)));
 
3338
+  }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
 
3339
+
 
3340
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
 
3341
===================================================================
 
3342
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../tags/gcc_4_8_3_release)
 
3343
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c  (.../branches/gcc-4_8-branch)
 
3344
@@ -1,6 +1,6 @@
 
3345
 /* { dg-do compile { target powerpc*-*-* } } */
 
3346
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
3347
-/* { dg-options "-maltivec -O0 -Wall" } */
 
3348
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
 
3349
 
 
3350
 #include <altivec.h>
 
3351
 
 
3352
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
 
3353
===================================================================
 
3354
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../tags/gcc_4_8_3_release)
 
3355
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c  (.../branches/gcc-4_8-branch)
 
3356
@@ -1,7 +1,7 @@
 
3357
 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
 
3358
 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
 
3359
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
3360
-/* { dg-options "-maltivec -O2" } */
 
3361
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
 
3362
 
 
3363
 #include <altivec.h>
 
3364
 
 
3365
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
 
3366
===================================================================
 
3367
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
 
3368
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
 
3369
@@ -1,5 +1,5 @@
 
3370
 /* { dg-do compile { target powerpc_altivec_ok } } */
 
3371
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
 
3372
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
 
3373
 
 
3374
 #include <altivec.h>
 
3375
 
 
3376
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
 
3377
===================================================================
 
3378
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../tags/gcc_4_8_3_release)
 
3379
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c      (.../branches/gcc-4_8-branch)
 
3380
@@ -0,0 +1,10 @@
 
3381
+/* { dg-do compile } */
 
3382
+/* { dg-options "-O2 -mieee" } */
 
3383
+
 
3384
+void foo (int *dimensions, double **params, int hh)
 
3385
+{
 
3386
+  if (params[hh])
 
3387
+    ;
 
3388
+  else if (dimensions[hh] > 0)
 
3389
+    params[hh][0] = 1.0f;
 
3390
+}
 
3391
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
 
3392
===================================================================
 
3393
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../tags/gcc_4_8_3_release)
 
3394
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c  (.../branches/gcc-4_8-branch)
 
3395
@@ -0,0 +1,35 @@
 
3396
+/* Test AAPCS64 layout and __builtin_va_start.
 
3397
+
 
3398
+   Pass named HFA/HVA argument on stack.  */
 
3399
+
 
3400
+/* { dg-do run { target aarch64*-*-* } } */
 
3401
+
 
3402
+#ifndef IN_FRAMEWORK
 
3403
+#define AAPCS64_TEST_STDARG
 
3404
+#define TESTFILE "va_arg-14.c"
 
3405
+#include "type-def.h"
 
3406
+
 
3407
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
 
3408
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
 
3409
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
 
3410
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
 
3411
+
 
3412
+#include "abitest.h"
 
3413
+#else
 
3414
+  ARG (float, 1.0f, S0, 0)
 
3415
+  ARG (float, 2.0f, S1, 1)
 
3416
+  ARG (float, 3.0f, S2, 2)
 
3417
+  ARG (float, 4.0f, S3, 3)
 
3418
+  ARG (float, 5.0f, S4, 4)
 
3419
+  ARG (float, 6.0f, S5, 5)
 
3420
+  ARG (float, 7.0f, S6, 6)
 
3421
+  ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
 
3422
+  /* Previous argument size has been rounded up to the nearest multiple of
 
3423
+     8 bytes.  */
 
3424
+  ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
 
3425
+  /* NSAA is rounded up to the nearest natural alignment of float32x4.  */
 
3426
+  ARG (vf4_t, float32x4, STACK + 32, 9)
 
3427
+  ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
 
3428
+  DOTS
 
3429
+  LAST_ANON (double, 123456789.987, STACK + 64, 11)
 
3430
+#endif
 
3431
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
 
3432
===================================================================
 
3433
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../tags/gcc_4_8_3_release)
 
3434
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h   (.../branches/gcc-4_8-branch)
 
3435
@@ -34,6 +34,13 @@
 
3436
   float b;
 
3437
 };
 
3438
 
 
3439
+struct hfa_fx3_t
 
3440
+{
 
3441
+  float a;
 
3442
+  float b;
 
3443
+  float c;
 
3444
+};
 
3445
+
 
3446
 struct hfa_dx2_t
 
3447
 {
 
3448
   double a;
 
3449
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
 
3450
===================================================================
 
3451
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../tags/gcc_4_8_3_release)
 
3452
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c  (.../branches/gcc-4_8-branch)
 
3453
@@ -0,0 +1,59 @@
 
3454
+/* Test AAPCS64 layout and __builtin_va_start.
 
3455
+
 
3456
+   Pass named HFA/HVA argument on stack.  */
 
3457
+
 
3458
+/* { dg-do run { target aarch64*-*-* } } */
 
3459
+
 
3460
+#ifndef IN_FRAMEWORK
 
3461
+#define AAPCS64_TEST_STDARG
 
3462
+#define TESTFILE "va_arg-13.c"
 
3463
+
 
3464
+struct float_float_t
 
3465
+{
 
3466
+  float a;
 
3467
+  float b;
 
3468
+} float_float;
 
3469
+
 
3470
+union float_int_t
 
3471
+{
 
3472
+  float b8;
 
3473
+  int b5;
 
3474
+} float_int;
 
3475
+
 
3476
+#define HAS_DATA_INIT_FUNC
 
3477
+void
 
3478
+init_data ()
 
3479
+{
 
3480
+  float_float.a = 1.2f;
 
3481
+  float_float.b = 2.2f;
 
3482
+
 
3483
+  float_int.b8 = 4983.80f;
 
3484
+}
 
3485
+
 
3486
+#include "abitest.h"
 
3487
+#else
 
3488
+  ARG (float, 1.0f, S0, 0)
 
3489
+  ARG (float, 2.0f, S1, 1)
 
3490
+  ARG (float, 3.0f, S2, 2)
 
3491
+  ARG (float, 4.0f, S3, 3)
 
3492
+  ARG (float, 5.0f, S4, 4)
 
3493
+  ARG (float, 6.0f, S5, 5)
 
3494
+  ARG (float, 7.0f, S6, 6)
 
3495
+  ARG (struct float_float_t, float_float, STACK, 7)
 
3496
+  ARG (int,  9, W0, 8)
 
3497
+  ARG (int, 10, W1, 9)
 
3498
+  ARG (int, 11, W2, 10)
 
3499
+  ARG (int, 12, W3, 11)
 
3500
+  ARG (int, 13, W4, 12)
 
3501
+  ARG (int, 14, W5, 13)
 
3502
+  ARG (int, 15, W6, LAST_NAMED_ARG_ID)
 
3503
+  DOTS
 
3504
+  /* Note on the reason of using 'X7' instead of 'W7' here:
 
3505
+     Using 'X7' makes sure the test works in the big-endian mode.
 
3506
+     According to PCS rules B.4 and C.10, the size of float_int is rounded
 
3507
+     to 8 bytes and prepared in the register X7 as if loaded via LDR from
 
3508
+     the memory, with the content of the other 4 bytes unspecified.  The
 
3509
+     test framework will only compare the 4 relavent bytes.  */
 
3510
+  ANON (union float_int_t, float_int, X7, 15)
 
3511
+  LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
 
3512
+#endif
 
3513
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
 
3514
===================================================================
 
3515
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../tags/gcc_4_8_3_release)
 
3516
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c  (.../branches/gcc-4_8-branch)
 
3517
@@ -0,0 +1,39 @@
 
3518
+/* Test AAPCS64 layout and __builtin_va_start.
 
3519
+
 
3520
+   Pass named __128int argument on stack.  */
 
3521
+
 
3522
+/* { dg-do run { target aarch64*-*-* } } */
 
3523
+
 
3524
+#ifndef IN_FRAMEWORK
 
3525
+#define AAPCS64_TEST_STDARG
 
3526
+#define TESTFILE "va_arg-15.c"
 
3527
+#include "type-def.h"
 
3528
+
 
3529
+union int128_t qword;
 
3530
+
 
3531
+#define HAS_DATA_INIT_FUNC
 
3532
+void
 
3533
+init_data ()
 
3534
+{
 
3535
+  /* Init signed quad-word integer.  */
 
3536
+  qword.l64 = 0xfdb9753102468aceLL;
 
3537
+  qword.h64 = 0xeca8642013579bdfLL;
 
3538
+}
 
3539
+
 
3540
+#include "abitest.h"
 
3541
+#else
 
3542
+  ARG (int, 1, W0, 0)
 
3543
+  ARG (int, 2, W1, 1)
 
3544
+  ARG (int, 3, W2, 2)
 
3545
+  ARG (int, 4, W3, 3)
 
3546
+  ARG (int, 5, W4, 4)
 
3547
+  ARG (int, 6, W5, 5)
 
3548
+  ARG (int, 7, W6, 6)
 
3549
+  ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
 
3550
+  DOTS
 
3551
+#ifndef __AAPCS64_BIG_ENDIAN__
 
3552
+  LAST_ANON (int, 8, STACK + 16, 8)
 
3553
+#else
 
3554
+  LAST_ANON (int, 8, STACK + 20, 8)
 
3555
+#endif
 
3556
+#endif
 
3557
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
 
3558
===================================================================
 
3559
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../tags/gcc_4_8_3_release)
 
3560
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c   (.../branches/gcc-4_8-branch)
 
3561
@@ -0,0 +1,14 @@
 
3562
+/* { dg-do assemble } */
 
3563
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
 
3564
+
 
3565
+int
 
3566
+test (int a, double b, int c, int d, int e)
 
3567
+{
 
3568
+  double result;
 
3569
+  __asm__ __volatile ("// %0, %1"
 
3570
+                      : "=w" (result)
 
3571
+                      : "0" (b)
 
3572
+                      :    /* No clobbers */
 
3573
+                      );
 
3574
+  return c * d + e;
 
3575
+}
 
3576
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
 
3577
===================================================================
 
3578
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../tags/gcc_4_8_3_release)
 
3579
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c        (.../branches/gcc-4_8-branch)
 
3580
@@ -0,0 +1,134 @@
 
3581
+/* { dg-do run } */
 
3582
+/* { dg-options "-std=gnu99" } */
 
3583
+
 
3584
+#include <stdlib.h>
 
3585
+#include <stdarg.h>
 
3586
+
 
3587
+#define NC __attribute__((noinline,noclone))
 
3588
+
 
3589
+void NC vfun (char n, ...)
 
3590
+{
 
3591
+  va_list ap;
 
3592
+
 
3593
+  va_start (ap, n);
 
3594
+
 
3595
+  switch (n)
 
3596
+    {
 
3597
+    default:
 
3598
+      abort();
 
3599
+    case 1:
 
3600
+      if (11 != va_arg (ap, int))
 
3601
+        abort();
 
3602
+      break;
 
3603
+    case 2:
 
3604
+      if (2222 != va_arg (ap, int))
 
3605
+        abort();
 
3606
+      break;
 
3607
+    case 3:
 
3608
+      if (333333 != va_arg (ap, __int24))
 
3609
+        abort();
 
3610
+      break;
 
3611
+    case 4:
 
3612
+      if (44444444 != va_arg (ap, long))
 
3613
+        abort();
 
3614
+      break;
 
3615
+    case 8:
 
3616
+      if (8888888888888888 != va_arg (ap, long long))
 
3617
+        abort();
 
3618
+      break;
 
3619
+    }
 
3620
+
 
3621
+  va_end (ap);
 
3622
+}
 
3623
+
 
3624
+
 
3625
+void NC boo_qi (const __flash char *p)
 
3626
+{
 
3627
+  vfun (1, *p);
 
3628
+}
 
3629
+
 
3630
+void NC boox_qi (const __memx char *p)
 
3631
+{
 
3632
+  vfun (1, *p);
 
3633
+}
 
3634
+
 
3635
+void NC boo_hi (const __flash int *p)
 
3636
+{
 
3637
+  vfun (2, *p);
 
3638
+}
 
3639
+
 
3640
+void NC boox_hi (const __memx int *p)
 
3641
+{
 
3642
+  vfun (2, *p);
 
3643
+}
 
3644
+
 
3645
+void NC boo_psi (const __flash __int24 *p)
 
3646
+{
 
3647
+  vfun (3, *p);
 
3648
+}
 
3649
+
 
3650
+void NC boox_psi (const __memx __int24 *p)
 
3651
+{
 
3652
+  vfun (3, *p);
 
3653
+}
 
3654
+
 
3655
+void NC boo_si (const __flash long *p)
 
3656
+{
 
3657
+  vfun (4, *p);
 
3658
+}
 
3659
+
 
3660
+void NC boox_si (const __memx long *p)
 
3661
+{
 
3662
+  vfun (4, *p);
 
3663
+}
 
3664
+
 
3665
+void NC boo_di (const __flash long long *p)
 
3666
+{
 
3667
+  vfun (8, *p);
 
3668
+}
 
3669
+
 
3670
+void NC boox_di (const __memx long long *p)
 
3671
+{
 
3672
+  vfun (8, *p);
 
3673
+}
 
3674
+
 
3675
+const __flash char f_qi = 11;
 
3676
+const __flash int f_hi = 2222;
 
3677
+const __flash __int24 f_psi = 333333;
 
3678
+const __flash long f_si = 44444444;
 
3679
+const __flash long long f_di = 8888888888888888;
 
3680
+
 
3681
+const __memx char x_qi = 11;
 
3682
+const __memx int x_hi = 2222;
 
3683
+const __memx __int24 x_psi = 333333;
 
3684
+const __memx long x_si = 44444444;
 
3685
+const __memx long long x_di = 8888888888888888;
 
3686
+
 
3687
+char r_qi = 11;
 
3688
+int r_hi = 2222;
 
3689
+__int24 r_psi = 333333;
 
3690
+long r_si = 44444444;
 
3691
+long long r_di = 8888888888888888;
 
3692
+
 
3693
+int main (void)
 
3694
+{
 
3695
+  boo_qi (&f_qi);
 
3696
+  boo_hi (&f_hi);
 
3697
+  boo_psi (&f_psi);
 
3698
+  boo_si (&f_si);
 
3699
+  boo_di (&f_di);
 
3700
+
 
3701
+  boox_qi (&x_qi);
 
3702
+  boox_hi (&x_hi);
 
3703
+  boox_psi (&x_psi);
 
3704
+  boox_si (&x_si);
 
3705
+  boox_di (&x_di);
 
3706
+
 
3707
+  boox_qi (&r_qi);
 
3708
+  boox_hi (&r_hi);
 
3709
+  boox_psi (&r_psi);
 
3710
+  boox_si (&r_si);
 
3711
+  boox_di (&r_di);
 
3712
+
 
3713
+  exit (0);
 
3714
+}
 
3715
Index: gcc/testsuite/gcc.target/i386/pr61923.c
 
3716
===================================================================
 
3717
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../tags/gcc_4_8_3_release)
 
3718
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c       (.../branches/gcc-4_8-branch)
 
3719
@@ -0,0 +1,36 @@
 
3720
+/* PR debug/61923 */
 
3721
+/* { dg-do compile } */
 
3722
+/* { dg-options "-O2 -fcompare-debug" } */
 
3723
+
 
3724
+typedef struct
 
3725
+{
 
3726
+  struct
 
3727
+  {
 
3728
+    struct
 
3729
+    {
 
3730
+      char head;
 
3731
+    } tickets;
 
3732
+  };
 
3733
+} arch_spinlock_t;
 
3734
+struct ext4_map_blocks
 
3735
+{
 
3736
+  int m_lblk;
 
3737
+  int m_len;
 
3738
+  int m_flags;
 
3739
+};
 
3740
+int ext4_da_map_blocks_ei_0;
 
3741
+void fn1 (int p1, struct ext4_map_blocks *p2)
 
3742
+{
 
3743
+  int ret;
 
3744
+  if (p2->m_flags)
 
3745
+    {
 
3746
+      ext4_da_map_blocks_ei_0++;
 
3747
+      arch_spinlock_t *lock;
 
3748
+      switch (sizeof *&lock->tickets.head)
 
3749
+      case 1:
 
3750
+      asm("" : "+m"(*&lock->tickets.head) : ""(0));
 
3751
+      __asm__("");
 
3752
+      ret = 0;
 
3753
+    }
 
3754
+  fn2 (p2->m_lblk, p2->m_len);
 
3755
+}
 
3756
Index: gcc/testsuite/gcc.target/i386/pr61423.c
 
3757
===================================================================
 
3758
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../tags/gcc_4_8_3_release)
 
3759
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c       (.../branches/gcc-4_8-branch)
 
3760
@@ -0,0 +1,38 @@
 
3761
+/* PR target/61423 */
 
3762
+/* { dg-do run { target ia32 } } */
 
3763
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
 
3764
+
 
3765
+#define N 1024
 
3766
+static unsigned int A[N];
 
3767
+
 
3768
+double
 
3769
+__attribute__((noinline))
 
3770
+func (void)
 
3771
+{
 
3772
+  unsigned int sum = 0;
 
3773
+  unsigned i;
 
3774
+  double t;
 
3775
+
 
3776
+  for (i = 0; i < N; i++)
 
3777
+    sum += A[i];
 
3778
+
 
3779
+  t = sum;
 
3780
+  return t;
 
3781
+}
 
3782
+
 
3783
+int
 
3784
+main ()
 
3785
+{
 
3786
+  unsigned i;
 
3787
+  double d;
 
3788
+
 
3789
+  for(i = 0; i < N; i++)
 
3790
+    A[i] = 1;
 
3791
+
 
3792
+  d = func();
 
3793
+
 
3794
+  if (d != 1024.0)
 
3795
+    __builtin_abort ();
 
3796
+
 
3797
+  return 0;
 
3798
+}
 
3799
Index: gcc/testsuite/gcc.target/i386/pr60901.c
 
3800
===================================================================
 
3801
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../tags/gcc_4_8_3_release)
 
3802
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c       (.../branches/gcc-4_8-branch)
 
3803
@@ -0,0 +1,17 @@
 
3804
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts"  } */
 
3805
+
 
3806
+extern int n;
 
3807
+extern void bar (void);
 
3808
+extern int baz (int);
 
3809
+
 
3810
+void
 
3811
+foo (void)
 
3812
+{
 
3813
+  int i, j;
 
3814
+  for (j = 0; j < n; j++)
 
3815
+    {
 
3816
+      for (i = 1; i < j; i++)
 
3817
+       bar ();
 
3818
+      baz (0);
 
3819
+    }
 
3820
+}
 
3821
Index: gcc/testsuite/gcc.target/i386/pr61801.c
 
3822
===================================================================
 
3823
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../tags/gcc_4_8_3_release)
 
3824
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c       (.../branches/gcc-4_8-branch)
 
3825
@@ -0,0 +1,21 @@
 
3826
+/* PR rtl-optimization/61801 */
 
3827
+/* { dg-do compile } */
 
3828
+/* { dg-options "-Os -fcompare-debug" } */
 
3829
+
 
3830
+int a, c;
 
3831
+int bar (void);
 
3832
+void baz (void);
 
3833
+
 
3834
+void
 
3835
+foo (void)
 
3836
+{
 
3837
+  int d;
 
3838
+  if (bar ())
 
3839
+    {
 
3840
+      int e;
 
3841
+      baz ();
 
3842
+      asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
 
3843
+      d = e;
 
3844
+    }
 
3845
+  c = d;
 
3846
+}
 
3847
Index: gcc/testsuite/gcc.target/i386/pr61446.c
 
3848
===================================================================
 
3849
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../tags/gcc_4_8_3_release)
 
3850
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c       (.../branches/gcc-4_8-branch)
 
3851
@@ -0,0 +1,14 @@
 
3852
+/* PR rtl-optimization/61446 */
 
3853
+
 
3854
+/* { dg-do compile { target { ia32 } } } */
 
3855
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
 
3856
+
 
3857
+unsigned long long
 
3858
+foo (float a)
 
3859
+{
 
3860
+  const double dfa = a;
 
3861
+  const unsigned int hi = dfa / 0x1p32f;
 
3862
+  const unsigned int lo = dfa - (double) hi * 0x1p32f;
 
3863
+
 
3864
+  return ((unsigned long long) hi << (4 * (8))) | lo;
 
3865
+}
 
3866
Index: gcc/testsuite/gcc.target/i386/pr63947.c
 
3867
===================================================================
 
3868
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../tags/gcc_4_8_3_release)
 
3869
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c       (.../branches/gcc-4_8-branch)
 
3870
@@ -0,0 +1,9 @@
 
3871
+/* PR target/63947 */
 
3872
+/* { dg-do assemble } */
 
3873
+/* { dg-options "-Os" } */
 
3874
+/* { dg-additional-options "-march=i686" { target ia32 } } */
 
3875
+
 
3876
+long double foo (unsigned a, unsigned b)
 
3877
+{
 
3878
+  return a + b < a;
 
3879
+}
 
3880
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
 
3881
===================================================================
 
3882
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../tags/gcc_4_8_3_release)
 
3883
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c        (.../branches/gcc-4_8-branch)
 
3884
@@ -0,0 +1,50 @@
 
3885
+/* { dg-do run } */
 
3886
+/* { dg-options "-march=octeon" } */
 
3887
+
 
3888
+extern void abort (void);
 
3889
+
 
3890
+struct node
 
3891
+{
 
3892
+  struct node *next;
 
3893
+  struct node *prev;
 
3894
+};
 
3895
+
 
3896
+struct node node;
 
3897
+
 
3898
+struct head
 
3899
+{
 
3900
+  struct node *first;
 
3901
+};
 
3902
+
 
3903
+struct head heads[5];
 
3904
+
 
3905
+int k = 2;
 
3906
+
 
3907
+struct head *head = &heads[2];
 
3908
+
 
3909
+static int __attribute__((noinline))
 
3910
+foo (void)
 
3911
+{
 
3912
+  node.prev = (void *)head;
 
3913
+  head->first = &node;
 
3914
+
 
3915
+  struct node *n = head->first;
 
3916
+  struct head *h = &heads[k];
 
3917
+  struct node *next = n->next;
 
3918
+
 
3919
+  if (n->prev == (void *)h)
 
3920
+    h->first = next;
 
3921
+  else
 
3922
+    n->prev->next = next;
 
3923
+
 
3924
+  n->next = h->first;
 
3925
+  return n->next == &node;
 
3926
+}
 
3927
+
 
3928
+int
 
3929
+main (void)
 
3930
+{
 
3931
+  if (foo ())
 
3932
+    abort ();
 
3933
+  return 0;
 
3934
+}
 
3935
Index: gcc/testsuite/gcc.target/sh/pr61996.c
 
3936
===================================================================
 
3937
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
 
3938
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
 
3939
@@ -0,0 +1,12 @@
 
3940
+/* Check that the option -musermode has no effect on targets that do not
 
3941
+   support user/privileged mode and that it does not interfere with option
 
3942
+   -matomic-model=soft-imask.  */
 
3943
+/* { dg-do compile }  */
 
3944
+/* { dg-options "-matomic-model=soft-imask" }  */
 
3945
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } }  */
 
3946
+
 
3947
+int
 
3948
+test (void)
 
3949
+{
 
3950
+  return 0;
 
3951
+}
 
3952
Index: gcc/testsuite/lib/target-supports.exp
 
3953
===================================================================
 
3954
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
 
3955
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
 
3956
@@ -1790,6 +1790,15 @@
 
3957
     }]
 
3958
 }
 
3959
 
 
3960
+# Return 1 if the target supports long double of 128 bits,
 
3961
+# 0 otherwise.
 
3962
+
 
3963
+proc check_effective_target_longdouble128 { } {
 
3964
+    return [check_no_compiler_messages longdouble128 object {
 
3965
+       int dummy[sizeof(long double) == 16 ? 1 : -1];
 
3966
+    }]
 
3967
+}
 
3968
+
 
3969
 # Return 1 if the target supports double of 64 bits,
 
3970
 # 0 otherwise.
 
3971
 
 
3972
@@ -5329,3 +5338,40 @@
 
3973
        return 0
 
3974
     }
 
3975
 }
 
3976
+
 
3977
+# Return 1 if <fenv.h> is available with all the standard IEEE
 
3978
+# exceptions and floating-point exceptions are raised by arithmetic
 
3979
+# operations.  (If the target requires special options for "inexact"
 
3980
+# exceptions, those need to be specified in the testcases.)
 
3981
+
 
3982
+proc check_effective_target_fenv_exceptions {} {
 
3983
+    return [check_runtime fenv_exceptions {
 
3984
+       #include <fenv.h>
 
3985
+       #include <stdlib.h>
 
3986
+       #ifndef FE_DIVBYZERO
 
3987
+       # error Missing FE_DIVBYZERO
 
3988
+       #endif
 
3989
+       #ifndef FE_INEXACT
 
3990
+       # error Missing FE_INEXACT
 
3991
+       #endif
 
3992
+       #ifndef FE_INVALID
 
3993
+       # error Missing FE_INVALID
 
3994
+       #endif
 
3995
+       #ifndef FE_OVERFLOW
 
3996
+       # error Missing FE_OVERFLOW
 
3997
+       #endif
 
3998
+       #ifndef FE_UNDERFLOW
 
3999
+       # error Missing FE_UNDERFLOW
 
4000
+       #endif
 
4001
+       volatile float a = 0.0f, r;
 
4002
+       int
 
4003
+       main (void)
 
4004
+       {
 
4005
+         r = a / a;
 
4006
+         if (fetestexcept (FE_INVALID))
 
4007
+           exit (0);
 
4008
+         else
 
4009
+           abort ();
 
4010
+       }
 
4011
+    } "-std=gnu99"]
 
4012
+}
 
4013
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
 
4014
===================================================================
 
4015
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../tags/gcc_4_8_3_release)
 
4016
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90       (.../branches/gcc-4_8-branch)
 
4017
@@ -1,6 +1,6 @@
 
4018
 ! { dg-require-effective-target fortran_large_real }
 
4019
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
 
4020
-! Test XFAILed on these platforms because the system's printf() lacks
 
4021
+! { dg-do run { xfail powerpc*-apple-darwin* } }
 
4022
+! Test XFAILed on this platform because the system's printf() lacks
 
4023
 ! proper support for denormalized long doubles. See PR24685
 
4024
 !
 
4025
 ! This tests that the default formats for formatted I/O of reals are
 
4026
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
 
4027
===================================================================
 
4028
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../tags/gcc_4_8_3_release)
 
4029
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90   (.../branches/gcc-4_8-branch)
 
4030
@@ -0,0 +1,15 @@
 
4031
+! { dg-do compile }
 
4032
+! { dg-options "-fdump-tree-original" }
 
4033
+! PR 61999 - this used to ICE.
 
4034
+! Original test case by A. Kasahara
 
4035
+program main
 
4036
+   use, intrinsic:: iso_fortran_env, only: output_unit
 
4037
+
 
4038
+   implicit none
 
4039
+
 
4040
+   write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
 
4041
+
 
4042
+   stop
 
4043
+end program main
 
4044
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
 
4045
+! { dg-final { cleanup-tree-dump "original" } }
 
4046
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
 
4047
===================================================================
 
4048
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../tags/gcc_4_8_3_release)
 
4049
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90  (.../branches/gcc-4_8-branch)
 
4050
@@ -0,0 +1,13 @@
 
4051
+! PR fortran/59488
 
4052
+! { dg-do compile }
 
4053
+! { dg-options "-fopenmp" }
 
4054
+
 
4055
+  implicit none
 
4056
+  integer, parameter :: p(2) = (/ 11, 12 /)
 
4057
+  integer :: r
 
4058
+
 
4059
+  !$omp parallel do default(none)
 
4060
+  do r = 1, 2
 
4061
+    print *, p(r)
 
4062
+  end do
 
4063
+end
 
4064
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
 
4065
===================================================================
 
4066
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../tags/gcc_4_8_3_release)
 
4067
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90  (.../branches/gcc-4_8-branch)
 
4068
@@ -0,0 +1,16 @@
 
4069
+! PR fortran/59488
 
4070
+! { dg-do compile }
 
4071
+! { dg-options "-fopenmp" }
 
4072
+
 
4073
+  implicit none
 
4074
+  type t
 
4075
+    integer :: s1, s2, s3
 
4076
+  end type
 
4077
+  integer :: r
 
4078
+  type(t), parameter :: u = t(1, 2, 3)
 
4079
+
 
4080
+  !$omp parallel do default(none)
 
4081
+  do r = 1, 2
 
4082
+    print *, u
 
4083
+  end do
 
4084
+end
 
4085
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
 
4086
===================================================================
 
4087
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../tags/gcc_4_8_3_release)
 
4088
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90        (.../branches/gcc-4_8-branch)
 
4089
@@ -0,0 +1,18 @@
 
4090
+! { dg-do run }
 
4091
+! { dg-options "-fcray-pointer" }
 
4092
+!
 
4093
+! PR fortran/45187
 
4094
+!
 
4095
+module foo
 
4096
+  implicit none
 
4097
+  real :: a
 
4098
+  pointer(c_a, a)
 
4099
+end module foo
 
4100
+
 
4101
+program test
 
4102
+  use foo
 
4103
+  real :: z
 
4104
+  c_a = loc(z)
 
4105
+  a = 42
 
4106
+  if (z /= 42) call abort
 
4107
+end program test
 
4108
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
 
4109
===================================================================
 
4110
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../tags/gcc_4_8_3_release)
 
4111
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90   (.../branches/gcc-4_8-branch)
 
4112
@@ -0,0 +1,36 @@
 
4113
+! { dg-do run }
 
4114
+! Tests fix for PR61780 in which the loop reversal mechanism was
 
4115
+! not accounting for the first index being an element so that no
 
4116
+! loop in this dimension is created.
 
4117
+!
 
4118
+! Contributed by Manfred Tietze on clf.
 
4119
+!
 
4120
+program prgm3
 
4121
+    implicit none
 
4122
+    integer, parameter :: n = 10, k = 3
 
4123
+    integer :: i, j
 
4124
+    integer, dimension(n,n) :: y
 
4125
+    integer :: res1(n), res2(n)
 
4126
+
 
4127
+1   format(10i5)
 
4128
+
 
4129
+!initialize
 
4130
+    do i=1,n
 
4131
+        do j=1,n
 
4132
+            y(i,j) = n*i + j
 
4133
+        end do
 
4134
+    end do
 
4135
+    res2 = y(k,:)
 
4136
+
 
4137
+!shift right
 
4138
+    y(k,4:n) = y(k,3:n-1)
 
4139
+    y(k,3) = 0
 
4140
+    res1 = y(k,:)
 
4141
+    y(k,:) = res2
 
4142
+    y(k,n:4:-1) = y(k,n-1:3:-1)
 
4143
+    y(k,3) = 0
 
4144
+    res2 = y(k,:)
 
4145
+!    print *, res1
 
4146
+!    print *, res2
 
4147
+    if (any(res1 /= res2)) call abort ()
 
4148
+end program prgm3
 
4149
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
 
4150
===================================================================
 
4151
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../tags/gcc_4_8_3_release)
 
4152
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f        (.../branches/gcc-4_8-branch)
 
4153
@@ -0,0 +1,8 @@
 
4154
+C { dg-do compile }
 
4155
+      TYPE T
 
4156
+      INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
 
4157
+      END TYPE
 
4158
+      TYPE S
 
4159
+      INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
 
4160
+      END TYPE
 
4161
+      END
 
4162
Index: gcc/testsuite/gfortran.dg/nint_2.f90
 
4163
===================================================================
 
4164
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../tags/gcc_4_8_3_release)
 
4165
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90  (.../branches/gcc-4_8-branch)
 
4166
@@ -4,7 +4,8 @@
 
4167
 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
 
4168
 !
 
4169
 ! { dg-do run }
 
4170
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
4171
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
 
4172
+! Note that this doesn't fail on powerpc64le-*-linux*.
 
4173
   real(kind=8) :: a
 
4174
   integer(kind=8) :: i1, i2
 
4175
   real :: b
 
4176
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
 
4177
===================================================================
 
4178
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../tags/gcc_4_8_3_release)
 
4179
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90        (.../branches/gcc-4_8-branch)
 
4180
@@ -23,7 +23,7 @@
 
4181
     call bar2 (c)
 
4182
     call bar3 (c)
 
4183
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4184
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4185
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
 
4186
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4187
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
 
4188
   end subroutine
 
4189
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
 
4190
===================================================================
 
4191
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../tags/gcc_4_8_3_release)
 
4192
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90      (.../branches/gcc-4_8-branch)
 
4193
@@ -0,0 +1,16 @@
 
4194
+! { dg-do run }
 
4195
+! { dg-options "-ffrontend-optimize" }
 
4196
+! PR 62214 - this used to give the wrong result.
 
4197
+! Original test case by Oliver Fuhrer
 
4198
+PROGRAM test
 
4199
+  IMPLICIT NONE
 
4200
+  CHARACTER(LEN=20)   :: fullNames(2)
 
4201
+  CHARACTER(LEN=255)  :: pathName
 
4202
+  CHARACTER(LEN=5)    :: fileNames(2)
 
4203
+  
 
4204
+  pathName = "/dir1/dir2/"
 
4205
+  fileNames = (/ "file1", "file2" /)
 
4206
+  fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
 
4207
+  if (fullNames(1) /= '/dir1/dir2/file1' .or. &
 
4208
+       & fullnames(2) /= '/dir1/dir2/file2') call abort
 
4209
+END PROGRAM test
 
4210
Index: gcc/testsuite/gfortran.dg/pr45636.f90
 
4211
===================================================================
 
4212
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
 
4213
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
 
4214
@@ -10,5 +10,5 @@
 
4215
   b = y
 
4216
   call sub(a, b)
 
4217
 end program main
 
4218
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
 
4219
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
 
4220
 ! { dg-final { cleanup-tree-dump "forwprop2" } }
 
4221
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
 
4222
===================================================================
 
4223
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../tags/gcc_4_8_3_release)
 
4224
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90  (.../branches/gcc-4_8-branch)
 
4225
@@ -0,0 +1,47 @@
 
4226
+! { dg-do run }
 
4227
+! Test the fix for PR61459.
 
4228
+!
 
4229
+! Contributed by John Wingate  <johnww@tds.net>
 
4230
+!
 
4231
+module a
 
4232
+
 
4233
+   implicit none
 
4234
+   private
 
4235
+   public :: f_segfault, f_segfault_plus, f_workaround
 
4236
+   integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
 
4237
+
 
4238
+contains
 
4239
+
 
4240
+   function f_segfault(x)
 
4241
+      real, dimension(:), allocatable :: f_segfault
 
4242
+      real, dimension(:), intent(in)  :: x
 
4243
+      allocate(f_segfault(2))
 
4244
+      f_segfault = matmul(b,x)
 
4245
+   end function f_segfault
 
4246
+
 
4247
+! Sefaulted without the ALLOCATE as well.
 
4248
+   function f_segfault_plus(x)
 
4249
+      real, dimension(:), allocatable :: f_segfault_plus
 
4250
+      real, dimension(:), intent(in)  :: x
 
4251
+      f_segfault_plus = matmul(b,x)
 
4252
+   end function f_segfault_plus
 
4253
+
 
4254
+   function f_workaround(x)
 
4255
+      real, dimension(:), allocatable :: f_workaround
 
4256
+      real, dimension(:), intent(in)  :: x
 
4257
+      real, dimension(:), allocatable :: tmp
 
4258
+      allocate(f_workaround(2),tmp(2))
 
4259
+      tmp = matmul(b,x)
 
4260
+      f_workaround = tmp
 
4261
+   end function f_workaround
 
4262
+
 
4263
+end module a
 
4264
+
 
4265
+program main
 
4266
+   use a
 
4267
+   implicit none
 
4268
+   real, dimension(2) :: x = 1.0, y
 
4269
+   y = f_workaround (x)
 
4270
+   if (any (f_segfault (x) .ne. y)) call abort
 
4271
+   if (any (f_segfault_plus (x) .ne. y)) call abort
 
4272
+end program main
 
4273
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
 
4274
===================================================================
 
4275
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../tags/gcc_4_8_3_release)
 
4276
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90        (.../branches/gcc-4_8-branch)
 
4277
@@ -16,7 +16,7 @@
 
4278
 implicit none
 
4279
 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] 
 
4280
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
 
4281
-                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
 
4282
+                  * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
 
4283
 ! The following is sufficient for me - the values above are a bit
 
4284
 ! more tolerant
 
4285
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
 
4286
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
 
4287
===================================================================
 
4288
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../tags/gcc_4_8_3_release)
 
4289
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c       (.../branches/gcc-4_8-branch)
 
4290
@@ -0,0 +1,39 @@
 
4291
+#ifdef __INT32_TYPE__
 
4292
+typedef __INT32_TYPE__ int32_t;
 
4293
+#else
 
4294
+typedef int int32_t;
 
4295
+#endif
 
4296
+
 
4297
+#ifdef __UINT32_TYPE__
 
4298
+typedef __UINT32_TYPE__ uint32_t;
 
4299
+#else
 
4300
+typedef unsigned uint32_t;
 
4301
+#endif
 
4302
+
 
4303
+#define __fake_const_swab32(x) ((uint32_t)(                  \
 
4304
+       (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |    \
 
4305
+       (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |    \
 
4306
+       (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |    \
 
4307
+       (( (int32_t)(x) &  (int32_t)0xff000000UL) >> 24)))
 
4308
+
 
4309
+/* Previous version of bswap optimization failed to consider sign extension
 
4310
+   and as a result would replace an expression *not* doing a bswap by a
 
4311
+   bswap.  */
 
4312
+
 
4313
+__attribute__ ((noinline, noclone)) uint32_t
 
4314
+fake_bswap32 (uint32_t in)
 
4315
+{
 
4316
+  return __fake_const_swab32 (in);
 
4317
+}
 
4318
+
 
4319
+int
 
4320
+main(void)
 
4321
+{
 
4322
+  if (sizeof (int32_t) * __CHAR_BIT__ != 32)
 
4323
+    return 0;
 
4324
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
4325
+    return 0;
 
4326
+  if (fake_bswap32 (0x87654321) != 0xffffff87)
 
4327
+    __builtin_abort ();
 
4328
+  return 0;
 
4329
+}
 
4330
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
 
4331
===================================================================
 
4332
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
 
4333
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
 
4334
@@ -0,0 +1,2 @@
 
4335
+set additional_flags "-Wno-psabi"
 
4336
+return 0
 
4337
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
 
4338
===================================================================
 
4339
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../tags/gcc_4_8_3_release)
 
4340
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c        (.../branches/gcc-4_8-branch)
 
4341
@@ -0,0 +1,23 @@
 
4342
+union U
 
4343
+{
 
4344
+  const int a;
 
4345
+  unsigned b : 20;
 
4346
+};
 
4347
+
 
4348
+static union U u = { 0x12345678 };
 
4349
+
 
4350
+/* Constant folding used to fail to account for endianness when folding a
 
4351
+   union.  */
 
4352
+
 
4353
+int
 
4354
+main (void)
 
4355
+{
 
4356
+#ifdef __BYTE_ORDER__
 
4357
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
4358
+  return u.b - 0x45678;
 
4359
+#else
 
4360
+  return u.b - 0x12345;
 
4361
+#endif
 
4362
+#endif
 
4363
+  return 0;
 
4364
+}
 
4365
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
 
4366
===================================================================
 
4367
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../tags/gcc_4_8_3_release)
 
4368
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c       (.../branches/gcc-4_8-branch)
 
4369
@@ -0,0 +1,13 @@
 
4370
+short a = -1;
 
4371
+int b;
 
4372
+char c;
 
4373
+
 
4374
+int
 
4375
+main ()
 
4376
+{
 
4377
+  c = a;
 
4378
+  b = a | c;
 
4379
+  if (b != -1)
 
4380
+    __builtin_abort ();
 
4381
+  return 0;
 
4382
+}
 
4383
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
 
4384
===================================================================
 
4385
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../tags/gcc_4_8_3_release)
 
4386
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x      (.../branches/gcc-4_8-branch)
 
4387
@@ -6,4 +6,5 @@
 
4388
        set additional_flags "-mno-mmx"
 
4389
 }
 
4390
 
 
4391
+set additional_flags "-Wno-psabi"
 
4392
 return 0
 
4393
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
 
4394
===================================================================
 
4395
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../tags/gcc_4_8_3_release)
 
4396
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c       (.../branches/gcc-4_8-branch)
 
4397
@@ -0,0 +1,40 @@
 
4398
+#ifdef __INT16_TYPE__
 
4399
+typedef __INT16_TYPE__ int16_t;
 
4400
+#else
 
4401
+typedef short int16_t;
 
4402
+#endif
 
4403
+
 
4404
+#ifdef __UINT32_TYPE__
 
4405
+typedef __UINT32_TYPE__ uint32_t;
 
4406
+#else
 
4407
+typedef unsigned uint32_t;
 
4408
+#endif
 
4409
+
 
4410
+#define __fake_const_swab32(x) ((uint32_t)(                          \
 
4411
+       (((uint32_t)         (x) & (uint32_t)0x000000ffUL) << 24) |   \
 
4412
+       (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) <<  8) |   \
 
4413
+       (((uint32_t)         (x) & (uint32_t)0x00ff0000UL) >>  8) |   \
 
4414
+       (((uint32_t)         (x) & (uint32_t)0xff000000UL) >> 24)))
 
4415
+
 
4416
+
 
4417
+/* Previous version of bswap optimization failed to consider sign extension
 
4418
+   and as a result would replace an expression *not* doing a bswap by a
 
4419
+   bswap.  */
 
4420
+
 
4421
+__attribute__ ((noinline, noclone)) uint32_t
 
4422
+fake_bswap32 (uint32_t in)
 
4423
+{
 
4424
+  return __fake_const_swab32 (in);
 
4425
+}
 
4426
+
 
4427
+int
 
4428
+main(void)
 
4429
+{
 
4430
+  if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
 
4431
+    return 0;
 
4432
+  if (sizeof (int16_t) * __CHAR_BIT__ != 16)
 
4433
+    return 0;
 
4434
+  if (fake_bswap32 (0x81828384) != 0xff838281)
 
4435
+    __builtin_abort ();
 
4436
+  return 0;
 
4437
+}
 
4438
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
 
4439
===================================================================
 
4440
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
 
4441
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
 
4442
@@ -0,0 +1,35 @@
 
4443
+#ifdef __UINT64_TYPE__
 
4444
+typedef __UINT64_TYPE__ uint64_t;
 
4445
+#else
 
4446
+typedef unsigned long long uint64_t;
 
4447
+#endif
 
4448
+
 
4449
+#ifndef __SIZEOF_INT128__
 
4450
+#define __int128 long long
 
4451
+#endif
 
4452
+
 
4453
+/* Some version of bswap optimization would ICE when analyzing a mask constant
 
4454
+   too big for an HOST_WIDE_INT (PR61375).  */
 
4455
+
 
4456
+__attribute__ ((noinline, noclone)) uint64_t
 
4457
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
 
4458
+{
 
4459
+  __int128 mask = (__int128)0xffff << 56;
 
4460
+  return ((in1 & mask) >> 56) | in2;
 
4461
+}
 
4462
+
 
4463
+int
 
4464
+main (int argc)
 
4465
+{
 
4466
+  __int128 in = 1;
 
4467
+#ifdef __SIZEOF_INT128__
 
4468
+  in <<= 64;
 
4469
+#endif
 
4470
+  if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
 
4471
+    return 0;
 
4472
+  if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
 
4473
+    return 0;
 
4474
+  if (uint128_central_bitsi_ior (in, 2) != 0x102)
 
4475
+    __builtin_abort ();
 
4476
+  return 0;
 
4477
+}
 
4478
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
 
4479
===================================================================
 
4480
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../tags/gcc_4_8_3_release)
 
4481
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x      (.../branches/gcc-4_8-branch)
 
4482
@@ -4,4 +4,5 @@
 
4483
        return 1
 
4484
 }
 
4485
 
 
4486
+set additional_flags "-Wno-psabi"
 
4487
 return 0;
 
4488
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
 
4489
===================================================================
 
4490
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../tags/gcc_4_8_3_release)
 
4491
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x      (.../branches/gcc-4_8-branch)
 
4492
@@ -0,0 +1,2 @@
 
4493
+set additional_flags "-Wno-psabi"
 
4494
+return 0
 
4495
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
 
4496
===================================================================
 
4497
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
 
4498
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
 
4499
@@ -0,0 +1,15 @@
 
4500
+/* PR tree-optimization/61684 */
 
4501
+
 
4502
+int a, c;
 
4503
+static int *b = 0;
 
4504
+short d;
 
4505
+static short **e = 0;
 
4506
+
 
4507
+void
 
4508
+foo ()
 
4509
+{
 
4510
+  for (; c < 1; c++)
 
4511
+    ;
 
4512
+  *e = &d;
 
4513
+  a = d && (c && 1) & *b;
 
4514
+}
 
4515
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
 
4516
===================================================================
 
4517
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
 
4518
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
 
4519
@@ -0,0 +1,13 @@
 
4520
+/* PR inline-asm/63282 */
 
4521
+
 
4522
+void bar (void);
 
4523
+
 
4524
+void
 
4525
+foo (void)
 
4526
+{
 
4527
+  asm volatile goto ("" : : : : a, b);
 
4528
+a:
 
4529
+  bar ();
 
4530
+b:
 
4531
+  return;
 
4532
+}
 
4533
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
 
4534
===================================================================
 
4535
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../tags/gcc_4_8_3_release)
 
4536
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb   (.../branches/gcc-4_8-branch)
 
4537
@@ -0,0 +1,53 @@
 
4538
+with Ada.Streams; use Ada.Streams;
 
4539
+
 
4540
+package body Opt41_Pkg is
 
4541
+
 
4542
+   type Wstream is new Root_Stream_Type with record
 
4543
+      S : Unbounded_String;
 
4544
+   end record;
 
4545
+
 
4546
+   procedure Read (Stream : in out Wstream;
 
4547
+                   Item   : out Stream_Element_Array;
 
4548
+                   Last   : out Stream_Element_Offset) is null;
 
4549
+
 
4550
+   procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
 
4551
+   begin
 
4552
+      for J in Item'Range loop
 
4553
+         Append (Stream.S, Character'Val (Item (J)));
 
4554
+      end loop;
 
4555
+   end Write;
 
4556
+
 
4557
+   function Rec_Write (R : Rec) return Unbounded_String is
 
4558
+      S : aliased Wstream;
 
4559
+   begin
 
4560
+      Rec'Output (S'Access, R);
 
4561
+      return S.S;
 
4562
+   end Rec_Write;
 
4563
+
 
4564
+   type Rstream is new Root_Stream_Type with record
 
4565
+      S   : String_Access;
 
4566
+      Idx : Integer := 1;
 
4567
+   end record;
 
4568
+
 
4569
+   procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
 
4570
+
 
4571
+   procedure Read (Stream : in out Rstream;
 
4572
+                   Item   : out Stream_Element_Array;
 
4573
+                   Last   : out Stream_Element_Offset) is
 
4574
+   begin
 
4575
+      Last := Stream_Element_Offset'Min
 
4576
+         (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
 
4577
+      for I in Item'First .. Last loop
 
4578
+         Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
 
4579
+         Stream.Idx := Stream.Idx + 1;
 
4580
+      end loop;
 
4581
+   end Read;
 
4582
+
 
4583
+   function Rec_Read (Str : String_Access) return Rec is
 
4584
+      S : aliased Rstream;
 
4585
+   begin
 
4586
+      S.S := Str;
 
4587
+      return Rec'Input (S'Access);
 
4588
+   end Rec_Read;
 
4589
+
 
4590
+end Opt41_Pkg;
 
4591
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
 
4592
===================================================================
 
4593
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../tags/gcc_4_8_3_release)
 
4594
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads   (.../branches/gcc-4_8-branch)
 
4595
@@ -0,0 +1,28 @@
 
4596
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
4597
+
 
4598
+package Opt41_Pkg is
 
4599
+
 
4600
+   type Enum is (One, Two, Three, Four, Five, Six);
 
4601
+
 
4602
+   type Rec (D : Enum) is record
 
4603
+      case D is
 
4604
+         when One => 
 
4605
+            I : Integer;
 
4606
+         when Two | Five | Six =>
 
4607
+            S : Unbounded_String;
 
4608
+            case D is
 
4609
+               when Two => B : Boolean;
 
4610
+               when others => null;
 
4611
+            end case;
 
4612
+         when others =>
 
4613
+            null;
 
4614
+      end case;
 
4615
+   end record;
 
4616
+
 
4617
+   type Rec_Ptr is access all Rec;
 
4618
+
 
4619
+   function Rec_Write (R : Rec) return Unbounded_String;
 
4620
+
 
4621
+   function Rec_Read (Str : String_Access) return Rec;
 
4622
+
 
4623
+end Opt41_Pkg;
 
4624
Index: gcc/testsuite/gnat.dg/opt39.adb
 
4625
===================================================================
 
4626
--- a/src/gcc/testsuite/gnat.dg/opt39.adb       (.../tags/gcc_4_8_3_release)
 
4627
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb       (.../branches/gcc-4_8-branch)
 
4628
@@ -0,0 +1,31 @@
 
4629
+-- { dg-do compile }
 
4630
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
 
4631
+
 
4632
+procedure Opt39 (I : Integer) is
 
4633
+
 
4634
+  type Rec is record
 
4635
+    I1 : Integer;
 
4636
+    I2 : Integer;
 
4637
+    I3 : Integer;
 
4638
+    I4 : Integer;
 
4639
+    I5 : Integer;
 
4640
+  end record;
 
4641
+
 
4642
+  procedure Set (A : access Rec; I : Integer) is
 
4643
+    Tmp : Rec := A.all;
 
4644
+  begin
 
4645
+    Tmp.I1 := I;
 
4646
+    A.all := Tmp;
 
4647
+  end;
 
4648
+
 
4649
+  R : aliased Rec;
 
4650
+
 
4651
+begin
 
4652
+  Set (R'Access, I);
 
4653
+  if R.I1 /= I then
 
4654
+    raise Program_Error;
 
4655
+  end if;
 
4656
+end;
 
4657
+
 
4658
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
 
4659
+-- { dg-final { cleanup-tree-dump "optimized" } }
 
4660
Index: gcc/testsuite/gnat.dg/opt41.adb
 
4661
===================================================================
 
4662
--- a/src/gcc/testsuite/gnat.dg/opt41.adb       (.../tags/gcc_4_8_3_release)
 
4663
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb       (.../branches/gcc-4_8-branch)
 
4664
@@ -0,0 +1,15 @@
 
4665
+-- { dg-do run }
 
4666
+-- { dg-options "-Os" }
 
4667
+
 
4668
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
 
4669
+with Opt41_Pkg;             use Opt41_Pkg;
 
4670
+
 
4671
+procedure Opt41 is
 
4672
+   R  : Rec := (Five, To_Unbounded_String ("CONFIG"));
 
4673
+   SP : String_Access := new String'(To_String (Rec_Write (R)));
 
4674
+   RP : Rec_Ptr := new Rec'(Rec_Read (SP));
 
4675
+begin
 
4676
+   if RP.D /= R.D then
 
4677
+      raise Program_Error;
 
4678
+   end if;
 
4679
+end;
 
4680
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
 
4681
===================================================================
 
4682
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../tags/gcc_4_8_3_release)
 
4683
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb      (.../branches/gcc-4_8-branch)
 
4684
@@ -0,0 +1,19 @@
 
4685
+-- { dg-do run }
 
4686
+-- { dg-options "-gnato -O" }
 
4687
+
 
4688
+procedure Overflow_Fixed is
 
4689
+
 
4690
+  type Unsigned_8_Bit is mod 2**8;
 
4691
+
 
4692
+  procedure Fixed_To_Eight (Value : Duration) is
 
4693
+    Item : Unsigned_8_Bit;
 
4694
+  begin
 
4695
+    Item := Unsigned_8_Bit(Value);
 
4696
+    raise Program_Error;
 
4697
+  exception
 
4698
+    when Constraint_Error => null; -- expected case
 
4699
+  end;
 
4700
+
 
4701
+begin
 
4702
+  Fixed_To_Eight (-0.5);
 
4703
+end;
 
4704
Index: gcc/testsuite/gnat.dg/aliasing1.adb
 
4705
===================================================================
 
4706
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../tags/gcc_4_8_3_release)
 
4707
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb   (.../branches/gcc-4_8-branch)
 
4708
@@ -18,5 +18,5 @@
 
4709
 
 
4710
 end Aliasing1;
 
4711
 
 
4712
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
 
4713
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
 
4714
 -- { dg-final { cleanup-tree-dump "optimized" } }
 
4715
Index: gcc/testsuite/gcc.dg/pr60866.c
 
4716
===================================================================
 
4717
--- a/src/gcc/testsuite/gcc.dg/pr60866.c        (.../tags/gcc_4_8_3_release)
 
4718
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c        (.../branches/gcc-4_8-branch)
 
4719
@@ -0,0 +1,18 @@
 
4720
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
 
4721
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns"  } */
 
4722
+
 
4723
+int n;
 
4724
+
 
4725
+void
 
4726
+foo (int w, int **dnroot, int **dn)
 
4727
+{
 
4728
+  int *child;
 
4729
+  int *xchild = xchild;
 
4730
+  for (; w < n; w++)
 
4731
+    if (!dnroot)
 
4732
+      {
 
4733
+       dnroot = dn;
 
4734
+       for (child = *dn; child; child = xchild)
 
4735
+         ;
 
4736
+      }
 
4737
+}
 
4738
Index: gcc/testsuite/gcc.dg/pr51879-12.c
 
4739
===================================================================
 
4740
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../tags/gcc_4_8_3_release)
 
4741
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c     (.../branches/gcc-4_8-branch)
 
4742
@@ -24,6 +24,6 @@
 
4743
   baz (a);
 
4744
 }
 
4745
 
 
4746
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
 
4747
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
 
4748
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
 
4749
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
 
4750
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
4751
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
 
4752
===================================================================
 
4753
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../tags/gcc_4_8_3_release)
 
4754
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c     (.../branches/gcc-4_8-branch)
 
4755
@@ -1,4 +1,5 @@
 
4756
 /* { dg-do compile } */
 
4757
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4758
 #include <altivec.h>
 
4759
 typedef const volatile unsigned int _1;
 
4760
 typedef const  unsigned int _2;
 
4761
Index: gcc/testsuite/gcc.dg/vmx/ops.c
 
4762
===================================================================
 
4763
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../tags/gcc_4_8_3_release)
 
4764
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c        (.../branches/gcc-4_8-branch)
 
4765
@@ -1,4 +1,5 @@
 
4766
 /* { dg-do compile } */
 
4767
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4768
 #include <altivec.h>
 
4769
 #include <stdlib.h>
 
4770
 extern char * *var_char_ptr;
 
4771
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
 
4772
===================================================================
 
4773
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
 
4774
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
 
4775
@@ -1,4 +1,5 @@
 
4776
 /* { dg-do compile } */
 
4777
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
 
4778
 
 
4779
 /* Checks from the original ops.c that pass pointers to long or
 
4780
    unsigned long for operations that support that in released versions
 
4781
Index: gcc/testsuite/gcc.dg/pr63665.c
 
4782
===================================================================
 
4783
--- a/src/gcc/testsuite/gcc.dg/pr63665.c        (.../tags/gcc_4_8_3_release)
 
4784
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c        (.../branches/gcc-4_8-branch)
 
4785
@@ -0,0 +1,18 @@
 
4786
+/* { dg-do run } */
 
4787
+/* { dg-require-effective-target int32plus } */
 
4788
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
 
4789
+
 
4790
+static inline int
 
4791
+test5 (int x)
 
4792
+{
 
4793
+  int y = 0x80000000;
 
4794
+  return x + y;
 
4795
+}
 
4796
+
 
4797
+int
 
4798
+main ()
 
4799
+{
 
4800
+  if (test5 (0x80000000) != 0)
 
4801
+    __builtin_abort ();
 
4802
+  return 0;
 
4803
+}
 
4804
Index: gcc/testsuite/gcc.dg/pr63342.c
 
4805
===================================================================
 
4806
--- a/src/gcc/testsuite/gcc.dg/pr63342.c        (.../tags/gcc_4_8_3_release)
 
4807
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c        (.../branches/gcc-4_8-branch)
 
4808
@@ -0,0 +1,26 @@
 
4809
+/* PR debug/63342 */
 
4810
+/* { dg-do compile } */
 
4811
+/* { dg-options "-g -O2" } */
 
4812
+/* { dg-additional-options "-fpic" { target fpic } } */
 
4813
+
 
4814
+static __thread double u[9], v[9];
 
4815
+
 
4816
+void
 
4817
+foo (double **p, double **q)
 
4818
+{
 
4819
+  *p = u;
 
4820
+  *q = v;
 
4821
+}
 
4822
+
 
4823
+double
 
4824
+bar (double x)
 
4825
+{
 
4826
+  int i;
 
4827
+  double s = 0.0;
 
4828
+  for (i = 0; i < 9; i++)
 
4829
+    {
 
4830
+      double a = x + v[i];
 
4831
+      s += u[i] * a * a;
 
4832
+    }
 
4833
+  return s;
 
4834
+}
 
4835
Index: gcc/testsuite/gcc.dg/pr63284.c
 
4836
===================================================================
 
4837
--- a/src/gcc/testsuite/gcc.dg/pr63284.c        (.../tags/gcc_4_8_3_release)
 
4838
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c        (.../branches/gcc-4_8-branch)
 
4839
@@ -0,0 +1,42 @@
 
4840
+/* PR debug/63284 */
 
4841
+/* { dg-do compile } */
 
4842
+/* { dg-options "-O2 -fcompare-debug" } */
 
4843
+
 
4844
+int a[10], *b, *d, c, f;
 
4845
+int fn2 (void);
 
4846
+void fn3 (void);
 
4847
+void fn4 (int);
 
4848
+
 
4849
+static int
 
4850
+fn1 (int x)
 
4851
+{
 
4852
+  int e = a[0];
 
4853
+  if (e)
 
4854
+    return 1;
 
4855
+  if (b)
 
4856
+    switch (x)
 
4857
+      {
 
4858
+      case 1:
 
4859
+        if (d)
 
4860
+          e = fn2 ();
 
4861
+        else
 
4862
+          fn3 ();
 
4863
+        break;
 
4864
+      case 0:
 
4865
+        if (d)
 
4866
+          {
 
4867
+            fn3 ();
 
4868
+            if (c)
 
4869
+              fn4 (1);
 
4870
+          }
 
4871
+        else
 
4872
+          fn4 (0);
 
4873
+      }
 
4874
+  return e;
 
4875
+}
 
4876
+
 
4877
+void
 
4878
+fn6 (void)
 
4879
+{
 
4880
+  f = fn1 (0);
 
4881
+}
 
4882
Index: gcc/testsuite/gcc.dg/pr61045.c
 
4883
===================================================================
 
4884
--- a/src/gcc/testsuite/gcc.dg/pr61045.c        (.../tags/gcc_4_8_3_release)
 
4885
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c        (.../branches/gcc-4_8-branch)
 
4886
@@ -0,0 +1,12 @@
 
4887
+/* { dg-do run } */
 
4888
+/* { dg-options "-fstrict-overflow" } */
 
4889
+
 
4890
+int main ()
 
4891
+{
 
4892
+  int a = 0;
 
4893
+  int b = __INT_MAX__;
 
4894
+  int t = (a - 2) > (b - 1);
 
4895
+  if (t != 0)
 
4896
+    __builtin_abort();
 
4897
+  return 0;
 
4898
+}
 
4899
Index: gcc/testsuite/gcc.dg/pr62167-run.c
 
4900
===================================================================
 
4901
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../tags/gcc_4_8_3_release)
 
4902
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c    (.../branches/gcc-4_8-branch)
 
4903
@@ -0,0 +1,47 @@
 
4904
+/* { dg-do run } */
 
4905
+/* { dg-options "-O2 -ftree-tail-merge" } */
 
4906
+
 
4907
+struct node
 
4908
+{
 
4909
+  struct node *next;
 
4910
+  struct node *prev;
 
4911
+};
 
4912
+
 
4913
+struct node node;
 
4914
+
 
4915
+struct head
 
4916
+{
 
4917
+  struct node *first;
 
4918
+};
 
4919
+
 
4920
+struct head heads[5];
 
4921
+
 
4922
+int k = 2;
 
4923
+
 
4924
+struct head *head = &heads[2];
 
4925
+
 
4926
+int
 
4927
+main ()
 
4928
+{
 
4929
+  struct node *p;
 
4930
+
 
4931
+  node.next = (void*)0;
 
4932
+
 
4933
+  node.prev = (void *)head;
 
4934
+
 
4935
+  head->first = &node;
 
4936
+
 
4937
+  struct node *n = head->first;
 
4938
+
 
4939
+  struct head *h = &heads[k];
 
4940
+
 
4941
+  heads[2].first = n->next;
 
4942
+
 
4943
+  if ((void*)n->prev == (void *)h)
 
4944
+    p = h->first;
 
4945
+  else
 
4946
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
4947
+    p = n->prev->next;
 
4948
+
 
4949
+  return !(p == (void*)0);
 
4950
+}
 
4951
Index: gcc/testsuite/gcc.dg/pr52769.c
 
4952
===================================================================
 
4953
--- a/src/gcc/testsuite/gcc.dg/pr52769.c        (.../tags/gcc_4_8_3_release)
 
4954
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c        (.../branches/gcc-4_8-branch)
 
4955
@@ -0,0 +1,24 @@
 
4956
+/* PR c/52769 */
 
4957
+/* { dg-do run } */
 
4958
+/* { dg-options "-O3" } */
 
4959
+
 
4960
+typedef struct
 
4961
+{
 
4962
+  int should_be_zero;
 
4963
+  char s[6];
 
4964
+  int x;
 
4965
+} foo_t;
 
4966
+
 
4967
+int
 
4968
+main (void)
 
4969
+{
 
4970
+  volatile foo_t foo = {
 
4971
+    .s = "123456",
 
4972
+    .x = 2
 
4973
+  };
 
4974
+
 
4975
+  if (foo.should_be_zero != 0)
 
4976
+    __builtin_abort ();
 
4977
+
 
4978
+  return 0;
 
4979
+}
 
4980
Index: gcc/testsuite/gcc.dg/pr62167.c
 
4981
===================================================================
 
4982
--- a/src/gcc/testsuite/gcc.dg/pr62167.c        (.../tags/gcc_4_8_3_release)
 
4983
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c        (.../branches/gcc-4_8-branch)
 
4984
@@ -0,0 +1,50 @@
 
4985
+/* { dg-do compile } */
 
4986
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
 
4987
+
 
4988
+struct node
 
4989
+{
 
4990
+  struct node *next;
 
4991
+  struct node *prev;
 
4992
+};
 
4993
+
 
4994
+struct node node;
 
4995
+
 
4996
+struct head
 
4997
+{
 
4998
+  struct node *first;
 
4999
+};
 
5000
+
 
5001
+struct head heads[5];
 
5002
+
 
5003
+int k = 2;
 
5004
+
 
5005
+struct head *head = &heads[2];
 
5006
+
 
5007
+int
 
5008
+main ()
 
5009
+{
 
5010
+  struct node *p;
 
5011
+
 
5012
+  node.next = (void*)0;
 
5013
+
 
5014
+  node.prev = (void *)head;
 
5015
+
 
5016
+  head->first = &node;
 
5017
+
 
5018
+  struct node *n = head->first;
 
5019
+
 
5020
+  struct head *h = &heads[k];
 
5021
+
 
5022
+  heads[2].first = n->next;
 
5023
+
 
5024
+  if ((void*)n->prev == (void *)h)
 
5025
+    p = h->first;
 
5026
+  else
 
5027
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5028
+    p = n->prev->next;
 
5029
+
 
5030
+  return !(p == (void*)0);
 
5031
+}
 
5032
+
 
5033
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
 
5034
+/* { dg-final { cleanup-tree-dump "pre" } } */
 
5035
Index: gcc/testsuite/gcc.dg/pr62004.c
 
5036
===================================================================
 
5037
--- a/src/gcc/testsuite/gcc.dg/pr62004.c        (.../tags/gcc_4_8_3_release)
 
5038
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c        (.../branches/gcc-4_8-branch)
 
5039
@@ -0,0 +1,47 @@
 
5040
+/* { dg-do run } */
 
5041
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
 
5042
+
 
5043
+struct node
 
5044
+{
 
5045
+  struct node *next;
 
5046
+  struct node *prev;
 
5047
+};
 
5048
+
 
5049
+struct node node;
 
5050
+
 
5051
+struct head
 
5052
+{
 
5053
+  struct node *first;
 
5054
+};
 
5055
+
 
5056
+struct head heads[5];
 
5057
+
 
5058
+int k = 2;
 
5059
+
 
5060
+struct head *head = &heads[2];
 
5061
+
 
5062
+int
 
5063
+main ()
 
5064
+{
 
5065
+  struct node *p;
 
5066
+
 
5067
+  node.next = (void*)0;
 
5068
+
 
5069
+  node.prev = (void *)head;
 
5070
+
 
5071
+  head->first = &node;
 
5072
+
 
5073
+  struct node *n = head->first;
 
5074
+
 
5075
+  struct head *h = &heads[k];
 
5076
+
 
5077
+  heads[2].first = n->next;
 
5078
+
 
5079
+  if ((void*)n->prev == (void *)h)
 
5080
+    p = h->first;
 
5081
+  else
 
5082
+    /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next.  */
 
5083
+    p = n->prev->next;
 
5084
+
 
5085
+  return !(p == (void*)0);
 
5086
+}
 
5087
Index: gcc/testsuite/gcc.dg/pr51879-18.c
 
5088
===================================================================
 
5089
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../tags/gcc_4_8_3_release)
 
5090
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c     (.../branches/gcc-4_8-branch)
 
5091
@@ -13,5 +13,5 @@
 
5092
     *q = foo ();
 
5093
 }
 
5094
 
 
5095
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
 
5096
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
 
5097
 /* { dg-final { cleanup-tree-dump "pre" } } */
 
5098
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
 
5099
===================================================================
 
5100
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../tags/gcc_4_8_3_release)
 
5101
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c        (.../branches/gcc-4_8-branch)
 
5102
@@ -0,0 +1,33 @@
 
5103
+/* { dg-do run } */
 
5104
+
 
5105
+extern void abort (void);
 
5106
+
 
5107
+struct node { struct node *next, *prev; } node;
 
5108
+struct head { struct node *first; } heads[5];
 
5109
+int k = 2;
 
5110
+struct head *head = &heads[2];
 
5111
+
 
5112
+static int __attribute__((noinline))
 
5113
+foo()
 
5114
+{
 
5115
+  node.prev = (void *)head;
 
5116
+  head->first = &node;
 
5117
+
 
5118
+  struct node *n = head->first;
 
5119
+  struct head *h = &heads[k];
 
5120
+
 
5121
+  if (n->prev == (void *)h)
 
5122
+    h->first = n->next;
 
5123
+  else
 
5124
+    n->prev->next = n->next;
 
5125
+
 
5126
+  n->next = h->first;
 
5127
+  return n->next == &node;
 
5128
+}
 
5129
+
 
5130
+int main()
 
5131
+{
 
5132
+  if (foo ())
 
5133
+    abort ();
 
5134
+  return 0;
 
5135
+}
 
5136
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
 
5137
===================================================================
 
5138
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../tags/gcc_4_8_3_release)
 
5139
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c        (.../branches/gcc-4_8-branch)
 
5140
@@ -0,0 +1,8 @@
 
5141
+/* { dg-do compile } */
 
5142
+
 
5143
+int main (void)
 
5144
+{
 
5145
+  int a = 0;
 
5146
+  unsigned b = (a * 64 & 192) | 63U;
 
5147
+  return 0;
 
5148
+}
 
5149
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
 
5150
===================================================================
 
5151
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../tags/gcc_4_8_3_release)
 
5152
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c        (.../branches/gcc-4_8-branch)
 
5153
@@ -0,0 +1,31 @@
 
5154
+/* { dg-do run } */
 
5155
+
 
5156
+int a, b;
 
5157
+short c, d;
 
5158
+char e, f;
 
5159
+
 
5160
+int
 
5161
+fn1 (int p1, char p2)
 
5162
+{
 
5163
+  return p1 || p2 ? 0 : p2;
 
5164
+}
 
5165
+
 
5166
+void
 
5167
+fn2 ()
 
5168
+{
 
5169
+  for (; a;)
 
5170
+    {
 
5171
+      int g;
 
5172
+      g = c = e;
 
5173
+      for (; a;)
 
5174
+       b = fn1 (g = d = e, g);
 
5175
+      f = g; 
 
5176
+    }
 
5177
+}
 
5178
+
 
5179
+int
 
5180
+main ()
 
5181
+{
 
5182
+  fn2 (); 
 
5183
+  return 0;
 
5184
+}
 
5185
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
 
5186
===================================================================
 
5187
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../tags/gcc_4_8_3_release)
 
5188
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c      (.../branches/gcc-4_8-branch)
 
5189
@@ -0,0 +1,35 @@
 
5190
+/* { dg-do run } */
 
5191
+
 
5192
+int a, b = 1, c, d, e, f, g;
 
5193
+
 
5194
+int
 
5195
+fn1 ()
 
5196
+{
 
5197
+  int h;
 
5198
+  for (;;)
 
5199
+    {
 
5200
+      g = b;
 
5201
+      g = g ? 0 : 1 % g;
 
5202
+      e = a + 1;
 
5203
+      for (; d < 1; d = e)
 
5204
+       {
 
5205
+         if (f == 0)
 
5206
+           h = 0;
 
5207
+         else
 
5208
+           h = 1 % f;
 
5209
+         if (f < 1)
 
5210
+           c = 0;
 
5211
+         else if (h)
 
5212
+           break;
 
5213
+       }
 
5214
+      if (b)
 
5215
+       return 0;
 
5216
+    }
 
5217
+}
 
5218
+
 
5219
+int
 
5220
+main ()
 
5221
+{
 
5222
+  fn1 ();
 
5223
+  return 0;
 
5224
+}
 
5225
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
 
5226
===================================================================
 
5227
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../tags/gcc_4_8_3_release)
 
5228
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c       (.../branches/gcc-4_8-branch)
 
5229
@@ -0,0 +1,41 @@
 
5230
+/* Test that exact underflow in __float128 signals the underflow
 
5231
+   exception if trapping is enabled, but does not raise the flag
 
5232
+   otherwise.  */
 
5233
+
 
5234
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
 
5235
+/* { dg-options "-D_GNU_SOURCE" } */
 
5236
+/* { dg-require-effective-target fenv_exceptions } */
 
5237
+
 
5238
+#include <fenv.h>
 
5239
+#include <setjmp.h>
 
5240
+#include <signal.h>
 
5241
+#include <stdlib.h>
 
5242
+
 
5243
+volatile sig_atomic_t caught_sigfpe;
 
5244
+sigjmp_buf buf;
 
5245
+
 
5246
+static void
 
5247
+handle_sigfpe (int sig)
 
5248
+{
 
5249
+  caught_sigfpe = 1;
 
5250
+  siglongjmp (buf, 1);
 
5251
+}
 
5252
+
 
5253
+int
 
5254
+main (void)
 
5255
+{
 
5256
+  volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
 
5257
+  volatile __float128 r;
 
5258
+  r = a * b;
 
5259
+  if (fetestexcept (FE_UNDERFLOW))
 
5260
+    abort ();
 
5261
+  if (r != 0x1p-16384q)
 
5262
+    abort ();
 
5263
+  feenableexcept (FE_UNDERFLOW);
 
5264
+  signal (SIGFPE, handle_sigfpe);
 
5265
+  if (sigsetjmp (buf, 1) == 0)
 
5266
+    r = a * b;
 
5267
+  if (!caught_sigfpe)
 
5268
+    abort ();
 
5269
+  exit (0);
 
5270
+}
 
5271
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
 
5272
===================================================================
 
5273
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../tags/gcc_4_8_3_release)
 
5274
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c        (.../branches/gcc-4_8-branch)
 
5275
@@ -0,0 +1,52 @@
 
5276
+/* { dg-do run } */
 
5277
+
 
5278
+#include <stdlib.h>
 
5279
+
 
5280
+#define NUM_OF_STATES 4
 
5281
+typedef unsigned int entry_t[2];
 
5282
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
 
5283
+
 
5284
+void __attribute__((noinline,noclone))
 
5285
+test_00(size_t numOfStates, entries_item_t* p_bm,
 
5286
+       const unsigned int* polyArray,
 
5287
+       size_t polyArraySize)
 
5288
+{
 
5289
+  size_t idx;
 
5290
+  unsigned int hlp0, hlp1;
 
5291
+  for (idx = 0; idx < numOfStates; ++idx)
 
5292
+    {
 
5293
+      size_t idy;
 
5294
+
 
5295
+      hlp0 = (idx << 1) | 0x00;
 
5296
+      hlp1 = (idx << 1) | 0x01;
 
5297
+      p_bm->metricEntries_[idx][0] = 0;
 
5298
+      p_bm->metricEntries_[idx][1] = 0;
 
5299
+      for (idy = 0; idy < polyArraySize; ++idy)
 
5300
+       {
 
5301
+         p_bm->metricEntries_[idx][0]
 
5302
+             |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
 
5303
+         p_bm->metricEntries_[idx][1]
 
5304
+             |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
 
5305
+       }
 
5306
+    }
 
5307
+}
 
5308
+
 
5309
+int main()
 
5310
+{
 
5311
+  unsigned int polyArray[] = { 0x07, 0x05 };
 
5312
+  entries_item_t* pBranchMetrics;
 
5313
+  pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
 
5314
+  test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
 
5315
+         sizeof(polyArray) / sizeof(polyArray[0]));
 
5316
+  if (pBranchMetrics->metricEntries_[0][0] != 0
 
5317
+      || pBranchMetrics->metricEntries_[0][1] != 3
 
5318
+      || pBranchMetrics->metricEntries_[1][0] != 1
 
5319
+      || pBranchMetrics->metricEntries_[1][1] != 2
 
5320
+      || pBranchMetrics->metricEntries_[2][0] != 3
 
5321
+      || pBranchMetrics->metricEntries_[2][1] != 0
 
5322
+      || pBranchMetrics->metricEntries_[3][0] != 2
 
5323
+      || pBranchMetrics->metricEntries_[3][1] != 1)
 
5324
+    abort ();
 
5325
+  free(pBranchMetrics);
 
5326
+  return 0;
 
5327
+}
 
5328
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
 
5329
===================================================================
 
5330
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../tags/gcc_4_8_3_release)
 
5331
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc      (.../branches/gcc-4_8-branch)
 
5332
@@ -23,7 +23,8 @@
 
5333
 T (20, 0, 4, 1, 5) \
 
5334
 T (21, 2, 6, 3, 7) \
 
5335
 T (22, 1, 2, 3, 0) \
 
5336
-T (23, 2, 1, 0, 3)
 
5337
+T (23, 2, 1, 0, 3) \
 
5338
+T (24, 2, 5, 6, 3)
 
5339
 #define EXPTESTS \
 
5340
 T (116,        1, 2, 4, 3) \
 
5341
 T (117,        7, 3, 3, 0) \
 
5342
@@ -31,7 +32,6 @@
 
5343
 T (119,        0, 3, 5, 6) \
 
5344
 T (120,        0, 0, 1, 5) \
 
5345
 T (121,        4, 6, 2, 1) \
 
5346
-T (122,        2, 5, 6, 3) \
 
5347
 T (123,        4, 6, 3, 2) \
 
5348
 T (124,        4, 7, 5, 6) \
 
5349
 T (125,        0, 4, 2, 4) \
 
5350
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
 
5351
===================================================================
 
5352
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../tags/gcc_4_8_3_release)
 
5353
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c  (.../branches/gcc-4_8-branch)
 
5354
@@ -1,21 +1,21 @@
 
5355
 /* { dg-do compile } */
 
5356
 /* { dg-options "-Wstack-usage=512" } */
 
5357
 
 
5358
-int foo1 (void)
 
5359
+int foo1 (void)  /* { dg-bogus "stack usage" } */
 
5360
 {
 
5361
   char arr[16];
 
5362
   arr[0] = 1;
 
5363
   return 0;
 
5364
-} /* { dg-bogus "stack usage" } */
 
5365
+}
 
5366
 
 
5367
-int foo2 (void)
 
5368
+int foo2 (void)  /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
5369
 {
 
5370
   char arr[1024];
 
5371
   arr[0] = 1;
 
5372
   return 0;
 
5373
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
 
5374
+}
 
5375
 
 
5376
-int foo3 (void)
 
5377
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
5378
 {
 
5379
   char arr[1024] __attribute__((aligned (512)));
 
5380
   arr[0] = 1;
 
5381
@@ -22,12 +22,11 @@
 
5382
   /* Force dynamic realignment of argument pointer.  */
 
5383
   __builtin_apply ((void (*)()) foo2, 0, 0);
 
5384
   return 0;
 
5385
+}
 
5386
 
 
5387
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
 
5388
-
 
5389
-int foo4 (int n)
 
5390
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
 
5391
 {
 
5392
   char arr[n];
 
5393
   arr[0] = 1;
 
5394
   return 0;
 
5395
-} /* { dg-warning "stack usage might be unbounded" } */
 
5396
+}
 
5397
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
 
5398
===================================================================
 
5399
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../tags/gcc_4_8_3_release)
 
5400
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c    (.../branches/gcc-4_8-branch)
 
5401
@@ -0,0 +1,48 @@
 
5402
+/* { dg-do compile } */
 
5403
+/* { dg-options "-O3" } */
 
5404
+
 
5405
+int a, b, c;
 
5406
+
 
5407
+struct S
 
5408
+{
 
5409
+  int f0;
 
5410
+  int f1;
 
5411
+} d;
 
5412
+
 
5413
+static int fn2 (struct S);
 
5414
+void fn3 (struct S);
 
5415
+
 
5416
+void
 
5417
+fn1 (struct S p)
 
5418
+{
 
5419
+  struct S h = { 0, 0 };
 
5420
+  fn3 (p);
 
5421
+  fn2 (h);
 
5422
+}
 
5423
+
 
5424
+int
 
5425
+fn2 (struct S p)
 
5426
+{
 
5427
+  struct S j = { 0, 0 };
 
5428
+  fn3 (p);
 
5429
+  fn2 (j);
 
5430
+  return 0;
 
5431
+}
 
5432
+
 
5433
+void
 
5434
+fn3 (struct S p)
 
5435
+{
 
5436
+  for (; b; a++)
 
5437
+    c = p.f0;
 
5438
+  fn1 (d);
 
5439
+}
 
5440
+
 
5441
+void
 
5442
+fn4 ()
 
5443
+{
 
5444
+  for (;;)
 
5445
+    {
 
5446
+      struct S f = { 0, 0 };
 
5447
+      fn1 (f);
 
5448
+    }
 
5449
+}
 
5450
Index: gcc/testsuite/gcc.dg/pr62030.c
 
5451
===================================================================
 
5452
--- a/src/gcc/testsuite/gcc.dg/pr62030.c        (.../tags/gcc_4_8_3_release)
 
5453
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c        (.../branches/gcc-4_8-branch)
 
5454
@@ -0,0 +1,50 @@
 
5455
+/* { dg-do run } */
 
5456
+/* { dg-options "-O2" } */
 
5457
+
 
5458
+extern void abort (void);
 
5459
+
 
5460
+struct node
 
5461
+{
 
5462
+  struct node *next;
 
5463
+  struct node *prev;
 
5464
+};
 
5465
+
 
5466
+struct node node;
 
5467
+
 
5468
+struct head
 
5469
+{
 
5470
+  struct node *first;
 
5471
+};
 
5472
+
 
5473
+struct head heads[5];
 
5474
+
 
5475
+int k = 2;
 
5476
+
 
5477
+struct head *head = &heads[2];
 
5478
+
 
5479
+static int __attribute__((noinline))
 
5480
+foo (void)
 
5481
+{
 
5482
+  node.prev = (void *)head;
 
5483
+  head->first = &node;
 
5484
+
 
5485
+  struct node *n = head->first;
 
5486
+  struct head *h = &heads[k];
 
5487
+  struct node *next = n->next;
 
5488
+
 
5489
+  if (n->prev == (void *)h)
 
5490
+    h->first = next;
 
5491
+  else
 
5492
+    n->prev->next = next;
 
5493
+
 
5494
+  n->next = h->first;
 
5495
+  return n->next == &node;
 
5496
+}
 
5497
+
 
5498
+int
 
5499
+main (void)
 
5500
+{
 
5501
+  if (foo ())
 
5502
+    abort ();
 
5503
+  return 0;
 
5504
+}
 
5505
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
 
5506
===================================================================
 
5507
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
 
5508
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
 
5509
@@ -0,0 +1,35 @@
 
5510
+/* PR tree-optimization/63341 */
 
5511
+/* { dg-do run } */
 
5512
+
 
5513
+#include "tree-vect.h"
 
5514
+
 
5515
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
5516
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
5517
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
 
5518
+                 {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
 
5519
+                 {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
 
5520
+                 {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
 
5521
+unsigned short d[32] = { 1 };
 
5522
+
 
5523
+__attribute__((noinline, noclone)) void
 
5524
+foo ()
 
5525
+{
 
5526
+  int i;
 
5527
+  for (i = 0; i < 32; i++)
 
5528
+    d[i] = t.s[i].s + 4;
 
5529
+  for (i = 0; i < 32; i++)
 
5530
+    if (d[i] != t.s[i].s + 4)
 
5531
+      abort ();
 
5532
+    else
 
5533
+      asm volatile ("" : : : "memory");
 
5534
+}
 
5535
+
 
5536
+int
 
5537
+main ()
 
5538
+{
 
5539
+  check_vect ();
 
5540
+  foo ();
 
5541
+  return 0;
 
5542
+}
 
5543
+
 
5544
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5545
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
 
5546
===================================================================
 
5547
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../tags/gcc_4_8_3_release)
 
5548
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c   (.../branches/gcc-4_8-branch)
 
5549
@@ -0,0 +1,26 @@
 
5550
+/* PR tree-optimization/63189 */
 
5551
+/* { dg-do run } */
 
5552
+
 
5553
+#include "tree-vect.h"
 
5554
+
 
5555
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
 
5556
+
 
5557
+__attribute__((noinline, noclone)) void
 
5558
+foo (void)
 
5559
+{
 
5560
+  int j, s = 0;
 
5561
+  for (j = 0; j < 8; j++)
 
5562
+    s += d[j] * j;
 
5563
+  if (s != 7)
 
5564
+    abort ();
 
5565
+}
 
5566
+
 
5567
+int
 
5568
+main ()
 
5569
+{
 
5570
+  check_vect ();
 
5571
+  foo ();
 
5572
+  return 0;
 
5573
+}
 
5574
+
 
5575
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5576
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
 
5577
===================================================================
 
5578
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../tags/gcc_4_8_3_release)
 
5579
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c       (.../branches/gcc-4_8-branch)
 
5580
@@ -0,0 +1,73 @@
 
5581
+/* { dg-require-effective-target vect_int } */
 
5582
+
 
5583
+#include <stdarg.h>
 
5584
+#include "tree-vect.h"
 
5585
+
 
5586
+#define N 64
 
5587
+#define DOT 43680
 
5588
+
 
5589
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
5590
+signed int   Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
 
5591
+
 
5592
+/* (short, int)->int->int dot product.
 
5593
+   Not detected as a dot-product pattern.  */
 
5594
+
 
5595
+__attribute__ ((noinline)) int
 
5596
+foo (int len)
 
5597
+{
 
5598
+  int i;
 
5599
+  int result = 0;
 
5600
+
 
5601
+  for (i = 0; i < len; i++)
 
5602
+    {
 
5603
+      result += (X[i] * Y[i]);
 
5604
+    }
 
5605
+  return result;
 
5606
+}
 
5607
+
 
5608
+
 
5609
+/* (int, short)->int->int dot product.
 
5610
+   Not detected as a dot-product pattern.  */
 
5611
+
 
5612
+__attribute__ ((noinline)) int
 
5613
+bar (int len)
 
5614
+{
 
5615
+  int i;
 
5616
+  int result = 0;
 
5617
+
 
5618
+  for (i = 0; i < len; i++)
 
5619
+    {
 
5620
+      result += (Y[i] * X[i]);
 
5621
+    }
 
5622
+  return result;
 
5623
+}
 
5624
+
 
5625
+int
 
5626
+main (void)
 
5627
+{
 
5628
+  int i;
 
5629
+  int dot;
 
5630
+
 
5631
+  check_vect ();
 
5632
+
 
5633
+  for (i = 0; i < N; i++)
 
5634
+    {
 
5635
+      X[i] = i;
 
5636
+      Y[i] = N - i;
 
5637
+      __asm__ volatile ("");
 
5638
+    }
 
5639
+
 
5640
+  dot = foo (N);
 
5641
+  if (dot != DOT)
 
5642
+    abort ();
 
5643
+
 
5644
+  dot = bar (N);
 
5645
+  if (dot != DOT)
 
5646
+    abort ();
 
5647
+
 
5648
+  return 0;
 
5649
+}
 
5650
+
 
5651
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
 
5652
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5653
+
 
5654
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
 
5655
===================================================================
 
5656
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../tags/gcc_4_8_3_release)
 
5657
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c   (.../branches/gcc-4_8-branch)
 
5658
@@ -0,0 +1,43 @@
 
5659
+/* PR tree-optimization/63379  */
 
5660
+/* { dg-do run } */
 
5661
+
 
5662
+#include "tree-vect.h"
 
5663
+
 
5664
+extern void abort (void);
 
5665
+
 
5666
+typedef struct {
 
5667
+    int x;
 
5668
+    int y;
 
5669
+} Point;
 
5670
+
 
5671
+Point pt_array[25];
 
5672
+
 
5673
+void __attribute__((noinline,noclone))
 
5674
+generate_array(void)
 
5675
+{
 
5676
+  unsigned int i;
 
5677
+  for (i = 0; i<25; i++)
 
5678
+    {
 
5679
+      pt_array[i].x = i;
 
5680
+      pt_array[i].y = 1000+i;
 
5681
+    }
 
5682
+}
 
5683
+
 
5684
+int main()
 
5685
+{
 
5686
+  check_vect ();
 
5687
+  generate_array ();
 
5688
+  Point min_pt = pt_array[0];
 
5689
+  Point *ptr, *ptr_end;
 
5690
+  for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
 
5691
+    {
 
5692
+      min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
 
5693
+      min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
 
5694
+    }
 
5695
+
 
5696
+  if (min_pt.x != 0 || min_pt.y != 1000)
 
5697
+    abort ();
 
5698
+  return 0;
 
5699
+}
 
5700
+
 
5701
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5702
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
 
5703
===================================================================
 
5704
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../tags/gcc_4_8_3_release)
 
5705
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c   (.../branches/gcc-4_8-branch)
 
5706
@@ -0,0 +1,40 @@
 
5707
+/* { dg-do compile } */
 
5708
+/* { dg-additional-options "-O1" } */
 
5709
+
 
5710
+struct S0
 
5711
+{
 
5712
+  int f7;
 
5713
+};
 
5714
+struct S0 g_50;
 
5715
+int g_70;
 
5716
+int g_76;
 
5717
+
 
5718
+int foo (long long p_56, int * p_57)
 
5719
+{
 
5720
+  int *l_77;
 
5721
+  int l_101;
 
5722
+
 
5723
+  for (; g_70;)
 
5724
+    {
 
5725
+      int **l_78 = &l_77;
 
5726
+      if (g_50.f7)
 
5727
+       continue;
 
5728
+      *l_78 = 0;
 
5729
+    }
 
5730
+  for (g_76 = 1; g_76 >= 0; g_76--)
 
5731
+    {
 
5732
+      int *l_90;
 
5733
+      for (l_101 = 4; l_101 >= 0; l_101--)
 
5734
+       if (l_101)
 
5735
+         *l_90 = 0;
 
5736
+       else
 
5737
+         {
 
5738
+           int **l_113 = &l_77;
 
5739
+           *l_113 = p_57;
 
5740
+         }
 
5741
+    }
 
5742
+
 
5743
+  return *l_77;
 
5744
+}
 
5745
+
 
5746
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5747
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
 
5748
===================================================================
 
5749
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
 
5750
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
 
5751
@@ -0,0 +1,34 @@
 
5752
+/* PR tree-optimization/63189 */
 
5753
+/* { dg-additional-options "-fwrapv" } */
 
5754
+/* { dg-do run } */
 
5755
+
 
5756
+#include "tree-vect.h"
 
5757
+
 
5758
+__attribute__((noinline, noclone)) static int
 
5759
+bar (const short *a, int len)
 
5760
+{
 
5761
+  int x;
 
5762
+  int x1 = 0;
 
5763
+
 
5764
+  for (x = 0; x < len; x++)
 
5765
+    x1 += x * a[x];
 
5766
+  return x1;
 
5767
+}
 
5768
+
 
5769
+__attribute__((noinline, noclone)) void
 
5770
+foo (void)
 
5771
+{
 
5772
+  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
 
5773
+  if (bar (stuff, 9) != 36)
 
5774
+    abort ();
 
5775
+}
 
5776
+
 
5777
+int
 
5778
+main ()
 
5779
+{
 
5780
+  check_vect ();
 
5781
+  foo ();
 
5782
+  return 0;
 
5783
+}
 
5784
+
 
5785
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5786
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
 
5787
===================================================================
 
5788
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../tags/gcc_4_8_3_release)
 
5789
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c   (.../branches/gcc-4_8-branch)
 
5790
@@ -0,0 +1,22 @@
 
5791
+/* { dg-do compile } */
 
5792
+
 
5793
+int a[16][2];
 
5794
+struct A
 
5795
+{
 
5796
+  int b[16][2];
 
5797
+  int c[16][1];
 
5798
+};
 
5799
+
 
5800
+void
 
5801
+foo (struct A *x)
 
5802
+{
 
5803
+  int i;
 
5804
+  for (i = 0; i < 16; ++i)
 
5805
+    {
 
5806
+      x->b[i][0] = a[i][0];
 
5807
+      x->c[i][0] = 0 != a[i][0];
 
5808
+      x->b[i][1] = a[i][1];
 
5809
+    }
 
5810
+}
 
5811
+
 
5812
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5813
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
 
5814
===================================================================
 
5815
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
 
5816
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
 
5817
@@ -0,0 +1,33 @@
 
5818
+/* PR tree-optimization/63189 */
 
5819
+/* { dg-do run } */
 
5820
+
 
5821
+#include "tree-vect.h"
 
5822
+
 
5823
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
 
5824
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
 
5825
+
 
5826
+__attribute__((noinline, noclone)) static int
 
5827
+bar (void)
 
5828
+{
 
5829
+  int sum = 0, i;
 
5830
+  for (i = 0; i < 8; ++i)
 
5831
+    sum += a[i] * b[i];
 
5832
+  return sum;
 
5833
+}
 
5834
+
 
5835
+__attribute__((noinline, noclone)) void
 
5836
+foo (void)
 
5837
+{
 
5838
+  if (bar () != 0)
 
5839
+    abort ();
 
5840
+}
 
5841
+
 
5842
+int
 
5843
+main ()
 
5844
+{
 
5845
+  check_vect ();
 
5846
+  foo ();
 
5847
+  return 0;
 
5848
+}
 
5849
+
 
5850
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5851
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
 
5852
===================================================================
 
5853
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../tags/gcc_4_8_3_release)
 
5854
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c   (.../branches/gcc-4_8-branch)
 
5855
@@ -0,0 +1,22 @@
 
5856
+/* { dg-do run } */
 
5857
+
 
5858
+#include "tree-vect.h"
 
5859
+
 
5860
+extern void abort (void);
 
5861
+
 
5862
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
 
5863
+
 
5864
+int
 
5865
+main ()
 
5866
+{
 
5867
+  int d;
 
5868
+  check_vect ();
 
5869
+  for (; a < 8; a++)
 
5870
+    {
 
5871
+      d = b[a] >> 1;
 
5872
+      c[a] = d != 0;
 
5873
+    }
 
5874
+  if (c[0] != 1)
 
5875
+    abort ();
 
5876
+  return 0;
 
5877
+}
 
5878
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
 
5879
===================================================================
 
5880
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
 
5881
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
 
5882
@@ -0,0 +1,32 @@
 
5883
+/* PR tree-optimization/63341 */
 
5884
+/* { dg-do run } */
 
5885
+
 
5886
+#include "tree-vect.h"
 
5887
+
 
5888
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
 
5889
+struct S { char e __attribute__((aligned (64))); U s[32]; };
 
5890
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
 
5891
+                 {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
 
5892
+                 {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
 
5893
+                 {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
 
5894
+unsigned short d[32] = { 1 };
 
5895
+
 
5896
+__attribute__((noinline, noclone)) void
 
5897
+foo ()
 
5898
+{
 
5899
+  int i;
 
5900
+  for (i = 0; i < 32; i++)
 
5901
+    d[i] = t.s[i].s;
 
5902
+  if (__builtin_memcmp (d, t.s, sizeof d))
 
5903
+    abort ();
 
5904
+}
 
5905
+
 
5906
+int
 
5907
+main ()
 
5908
+{
 
5909
+  check_vect ();
 
5910
+  foo ();
 
5911
+  return 0;
 
5912
+}
 
5913
+
 
5914
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
5915
Index: gcc/testsuite/ChangeLog
 
5916
===================================================================
 
5917
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_8_3_release)
 
5918
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_8-branch)
 
5919
@@ -1,3 +1,482 @@
 
5920
+2014-11-26  Richard Biener  <rguenther@suse.de>
 
5921
+
 
5922
+       Backport from mainline
 
5923
+       2014-08-15  Richard Biener  <rguenther@suse.de>
 
5924
+
 
5925
+       PR tree-optimization/62031
 
5926
+       * gcc.dg/torture/pr62031.c: New testcase.
 
5927
+
 
5928
+       2014-10-10  Richard Biener  <rguenther@suse.de>
 
5929
+
 
5930
+       PR tree-optimization/63379
 
5931
+       * gcc.dg/vect/pr63379.c: New testcase.
 
5932
+
 
5933
+       2014-11-07  Richard Biener  <rguenther@suse.de>
 
5934
+
 
5935
+       PR tree-optimization/63605
 
5936
+       * gcc.dg/vect/pr63605.c: New testcase.
 
5937
+
 
5938
+       2014-10-28  Richard Biener  <rguenther@suse.de>
 
5939
+
 
5940
+       PR middle-end/63665
 
5941
+       * gcc.dg/pr63665.c: New testcase.
 
5942
+
 
5943
+2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
 
5944
+
 
5945
+       PR target/63947
 
5946
+       * gcc.target/i386/pr63947.c: New test.
 
5947
+
 
5948
+2014-11-19  Tom de Vries  <tom@codesourcery.com>
 
5949
+
 
5950
+       Backport from mainline
 
5951
+       PR tree-optimization/62167
 
5952
+       * gcc.dg/pr51879-12.c: Add xfails.
 
5953
+       * gcc.dg/pr62167-run.c: New test.
 
5954
+       * gcc.dg/pr62167.c: New test.
 
5955
+
 
5956
+2014-11-18  Teresa Johnson  <tejohnson@google.com>
 
5957
+
 
5958
+       Backport from mainline and gcc-4_9 branch.
 
5959
+       2014-11-13  Teresa Johnson  <tejohnson@google.com>
 
5960
+
 
5961
+       PR tree-optimization/63841
 
5962
+       * g++.dg/tree-ssa/pr63841.C: New test.
 
5963
+
 
5964
+2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
5965
+
 
5966
+       PR ipa/63838
 
5967
+       * g++.dg/ipa/pr63838.C: New test.
 
5968
+
 
5969
+2014-11-03  Marek Polacek  <polacek@redhat.com>
 
5970
+
 
5971
+       PR c/52769
 
5972
+       * gcc.dg/pr52769.c: New test.
 
5973
+
 
5974
+2014-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
5975
+
 
5976
+       * gcc.target/aarch64/madd_after_asm_1.c: New test.
 
5977
+
 
5978
+2014-10-15  Eric Botcazou  <ebotcazou@adacore.com>
 
5979
+
 
5980
+       * gnat.dg/opt41.adb: New test.
 
5981
+       * gnat.dg/opt41_pkg.ad[sb]: New helper.
 
5982
+
 
5983
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5984
+
 
5985
+       Backport from mainline r215880
 
5986
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
5987
+
 
5988
+       * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
 
5989
+       failing with the new warning message.
 
5990
+       * gcc.dg/vmx/3c-01a.c: Likewise.
 
5991
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
5992
+       * gcc.dg/vmx/ops.c: Likewise.
 
5993
+       * gcc.target/powerpc/altivec-20.c: Likewise.
 
5994
+       * gcc.target/powerpc/altivec-6.c: Likewise.
 
5995
+       * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
 
5996
+       * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
 
5997
+       * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
 
5998
+
 
5999
+       Backport from mainline r215882
 
6000
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6001
+
 
6002
+       * gcc.target/powerpc/lvsl-lvsr.c: New test.
 
6003
+
 
6004
+       Backport from mainline r216017
 
6005
+       2014-10-08  Pat Haugen  <pthaugen@us.ibm.com>
 
6006
+
 
6007
+       * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
 
6008
+       * gcc.dg/vmx/ops.c: Likewise.
 
6009
+       * gcc.dg/vmx/ops-long-1.c: Likewise.
 
6010
+
 
6011
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
6012
+
 
6013
+       PR fortran/59488
 
6014
+       * gfortran.dg/gomp/pr59488-1.f90: New test.
 
6015
+       * gfortran.dg/gomp/pr59488-2.f90: New test.
 
6016
+
 
6017
+2014-10-01  Jakub Jelinek  <jakub@redhat.com>
 
6018
+
 
6019
+       PR debug/63342
 
6020
+       * gcc.dg/pr63342.c: New test.
 
6021
+
 
6022
+       PR target/63428
 
6023
+       * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
 
6024
+       to test 24 in TESTS.
 
6025
+
 
6026
+2014-10-01  Uros Bizjak  <ubizjak@gmail.com>
 
6027
+
 
6028
+       Backport from mainline
 
6029
+       2013-11-07  Joseph Myers  <joseph@codesourcery.com>
 
6030
+
 
6031
+       * lib/target-supports.exp
 
6032
+       (check_effective_target_fenv_exceptions): New function.
 
6033
+
 
6034
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
 
6035
+
 
6036
+       PR inline-asm/63282
 
6037
+       * gcc.c-torture/compile/pr63282.c: New test.
 
6038
+
 
6039
+2014-09-26  Jakub Jelinek  <jakub@redhat.com>
 
6040
+
 
6041
+       * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
 
6042
+       to default options.
 
6043
+
 
6044
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6045
+
 
6046
+       Backport from mainline r215559
 
6047
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6048
+
 
6049
+       PR target/63335
 
6050
+       * gcc.target/powerpc/pr63335.c: New test.
 
6051
+
 
6052
+2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
6053
+
 
6054
+       PR tree-optimization/63341
 
6055
+       * gcc.dg/vect/pr63341-1.c: New test.
 
6056
+       * gcc.dg/vect/pr63341-2.c: New test.
 
6057
+
 
6058
+2014-09-18  Joseph Myers  <joseph@codesourcery.com>
 
6059
+
 
6060
+       * gcc.dg/torture/float128-exact-underflow.c: New test.
 
6061
+
 
6062
+2014-09-17  Jakub Jelinek  <jakub@redhat.com>
 
6063
+
 
6064
+       PR debug/63284
 
6065
+       * gcc.dg/pr63284.c: New test.
 
6066
+
 
6067
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
6068
+
 
6069
+       Backport from mainline
 
6070
+       2014-06-11  Richard Biener  <rguenther@suse.de>
 
6071
+
 
6072
+       PR tree-optimization/61452
 
6073
+       * gcc.dg/torture/pr61452.c: New testcase.
 
6074
+
 
6075
+2014-09-09  Richard Biener  <rguenther@suse.de>
 
6076
+
 
6077
+       Backport from mainline
 
6078
+       2014-05-05  Richard Biener  <rguenther@suse.de>
 
6079
+
 
6080
+       PR middle-end/61010
 
6081
+       * gcc.dg/torture/pr61010.c: New testcase.
 
6082
+
 
6083
+       2014-05-28  Richard Biener  <rguenther@suse.de>
 
6084
+
 
6085
+       PR middle-end/61045
 
6086
+       * gcc.dg/pr61045.c: New testcase.
 
6087
+
 
6088
+       2014-08-11  Richard Biener  <rguenther@suse.de>
 
6089
+
 
6090
+       PR tree-optimization/62075
 
6091
+       * gcc.dg/vect/pr62075.c: New testcase.
 
6092
+
 
6093
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
6094
+
 
6095
+       PR tree-optimization/60196
 
6096
+       PR tree-optimization/63189
 
6097
+       * gcc.dg/vect/pr63189.c: New test.
 
6098
+       * gcc.dg/vect/pr60196-1.c: New test.
 
6099
+       * gcc.dg/vect/pr60196-2.c: New test.
 
6100
+
 
6101
+       Backported from mainline
 
6102
+       2013-09-17  Cong Hou  <congh@google.com>
 
6103
+
 
6104
+       * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product 
 
6105
+       on two arrays with short and int types. This should not be recognized
 
6106
+       as a dot product pattern.
 
6107
+
 
6108
+2014-09-08  Jakub Jelinek  <jakub@redhat.com>
 
6109
+
 
6110
+       Backported from mainline
 
6111
+       2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>
 
6112
+
 
6113
+       PR debug/61923
 
6114
+       * gcc.target/i386/pr61923.c: New test.
 
6115
+
 
6116
+2014-09-06  John David Anglin  <danglin@gcc.gnu.org>
 
6117
+
 
6118
+       PR testsuite/56194
 
6119
+       * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
 
6120
+
 
6121
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
6122
+
 
6123
+       Backport from mainline
 
6124
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
 
6125
+
 
6126
+       PR fortran/62270
 
6127
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
 
6128
+
 
6129
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
6130
+
 
6131
+       PR ipa/62015
 
6132
+       * g++.dg/ipa/pr62015.C: New test.
 
6133
+
 
6134
+2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
6135
+
 
6136
+       PR ipa/61986
 
6137
+       * gcc.dg/ipa/pr61986.c: New test.
 
6138
+
 
6139
+2014-08-26  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
6140
+
 
6141
+       * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
 
6142
+       failure on s390*-*-linux-gnu.
 
6143
+
 
6144
+2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
6145
+
 
6146
+       Backport from mainline
 
6147
+       2014-08-24  Oleg Endo  <olegendo@gcc.gnu.org>
 
6148
+
 
6149
+       PR target/61996
 
6150
+       * gcc.target/sh/pr61996.c: New.
 
6151
+
 
6152
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
6153
+
 
6154
+       Backport from trunk
 
6155
+       PR fortran/62214
 
6156
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
6157
+
 
6158
+2014-08-15  Tom de Vries  <tom@codesourcery.com>
 
6159
+
 
6160
+       Backport from mainline:
 
6161
+       2014-08-14  Tom de Vries  <tom@codesourcery.com>
 
6162
+
 
6163
+       PR rtl-optimization/62004
 
6164
+       PR rtl-optimization/62030
 
6165
+       * gcc.dg/pr62004.c: New test.
 
6166
+       * gcc.dg/pr62030.c: Same.
 
6167
+       * gcc.target/mips/pr62030-octeon.c: Same.
 
6168
+
 
6169
+2014-08-13  Felix Yang  <fei.yang0953@gmail.com>
 
6170
+
 
6171
+       PR tree-optimization/62073
 
6172
+       * gcc.dg/vect/pr62073.c: New test.
 
6173
+
 
6174
+2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6175
+
 
6176
+       Backport from mainline
 
6177
+       2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6178
+
 
6179
+       PR middle-end/62103
 
6180
+       * gcc.c-torture/execute/bitfld-6.c: New test.
 
6181
+
 
6182
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
6183
+
 
6184
+       Backport from trunk
 
6185
+       PR fortran/61999
 
6186
+       * gfortran.dg/dot_product_3.f90:  New test case.
 
6187
+
 
6188
+2014-08-07  John David Anglin  <danglin@gcc.gnu.org>
 
6189
+
 
6190
+       PR tree-optimization/60707
 
6191
+       * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
 
6192
+
 
6193
+2014-08-06  Jakub Jelinek  <jakub@redhat.com>
 
6194
+
 
6195
+       PR rtl-optimization/61801
 
6196
+       * gcc.target/i386/pr61801.c: Rewritten.
 
6197
+
 
6198
+2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6199
+
 
6200
+       Backport from mainline
 
6201
+       2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6202
+
 
6203
+       PR tree-optimization/61375
 
6204
+       * gcc.c-torture/execute/pr61375-1.c: New test.
 
6205
+
 
6206
+2014-08-01  Richard Biener  <rguenther@suse.de>
 
6207
+
 
6208
+       PR tree-optimization/61964
 
6209
+       * gcc.dg/torture/pr61964.c: New testcase.
 
6210
+       * gcc.dg/pr51879-18.c: XFAIL.
 
6211
+
 
6212
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
6213
+
 
6214
+       PR rtl-optimization/61801
 
6215
+       * gcc.target/i386/pr61801.c: Fix testcase.
 
6216
+
 
6217
+2014-07-28  Richard Biener  <rguenther@suse.de>
 
6218
+
 
6219
+       PR rtl-optimization/61801
 
6220
+       * gcc.target/i386/pr61801.c: New testcase.
 
6221
+
 
6222
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6223
+
 
6224
+       Backport from mainline:
 
6225
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6226
+
 
6227
+       * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
 
6228
+
 
6229
+       * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
 
6230
+       * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
 
6231
+       * gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
 
6232
+       * gcc.c-torture/execute/pr23135.x: Likewise.
 
6233
+
 
6234
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6235
+
 
6236
+       Backport from mainline:
 
6237
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6238
+
 
6239
+       * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
 
6240
+
 
6241
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6242
+
 
6243
+       Backport from mainline:
 
6244
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6245
+
 
6246
+       * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
 
6247
+
 
6248
+2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6249
+
 
6250
+       Backport from mainline:
 
6251
+       2014-07-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
6252
+
 
6253
+       * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
 
6254
+
 
6255
+2014-07-19  Eric Botcazou  <ebotcazou@adacore.com>
 
6256
+
 
6257
+       * gcc.dg/stack-usage-2.c: Adjust.
 
6258
+
 
6259
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
6260
+
 
6261
+       Backport from trunk.
 
6262
+       PR fortran/61780
 
6263
+       * gfortran.dg/dependency_44.f90 : New test
 
6264
+
 
6265
+2014-07-10  Eric Botcazou  <ebotcazou@adacore.com>
 
6266
+
 
6267
+       * gnat.dg/opt39.adb: New test.
 
6268
+
 
6269
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
6270
+
 
6271
+       PR fortran/61459
 
6272
+       PR fortran/58883
 
6273
+       * gfortran.dg/allocatable_function_8.f90 : New test
 
6274
+
 
6275
+2014-07-04  Jakub Jelinek  <jakub@redhat.com>
 
6276
+
 
6277
+       PR tree-optimization/61684
 
6278
+       * gcc.c-torture/compile/pr61684.c: New test.
 
6279
+
 
6280
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
6281
+           Fritz Reese  <Reese-Fritz@zai.com>
 
6282
+
 
6283
+       * gfortran.dg/oldstyle_5.f: New test.
 
6284
+
 
6285
+2014-06-30  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6286
+
 
6287
+       Backport from mainline
 
6288
+       2014-06-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
6289
+
 
6290
+       PR tree-optimization/61306
 
6291
+       * gcc.c-torture/execute/pr61306-1.c: New test.
 
6292
+       * gcc.c-torture/execute/pr61306-2.c: Likewise.
 
6293
+       * gcc.c-torture/execute/pr61306-3.c: Likewise.
 
6294
+
 
6295
+2014-06-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6296
+
 
6297
+       * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
 
6298
+
 
6299
+2014-06-27  Uros Bizjak  <ubizjak@gmail.com>
 
6300
+
 
6301
+       Backport from mainline
 
6302
+       2014-06-26  Uros Bizjak  <ubizjak@gmail.com>
 
6303
+
 
6304
+       PR target/61586
 
6305
+       * gcc.target/alpha/pr61586.c: New test.
 
6306
+
 
6307
+2014-06-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
6308
+
 
6309
+       * gfortran.dg/default_format_denormal_2.f90:  Remove xfail for
 
6310
+       powerpc*-*-linux*.
 
6311
+
 
6312
+2014-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
6313
+
 
6314
+       Backport from mainline
 
6315
+       2014-06-13  Ilya Enkovich  <ilya.enkovich@intel.com>
 
6316
+
 
6317
+       PR rtl-optimization/61094
 
6318
+       PR rtl-optimization/61446
 
6319
+       * gcc.target/i386/pr61446.c : New.
 
6320
+
 
6321
+       Backport from mainline
 
6322
+       2014-06-06  Uros Bizjak  <ubizjak@gmail.com>
 
6323
+
 
6324
+       PR target/61423
 
6325
+       * gcc.target/i386/pr61423.c: New test.
 
6326
+
 
6327
+2014-06-17  Yufeng Zhang  <yufeng.zhang@arm.com>
 
6328
+
 
6329
+       Backport from mainline
 
6330
+
 
6331
+       PR target/61483
 
6332
+       * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
 
6333
+       * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
 
6334
+       * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
 
6335
+       * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
 
6336
+
 
6337
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
6338
+
 
6339
+       Backport from trunk.
 
6340
+       PR fortran/45187
 
6341
+       * gfortran.dg/cray_pointers_10.f90: New file.
 
6342
+
 
6343
+2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
6344
+
 
6345
+       Backport from mainline
 
6346
+
 
6347
+       2014-06-13  Peter Bergner  <bergner@vnet.ibm.com>
 
6348
+       PR target/61415
 
6349
+       * lib/target-supports.exp (check_effective_target_longdouble128): New.
 
6350
+       * gcc.target/powerpc/pack02.c: Use it.
 
6351
+       * gcc.target/powerpc/tfmode_off.c: Likewise.
 
6352
+
 
6353
+2014-06-12  Georg-Johann Lay  <avr@gjlay.de>
 
6354
+
 
6355
+       Backport from 2014-06-12 trunk r211491
 
6356
+
 
6357
+       PR target/61443
 
6358
+       * gcc.target/avr/torture/pr61443.c: New test.
 
6359
+
 
6360
+2014-06-04  Richard Biener  <rguenther@suse.de>
 
6361
+
 
6362
+       PR tree-optimization/61383
 
6363
+       * gcc.dg/torture/pr61383-1.c: New testcase.
 
6364
+
 
6365
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
6366
+
 
6367
+       Backport from mainline
 
6368
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
6369
+
 
6370
+       PR rtl-optimization/60866
 
6371
+       * gcc.dg/pr60866.c: New test.
 
6372
+
 
6373
+2014-06-03  Andrey Belevantsev  <abel@ispras.ru>
 
6374
+
 
6375
+       Backport from mainline
 
6376
+       2014-05-14  Andrey Belevantsev  <abel@ispras.ru>
 
6377
+
 
6378
+       PR rtl-optimization/60901
 
6379
+       * gcc.target/i386/pr60901.c: New test.
 
6380
+
 
6381
+2014-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
6382
+
 
6383
+       Backport from mainline
 
6384
+       2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
6385
+
 
6386
+       * gnat.dg/overflow_fixed.adb: New test.
 
6387
+
 
6388
+2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
 
6389
+
 
6390
+       * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
 
6391
+
 
6392
+2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
6393
+
 
6394
+       Backport from mainline
 
6395
+       2014-05-22  Peter Bergner  <bergner@vnet.ibm.com>
 
6396
+
 
6397
+       * gcc.target/powerpc/htm-ttest.c: New test.
 
6398
+
 
6399
 2014-05-22  Release Manager
 
6400
 
 
6401
        * GCC 4.8.3 released.
 
6402
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
 
6403
===================================================================
 
6404
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../tags/gcc_4_8_3_release)
 
6405
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C  (.../branches/gcc-4_8-branch)
 
6406
@@ -0,0 +1,28 @@
 
6407
+// I think this dynamic_cast has undefined behavior when destroying E::o
 
6408
+// because we're the F period of destruction has started and ap doesn't
 
6409
+// point to the object currently being destroyed--but the reasonable
 
6410
+// options are success or failure, not SEGV.
 
6411
+
 
6412
+// { dg-do run }
 
6413
+
 
6414
+extern "C" void abort();
 
6415
+
 
6416
+struct A { virtual ~A(); };
 
6417
+struct B { virtual ~B() { } };
 
6418
+struct C : B, A { };
 
6419
+struct E : virtual B { A o; };
 
6420
+struct F : virtual C, virtual E { };
 
6421
+
 
6422
+A* ap;
 
6423
+C* cp;
 
6424
+
 
6425
+A::~A() {
 
6426
+  C* cp2 = dynamic_cast<C*>(ap);
 
6427
+  if (cp2 != cp && cp2 != 0)
 
6428
+    abort();
 
6429
+}
 
6430
+
 
6431
+int main() {
 
6432
+  F f;
 
6433
+  ap = cp = &f;
 
6434
+}
 
6435
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
 
6436
===================================================================
 
6437
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../tags/gcc_4_8_3_release)
 
6438
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C  (.../branches/gcc-4_8-branch)
 
6439
@@ -1,6 +1,6 @@
 
6440
 /* { dg-do compile { target powerpc*-*-* } } */
 
6441
 /* { dg-require-effective-target powerpc_altivec_ok } */
 
6442
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
 
6443
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
 
6444
 
 
6445
 /* This test checks if AltiVec builtins accept const-qualified
 
6446
    arguments.  */
 
6447
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
 
6448
===================================================================
 
6449
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
 
6450
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
 
6451
@@ -0,0 +1,10 @@
 
6452
+// PR c++/63455
 
6453
+// { dg-options "-std=gnu++11" }
 
6454
+
 
6455
+int main()
 
6456
+{
 
6457
+    int x = 0;
 
6458
+
 
6459
+    // without '+0', gcc 4.6 gives a different error (no ICE though)
 
6460
+    decltype(({ int y = x; y; })+0) v1 = 0;
 
6461
+}
 
6462
Index: gcc/testsuite/g++.dg/expr/cond12.C
 
6463
===================================================================
 
6464
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../tags/gcc_4_8_3_release)
 
6465
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C    (.../branches/gcc-4_8-branch)
 
6466
@@ -0,0 +1,12 @@
 
6467
+// PR c++/58714
 
6468
+// { dg-do run }
 
6469
+
 
6470
+struct X {
 
6471
+    X& operator=(const X&){}
 
6472
+    X& operator=(X&){__builtin_abort();}
 
6473
+};
 
6474
+
 
6475
+int main(int argv,char**) {
 
6476
+  X a, b;
 
6477
+  ((argv > 2) ? a : b) = X();
 
6478
+}
 
6479
Index: gcc/testsuite/g++.dg/init/const9.C
 
6480
===================================================================
 
6481
--- a/src/gcc/testsuite/g++.dg/init/const9.C    (.../tags/gcc_4_8_3_release)
 
6482
+++ b/src/gcc/testsuite/g++.dg/init/const9.C    (.../branches/gcc-4_8-branch)
 
6483
@@ -1,5 +1,5 @@
 
6484
 // PR c++/55893
 
6485
-// { dg-final { scan-assembler-not "rodata" } }
 
6486
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
 
6487
 
 
6488
 struct foo
 
6489
 {
 
6490
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
 
6491
===================================================================
 
6492
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../tags/gcc_4_8_3_release)
 
6493
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C       (.../branches/gcc-4_8-branch)
 
6494
@@ -0,0 +1,35 @@
 
6495
+/* { dg-do run } */
 
6496
+/* { dg-options "-O2" } */
 
6497
+
 
6498
+#include <string>
 
6499
+
 
6500
+std::string __attribute__ ((noinline)) comp_test_write() {
 
6501
+  std::string data;
 
6502
+
 
6503
+  for (int i = 0; i < 2; ++i) {
 
6504
+    char b = 1 >> (i * 8);
 
6505
+    data.append(&b, 1);
 
6506
+  }
 
6507
+
 
6508
+  return data;
 
6509
+}
 
6510
+
 
6511
+std::string __attribute__ ((noinline)) comp_test_write_good() {
 
6512
+  std::string data;
 
6513
+
 
6514
+  char b;
 
6515
+  for (int i = 0; i < 2; ++i) {
 
6516
+    b = 1 >> (i * 8);
 
6517
+    data.append(&b, 1);
 
6518
+  }
 
6519
+
 
6520
+  return data;
 
6521
+}
 
6522
+
 
6523
+int main() {
 
6524
+  std::string good = comp_test_write_good();
 
6525
+  std::string bad = comp_test_write();
 
6526
+
 
6527
+  if (good != bad)
 
6528
+    __builtin_abort ();
 
6529
+}
 
6530
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
 
6531
===================================================================
 
6532
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../tags/gcc_4_8_3_release)
 
6533
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C     (.../branches/gcc-4_8-branch)
 
6534
@@ -0,0 +1,23 @@
 
6535
+// PR c++/58624
 
6536
+
 
6537
+// { dg-do run { target c++11 } }
 
6538
+// { dg-add-options tls }
 
6539
+// { dg-require-effective-target tls_runtime }
 
6540
+
 
6541
+int i;
 
6542
+
 
6543
+template <typename> struct A
 
6544
+{
 
6545
+  static thread_local int s;
 
6546
+
 
6547
+  A () { i = s; }
 
6548
+};
 
6549
+
 
6550
+int f() { return 42; }
 
6551
+template <typename T> thread_local int A<T>::s = f();
 
6552
+
 
6553
+int main () {
 
6554
+  A<void> a;
 
6555
+  if (i != 42)
 
6556
+    __builtin_abort();
 
6557
+}
 
6558
Index: gcc/testsuite/g++.dg/parse/typename7.C
 
6559
===================================================================
 
6560
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../tags/gcc_4_8_3_release)
 
6561
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C        (.../branches/gcc-4_8-branch)
 
6562
@@ -7,10 +7,9 @@
 
6563
 
 
6564
 struct A
 
6565
 {
 
6566
-  template<typename>   void foo(int); // { dg-message "note" }
 
6567
-  template<typename T> void bar(T t) { // { dg-message "note" }
 
6568
+  template<typename>   void foo(int);
 
6569
+  template<typename T> void bar(T t) {
 
6570
     this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6571
-  // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
 
6572
   template<typename T> void bad(T t) {
 
6573
     foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6574
 };
 
6575
@@ -20,7 +19,6 @@
 
6576
 {
 
6577
   void bar(T t) {
 
6578
     A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
 
6579
-  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
 
6580
   void bad(T t) {
 
6581
     B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
 
6582
 };
 
6583
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
 
6584
===================================================================
 
6585
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../tags/gcc_4_8_3_release)
 
6586
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C  (.../branches/gcc-4_8-branch)
 
6587
@@ -1,2 +1,2 @@
 
6588
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
 
6589
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
 
6590
 // { dg-prune-output "array bound" }
 
6591
Index: gcc/testsuite/g++.dg/parse/ambig7.C
 
6592
===================================================================
 
6593
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../tags/gcc_4_8_3_release)
 
6594
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C   (.../branches/gcc-4_8-branch)
 
6595
@@ -0,0 +1,16 @@
 
6596
+// PR c++/60361
 
6597
+
 
6598
+struct Helper
 
6599
+{
 
6600
+  Helper(int a, void (*pfunc)());
 
6601
+};
 
6602
+
 
6603
+template <int I> void function();
 
6604
+
 
6605
+const int A = 1;
 
6606
+const int B = 2;
 
6607
+
 
6608
+Helper testOk(A, function<A>);
 
6609
+Helper testOk2(int(A), function<B>);
 
6610
+Helper testOk3((int(A)), function<A>);
 
6611
+Helper testFail(int(A), function<A>);
 
6612
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
 
6613
===================================================================
 
6614
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../tags/gcc_4_8_3_release)
 
6615
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp       (.../branches/gcc-4_8-branch)
 
6616
@@ -89,6 +89,9 @@
 
6617
 # This must be done after the compat-use-*-compiler definitions.
 
6618
 load_lib compat.exp
 
6619
 
 
6620
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
 
6621
+load_lib g++-dg.exp
 
6622
+
 
6623
 g++_init
 
6624
 
 
6625
 # Save variables for the C++ compiler under test, which each test will
 
6626
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
 
6627
===================================================================
 
6628
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../tags/gcc_4_8_3_release)
 
6629
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c        (.../branches/gcc-4_8-branch)
 
6630
@@ -1,5 +1,5 @@
 
6631
 /* Structure layout test generator.
 
6632
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
 
6633
+   Copyright (C) 2004-2014
 
6634
    Free Software Foundation, Inc.
 
6635
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
6636
 
 
6637
@@ -44,7 +44,7 @@
 
6638
 #endif
 
6639
 
 
6640
 const char *dg_options[] = {
 
6641
-"/* { dg-options \"%s-I%s\" } */\n",
 
6642
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 
6643
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 
6644
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 
6645
 "/* { 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",
 
6646
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
 
6647
===================================================================
 
6648
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
 
6649
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
 
6650
@@ -0,0 +1,28 @@
 
6651
+// PR c++/61959
 
6652
+// { dg-do compile { target c++11 } }
 
6653
+
 
6654
+template <class Coord> struct BasePoint
 
6655
+{
 
6656
+  Coord x, y;
 
6657
+  constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
 
6658
+};
 
6659
+template <class T> struct BaseCoord
 
6660
+{
 
6661
+  int value;
 
6662
+  constexpr BaseCoord (T) : value (1) {}
 
6663
+};
 
6664
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
 
6665
+{
 
6666
+  typedef BaseCoord Super;
 
6667
+  constexpr IntCoordTyped (int) : Super (0) {}
 
6668
+};
 
6669
+template <class units>
 
6670
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
 
6671
+{
 
6672
+  typedef BasePoint<IntCoordTyped<units> > Super;
 
6673
+  constexpr IntPointTyped (int, int) : Super (0, 0) {}
 
6674
+};
 
6675
+struct A
 
6676
+{
 
6677
+};
 
6678
+IntPointTyped<A> a (0, 0);
 
6679
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
 
6680
===================================================================
 
6681
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../tags/gcc_4_8_3_release)
 
6682
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C     (.../branches/gcc-4_8-branch)
 
6683
@@ -0,0 +1,9 @@
 
6684
+// PR c++/56710
 
6685
+// { dg-options "-std=c++11 -Wall" }
 
6686
+
 
6687
+int main()
 
6688
+{
 
6689
+    int t = 0;
 
6690
+    return [&]() -> int {int __t; __t = t; return __t; }();
 
6691
+    return [&t]() -> int {int __t; __t = t; return __t; }();
 
6692
+}
 
6693
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
 
6694
===================================================================
 
6695
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../tags/gcc_4_8_3_release)
 
6696
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C      (.../branches/gcc-4_8-branch)
 
6697
@@ -0,0 +1,24 @@
 
6698
+// PR c++/61134
 
6699
+// { dg-do compile { target c++11 } }
 
6700
+
 
6701
+struct Base { };
 
6702
+
 
6703
+template <typename>
 
6704
+struct Fixed {
 
6705
+  typedef const char* name;
 
6706
+};
 
6707
+
 
6708
+template <typename VT, typename... Fields>
 
6709
+void New(const char* name,
 
6710
+         typename Fixed<Fields>::name... field_names);
 
6711
+
 
6712
+template <typename VT, typename... Fields>
 
6713
+void CreateMetric(const char* name,
 
6714
+                  typename Fixed<Fields>::name... field_names,
 
6715
+                  const Base&) { }
 
6716
+
 
6717
+
 
6718
+void Fn()
 
6719
+{
 
6720
+  CreateMetric<int, const char*>("abcd", "def", Base());
 
6721
+}
 
6722
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
 
6723
===================================================================
 
6724
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../tags/gcc_4_8_3_release)
 
6725
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C      (.../branches/gcc-4_8-branch)
 
6726
@@ -0,0 +1,7 @@
 
6727
+// PR c++/63415
 
6728
+// { dg-do compile { target c++11 } }
 
6729
+
 
6730
+template <typename T>
 
6731
+struct A {
 
6732
+  static constexpr int value = int(T{});
 
6733
+};
 
6734
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
 
6735
===================================================================
 
6736
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../tags/gcc_4_8_3_release)
 
6737
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C      (.../branches/gcc-4_8-branch)
 
6738
@@ -0,0 +1,49 @@
 
6739
+// PR c++/61539
 
6740
+// { dg-do compile { target c++11 } }
 
6741
+
 
6742
+template <typename _CharT> class A;
 
6743
+template <typename> class B;
 
6744
+template <class charT> class C;
 
6745
+template <> class C<char>
 
6746
+{
 
6747
+  virtual void xparse (int &, const B<A<char> > &) const;
 
6748
+};
 
6749
+template <class T, class charT = char> class G : C<charT>
 
6750
+{
 
6751
+public:
 
6752
+  G (void *) {}
 
6753
+  void default_value (const T &);
 
6754
+  void xparse (int &, const B<A<charT> > &) const;
 
6755
+};
 
6756
+template <class T, class charT>
 
6757
+void validate (int &, const B<A<charT> > &, T *, int);
 
6758
+template <class T, class charT>
 
6759
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
 
6760
+{
 
6761
+  validate (p1, p2, (T *)0, 0);
 
6762
+}
 
6763
+template <class T> G<T> *value (T *) { return new G<T>(0); }
 
6764
+namespace Eigen
 
6765
+{
 
6766
+template <typename T> struct D;
 
6767
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
 
6768
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
 
6769
+          int _MaxCols>
 
6770
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
 
6771
+{
 
6772
+  typedef _Scalar Scalar;
 
6773
+};
 
6774
+template <typename, int, int, int, int, int _MaxCols> class F
 
6775
+{
 
6776
+public:
 
6777
+  typedef typename Eigen::D<F>::Scalar Scalar;
 
6778
+  F (const Scalar &, const Scalar &, const Scalar &);
 
6779
+};
 
6780
+template <class... T>
 
6781
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
 
6782
+}
 
6783
+int main (int, char *[])
 
6784
+{
 
6785
+  Eigen::F<double, 3, 1> a (0, 0, 0);
 
6786
+  value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
 
6787
+}
 
6788
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
 
6789
===================================================================
 
6790
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
 
6791
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
 
6792
@@ -0,0 +1,13 @@
 
6793
+// PR c++/58714
 
6794
+// { dg-do compile { target c++11 } }
 
6795
+
 
6796
+struct X {
 
6797
+  X& operator=(const X&) = delete;
 
6798
+  X& operator=(X&& ) = default;
 
6799
+};
 
6800
+
 
6801
+void f(bool t) {
 
6802
+  X a, b;
 
6803
+  *(t ? &a : &b) = X();
 
6804
+  (t ? a : b) = X();
 
6805
+}
 
6806
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
 
6807
===================================================================
 
6808
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../tags/gcc_4_8_3_release)
 
6809
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C        (.../branches/gcc-4_8-branch)
 
6810
@@ -0,0 +1,17 @@
 
6811
+// PR c++/59823
 
6812
+// { dg-options "-std=c++11" }
 
6813
+
 
6814
+struct X { };
 
6815
+
 
6816
+void f(X&&);                   // { dg-message "void f" }
 
6817
+
 
6818
+struct wrap
 
6819
+{
 
6820
+  operator const X&() const;
 
6821
+};
 
6822
+
 
6823
+int main()
 
6824
+{
 
6825
+  wrap w;
 
6826
+  f(w);                                // { dg-error "lvalue" }
 
6827
+}
 
6828
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
 
6829
===================================================================
 
6830
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../tags/gcc_4_8_3_release)
 
6831
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C    (.../branches/gcc-4_8-branch)
 
6832
@@ -0,0 +1,56 @@
 
6833
+// PR ipa/63838
 
6834
+// { dg-do run }
 
6835
+// { dg-options "-O2 -fdump-ipa-pure-const" }
 
6836
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
 
6837
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
 
6838
+// { dg-final { cleanup-ipa-dump "pure-const" } }
 
6839
+
 
6840
+__attribute__((noinline, noclone)) static void bar (int);
 
6841
+volatile int v;
 
6842
+void (*fn) ();
 
6843
+struct S { S () { v++; } ~S () { v++; } };
 
6844
+
 
6845
+__attribute__((noinline, noclone)) static void
 
6846
+foo (int x)
 
6847
+{
 
6848
+  v++;
 
6849
+  if (x == 5)
 
6850
+    bar (x);
 
6851
+}
 
6852
+
 
6853
+__attribute__((noinline, noclone)) static void
 
6854
+bar (int x)
 
6855
+{
 
6856
+  v++;
 
6857
+  if (x == 6)
 
6858
+    foo (x);
 
6859
+  else if (x == 5)
 
6860
+    fn ();
 
6861
+}
 
6862
+
 
6863
+__attribute__((noinline, noclone)) int
 
6864
+baz (int x)
 
6865
+{
 
6866
+  S s;
 
6867
+  foo (x);
 
6868
+}
 
6869
+
 
6870
+void
 
6871
+throw0 ()
 
6872
+{
 
6873
+  throw 0;
 
6874
+}
 
6875
+
 
6876
+int
 
6877
+main ()
 
6878
+{
 
6879
+  fn = throw0;
 
6880
+  asm volatile ("" : : : "memory");
 
6881
+  try
 
6882
+    {
 
6883
+      baz (5);
 
6884
+    }
 
6885
+  catch (int)
 
6886
+    {
 
6887
+    }
 
6888
+}
 
6889
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
 
6890
===================================================================
 
6891
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../tags/gcc_4_8_3_release)
 
6892
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C    (.../branches/gcc-4_8-branch)
 
6893
@@ -0,0 +1,55 @@
 
6894
+/* { dg-do run } */
 
6895
+/* { dg-options "-O3 -std=c++11"  } */
 
6896
+
 
6897
+
 
6898
+extern "C" int printf(const char *fmt, ...);
 
6899
+extern "C" void abort(void);
 
6900
+
 
6901
+struct Side {
 
6902
+    enum _Value { Left, Right, Invalid };
 
6903
+
 
6904
+    constexpr Side() : _value(Invalid) {}
 
6905
+    constexpr Side(_Value value) : _value(value) {}
 
6906
+    operator _Value() const { return (_Value)_value; }
 
6907
+
 
6908
+  private:
 
6909
+    char _value;
 
6910
+};
 
6911
+
 
6912
+struct A {
 
6913
+    void init();
 
6914
+    void adjust(Side side, bool final);
 
6915
+    void move(Side side);
 
6916
+};
 
6917
+
 
6918
+void A::init()
 
6919
+{
 
6920
+    adjust(Side::Invalid, false);
 
6921
+}
 
6922
+
 
6923
+static void __attribute__((noinline))
 
6924
+check (int v, int final)
 
6925
+{
 
6926
+    if (v != 0)
 
6927
+      abort();
 
6928
+}
 
6929
+
 
6930
+
 
6931
+__attribute__((noinline))
 
6932
+void A::adjust(Side side, bool final)
 
6933
+{
 
6934
+  check ((int)side, final);
 
6935
+}
 
6936
+
 
6937
+void A::move(Side side)
 
6938
+{
 
6939
+    adjust(side, false);
 
6940
+    adjust(side, true);
 
6941
+}
 
6942
+
 
6943
+int main()
 
6944
+{
 
6945
+    A t;
 
6946
+    t.move(Side::Left);
 
6947
+    return 0;
 
6948
+}
 
6949
Index: gcc/testsuite/g++.dg/template/local-fn1.C
 
6950
===================================================================
 
6951
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../tags/gcc_4_8_3_release)
 
6952
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C     (.../branches/gcc-4_8-branch)
 
6953
@@ -0,0 +1,8 @@
 
6954
+// PR c++/60605
 
6955
+
 
6956
+template <typename T = int>
 
6957
+struct Foo {
 
6958
+    void bar() {
 
6959
+        void bug();
 
6960
+    }
 
6961
+};
 
6962
Index: gcc/testsuite/g++.dg/template/conv14.C
 
6963
===================================================================
 
6964
--- a/src/gcc/testsuite/g++.dg/template/conv14.C        (.../tags/gcc_4_8_3_release)
 
6965
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C        (.../branches/gcc-4_8-branch)
 
6966
@@ -0,0 +1,30 @@
 
6967
+// PR c++/61647
 
6968
+
 
6969
+class XX;
 
6970
+
 
6971
+template<typename Container, typename Key>
 
6972
+struct Accessor;
 
6973
+
 
6974
+template<typename Container, typename Key, typename KeyStore = Key>
 
6975
+class Variant {
 
6976
+protected:
 
6977
+    KeyStore index;
 
6978
+    Container state;
 
6979
+public:
 
6980
+    Variant(Container st, const Key& i) : index(i), state(st) {}
 
6981
+
 
6982
+    template<typename T>
 
6983
+    operator T() const {
 
6984
+        return Accessor<Container, KeyStore>::template get<T>(state, index);
 
6985
+    }
 
6986
+};
 
6987
+
 
6988
+class AutoCleanVariant : public Variant<XX*, int> {
 
6989
+public:
 
6990
+    AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
 
6991
+
 
6992
+    template<typename T>
 
6993
+    operator T() const {
 
6994
+         return Variant<XX*, int>::operator T();
 
6995
+    }
 
6996
+};
 
6997
Index: gcc/testsuite/g++.dg/template/friend55.C
 
6998
===================================================================
 
6999
--- a/src/gcc/testsuite/g++.dg/template/friend55.C      (.../tags/gcc_4_8_3_release)
 
7000
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C      (.../branches/gcc-4_8-branch)
 
7001
@@ -0,0 +1,18 @@
 
7002
+// PR c++/59956
 
7003
+
 
7004
+template <int I> struct A;
 
7005
+template <int I> class B {
 
7006
+  int i;
 
7007
+  template <int A_S> friend void A<A_S>::impl();
 
7008
+};
 
7009
+
 
7010
+B<0> b1;
 
7011
+template<int I>struct A { void impl(); };
 
7012
+B<1> b2;
 
7013
+
 
7014
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
 
7015
+
 
7016
+int main()
 
7017
+{
 
7018
+  A<0>().impl();
 
7019
+}
 
7020
Index: gcc/testsuite/g++.dg/template/memclass5.C
 
7021
===================================================================
 
7022
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../tags/gcc_4_8_3_release)
 
7023
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C     (.../branches/gcc-4_8-branch)
 
7024
@@ -0,0 +1,26 @@
 
7025
+// PR c++/60241
 
7026
+
 
7027
+template <typename T>
 
7028
+struct x
 
7029
+{
 
7030
+    template <typename U>
 
7031
+    struct y
 
7032
+    {
 
7033
+        typedef T result2;
 
7034
+    };
 
7035
+
 
7036
+    typedef y<int> zy;
 
7037
+};
 
7038
+
 
7039
+template<>
 
7040
+template<class T>
 
7041
+struct x<int>::y
 
7042
+{
 
7043
+    typedef double result2;
 
7044
+};
 
7045
+
 
7046
+int main()
 
7047
+{
 
7048
+    x<int>::zy::result2 xxx;
 
7049
+    x<int>::y<int>::result2 xxx2;
 
7050
+}
 
7051
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
 
7052
===================================================================
 
7053
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../tags/gcc_4_8_3_release)
 
7054
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C      (.../branches/gcc-4_8-branch)
 
7055
@@ -0,0 +1,22 @@
 
7056
+// PR c++/61500
 
7057
+
 
7058
+struct X {
 
7059
+  int i;
 
7060
+  int j;
 
7061
+
 
7062
+  int foo(int X::* ptr);
 
7063
+
 
7064
+  template <int X::* ptr>
 
7065
+  int bar();
 
7066
+};
 
7067
+
 
7068
+int X::foo(int X::* ptr) {
 
7069
+  int* p = &(this->*ptr);  // OK.
 
7070
+  return *p;
 
7071
+}
 
7072
+
 
7073
+template <int X::* ptr>
 
7074
+int X::bar() {
 
7075
+  int* p = &(this->*ptr);  // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
 
7076
+  return *p;
 
7077
+}
 
7078
Index: gcc/cp/tree.c
 
7079
===================================================================
 
7080
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
 
7081
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
 
7082
@@ -97,6 +97,16 @@
 
7083
     case IMAGPART_EXPR:
 
7084
       return lvalue_kind (TREE_OPERAND (ref, 0));
 
7085
 
 
7086
+    case MEMBER_REF:
 
7087
+    case DOTSTAR_EXPR:
 
7088
+      if (TREE_CODE (ref) == MEMBER_REF)
 
7089
+       op1_lvalue_kind = clk_ordinary;
 
7090
+      else
 
7091
+       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
7092
+      if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
 
7093
+       op1_lvalue_kind = clk_none;
 
7094
+      return op1_lvalue_kind;
 
7095
+
 
7096
     case COMPONENT_REF:
 
7097
       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
 
7098
       /* Look at the member designator.  */
 
7099
@@ -3738,6 +3748,10 @@
 
7100
     {
 
7101
       init_expr = get_target_expr (exp);
 
7102
       exp = TARGET_EXPR_SLOT (init_expr);
 
7103
+      if (CLASS_TYPE_P (TREE_TYPE (exp)))
 
7104
+       exp = move (exp);
 
7105
+      else
 
7106
+       exp = rvalue (exp);
 
7107
     }
 
7108
   else
 
7109
     {
 
7110
Index: gcc/cp/ChangeLog
 
7111
===================================================================
 
7112
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
7113
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_8-branch)
 
7114
@@ -1,3 +1,87 @@
 
7115
+2014-10-15  Jason Merrill  <jason@redhat.com>
 
7116
+
 
7117
+       PR c++/63455
 
7118
+       Revert:
 
7119
+       * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
 
7120
+       committed to this tentative parse.
 
7121
+
 
7122
+       PR c++/63415
 
7123
+       * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
 
7124
+       (iterative_hash_template_arg): Likewise.
 
7125
+
 
7126
+       PR c++/56710
 
7127
+       * semantics.c (finish_member_declaration): Don't push closure
 
7128
+       members.
 
7129
+
 
7130
+       PR c++/58624
 
7131
+       * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
 
7132
+       * semantics.c (finish_id_expression): Don't call TLS wrapper in a
 
7133
+       template.
 
7134
+
 
7135
+2014-08-07  Jason Merrill  <jason@redhat.com>
 
7136
+
 
7137
+       PR c++/61959
 
7138
+       * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
 
7139
+
 
7140
+       PR c++/58714
 
7141
+       * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
 
7142
+
 
7143
+2014-01-27  Jason Merrill  <jason@redhat.com>
 
7144
+
 
7145
+       PR c++/59823
 
7146
+       Core DR 1138
 
7147
+       * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
 
7148
+       list-initialization.  A conversion to rvalue ref that involves
 
7149
+       an lvalue-rvalue conversion is bad.
 
7150
+       (convert_like_real): Give helpful error message.
 
7151
+
 
7152
+2014-01-29  Jason Merrill  <jason@redhat.com>
 
7153
+
 
7154
+       PR c++/59956
 
7155
+       * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
 
7156
+       have a friend template in a class template.
 
7157
+       * pt.c (tsubst_friend_function): Look through it.
 
7158
+       (push_template_decl_real): A friend member template is
 
7159
+       primary.
 
7160
+
 
7161
+2014-02-21  Jason Merrill  <jason@redhat.com>
 
7162
+
 
7163
+       PR c++/60241
 
7164
+       * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
 
7165
+       of the partial instantiation, not the most general template.
 
7166
+       (maybe_process_partial_specialization): Reassign everything on
 
7167
+       that list.
 
7168
+
 
7169
+2014-03-05  Jason Merrill  <jason@redhat.com>
 
7170
+
 
7171
+       PR c++/60361
 
7172
+       * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
 
7173
+       if re-parsing might succeed.
 
7174
+       * semantics.c (finish_id_expression): Use of a parameter outside
 
7175
+       the function body is a parse error.
 
7176
+
 
7177
+2014-06-30  Jason Merrill  <jason@redhat.com>
 
7178
+
 
7179
+       PR c++/61647
 
7180
+       * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
 
7181
+
 
7182
+       PR c++/61539
 
7183
+       * pt.c (unify_one_argument): Type/expression mismatch just causes
 
7184
+       deduction failure.
 
7185
+
 
7186
+       PR c++/61500
 
7187
+       * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
 
7188
+
 
7189
+2014-06-17  Jason Merrill  <jason@redhat.com>
 
7190
+
 
7191
+       PR c++/60605
 
7192
+       * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
 
7193
+
 
7194
+2014-06-02  Jason Merrill  <jason@redhat.com>
 
7195
+
 
7196
+       PR c++/61134
 
7197
+       * pt.c (pack_deducible_p): Handle canonicalization.
 
7198
+
 
7199
 2014-05-22  Release Manager
 
7200
 
 
7201
        * GCC 4.8.3 released.
 
7202
Index: gcc/cp/pt.c
 
7203
===================================================================
 
7204
--- a/src/gcc/cp/pt.c   (.../tags/gcc_4_8_3_release)
 
7205
+++ b/src/gcc/cp/pt.c   (.../branches/gcc-4_8-branch)
 
7206
@@ -907,11 +907,13 @@
 
7207
               t; t = TREE_CHAIN (t))
 
7208
            {
 
7209
              tree inst = TREE_VALUE (t);
 
7210
-             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
 
7211
+             if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
 
7212
+                 || !COMPLETE_OR_OPEN_TYPE_P (inst))
 
7213
                {
 
7214
                  /* We already have a full specialization of this partial
 
7215
-                    instantiation.  Reassign it to the new member
 
7216
-                    specialization template.  */
 
7217
+                    instantiation, or a full specialization has been
 
7218
+                    looked up but not instantiated.  Reassign it to the
 
7219
+                    new member specialization template.  */
 
7220
                  spec_entry elt;
 
7221
                  spec_entry *entry;
 
7222
                  void **slot;
 
7223
@@ -930,7 +932,7 @@
 
7224
                  *entry = elt;
 
7225
                  *slot = entry;
 
7226
                }
 
7227
-             else if (COMPLETE_OR_OPEN_TYPE_P (inst))
 
7228
+             else
 
7229
                /* But if we've had an implicit instantiation, that's a
 
7230
                   problem ([temp.expl.spec]/6).  */
 
7231
                error ("specialization %qT after instantiation %qT",
 
7232
@@ -1569,6 +1571,7 @@
 
7233
     case CONSTRUCTOR:
 
7234
       {
 
7235
        tree field, value;
 
7236
+       iterative_hash_template_arg (TREE_TYPE (arg), val);
 
7237
        FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
 
7238
          {
 
7239
            val = iterative_hash_template_arg (field, val);
 
7240
@@ -4308,7 +4311,8 @@
 
7241
      in the template-parameter-list of the definition of a member of a
 
7242
      class template.  */
 
7243
 
 
7244
-  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
 
7245
+  if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
 
7246
+      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
 
7247
     /* You can't have a function template declaration in a local
 
7248
        scope, nor you can you define a member of a class template in a
 
7249
        local scope.  */
 
7250
@@ -4572,7 +4576,8 @@
 
7251
     DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
 
7252
 
 
7253
   /* See if this is a primary template.  */
 
7254
-  if (is_friend && ctx)
 
7255
+  if (is_friend && ctx
 
7256
+      && uses_template_parms_level (ctx, processing_template_decl))
 
7257
     /* A friend template that specifies a class context, i.e.
 
7258
          template <typename T> friend void A<T>::f();
 
7259
        is not primary.  */
 
7260
@@ -7454,7 +7459,7 @@
 
7261
        }
 
7262
 
 
7263
       /* Let's consider the explicit specialization of a member
 
7264
-         of a class template specialization that is implicitely instantiated,
 
7265
+         of a class template specialization that is implicitly instantiated,
 
7266
         e.g.:
 
7267
             template<class T>
 
7268
             struct S
 
7269
@@ -7552,9 +7557,9 @@
 
7270
 
 
7271
       /* Note this use of the partial instantiation so we can check it
 
7272
         later in maybe_process_partial_specialization.  */
 
7273
-      DECL_TEMPLATE_INSTANTIATIONS (templ)
 
7274
+      DECL_TEMPLATE_INSTANTIATIONS (found)
 
7275
        = tree_cons (arglist, t,
 
7276
-                    DECL_TEMPLATE_INSTANTIATIONS (templ));
 
7277
+                    DECL_TEMPLATE_INSTANTIATIONS (found));
 
7278
 
 
7279
       if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
 
7280
        /* Now that the type has been registered on the instantiations
 
7281
@@ -8289,10 +8294,17 @@
 
7282
 
 
7283
       if (COMPLETE_TYPE_P (context))
 
7284
        {
 
7285
+         tree fn = new_friend;
 
7286
+         /* do_friend adds the TEMPLATE_DECL for any member friend
 
7287
+            template even if it isn't a member template, i.e.
 
7288
+              template <class T> friend A<T>::f();
 
7289
+            Look through it in that case.  */
 
7290
+         if (TREE_CODE (fn) == TEMPLATE_DECL
 
7291
+             && !PRIMARY_TEMPLATE_P (fn))
 
7292
+           fn = DECL_TEMPLATE_RESULT (fn);
 
7293
          /* Check to see that the declaration is really present, and,
 
7294
             possibly obtain an improved declaration.  */
 
7295
-         tree fn = check_classfn (context,
 
7296
-                                  new_friend, NULL_TREE);
 
7297
+         fn = check_classfn (context, fn, NULL_TREE);
 
7298
 
 
7299
          if (fn)
 
7300
            new_friend = fn;
 
7301
@@ -14488,6 +14500,16 @@
 
7302
     case PARM_DECL:
 
7303
       {
 
7304
        tree r = tsubst_copy (t, args, complain, in_decl);
 
7305
+       if (TREE_CODE (r) == VAR_DECL
 
7306
+           && !processing_template_decl
 
7307
+           && !cp_unevaluated_operand
 
7308
+           && DECL_THREAD_LOCAL_P (r))
 
7309
+         {
 
7310
+           if (tree wrap = get_tls_wrapper_fn (r))
 
7311
+             /* Replace an evaluated use of the thread_local variable with
 
7312
+                a call to its wrapper.  */
 
7313
+             r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
 
7314
+         }
 
7315
 
 
7316
        if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
 
7317
          /* If the original type was a reference, we'll be wrapped in
 
7318
@@ -14934,7 +14956,7 @@
 
7319
        continue;
 
7320
       for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
 
7321
           packs; packs = TREE_CHAIN (packs))
 
7322
-       if (TREE_VALUE (packs) == parm)
 
7323
+       if (template_args_equal (TREE_VALUE (packs), parm))
 
7324
          {
 
7325
            /* The template parameter pack is used in a function parameter
 
7326
               pack.  If this is the end of the parameter list, the
 
7327
@@ -15502,8 +15524,9 @@
 
7328
        maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
 
7329
     }
 
7330
   else
 
7331
-    gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
7332
-               == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
 
7333
+    if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
 
7334
+       != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
 
7335
+      return unify_template_argument_mismatch (explain_p, parm, arg);
 
7336
 
 
7337
   /* For deduction from an init-list we need the actual list.  */
 
7338
   if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
 
7339
@@ -19804,6 +19827,8 @@
 
7340
       {
 
7341
        unsigned ix;
 
7342
        tree val;
 
7343
+       if (dependent_type_p (TREE_TYPE (expression)))
 
7344
+         return true;
 
7345
        FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
 
7346
          if (value_dependent_expression_p (val))
 
7347
            return true;
 
7348
@@ -20009,7 +20034,12 @@
 
7349
        return true;
 
7350
 
 
7351
       if (BASELINK_P (expression))
 
7352
-       expression = BASELINK_FUNCTIONS (expression);
 
7353
+       {
 
7354
+         if (BASELINK_OPTYPE (expression)
 
7355
+             && dependent_type_p (BASELINK_OPTYPE (expression)))
 
7356
+           return true;
 
7357
+         expression = BASELINK_FUNCTIONS (expression);
 
7358
+       }
 
7359
 
 
7360
       if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
 
7361
        {
 
7362
Index: gcc/cp/semantics.c
 
7363
===================================================================
 
7364
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_8_3_release)
 
7365
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_8-branch)
 
7366
@@ -2735,8 +2735,10 @@
 
7367
                                              /*friend_p=*/0);
 
7368
        }
 
7369
     }
 
7370
-  /* Enter the DECL into the scope of the class.  */
 
7371
-  else if (pushdecl_class_level (decl))
 
7372
+  /* Enter the DECL into the scope of the class, if the class
 
7373
+     isn't a closure (whose fields are supposed to be unnamed).  */
 
7374
+  else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
 
7375
+          || pushdecl_class_level (decl))
 
7376
     {
 
7377
       if (TREE_CODE (decl) == USING_DECL)
 
7378
        {
 
7379
@@ -3108,7 +3110,7 @@
 
7380
          && DECL_CONTEXT (decl) == NULL_TREE
 
7381
          && !cp_unevaluated_operand)
 
7382
        {
 
7383
-         error ("use of parameter %qD outside function body", decl);
 
7384
+         *error_msg = "use of parameter outside function body";
 
7385
          return error_mark_node;
 
7386
        }
 
7387
     }
 
7388
@@ -3343,6 +3345,7 @@
 
7389
       tree wrap;
 
7390
       if (TREE_CODE (decl) == VAR_DECL
 
7391
          && !cp_unevaluated_operand
 
7392
+         && !processing_template_decl
 
7393
          && DECL_THREAD_LOCAL_P (decl)
 
7394
          && (wrap = get_tls_wrapper_fn (decl)))
 
7395
        {
 
7396
@@ -7296,7 +7299,9 @@
 
7397
          constructor_elt *inner = base_field_constructor_elt (n, ce->index);
 
7398
          inner->value = elt;
 
7399
        }
 
7400
-      else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
 
7401
+      else if (ce->index
 
7402
+              && (TREE_CODE (ce->index) == NOP_EXPR
 
7403
+                  || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
 
7404
        {
 
7405
          /* This is an initializer for an empty base; now that we've
 
7406
             checked that it's constant, we can ignore it.  */
 
7407
Index: gcc/cp/parser.c
 
7408
===================================================================
 
7409
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_8_3_release)
 
7410
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_8-branch)
 
7411
@@ -12831,7 +12831,12 @@
 
7412
      the effort required to do the parse, nor will we issue duplicate
 
7413
      error messages about problems during instantiation of the
 
7414
      template.  */
 
7415
-  if (start_of_id)
 
7416
+  if (start_of_id
 
7417
+      /* Don't do this if we had a parse error in a declarator; re-parsing
 
7418
+        might succeed if a name changes meaning (60361).  */
 
7419
+      && !(cp_parser_error_occurred (parser)
 
7420
+          && cp_parser_parsing_tentatively (parser)
 
7421
+          && parser->in_declarator_p))
 
7422
     {
 
7423
       cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
 
7424
 
 
7425
@@ -23774,8 +23779,6 @@
 
7426
 static void
 
7427
 cp_parser_abort_tentative_parse (cp_parser* parser)
 
7428
 {
 
7429
-  gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
 
7430
-             || errorcount > 0);
 
7431
   cp_parser_simulate_error (parser);
 
7432
   /* Now, pretend that we want to see if the construct was
 
7433
      successfully parsed.  */
 
7434
Index: gcc/cp/call.c
 
7435
===================================================================
 
7436
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
 
7437
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
 
7438
@@ -1464,7 +1464,7 @@
 
7439
     {
 
7440
       maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
 
7441
       conv = implicit_conversion (to, from, expr, c_cast_p,
 
7442
-                                 flags, complain);
 
7443
+                                 flags|LOOKUP_NO_TEMP_BIND, complain);
 
7444
       if (!CLASS_TYPE_P (to)
 
7445
          && CONSTRUCTOR_NELTS (expr) == 1)
 
7446
        {
 
7447
@@ -1624,9 +1624,9 @@
 
7448
 
 
7449
   /* [dcl.init.ref]
 
7450
 
 
7451
-     Otherwise, the reference shall be to a non-volatile const type.
 
7452
-
 
7453
-     Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
 
7454
+     Otherwise, the reference shall be an lvalue reference to a
 
7455
+     non-volatile const type, or the reference shall be an rvalue
 
7456
+     reference.  */
 
7457
   if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
 
7458
     return NULL;
 
7459
 
 
7460
@@ -1664,7 +1664,16 @@
 
7461
   /* This reference binding, unlike those above, requires the
 
7462
      creation of a temporary.  */
 
7463
   conv->need_temporary_p = true;
 
7464
-  conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
 
7465
+  if (TYPE_REF_IS_RVALUE (rto))
 
7466
+    {
 
7467
+      conv->rvaluedness_matches_p = 1;
 
7468
+      /* In the second case, if the reference is an rvalue reference and
 
7469
+        the second standard conversion sequence of the user-defined
 
7470
+        conversion sequence includes an lvalue-to-rvalue conversion, the
 
7471
+        program is ill-formed.  */
 
7472
+      if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
 
7473
+       conv->bad_p = 1;
 
7474
+    }
 
7475
 
 
7476
   return conv;
 
7477
 }
 
7478
@@ -5811,7 +5820,7 @@
 
7479
       && convs->kind != ck_list
 
7480
       && convs->kind != ck_ambig
 
7481
       && (convs->kind != ck_ref_bind
 
7482
-         || convs->user_conv_p)
 
7483
+         || (convs->user_conv_p && next_conversion (convs)->bad_p))
 
7484
       && (convs->kind != ck_rvalue
 
7485
          || SCALAR_TYPE_P (totype))
 
7486
       && convs->kind != ck_base)
 
7487
@@ -6110,7 +6119,8 @@
 
7488
        if (convs->bad_p && !next_conversion (convs)->bad_p)
 
7489
          {
 
7490
            gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
 
7491
-                       && real_lvalue_p (expr));
 
7492
+                       && (real_lvalue_p (expr)
 
7493
+                           || next_conversion(convs)->kind == ck_rvalue));
 
7494
 
 
7495
            error_at (loc, "cannot bind %qT lvalue to %qT",
 
7496
                      TREE_TYPE (expr), totype);
 
7497
Index: gcc/cp/friend.c
 
7498
===================================================================
 
7499
--- a/src/gcc/cp/friend.c       (.../tags/gcc_4_8_3_release)
 
7500
+++ b/src/gcc/cp/friend.c       (.../branches/gcc-4_8-branch)
 
7501
@@ -502,7 +502,13 @@
 
7502
                                  ? current_template_parms
 
7503
                                  : NULL_TREE);
 
7504
 
 
7505
-         if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
7506
+         if ((template_member_p
 
7507
+              /* Always pull out the TEMPLATE_DECL if we have a friend
 
7508
+                 template in a class template so that it gets tsubsted
 
7509
+                 properly later on (59956).  tsubst_friend_function knows
 
7510
+                 how to tell this apart from a member template.  */
 
7511
+              || (class_template_depth && friend_depth))
 
7512
+             && decl && TREE_CODE (decl) == FUNCTION_DECL)
 
7513
            decl = DECL_TI_TEMPLATE (decl);
 
7514
 
 
7515
          if (decl)
 
7516
Index: gcc/haifa-sched.c
 
7517
===================================================================
 
7518
--- a/src/gcc/haifa-sched.c     (.../tags/gcc_4_8_3_release)
 
7519
+++ b/src/gcc/haifa-sched.c     (.../branches/gcc-4_8-branch)
 
7520
@@ -2931,7 +2931,7 @@
 
7521
 {
 
7522
   advance_state (curr_state);
 
7523
   if (sched_verbose >= 6)
 
7524
-    fprintf (sched_dump, ";;\tAdvanced a state.\n");
 
7525
+    fprintf (sched_dump, ";;\tAdvance the current state.\n");
 
7526
 }
 
7527
 
 
7528
 /* Update register pressure after scheduling INSN.  */
 
7529
@@ -5964,6 +5964,7 @@
 
7530
   modulo_insns_scheduled = 0;
 
7531
 
 
7532
   ls.modulo_epilogue = false;
 
7533
+  ls.first_cycle_insn_p = true;
 
7534
 
 
7535
   /* Loop until all the insns in BB are scheduled.  */
 
7536
   while ((*current_sched_info->schedule_more_p) ())
 
7537
@@ -6034,7 +6035,6 @@
 
7538
       if (must_backtrack)
 
7539
        goto do_backtrack;
 
7540
 
 
7541
-      ls.first_cycle_insn_p = true;
 
7542
       ls.shadows_only_p = false;
 
7543
       cycle_issued_insns = 0;
 
7544
       ls.can_issue_more = issue_rate;
 
7545
@@ -6321,11 +6321,13 @@
 
7546
              break;
 
7547
            }
 
7548
        }
 
7549
+      ls.first_cycle_insn_p = true;
 
7550
     }
 
7551
   if (ls.modulo_epilogue)
 
7552
     success = true;
 
7553
  end_schedule:
 
7554
-  advance_one_cycle ();
 
7555
+  if (!ls.first_cycle_insn_p)
 
7556
+    advance_one_cycle ();
 
7557
   perform_replacements_new_cycle ();
 
7558
   if (modulo_ii > 0)
 
7559
     {
 
7560
Index: gcc/double-int.c
 
7561
===================================================================
 
7562
--- a/src/gcc/double-int.c      (.../tags/gcc_4_8_3_release)
 
7563
+++ b/src/gcc/double-int.c      (.../branches/gcc-4_8-branch)
 
7564
@@ -616,7 +616,7 @@
 
7565
                 == (unsigned HOST_WIDE_INT) htwice)
 
7566
                && (labs_den <= ltwice)))
 
7567
          {
 
7568
-           if (*hquo < 0)
 
7569
+           if (quo_neg)
 
7570
              /* quo = quo - 1;  */
 
7571
              add_double (*lquo, *hquo,
 
7572
                          (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
 
7573
Index: gcc/ipa-pure-const.c
 
7574
===================================================================
 
7575
--- a/src/gcc/ipa-pure-const.c  (.../tags/gcc_4_8_3_release)
 
7576
+++ b/src/gcc/ipa-pure-const.c  (.../branches/gcc-4_8-branch)
 
7577
@@ -1429,7 +1429,7 @@
 
7578
              else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
 
7579
                can_throw = true;
 
7580
            }
 
7581
-          for (ie = node->indirect_calls; ie; ie = ie->next_callee)
 
7582
+          for (ie = w->indirect_calls; ie; ie = ie->next_callee)
 
7583
            if (ie->can_throw_external)
 
7584
              can_throw = true;
 
7585
          w_info = (struct ipa_dfs_info *) w->symbol.aux;
 
7586
Index: gcc/tree-ssa-math-opts.c
 
7587
===================================================================
 
7588
--- a/src/gcc/tree-ssa-math-opts.c      (.../tags/gcc_4_8_3_release)
 
7589
+++ b/src/gcc/tree-ssa-math-opts.c      (.../branches/gcc-4_8-branch)
 
7590
@@ -1537,7 +1537,7 @@
 
7591
 
 
7592
 struct symbolic_number {
 
7593
   unsigned HOST_WIDEST_INT n;
 
7594
-  int size;
 
7595
+  tree type;
 
7596
 };
 
7597
 
 
7598
 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
 
7599
@@ -1549,13 +1549,15 @@
 
7600
                 struct symbolic_number *n,
 
7601
                 int count)
 
7602
 {
 
7603
+  int bitsize = TYPE_PRECISION (n->type);
 
7604
+
 
7605
   if (count % 8 != 0)
 
7606
     return false;
 
7607
 
 
7608
   /* Zero out the extra bits of N in order to avoid them being shifted
 
7609
      into the significant bits.  */
 
7610
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
7611
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
7612
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
7613
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
7614
 
 
7615
   switch (code)
 
7616
     {
 
7617
@@ -1563,20 +1565,24 @@
 
7618
       n->n <<= count;
 
7619
       break;
 
7620
     case RSHIFT_EXPR:
 
7621
+      /* Arithmetic shift of signed type: result is dependent on the value.  */
 
7622
+      if (!TYPE_UNSIGNED (n->type)
 
7623
+         && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
 
7624
+       return false;
 
7625
       n->n >>= count;
 
7626
       break;
 
7627
     case LROTATE_EXPR:
 
7628
-      n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
 
7629
+      n->n = (n->n << count) | (n->n >> (bitsize - count));
 
7630
       break;
 
7631
     case RROTATE_EXPR:
 
7632
-      n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
 
7633
+      n->n = (n->n >> count) | (n->n << (bitsize - count));
 
7634
       break;
 
7635
     default:
 
7636
       return false;
 
7637
     }
 
7638
   /* Zero unused bits for size.  */
 
7639
-  if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
7640
-    n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
 
7641
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
7642
+    n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
7643
   return true;
 
7644
 }
 
7645
 
 
7646
@@ -1593,7 +1599,7 @@
 
7647
   if (TREE_CODE (lhs_type) != INTEGER_TYPE)
 
7648
     return false;
 
7649
 
 
7650
-  if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
 
7651
+  if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
 
7652
     return false;
 
7653
 
 
7654
   return true;
 
7655
@@ -1650,20 +1656,25 @@
 
7656
         to initialize the symbolic number.  */
 
7657
       if (!source_expr1)
 
7658
        {
 
7659
+         int size;
 
7660
+
 
7661
          /* Set up the symbolic number N by setting each byte to a
 
7662
             value between 1 and the byte size of rhs1.  The highest
 
7663
             order byte is set to n->size and the lowest order
 
7664
             byte to 1.  */
 
7665
-         n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
 
7666
-         if (n->size % BITS_PER_UNIT != 0)
 
7667
+         n->type = TREE_TYPE (rhs1);
 
7668
+         size = TYPE_PRECISION (n->type);
 
7669
+         if (size % BITS_PER_UNIT != 0)
 
7670
            return NULL_TREE;
 
7671
-         n->size /= BITS_PER_UNIT;
 
7672
+         if (size > HOST_BITS_PER_WIDEST_INT)
 
7673
+           return NULL_TREE;
 
7674
+         size /= BITS_PER_UNIT;
 
7675
          n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
 
7676
                  (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
 
7677
 
 
7678
-         if (n->size < (int)sizeof (HOST_WIDEST_INT))
 
7679
+         if (size < (int)sizeof (HOST_WIDEST_INT))
 
7680
            n->n &= ((unsigned HOST_WIDEST_INT)1 <<
 
7681
-                    (n->size * BITS_PER_UNIT)) - 1;
 
7682
+                    (size * BITS_PER_UNIT)) - 1;
 
7683
 
 
7684
          source_expr1 = rhs1;
 
7685
        }
 
7686
@@ -1672,12 +1683,12 @@
 
7687
        {
 
7688
        case BIT_AND_EXPR:
 
7689
          {
 
7690
-           int i;
 
7691
+           int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
7692
            unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
 
7693
            unsigned HOST_WIDEST_INT tmp = val;
 
7694
 
 
7695
            /* Only constants masking full bytes are allowed.  */
 
7696
-           for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
 
7697
+           for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
 
7698
              if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
 
7699
                return NULL_TREE;
 
7700
 
 
7701
@@ -1693,12 +1704,24 @@
 
7702
          break;
 
7703
        CASE_CONVERT:
 
7704
          {
 
7705
-           int type_size;
 
7706
+           int type_size, old_type_size;
 
7707
+           tree type;
 
7708
 
 
7709
-           type_size = TYPE_PRECISION (gimple_expr_type (stmt));
 
7710
+           type = gimple_expr_type (stmt);
 
7711
+           type_size = TYPE_PRECISION (type);
 
7712
            if (type_size % BITS_PER_UNIT != 0)
 
7713
              return NULL_TREE;
 
7714
+           if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
 
7715
+             return NULL_TREE;
 
7716
 
 
7717
+           /* Sign extension: result is dependent on the value.  */
 
7718
+           old_type_size = TYPE_PRECISION (n->type);
 
7719
+           if (!TYPE_UNSIGNED (n->type)
 
7720
+               && type_size > old_type_size
 
7721
+               && n->n &
 
7722
+                  ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
 
7723
+             return NULL_TREE;
 
7724
+
 
7725
            if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
 
7726
              {
 
7727
                /* If STMT casts to a smaller type mask out the bits not
 
7728
@@ -1705,7 +1728,7 @@
 
7729
                   belonging to the target type.  */
 
7730
                n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
 
7731
              }
 
7732
-           n->size = type_size / BITS_PER_UNIT;
 
7733
+           n->type = type;
 
7734
          }
 
7735
          break;
 
7736
        default:
 
7737
@@ -1718,7 +1741,7 @@
 
7738
 
 
7739
   if (rhs_class == GIMPLE_BINARY_RHS)
 
7740
     {
 
7741
-      int i;
 
7742
+      int i, size;
 
7743
       struct symbolic_number n1, n2;
 
7744
       unsigned HOST_WIDEST_INT mask;
 
7745
       tree source_expr2;
 
7746
@@ -1742,11 +1765,12 @@
 
7747
          source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
 
7748
 
 
7749
          if (source_expr1 != source_expr2
 
7750
-             || n1.size != n2.size)
 
7751
+             || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
 
7752
            return NULL_TREE;
 
7753
 
 
7754
-         n->size = n1.size;
 
7755
-         for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
 
7756
+         n->type = n1.type;
 
7757
+         size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
 
7758
+         for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
 
7759
            {
 
7760
              unsigned HOST_WIDEST_INT masked1, masked2;
 
7761
 
 
7762
@@ -1785,7 +1809,7 @@
 
7763
 
 
7764
   struct symbolic_number n;
 
7765
   tree source_expr;
 
7766
-  int limit;
 
7767
+  int limit, bitsize;
 
7768
 
 
7769
   /* The last parameter determines the depth search limit.  It usually
 
7770
      correlates directly to the number of bytes to be touched.  We
 
7771
@@ -1800,13 +1824,14 @@
 
7772
     return NULL_TREE;
 
7773
 
 
7774
   /* Zero out the extra bits of N and CMP.  */
 
7775
-  if (n.size < (int)sizeof (HOST_WIDEST_INT))
 
7776
+  bitsize = TYPE_PRECISION (n.type);
 
7777
+  if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
 
7778
     {
 
7779
       unsigned HOST_WIDEST_INT mask =
 
7780
-       ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
 
7781
+       ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
 
7782
 
 
7783
       n.n &= mask;
 
7784
-      cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
 
7785
+      cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
 
7786
     }
 
7787
 
 
7788
   /* A complete byte swap should make the symbolic number to start
 
7789
@@ -1828,7 +1853,7 @@
 
7790
   bool changed = false;
 
7791
   tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
 
7792
 
 
7793
-  if (BITS_PER_UNIT != 8)
 
7794
+  if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
 
7795
     return 0;
 
7796
 
 
7797
   if (sizeof (HOST_WIDEST_INT) < 8)
 
7798
Index: gcc/tree-nrv.c
 
7799
===================================================================
 
7800
--- a/src/gcc/tree-nrv.c        (.../tags/gcc_4_8_3_release)
 
7801
+++ b/src/gcc/tree-nrv.c        (.../branches/gcc-4_8-branch)
 
7802
@@ -178,8 +178,7 @@
 
7803
                 same type and alignment as the function's result.  */
 
7804
              if (TREE_CODE (found) != VAR_DECL
 
7805
                  || TREE_THIS_VOLATILE (found)
 
7806
-                 || DECL_CONTEXT (found) != current_function_decl
 
7807
-                 || TREE_STATIC (found)
 
7808
+                 || !auto_var_in_fn_p (found, current_function_decl)
 
7809
                  || TREE_ADDRESSABLE (found)
 
7810
                  || DECL_ALIGN (found) > DECL_ALIGN (result)
 
7811
                  || !useless_type_conversion_p (result_type,
 
7812
Index: gcc/ifcvt.c
 
7813
===================================================================
 
7814
--- a/src/gcc/ifcvt.c   (.../tags/gcc_4_8_3_release)
 
7815
+++ b/src/gcc/ifcvt.c   (.../branches/gcc-4_8-branch)
 
7816
@@ -294,6 +294,28 @@
 
7817
 
 
7818
   return (e) ? e->dest : NULL_BLOCK;
 
7819
 }
 
7820
+
 
7821
+/* Return true if RTXs A and B can be safely interchanged.  */
 
7822
+
 
7823
+static bool
 
7824
+rtx_interchangeable_p (const_rtx a, const_rtx b)
 
7825
+{
 
7826
+  if (!rtx_equal_p (a, b))
 
7827
+    return false;
 
7828
+
 
7829
+  if (GET_CODE (a) != MEM)
 
7830
+    return true;
 
7831
+
 
7832
+  /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
 
7833
+     reference is not.  Interchanging a dead type-unsafe memory reference with
 
7834
+     a live type-safe one creates a live type-unsafe memory reference, in other
 
7835
+     words, it makes the program illegal.
 
7836
+     We check here conservatively whether the two memory references have equal
 
7837
+     memory attributes.  */
 
7838
+
 
7839
+  return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
 
7840
+}
 
7841
+
 
7842
 
 
7843
 /* Go through a bunch of insns, converting them to conditional
 
7844
    execution format if possible.  Return TRUE if all of the non-note
 
7845
@@ -1014,6 +1036,9 @@
 
7846
       || (rtx_equal_p (if_info->a, XEXP (cond, 1))
 
7847
          && rtx_equal_p (if_info->b, XEXP (cond, 0))))
 
7848
     {
 
7849
+      if (!rtx_interchangeable_p (if_info->a, if_info->b))
 
7850
+       return FALSE;
 
7851
+
 
7852
       y = (code == EQ) ? if_info->a : if_info->b;
 
7853
 
 
7854
       /* Avoid generating the move if the source is the destination.  */
 
7855
@@ -2483,7 +2508,7 @@
 
7856
       if (! insn_b
 
7857
          || insn_b != last_active_insn (else_bb, FALSE)
 
7858
          || (set_b = single_set (insn_b)) == NULL_RTX
 
7859
-         || ! rtx_equal_p (x, SET_DEST (set_b)))
 
7860
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
 
7861
        return FALSE;
 
7862
     }
 
7863
   else
 
7864
@@ -2496,7 +2521,7 @@
 
7865
          || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
 
7866
          || !NONJUMP_INSN_P (insn_b)
 
7867
          || (set_b = single_set (insn_b)) == NULL_RTX
 
7868
-         || ! rtx_equal_p (x, SET_DEST (set_b))
 
7869
+         || ! rtx_interchangeable_p (x, SET_DEST (set_b))
 
7870
          || ! noce_operand_ok (SET_SRC (set_b))
 
7871
          || reg_overlap_mentioned_p (x, SET_SRC (set_b))
 
7872
          || modified_between_p (SET_SRC (set_b), insn_b, jump)
 
7873
@@ -2562,7 +2587,7 @@
 
7874
 
 
7875
   /* Look and see if A and B are really the same.  Avoid creating silly
 
7876
      cmove constructs that no one will fix up later.  */
 
7877
-  if (rtx_equal_p (a, b))
 
7878
+  if (rtx_interchangeable_p (a, b))
 
7879
     {
 
7880
       /* If we have an INSN_B, we don't have to create any new rtl.  Just
 
7881
         move the instruction that we already have.  If we don't have an
 
7882
@@ -4246,6 +4271,9 @@
 
7883
   old_dest = JUMP_LABEL (jump);
 
7884
   if (other_bb != new_dest)
 
7885
     {
 
7886
+      if (!any_condjump_p (jump))
 
7887
+       goto cancel;
 
7888
+
 
7889
       if (JUMP_P (BB_END (dest_edge->src)))
 
7890
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
 
7891
       else if (new_dest == EXIT_BLOCK_PTR)
 
7892
Index: gcc/dwarf2out.c
 
7893
===================================================================
 
7894
--- a/src/gcc/dwarf2out.c       (.../tags/gcc_4_8_3_release)
 
7895
+++ b/src/gcc/dwarf2out.c       (.../branches/gcc-4_8-branch)
 
7896
@@ -12234,7 +12234,7 @@
 
7897
              op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
 
7898
                                        VAR_INIT_STATUS_INITIALIZED);
 
7899
              if (op1 == 0)
 
7900
-               break;
 
7901
+               return NULL;
 
7902
              add_loc_descr (&mem_loc_result, op1);
 
7903
              add_loc_descr (&mem_loc_result,
 
7904
                             new_loc_descr (DW_OP_plus, 0, 0));
 
7905
@@ -13882,6 +13882,10 @@
 
7906
       have_address = 1;
 
7907
       break;
 
7908
 
 
7909
+    case TARGET_MEM_REF:
 
7910
+    case SSA_NAME:
 
7911
+      return NULL;
 
7912
+
 
7913
     case COMPOUND_EXPR:
 
7914
       return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
 
7915
 
 
7916
Index: gcc/expr.c
 
7917
===================================================================
 
7918
--- a/src/gcc/expr.c    (.../tags/gcc_4_8_3_release)
 
7919
+++ b/src/gcc/expr.c    (.../branches/gcc-4_8-branch)
 
7920
@@ -10603,7 +10603,7 @@
 
7921
       || !host_integerp (TREE_OPERAND (offset, 1), 1)
 
7922
       || compare_tree_int (TREE_OPERAND (offset, 1),
 
7923
                           BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
 
7924
-      || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
7925
+      || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
 
7926
     return 0;
 
7927
 
 
7928
   /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
 
7929
Index: gcc/ada/socket.c
 
7930
===================================================================
 
7931
--- a/src/gcc/ada/socket.c      (.../tags/gcc_4_8_3_release)
 
7932
+++ b/src/gcc/ada/socket.c      (.../branches/gcc-4_8-branch)
 
7933
@@ -212,7 +212,7 @@
 
7934
   struct hostent *rh;
 
7935
   int ri;
 
7936
 
 
7937
-#if defined(__linux__) || defined(__GLIBC__)
 
7938
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
 
7939
   (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
 
7940
 #else
 
7941
   rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
 
7942
Index: gcc/ada/uintp.adb
 
7943
===================================================================
 
7944
--- a/src/gcc/ada/uintp.adb     (.../tags/gcc_4_8_3_release)
 
7945
+++ b/src/gcc/ada/uintp.adb     (.../branches/gcc-4_8-branch)
 
7946
@@ -171,22 +171,6 @@
 
7947
    --  If Discard_Quotient is True, Quotient is set to No_Uint
 
7948
    --  If Discard_Remainder is True, Remainder is set to No_Uint
 
7949
 
 
7950
-   function Vector_To_Uint
 
7951
-     (In_Vec   : UI_Vector;
 
7952
-      Negative : Boolean) return Uint;
 
7953
-   --  Functions that calculate values in UI_Vectors, call this function to
 
7954
-   --  create and return the Uint value. In_Vec contains the multiple precision
 
7955
-   --  (Base) representation of a non-negative value. Leading zeroes are
 
7956
-   --  permitted. Negative is set if the desired result is the negative of the
 
7957
-   --  given value. The result will be either the appropriate directly
 
7958
-   --  represented value, or a table entry in the proper canonical format is
 
7959
-   --  created and returned.
 
7960
-   --
 
7961
-   --  Note that Init_Operand puts a signed value in the result vector, but
 
7962
-   --  Vector_To_Uint is always presented with a non-negative value. The
 
7963
-   --  processing of signs is something that is done by the caller before
 
7964
-   --  calling Vector_To_Uint.
 
7965
-
 
7966
    ------------
 
7967
    -- Direct --
 
7968
    ------------
 
7969
Index: gcc/ada/uintp.ads
 
7970
===================================================================
 
7971
--- a/src/gcc/ada/uintp.ads     (.../tags/gcc_4_8_3_release)
 
7972
+++ b/src/gcc/ada/uintp.ads     (.../branches/gcc-4_8-branch)
 
7973
@@ -90,6 +90,18 @@
 
7974
    Uint_Minus_80  : constant Uint;
 
7975
    Uint_Minus_128 : constant Uint;
 
7976
 
 
7977
+   type UI_Vector is array (Pos range <>) of Int;
 
7978
+   --  Vector containing the integer values of a Uint value
 
7979
+
 
7980
+   --  Note: An earlier version of this package used pointers of arrays of Ints
 
7981
+   --  (dynamically allocated) for the Uint type. The change leads to a few
 
7982
+   --  less natural idioms used throughout this code, but eliminates all uses
 
7983
+   --  of the heap except for the table package itself. For example, Uint
 
7984
+   --  parameters are often converted to UI_Vectors for internal manipulation.
 
7985
+   --  This is done by creating the local UI_Vector using the function N_Digits
 
7986
+   --  on the Uint to find the size needed for the vector, and then calling
 
7987
+   --  Init_Operand to copy the values out of the table into the vector.
 
7988
+
 
7989
    -----------------
 
7990
    -- Subprograms --
 
7991
    -----------------
 
7992
@@ -252,6 +264,22 @@
 
7993
    --  function is used for capacity checks, and it can be one bit off
 
7994
    --  without affecting its usage.
 
7995
 
 
7996
+   function Vector_To_Uint
 
7997
+     (In_Vec   : UI_Vector;
 
7998
+      Negative : Boolean) return Uint;
 
7999
+   --  Functions that calculate values in UI_Vectors, call this function to
 
8000
+   --  create and return the Uint value. In_Vec contains the multiple precision
 
8001
+   --  (Base) representation of a non-negative value. Leading zeroes are
 
8002
+   --  permitted. Negative is set if the desired result is the negative of the
 
8003
+   --  given value. The result will be either the appropriate directly
 
8004
+   --  represented value, or a table entry in the proper canonical format is
 
8005
+   --  created and returned.
 
8006
+   --
 
8007
+   --  Note that Init_Operand puts a signed value in the result vector, but
 
8008
+   --  Vector_To_Uint is always presented with a non-negative value. The
 
8009
+   --  processing of signs is something that is done by the caller before
 
8010
+   --  calling Vector_To_Uint.
 
8011
+
 
8012
    ---------------------
 
8013
    -- Output Routines --
 
8014
    ---------------------
 
8015
@@ -494,18 +522,6 @@
 
8016
    --  UI_Vector is defined for this purpose and some internal subprograms
 
8017
    --  used for converting from one to the other are defined.
 
8018
 
 
8019
-   type UI_Vector is array (Pos range <>) of Int;
 
8020
-   --  Vector containing the integer values of a Uint value
 
8021
-
 
8022
-   --  Note: An earlier version of this package used pointers of arrays of Ints
 
8023
-   --  (dynamically allocated) for the Uint type. The change leads to a few
 
8024
-   --  less natural idioms used throughout this code, but eliminates all uses
 
8025
-   --  of the heap except for the table package itself. For example, Uint
 
8026
-   --  parameters are often converted to UI_Vectors for internal manipulation.
 
8027
-   --  This is done by creating the local UI_Vector using the function N_Digits
 
8028
-   --  on the Uint to find the size needed for the vector, and then calling
 
8029
-   --  Init_Operand to copy the values out of the table into the vector.
 
8030
-
 
8031
    type Uint_Entry is record
 
8032
       Length : Pos;
 
8033
       --  Length of entry in Udigits table in digits (i.e. in words)
 
8034
Index: gcc/ada/ChangeLog
 
8035
===================================================================
 
8036
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_8_3_release)
 
8037
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_8-branch)
 
8038
@@ -1,3 +1,29 @@
 
8039
+2014-11-22  Eric Botcazou  <ebotcazou@adacore.com>
 
8040
+
 
8041
+       Backport from mainline
 
8042
+       2014-11-20  Vincent Celier  <celier@adacore.com>
 
8043
+
 
8044
+       PR ada/47500
 
8045
+       * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
 
8046
+       its argument.
 
8047
+
 
8048
+2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
 
8049
+            Alan Modra  <amodra@gmail.com>
 
8050
+
 
8051
+       PR ada/63225
 
8052
+       * uintp.adb (Vector_To_Uint): Move from here to...
 
8053
+       * uintp.ads (UI_Vector): Make public.
 
8054
+       (Vector_To_Uint): ...here.
 
8055
+
 
8056
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
8057
+
 
8058
+       * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
 
8059
+       * gsocket.h Add include of <unistd.h> on RTEMS.
 
8060
+
 
8061
+2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
 
8062
+
 
8063
+       * s-osinte-rtems.adb: Correct formatting of line in license block.
 
8064
+
 
8065
 2014-05-22  Release Manager
 
8066
 
 
8067
        * GCC 4.8.3 released.
 
8068
Index: gcc/ada/s-osinte-rtems.adb
 
8069
===================================================================
 
8070
--- a/src/gcc/ada/s-osinte-rtems.adb    (.../tags/gcc_4_8_3_release)
 
8071
+++ b/src/gcc/ada/s-osinte-rtems.adb    (.../branches/gcc-4_8-branch)
 
8072
@@ -22,7 +22,7 @@
 
8073
 -- You should have received a copy of the GNU General Public License and    --
 
8074
 -- a copy of the GCC Runtime Library Exception along with this program;     --
 
8075
 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
8076
--- <http://www.gnu.org/licenses/>.                                         
 
8077
+-- <http://www.gnu.org/licenses/>.                                          --
 
8078
 --                                                                          --
 
8079
 -- GNARL was developed by the GNARL team at Florida State University. It is --
 
8080
 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
 
8081
Index: gcc/ada/gsocket.h
 
8082
===================================================================
 
8083
--- a/src/gcc/ada/gsocket.h     (.../tags/gcc_4_8_3_release)
 
8084
+++ b/src/gcc/ada/gsocket.h     (.../branches/gcc-4_8-branch)
 
8085
@@ -183,6 +183,11 @@
 
8086
 #include <sys/time.h>
 
8087
 #endif
 
8088
 
 
8089
+#if defined(__rtems__)
 
8090
+#include <unistd.h>
 
8091
+/* Required, for read(), write(), and close() */
 
8092
+#endif
 
8093
+
 
8094
 /*
 
8095
  * RTEMS has these .h files but not until you have built and installed RTEMS.
 
8096
  * When building a C/C++ toolset, you also build the newlib C library, so the
 
8097
Index: gcc/ada/back_end.adb
 
8098
===================================================================
 
8099
--- a/src/gcc/ada/back_end.adb  (.../tags/gcc_4_8_3_release)
 
8100
+++ b/src/gcc/ada/back_end.adb  (.../branches/gcc-4_8-branch)
 
8101
@@ -209,9 +209,10 @@
 
8102
          Last  : constant Natural  := Switch_Last (Switch_Chars);
 
8103
 
 
8104
       begin
 
8105
-         --  Skip -o or internal GCC switches together with their argument
 
8106
+         --  Skip -o, -G or internal GCC switches together with their argument.
 
8107
 
 
8108
          if Switch_Chars (First .. Last) = "o"
 
8109
+           or else Switch_Chars (First .. Last) = "G"
 
8110
            or else Is_Internal_GCC_Switch (Switch_Chars)
 
8111
          then
 
8112
             Next_Arg := Next_Arg + 1;
 
8113
Index: gcc/tree-ssa-ifcombine.c
 
8114
===================================================================
 
8115
--- a/src/gcc/tree-ssa-ifcombine.c      (.../tags/gcc_4_8_3_release)
 
8116
+++ b/src/gcc/tree-ssa-ifcombine.c      (.../branches/gcc-4_8-branch)
 
8117
@@ -105,7 +105,11 @@
 
8118
     {
 
8119
       gimple stmt = gsi_stmt (gsi);
 
8120
 
 
8121
+      if (is_gimple_debug (stmt))
 
8122
+       continue;
 
8123
+
 
8124
       if (gimple_has_side_effects (stmt)
 
8125
+         || gimple_could_trap_p (stmt)
 
8126
          || gimple_vuse (stmt))
 
8127
        return false;
 
8128
     }
 
8129
@@ -197,7 +201,8 @@
 
8130
       while (is_gimple_assign (stmt)
 
8131
             && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
 
8132
                  && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
 
8133
-                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
 
8134
+                     <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
 
8135
+                 && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
 
8136
                 || gimple_assign_ssa_name_copy_p (stmt)))
 
8137
        stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
 
8138
 
 
8139
Index: gcc/sel-sched-ir.c
 
8140
===================================================================
 
8141
--- a/src/gcc/sel-sched-ir.c    (.../tags/gcc_4_8_3_release)
 
8142
+++ b/src/gcc/sel-sched-ir.c    (.../branches/gcc-4_8-branch)
 
8143
@@ -162,7 +162,7 @@
 
8144
 static void free_av_set (basic_block);
 
8145
 static void invalidate_av_set (basic_block);
 
8146
 static void extend_insn_data (void);
 
8147
-static void sel_init_new_insn (insn_t, int);
 
8148
+static void sel_init_new_insn (insn_t, int, int = -1);
 
8149
 static void finish_insns (void);
 
8150
 
 
8151
 /* Various list functions.  */
 
8152
@@ -4011,9 +4011,10 @@
 
8153
   return seqno;
 
8154
 }
 
8155
 
 
8156
-/* Compute seqno for INSN by its preds or succs.  */
 
8157
+/* Compute seqno for INSN by its preds or succs.  Use OLD_SEQNO to compute
 
8158
+   seqno in corner cases.  */
 
8159
 static int
 
8160
-get_seqno_for_a_jump (insn_t insn)
 
8161
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
 
8162
 {
 
8163
   int seqno;
 
8164
 
 
8165
@@ -4069,8 +4070,16 @@
 
8166
   if (seqno < 0)
 
8167
     seqno = get_seqno_by_succs (insn);
 
8168
 
 
8169
+  if (seqno < 0)
 
8170
+    {
 
8171
+      /* The only case where this could be here legally is that the only
 
8172
+        unscheduled insn was a conditional jump that got removed and turned
 
8173
+        into this unconditional one.  Initialize from the old seqno
 
8174
+        of that jump passed down to here.  */
 
8175
+      seqno = old_seqno;
 
8176
+    }
 
8177
+
 
8178
   gcc_assert (seqno >= 0);
 
8179
-
 
8180
   return seqno;
 
8181
 }
 
8182
 
 
8183
@@ -4250,22 +4259,24 @@
 
8184
 }
 
8185
 
 
8186
 /* This is used to initialize spurious jumps generated by
 
8187
-   sel_redirect_edge ().  */
 
8188
+   sel_redirect_edge ().  OLD_SEQNO is used for initializing seqnos
 
8189
+   in corner cases within get_seqno_for_a_jump.  */
 
8190
 static void
 
8191
-init_simplejump_data (insn_t insn)
 
8192
+init_simplejump_data (insn_t insn, int old_seqno)
 
8193
 {
 
8194
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
 
8195
             REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
 
8196
             vNULL, true, false, false,
 
8197
             false, true);
 
8198
-  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
 
8199
+  INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
 
8200
   init_first_time_insn_data (insn);
 
8201
 }
 
8202
 
 
8203
 /* Perform deferred initialization of insns.  This is used to process
 
8204
-   a new jump that may be created by redirect_edge.  */
 
8205
-void
 
8206
-sel_init_new_insn (insn_t insn, int flags)
 
8207
+   a new jump that may be created by redirect_edge.  OLD_SEQNO is used
 
8208
+   for initializing simplejumps in init_simplejump_data.  */
 
8209
+static void
 
8210
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
 
8211
 {
 
8212
   /* We create data structures for bb when the first insn is emitted in it.  */
 
8213
   if (INSN_P (insn)
 
8214
@@ -4292,7 +4303,7 @@
 
8215
   if (flags & INSN_INIT_TODO_SIMPLEJUMP)
 
8216
     {
 
8217
       extend_insn_data ();
 
8218
-      init_simplejump_data (insn);
 
8219
+      init_simplejump_data (insn, old_seqno);
 
8220
     }
 
8221
 
 
8222
   gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
 
8223
@@ -5578,8 +5589,7 @@
 
8224
 }
 
8225
 
 
8226
 /* A wrapper for redirect_edge_and_branch_force, which also initializes
 
8227
-   data structures for possibly created bb and insns.  Returns the newly
 
8228
-   added bb or NULL, when a bb was not needed.  */
 
8229
+   data structures for possibly created bb and insns.  */
 
8230
 void
 
8231
 sel_redirect_edge_and_branch_force (edge e, basic_block to)
 
8232
 {
 
8233
@@ -5586,6 +5596,7 @@
 
8234
   basic_block jump_bb, src, orig_dest = e->dest;
 
8235
   int prev_max_uid;
 
8236
   rtx jump;
 
8237
+  int old_seqno = -1;
 
8238
 
 
8239
   /* This function is now used only for bookkeeping code creation, where
 
8240
      we'll never get the single pred of orig_dest block and thus will not
 
8241
@@ -5594,8 +5605,13 @@
 
8242
               && !single_pred_p (orig_dest));
 
8243
   src = e->src;
 
8244
   prev_max_uid = get_max_uid ();
 
8245
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
8246
+     when the conditional jump being redirected may become unconditional.  */
 
8247
+  if (any_condjump_p (BB_END (src))
 
8248
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
8249
+    old_seqno = INSN_SEQNO (BB_END (src));
 
8250
+
 
8251
   jump_bb = redirect_edge_and_branch_force (e, to);
 
8252
-
 
8253
   if (jump_bb != NULL)
 
8254
     sel_add_bb (jump_bb);
 
8255
 
 
8256
@@ -5607,7 +5623,8 @@
 
8257
 
 
8258
   jump = find_new_jump (src, jump_bb, prev_max_uid);
 
8259
   if (jump)
 
8260
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
8261
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
 
8262
+                      old_seqno);
 
8263
   set_immediate_dominator (CDI_DOMINATORS, to,
 
8264
                           recompute_dominator (CDI_DOMINATORS, to));
 
8265
   set_immediate_dominator (CDI_DOMINATORS, orig_dest,
 
8266
@@ -5626,6 +5643,7 @@
 
8267
   edge redirected;
 
8268
   bool recompute_toporder_p = false;
 
8269
   bool maybe_unreachable = single_pred_p (orig_dest);
 
8270
+  int old_seqno = -1;
 
8271
 
 
8272
   latch_edge_p = (pipelining_p
 
8273
                   && current_loop_nest
 
8274
@@ -5634,6 +5652,12 @@
 
8275
   src = e->src;
 
8276
   prev_max_uid = get_max_uid ();
 
8277
 
 
8278
+  /* Compute and pass old_seqno down to sel_init_new_insn only for the case
 
8279
+     when the conditional jump being redirected may become unconditional.  */
 
8280
+  if (any_condjump_p (BB_END (src))
 
8281
+      && INSN_SEQNO (BB_END (src)) >= 0)
 
8282
+    old_seqno = INSN_SEQNO (BB_END (src));
 
8283
+
 
8284
   redirected = redirect_edge_and_branch (e, to);
 
8285
 
 
8286
   gcc_assert (redirected && !last_added_blocks.exists ());
 
8287
@@ -5654,7 +5678,7 @@
 
8288
 
 
8289
   jump = find_new_jump (src, NULL, prev_max_uid);
 
8290
   if (jump)
 
8291
-    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
 
8292
+    sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
 
8293
 
 
8294
   /* Only update dominator info when we don't have unreachable blocks.
 
8295
      Otherwise we'll update in maybe_tidy_empty_bb.  */
 
8296
Index: gcc/fortran/interface.c
 
8297
===================================================================
 
8298
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_8_3_release)
 
8299
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_8-branch)
 
8300
@@ -1923,7 +1923,7 @@
 
8301
   /* F2008, 12.5.2.5; IR F08/0073.  */
 
8302
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
 
8303
       && ((CLASS_DATA (formal)->attr.class_pointer
 
8304
-          && !formal->attr.intent == INTENT_IN)
 
8305
+          && formal->attr.intent != INTENT_IN)
 
8306
           || CLASS_DATA (formal)->attr.allocatable))
 
8307
     {
 
8308
       if (actual->ts.type != BT_CLASS)
 
8309
Index: gcc/fortran/trans-expr.c
 
8310
===================================================================
 
8311
--- a/src/gcc/fortran/trans-expr.c      (.../tags/gcc_4_8_3_release)
 
8312
+++ b/src/gcc/fortran/trans-expr.c      (.../branches/gcc-4_8-branch)
 
8313
@@ -7096,7 +7096,7 @@
 
8314
 
 
8315
   res_desc = gfc_evaluate_now (desc, &se->pre);
 
8316
   gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
 
8317
-  se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
 
8318
+  se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
 
8319
 
 
8320
   /* Free the lhs after the function call and copy the result data to
 
8321
      the lhs descriptor.  */
 
8322
Index: gcc/fortran/decl.c
 
8323
===================================================================
 
8324
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_8_3_release)
 
8325
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_8-branch)
 
8326
@@ -1996,6 +1996,13 @@
 
8327
       if (gfc_notify_std (GFC_STD_GNU, "Old-style "
 
8328
                          "initialization at %C") == FAILURE)
 
8329
        return MATCH_ERROR;
 
8330
+      else if (gfc_current_state () == COMP_DERIVED)
 
8331
+       {
 
8332
+         gfc_error ("Invalid old style initialization for derived type "
 
8333
+                    "component at %C");
 
8334
+         m = MATCH_ERROR;
 
8335
+         goto cleanup;
 
8336
+       }
 
8337
 
 
8338
       return match_old_style_init (name);
 
8339
     }
 
8340
Index: gcc/fortran/trans-openmp.c
 
8341
===================================================================
 
8342
--- a/src/gcc/fortran/trans-openmp.c    (.../tags/gcc_4_8_3_release)
 
8343
+++ b/src/gcc/fortran/trans-openmp.c    (.../branches/gcc-4_8-branch)
 
8344
@@ -115,6 +115,16 @@
 
8345
   if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
 
8346
     return OMP_CLAUSE_DEFAULT_SHARED;
 
8347
 
 
8348
+  /* These are either array or derived parameters, or vtables.
 
8349
+     In the former cases, the OpenMP standard doesn't consider them to be
 
8350
+     variables at all (they can't be redefined), but they can nevertheless appear
 
8351
+     in parallel/task regions and for default(none) purposes treat them as shared.
 
8352
+     For vtables likely the same handling is desirable.  */
 
8353
+  if (TREE_CODE (decl) == VAR_DECL
 
8354
+      && TREE_READONLY (decl)
 
8355
+      && TREE_STATIC (decl))
 
8356
+    return OMP_CLAUSE_DEFAULT_SHARED;
 
8357
+
 
8358
   return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
 
8359
 }
 
8360
 
 
8361
Index: gcc/fortran/ChangeLog
 
8362
===================================================================
 
8363
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
8364
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
 
8365
@@ -1,3 +1,63 @@
 
8366
+2014-10-10  Jakub Jelinek  <jakub@redhat.com>
 
8367
+
 
8368
+       PR fortran/59488
 
8369
+       * trans-openmp.c (gfc_omp_predetermined_sharing): Return
 
8370
+       OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
 
8371
+
 
8372
+2014-09-03  Marek Polacek  <polacek@redhat.com>
 
8373
+
 
8374
+       Backport from trunk
 
8375
+       PR fortran/62270
 
8376
+       * interface.c (compare_parameter): Fix condition.
 
8377
+
 
8378
+2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
8379
+
 
8380
+       Backport from trunk
 
8381
+       PR fortran/62214
 
8382
+       * gfortran.dg/array_assignment_5.f90:  New test.
 
8383
+
 
8384
+2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
8385
+
 
8386
+       Backport from trunk
 
8387
+       PR fortran/61999
 
8388
+       * simplify.c (gfc_simplify_dot_product): Convert types of
 
8389
+       vectors before calculating the result.
 
8390
+
 
8391
+2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
 
8392
+
 
8393
+       Backport from trunk.
 
8394
+       PR fortran/61780
 
8395
+       * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
 
8396
+       that elements are skipped. This then correctly aligns 'reverse'
 
8397
+       with the scalarizer loops.
 
8398
+
 
8399
+2014-07-08  Paul Thomas  <pault@gcc.gnu.org>
 
8400
+
 
8401
+       PR fortran/61459
 
8402
+       PR fortran/58883
 
8403
+       * trans-expr.c (fcncall_realloc_result): Use the natural type
 
8404
+       for the address expression of 'res_desc'.
 
8405
+
 
8406
+2014-07-02  Jakub Jelinek  <jakub@redhat.com>
 
8407
+           Fritz Reese  <Reese-Fritz@zai.com>
 
8408
+
 
8409
+       * decl.c (variable_decl): Reject old style initialization
 
8410
+       for derived type components.
 
8411
+
 
8412
+2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
8413
+
 
8414
+       Backport from trunk.
 
8415
+       PR fortran/45187
 
8416
+       * trans-decl.c (gfc_create_module_variable): Don't create
 
8417
+       Cray-pointee decls twice.
 
8418
+
 
8419
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
8420
+
 
8421
+       Backport from mainline
 
8422
+       PR libfortran/61310
 
8423
+       * intrinsics.texi (CTIME): Remove mention of locale-dependent
 
8424
+       behavior.
 
8425
+
 
8426
 2014-05-22  Release Manager
 
8427
 
 
8428
        * GCC 4.8.3 released.
 
8429
Index: gcc/fortran/frontend-passes.c
 
8430
===================================================================
 
8431
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
 
8432
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
 
8433
@@ -874,6 +874,10 @@
 
8434
            return true;
 
8435
          break;
 
8436
 
 
8437
+       case INTRINSIC_CONCAT:
 
8438
+         /* Do not do string concatenations.  */
 
8439
+         break;
 
8440
+
 
8441
        default:
 
8442
          /* Binary operators.  */
 
8443
          if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
 
8444
Index: gcc/fortran/trans-decl.c
 
8445
===================================================================
 
8446
--- a/src/gcc/fortran/trans-decl.c      (.../tags/gcc_4_8_3_release)
 
8447
+++ b/src/gcc/fortran/trans-decl.c      (.../branches/gcc-4_8-branch)
 
8448
@@ -4084,8 +4084,8 @@
 
8449
     }
 
8450
 
 
8451
   /* Don't generate variables from other modules. Variables from
 
8452
-     COMMONs will already have been generated.  */
 
8453
-  if (sym->attr.use_assoc || sym->attr.in_common)
 
8454
+     COMMONs and Cray pointees will already have been generated.  */
 
8455
+  if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
 
8456
     return;
 
8457
 
 
8458
   /* Equivalenced variables arrive here after creation.  */
 
8459
Index: gcc/fortran/dependency.c
 
8460
===================================================================
 
8461
--- a/src/gcc/fortran/dependency.c      (.../tags/gcc_4_8_3_release)
 
8462
+++ b/src/gcc/fortran/dependency.c      (.../branches/gcc-4_8-branch)
 
8463
@@ -1779,6 +1779,7 @@
 
8464
 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
 
8465
 {
 
8466
   int n;
 
8467
+  int m;
 
8468
   gfc_dependency fin_dep;
 
8469
   gfc_dependency this_dep;
 
8470
 
 
8471
@@ -1828,6 +1829,8 @@
 
8472
              break;
 
8473
            }
 
8474
 
 
8475
+         /* Index for the reverse array.  */
 
8476
+         m = -1;
 
8477
          for (n=0; n < lref->u.ar.dimen; n++)
 
8478
            {
 
8479
              /* Assume dependency when either of array reference is vector
 
8480
@@ -1862,31 +1865,37 @@
 
8481
                 The ability to reverse or not is set by previous conditions
 
8482
                 in this dimension.  If reversal is not activated, the
 
8483
                 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP.  */
 
8484
+
 
8485
+             /* Get the indexing right for the scalarizing loop. If this
 
8486
+                is an element, there is no corresponding loop.  */
 
8487
+             if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
 
8488
+               m++;
 
8489
+
 
8490
              if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
 
8491
                    && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
 
8492
                {
 
8493
                  /* Set reverse if backward dependence and not inhibited.  */
 
8494
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
8495
-                   reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
 
8496
-                                GFC_REVERSE_SET : reverse[n];
 
8497
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
8498
+                   reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
 
8499
+                                GFC_REVERSE_SET : reverse[m];
 
8500
 
 
8501
                  /* Set forward if forward dependence and not inhibited.  */
 
8502
-                 if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
 
8503
-                   reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
 
8504
-                                GFC_FORWARD_SET : reverse[n];
 
8505
+                 if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
 
8506
+                   reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
 
8507
+                                GFC_FORWARD_SET : reverse[m];
 
8508
 
 
8509
                  /* Flag up overlap if dependence not compatible with
 
8510
                     the overall state of the expression.  */
 
8511
-                 if (reverse && reverse[n] == GFC_REVERSE_SET
 
8512
+                 if (reverse && reverse[m] == GFC_REVERSE_SET
 
8513
                        && this_dep == GFC_DEP_FORWARD)
 
8514
                    {
 
8515
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
8516
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
8517
                      this_dep = GFC_DEP_OVERLAP;
 
8518
                    }
 
8519
-                 else if (reverse && reverse[n] == GFC_FORWARD_SET
 
8520
+                 else if (reverse && reverse[m] == GFC_FORWARD_SET
 
8521
                        && this_dep == GFC_DEP_BACKWARD)
 
8522
                    {
 
8523
-                     reverse[n] = GFC_INHIBIT_REVERSE;
 
8524
+                     reverse[m] = GFC_INHIBIT_REVERSE;
 
8525
                      this_dep = GFC_DEP_OVERLAP;
 
8526
                    }
 
8527
 
 
8528
@@ -1893,7 +1902,7 @@
 
8529
                  /* If no intention of reversing or reversing is explicitly
 
8530
                     inhibited, convert backward dependence to overlap.  */
 
8531
                  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
 
8532
-                     || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
 
8533
+                     || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
 
8534
                    this_dep = GFC_DEP_OVERLAP;
 
8535
                }
 
8536
 
 
8537
Index: gcc/fortran/simplify.c
 
8538
===================================================================
 
8539
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_8_3_release)
 
8540
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_8-branch)
 
8541
@@ -1877,6 +1877,9 @@
 
8542
 gfc_expr*
 
8543
 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
 
8544
 {
 
8545
+
 
8546
+  gfc_expr temp;
 
8547
+
 
8548
   if (!is_constant_array_expr (vector_a)
 
8549
       || !is_constant_array_expr (vector_b))
 
8550
     return NULL;
 
8551
@@ -1883,8 +1886,14 @@
 
8552
 
 
8553
   gcc_assert (vector_a->rank == 1);
 
8554
   gcc_assert (vector_b->rank == 1);
 
8555
-  gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
 
8556
 
 
8557
+  temp.expr_type = EXPR_OP;
 
8558
+  gfc_clear_ts (&temp.ts);
 
8559
+  temp.value.op.op = INTRINSIC_NONE;
 
8560
+  temp.value.op.op1 = vector_a;
 
8561
+  temp.value.op.op2 = vector_b;
 
8562
+  gfc_type_convert_binary (&temp, 1);
 
8563
+
 
8564
   return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
 
8565
 }
 
8566
 
 
8567
Index: gcc/configure.ac
 
8568
===================================================================
 
8569
--- a/src/gcc/configure.ac      (.../tags/gcc_4_8_3_release)
 
8570
+++ b/src/gcc/configure.ac      (.../branches/gcc-4_8-branch)
 
8571
@@ -3443,6 +3443,32 @@
 
8572
 AC_MSG_RESULT($gcc_cv_lto_plugin)
 
8573
 
 
8574
 case "$target" in
 
8575
+
 
8576
+  aarch64*-*-*)
 
8577
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
 
8578
+    AC_ARG_ENABLE(fix-cortex-a53-835769,
 
8579
+    [
 
8580
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
 
8581
+        [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
8582
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
 
8583
+        [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
 
8584
+    ],
 
8585
+      [
 
8586
+        case $enableval in
 
8587
+          yes)
 
8588
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
 
8589
+            ;;
 
8590
+          no)
 
8591
+            ;;
 
8592
+          *)
 
8593
+            AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
 
8594
+  Valid choices are 'yes' and 'no'.])
 
8595
+            ;;
 
8596
+
 
8597
+        esac
 
8598
+      ],
 
8599
+    [])
 
8600
+  ;;
 
8601
   # All TARGET_ABI_OSF targets.
 
8602
   alpha*-*-linux* | alpha*-*-*bsd*)
 
8603
     gcc_GAS_CHECK_FEATURE([explicit relocation support],
 
8604
Index: gcc/function.c
 
8605
===================================================================
 
8606
--- a/src/gcc/function.c        (.../tags/gcc_4_8_3_release)
 
8607
+++ b/src/gcc/function.c        (.../branches/gcc-4_8-branch)
 
8608
@@ -1354,9 +1354,13 @@
 
8609
 #define STACK_POINTER_OFFSET   0
 
8610
 #endif
 
8611
 
 
8612
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
 
8613
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
 
8614
+#endif
 
8615
+
 
8616
 /* If not defined, pick an appropriate default for the offset of dynamically
 
8617
    allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
 
8618
-   REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
8619
+   INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE.  */
 
8620
 
 
8621
 #ifndef STACK_DYNAMIC_OFFSET
 
8622
 
 
8623
@@ -1368,12 +1372,12 @@
 
8624
    `crtl->outgoing_args_size'.  Nevertheless, we must allow
 
8625
    for it when allocating stack dynamic objects.  */
 
8626
 
 
8627
-#if defined(REG_PARM_STACK_SPACE)
 
8628
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
8629
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
8630
 ((ACCUMULATE_OUTGOING_ARGS                                                   \
 
8631
   ? (crtl->outgoing_args_size                                \
 
8632
      + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
 
8633
-                                              : REG_PARM_STACK_SPACE (FNDECL))) \
 
8634
+                                              : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
 
8635
   : 0) + (STACK_POINTER_OFFSET))
 
8636
 #else
 
8637
 #define STACK_DYNAMIC_OFFSET(FNDECL)   \
 
8638
@@ -2211,8 +2215,9 @@
 
8639
 #endif
 
8640
   all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
 
8641
 
 
8642
-#ifdef REG_PARM_STACK_SPACE
 
8643
-  all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
 
8644
+#ifdef INCOMING_REG_PARM_STACK_SPACE
 
8645
+  all->reg_parm_stack_space
 
8646
+    = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
 
8647
 #endif
 
8648
 }
 
8649
 
 
8650
@@ -4518,6 +4523,7 @@
 
8651
       /* ??? This could be set on a per-function basis by the front-end
 
8652
          but is this worth the hassle?  */
 
8653
       cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
 
8654
+      cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
 
8655
     }
 
8656
 }
 
8657
 
 
8658
Index: gcc/tree-vectorizer.h
 
8659
===================================================================
 
8660
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
 
8661
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
 
8662
@@ -324,9 +324,9 @@
 
8663
 #define LOOP_VINFO_OPERANDS_SWAPPED(L)     (L)->operands_swapped
 
8664
 
 
8665
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
 
8666
-(L)->may_misalign_stmts.length () > 0
 
8667
+((L)->may_misalign_stmts.length () > 0)
 
8668
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)     \
 
8669
-(L)->may_alias_ddrs.length () > 0
 
8670
+((L)->may_alias_ddrs.length () > 0)
 
8671
 
 
8672
 #define NITERS_KNOWN_P(n)                     \
 
8673
 (host_integerp ((n),0)                        \
 
8674
@@ -931,7 +931,8 @@
 
8675
 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
 
8676
 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
 
8677
                                      tree *, gimple_stmt_iterator *,
 
8678
-                                     gimple *, bool, bool *);
 
8679
+                                     gimple *, bool, bool *,
 
8680
+                                     tree = NULL_TREE);
 
8681
 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
 
8682
 extern tree vect_create_destination_var (tree, tree);
 
8683
 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
 
8684
@@ -949,7 +950,8 @@
 
8685
 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
 
8686
 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
 
8687
 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
 
8688
-                                                  tree, struct loop *);
 
8689
+                                                 tree, struct loop *,
 
8690
+                                                 tree = NULL_TREE);
 
8691
 
 
8692
 /* In tree-vect-loop.c.  */
 
8693
 /* FORNOW: Used in tree-parloops.c.  */
 
8694
Index: gcc/stor-layout.c
 
8695
===================================================================
 
8696
--- a/src/gcc/stor-layout.c     (.../tags/gcc_4_8_3_release)
 
8697
+++ b/src/gcc/stor-layout.c     (.../branches/gcc-4_8-branch)
 
8698
@@ -234,12 +234,7 @@
 
8699
       param_type = TREE_TYPE (ref);
 
8700
       param_decl
 
8701
        = build_decl (input_location, PARM_DECL, param_name, param_type);
 
8702
-      if (targetm.calls.promote_prototypes (NULL_TREE)
 
8703
-         && INTEGRAL_TYPE_P (param_type)
 
8704
-         && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
 
8705
-       DECL_ARG_TYPE (param_decl) = integer_type_node;
 
8706
-      else
 
8707
-       DECL_ARG_TYPE (param_decl) = param_type;
 
8708
+      DECL_ARG_TYPE (param_decl) = param_type;
 
8709
       DECL_ARTIFICIAL (param_decl) = 1;
 
8710
       TREE_READONLY (param_decl) = 1;
 
8711
 
 
8712
Index: gcc/tree-vect-loop.c
 
8713
===================================================================
 
8714
--- a/src/gcc/tree-vect-loop.c  (.../tags/gcc_4_8_3_release)
 
8715
+++ b/src/gcc/tree-vect-loop.c  (.../branches/gcc-4_8-branch)
 
8716
@@ -2205,7 +2205,8 @@
 
8717
         }
 
8718
 
 
8719
       def1 = SSA_NAME_DEF_STMT (op1);
 
8720
-      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
8721
+      if (gimple_bb (def1)
 
8722
+         && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
 
8723
           && loop->inner
 
8724
           && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
 
8725
           && is_gimple_assign (def1))
 
8726
Index: gcc/tree-data-ref.c
 
8727
===================================================================
 
8728
--- a/src/gcc/tree-data-ref.c   (.../tags/gcc_4_8_3_release)
 
8729
+++ b/src/gcc/tree-data-ref.c   (.../branches/gcc-4_8-branch)
 
8730
@@ -919,7 +919,6 @@
 
8731
          ref = fold_build2_loc (EXPR_LOCATION (ref),
 
8732
                                 MEM_REF, TREE_TYPE (ref),
 
8733
                                 base, memoff);
 
8734
-         DR_UNCONSTRAINED_BASE (dr) = true;
 
8735
          access_fns.safe_push (access_fn);
 
8736
        }
 
8737
     }
 
8738
@@ -1326,14 +1325,20 @@
 
8739
        return false;
 
8740
     }
 
8741
 
 
8742
-  /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
 
8743
-     the size of the base-object.  So we cannot do any offset/overlap
 
8744
-     based analysis but have to rely on points-to information only.  */
 
8745
+  /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
 
8746
+     do not know the size of the base-object.  So we cannot do any
 
8747
+     offset/overlap based analysis but have to rely on points-to
 
8748
+     information only.  */
 
8749
   if (TREE_CODE (addr_a) == MEM_REF
 
8750
-      && DR_UNCONSTRAINED_BASE (a))
 
8751
+      && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
 
8752
     {
 
8753
-      if (TREE_CODE (addr_b) == MEM_REF
 
8754
-         && DR_UNCONSTRAINED_BASE (b))
 
8755
+      /* For true dependences we can apply TBAA.  */
 
8756
+      if (flag_strict_aliasing
 
8757
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
8758
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
8759
+                                    get_alias_set (DR_REF (b))))
 
8760
+       return false;
 
8761
+      if (TREE_CODE (addr_b) == MEM_REF)
 
8762
        return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
8763
                                       TREE_OPERAND (addr_b, 0));
 
8764
       else
 
8765
@@ -1341,9 +1346,21 @@
 
8766
                                       build_fold_addr_expr (addr_b));
 
8767
     }
 
8768
   else if (TREE_CODE (addr_b) == MEM_REF
 
8769
-          && DR_UNCONSTRAINED_BASE (b))
 
8770
-    return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
8771
-                                  TREE_OPERAND (addr_b, 0));
 
8772
+          && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
 
8773
+    {
 
8774
+      /* For true dependences we can apply TBAA.  */
 
8775
+      if (flag_strict_aliasing
 
8776
+         && DR_IS_WRITE (a) && DR_IS_READ (b)
 
8777
+         && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
 
8778
+                                    get_alias_set (DR_REF (b))))
 
8779
+       return false;
 
8780
+      if (TREE_CODE (addr_a) == MEM_REF)
 
8781
+       return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
 
8782
+                                      TREE_OPERAND (addr_b, 0));
 
8783
+      else
 
8784
+       return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
 
8785
+                                      TREE_OPERAND (addr_b, 0));
 
8786
+    }
 
8787
 
 
8788
   /* Otherwise DR_BASE_OBJECT is an access that covers the whole object
 
8789
      that is being subsetted in the loop nest.  */
 
8790
Index: gcc/tree-data-ref.h
 
8791
===================================================================
 
8792
--- a/src/gcc/tree-data-ref.h   (.../tags/gcc_4_8_3_release)
 
8793
+++ b/src/gcc/tree-data-ref.h   (.../branches/gcc-4_8-branch)
 
8794
@@ -81,10 +81,6 @@
 
8795
 
 
8796
   /* A list of chrecs.  Access functions of the indices.  */
 
8797
   vec<tree> access_fns;
 
8798
-
 
8799
-  /* Whether BASE_OBJECT is an access representing the whole object
 
8800
-     or whether the access could not be constrained.  */
 
8801
-  bool unconstrained_base;
 
8802
 };
 
8803
 
 
8804
 struct dr_alias
 
8805
@@ -195,7 +191,6 @@
 
8806
 #define DR_STMT(DR)                (DR)->stmt
 
8807
 #define DR_REF(DR)                 (DR)->ref
 
8808
 #define DR_BASE_OBJECT(DR)         (DR)->indices.base_object
 
8809
-#define DR_UNCONSTRAINED_BASE(DR)  (DR)->indices.unconstrained_base
 
8810
 #define DR_ACCESS_FNS(DR)         (DR)->indices.access_fns
 
8811
 #define DR_ACCESS_FN(DR, I)        DR_ACCESS_FNS (DR)[I]
 
8812
 #define DR_NUM_DIMENSIONS(DR)      DR_ACCESS_FNS (DR).length ()
 
8813
Index: gcc/tree-vect-data-refs.c
 
8814
===================================================================
 
8815
--- a/src/gcc/tree-vect-data-refs.c     (.../tags/gcc_4_8_3_release)
 
8816
+++ b/src/gcc/tree-vect-data-refs.c     (.../branches/gcc-4_8-branch)
 
8817
@@ -3553,6 +3553,9 @@
 
8818
            is as follows:
 
8819
            if LOOP=i_loop:     &in             (relative to i_loop)
 
8820
            if LOOP=j_loop:     &in+i*2B        (relative to j_loop)
 
8821
+   BYTE_OFFSET: Optional, defaulted to NULL.  If supplied, it is added to the
 
8822
+           initial address.  Unlike OFFSET, which is number of elements to
 
8823
+           be added, BYTE_OFFSET is measured in bytes.
 
8824
 
 
8825
    Output:
 
8826
    1. Return an SSA_NAME whose value is the address of the memory location of
 
8827
@@ -3566,7 +3569,8 @@
 
8828
 vect_create_addr_base_for_vector_ref (gimple stmt,
 
8829
                                      gimple_seq *new_stmt_list,
 
8830
                                      tree offset,
 
8831
-                                     struct loop *loop)
 
8832
+                                     struct loop *loop,
 
8833
+                                     tree byte_offset)
 
8834
 {
 
8835
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
8836
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
 
8837
@@ -3628,7 +3632,17 @@
 
8838
       base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
8839
       gimple_seq_add_seq (new_stmt_list, seq);
 
8840
     }
 
8841
+  if (byte_offset)
 
8842
+    {
 
8843
+      tree tmp = create_tmp_var (sizetype, "offset");
 
8844
 
 
8845
+      byte_offset = fold_convert (sizetype, byte_offset);
 
8846
+      base_offset = fold_build2 (PLUS_EXPR, sizetype,
 
8847
+                                base_offset, byte_offset);
 
8848
+      base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
 
8849
+      gimple_seq_add_seq (new_stmt_list, seq);
 
8850
+    }
 
8851
+
 
8852
   /* base + base_offset */
 
8853
   if (loop_vinfo)
 
8854
     addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
 
8855
@@ -3692,6 +3706,10 @@
 
8856
    5. BSI: location where the new stmts are to be placed if there is no loop
 
8857
    6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
 
8858
         pointing to the initial address.
 
8859
+   7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
 
8860
+       to the initial address accessed by the data-ref in STMT.  This is
 
8861
+       similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
 
8862
+       in bytes.
 
8863
 
 
8864
    Output:
 
8865
    1. Declare a new ptr to vector_type, and have it point to the base of the
 
8866
@@ -3705,6 +3723,8 @@
 
8867
          initial_address = &a[init];
 
8868
       if OFFSET is supplied:
 
8869
          initial_address = &a[init + OFFSET];
 
8870
+      if BYTE_OFFSET is supplied:
 
8871
+        initial_address = &a[init] + BYTE_OFFSET;
 
8872
 
 
8873
       Return the initial_address in INITIAL_ADDRESS.
 
8874
 
 
8875
@@ -3722,7 +3742,7 @@
 
8876
 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
 
8877
                          tree offset, tree *initial_address,
 
8878
                          gimple_stmt_iterator *gsi, gimple *ptr_incr,
 
8879
-                         bool only_init, bool *inv_p)
 
8880
+                         bool only_init, bool *inv_p, tree byte_offset)
 
8881
 {
 
8882
   const char *base_name;
 
8883
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
 
8884
@@ -3881,10 +3901,10 @@
 
8885
   /* (2) Calculate the initial address of the aggregate-pointer, and set
 
8886
      the aggregate-pointer to point to it before the loop.  */
 
8887
 
 
8888
-  /* Create: (&(base[init_val+offset]) in the loop preheader.  */
 
8889
+  /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader.  */
 
8890
 
 
8891
   new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
 
8892
-                                                   offset, loop);
 
8893
+                                                  offset, loop, byte_offset);
 
8894
   if (new_stmt_list)
 
8895
     {
 
8896
       if (pe)
 
8897
Index: gcc/emit-rtl.c
 
8898
===================================================================
 
8899
--- a/src/gcc/emit-rtl.c        (.../tags/gcc_4_8_3_release)
 
8900
+++ b/src/gcc/emit-rtl.c        (.../branches/gcc-4_8-branch)
 
8901
@@ -263,7 +263,7 @@
 
8902
 
 
8903
 /* Return true if the given memory attributes are equal.  */
 
8904
 
 
8905
-static bool
 
8906
+bool
 
8907
 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
 
8908
 {
 
8909
   return (p->alias == q->alias
 
8910
Index: gcc/gimple-fold.c
 
8911
===================================================================
 
8912
--- a/src/gcc/gimple-fold.c     (.../tags/gcc_4_8_3_release)
 
8913
+++ b/src/gcc/gimple-fold.c     (.../branches/gcc-4_8-branch)
 
8914
@@ -2955,8 +2955,8 @@
 
8915
      result.  */
 
8916
   if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
 
8917
       /* VIEW_CONVERT_EXPR is defined only for matching sizes.  */
 
8918
-      && operand_equal_p (TYPE_SIZE (type),
 
8919
-                         TYPE_SIZE (TREE_TYPE (ctor)), 0))
 
8920
+      && !compare_tree_int (TYPE_SIZE (type), size)
 
8921
+      && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
 
8922
     {
 
8923
       ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
 
8924
       ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
 
8925
Index: gcc/emit-rtl.h
 
8926
===================================================================
 
8927
--- a/src/gcc/emit-rtl.h        (.../tags/gcc_4_8_3_release)
 
8928
+++ b/src/gcc/emit-rtl.h        (.../branches/gcc-4_8-branch)
 
8929
@@ -20,6 +20,9 @@
 
8930
 #ifndef GCC_EMIT_RTL_H
 
8931
 #define GCC_EMIT_RTL_H
 
8932
 
 
8933
+/* Return whether two MEM_ATTRs are equal.  */
 
8934
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
 
8935
+
 
8936
 /* Set the alias set of MEM to SET.  */
 
8937
 extern void set_mem_alias_set (rtx, alias_set_type);
 
8938
 
 
8939
Index: gcc/tree-cfgcleanup.c
 
8940
===================================================================
 
8941
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
 
8942
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
 
8943
@@ -498,7 +498,20 @@
 
8944
 
 
8945
   /* First split basic block if stmt is not last.  */
 
8946
   if (stmt != gsi_stmt (gsi_last_bb (bb)))
 
8947
-    split_block (bb, stmt);
 
8948
+    {
 
8949
+      if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
 
8950
+       {
 
8951
+         /* Don't split if there are only debug stmts
 
8952
+            after stmt, that can result in -fcompare-debug
 
8953
+            failures.  Remove the debug stmts instead,
 
8954
+            they should be all unreachable anyway.  */
 
8955
+         gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
 
8956
+         for (gsi_next (&gsi); !gsi_end_p (gsi); )
 
8957
+           gsi_remove (&gsi, true);
 
8958
+       }
 
8959
+      else
 
8960
+       split_block (bb, stmt);
 
8961
+    }
 
8962
 
 
8963
   changed |= remove_fallthru_edge (bb->succs);
 
8964
 
 
8965
Index: gcc/tree-sra.c
 
8966
===================================================================
 
8967
--- a/src/gcc/tree-sra.c        (.../tags/gcc_4_8_3_release)
 
8968
+++ b/src/gcc/tree-sra.c        (.../branches/gcc-4_8-branch)
 
8969
@@ -1030,6 +1030,11 @@
 
8970
                               "component.");
 
8971
       return NULL;
 
8972
     }
 
8973
+  if (TREE_THIS_VOLATILE (expr))
 
8974
+    {
 
8975
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
 
8976
+      return NULL;
 
8977
+    }
 
8978
 
 
8979
   switch (TREE_CODE (expr))
 
8980
     {
 
8981
Index: gcc/common.opt
 
8982
===================================================================
 
8983
--- a/src/gcc/common.opt        (.../tags/gcc_4_8_3_release)
 
8984
+++ b/src/gcc/common.opt        (.../branches/gcc-4_8-branch)
 
8985
@@ -1226,6 +1226,10 @@
 
8986
 Common Report Var(flag_tm)
 
8987
 Enable support for GNU transactional memory
 
8988
 
 
8989
+fgnu-unique
 
8990
+Common Report Var(flag_gnu_unique) Init(1)
 
8991
+Use STB_GNU_UNIQUE if supported by the assembler
 
8992
+
 
8993
 floop-flatten
 
8994
 Common Ignore
 
8995
 Does nothing. Preserved for backward compatibility.
 
8996
Index: gcc/tree-vect-patterns.c
 
8997
===================================================================
 
8998
--- a/src/gcc/tree-vect-patterns.c      (.../tags/gcc_4_8_3_release)
 
8999
+++ b/src/gcc/tree-vect-patterns.c      (.../branches/gcc-4_8-branch)
 
9000
@@ -395,7 +395,7 @@
 
9001
           || !promotion)
 
9002
         return NULL;
 
9003
       oprnd00 = gimple_assign_rhs1 (def_stmt);
 
9004
-      if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
 
9005
+      if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
 
9006
                                 &promotion)
 
9007
           || !promotion)
 
9008
         return NULL;
 
9009
Index: gcc/sched-deps.c
 
9010
===================================================================
 
9011
--- a/src/gcc/sched-deps.c      (.../tags/gcc_4_8_3_release)
 
9012
+++ b/src/gcc/sched-deps.c      (.../branches/gcc-4_8-branch)
 
9013
@@ -2744,7 +2744,8 @@
 
9014
           Consider for instance a volatile asm that changes the fpu rounding
 
9015
           mode.  An insn should not be moved across this even if it only uses
 
9016
           pseudo-regs because it might give an incorrectly rounded result.  */
 
9017
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
9018
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
9019
+           && !DEBUG_INSN_P (insn))
 
9020
          reg_pending_barrier = TRUE_BARRIER;
 
9021
 
 
9022
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
 
9023
Index: gcc/tree-vect-stmts.c
 
9024
===================================================================
 
9025
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
 
9026
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
 
9027
@@ -4319,6 +4319,7 @@
 
9028
   int i, j, group_size;
 
9029
   tree msq = NULL_TREE, lsq;
 
9030
   tree offset = NULL_TREE;
 
9031
+  tree byte_offset = NULL_TREE;
 
9032
   tree realignment_token = NULL_TREE;
 
9033
   gimple phi = NULL;
 
9034
   vec<tree> dr_chain = vNULL;
 
9035
@@ -4934,7 +4935,8 @@
 
9036
       if (alignment_support_scheme == dr_explicit_realign_optimized)
 
9037
        {
 
9038
          phi = SSA_NAME_DEF_STMT (msq);
 
9039
-         offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
 
9040
+         byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
 
9041
+                                   size_one_node);
 
9042
        }
 
9043
     }
 
9044
   else
 
9045
@@ -4955,7 +4957,8 @@
 
9046
       if (j == 0)
 
9047
         dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
 
9048
                                                offset, &dummy, gsi,
 
9049
-                                               &ptr_incr, false, &inv_p);
 
9050
+                                               &ptr_incr, false, &inv_p,
 
9051
+                                               byte_offset);
 
9052
       else
 
9053
         dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
 
9054
                                       TYPE_SIZE_UNIT (aggr_type));
 
9055
Index: gcc/config.gcc
 
9056
===================================================================
 
9057
--- a/src/gcc/config.gcc        (.../tags/gcc_4_8_3_release)
 
9058
+++ b/src/gcc/config.gcc        (.../branches/gcc-4_8-branch)
 
9059
@@ -2466,7 +2466,7 @@
 
9060
        ;;
 
9061
 sparc-*-rtems*)
 
9062
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
 
9063
-       tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
 
9064
+       tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
 
9065
        ;;
 
9066
 sparc-*-linux*)
 
9067
        tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
 
9068
@@ -2992,6 +2992,9 @@
 
9069
        *-leon[3-9]*)
 
9070
          with_cpu=leon3
 
9071
          ;;
 
9072
+       *-leon[3-9]v7*)
 
9073
+         with_cpu=leon3v7
 
9074
+         ;;
 
9075
        *)
 
9076
          with_cpu="`echo ${target} | sed 's/-.*$//'`"
 
9077
          ;;
 
9078
@@ -3630,7 +3633,7 @@
 
9079
                        case ${val} in
 
9080
                        "" | sparc | sparcv9 | sparc64 \
 
9081
                        | v7 | cypress \
 
9082
-                       | v8 | supersparc | hypersparc | leon | leon3 \
 
9083
+                       | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
 
9084
                        | sparclite | f930 | f934 | sparclite86x \
 
9085
                        | sparclet | tsc701 \
 
9086
                        | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
 
9087
Index: gcc/config/alpha/elf.h
 
9088
===================================================================
 
9089
--- a/src/gcc/config/alpha/elf.h        (.../tags/gcc_4_8_3_release)
 
9090
+++ b/src/gcc/config/alpha/elf.h        (.../branches/gcc-4_8-branch)
 
9091
@@ -126,6 +126,10 @@
 
9092
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
 
9093
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
9094
 
 
9095
+/* This variable should be set to 'true' if the target ABI requires
 
9096
+   unwinding tables even when exceptions are not used.  */
 
9097
+#define TARGET_UNWIND_TABLES_DEFAULT true
 
9098
+
 
9099
 /* Select a format to encode pointers in exception handling data.  CODE
 
9100
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
 
9101
    true if the symbol may be affected by dynamic relocations.
 
9102
Index: gcc/config/alpha/alpha.c
 
9103
===================================================================
 
9104
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_8_3_release)
 
9105
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_8-branch)
 
9106
@@ -8658,6 +8658,11 @@
 
9107
                        }
 
9108
                      break;
 
9109
 
 
9110
+                   case BARRIER:
 
9111
+                     /* __builtin_unreachable can expand to no code at all,
 
9112
+                        leaving (barrier) RTXes in the instruction stream.  */
 
9113
+                     goto close_shadow_notrapb;
 
9114
+
 
9115
                    case JUMP_INSN:
 
9116
                    case CALL_INSN:
 
9117
                    case CODE_LABEL:
 
9118
@@ -8673,6 +8678,7 @@
 
9119
                  n = emit_insn_before (gen_trapb (), i);
 
9120
                  PUT_MODE (n, TImode);
 
9121
                  PUT_MODE (i, TImode);
 
9122
+               close_shadow_notrapb:
 
9123
                  trap_pending = 0;
 
9124
                  shadow.used.i = 0;
 
9125
                  shadow.used.fp = 0;
 
9126
Index: gcc/config/elfos.h
 
9127
===================================================================
 
9128
--- a/src/gcc/config/elfos.h    (.../tags/gcc_4_8_3_release)
 
9129
+++ b/src/gcc/config/elfos.h    (.../branches/gcc-4_8-branch)
 
9130
@@ -287,7 +287,7 @@
 
9131
 /* Write the extra assembler code needed to declare an object properly.  */
 
9132
 
 
9133
 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
 
9134
-#define USE_GNU_UNIQUE_OBJECT 1
 
9135
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
 
9136
 #else
 
9137
 #define USE_GNU_UNIQUE_OBJECT 0
 
9138
 #endif
 
9139
Index: gcc/config/sparc/t-rtems
 
9140
===================================================================
 
9141
--- a/src/gcc/config/sparc/t-rtems      (.../tags/gcc_4_8_3_release)
 
9142
+++ b/src/gcc/config/sparc/t-rtems      (.../branches/gcc-4_8-branch)
 
9143
@@ -17,6 +17,15 @@
 
9144
 # <http://www.gnu.org/licenses/>.
 
9145
 #
 
9146
 
 
9147
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
 
9148
-MULTILIB_DIRNAMES = soft v8 leon3
 
9149
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
 
9150
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
 
9151
 MULTILIB_MATCHES = msoft-float=mno-fpu
 
9152
+
 
9153
+MULTILIB_EXCEPTIONS = muser-mode
 
9154
+MULTILIB_EXCEPTIONS += mcpu=leon3
 
9155
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
 
9156
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
 
9157
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
 
9158
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
 
9159
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
 
9160
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
 
9161
Index: gcc/config/sparc/sparc.md
 
9162
===================================================================
 
9163
--- a/src/gcc/config/sparc/sparc.md     (.../tags/gcc_4_8_3_release)
 
9164
+++ b/src/gcc/config/sparc/sparc.md     (.../branches/gcc-4_8-branch)
 
9165
@@ -215,6 +215,7 @@
 
9166
    hypersparc,
 
9167
    leon,
 
9168
    leon3,
 
9169
+   leon3v7,
 
9170
    sparclite,
 
9171
    f930,
 
9172
    f934,
 
9173
Index: gcc/config/sparc/sparc.opt
 
9174
===================================================================
 
9175
--- a/src/gcc/config/sparc/sparc.opt    (.../tags/gcc_4_8_3_release)
 
9176
+++ b/src/gcc/config/sparc/sparc.opt    (.../branches/gcc-4_8-branch)
 
9177
@@ -153,6 +153,9 @@
 
9178
 Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
 
9179
 
 
9180
 EnumValue
 
9181
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
 
9182
+
 
9183
+EnumValue
 
9184
 Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
 
9185
 
 
9186
 EnumValue
 
9187
Index: gcc/config/sparc/sync.md
 
9188
===================================================================
 
9189
--- a/src/gcc/config/sparc/sync.md      (.../tags/gcc_4_8_3_release)
 
9190
+++ b/src/gcc/config/sparc/sync.md      (.../branches/gcc-4_8-branch)
 
9191
@@ -64,11 +64,19 @@
 
9192
   "stbar"
 
9193
   [(set_attr "type" "multi")])
 
9194
 
 
9195
+;; For LEON3, STB has the effect of membar #StoreLoad.
 
9196
+(define_insn "*membar_storeload_leon3"
 
9197
+  [(set (match_operand:BLK 0 "" "")
 
9198
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
9199
+  "TARGET_LEON3"
 
9200
+  "stb\t%%g0, [%%sp-1]"
 
9201
+  [(set_attr "type" "store")])
 
9202
+
 
9203
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
 
9204
 (define_insn "*membar_storeload"
 
9205
   [(set (match_operand:BLK 0 "" "")
 
9206
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
 
9207
-  "TARGET_V8"
 
9208
+  "TARGET_V8 && !TARGET_LEON3"
 
9209
   "ldstub\t[%%sp-1], %%g0"
 
9210
   [(set_attr "type" "multi")])
 
9211
 
 
9212
Index: gcc/config/sparc/sparc-opts.h
 
9213
===================================================================
 
9214
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
 
9215
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
 
9216
@@ -31,6 +31,7 @@
 
9217
   PROCESSOR_HYPERSPARC,
 
9218
   PROCESSOR_LEON,
 
9219
   PROCESSOR_LEON3,
 
9220
+  PROCESSOR_LEON3V7,
 
9221
   PROCESSOR_SPARCLITE,
 
9222
   PROCESSOR_F930,
 
9223
   PROCESSOR_F934,
 
9224
Index: gcc/config/sparc/sparc.c
 
9225
===================================================================
 
9226
--- a/src/gcc/config/sparc/sparc.c      (.../tags/gcc_4_8_3_release)
 
9227
+++ b/src/gcc/config/sparc/sparc.c      (.../branches/gcc-4_8-branch)
 
9228
@@ -1210,6 +1210,7 @@
 
9229
     { TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
 
9230
     { TARGET_CPU_leon, PROCESSOR_LEON },
 
9231
     { TARGET_CPU_leon3, PROCESSOR_LEON3 },
 
9232
+    { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
 
9233
     { TARGET_CPU_sparclite, PROCESSOR_F930 },
 
9234
     { TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
 
9235
     { TARGET_CPU_sparclet, PROCESSOR_TSC701 },
 
9236
@@ -1238,6 +1239,7 @@
 
9237
     { "hypersparc",    MASK_ISA, MASK_V8|MASK_FPU },
 
9238
     { "leon",          MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
 
9239
     { "leon3",         MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
 
9240
+    { "leon3v7",       MASK_ISA, MASK_LEON3|MASK_FPU },
 
9241
     { "sparclite",     MASK_ISA, MASK_SPARCLITE },
 
9242
     /* The Fujitsu MB86930 is the original sparclite chip, with no FPU.  */
 
9243
     { "f930",          MASK_ISA|MASK_FPU, MASK_SPARCLITE },
 
9244
@@ -1490,6 +1492,7 @@
 
9245
       sparc_costs = &leon_costs;
 
9246
       break;
 
9247
     case PROCESSOR_LEON3:
 
9248
+    case PROCESSOR_LEON3V7:
 
9249
       sparc_costs = &leon3_costs;
 
9250
       break;
 
9251
     case PROCESSOR_SPARCLET:
 
9252
Index: gcc/config/sparc/leon.md
 
9253
===================================================================
 
9254
--- a/src/gcc/config/sparc/leon.md      (.../tags/gcc_4_8_3_release)
 
9255
+++ b/src/gcc/config/sparc/leon.md      (.../branches/gcc-4_8-branch)
 
9256
@@ -29,11 +29,11 @@
 
9257
 
 
9258
 ;; Use a double reservation to work around the load pipeline hazard on UT699.
 
9259
 (define_insn_reservation "leon3_load" 1
 
9260
-  (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
 
9261
+  (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
 
9262
   "leon_memory*2")
 
9263
 
 
9264
 (define_insn_reservation "leon_store" 2
 
9265
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
 
9266
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
 
9267
   "leon_memory*2")
 
9268
 
 
9269
 ;; This describes Gaisler Research's FPU
 
9270
@@ -44,21 +44,21 @@
 
9271
 (define_cpu_unit "grfpu_ds" "grfpu")
 
9272
 
 
9273
 (define_insn_reservation "leon_fp_alu" 4
 
9274
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
 
9275
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
 
9276
   "grfpu_alu, nothing*3")
 
9277
 
 
9278
 (define_insn_reservation "leon_fp_divs" 16
 
9279
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
 
9280
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
 
9281
   "grfpu_ds*14, nothing*2")
 
9282
 
 
9283
 (define_insn_reservation "leon_fp_divd" 17
 
9284
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
 
9285
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
 
9286
   "grfpu_ds*15, nothing*2")
 
9287
 
 
9288
 (define_insn_reservation "leon_fp_sqrts" 24
 
9289
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
 
9290
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
 
9291
   "grfpu_ds*22, nothing*2")
 
9292
 
 
9293
 (define_insn_reservation "leon_fp_sqrtd" 25
 
9294
-  (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
 
9295
+  (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
 
9296
   "grfpu_ds*23, nothing*2")
 
9297
Index: gcc/config/sparc/sparc.h
 
9298
===================================================================
 
9299
--- a/src/gcc/config/sparc/sparc.h      (.../tags/gcc_4_8_3_release)
 
9300
+++ b/src/gcc/config/sparc/sparc.h      (.../branches/gcc-4_8-branch)
 
9301
@@ -137,21 +137,22 @@
 
9302
 #define TARGET_CPU_hypersparc  3
 
9303
 #define TARGET_CPU_leon                4
 
9304
 #define TARGET_CPU_leon3       5
 
9305
-#define TARGET_CPU_sparclite   6
 
9306
-#define TARGET_CPU_f930                6       /* alias */
 
9307
-#define TARGET_CPU_f934                6       /* alias */
 
9308
-#define TARGET_CPU_sparclite86x        7
 
9309
-#define TARGET_CPU_sparclet    8
 
9310
-#define TARGET_CPU_tsc701      8       /* alias */
 
9311
-#define TARGET_CPU_v9          9       /* generic v9 implementation */
 
9312
-#define TARGET_CPU_sparcv9     9       /* alias */
 
9313
-#define TARGET_CPU_sparc64     9       /* alias */
 
9314
-#define TARGET_CPU_ultrasparc  10
 
9315
-#define TARGET_CPU_ultrasparc3 11
 
9316
-#define TARGET_CPU_niagara     12
 
9317
-#define TARGET_CPU_niagara2    13
 
9318
-#define TARGET_CPU_niagara3    14
 
9319
-#define TARGET_CPU_niagara4    15
 
9320
+#define TARGET_CPU_leon3v7     6
 
9321
+#define TARGET_CPU_sparclite   7
 
9322
+#define TARGET_CPU_f930                7       /* alias */
 
9323
+#define TARGET_CPU_f934                7       /* alias */
 
9324
+#define TARGET_CPU_sparclite86x        8
 
9325
+#define TARGET_CPU_sparclet    9
 
9326
+#define TARGET_CPU_tsc701      9       /* alias */
 
9327
+#define TARGET_CPU_v9          10      /* generic v9 implementation */
 
9328
+#define TARGET_CPU_sparcv9     10      /* alias */
 
9329
+#define TARGET_CPU_sparc64     10      /* alias */
 
9330
+#define TARGET_CPU_ultrasparc  11
 
9331
+#define TARGET_CPU_ultrasparc3 12
 
9332
+#define TARGET_CPU_niagara     13
 
9333
+#define TARGET_CPU_niagara2    14
 
9334
+#define TARGET_CPU_niagara3    15
 
9335
+#define TARGET_CPU_niagara4    16
 
9336
 
 
9337
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
 
9338
  || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
 
9339
@@ -239,8 +240,13 @@
 
9340
 #define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
 
9341
 #endif
 
9342
 
 
9343
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
 
9344
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
 
9345
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
 
9346
 #endif
 
9347
 
 
9348
+#endif
 
9349
+
 
9350
 #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
 
9351
  #error Unrecognized value in TARGET_CPU_DEFAULT.
 
9352
 #endif
 
9353
@@ -285,6 +291,7 @@
 
9354
 %{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
 
9355
 %{mcpu=leon:-D__leon__ -D__sparc_v8__} \
 
9356
 %{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
 
9357
+%{mcpu=leon3v7:-D__leon__} \
 
9358
 %{mcpu=v9:-D__sparc_v9__} \
 
9359
 %{mcpu=ultrasparc:-D__sparc_v9__} \
 
9360
 %{mcpu=ultrasparc3:-D__sparc_v9__} \
 
9361
@@ -334,6 +341,7 @@
 
9362
 %{mcpu=hypersparc:-Av8} \
 
9363
 %{mcpu=leon:" AS_LEON_FLAG "} \
 
9364
 %{mcpu=leon3:" AS_LEON_FLAG "} \
 
9365
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
 
9366
 %{mv8plus:-Av8plus} \
 
9367
 %{mcpu=v9:-Av9} \
 
9368
 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
 
9369
@@ -1760,8 +1768,10 @@
 
9370
 
 
9371
 #ifdef HAVE_AS_LEON
 
9372
 #define AS_LEON_FLAG "-Aleon"
 
9373
+#define AS_LEONV7_FLAG "-Aleon"
 
9374
 #else
 
9375
 #define AS_LEON_FLAG "-Av8"
 
9376
+#define AS_LEONV7_FLAG "-Av7"
 
9377
 #endif
 
9378
 
 
9379
 /* We use gcc _mcount for profiling.  */
 
9380
Index: gcc/config/i386/i386.md
 
9381
===================================================================
 
9382
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_8_3_release)
 
9383
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_8-branch)
 
9384
@@ -5339,66 +5339,37 @@
 
9385
 
 
9386
 ;; Avoid store forwarding (partial memory) stall penalty by extending
 
9387
 ;; SImode value to DImode through XMM register instead of pushing two
 
9388
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
 
9389
-;; targets benefit from this optimization. Also note that fild
 
9390
-;; loads from memory only.
 
9391
+;; SImode values to stack. Also note that fild loads from memory only.
 
9392
 
 
9393
-(define_insn "*floatunssi<mode>2_1"
 
9394
-  [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
 
9395
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
 
9396
+  [(set (match_operand:X87MODEF 0 "register_operand" "=f")
 
9397
        (unsigned_float:X87MODEF
 
9398
-         (match_operand:SI 1 "nonimmediate_operand" "x,m")))
 
9399
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
 
9400
-   (clobber (match_scratch:SI 3 "=X,x"))]
 
9401
+         (match_operand:SI 1 "nonimmediate_operand" "rm")))
 
9402
+   (clobber (match_scratch:DI 3 "=x"))
 
9403
+   (clobber (match_operand:DI 2 "memory_operand" "=m"))]
 
9404
   "!TARGET_64BIT
 
9405
    && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9406
-   && TARGET_SSE"
 
9407
+   && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
 
9408
   "#"
 
9409
+  "&& reload_completed"
 
9410
+  [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
 
9411
+   (set (match_dup 2) (match_dup 3))
 
9412
+   (set (match_dup 0)
 
9413
+       (float:X87MODEF (match_dup 2)))]
 
9414
+  ""
 
9415
   [(set_attr "type" "multi")
 
9416
    (set_attr "mode" "<MODE>")])
 
9417
 
 
9418
-(define_split
 
9419
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
9420
-       (unsigned_float:X87MODEF
 
9421
-         (match_operand:SI 1 "register_operand")))
 
9422
-   (clobber (match_operand:DI 2 "memory_operand"))
 
9423
-   (clobber (match_scratch:SI 3))]
 
9424
-  "!TARGET_64BIT
 
9425
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9426
-   && TARGET_SSE
 
9427
-   && reload_completed"
 
9428
-  [(set (match_dup 2) (match_dup 1))
 
9429
-   (set (match_dup 0)
 
9430
-       (float:X87MODEF (match_dup 2)))]
 
9431
-  "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
 
9432
-
 
9433
-(define_split
 
9434
-  [(set (match_operand:X87MODEF 0 "register_operand")
 
9435
-       (unsigned_float:X87MODEF
 
9436
-         (match_operand:SI 1 "memory_operand")))
 
9437
-   (clobber (match_operand:DI 2 "memory_operand"))
 
9438
-   (clobber (match_scratch:SI 3))]
 
9439
-  "!TARGET_64BIT
 
9440
-   && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9441
-   && TARGET_SSE
 
9442
-   && reload_completed"
 
9443
-  [(set (match_dup 2) (match_dup 3))
 
9444
-   (set (match_dup 0)
 
9445
-       (float:X87MODEF (match_dup 2)))]
 
9446
-{
 
9447
-  emit_move_insn (operands[3], operands[1]);
 
9448
-  operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
 
9449
-})
 
9450
-
 
9451
 (define_expand "floatunssi<mode>2"
 
9452
   [(parallel
 
9453
      [(set (match_operand:X87MODEF 0 "register_operand")
 
9454
           (unsigned_float:X87MODEF
 
9455
             (match_operand:SI 1 "nonimmediate_operand")))
 
9456
-      (clobber (match_dup 2))
 
9457
-      (clobber (match_scratch:SI 3))])]
 
9458
+      (clobber (match_scratch:DI 3))
 
9459
+      (clobber (match_dup 2))])]
 
9460
   "!TARGET_64BIT
 
9461
    && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
 
9462
-       && TARGET_SSE)
 
9463
+       && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
 
9464
        || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
 
9465
 {
 
9466
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 
9467
@@ -13545,7 +13516,8 @@
 
9468
    (set (reg:CCFP FPSR_REG)
 
9469
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
9470
                     UNSPEC_C2_FLAG))]
 
9471
-  "TARGET_USE_FANCY_MATH_387"
 
9472
+  "TARGET_USE_FANCY_MATH_387
 
9473
+   && flag_finite_math_only"
 
9474
   "fprem"
 
9475
   [(set_attr "type" "fpspc")
 
9476
    (set_attr "mode" "XF")])
 
9477
@@ -13554,7 +13526,8 @@
 
9478
   [(use (match_operand:XF 0 "register_operand"))
 
9479
    (use (match_operand:XF 1 "general_operand"))
 
9480
    (use (match_operand:XF 2 "general_operand"))]
 
9481
-  "TARGET_USE_FANCY_MATH_387"
 
9482
+  "TARGET_USE_FANCY_MATH_387
 
9483
+   && flag_finite_math_only"
 
9484
 {
 
9485
   rtx label = gen_label_rtx ();
 
9486
 
 
9487
@@ -13577,7 +13550,8 @@
 
9488
   [(use (match_operand:MODEF 0 "register_operand"))
 
9489
    (use (match_operand:MODEF 1 "general_operand"))
 
9490
    (use (match_operand:MODEF 2 "general_operand"))]
 
9491
-  "TARGET_USE_FANCY_MATH_387"
 
9492
+  "TARGET_USE_FANCY_MATH_387
 
9493
+   && flag_finite_math_only"
 
9494
 {
 
9495
   rtx (*gen_truncxf) (rtx, rtx);
 
9496
 
 
9497
@@ -13616,7 +13590,8 @@
 
9498
    (set (reg:CCFP FPSR_REG)
 
9499
        (unspec:CCFP [(match_dup 2) (match_dup 3)]
 
9500
                     UNSPEC_C2_FLAG))]
 
9501
-  "TARGET_USE_FANCY_MATH_387"
 
9502
+  "TARGET_USE_FANCY_MATH_387
 
9503
+   && flag_finite_math_only"
 
9504
   "fprem1"
 
9505
   [(set_attr "type" "fpspc")
 
9506
    (set_attr "mode" "XF")])
 
9507
@@ -13625,7 +13600,8 @@
 
9508
   [(use (match_operand:XF 0 "register_operand"))
 
9509
    (use (match_operand:XF 1 "general_operand"))
 
9510
    (use (match_operand:XF 2 "general_operand"))]
 
9511
-  "TARGET_USE_FANCY_MATH_387"
 
9512
+  "TARGET_USE_FANCY_MATH_387
 
9513
+   && flag_finite_math_only"
 
9514
 {
 
9515
   rtx label = gen_label_rtx ();
 
9516
 
 
9517
@@ -13648,7 +13624,8 @@
 
9518
   [(use (match_operand:MODEF 0 "register_operand"))
 
9519
    (use (match_operand:MODEF 1 "general_operand"))
 
9520
    (use (match_operand:MODEF 2 "general_operand"))]
 
9521
-  "TARGET_USE_FANCY_MATH_387"
 
9522
+  "TARGET_USE_FANCY_MATH_387
 
9523
+   && flag_finite_math_only"
 
9524
 {
 
9525
   rtx (*gen_truncxf) (rtx, rtx);
 
9526
 
 
9527
Index: gcc/config/i386/driver-i386.c
 
9528
===================================================================
 
9529
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
 
9530
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
 
9531
@@ -713,6 +713,11 @@
 
9532
                    /* Assume Core 2.  */
 
9533
                    cpu = "core2";
 
9534
                }
 
9535
+             else if (has_longmode)
 
9536
+               /* Perhaps some emulator?  Assume x86-64, otherwise gcc
 
9537
+                  -march=native would be unusable for 64-bit compilations,
 
9538
+                  as all the CPUs below are 32-bit only.  */
 
9539
+               cpu = "x86-64";
 
9540
              else if (has_sse3)
 
9541
                /* It is Core Duo.  */
 
9542
                cpu = "pentium-m";
 
9543
Index: gcc/config/i386/i386.c
 
9544
===================================================================
 
9545
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_8_3_release)
 
9546
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_8-branch)
 
9547
@@ -13800,7 +13800,7 @@
 
9548
       if (mode == CCmode)
 
9549
        suffix = "b";
 
9550
       else if (mode == CCCmode)
 
9551
-       suffix = "c";
 
9552
+       suffix = fp ? "b" : "c";
 
9553
       else
 
9554
        gcc_unreachable ();
 
9555
       break;
 
9556
@@ -13823,9 +13823,9 @@
 
9557
       break;
 
9558
     case GEU:
 
9559
       if (mode == CCmode)
 
9560
-       suffix = fp ? "nb" : "ae";
 
9561
+       suffix = "nb";
 
9562
       else if (mode == CCCmode)
 
9563
-       suffix = "nc";
 
9564
+       suffix = fp ? "nb" : "nc";
 
9565
       else
 
9566
        gcc_unreachable ();
 
9567
       break;
 
9568
@@ -20505,7 +20505,7 @@
 
9569
          t1 = gen_reg_rtx (V32QImode);
 
9570
          t2 = gen_reg_rtx (V32QImode);
 
9571
          t3 = gen_reg_rtx (V32QImode);
 
9572
-         vt2 = GEN_INT (128);
 
9573
+         vt2 = GEN_INT (-128);
 
9574
          for (i = 0; i < 32; i++)
 
9575
            vec[i] = vt2;
 
9576
          vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
 
9577
@@ -24640,13 +24640,17 @@
 
9578
              {
 
9579
                edge e;
 
9580
                edge_iterator ei;
 
9581
-               /* Assume that region is SCC, i.e. all immediate predecessors
 
9582
-                  of non-head block are in the same region.  */
 
9583
+
 
9584
+               /* Regions are SCCs with the exception of selective
 
9585
+                  scheduling with pipelining of outer blocks enabled.
 
9586
+                  So also check that immediate predecessors of a non-head
 
9587
+                  block are in the same region.  */
 
9588
                FOR_EACH_EDGE (e, ei, bb->preds)
 
9589
                  {
 
9590
                    /* Avoid creating of loop-carried dependencies through
 
9591
-                      using topological odering in region.  */
 
9592
-                   if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
9593
+                      using topological ordering in the region.  */
 
9594
+                   if (rgn == CONTAINING_RGN (e->src->index)
 
9595
+                       && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
 
9596
                      add_dependee_for_func_arg (first_arg, e->src); 
 
9597
                  }
 
9598
              }
 
9599
@@ -38807,8 +38811,8 @@
 
9600
              op0 = gen_lowpart (V4DImode, d->op0);
 
9601
              op1 = gen_lowpart (V4DImode, d->op1);
 
9602
              rperm[0]
 
9603
-               = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
 
9604
-                          || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
 
9605
+               = GEN_INT ((d->perm[0] / (nelt / 2))
 
9606
+                          | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
 
9607
              emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
 
9608
              return true;
 
9609
            }
 
9610
Index: gcc/config/sh/sh.c
 
9611
===================================================================
 
9612
--- a/src/gcc/config/sh/sh.c    (.../tags/gcc_4_8_3_release)
 
9613
+++ b/src/gcc/config/sh/sh.c    (.../branches/gcc-4_8-branch)
 
9614
@@ -808,6 +808,12 @@
 
9615
        targetm.asm_out.aligned_op.di = NULL;
 
9616
        targetm.asm_out.unaligned_op.di = NULL;
 
9617
     }
 
9618
+
 
9619
+  /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
 
9620
+     Disable it for everything else.  */
 
9621
+  if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
 
9622
+    TARGET_USERMODE = false;
 
9623
+
 
9624
   if (TARGET_SH1)
 
9625
     {
 
9626
       if (! strcmp (sh_div_str, "call-div1"))
 
9627
@@ -3036,7 +3042,7 @@
 
9628
 struct ashl_lshr_sequence
 
9629
 {
 
9630
   char insn_count;
 
9631
-  char amount[6];
 
9632
+  signed char amount[6];
 
9633
   char clobbers_t;
 
9634
 };
 
9635
 
 
9636
Index: gcc/config/sh/sync.md
 
9637
===================================================================
 
9638
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
 
9639
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
 
9640
@@ -466,6 +466,7 @@
 
9641
    (set (mem:SI (match_dup 1))
 
9642
        (unspec:SI
 
9643
          [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
 
9644
+   (set (reg:SI T_REG) (const_int 1))
 
9645
    (clobber (reg:SI R0_REG))]
 
9646
   "TARGET_ATOMIC_HARD_LLCS
 
9647
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
9648
@@ -484,6 +485,7 @@
 
9649
    (set (mem:QIHI (match_dup 1))
 
9650
        (unspec:QIHI
 
9651
          [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
 
9652
+   (set (reg:SI T_REG) (const_int 1))
 
9653
    (clobber (reg:SI R0_REG))
 
9654
    (clobber (match_scratch:SI 3 "=&r"))
 
9655
    (clobber (match_scratch:SI 4 "=1"))]
 
9656
@@ -617,6 +619,7 @@
 
9657
          [(FETCHOP:SI (mem:SI (match_dup 1))
 
9658
             (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
9659
          UNSPEC_ATOMIC))
 
9660
+   (set (reg:SI T_REG) (const_int 1))
 
9661
    (clobber (reg:SI R0_REG))]
 
9662
   "TARGET_ATOMIC_HARD_LLCS
 
9663
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
9664
@@ -637,6 +640,7 @@
 
9665
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
 
9666
             (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
 
9667
          UNSPEC_ATOMIC))
 
9668
+   (set (reg:SI T_REG) (const_int 1))
 
9669
    (clobber (reg:SI R0_REG))
 
9670
    (clobber (match_scratch:SI 3 "=&r"))
 
9671
    (clobber (match_scratch:SI 4 "=1"))]
 
9672
@@ -784,6 +788,7 @@
 
9673
          [(not:SI (and:SI (mem:SI (match_dup 1))
 
9674
                   (match_operand:SI 2 "logical_operand" "rK08")))]
 
9675
          UNSPEC_ATOMIC))
 
9676
+   (set (reg:SI T_REG) (const_int 1))
 
9677
    (clobber (reg:SI R0_REG))]
 
9678
   "TARGET_ATOMIC_HARD_LLCS
 
9679
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
9680
@@ -805,6 +810,7 @@
 
9681
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
 
9682
                     (match_operand:QIHI 2 "logical_operand" "rK08")))]
 
9683
          UNSPEC_ATOMIC))
 
9684
+   (set (reg:SI T_REG) (const_int 1))
 
9685
    (clobber (reg:SI R0_REG))
 
9686
    (clobber (match_scratch:SI 3 "=&r"))
 
9687
    (clobber (match_scratch:SI 4 "=1"))]
 
9688
@@ -903,7 +909,7 @@
 
9689
         "      and     %0,%3"                  "\n"
 
9690
         "      not     %3,%3"                  "\n"
 
9691
         "      mov.<bwl>       %3,@%1"         "\n"
 
9692
-        "      stc     %4,sr";
 
9693
+        "      ldc     %4,sr";
 
9694
 }
 
9695
   [(set_attr "length" "20")])
 
9696
 
 
9697
@@ -960,7 +966,8 @@
 
9698
    (set (mem:SI (match_dup 1))
 
9699
        (unspec:SI
 
9700
          [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
 
9701
-         UNSPEC_ATOMIC))]
 
9702
+         UNSPEC_ATOMIC))
 
9703
+   (set (reg:SI T_REG) (const_int 1))]
 
9704
   "TARGET_ATOMIC_HARD_LLCS
 
9705
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
9706
 {
 
9707
@@ -980,6 +987,7 @@
 
9708
        (unspec:QIHI
 
9709
          [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
 
9710
          UNSPEC_ATOMIC))
 
9711
+   (set (reg:SI T_REG) (const_int 1))
 
9712
    (clobber (reg:SI R0_REG))
 
9713
    (clobber (match_scratch:SI 3 "=&r"))
 
9714
    (clobber (match_scratch:SI 4 "=1"))]
 
9715
@@ -1124,7 +1132,8 @@
 
9716
    (set (mem:SI (match_dup 1))
 
9717
        (unspec:SI
 
9718
          [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
 
9719
-         UNSPEC_ATOMIC))]
 
9720
+         UNSPEC_ATOMIC))
 
9721
+   (set (reg:SI T_REG) (const_int 1))]
 
9722
   "TARGET_ATOMIC_HARD_LLCS
 
9723
    || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
 
9724
 {
 
9725
@@ -1145,6 +1154,7 @@
 
9726
        (unspec:QIHI
 
9727
          [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
 
9728
          UNSPEC_ATOMIC))
 
9729
+   (set (reg:SI T_REG) (const_int 1))
 
9730
    (clobber (reg:SI R0_REG))
 
9731
    (clobber (match_scratch:SI 3 "=&r"))
 
9732
    (clobber (match_scratch:SI 4 "=1"))]
 
9733
@@ -1353,7 +1363,7 @@
 
9734
         "      ldc     r0,sr"          "\n"
 
9735
         "      mov.b   @%0,r0"         "\n"
 
9736
         "      mov.b   %1,@%0"         "\n"
 
9737
-        "      stc     %2,sr"          "\n"
 
9738
+        "      ldc     %2,sr"          "\n"
 
9739
         "      tst     r0,r0";
 
9740
 }
 
9741
   [(set_attr "length" "16")])
 
9742
Index: gcc/config/sh/sh.opt
 
9743
===================================================================
 
9744
--- a/src/gcc/config/sh/sh.opt  (.../tags/gcc_4_8_3_release)
 
9745
+++ b/src/gcc/config/sh/sh.opt  (.../branches/gcc-4_8-branch)
 
9746
@@ -343,7 +343,7 @@
 
9747
 Cost to assume for a multiply insn
 
9748
 
 
9749
 musermode
 
9750
-Target Report RejectNegative Var(TARGET_USERMODE)
 
9751
+Target Var(TARGET_USERMODE)
 
9752
 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
 
9753
 
 
9754
 ;; We might want to enable this by default for TARGET_HARD_SH4, because
 
9755
Index: gcc/config/microblaze/predicates.md
 
9756
===================================================================
 
9757
--- a/src/gcc/config/microblaze/predicates.md   (.../tags/gcc_4_8_3_release)
 
9758
+++ b/src/gcc/config/microblaze/predicates.md   (.../branches/gcc-4_8-branch)
 
9759
@@ -85,10 +85,6 @@
 
9760
   (ior (match_operand 0 "const_0_operand")
 
9761
        (match_operand 0 "register_operand")))
 
9762
 
 
9763
-(define_predicate "reg_or_mem_operand"
 
9764
-  (ior (match_operand 0 "memory_operand")
 
9765
-       (match_operand 0 "register_operand")))
 
9766
-
 
9767
 ;;  Return if the operand is either the PC or a label_ref.  
 
9768
 (define_special_predicate "pc_or_label_operand"
 
9769
   (ior (match_code "pc,label_ref")
 
9770
Index: gcc/config/microblaze/microblaze.md
 
9771
===================================================================
 
9772
--- a/src/gcc/config/microblaze/microblaze.md   (.../tags/gcc_4_8_3_release)
 
9773
+++ b/src/gcc/config/microblaze/microblaze.md   (.../branches/gcc-4_8-branch)
 
9774
@@ -1119,18 +1119,6 @@
 
9775
   }
 
9776
 )
 
9777
 
 
9778
-;;Load and store reverse
 
9779
-(define_insn "movsi4_rev"
 
9780
-  [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
 
9781
-        (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
 
9782
-  "TARGET_REORDER"
 
9783
-  "@
 
9784
-   lwr\t%0,%y1,r0
 
9785
-   swr\t%1,%y0,r0"
 
9786
-  [(set_attr "type"     "load,store")
 
9787
-  (set_attr "mode"      "SI")
 
9788
-  (set_attr "length"    "4,4")])
 
9789
-
 
9790
 ;; 32-bit floating point moves
 
9791
 
 
9792
 (define_expand "movsf"
 
9793
Index: gcc/config/avr/avr-fixed.md
 
9794
===================================================================
 
9795
--- a/src/gcc/config/avr/avr-fixed.md   (.../tags/gcc_4_8_3_release)
 
9796
+++ b/src/gcc/config/avr/avr-fixed.md   (.../branches/gcc-4_8-branch)
 
9797
@@ -430,8 +430,8 @@
 
9798
       }
 
9799
 
 
9800
     // Input and output of the libgcc function
 
9801
-    const unsigned int regno_in[]  = { -1, 22, 22, -1, 18 };
 
9802
-    const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
 
9803
+    const unsigned int regno_in[]  = { -1U, 22, 22, -1U, 18 };
 
9804
+    const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
 
9805
 
 
9806
     operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
9807
     operands[4] = gen_rtx_REG (<MODE>mode,  regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
 
9808
Index: gcc/config/avr/avr.md
 
9809
===================================================================
 
9810
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
 
9811
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
 
9812
@@ -367,6 +367,15 @@
 
9813
   ""
 
9814
   {
 
9815
     int i;
 
9816
+
 
9817
+    // Avoid (subreg (mem)) for non-generic address spaces below.  Because
 
9818
+    // of the poor addressing capabilities of these spaces it's better to
 
9819
+    // load them in one chunk.  And it avoids PR61443.
 
9820
+
 
9821
+    if (MEM_P (operands[0])
 
9822
+        && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
 
9823
+      operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
 
9824
+
 
9825
     for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
 
9826
       {
 
9827
         rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
 
9828
Index: gcc/config/avr/avr.h
 
9829
===================================================================
 
9830
--- a/src/gcc/config/avr/avr.h  (.../tags/gcc_4_8_3_release)
 
9831
+++ b/src/gcc/config/avr/avr.h  (.../branches/gcc-4_8-branch)
 
9832
@@ -250,18 +250,18 @@
 
9833
 #define REG_CLASS_CONTENTS {                                           \
 
9834
   {0x00000000,0x00000000},     /* NO_REGS */                           \
 
9835
   {0x00000001,0x00000000},     /* R0_REG */                            \
 
9836
-  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */                \
 
9837
-  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */                \
 
9838
-  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */                \
 
9839
+  {3u << REG_X,0x00000000},     /* POINTER_X_REGS, r26 - r27 */                \
 
9840
+  {3u << REG_Y,0x00000000},     /* POINTER_Y_REGS, r28 - r29 */                \
 
9841
+  {3u << REG_Z,0x00000000},     /* POINTER_Z_REGS, r30 - r31 */                \
 
9842
   {0x00000000,0x00000003},     /* STACK_REG, STACK */                  \
 
9843
-  {(3 << REG_Y) | (3 << REG_Z),                                                \
 
9844
+  {(3u << REG_Y) | (3u << REG_Z),                                      \
 
9845
      0x00000000},              /* BASE_POINTER_REGS, r28 - r31 */      \
 
9846
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                         \
 
9847
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z),                      \
 
9848
      0x00000000},              /* POINTER_REGS, r26 - r31 */           \
 
9849
-  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),          \
 
9850
+  {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W),      \
 
9851
      0x00000000},              /* ADDW_REGS, r24 - r31 */              \
 
9852
   {0x00ff0000,0x00000000},     /* SIMPLE_LD_REGS r16 - r23 */          \
 
9853
-  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),   \
 
9854
+  {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
 
9855
      0x00000000},      /* LD_REGS, r16 - r31 */                        \
 
9856
   {0x0000ffff,0x00000000},     /* NO_LD_REGS  r0 - r15 */              \
 
9857
   {0xffffffff,0x00000000},     /* GENERAL_REGS, r0 - r31 */            \
 
9858
Index: gcc/config/aarch64/arm_neon.h
 
9859
===================================================================
 
9860
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
 
9861
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
 
9862
@@ -13815,7 +13815,7 @@
 
9863
   int16x4_t result;
 
9864
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
 
9865
            : "=w"(result)
 
9866
-           : "w"(a), "w"(b)
 
9867
+           : "w"(a), "x"(b)
 
9868
            : /* No clobbers */);
 
9869
   return result;
 
9870
 }
 
9871
@@ -13837,7 +13837,7 @@
 
9872
   int16x8_t result;
 
9873
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
 
9874
            : "=w"(result)
 
9875
-           : "w"(a), "w"(b)
 
9876
+           : "w"(a), "x"(b)
 
9877
            : /* No clobbers */);
 
9878
   return result;
 
9879
 }
 
9880
Index: gcc/config/aarch64/aarch64.md
 
9881
===================================================================
 
9882
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
 
9883
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
 
9884
@@ -3292,6 +3292,7 @@
 
9885
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
 
9886
                   UNSPEC_TLSDESC))
 
9887
    (clobber (reg:DI LR_REGNUM))
 
9888
+   (clobber (reg:CC CC_REGNUM))
 
9889
    (clobber (match_scratch:DI 1 "=r"))]
 
9890
   "TARGET_TLS_DESC"
 
9891
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
 
9892
Index: gcc/config/aarch64/aarch64.opt
 
9893
===================================================================
 
9894
--- a/src/gcc/config/aarch64/aarch64.opt        (.../tags/gcc_4_8_3_release)
 
9895
+++ b/src/gcc/config/aarch64/aarch64.opt        (.../branches/gcc-4_8-branch)
 
9896
@@ -67,6 +67,10 @@
 
9897
 Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
 
9898
 Generate code which uses only the general registers
 
9899
 
 
9900
+mfix-cortex-a53-835769
 
9901
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
 
9902
+Workaround for ARM Cortex-A53 Erratum number 835769
 
9903
+
 
9904
 mlittle-endian
 
9905
 Target Report RejectNegative InverseMask(BIG_END)
 
9906
 Assume target CPU is configured as little endian
 
9907
Index: gcc/config/aarch64/aarch64-protos.h
 
9908
===================================================================
 
9909
--- a/src/gcc/config/aarch64/aarch64-protos.h   (.../tags/gcc_4_8_3_release)
 
9910
+++ b/src/gcc/config/aarch64/aarch64-protos.h   (.../branches/gcc-4_8-branch)
 
9911
@@ -247,6 +247,8 @@
 
9912
 
 
9913
 extern void aarch64_split_combinev16qi (rtx operands[3]);
 
9914
 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
 
9915
+extern bool aarch64_madd_needs_nop (rtx);
 
9916
+extern void aarch64_final_prescan_insn (rtx);
 
9917
 extern bool
 
9918
 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
 
9919
 
 
9920
Index: gcc/config/aarch64/aarch64.c
 
9921
===================================================================
 
9922
--- a/src/gcc/config/aarch64/aarch64.c  (.../tags/gcc_4_8_3_release)
 
9923
+++ b/src/gcc/config/aarch64/aarch64.c  (.../branches/gcc-4_8-branch)
 
9924
@@ -1201,6 +1201,7 @@
 
9925
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
 
9926
   int ncrn, nvrn, nregs;
 
9927
   bool allocate_ncrn, allocate_nvrn;
 
9928
+  HOST_WIDE_INT size;
 
9929
 
 
9930
   /* We need to do this once per argument.  */
 
9931
   if (pcum->aapcs_arg_processed)
 
9932
@@ -1208,6 +1209,11 @@
 
9933
 
 
9934
   pcum->aapcs_arg_processed = true;
 
9935
 
 
9936
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
 
9937
+  size
 
9938
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
 
9939
+                       UNITS_PER_WORD);
 
9940
+
 
9941
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
 
9942
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
 
9943
                                                 mode,
 
9944
@@ -1258,10 +1264,8 @@
 
9945
     }
 
9946
 
 
9947
   ncrn = pcum->aapcs_ncrn;
 
9948
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
 
9949
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
 
9950
+  nregs = size / UNITS_PER_WORD;
 
9951
 
 
9952
-
 
9953
   /* C6 - C9.  though the sign and zero extension semantics are
 
9954
      handled elsewhere.  This is the case where the argument fits
 
9955
      entirely general registers.  */
 
9956
@@ -1309,13 +1313,12 @@
 
9957
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
 
9958
 
 
9959
   /* The argument is passed on stack; record the needed number of words for
 
9960
-     this argument (we can re-use NREGS) and align the total size if
 
9961
-     necessary.  */
 
9962
+     this argument and align the total size if necessary.  */
 
9963
 on_stack:
 
9964
-  pcum->aapcs_stack_words = nregs;
 
9965
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
 
9966
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
 
9967
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
 
9968
-                                              16 / UNITS_PER_WORD) + 1;
 
9969
+                                              16 / UNITS_PER_WORD);
 
9970
   return;
 
9971
 }
 
9972
 
 
9973
@@ -4845,6 +4848,15 @@
 
9974
   aarch64_tune = selected_tune->core;
 
9975
   aarch64_tune_params = selected_tune->tune;
 
9976
 
 
9977
+  if (aarch64_fix_a53_err835769 == 2)
 
9978
+    {
 
9979
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
9980
+      aarch64_fix_a53_err835769 = 1;
 
9981
+#else
 
9982
+      aarch64_fix_a53_err835769 = 0;
 
9983
+#endif
 
9984
+    }
 
9985
+
 
9986
   aarch64_override_options_after_change ();
 
9987
 }
 
9988
 
 
9989
@@ -6037,6 +6049,135 @@
 
9990
   return NULL;
 
9991
 }
 
9992
 
 
9993
+
 
9994
+/* Return true iff X is a MEM rtx.  */
 
9995
+
 
9996
+static int
 
9997
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
 
9998
+{
 
9999
+  return MEM_P (*x);
 
10000
+}
 
10001
+
 
10002
+
 
10003
+/*  Return true if mem_insn contains a MEM RTX somewhere in it.  */
 
10004
+
 
10005
+static bool
 
10006
+has_memory_op (rtx mem_insn)
 
10007
+{
 
10008
+   rtx pattern = PATTERN (mem_insn);
 
10009
+   return for_each_rtx (&pattern, is_mem_p, NULL);
 
10010
+}
 
10011
+
 
10012
+
 
10013
+/* Find the first rtx before insn that will generate an assembly
 
10014
+   instruction.  */
 
10015
+
 
10016
+static rtx
 
10017
+aarch64_prev_real_insn (rtx insn)
 
10018
+{
 
10019
+  if (!insn)
 
10020
+    return NULL;
 
10021
+
 
10022
+  do
 
10023
+    {
 
10024
+      insn = prev_real_insn (insn);
 
10025
+    }
 
10026
+  while (insn && recog_memoized (insn) < 0);
 
10027
+
 
10028
+  return insn;
 
10029
+}
 
10030
+
 
10031
+/*  Return true iff t1 is the v8type of a multiply-accumulate instruction.  */
 
10032
+
 
10033
+static bool
 
10034
+is_madd_op (enum attr_v8type t1)
 
10035
+{
 
10036
+  return t1 == V8TYPE_MADD
 
10037
+         || t1 == V8TYPE_MADDL;
 
10038
+}
 
10039
+
 
10040
+
 
10041
+/* Check if there is a register dependency between a load and the insn
 
10042
+   for which we hold recog_data.  */
 
10043
+
 
10044
+static bool
 
10045
+dep_between_memop_and_curr (rtx memop)
 
10046
+{
 
10047
+  rtx load_reg;
 
10048
+  int opno;
 
10049
+
 
10050
+  gcc_assert (GET_CODE (memop) == SET);
 
10051
+
 
10052
+  if (!REG_P (SET_DEST (memop)))
 
10053
+    return false;
 
10054
+
 
10055
+  load_reg = SET_DEST (memop);
 
10056
+  for (opno = 1; opno < recog_data.n_operands; opno++)
 
10057
+    {
 
10058
+      rtx operand = recog_data.operand[opno];
 
10059
+      if (REG_P (operand)
 
10060
+          && reg_overlap_mentioned_p (load_reg, operand))
 
10061
+        return true;
 
10062
+
 
10063
+    }
 
10064
+  return false;
 
10065
+}
 
10066
+
 
10067
+
 
10068
+
 
10069
+/* When working around the Cortex-A53 erratum 835769,
 
10070
+   given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
 
10071
+   instruction and has a preceding memory instruction such that a NOP
 
10072
+   should be inserted between them.  */
 
10073
+
 
10074
+bool
 
10075
+aarch64_madd_needs_nop (rtx insn)
 
10076
+{
 
10077
+  enum attr_v8type attr_type;
 
10078
+  rtx prev;
 
10079
+  rtx body;
 
10080
+
 
10081
+  if (!aarch64_fix_a53_err835769)
 
10082
+    return false;
 
10083
+
 
10084
+  if (recog_memoized (insn) < 0)
 
10085
+    return false;
 
10086
+
 
10087
+  attr_type = get_attr_v8type (insn);
 
10088
+  if (!is_madd_op (attr_type))
 
10089
+    return false;
 
10090
+
 
10091
+  prev = aarch64_prev_real_insn (insn);
 
10092
+  /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
 
10093
+     Restore recog state to INSN to avoid state corruption.  */
 
10094
+  extract_constrain_insn_cached (insn);
 
10095
+
 
10096
+  if (!prev || !has_memory_op (prev))
 
10097
+    return false;
 
10098
+
 
10099
+  body = single_set (prev);
 
10100
+
 
10101
+  /* If the previous insn is a memory op and there is no dependency between
 
10102
+     it and the madd, emit a nop between them.  If we know it's a memop but
 
10103
+     body is NULL, return true to be safe.  */
 
10104
+  if (GET_MODE (recog_data.operand[0]) == DImode
 
10105
+      && (!body || !dep_between_memop_and_curr (body)))
 
10106
+    return true;
 
10107
+
 
10108
+  return false;
 
10109
+
 
10110
+}
 
10111
+
 
10112
+/* Implement FINAL_PRESCAN_INSN.  */
 
10113
+
 
10114
+void
 
10115
+aarch64_final_prescan_insn (rtx insn)
 
10116
+{
 
10117
+  if (aarch64_madd_needs_nop (insn))
 
10118
+    fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
 
10119
+}
 
10120
+
 
10121
+
 
10122
 /* Return the equivalent letter for size.  */
 
10123
 static unsigned char
 
10124
 sizetochar (int size)
 
10125
Index: gcc/config/aarch64/aarch64-elf-raw.h
 
10126
===================================================================
 
10127
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../tags/gcc_4_8_3_release)
 
10128
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h  (.../branches/gcc-4_8-branch)
 
10129
@@ -25,8 +25,17 @@
 
10130
 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
 
10131
 #define ENDFILE_SPEC " crtend%O%s crtn%O%s"
 
10132
 
 
10133
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
10134
+#define CA53_ERR_835769_SPEC \
 
10135
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10136
+#else
 
10137
+#define CA53_ERR_835769_SPEC \
 
10138
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10139
+#endif
 
10140
+
 
10141
 #ifndef LINK_SPEC
 
10142
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
 
10143
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
 
10144
+                  CA53_ERR_835769_SPEC
 
10145
 #endif
 
10146
 
 
10147
 #endif /* GCC_AARCH64_ELF_RAW_H */
 
10148
Index: gcc/config/aarch64/aarch64-linux.h
 
10149
===================================================================
 
10150
--- a/src/gcc/config/aarch64/aarch64-linux.h    (.../tags/gcc_4_8_3_release)
 
10151
+++ b/src/gcc/config/aarch64/aarch64-linux.h    (.../branches/gcc-4_8-branch)
 
10152
@@ -34,8 +34,17 @@
 
10153
    -X                                          \
 
10154
    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
 
10155
 
 
10156
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
 
10157
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
 
10158
+#define CA53_ERR_835769_SPEC \
 
10159
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10160
+#else
 
10161
+#define CA53_ERR_835769_SPEC \
 
10162
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
 
10163
+#endif
 
10164
 
 
10165
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
 
10166
+                  CA53_ERR_835769_SPEC
 
10167
+
 
10168
 #define TARGET_OS_CPP_BUILTINS()               \
 
10169
   do                                           \
 
10170
     {                                          \
 
10171
@@ -43,4 +52,6 @@
 
10172
     }                                          \
 
10173
   while (0)
 
10174
 
 
10175
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
10176
+
 
10177
 #endif  /* GCC_AARCH64_LINUX_H */
 
10178
Index: gcc/config/aarch64/aarch64.h
 
10179
===================================================================
 
10180
--- a/src/gcc/config/aarch64/aarch64.h  (.../tags/gcc_4_8_3_release)
 
10181
+++ b/src/gcc/config/aarch64/aarch64.h  (.../branches/gcc-4_8-branch)
 
10182
@@ -465,6 +465,18 @@
 
10183
   (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
 
10184
 #endif
 
10185
 
 
10186
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
 
10187
+   length so that conditional branching code is updated appropriately.  */
 
10188
+#define ADJUST_INSN_LENGTH(insn, length)       \
 
10189
+  do                                           \
 
10190
+    {                                          \
 
10191
+      if (aarch64_madd_needs_nop (insn))       \
 
10192
+        length += 4;                           \
 
10193
+    } while (0)
 
10194
+
 
10195
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)     \
 
10196
+    aarch64_final_prescan_insn (INSN);                 \
 
10197
+
 
10198
 /* The processor for which instructions should be scheduled.  */
 
10199
 extern enum aarch64_processor aarch64_tune;
 
10200
 
 
10201
Index: gcc/config/rs6000/constraints.md
 
10202
===================================================================
 
10203
--- a/src/gcc/config/rs6000/constraints.md      (.../tags/gcc_4_8_3_release)
 
10204
+++ b/src/gcc/config/rs6000/constraints.md      (.../branches/gcc-4_8-branch)
 
10205
@@ -65,6 +65,20 @@
 
10206
 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
 
10207
   "If -mmfpgpr was used, a floating point register or NO_REGS.")
 
10208
 
 
10209
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
 
10210
+  "Floating point register if direct moves are available, or NO_REGS.")
 
10211
+
 
10212
+;; At present, DImode is not allowed in the Altivec registers.  If in the
 
10213
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
 
10214
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
 
10215
+  "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
 
10216
+
 
10217
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
 
10218
+  "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
 
10219
+
 
10220
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
 
10221
+  "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
 
10222
+
 
10223
 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
 
10224
   "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
 
10225
 
 
10226
@@ -98,7 +112,7 @@
 
10227
   "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
 
10228
 
 
10229
 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
 
10230
-  "VSX vector register to hold scalar float values or NO_REGS.")
 
10231
+  "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
 
10232
 
 
10233
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
 
10234
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
 
10235
Index: gcc/config/rs6000/predicates.md
 
10236
===================================================================
 
10237
--- a/src/gcc/config/rs6000/predicates.md       (.../tags/gcc_4_8_3_release)
 
10238
+++ b/src/gcc/config/rs6000/predicates.md       (.../branches/gcc-4_8-branch)
 
10239
@@ -1795,7 +1795,7 @@
 
10240
 (define_predicate "fusion_gpr_mem_load"
 
10241
   (match_code "mem,sign_extend,zero_extend")
 
10242
 {
 
10243
-  rtx addr;
 
10244
+  rtx addr, base, offset;
 
10245
 
 
10246
   /* Handle sign/zero extend.  */
 
10247
   if (GET_CODE (op) == ZERO_EXTEND
 
10248
@@ -1825,24 +1825,79 @@
 
10249
     }
 
10250
 
 
10251
   addr = XEXP (op, 0);
 
10252
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
10253
+    return 0;
 
10254
+
 
10255
+  base = XEXP (addr, 0);
 
10256
+  if (!base_reg_operand (base, GET_MODE (base)))
 
10257
+    return 0;
 
10258
+
 
10259
+  offset = XEXP (addr, 1);
 
10260
+
 
10261
   if (GET_CODE (addr) == PLUS)
 
10262
+    return satisfies_constraint_I (offset);
 
10263
+
 
10264
+  else if (GET_CODE (addr) == LO_SUM)
 
10265
     {
 
10266
-      rtx base = XEXP (addr, 0);
 
10267
-      rtx offset = XEXP (addr, 1);
 
10268
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10269
+       return small_toc_ref (offset, GET_MODE (offset));
 
10270
 
 
10271
-      return (base_reg_operand (base, GET_MODE (base))
 
10272
-             && satisfies_constraint_I (offset));
 
10273
+      else if (TARGET_ELF && !TARGET_POWERPC64)
 
10274
+       return CONSTANT_P (offset);
 
10275
     }
 
10276
 
 
10277
-  else if (GET_CODE (addr) == LO_SUM)
 
10278
+  return 0;
 
10279
+})
 
10280
+
 
10281
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
 
10282
+;; memory field with both the addis and the memory offset.  Sign extension
 
10283
+;; is not handled here, since lha and lwa are not fused.
 
10284
+(define_predicate "fusion_gpr_mem_combo"
 
10285
+  (match_code "mem,zero_extend")
 
10286
+{
 
10287
+  rtx addr, base, offset;
 
10288
+
 
10289
+  /* Handle zero extend.  */
 
10290
+  if (GET_CODE (op) == ZERO_EXTEND)
 
10291
     {
 
10292
-      rtx base = XEXP (addr, 0);
 
10293
-      rtx offset = XEXP (addr, 1);
 
10294
+      op = XEXP (op, 0);
 
10295
+      mode = GET_MODE (op);
 
10296
+    }
 
10297
 
 
10298
-      if (!base_reg_operand (base, GET_MODE (base)))
 
10299
+  if (!MEM_P (op))
 
10300
+    return 0;
 
10301
+
 
10302
+  switch (mode)
 
10303
+    {
 
10304
+    case QImode:
 
10305
+    case HImode:
 
10306
+    case SImode:
 
10307
+      break;
 
10308
+
 
10309
+    case DImode:
 
10310
+      if (!TARGET_POWERPC64)
 
10311
        return 0;
 
10312
+      break;
 
10313
 
 
10314
-      else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10315
+    default:
 
10316
+      return 0;
 
10317
+    }
 
10318
+
 
10319
+  addr = XEXP (op, 0);
 
10320
+  if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
10321
+    return 0;
 
10322
+
 
10323
+  base = XEXP (addr, 0);
 
10324
+  if (!fusion_gpr_addis (base, GET_MODE (base)))
 
10325
+    return 0;
 
10326
+
 
10327
+  offset = XEXP (addr, 1);
 
10328
+  if (GET_CODE (addr) == PLUS)
 
10329
+    return satisfies_constraint_I (offset);
 
10330
+
 
10331
+  else if (GET_CODE (addr) == LO_SUM)
 
10332
+    {
 
10333
+      if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
 
10334
        return small_toc_ref (offset, GET_MODE (offset));
 
10335
 
 
10336
       else if (TARGET_ELF && !TARGET_POWERPC64)
 
10337
Index: gcc/config/rs6000/htm.md
 
10338
===================================================================
 
10339
--- a/src/gcc/config/rs6000/htm.md      (.../tags/gcc_4_8_3_release)
 
10340
+++ b/src/gcc/config/rs6000/htm.md      (.../branches/gcc-4_8-branch)
 
10341
@@ -179,7 +179,7 @@
 
10342
                             (const_int 0)]
 
10343
                            UNSPECV_HTM_TABORTWCI))
 
10344
    (set (subreg:CC (match_dup 2) 0) (match_dup 1))
 
10345
-   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
 
10346
+   (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
 
10347
    (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
 
10348
                   (and:SI (match_dup 3) (const_int 15)))
 
10349
               (clobber (scratch:CC))])]
 
10350
Index: gcc/config/rs6000/freebsd64.h
 
10351
===================================================================
 
10352
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
 
10353
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
 
10354
@@ -367,7 +367,7 @@
 
10355
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
10356
 #undef  ADJUST_FIELD_ALIGN
 
10357
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
10358
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
10359
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
10360
    ? 128                                                                \
 
10361
    : (TARGET_64BIT                                                      \
 
10362
       && TARGET_ALIGN_NATURAL == 0                                      \
 
10363
Index: gcc/config/rs6000/rs6000-protos.h
 
10364
===================================================================
 
10365
--- a/src/gcc/config/rs6000/rs6000-protos.h     (.../tags/gcc_4_8_3_release)
 
10366
+++ b/src/gcc/config/rs6000/rs6000-protos.h     (.../branches/gcc-4_8-branch)
 
10367
@@ -79,9 +79,9 @@
 
10368
 extern bool gpr_or_gpr_p (rtx, rtx);
 
10369
 extern bool direct_move_p (rtx, rtx);
 
10370
 extern bool quad_load_store_p (rtx, rtx);
 
10371
-extern bool fusion_gpr_load_p (rtx *, bool);
 
10372
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
 
10373
 extern void expand_fusion_gpr_load (rtx *);
 
10374
-extern const char *emit_fusion_gpr_load (rtx *);
 
10375
+extern const char *emit_fusion_gpr_load (rtx, rtx);
 
10376
 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
 
10377
                                                            enum reg_class);
 
10378
 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
 
10379
@@ -153,6 +153,7 @@
 
10380
 
 
10381
 #ifdef TREE_CODE
 
10382
 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
 
10383
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
 
10384
 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
 
10385
                                                     unsigned int);
 
10386
 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
 
10387
@@ -161,7 +162,7 @@
 
10388
 extern rtx rs6000_libcall_value (enum machine_mode);
 
10389
 extern rtx rs6000_va_arg (tree, tree);
 
10390
 extern int function_ok_for_sibcall (tree);
 
10391
-extern int rs6000_reg_parm_stack_space (tree);
 
10392
+extern int rs6000_reg_parm_stack_space (tree, bool);
 
10393
 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
 
10394
 extern bool rs6000_elf_in_small_data_p (const_tree);
 
10395
 #ifdef ARGS_SIZE_RTX
 
10396
Index: gcc/config/rs6000/rs6000-builtin.def
 
10397
===================================================================
 
10398
--- a/src/gcc/config/rs6000/rs6000-builtin.def  (.../tags/gcc_4_8_3_release)
 
10399
+++ b/src/gcc/config/rs6000/rs6000-builtin.def  (.../branches/gcc-4_8-branch)
 
10400
@@ -622,20 +622,13 @@
 
10401
                     | RS6000_BTC_TERNARY),                             \
 
10402
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
10403
 
 
10404
-/* Miscellaneous builtins.  */
 
10405
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE)                             \
 
10406
+/* 128-bit long double floating point builtins.  */
 
10407
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE)                          \
 
10408
   RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
10409
                    "__builtin_" NAME,                  /* NAME */      \
 
10410
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
10411
+                   (RS6000_BTM_HARD_FLOAT              /* MASK */      \
 
10412
+                    | RS6000_BTM_LDBL128),                             \
 
10413
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
10414
-                    | RS6000_BTC_UNARY),                               \
 
10415
-                   CODE_FOR_ ## ICODE)                 /* ICODE */
 
10416
-
 
10417
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE)                             \
 
10418
-  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
 
10419
-                   "__builtin_" NAME,                  /* NAME */      \
 
10420
-                   RS6000_BTM_HARD_FLOAT,              /* MASK */      \
 
10421
-                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
 
10422
                     | RS6000_BTC_BINARY),                              \
 
10423
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
10424
 
 
10425
@@ -1593,10 +1586,8 @@
 
10426
 BU_DFP_MISC_2 (PACK_TD,                "pack_dec128",          CONST,  packtd)
 
10427
 BU_DFP_MISC_2 (UNPACK_TD,      "unpack_dec128",        CONST,  unpacktd)
 
10428
 
 
10429
-BU_MISC_2 (PACK_TF,            "pack_longdouble",      CONST,  packtf)
 
10430
-BU_MISC_2 (UNPACK_TF,          "unpack_longdouble",    CONST,  unpacktf)
 
10431
-BU_MISC_1 (UNPACK_TF_0,                "longdouble_dw0",       CONST,  unpacktf_0)
 
10432
-BU_MISC_1 (UNPACK_TF_1,                "longdouble_dw1",       CONST,  unpacktf_1)
 
10433
+BU_LDBL128_2 (PACK_TF,         "pack_longdouble",      CONST,  packtf)
 
10434
+BU_LDBL128_2 (UNPACK_TF,       "unpack_longdouble",    CONST,  unpacktf)
 
10435
 
 
10436
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
 
10437
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
 
10438
Index: gcc/config/rs6000/rs6000-c.c
 
10439
===================================================================
 
10440
--- a/src/gcc/config/rs6000/rs6000-c.c  (.../tags/gcc_4_8_3_release)
 
10441
+++ b/src/gcc/config/rs6000/rs6000-c.c  (.../branches/gcc-4_8-branch)
 
10442
@@ -3265,6 +3265,8 @@
 
10443
 
 
10444
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
10445
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
 
10446
+  { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
 
10447
+    RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
 
10448
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
10449
     RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
 
10450
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
 
10451
@@ -3319,6 +3321,8 @@
 
10452
 
 
10453
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
10454
     RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
 
10455
+  { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
 
10456
+    RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
 
10457
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
10458
     RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
 
10459
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
 
10460
@@ -4126,7 +4130,8 @@
 
10461
      argument) is reversed.  Patch the arguments here before building
 
10462
      the resolved CALL_EXPR.  */
 
10463
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
 
10464
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
 
10465
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
 
10466
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
 
10467
     {
 
10468
       tree t;
 
10469
       t = args[2], args[2] = args[1], args[1] = t;
 
10470
@@ -4184,6 +4189,14 @@
 
10471
   if (TARGET_DEBUG_BUILTIN)
 
10472
     fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
 
10473
             (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 
10474
 
10475
+  /* vec_lvsl and vec_lvsr are deprecated for use with LE element order.  */
 
10476
+  if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
 
10477
+    warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
 
10478
+assignment for unaligned loads and stores");
 
10479
+  else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
 
10480
+    warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
 
10481
+assignment for unaligned loads and stores");
 
10482
 
 
10483
   /* For now treat vec_splats and vec_promote as the same.  */
 
10484
   if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
 
10485
Index: gcc/config/rs6000/linux64.h
 
10486
===================================================================
 
10487
--- a/src/gcc/config/rs6000/linux64.h   (.../tags/gcc_4_8_3_release)
 
10488
+++ b/src/gcc/config/rs6000/linux64.h   (.../branches/gcc-4_8-branch)
 
10489
@@ -246,7 +246,7 @@
 
10490
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 
10491
 #undef  ADJUST_FIELD_ALIGN
 
10492
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
 
10493
-  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)    \
 
10494
+  (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))           \
 
10495
    ? 128                                                               \
 
10496
    : (TARGET_64BIT                                                     \
 
10497
       && TARGET_ALIGN_NATURAL == 0                                     \
 
10498
Index: gcc/config/rs6000/rs6000.c
 
10499
===================================================================
 
10500
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_8_3_release)
 
10501
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_8-branch)
 
10502
@@ -369,6 +369,7 @@
 
10503
   enum insn_code reload_gpr_vsx;       /* INSN to move from GPR to VSX.  */
 
10504
   enum insn_code reload_vsx_gpr;       /* INSN to move from VSX to GPR.  */
 
10505
   addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks.  */
 
10506
+  bool scalar_in_vmx_p;                        /* Scalar value can go in VMX.  */
 
10507
 };
 
10508
 
 
10509
 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
 
10510
@@ -1704,8 +1705,7 @@
 
10511
      asked for it.  */
 
10512
   if (TARGET_VSX && VSX_REGNO_P (regno)
 
10513
       && (VECTOR_MEM_VSX_P (mode)
 
10514
-         || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
 
10515
-         || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
 
10516
+         || reg_addr[mode].scalar_in_vmx_p
 
10517
          || (TARGET_VSX_TIMODE && mode == TImode)
 
10518
          || (TARGET_VADDUQM && mode == V1TImode)))
 
10519
     {
 
10520
@@ -1714,12 +1714,9 @@
 
10521
 
 
10522
       if (ALTIVEC_REGNO_P (regno))
 
10523
        {
 
10524
-         if (mode == SFmode && !TARGET_UPPER_REGS_SF)
 
10525
+         if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
 
10526
            return 0;
 
10527
 
 
10528
-         if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
 
10529
-           return 0;
 
10530
-
 
10531
          return ALTIVEC_REGNO_P (last_regno);
 
10532
        }
 
10533
     }
 
10534
@@ -1897,14 +1894,16 @@
 
10535
   if (rs6000_vector_unit[m] != VECTOR_NONE
 
10536
       || rs6000_vector_mem[m] != VECTOR_NONE
 
10537
       || (reg_addr[m].reload_store != CODE_FOR_nothing)
 
10538
-      || (reg_addr[m].reload_load != CODE_FOR_nothing))
 
10539
+      || (reg_addr[m].reload_load != CODE_FOR_nothing)
 
10540
+      || reg_addr[m].scalar_in_vmx_p)
 
10541
     {
 
10542
       fprintf (stderr,
 
10543
-              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
 
10544
+              "  Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
 
10545
               rs6000_debug_vector_unit (rs6000_vector_unit[m]),
 
10546
               rs6000_debug_vector_unit (rs6000_vector_mem[m]),
 
10547
               (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
 
10548
-              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
 
10549
+              (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
 
10550
+              (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
 
10551
     }
 
10552
 
 
10553
   fputs ("\n", stderr);
 
10554
@@ -2021,6 +2020,10 @@
 
10555
           "wd reg_class = %s\n"
 
10556
           "wf reg_class = %s\n"
 
10557
           "wg reg_class = %s\n"
 
10558
+          "wh reg_class = %s\n"
 
10559
+          "wi reg_class = %s\n"
 
10560
+          "wj reg_class = %s\n"
 
10561
+          "wk reg_class = %s\n"
 
10562
           "wl reg_class = %s\n"
 
10563
           "wm reg_class = %s\n"
 
10564
           "wr reg_class = %s\n"
 
10565
@@ -2040,6 +2043,10 @@
 
10566
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
 
10567
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
 
10568
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
 
10569
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
 
10570
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
 
10571
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
 
10572
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
 
10573
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
 
10574
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
 
10575
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
 
10576
@@ -2324,6 +2331,8 @@
 
10577
 
 
10578
   for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
10579
     {
 
10580
+      enum machine_mode m2 = (enum machine_mode)m;
 
10581
+
 
10582
       /* SDmode is special in that we want to access it only via REG+REG
 
10583
         addressing on power7 and above, since we want to use the LFIWZX and
 
10584
         STFIWZX instructions to load it.  */
 
10585
@@ -2358,13 +2367,12 @@
 
10586
 
 
10587
              if (TARGET_UPDATE
 
10588
                  && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
 
10589
-                 && GET_MODE_SIZE (m) <= 8
 
10590
-                 && !VECTOR_MODE_P (m)
 
10591
-                 && !COMPLEX_MODE_P (m)
 
10592
+                 && GET_MODE_SIZE (m2) <= 8
 
10593
+                 && !VECTOR_MODE_P (m2)
 
10594
+                 && !COMPLEX_MODE_P (m2)
 
10595
                  && !indexed_only_p
 
10596
-                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
 
10597
-                 && !(m == DFmode && TARGET_UPPER_REGS_DF)
 
10598
-                 && !(m == SFmode && TARGET_UPPER_REGS_SF))
 
10599
+                 && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
 
10600
+                 && !reg_addr[m2].scalar_in_vmx_p)
 
10601
                {
 
10602
                  addr_mask |= RELOAD_REG_PRE_INCDEC;
 
10603
 
 
10604
@@ -2595,16 +2603,22 @@
 
10605
        f  - Register class to use with traditional SFmode instructions.
 
10606
        v  - Altivec register.
 
10607
        wa - Any VSX register.
 
10608
+       wc - Reserved to represent individual CR bits (used in LLVM).
 
10609
        wd - Preferred register class for V2DFmode.
 
10610
        wf - Preferred register class for V4SFmode.
 
10611
        wg - Float register for power6x move insns.
 
10612
+       wh - FP register for direct move instructions.
 
10613
+       wi - FP or VSX register to hold 64-bit integers for VSX insns.
 
10614
+       wj - FP or VSX register to hold 64-bit integers for direct moves.
 
10615
+       wk - FP or VSX register to hold 64-bit doubles for direct moves.
 
10616
        wl - Float register if we can do 32-bit signed int loads.
 
10617
        wm - VSX register for ISA 2.07 direct move operations.
 
10618
+       wn - always NO_REGS.
 
10619
        wr - GPR if 64-bit mode is permitted.
 
10620
        ws - Register class to do ISA 2.06 DF operations.
 
10621
+       wt - VSX register for TImode in VSX registers.
 
10622
        wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
 
10623
        wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
 
10624
-       wt - VSX register for TImode in VSX registers.
 
10625
        ww - Register class to do SF conversions in with VSX operations.
 
10626
        wx - Float register if we can do 32-bit int stores.
 
10627
        wy - Register class to do ISA 2.07 SF operations.
 
10628
@@ -2611,21 +2625,22 @@
 
10629
        wz - Float register if we can do 32-bit unsigned int loads.  */
 
10630
 
 
10631
   if (TARGET_HARD_FLOAT && TARGET_FPRS)
 
10632
-    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
 
10633
+    rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;      /* SFmode  */
 
10634
 
 
10635
   if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
 
10636
-    rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
 
10637
+    rs6000_constraints[RS6000_CONSTRAINT_d]  = FLOAT_REGS;     /* DFmode  */
 
10638
 
 
10639
   if (TARGET_VSX)
 
10640
     {
 
10641
       rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
 
10642
-      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
 
10643
-      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
 
10644
+      rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;     /* V2DFmode  */
 
10645
+      rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;     /* V4SFmode  */
 
10646
+      rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS;   /* DImode  */
 
10647
 
 
10648
       if (TARGET_VSX_TIMODE)
 
10649
-       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
 
10650
+       rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;    /* TImode  */
 
10651
 
 
10652
-      if (TARGET_UPPER_REGS_DF)
 
10653
+      if (TARGET_UPPER_REGS_DF)                                        /* DFmode  */
 
10654
        {
 
10655
          rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
 
10656
          rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
 
10657
@@ -2639,19 +2654,26 @@
 
10658
   if (TARGET_ALTIVEC)
 
10659
     rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
 
10660
 
 
10661
-  if (TARGET_MFPGPR)
 
10662
+  if (TARGET_MFPGPR)                                           /* DFmode  */
 
10663
     rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
 
10664
 
 
10665
   if (TARGET_LFIWAX)
 
10666
-    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
 
10667
+    rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;     /* DImode  */
 
10668
 
 
10669
   if (TARGET_DIRECT_MOVE)
 
10670
-    rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
10671
+    {
 
10672
+      rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
 
10673
+      rs6000_constraints[RS6000_CONSTRAINT_wj]                 /* DImode  */
 
10674
+       = rs6000_constraints[RS6000_CONSTRAINT_wi];
 
10675
+      rs6000_constraints[RS6000_CONSTRAINT_wk]                 /* DFmode  */
 
10676
+       = rs6000_constraints[RS6000_CONSTRAINT_ws];
 
10677
+      rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
 
10678
+    }
 
10679
 
 
10680
   if (TARGET_POWERPC64)
 
10681
     rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
 
10682
 
 
10683
-  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
 
10684
+  if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
 
10685
     {
 
10686
       rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
 
10687
       rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
 
10688
@@ -2666,10 +2688,10 @@
 
10689
     rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
 
10690
 
 
10691
   if (TARGET_STFIWX)
 
10692
-    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
 
10693
+    rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;     /* DImode  */
 
10694
 
 
10695
   if (TARGET_LFIWZX)
 
10696
-    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
 
10697
+    rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;     /* DImode  */
 
10698
 
 
10699
   /* Set up the reload helper and direct move functions.  */
 
10700
   if (TARGET_VSX || TARGET_ALTIVEC)
 
10701
@@ -2692,10 +2714,11 @@
 
10702
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_di_load;
 
10703
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
10704
            {
 
10705
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_di_store;
 
10706
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_di_load;
 
10707
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_di_store;
 
10708
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_di_load;
 
10709
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_di_store;
 
10710
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_di_load;
 
10711
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
10712
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_di_store;
 
10713
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_di_load;
 
10714
            }
 
10715
          if (TARGET_P8_VECTOR)
 
10716
            {
 
10717
@@ -2703,6 +2726,8 @@
 
10718
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_di_load;
 
10719
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_di_store;
 
10720
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_di_load;
 
10721
+             if (TARGET_UPPER_REGS_SF)
 
10722
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
10723
            }
 
10724
          if (TARGET_VSX_TIMODE)
 
10725
            {
 
10726
@@ -2759,10 +2784,11 @@
 
10727
          reg_addr[V2DFmode].reload_load   = CODE_FOR_reload_v2df_si_load;
 
10728
          if (TARGET_VSX && TARGET_UPPER_REGS_DF)
 
10729
            {
 
10730
-             reg_addr[DFmode].reload_store  = CODE_FOR_reload_df_si_store;
 
10731
-             reg_addr[DFmode].reload_load   = CODE_FOR_reload_df_si_load;
 
10732
-             reg_addr[DDmode].reload_store  = CODE_FOR_reload_dd_si_store;
 
10733
-             reg_addr[DDmode].reload_load   = CODE_FOR_reload_dd_si_load;
 
10734
+             reg_addr[DFmode].reload_store    = CODE_FOR_reload_df_si_store;
 
10735
+             reg_addr[DFmode].reload_load     = CODE_FOR_reload_df_si_load;
 
10736
+             reg_addr[DFmode].scalar_in_vmx_p = true;
 
10737
+             reg_addr[DDmode].reload_store    = CODE_FOR_reload_dd_si_store;
 
10738
+             reg_addr[DDmode].reload_load     = CODE_FOR_reload_dd_si_load;
 
10739
            }
 
10740
          if (TARGET_P8_VECTOR)
 
10741
            {
 
10742
@@ -2770,6 +2796,8 @@
 
10743
              reg_addr[SFmode].reload_load   = CODE_FOR_reload_sf_si_load;
 
10744
              reg_addr[SDmode].reload_store  = CODE_FOR_reload_sd_si_store;
 
10745
              reg_addr[SDmode].reload_load   = CODE_FOR_reload_sd_si_load;
 
10746
+             if (TARGET_UPPER_REGS_SF)
 
10747
+               reg_addr[SFmode].scalar_in_vmx_p = true;
 
10748
            }
 
10749
          if (TARGET_VSX_TIMODE)
 
10750
            {
 
10751
@@ -2810,6 +2838,7 @@
 
10752
 
 
10753
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
10754
        {
 
10755
+         enum machine_mode m2 = (enum machine_mode)m;
 
10756
          int reg_size2 = reg_size;
 
10757
 
 
10758
          /* TFmode/TDmode always takes 2 registers, even in VSX.  */
 
10759
@@ -2818,7 +2847,7 @@
 
10760
            reg_size2 = UNITS_PER_FP_WORD;
 
10761
 
 
10762
          rs6000_class_max_nregs[m][c]
 
10763
-           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
 
10764
+           = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
 
10765
        }
 
10766
     }
 
10767
 
 
10768
@@ -3014,7 +3043,8 @@
 
10769
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
 
10770
          | ((TARGET_HTM)                   ? RS6000_BTM_HTM       : 0)
 
10771
          | ((TARGET_DFP)                   ? RS6000_BTM_DFP       : 0)
 
10772
-         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0));
 
10773
+         | ((TARGET_HARD_FLOAT)            ? RS6000_BTM_HARD_FLOAT : 0)
 
10774
+         | ((TARGET_LONG_DOUBLE_128)       ? RS6000_BTM_LDBL128 : 0));
 
10775
 }
 
10776
 
 
10777
 /* Override command line options.  Mostly we process the processor type and
 
10778
@@ -5861,6 +5891,34 @@
 
10779
   return align;
 
10780
 }
 
10781
 
 
10782
+/* Previous GCC releases forced all vector types to have 16-byte alignment.  */
 
10783
+
 
10784
+bool
 
10785
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
 
10786
+{
 
10787
+  if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
 
10788
+    {
 
10789
+      if (computed != 128)
 
10790
+       {
 
10791
+         static bool warned;
 
10792
+         if (!warned && warn_psabi)
 
10793
+           {
 
10794
+             warned = true;
 
10795
+             inform (input_location,
 
10796
+                     "the layout of aggregates containing vectors with"
 
10797
+                     " %d-byte alignment will change in a future GCC release",
 
10798
+                     computed / BITS_PER_UNIT);
 
10799
+           }
 
10800
+       }
 
10801
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
10802
+        keep the special treatment of vector types, but warn if there will
 
10803
+        be differences in future GCC releases.  */
 
10804
+      return true;
 
10805
+    }
 
10806
+
 
10807
+  return false;
 
10808
+}
 
10809
+
 
10810
 /* AIX increases natural record alignment to doubleword if the first
 
10811
    field is an FP double while the FP fields remain word aligned.  */
 
10812
 
 
10813
@@ -6109,7 +6167,8 @@
 
10814
     return false;
 
10815
 
 
10816
   extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
 
10817
-  gcc_assert (extra >= 0);
 
10818
+  if (extra < 0)
 
10819
+    extra = 0;
 
10820
 
 
10821
   if (GET_CODE (addr) == LO_SUM)
 
10822
     /* For lo_sum addresses, we must allow any offset except one that
 
10823
@@ -9198,14 +9257,51 @@
 
10824
           || (type && TREE_CODE (type) == VECTOR_TYPE
 
10825
               && int_size_in_bytes (type) >= 16))
 
10826
     return 128;
 
10827
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
 
10828
-           || DEFAULT_ABI == ABI_ELFv2
 
10829
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
 
10830
-          && mode == BLKmode
 
10831
-          && type && TYPE_ALIGN (type) > 64)
 
10832
+
 
10833
+  /* Aggregate types that need > 8 byte alignment are quadword-aligned
 
10834
+     in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
 
10835
+     -mcompat-align-parm is used.  */
 
10836
+  if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
 
10837
+       || DEFAULT_ABI == ABI_ELFv2)
 
10838
+      && type && TYPE_ALIGN (type) > 64)
 
10839
+    {
 
10840
+      /* "Aggregate" means any AGGREGATE_TYPE except for single-element
 
10841
+         or homogeneous float/vector aggregates here.  We already handled
 
10842
+         vector aggregates above, but still need to check for float here. */
 
10843
+      bool aggregate_p = (AGGREGATE_TYPE_P (type)
 
10844
+                         && !SCALAR_FLOAT_MODE_P (elt_mode));
 
10845
+
 
10846
+      /* We used to check for BLKmode instead of the above aggregate type
 
10847
+        check.  Warn when this results in any difference to the ABI.  */
 
10848
+      if (aggregate_p != (mode == BLKmode))
 
10849
+       {
 
10850
+         static bool warned;
 
10851
+         if (!warned && warn_psabi)
 
10852
+           {
 
10853
+             warned = true;
 
10854
+             inform (input_location,
 
10855
+                     "the ABI of passing aggregates with %d-byte alignment"
 
10856
+                     " will change in a future GCC release",
 
10857
+                     (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
 
10858
+           }
 
10859
+       }
 
10860
+
 
10861
+      /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
 
10862
+        keep using the BLKmode check, but warn if there will be differences
 
10863
+        in future GCC releases.  */
 
10864
+      if (mode == BLKmode)
 
10865
+       return 128;
 
10866
+    }
 
10867
+
 
10868
+  /* Similar for the Darwin64 ABI.  Note that for historical reasons we
 
10869
+     implement the "aggregate type" check as a BLKmode check here; this
 
10870
+     means certain aggregate types are in fact not aligned.  */
 
10871
+  if (TARGET_MACHO && rs6000_darwin64_abi
 
10872
+      && mode == BLKmode
 
10873
+      && type && TYPE_ALIGN (type) > 64)
 
10874
     return 128;
 
10875
-  else
 
10876
-    return PARM_BOUNDARY;
 
10877
+
 
10878
+  return PARM_BOUNDARY;
 
10879
 }
 
10880
 
 
10881
 /* The offset in words to the start of the parameter save area.  */
 
10882
@@ -10243,6 +10339,7 @@
 
10883
          rtx r, off;
 
10884
          int i, k = 0;
 
10885
          unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
 
10886
+         int fpr_words;
 
10887
 
 
10888
          /* Do we also need to pass this argument in the parameter
 
10889
             save area?  */
 
10890
@@ -10271,6 +10368,37 @@
 
10891
              rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
 
10892
            }
 
10893
 
 
10894
+         /* If there were not enough FPRs to hold the argument, the rest
 
10895
+            usually goes into memory.  However, if the current position
 
10896
+            is still within the register parameter area, a portion may
 
10897
+            actually have to go into GPRs.
 
10898
+
 
10899
+            Note that it may happen that the portion of the argument
 
10900
+            passed in the first "half" of the first GPR was already
 
10901
+            passed in the last FPR as well.
 
10902
+
 
10903
+            For unnamed arguments, we already set up GPRs to cover the
 
10904
+            whole argument in rs6000_psave_function_arg, so there is
 
10905
+            nothing further to do at this point.
 
10906
+
 
10907
+            GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
 
10908
+            GCC releases.  To avoid any ABI change on the release branch,
 
10909
+            we retain that original implementation here, but warn if we
 
10910
+            encounter a case where the ABI will change in the future.  */
 
10911
+         fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
 
10912
+         if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
 
10913
+             && cum->nargs_prototype > 0)
 
10914
+            {
 
10915
+             static bool warned;
 
10916
+             if (!warned && warn_psabi)
 
10917
+               {
 
10918
+                 warned = true;
 
10919
+                 inform (input_location,
 
10920
+                         "the ABI of passing homogeneous float aggregates"
 
10921
+                         " will change in a future GCC release");
 
10922
+               }
 
10923
+           }
 
10924
+
 
10925
          return rs6000_finish_function_arg (mode, rvec, k);
 
10926
        }
 
10927
       else if (align_words < GP_ARG_NUM_REG)
 
10928
@@ -10497,10 +10625,9 @@
 
10929
    list, or passes any parameter in memory.  */
 
10930
 
 
10931
 static bool
 
10932
-rs6000_function_parms_need_stack (tree fun)
 
10933
+rs6000_function_parms_need_stack (tree fun, bool incoming)
 
10934
 {
 
10935
-  function_args_iterator args_iter;
 
10936
-  tree arg_type;
 
10937
+  tree fntype, result;
 
10938
   CUMULATIVE_ARGS args_so_far_v;
 
10939
   cumulative_args_t args_so_far;
 
10940
 
 
10941
@@ -10507,26 +10634,57 @@
 
10942
   if (!fun)
 
10943
     /* Must be a libcall, all of which only use reg parms.  */
 
10944
     return false;
 
10945
+
 
10946
+  fntype = fun;
 
10947
   if (!TYPE_P (fun))
 
10948
-    fun = TREE_TYPE (fun);
 
10949
+    fntype = TREE_TYPE (fun);
 
10950
 
 
10951
   /* Varargs functions need the parameter save area.  */
 
10952
-  if (!prototype_p (fun) || stdarg_p (fun))
 
10953
+  if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
 
10954
     return true;
 
10955
 
 
10956
-  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
 
10957
+  INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
 
10958
   args_so_far = pack_cumulative_args (&args_so_far_v);
 
10959
 
 
10960
-  if (aggregate_value_p (TREE_TYPE (fun), fun))
 
10961
+  /* When incoming, we will have been passed the function decl.
 
10962
+     It is necessary to use the decl to handle K&R style functions,
 
10963
+     where TYPE_ARG_TYPES may not be available.  */
 
10964
+  if (incoming)
 
10965
     {
 
10966
-      tree type = build_pointer_type (TREE_TYPE (fun));
 
10967
-      rs6000_parm_needs_stack (args_so_far, type);
 
10968
+      gcc_assert (DECL_P (fun));
 
10969
+      result = DECL_RESULT (fun);
 
10970
     }
 
10971
+  else
 
10972
+    result = TREE_TYPE (fntype);
 
10973
 
 
10974
-  FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
 
10975
-    if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
10976
-      return true;
 
10977
+  if (result && aggregate_value_p (result, fntype))
 
10978
+    {
 
10979
+      if (!TYPE_P (result))
 
10980
+       result = TREE_TYPE (result);
 
10981
+      result = build_pointer_type (result);
 
10982
+      rs6000_parm_needs_stack (args_so_far, result);
 
10983
+    }
 
10984
 
 
10985
+  if (incoming)
 
10986
+    {
 
10987
+      tree parm;
 
10988
+
 
10989
+      for (parm = DECL_ARGUMENTS (fun);
 
10990
+          parm && parm != void_list_node;
 
10991
+          parm = TREE_CHAIN (parm))
 
10992
+       if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
 
10993
+         return true;
 
10994
+    }
 
10995
+  else
 
10996
+    {
 
10997
+      function_args_iterator args_iter;
 
10998
+      tree arg_type;
 
10999
+
 
11000
+      FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
 
11001
+       if (rs6000_parm_needs_stack (args_so_far, arg_type))
 
11002
+         return true;
 
11003
+    }
 
11004
+
 
11005
   return false;
 
11006
 }
 
11007
 
 
11008
@@ -10537,7 +10695,7 @@
 
11009
    all parameters in registers.  */
 
11010
 
 
11011
 int
 
11012
-rs6000_reg_parm_stack_space (tree fun)
 
11013
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
 
11014
 {
 
11015
   int reg_parm_stack_space;
 
11016
 
 
11017
@@ -10555,7 +10713,7 @@
 
11018
     case ABI_ELFv2:
 
11019
       /* ??? Recomputing this every time is a bit expensive.  Is there
 
11020
         a place to cache this information?  */
 
11021
-      if (rs6000_function_parms_need_stack (fun))
 
11022
+      if (rs6000_function_parms_need_stack (fun, incoming))
 
11023
        reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
 
11024
       else
 
11025
        reg_parm_stack_space = 0;
 
11026
@@ -13544,11 +13702,15 @@
 
11027
   else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
11028
           == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
 
11029
     error ("Builtin function %s requires the -mhard-dfp and"
 
11030
-          "-mpower8-vector options", name);
 
11031
+          " -mpower8-vector options", name);
 
11032
   else if ((fnmask & RS6000_BTM_DFP) != 0)
 
11033
     error ("Builtin function %s requires the -mhard-dfp option", name);
 
11034
   else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
 
11035
     error ("Builtin function %s requires the -mpower8-vector option", name);
 
11036
+  else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
11037
+          == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
 
11038
+    error ("Builtin function %s requires the -mhard-float and"
 
11039
+          " -mlong-double-128 options", name);
 
11040
   else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
 
11041
     error ("Builtin function %s requires the -mhard-float option", name);
 
11042
   else
 
11043
@@ -13649,8 +13811,8 @@
 
11044
     case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
 
11045
     case ALTIVEC_BUILTIN_MASK_FOR_STORE:
 
11046
       {
 
11047
-       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
 
11048
-                    : (int) CODE_FOR_altivec_lvsl);
 
11049
+       int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
 
11050
+                    : (int) CODE_FOR_altivec_lvsl_direct);
 
11051
        enum machine_mode tmode = insn_data[icode].operand[0].mode;
 
11052
        enum machine_mode mode = insn_data[icode].operand[1].mode;
 
11053
        tree arg;
 
11054
@@ -13678,7 +13840,6 @@
 
11055
            || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
 
11056
          target = gen_reg_rtx (tmode);
 
11057
 
 
11058
-       /*pat = gen_altivec_lvsr (target, op);*/
 
11059
        pat = GEN_FCN (icode) (target, op);
 
11060
        if (!pat)
 
11061
          return 0;
 
11062
@@ -17099,7 +17260,14 @@
 
11063
      prefer Altivec loads..  */
 
11064
   if (rclass == VSX_REGS)
 
11065
     {
 
11066
-      if (GET_MODE_SIZE (mode) <= 8)
 
11067
+      if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
 
11068
+       {
 
11069
+         rtx addr = XEXP (x, 0);
 
11070
+         if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
 
11071
+             || legitimate_lo_sum_address_p (mode, addr, false))
 
11072
+           return FLOAT_REGS;
 
11073
+       }
 
11074
+      else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
 
11075
        return FLOAT_REGS;
 
11076
 
 
11077
       if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
 
11078
@@ -31413,6 +31581,7 @@
 
11079
   { "htm",              RS6000_BTM_HTM,        false, false },
 
11080
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
 
11081
   { "hard-float",       RS6000_BTM_HARD_FLOAT, false, false },
 
11082
+  { "long-double-128",  RS6000_BTM_LDBL128,    false, false },
 
11083
 };
 
11084
 
 
11085
 /* Option variables that we want to support inside attribute((target)) and
 
11086
@@ -32663,25 +32832,14 @@
 
11087
 
 
11088
 /* Return true if the peephole2 can combine a load involving a combination of
 
11089
    an addis instruction and a load with an offset that can be fused together on
 
11090
-   a power8.
 
11091
+   a power8.  */
 
11092
 
 
11093
-   The operands are:
 
11094
-       operands[0]     register set with addis
 
11095
-       operands[1]     value set via addis
 
11096
-       operands[2]     target register being loaded
 
11097
-       operands[3]     D-form memory reference using operands[0].
 
11098
-
 
11099
-   In addition, we are passed a boolean that is true if this is a peephole2,
 
11100
-   and we can use see if the addis_reg is dead after the insn and can be
 
11101
-   replaced by the target register.  */
 
11102
-
 
11103
 bool
 
11104
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
 
11105
+fusion_gpr_load_p (rtx addis_reg,      /* register set via addis.  */
 
11106
+                  rtx addis_value,     /* addis value.  */
 
11107
+                  rtx target,          /* target register that is loaded.  */
 
11108
+                  rtx mem)             /* bottom part of the memory addr. */
 
11109
 {
 
11110
-  rtx addis_reg = operands[0];
 
11111
-  rtx addis_value = operands[1];
 
11112
-  rtx target = operands[2];
 
11113
-  rtx mem = operands[3];
 
11114
   rtx addr;
 
11115
   rtx base_reg;
 
11116
 
 
11117
@@ -32695,9 +32853,6 @@
 
11118
   if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
 
11119
     return false;
 
11120
 
 
11121
-  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
11122
-    return false;
 
11123
-
 
11124
   /* Allow sign/zero extension.  */
 
11125
   if (GET_CODE (mem) == ZERO_EXTEND
 
11126
       || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
 
11127
@@ -32706,22 +32861,22 @@
 
11128
   if (!MEM_P (mem))
 
11129
     return false;
 
11130
 
 
11131
+  if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
 
11132
+    return false;
 
11133
+
 
11134
   addr = XEXP (mem, 0);                        /* either PLUS or LO_SUM.  */
 
11135
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11136
     return false;
 
11137
 
 
11138
   /* Validate that the register used to load the high value is either the
 
11139
-     register being loaded, or we can safely replace its use in a peephole2.
 
11140
+     register being loaded, or we can safely replace its use.
 
11141
 
 
11142
-     If this is a peephole2, we assume that there are 2 instructions in the
 
11143
-     peephole (addis and load), so we want to check if the target register was
 
11144
-     not used in the memory address and the register to hold the addis result
 
11145
-     is dead after the peephole.  */
 
11146
+     This function is only called from the peephole2 pass and we assume that
 
11147
+     there are 2 instructions in the peephole (addis and load), so we want to
 
11148
+     check if the target register was not used in the memory address and the
 
11149
+     register to hold the addis result is dead after the peephole.  */
 
11150
   if (REGNO (addis_reg) != REGNO (target))
 
11151
     {
 
11152
-      if (!peep2_p)
 
11153
-       return false;
 
11154
-
 
11155
       if (reg_mentioned_p (target, mem))
 
11156
        return false;
 
11157
 
 
11158
@@ -32762,9 +32917,6 @@
 
11159
   enum machine_mode extend_mode = target_mode;
 
11160
   enum machine_mode ptr_mode = Pmode;
 
11161
   enum rtx_code extend = UNKNOWN;
 
11162
-  rtx addis_reg = ((ptr_mode == target_mode)
 
11163
-                  ? target
 
11164
-                  : simplify_subreg (ptr_mode, target, target_mode, 0));
 
11165
 
 
11166
   if (GET_CODE (orig_mem) == ZERO_EXTEND
 
11167
       || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
 
11168
@@ -32781,13 +32933,14 @@
 
11169
   gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
 
11170
 
 
11171
   offset = XEXP (orig_addr, 1);
 
11172
-  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
 
11173
-  new_mem = change_address (orig_mem, target_mode, new_addr);
 
11174
+  new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
 
11175
+  new_mem = replace_equiv_address_nv (orig_mem, new_addr);
 
11176
 
 
11177
   if (extend != UNKNOWN)
 
11178
     new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
 
11179
 
 
11180
-  emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
 
11181
+  new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
 
11182
+                           UNSPEC_FUSION_GPR);
 
11183
   emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
 
11184
 
 
11185
   if (extend == SIGN_EXTEND)
 
11186
@@ -32806,55 +32959,40 @@
 
11187
 }
 
11188
 
 
11189
 /* Return a string to fuse an addis instruction with a gpr load to the same
 
11190
-   register that we loaded up the addis instruction.  The code is complicated,
 
11191
-   so we call output_asm_insn directly, and just return "".
 
11192
+   register that we loaded up the addis instruction.  The address that is used
 
11193
+   is the logical address that was formed during peephole2:
 
11194
+       (lo_sum (high) (low-part))
 
11195
 
 
11196
-   The operands are:
 
11197
-       operands[0]     register set with addis (must be same reg as target).
 
11198
-       operands[1]     value set via addis
 
11199
-       operands[2]     target register being loaded
 
11200
-       operands[3]     D-form memory reference using operands[0].  */
 
11201
+   The code is complicated, so we call output_asm_insn directly, and just
 
11202
+   return "".  */
 
11203
 
 
11204
 const char *
 
11205
-emit_fusion_gpr_load (rtx *operands)
 
11206
+emit_fusion_gpr_load (rtx target, rtx mem)
 
11207
 {
 
11208
-  rtx addis_reg = operands[0];
 
11209
-  rtx addis_value = operands[1];
 
11210
-  rtx target = operands[2];
 
11211
-  rtx mem = operands[3];
 
11212
+  rtx addis_value;
 
11213
   rtx fuse_ops[10];
 
11214
   rtx addr;
 
11215
   rtx load_offset;
 
11216
   const char *addis_str = NULL;
 
11217
   const char *load_str = NULL;
 
11218
-  const char *extend_insn = NULL;
 
11219
   const char *mode_name = NULL;
 
11220
   char insn_template[80];
 
11221
   enum machine_mode mode;
 
11222
   const char *comment_str = ASM_COMMENT_START;
 
11223
-  bool sign_p = false;
 
11224
 
 
11225
-  gcc_assert (REG_P (addis_reg) && REG_P (target));
 
11226
-  gcc_assert (REGNO (addis_reg) == REGNO (target));
 
11227
+  if (GET_CODE (mem) == ZERO_EXTEND)
 
11228
+    mem = XEXP (mem, 0);
 
11229
 
 
11230
+  gcc_assert (REG_P (target) && MEM_P (mem));
 
11231
+
 
11232
   if (*comment_str == ' ')
 
11233
     comment_str++;
 
11234
 
 
11235
-  /* Allow sign/zero extension.  */
 
11236
-  if (GET_CODE (mem) == ZERO_EXTEND)
 
11237
-    mem = XEXP (mem, 0);
 
11238
-
 
11239
-  else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
 
11240
-    {
 
11241
-      sign_p = true;
 
11242
-      mem = XEXP (mem, 0);
 
11243
-    }
 
11244
-
 
11245
-  gcc_assert (MEM_P (mem));
 
11246
   addr = XEXP (mem, 0);
 
11247
   if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
 
11248
     gcc_unreachable ();
 
11249
 
 
11250
+  addis_value = XEXP (addr, 0);
 
11251
   load_offset = XEXP (addr, 1);
 
11252
 
 
11253
   /* Now emit the load instruction to the same register.  */
 
11254
@@ -32864,29 +33002,22 @@
 
11255
     case QImode:
 
11256
       mode_name = "char";
 
11257
       load_str = "lbz";
 
11258
-      extend_insn = "extsb %0,%0";
 
11259
       break;
 
11260
 
 
11261
     case HImode:
 
11262
       mode_name = "short";
 
11263
       load_str = "lhz";
 
11264
-      extend_insn = "extsh %0,%0";
 
11265
       break;
 
11266
 
 
11267
     case SImode:
 
11268
       mode_name = "int";
 
11269
       load_str = "lwz";
 
11270
-      extend_insn = "extsw %0,%0";
 
11271
       break;
 
11272
 
 
11273
     case DImode:
 
11274
-      if (TARGET_POWERPC64)
 
11275
-       {
 
11276
-         mode_name = "long";
 
11277
-         load_str = "ld";
 
11278
-       }
 
11279
-      else
 
11280
-       gcc_unreachable ();
 
11281
+      gcc_assert (TARGET_POWERPC64);
 
11282
+      mode_name = "long";
 
11283
+      load_str = "ld";
 
11284
       break;
 
11285
 
 
11286
     default:
 
11287
@@ -33030,14 +33161,6 @@
 
11288
   else
 
11289
     fatal_insn ("Unable to generate load offset for fusion", load_offset);
 
11290
 
 
11291
-  /* Handle sign extension.  The peephole2 pass generates this as a separate
 
11292
-     insn, but we handle it just in case it got reattached.  */
 
11293
-  if (sign_p)
 
11294
-    {
 
11295
-      gcc_assert (extend_insn != NULL);
 
11296
-      output_asm_insn (extend_insn, fuse_ops);
 
11297
-    }
 
11298
-
 
11299
   return "";
 
11300
 }
 
11301
 
 
11302
Index: gcc/config/rs6000/vsx.md
 
11303
===================================================================
 
11304
--- a/src/gcc/config/rs6000/vsx.md      (.../tags/gcc_4_8_3_release)
 
11305
+++ b/src/gcc/config/rs6000/vsx.md      (.../branches/gcc-4_8-branch)
 
11306
@@ -24,6 +24,13 @@
 
11307
 ;; Iterator for the 2 64-bit vector types
 
11308
 (define_mode_iterator VSX_D [V2DF V2DI])
 
11309
 
 
11310
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
 
11311
+;; lxvd2x to properly handle swapping words on little endian
 
11312
+(define_mode_iterator VSX_LE [V2DF
 
11313
+                             V2DI
 
11314
+                             V1TI
 
11315
+                             (TI       "VECTOR_MEM_VSX_P (TImode)")])
 
11316
+
 
11317
 ;; Iterator for the 2 32-bit vector types
 
11318
 (define_mode_iterator VSX_W [V4SF V4SI])
 
11319
 
 
11320
@@ -79,19 +86,26 @@
 
11321
                         (V4SF  "wf")
 
11322
                         (V2DI  "wd")
 
11323
                         (V2DF  "wd")
 
11324
+                        (DI    "wi")
 
11325
                         (DF    "ws")
 
11326
-                        (SF    "d")
 
11327
+                        (SF    "ww")
 
11328
                         (V1TI  "v")
 
11329
                         (TI    "wt")])
 
11330
 
 
11331
-;; Map the register class used for float<->int conversions
 
11332
+;; Map the register class used for float<->int conversions (floating point side)
 
11333
+;; VSr2 is the preferred register class, VSr3 is any register class that will
 
11334
+;; hold the data
 
11335
 (define_mode_attr VSr2 [(V2DF  "wd")
 
11336
                         (V4SF  "wf")
 
11337
-                        (DF    "ws")])
 
11338
+                        (DF    "ws")
 
11339
+                        (SF    "ww")
 
11340
+                        (DI    "wi")])
 
11341
 
 
11342
 (define_mode_attr VSr3 [(V2DF  "wa")
 
11343
                         (V4SF  "wa")
 
11344
-                        (DF    "ws")])
 
11345
+                        (DF    "ws")
 
11346
+                        (SF    "ww")
 
11347
+                        (DI    "wi")])
 
11348
 
 
11349
 ;; Map the register class for sp<->dp float conversions, destination
 
11350
 (define_mode_attr VSr4 [(SF    "ws")
 
11351
@@ -99,12 +113,27 @@
 
11352
                         (V2DF  "wd")
 
11353
                         (V4SF  "v")])
 
11354
 
 
11355
-;; Map the register class for sp<->dp float conversions, destination
 
11356
+;; Map the register class for sp<->dp float conversions, source
 
11357
 (define_mode_attr VSr5 [(SF    "ws")
 
11358
                         (DF    "f")
 
11359
                         (V2DF  "v")
 
11360
                         (V4SF  "wd")])
 
11361
 
 
11362
+;; The VSX register class that a type can occupy, even if it is not the
 
11363
+;; preferred register class (VSr is the preferred register class that will get
 
11364
+;; allocated first).
 
11365
+(define_mode_attr VSa  [(V16QI "wa")
 
11366
+                        (V8HI  "wa")
 
11367
+                        (V4SI  "wa")
 
11368
+                        (V4SF  "wa")
 
11369
+                        (V2DI  "wa")
 
11370
+                        (V2DF  "wa")
 
11371
+                        (DI    "wi")
 
11372
+                        (DF    "ws")
 
11373
+                        (SF    "ww")
 
11374
+                        (V1TI  "wa")
 
11375
+                        (TI    "wt")])
 
11376
+
 
11377
 ;; Same size integer type for floating point data
 
11378
 (define_mode_attr VSi [(V4SF  "v4si")
 
11379
                       (V2DF  "v2di")
 
11380
@@ -200,6 +229,16 @@
 
11381
                             (V2DF      "V4DF")
 
11382
                             (V1TI      "V2TI")])
 
11383
 
 
11384
+;; Map register class for 64-bit element in 128-bit vector for direct moves
 
11385
+;; to/from gprs
 
11386
+(define_mode_attr VS_64dm [(V2DF       "wk")
 
11387
+                          (V2DI        "wj")])
 
11388
+
 
11389
+;; Map register class for 64-bit element in 128-bit vector for normal register
 
11390
+;; to register moves
 
11391
+(define_mode_attr VS_64reg [(V2DF      "ws")
 
11392
+                           (V2DI       "wi")])
 
11393
+
 
11394
 ;; Constants for creating unspecs
 
11395
 (define_c_enum "unspec"
 
11396
   [UNSPEC_VSX_CONCAT
 
11397
@@ -228,8 +267,8 @@
 
11398
 ;; The patterns for LE permuted loads and stores come before the general
 
11399
 ;; VSX moves so they match first.
 
11400
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
11401
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
11402
-        (match_operand:VSX_D 1 "memory_operand" "Z"))]
 
11403
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
11404
+        (match_operand:VSX_LE 1 "memory_operand" "Z"))]
 
11405
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11406
   "#"
 
11407
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11408
@@ -251,7 +290,7 @@
 
11409
    (set_attr "length" "8")])
 
11410
 
 
11411
 (define_insn_and_split "*vsx_le_perm_load_<mode>"
 
11412
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
11413
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
11414
         (match_operand:VSX_W 1 "memory_operand" "Z"))]
 
11415
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11416
   "#"
 
11417
@@ -342,8 +381,8 @@
 
11418
    (set_attr "length" "8")])
 
11419
 
 
11420
 (define_insn "*vsx_le_perm_store_<mode>"
 
11421
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
11422
-        (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
 
11423
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
11424
+        (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
 
11425
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11426
   "#"
 
11427
   [(set_attr "type" "vecstore")
 
11428
@@ -350,8 +389,8 @@
 
11429
    (set_attr "length" "12")])
 
11430
 
 
11431
 (define_split
 
11432
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
11433
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
11434
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
11435
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
11436
   "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
 
11437
   [(set (match_dup 2)
 
11438
         (vec_select:<MODE>
 
11439
@@ -369,8 +408,8 @@
 
11440
 ;; The post-reload split requires that we re-permute the source
 
11441
 ;; register in case it is still live.
 
11442
 (define_split
 
11443
-  [(set (match_operand:VSX_D 0 "memory_operand" "")
 
11444
-        (match_operand:VSX_D 1 "vsx_register_operand" ""))]
 
11445
+  [(set (match_operand:VSX_LE 0 "memory_operand" "")
 
11446
+        (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
 
11447
   "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
 
11448
   [(set (match_dup 1)
 
11449
         (vec_select:<MODE>
 
11450
@@ -388,7 +427,7 @@
 
11451
 
 
11452
 (define_insn "*vsx_le_perm_store_<mode>"
 
11453
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
11454
-        (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
 
11455
+        (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
 
11456
   "!BYTES_BIG_ENDIAN && TARGET_VSX"
 
11457
   "#"
 
11458
   [(set_attr "type" "vecstore")
 
11459
@@ -578,8 +617,8 @@
 
11460
 
 
11461
 
 
11462
 (define_insn "*vsx_mov<mode>"
 
11463
-  [(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")
 
11464
-       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
11465
+  [(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")
 
11466
+       (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
 
11467
   "VECTOR_MEM_VSX_P (<MODE>mode)
 
11468
    && (register_operand (operands[0], <MODE>mode) 
 
11469
        || register_operand (operands[1], <MODE>mode))"
 
11470
@@ -681,9 +720,9 @@
 
11471
 ;; instructions are now combined with the insn for the traditional floating
 
11472
 ;; point unit.
 
11473
 (define_insn "*vsx_add<mode>3"
 
11474
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11475
-        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11476
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11477
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11478
+        (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11479
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11480
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11481
   "xvadd<VSs> %x0,%x1,%x2"
 
11482
   [(set_attr "type" "<VStype_simple>")
 
11483
@@ -690,9 +729,9 @@
 
11484
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11485
 
 
11486
 (define_insn "*vsx_sub<mode>3"
 
11487
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11488
-        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11489
-                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11490
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11491
+        (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11492
+                    (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11493
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11494
   "xvsub<VSs> %x0,%x1,%x2"
 
11495
   [(set_attr "type" "<VStype_simple>")
 
11496
@@ -699,9 +738,9 @@
 
11497
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11498
 
 
11499
 (define_insn "*vsx_mul<mode>3"
 
11500
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11501
-        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11502
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11503
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11504
+        (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11505
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11506
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11507
   "xvmul<VSs> %x0,%x1,%x2"
 
11508
   [(set_attr "type" "<VStype_simple>")
 
11509
@@ -708,9 +747,9 @@
 
11510
    (set_attr "fp_type" "<VSfptype_mul>")])
 
11511
 
 
11512
 (define_insn "*vsx_div<mode>3"
 
11513
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11514
-        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11515
-                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11516
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11517
+        (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11518
+                  (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11519
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11520
   "xvdiv<VSs> %x0,%x1,%x2"
 
11521
   [(set_attr "type" "<VStype_div>")
 
11522
@@ -746,8 +785,8 @@
 
11523
 
 
11524
 (define_insn "*vsx_tdiv<mode>3_internal"
 
11525
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
11526
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
 
11527
-                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
 
11528
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11529
+                     (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
11530
                   UNSPEC_VSX_TDIV))]
 
11531
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11532
   "x<VSv>tdiv<VSs> %0,%x1,%x2"
 
11533
@@ -755,8 +794,8 @@
 
11534
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11535
 
 
11536
 (define_insn "vsx_fre<mode>2"
 
11537
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11538
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
11539
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11540
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11541
                      UNSPEC_FRES))]
 
11542
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11543
   "xvre<VSs> %x0,%x1"
 
11544
@@ -764,8 +803,8 @@
 
11545
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11546
 
 
11547
 (define_insn "*vsx_neg<mode>2"
 
11548
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11549
-        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
11550
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11551
+        (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11552
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11553
   "xvneg<VSs> %x0,%x1"
 
11554
   [(set_attr "type" "<VStype_simple>")
 
11555
@@ -772,8 +811,8 @@
 
11556
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11557
 
 
11558
 (define_insn "*vsx_abs<mode>2"
 
11559
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11560
-        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
11561
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11562
+        (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11563
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11564
   "xvabs<VSs> %x0,%x1"
 
11565
   [(set_attr "type" "<VStype_simple>")
 
11566
@@ -780,10 +819,10 @@
 
11567
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11568
 
 
11569
 (define_insn "vsx_nabs<mode>2"
 
11570
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11571
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11572
         (neg:VSX_F
 
11573
         (abs:VSX_F
 
11574
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
 
11575
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
 
11576
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11577
   "xvnabs<VSs> %x0,%x1"
 
11578
   [(set_attr "type" "<VStype_simple>")
 
11579
@@ -790,9 +829,9 @@
 
11580
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11581
 
 
11582
 (define_insn "vsx_smax<mode>3"
 
11583
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11584
-        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11585
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11586
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11587
+        (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11588
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11589
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11590
   "xvmax<VSs> %x0,%x1,%x2"
 
11591
   [(set_attr "type" "<VStype_simple>")
 
11592
@@ -799,9 +838,9 @@
 
11593
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11594
 
 
11595
 (define_insn "*vsx_smin<mode>3"
 
11596
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11597
-        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11598
-                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11599
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11600
+        (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11601
+                   (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11602
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11603
   "xvmin<VSs> %x0,%x1,%x2"
 
11604
   [(set_attr "type" "<VStype_simple>")
 
11605
@@ -808,8 +847,8 @@
 
11606
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11607
 
 
11608
 (define_insn "*vsx_sqrt<mode>2"
 
11609
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11610
-        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
11611
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11612
+        (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11613
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11614
   "xvsqrt<VSs> %x0,%x1"
 
11615
   [(set_attr "type" "<VStype_sqrt>")
 
11616
@@ -816,8 +855,8 @@
 
11617
    (set_attr "fp_type" "<VSfptype_sqrt>")])
 
11618
 
 
11619
 (define_insn "*vsx_rsqrte<mode>2"
 
11620
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11621
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
11622
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11623
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11624
                      UNSPEC_RSQRT))]
 
11625
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11626
   "xvrsqrte<VSs> %x0,%x1"
 
11627
@@ -852,7 +891,7 @@
 
11628
 
 
11629
 (define_insn "*vsx_tsqrt<mode>2_internal"
 
11630
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
 
11631
-       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
11632
+       (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11633
                     UNSPEC_VSX_TSQRT))]
 
11634
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11635
   "x<VSv>tsqrt<VSs> %0,%x1"
 
11636
@@ -865,11 +904,11 @@
 
11637
 ;; multiply.
 
11638
 
 
11639
 (define_insn "*vsx_fmav4sf4"
 
11640
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
 
11641
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
 
11642
        (fma:V4SF
 
11643
-         (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
 
11644
-         (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
 
11645
-         (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
 
11646
+         (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
 
11647
+         (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
 
11648
+         (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
 
11649
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
11650
   "@
 
11651
    xvmaddasp %x0,%x1,%x2
 
11652
@@ -880,11 +919,11 @@
 
11653
   [(set_attr "type" "vecfloat")])
 
11654
 
 
11655
 (define_insn "*vsx_fmav2df4"
 
11656
-  [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
 
11657
+  [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
 
11658
        (fma:V2DF
 
11659
-         (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
 
11660
-         (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
 
11661
-         (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
 
11662
+         (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
 
11663
+         (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
 
11664
+         (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
 
11665
   "VECTOR_UNIT_VSX_P (V2DFmode)"
 
11666
   "@
 
11667
    xvmaddadp %x0,%x1,%x2
 
11668
@@ -894,12 +933,12 @@
 
11669
   [(set_attr "type" "vecdouble")])
 
11670
 
 
11671
 (define_insn "*vsx_fms<mode>4"
 
11672
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
11673
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
11674
        (fma:VSX_F
 
11675
-         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
 
11676
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
11677
+         (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
 
11678
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
11679
          (neg:VSX_F
 
11680
-           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
11681
+           (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
11682
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11683
   "@
 
11684
    xvmsuba<VSs> %x0,%x1,%x2
 
11685
@@ -909,12 +948,12 @@
 
11686
   [(set_attr "type" "<VStype_mul>")])
 
11687
 
 
11688
 (define_insn "*vsx_nfma<mode>4"
 
11689
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
 
11690
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
 
11691
        (neg:VSX_F
 
11692
         (fma:VSX_F
 
11693
-         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
 
11694
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
 
11695
-         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
 
11696
+         (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
 
11697
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
 
11698
+         (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
 
11699
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11700
   "@
 
11701
    xvnmadda<VSs> %x0,%x1,%x2
 
11702
@@ -959,9 +998,9 @@
 
11703
 
 
11704
 ;; Vector conditional expressions (no scalar version for these instructions)
 
11705
 (define_insn "vsx_eq<mode>"
 
11706
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11707
-       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11708
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11709
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11710
+       (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11711
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11712
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11713
   "xvcmpeq<VSs> %x0,%x1,%x2"
 
11714
   [(set_attr "type" "<VStype_simple>")
 
11715
@@ -968,9 +1007,9 @@
 
11716
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11717
 
 
11718
 (define_insn "vsx_gt<mode>"
 
11719
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11720
-       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11721
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11722
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11723
+       (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11724
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11725
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11726
   "xvcmpgt<VSs> %x0,%x1,%x2"
 
11727
   [(set_attr "type" "<VStype_simple>")
 
11728
@@ -977,9 +1016,9 @@
 
11729
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11730
 
 
11731
 (define_insn "*vsx_ge<mode>"
 
11732
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11733
-       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11734
-                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
 
11735
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11736
+       (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11737
+                 (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11738
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11739
   "xvcmpge<VSs> %x0,%x1,%x2"
 
11740
   [(set_attr "type" "<VStype_simple>")
 
11741
@@ -990,10 +1029,10 @@
 
11742
 (define_insn "*vsx_eq_<mode>_p"
 
11743
   [(set (reg:CC 74)
 
11744
        (unspec:CC
 
11745
-        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
11746
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
11747
+        [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
11748
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
11749
         UNSPEC_PREDICATE))
 
11750
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11751
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11752
        (eq:VSX_F (match_dup 1)
 
11753
                  (match_dup 2)))]
 
11754
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11755
@@ -1003,10 +1042,10 @@
 
11756
 (define_insn "*vsx_gt_<mode>_p"
 
11757
   [(set (reg:CC 74)
 
11758
        (unspec:CC
 
11759
-        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
11760
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
11761
+        [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
11762
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
11763
         UNSPEC_PREDICATE))
 
11764
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11765
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11766
        (gt:VSX_F (match_dup 1)
 
11767
                  (match_dup 2)))]
 
11768
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11769
@@ -1016,10 +1055,10 @@
 
11770
 (define_insn "*vsx_ge_<mode>_p"
 
11771
   [(set (reg:CC 74)
 
11772
        (unspec:CC
 
11773
-        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
 
11774
-                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
 
11775
+        [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
 
11776
+                (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
 
11777
         UNSPEC_PREDICATE))
 
11778
-   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11779
+   (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11780
        (ge:VSX_F (match_dup 1)
 
11781
                  (match_dup 2)))]
 
11782
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11783
@@ -1028,23 +1067,23 @@
 
11784
 
 
11785
 ;; Vector select
 
11786
 (define_insn "*vsx_xxsel<mode>"
 
11787
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
11788
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11789
        (if_then_else:VSX_L
 
11790
-        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
11791
+        (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11792
                (match_operand:VSX_L 4 "zero_constant" ""))
 
11793
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
11794
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
11795
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
11796
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11797
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
11798
   "xxsel %x0,%x3,%x2,%x1"
 
11799
   [(set_attr "type" "vecperm")])
 
11800
 
 
11801
 (define_insn "*vsx_xxsel<mode>_uns"
 
11802
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
 
11803
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11804
        (if_then_else:VSX_L
 
11805
-        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
 
11806
+        (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11807
                   (match_operand:VSX_L 4 "zero_constant" ""))
 
11808
-        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
 
11809
-        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
 
11810
+        (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
 
11811
+        (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11812
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
11813
   "xxsel %x0,%x3,%x2,%x1"
 
11814
   [(set_attr "type" "vecperm")])
 
11815
@@ -1051,10 +1090,10 @@
 
11816
 
 
11817
 ;; Copy sign
 
11818
 (define_insn "vsx_copysign<mode>3"
 
11819
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11820
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11821
        (unspec:VSX_F
 
11822
-        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
 
11823
-         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
 
11824
+        [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
 
11825
+         (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
 
11826
         UNSPEC_COPYSIGN))]
 
11827
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11828
   "xvcpsgn<VSs> %x0,%x2,%x1"
 
11829
@@ -1067,7 +1106,7 @@
 
11830
 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
 
11831
 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
 
11832
 (define_insn "vsx_float<VSi><mode>2"
 
11833
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
11834
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
11835
        (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
11836
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11837
   "x<VSv>cvsx<VSc><VSs> %x0,%x1"
 
11838
@@ -1075,7 +1114,7 @@
 
11839
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11840
 
 
11841
 (define_insn "vsx_floatuns<VSi><mode>2"
 
11842
-  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
 
11843
+  [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
 
11844
        (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
 
11845
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11846
   "x<VSv>cvux<VSc><VSs> %x0,%x1"
 
11847
@@ -1084,7 +1123,7 @@
 
11848
 
 
11849
 (define_insn "vsx_fix_trunc<mode><VSi>2"
 
11850
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
11851
-       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
11852
+       (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
11853
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11854
   "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
 
11855
   [(set_attr "type" "<VStype_simple>")
 
11856
@@ -1092,7 +1131,7 @@
 
11857
 
 
11858
 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
 
11859
   [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
 
11860
-       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
 
11861
+       (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
 
11862
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11863
   "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
 
11864
   [(set_attr "type" "<VStype_simple>")
 
11865
@@ -1100,8 +1139,8 @@
 
11866
 
 
11867
 ;; Math rounding functions
 
11868
 (define_insn "vsx_x<VSv>r<VSs>i"
 
11869
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
11870
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
11871
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11872
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11873
                      UNSPEC_VSX_ROUND_I))]
 
11874
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11875
   "x<VSv>r<VSs>i %x0,%x1"
 
11876
@@ -1109,8 +1148,8 @@
 
11877
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11878
 
 
11879
 (define_insn "vsx_x<VSv>r<VSs>ic"
 
11880
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
11881
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
11882
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11883
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11884
                      UNSPEC_VSX_ROUND_IC))]
 
11885
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11886
   "x<VSv>r<VSs>ic %x0,%x1"
 
11887
@@ -1118,8 +1157,8 @@
 
11888
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11889
 
 
11890
 (define_insn "vsx_btrunc<mode>2"
 
11891
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11892
-       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
 
11893
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11894
+       (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
 
11895
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11896
   "xvr<VSs>iz %x0,%x1"
 
11897
   [(set_attr "type" "<VStype_simple>")
 
11898
@@ -1126,8 +1165,8 @@
 
11899
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11900
 
 
11901
 (define_insn "*vsx_b2trunc<mode>2"
 
11902
-  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
 
11903
-       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
 
11904
+  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11905
+       (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11906
                      UNSPEC_FRIZ))]
 
11907
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11908
   "x<VSv>r<VSs>iz %x0,%x1"
 
11909
@@ -1135,8 +1174,8 @@
 
11910
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11911
 
 
11912
 (define_insn "vsx_floor<mode>2"
 
11913
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11914
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
11915
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11916
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11917
                      UNSPEC_FRIM))]
 
11918
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11919
   "xvr<VSs>im %x0,%x1"
 
11920
@@ -1144,8 +1183,8 @@
 
11921
    (set_attr "fp_type" "<VSfptype_simple>")])
 
11922
 
 
11923
 (define_insn "vsx_ceil<mode>2"
 
11924
-  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
 
11925
-       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
 
11926
+  [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11927
+       (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
 
11928
                      UNSPEC_FRIP))]
 
11929
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11930
   "xvr<VSs>ip %x0,%x1"
 
11931
@@ -1160,8 +1199,8 @@
 
11932
 ;; scalar single precision instructions internally use the double format.
 
11933
 ;; Prefer the altivec registers, since we likely will need to do a vperm
 
11934
 (define_insn "vsx_<VS_spdp_insn>"
 
11935
-  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
 
11936
-       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
 
11937
+  [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
 
11938
+       (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
 
11939
                              UNSPEC_VSX_CVSPDP))]
 
11940
   "VECTOR_UNIT_VSX_P (<MODE>mode)"
 
11941
   "<VS_spdp_insn> %x0,%x1"
 
11942
@@ -1169,8 +1208,8 @@
 
11943
 
 
11944
 ;; xscvspdp, represent the scalar SF type as V4SF
 
11945
 (define_insn "vsx_xscvspdp"
 
11946
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
11947
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
11948
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
 
11949
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
 
11950
                   UNSPEC_VSX_CVSPDP))]
 
11951
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
11952
   "xscvspdp %x0,%x1"
 
11953
@@ -1197,7 +1236,7 @@
 
11954
 
 
11955
 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
 
11956
 (define_insn "vsx_xscvdpspn"
 
11957
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
 
11958
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
 
11959
        (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
 
11960
                     UNSPEC_VSX_CVDPSPN))]
 
11961
   "TARGET_XSCVDPSPN"
 
11962
@@ -1205,8 +1244,8 @@
 
11963
   [(set_attr "type" "fp")])
 
11964
 
 
11965
 (define_insn "vsx_xscvspdpn"
 
11966
-  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
 
11967
-       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
 
11968
+  [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
 
11969
+       (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
 
11970
                   UNSPEC_VSX_CVSPDPN))]
 
11971
   "TARGET_XSCVSPDPN"
 
11972
   "xscvspdpn %x0,%x1"
 
11973
@@ -1213,8 +1252,8 @@
 
11974
   [(set_attr "type" "fp")])
 
11975
 
 
11976
 (define_insn "vsx_xscvdpspn_scalar"
 
11977
-  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
 
11978
-       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
 
11979
+  [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
 
11980
+       (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
 
11981
                     UNSPEC_VSX_CVDPSPN))]
 
11982
   "TARGET_XSCVDPSPN"
 
11983
   "xscvdpspn %x0,%x1"
 
11984
@@ -1302,10 +1341,10 @@
 
11985
 ;; since the xsrdpiz instruction does not truncate the value if the floating
 
11986
 ;; point value is < LONG_MIN or > LONG_MAX.
 
11987
 (define_insn "*vsx_float_fix_<mode>2"
 
11988
-  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
 
11989
+  [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
11990
        (float:VSX_DF
 
11991
         (fix:<VSI>
 
11992
-         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
 
11993
+         (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
 
11994
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
11995
    && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
 
11996
    && !flag_trapping_math && TARGET_FRIZ"
 
11997
@@ -1318,10 +1357,10 @@
 
11998
 
 
11999
 ;; Build a V2DF/V2DI vector from two scalars
 
12000
 (define_insn "vsx_concat_<mode>"
 
12001
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
 
12002
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
 
12003
        (vec_concat:VSX_D
 
12004
-        (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
 
12005
-        (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
 
12006
+        (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
12007
+        (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
 
12008
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12009
 {
 
12010
   if (BYTES_BIG_ENDIAN)
 
12011
@@ -1352,9 +1391,9 @@
 
12012
 ;; xxpermdi for little endian loads and stores.  We need several of
 
12013
 ;; these since the form of the PARALLEL differs by mode.
 
12014
 (define_insn "*vsx_xxpermdi2_le_<mode>"
 
12015
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
12016
-        (vec_select:VSX_D
 
12017
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
12018
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
12019
+        (vec_select:VSX_LE
 
12020
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
12021
           (parallel [(const_int 1) (const_int 0)])))]
 
12022
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12023
   "xxpermdi %x0,%x1,%x1,2"
 
12024
@@ -1361,9 +1400,9 @@
 
12025
   [(set_attr "type" "vecperm")])
 
12026
 
 
12027
 (define_insn "*vsx_xxpermdi4_le_<mode>"
 
12028
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
12029
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
12030
         (vec_select:VSX_W
 
12031
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
12032
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
12033
           (parallel [(const_int 2) (const_int 3)
 
12034
                      (const_int 0) (const_int 1)])))]
 
12035
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12036
@@ -1401,9 +1440,9 @@
 
12037
 ;; lxvd2x for little endian loads.  We need several of
 
12038
 ;; these since the form of the PARALLEL differs by mode.
 
12039
 (define_insn "*vsx_lxvd2x2_le_<mode>"
 
12040
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
 
12041
-        (vec_select:VSX_D
 
12042
-          (match_operand:VSX_D 1 "memory_operand" "Z")
 
12043
+  [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
 
12044
+        (vec_select:VSX_LE
 
12045
+          (match_operand:VSX_LE 1 "memory_operand" "Z")
 
12046
           (parallel [(const_int 1) (const_int 0)])))]
 
12047
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12048
   "lxvd2x %x0,%y1"
 
12049
@@ -1410,7 +1449,7 @@
 
12050
   [(set_attr "type" "vecload")])
 
12051
 
 
12052
 (define_insn "*vsx_lxvd2x4_le_<mode>"
 
12053
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
 
12054
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
 
12055
         (vec_select:VSX_W
 
12056
           (match_operand:VSX_W 1 "memory_operand" "Z")
 
12057
           (parallel [(const_int 2) (const_int 3)
 
12058
@@ -1450,9 +1489,9 @@
 
12059
 ;; stxvd2x for little endian stores.  We need several of
 
12060
 ;; these since the form of the PARALLEL differs by mode.
 
12061
 (define_insn "*vsx_stxvd2x2_le_<mode>"
 
12062
-  [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
 
12063
-        (vec_select:VSX_D
 
12064
-          (match_operand:VSX_D 1 "vsx_register_operand" "wa")
 
12065
+  [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
 
12066
+        (vec_select:VSX_LE
 
12067
+          (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
 
12068
           (parallel [(const_int 1) (const_int 0)])))]
 
12069
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12070
   "stxvd2x %x1,%y0"
 
12071
@@ -1461,7 +1500,7 @@
 
12072
 (define_insn "*vsx_stxvd2x4_le_<mode>"
 
12073
   [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
 
12074
         (vec_select:VSX_W
 
12075
-          (match_operand:VSX_W 1 "vsx_register_operand" "wa")
 
12076
+          (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
 
12077
           (parallel [(const_int 2) (const_int 3)
 
12078
                      (const_int 0) (const_int 1)])))]
 
12079
   "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
 
12080
@@ -1513,11 +1552,12 @@
 
12081
 
 
12082
 ;; Set the element of a V2DI/VD2F mode
 
12083
 (define_insn "vsx_set_<mode>"
 
12084
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
 
12085
-       (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
 
12086
-                      (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
 
12087
-                      (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
12088
-                     UNSPEC_VSX_SET))]
 
12089
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
 
12090
+       (unspec:VSX_D
 
12091
+        [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
 
12092
+         (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
 
12093
+         (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
 
12094
+        UNSPEC_VSX_SET))]
 
12095
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12096
 {
 
12097
   int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
 
12098
@@ -1582,7 +1622,7 @@
 
12099
 (define_insn_and_split "vsx_extract_v4sf"
 
12100
   [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
 
12101
        (vec_select:SF
 
12102
-        (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
 
12103
+        (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
 
12104
         (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
 
12105
    (clobber (match_scratch:V4SF 3 "=X,0"))]
 
12106
   "VECTOR_UNIT_VSX_P (V4SFmode)"
 
12107
@@ -1606,7 +1646,7 @@
 
12108
     {
 
12109
       if (GET_CODE (op3) == SCRATCH)
 
12110
        op3 = gen_reg_rtx (V4SFmode);
 
12111
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
 
12112
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
 
12113
       tmp = op3;
 
12114
     }
 
12115
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
 
12116
@@ -1765,9 +1805,9 @@
 
12117
 
 
12118
 ;; V2DF/V2DI splat
 
12119
 (define_insn "vsx_splat_<mode>"
 
12120
-  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
 
12121
+  [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
 
12122
        (vec_duplicate:VSX_D
 
12123
-        (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
 
12124
+        (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
 
12125
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12126
   "@
 
12127
    xxpermdi %x0,%x1,%x1,0
 
12128
@@ -1780,10 +1820,10 @@
 
12129
 
 
12130
 ;; V4SF/V4SI splat
 
12131
 (define_insn "vsx_xxspltw_<mode>"
 
12132
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12133
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12134
        (vec_duplicate:VSX_W
 
12135
         (vec_select:<VS_scalar>
 
12136
-         (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12137
+         (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12138
          (parallel
 
12139
           [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
 
12140
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12141
@@ -1796,8 +1836,8 @@
 
12142
   [(set_attr "type" "vecperm")])
 
12143
 
 
12144
 (define_insn "vsx_xxspltw_<mode>_direct"
 
12145
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12146
-        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12147
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12148
+        (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12149
                        (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
 
12150
                       UNSPEC_VSX_XXSPLTW))]
 
12151
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12152
@@ -1806,11 +1846,11 @@
 
12153
 
 
12154
 ;; V4SF/V4SI interleave
 
12155
 (define_insn "vsx_xxmrghw_<mode>"
 
12156
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12157
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12158
         (vec_select:VSX_W
 
12159
          (vec_concat:<VS_double>
 
12160
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12161
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
 
12162
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12163
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
 
12164
          (parallel [(const_int 0) (const_int 4)
 
12165
                     (const_int 1) (const_int 5)])))]
 
12166
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12167
@@ -1823,11 +1863,11 @@
 
12168
   [(set_attr "type" "vecperm")])
 
12169
 
 
12170
 (define_insn "vsx_xxmrglw_<mode>"
 
12171
-  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
 
12172
+  [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
 
12173
        (vec_select:VSX_W
 
12174
          (vec_concat:<VS_double>
 
12175
-           (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
 
12176
-           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
 
12177
+           (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
 
12178
+           (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
 
12179
          (parallel [(const_int 2) (const_int 6)
 
12180
                     (const_int 3) (const_int 7)])))]
 
12181
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12182
@@ -1841,9 +1881,9 @@
 
12183
 
 
12184
 ;; Shift left double by word immediate
 
12185
 (define_insn "vsx_xxsldwi_<mode>"
 
12186
-  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
 
12187
-       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
 
12188
-                      (match_operand:VSX_L 2 "vsx_register_operand" "wa")
 
12189
+  [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
 
12190
+       (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
 
12191
+                      (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
 
12192
                       (match_operand:QI 3 "u5bit_cint_operand" "i")]
 
12193
                      UNSPEC_VSX_SLDWI))]
 
12194
   "VECTOR_MEM_VSX_P (<MODE>mode)"
 
12195
@@ -1924,7 +1964,7 @@
 
12196
 ;; to the top element of the V2DF array without doing an extract.
 
12197
 
 
12198
 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
 
12199
-  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
 
12200
+  [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
 
12201
        (vec_select:DF
 
12202
         (VEC_reduc:V2DF
 
12203
          (vec_concat:V2DF
 
12204
Index: gcc/config/rs6000/rs6000.h
 
12205
===================================================================
 
12206
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_8_3_release)
 
12207
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_8-branch)
 
12208
@@ -1438,6 +1438,10 @@
 
12209
   RS6000_CONSTRAINT_wd,                /* VSX register for V2DF */
 
12210
   RS6000_CONSTRAINT_wf,                /* VSX register for V4SF */
 
12211
   RS6000_CONSTRAINT_wg,                /* FPR register for -mmfpgpr */
 
12212
+  RS6000_CONSTRAINT_wh,                /* FPR register for direct moves.  */
 
12213
+  RS6000_CONSTRAINT_wi,                /* FPR/VSX register to hold DImode */
 
12214
+  RS6000_CONSTRAINT_wj,                /* FPR/VSX register for DImode direct moves. */
 
12215
+  RS6000_CONSTRAINT_wk,                /* FPR/VSX register for DFmode direct moves. */
 
12216
   RS6000_CONSTRAINT_wl,                /* FPR register for LFIWAX */
 
12217
   RS6000_CONSTRAINT_wm,                /* VSX register for direct move */
 
12218
   RS6000_CONSTRAINT_wr,                /* GPR register if 64-bit  */
 
12219
@@ -1462,6 +1466,9 @@
 
12220
 #define VSX_REG_CLASS_P(CLASS)                 \
 
12221
   ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
 
12222
 
 
12223
+/* Return whether a given register class targets general purpose registers.  */
 
12224
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
 
12225
+
 
12226
 /* Given an rtx X being reloaded into a reg required to be
 
12227
    in class CLASS, return the class of reg to actually use.
 
12228
    In general this is just CLASS; but on some machines
 
12229
@@ -1593,8 +1600,15 @@
 
12230
 /* Define this if stack space is still allocated for a parameter passed
 
12231
    in a register.  The value is the number of bytes allocated to this
 
12232
    area.  */
 
12233
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
 
12234
+#define REG_PARM_STACK_SPACE(FNDECL) \
 
12235
+  rs6000_reg_parm_stack_space ((FNDECL), false)
 
12236
 
 
12237
+/* Define this macro if space guaranteed when compiling a function body
 
12238
+   is different to space required when making a call, a situation that
 
12239
+   can arise with K&R style function definitions.  */
 
12240
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
 
12241
+  rs6000_reg_parm_stack_space ((FNDECL), true)
 
12242
+
 
12243
 /* Define this if the above stack space is to be considered part of the
 
12244
    space allocated by the caller.  */
 
12245
 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
 
12246
@@ -2483,8 +2497,8 @@
 
12247
 #define RS6000_BTC_SAT         RS6000_BTC_MISC /* saturate sets VSCR.  */
 
12248
 
 
12249
 /* Builtin targets.  For now, we reuse the masks for those options that are in
 
12250
-   target flags, and pick two random bits for SPE and paired which aren't in
 
12251
-   target_flags.  */
 
12252
+   target flags, and pick three random bits for SPE, paired and ldbl128 which
 
12253
+   aren't in target_flags.  */
 
12254
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
 
12255
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
 
12256
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
 
12257
@@ -2501,6 +2515,7 @@
 
12258
 #define RS6000_BTM_CELL                MASK_FPRND      /* Target is cell powerpc.  */
 
12259
 #define RS6000_BTM_DFP         MASK_DFP        /* Decimal floating point.  */
 
12260
 #define RS6000_BTM_HARD_FLOAT  MASK_SOFT_FLOAT /* Hardware floating point.  */
 
12261
+#define RS6000_BTM_LDBL128     MASK_MULTIPLE   /* 128-bit long double.  */
 
12262
 
 
12263
 #define RS6000_BTM_COMMON      (RS6000_BTM_ALTIVEC                     \
 
12264
                                 | RS6000_BTM_VSX                       \
 
12265
@@ -2514,7 +2529,8 @@
 
12266
                                 | RS6000_BTM_POPCNTD                   \
 
12267
                                 | RS6000_BTM_CELL                      \
 
12268
                                 | RS6000_BTM_DFP                       \
 
12269
-                                | RS6000_BTM_HARD_FLOAT)
 
12270
+                                | RS6000_BTM_HARD_FLOAT                \
 
12271
+                                | RS6000_BTM_LDBL128)
 
12272
 
 
12273
 /* Define builtin enum index.  */
 
12274
 
 
12275
Index: gcc/config/rs6000/altivec.md
 
12276
===================================================================
 
12277
--- a/src/gcc/config/rs6000/altivec.md  (.../tags/gcc_4_8_3_release)
 
12278
+++ b/src/gcc/config/rs6000/altivec.md  (.../branches/gcc-4_8-branch)
 
12279
@@ -2297,7 +2297,31 @@
 
12280
   "dststt %0,%1,%2"
 
12281
   [(set_attr "type" "vecsimple")])
 
12282
 
 
12283
-(define_insn "altivec_lvsl"
 
12284
+(define_expand "altivec_lvsl"
 
12285
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
12286
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
12287
+  "TARGET_ALTIVEC"
 
12288
+{
 
12289
+  if (VECTOR_ELT_ORDER_BIG)
 
12290
+    emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
 
12291
+  else
 
12292
+    {
 
12293
+      int i;
 
12294
+      rtx mask, perm[16], constv, vperm;
 
12295
+      mask = gen_reg_rtx (V16QImode);
 
12296
+      emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
 
12297
+      for (i = 0; i < 16; ++i)
 
12298
+        perm[i] = GEN_INT (i);
 
12299
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
12300
+      constv = force_reg (V16QImode, constv);
 
12301
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
12302
+                              UNSPEC_VPERM);
 
12303
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
12304
+    }
 
12305
+  DONE;
 
12306
+})
 
12307
+
 
12308
+(define_insn "altivec_lvsl_direct"
 
12309
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
12310
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
12311
                      UNSPEC_LVSL))]
 
12312
@@ -2305,7 +2329,31 @@
 
12313
   "lvsl %0,%y1"
 
12314
   [(set_attr "type" "vecload")])
 
12315
 
 
12316
-(define_insn "altivec_lvsr"
 
12317
+(define_expand "altivec_lvsr"
 
12318
+  [(use (match_operand:V16QI 0 "register_operand" ""))
 
12319
+   (use (match_operand:V16QI 1 "memory_operand" ""))]
 
12320
+  "TARGET_ALTIVEC"
 
12321
+{
 
12322
+  if (VECTOR_ELT_ORDER_BIG)
 
12323
+    emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
 
12324
+  else
 
12325
+    {
 
12326
+      int i;
 
12327
+      rtx mask, perm[16], constv, vperm;
 
12328
+      mask = gen_reg_rtx (V16QImode);
 
12329
+      emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
 
12330
+      for (i = 0; i < 16; ++i)
 
12331
+        perm[i] = GEN_INT (i);
 
12332
+      constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
 
12333
+      constv = force_reg (V16QImode, constv);
 
12334
+      vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
 
12335
+                              UNSPEC_VPERM);
 
12336
+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
 
12337
+    }
 
12338
+  DONE;
 
12339
+})
 
12340
+
 
12341
+(define_insn "altivec_lvsr_direct"
 
12342
   [(set (match_operand:V16QI 0 "register_operand" "=v")
 
12343
        (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
 
12344
                      UNSPEC_LVSR))]
 
12345
Index: gcc/config/rs6000/rs6000.md
 
12346
===================================================================
 
12347
--- a/src/gcc/config/rs6000/rs6000.md   (.../tags/gcc_4_8_3_release)
 
12348
+++ b/src/gcc/config/rs6000/rs6000.md   (.../branches/gcc-4_8-branch)
 
12349
@@ -134,6 +134,7 @@
 
12350
    UNSPEC_UNPACK_128BIT
 
12351
    UNSPEC_PACK_128BIT
 
12352
    UNSPEC_LSQ
 
12353
+   UNSPEC_FUSION_GPR
 
12354
   ])
 
12355
 
 
12356
 ;;
 
12357
@@ -317,8 +318,25 @@
 
12358
 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0")  (SD "stxsiwzx %x1,%y0")])
 
12359
 
 
12360
 ; Definitions for 32-bit fpr direct move
 
12361
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
 
12362
+; At present, the decimal modes are not allowed in the traditional altivec
 
12363
+; registers, so restrict the constraints to just the traditional FPRs.
 
12364
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
 
12365
 
 
12366
+; Definitions for 32-bit VSX
 
12367
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
 
12368
+
 
12369
+; Definitions for 32-bit use of altivec registers
 
12370
+(define_mode_attr f32_av  [(SF "wu") (SD "wn")])
 
12371
+
 
12372
+; Definitions for 64-bit VSX
 
12373
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
 
12374
+
 
12375
+; Definitions for 64-bit direct move
 
12376
+(define_mode_attr f64_dm  [(DF "wk") (DD "wh")])
 
12377
+
 
12378
+; Definitions for 64-bit use of altivec registers
 
12379
+(define_mode_attr f64_av  [(DF "wv") (DD "wn")])
 
12380
+
 
12381
 ; These modes do not fit in integer registers in 32-bit mode.
 
12382
 ; but on e500v2, the gpr are 64 bit registers
 
12383
 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
 
12384
@@ -424,7 +442,7 @@
 
12385
 ;; either.
 
12386
 
 
12387
 ;; Mode attribute for boolean operation register constraints for output
 
12388
-(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wa,v")
 
12389
+(define_mode_attr BOOL_REGS_OUTPUT     [(TI    "&r,r,r,wt,v")
 
12390
                                         (PTI   "&r,r,r")
 
12391
                                         (V16QI "wa,v,&?r,?r,?r")
 
12392
                                         (V8HI  "wa,v,&?r,?r,?r")
 
12393
@@ -435,7 +453,7 @@
 
12394
                                         (V1TI  "wa,v,&?r,?r,?r")])
 
12395
 
 
12396
 ;; Mode attribute for boolean operation register constraints for operand1
 
12397
-(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wa,v")
 
12398
+(define_mode_attr BOOL_REGS_OP1                [(TI    "r,0,r,wt,v")
 
12399
                                         (PTI   "r,0,r")
 
12400
                                         (V16QI "wa,v,r,0,r")
 
12401
                                         (V8HI  "wa,v,r,0,r")
 
12402
@@ -446,7 +464,7 @@
 
12403
                                         (V1TI  "wa,v,r,0,r")])
 
12404
 
 
12405
 ;; Mode attribute for boolean operation register constraints for operand2
 
12406
-(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wa,v")
 
12407
+(define_mode_attr BOOL_REGS_OP2                [(TI    "r,r,0,wt,v")
 
12408
                                         (PTI   "r,r,0")
 
12409
                                         (V16QI "wa,v,r,r,0")
 
12410
                                         (V8HI  "wa,v,r,r,0")
 
12411
@@ -459,7 +477,7 @@
 
12412
 ;; Mode attribute for boolean operation register constraints for operand1
 
12413
 ;; for one_cmpl.  To simplify things, we repeat the constraint where 0
 
12414
 ;; is used for operand1 or operand2
 
12415
-(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wa,v")
 
12416
+(define_mode_attr BOOL_REGS_UNARY      [(TI    "r,0,0,wt,v")
 
12417
                                         (PTI   "r,0,0")
 
12418
                                         (V16QI "wa,v,r,0,0")
 
12419
                                         (V8HI  "wa,v,r,0,0")
 
12420
@@ -566,7 +584,7 @@
 
12421
   "")
 
12422
 
 
12423
 (define_insn "*zero_extendsidi2_lfiwzx"
 
12424
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
 
12425
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
 
12426
        (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
 
12427
   "TARGET_POWERPC64 && TARGET_LFIWZX"
 
12428
   "@
 
12429
@@ -736,8 +754,8 @@
 
12430
   "")
 
12431
 
 
12432
 (define_insn "*extendsidi2_lfiwax"
 
12433
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
 
12434
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
 
12435
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
 
12436
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
 
12437
   "TARGET_POWERPC64 && TARGET_LFIWAX"
 
12438
   "@
 
12439
    lwa%U1%X1 %0,%1
 
12440
@@ -760,7 +778,7 @@
 
12441
 
 
12442
 (define_insn "*extendsidi2_nocell"
 
12443
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 
12444
-       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
 
12445
+       (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
 
12446
   "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
 
12447
   "@
 
12448
    lwa%U1%X1 %0,%1
 
12449
@@ -5614,7 +5632,7 @@
 
12450
 ; We don't define lfiwax/lfiwzx with the normal definition, because we
 
12451
 ; don't want to support putting SImode in FPR registers.
 
12452
 (define_insn "lfiwax"
 
12453
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
12454
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
12455
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
12456
                   UNSPEC_LFIWAX))]
 
12457
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
 
12458
@@ -5694,7 +5712,7 @@
 
12459
    (set_attr "type" "fpload")])
 
12460
 
 
12461
 (define_insn "lfiwzx"
 
12462
-  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
 
12463
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
 
12464
        (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
 
12465
                   UNSPEC_LFIWZX))]
 
12466
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
 
12467
@@ -9210,8 +9228,8 @@
 
12468
 }")
 
12469
 
 
12470
 (define_insn "mov<mode>_hardfloat"
 
12471
-  [(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")
 
12472
-       (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"))]
 
12473
+  [(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")
 
12474
+       (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"))]
 
12475
   "(gpc_reg_operand (operands[0], <MODE>mode)
 
12476
    || gpc_reg_operand (operands[1], <MODE>mode))
 
12477
    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
 
12478
@@ -9422,8 +9440,8 @@
 
12479
 ;; reloading.
 
12480
 
 
12481
 (define_insn "*mov<mode>_hardfloat32"
 
12482
-  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
 
12483
-       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
 
12484
+  [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
 
12485
+       (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
 
12486
   "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
 
12487
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
12488
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
12489
@@ -9491,8 +9509,8 @@
 
12490
 ; ld/std require word-aligned displacements -> 'Y' constraint.
 
12491
 ; List Y->r and r->Y before r->r for reload.
 
12492
 (define_insn "*mov<mode>_hardfloat64"
 
12493
-  [(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")
 
12494
-       (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"))]
 
12495
+  [(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>")
 
12496
+       (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"))]
 
12497
   "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
 
12498
    && (gpc_reg_operand (operands[0], <MODE>mode)
 
12499
        || gpc_reg_operand (operands[1], <MODE>mode))"
 
12500
@@ -10272,8 +10290,8 @@
 
12501
 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
 
12502
 
 
12503
 (define_insn "*movdi_internal64"
 
12504
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
 
12505
-       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
 
12506
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
 
12507
+       (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
 
12508
   "TARGET_POWERPC64
 
12509
    && (gpc_reg_operand (operands[0], DImode)
 
12510
        || gpc_reg_operand (operands[1], DImode))"
 
12511
@@ -10293,7 +10311,8 @@
 
12512
    mftgpr %0,%1
 
12513
    mffgpr %0,%1
 
12514
    mfvsrd %0,%x1
 
12515
-   mtvsrd %x0,%1"
 
12516
+   mtvsrd %x0,%1
 
12517
+   xxlxor %x0,%x0,%x0"
 
12518
   [(set_attr_alternative "type"
 
12519
       [(if_then_else
 
12520
         (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
 
12521
@@ -10334,8 +10353,9 @@
 
12522
        (const_string "mftgpr")
 
12523
        (const_string "mffgpr")
 
12524
        (const_string "mftgpr")
 
12525
-       (const_string "mffgpr")])
 
12526
-   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
 
12527
+       (const_string "mffgpr")
 
12528
+       (const_string "vecsimple")])
 
12529
+   (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
 
12530
 
 
12531
 ;; immediate value valid for a single instruction hiding in a const_double
 
12532
 (define_insn ""
 
12533
@@ -15751,23 +15771,10 @@
 
12534
 ;; a GPR.  The addis instruction must be adjacent to the load, and use the same
 
12535
 ;; register that is being loaded.  The fused ops must be physically adjacent.
 
12536
 
 
12537
-;; We use define_peephole for the actual addis/load, and the register used to
 
12538
-;; hold the addis value must be the same as the register being loaded.  We use
 
12539
-;; define_peephole2 to change the register used for addis to be the register
 
12540
-;; being loaded, since we can look at whether it is dead after the load insn.
 
12541
+;; Find cases where the addis that feeds into a load instruction is either used
 
12542
+;; once or is the same as the target register, and replace it with the fusion
 
12543
+;; insn
 
12544
 
 
12545
-(define_peephole
 
12546
-  [(set (match_operand:P 0 "base_reg_operand" "")
 
12547
-       (match_operand:P 1 "fusion_gpr_addis" ""))
 
12548
-   (set (match_operand:INT1 2 "base_reg_operand" "")
 
12549
-       (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
12550
-  "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
 
12551
-{
 
12552
-  return emit_fusion_gpr_load (operands);
 
12553
-}
 
12554
-  [(set_attr "type" "load")
 
12555
-   (set_attr "length" "8")])
 
12556
-
 
12557
 (define_peephole2
 
12558
   [(set (match_operand:P 0 "base_reg_operand" "")
 
12559
        (match_operand:P 1 "fusion_gpr_addis" ""))
 
12560
@@ -15774,9 +15781,8 @@
 
12561
    (set (match_operand:INT1 2 "base_reg_operand" "")
 
12562
        (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
 
12563
   "TARGET_P8_FUSION
 
12564
-   && (REGNO (operands[0]) != REGNO (operands[2])
 
12565
-       || GET_CODE (operands[3]) == SIGN_EXTEND)
 
12566
-   && fusion_gpr_load_p (operands, true)"
 
12567
+   && fusion_gpr_load_p (operands[0], operands[1], operands[2],
 
12568
+                        operands[3])"
 
12569
   [(const_int 0)]
 
12570
 {
 
12571
   expand_fusion_gpr_load (operands);
 
12572
@@ -15783,6 +15789,20 @@
 
12573
   DONE;
 
12574
 })
 
12575
 
 
12576
+;; Fusion insn, created by the define_peephole2 above (and eventually by
 
12577
+;; reload)
 
12578
+
 
12579
+(define_insn "fusion_gpr_load_<mode>"
 
12580
+  [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
 
12581
+       (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
 
12582
+                    UNSPEC_FUSION_GPR))]
 
12583
+  "TARGET_P8_FUSION"
 
12584
+{
 
12585
+  return emit_fusion_gpr_load (operands[0], operands[1]);
 
12586
+}
 
12587
+  [(set_attr "type" "load")
 
12588
+   (set_attr "length" "8")])
 
12589
+
 
12590
 
 
12591
 ;; Miscellaneous ISA 2.06 (power7) instructions
 
12592
 (define_insn "addg6s"
 
12593
@@ -15847,26 +15867,6 @@
 
12594
   ""
 
12595
   "")
 
12596
 
 
12597
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
 
12598
-;; and __builtin_longdouble_dw1 to optimize glibc.  Add support for these
 
12599
-;; builtins here.
 
12600
-
 
12601
-(define_expand "unpacktf_0"
 
12602
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
12603
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
12604
-                   (const_int 0)]
 
12605
-        UNSPEC_UNPACK_128BIT))]
 
12606
-  ""
 
12607
-  "")
 
12608
-
 
12609
-(define_expand "unpacktf_1"
 
12610
-  [(set (match_operand:DF 0 "nonimmediate_operand" "")
 
12611
-       (unspec:DF [(match_operand:TF 1 "register_operand" "")
 
12612
-                   (const_int 1)]
 
12613
-        UNSPEC_UNPACK_128BIT))]
 
12614
-  ""
 
12615
-  "")
 
12616
-
 
12617
 (define_insn_and_split "unpack<mode>_dm"
 
12618
   [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
 
12619
        (unspec:<FP128_64>
 
12620
Index: gcc/config/rs6000/sysv4.h
 
12621
===================================================================
 
12622
--- a/src/gcc/config/rs6000/sysv4.h     (.../tags/gcc_4_8_3_release)
 
12623
+++ b/src/gcc/config/rs6000/sysv4.h     (.../branches/gcc-4_8-branch)
 
12624
@@ -292,7 +292,7 @@
 
12625
 /* An expression for the alignment of a structure field FIELD if the
 
12626
    alignment computed in the usual way is COMPUTED.  */
 
12627
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                  \
 
12628
-       ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
 
12629
+       (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED))            \
 
12630
         ? 128 : COMPUTED)
 
12631
 
 
12632
 #undef  BIGGEST_FIELD_ALIGNMENT
 
12633
@@ -949,3 +949,27 @@
 
12634
 #define TARGET_USES_SYSV4_OPT 1
 
12635
 
 
12636
 #undef DBX_REGISTER_NUMBER
 
12637
+
 
12638
+/* Link -lasan early on the command line.  For -static-libasan, don't link
 
12639
+   it for -shared link, the executable should be compiled with -static-libasan
 
12640
+   in that case, and for executable link link with --{,no-}whole-archive around
 
12641
+   it to force everything into the executable.  And similarly for -ltsan.  */
 
12642
+#if defined(HAVE_LD_STATIC_DYNAMIC)
 
12643
+#undef LIBASAN_EARLY_SPEC
 
12644
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
 
12645
+  "%{static-libasan:%{!shared:" \
 
12646
+  LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
 
12647
+  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
 
12648
+#undef LIBTSAN_EARLY_SPEC
 
12649
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
 
12650
+  LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
 
12651
+  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
 
12652
+#endif
 
12653
+
 
12654
+/* Additional libraries needed by -static-libasan.  */
 
12655
+#undef STATIC_LIBASAN_LIBS
 
12656
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
 
12657
+
 
12658
+/* Additional libraries needed by -static-libtsan.  */
 
12659
+#undef STATIC_LIBTSAN_LIBS
 
12660
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
 
12661
Index: gcc/config/arm/arm.c
 
12662
===================================================================
 
12663
--- a/src/gcc/config/arm/arm.c  (.../tags/gcc_4_8_3_release)
 
12664
+++ b/src/gcc/config/arm/arm.c  (.../branches/gcc-4_8-branch)
 
12665
@@ -82,7 +82,6 @@
 
12666
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
 
12667
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
 
12668
 inline static int thumb1_index_register_rtx_p (rtx, int);
 
12669
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
12670
 static int thumb_far_jump_used_p (void);
 
12671
 static bool thumb_force_lr_save (void);
 
12672
 static unsigned arm_size_return_regs (void);
 
12673
@@ -24476,9 +24475,13 @@
 
12674
       fputs (":\n", file);
 
12675
       if (flag_pic)
 
12676
        {
 
12677
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 
12678
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
 
12679
          rtx tem = XEXP (DECL_RTL (function), 0);
 
12680
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
 
12681
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
 
12682
+            pipeline offset is four rather than eight.  Adjust the offset
 
12683
+            accordingly.  */
 
12684
+         tem = plus_constant (GET_MODE (tem), tem,
 
12685
+                              TARGET_THUMB1_ONLY ? -3 : -7);
 
12686
          tem = gen_rtx_MINUS (GET_MODE (tem),
 
12687
                               tem,
 
12688
                               gen_rtx_SYMBOL_REF (Pmode,
 
12689
@@ -27462,4 +27465,13 @@
 
12690
 
 
12691
 }
 
12692
 
 
12693
+/* return TRUE if x is a reference to a value in a constant pool */
 
12694
+extern bool
 
12695
+arm_is_constant_pool_ref (rtx x)
 
12696
+{
 
12697
+  return (MEM_P (x)
 
12698
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
 
12699
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
 
12700
+}
 
12701
+
 
12702
 #include "gt-arm.h"
 
12703
Index: gcc/config/arm/arm.h
 
12704
===================================================================
 
12705
--- a/src/gcc/config/arm/arm.h  (.../tags/gcc_4_8_3_release)
 
12706
+++ b/src/gcc/config/arm/arm.h  (.../branches/gcc-4_8-branch)
 
12707
@@ -2082,9 +2082,10 @@
 
12708
    ? reverse_condition_maybe_unordered (code) \
 
12709
    : reverse_condition (code))
 
12710
 
 
12711
-/* The arm5 clz instruction returns 32.  */
 
12712
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
12713
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
 
12714
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
12715
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
12716
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
 
12717
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 
12718
 
 
12719
 #define CC_STATUS_INIT \
 
12720
   do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
 
12721
Index: gcc/config/arm/arm-protos.h
 
12722
===================================================================
 
12723
--- a/src/gcc/config/arm/arm-protos.h   (.../tags/gcc_4_8_3_release)
 
12724
+++ b/src/gcc/config/arm/arm-protos.h   (.../branches/gcc-4_8-branch)
 
12725
@@ -55,6 +55,7 @@
 
12726
 extern int legitimate_pic_operand_p (rtx);
 
12727
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 
12728
 extern rtx legitimize_tls_address (rtx, rtx);
 
12729
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 
12730
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
 
12731
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
 
12732
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
 
12733
@@ -286,4 +287,6 @@
 
12734
 
 
12735
 extern void arm_emit_eabi_attribute (const char *, int, int);
 
12736
 
 
12737
+extern bool arm_is_constant_pool_ref (rtx);
 
12738
+
 
12739
 #endif /* ! GCC_ARM_PROTOS_H */
 
12740
Index: gcc/config/arm/constraints.md
 
12741
===================================================================
 
12742
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
 
12743
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
 
12744
@@ -36,7 +36,7 @@
 
12745
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
 
12746
 
 
12747
 ;; The following memory constraints have been used:
 
12748
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
 
12749
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
 
12750
 ;; in ARM state: Uq
 
12751
 ;; in Thumb state: Uu, Uw
 
12752
 
 
12753
@@ -310,6 +310,12 @@
 
12754
   An address valid for loading/storing register exclusive"
 
12755
  (match_operand 0 "mem_noofs_operand"))
 
12756
 
 
12757
+(define_memory_constraint "Uh"
 
12758
+ "@internal
 
12759
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
 
12760
+ (and (match_code "mem")
 
12761
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
 
12762
+
 
12763
 (define_memory_constraint "Ut"
 
12764
  "@internal
 
12765
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
 
12766
@@ -356,7 +362,8 @@
 
12767
  (and (match_code "mem")
 
12768
       (match_test "TARGET_ARM
 
12769
                   && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
 
12770
-                                                     SIGN_EXTEND, 0)")))
 
12771
+                                                     SIGN_EXTEND, 0)
 
12772
+                  && !arm_is_constant_pool_ref (op)")))
 
12773
 
 
12774
 (define_memory_constraint "Q"
 
12775
  "@internal
 
12776
Index: gcc/config/arm/arm.md
 
12777
===================================================================
 
12778
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
 
12779
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
 
12780
@@ -4047,7 +4047,7 @@
 
12781
 (define_insn "unaligned_loadhis"
 
12782
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
 
12783
        (sign_extend:SI
 
12784
-         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 
12785
+         (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
 
12786
                     UNSPEC_UNALIGNED_LOAD)))]
 
12787
   "unaligned_access && TARGET_32BIT"
 
12788
   "ldr%(sh%)\t%0, %1\t@ unaligned"
 
12789
@@ -4655,7 +4655,7 @@
 
12790
 
 
12791
 (define_insn "*arm_zero_extendhisi2_v6"
 
12792
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
12793
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
12794
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
12795
   "TARGET_ARM && arm_arch6"
 
12796
   "@
 
12797
    uxth%?\\t%0, %1
 
12798
@@ -4748,7 +4748,7 @@
 
12799
 
 
12800
 (define_insn "*arm_zero_extendqisi2_v6"
 
12801
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
12802
-       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
 
12803
+       (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
 
12804
   "TARGET_ARM && arm_arch6"
 
12805
   "@
 
12806
    uxtb%(%)\\t%0, %1
 
12807
@@ -4980,7 +4980,7 @@
 
12808
 
 
12809
 (define_insn "*arm_extendhisi2"
 
12810
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
12811
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
12812
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
12813
   "TARGET_ARM && arm_arch4 && !arm_arch6"
 
12814
   "@
 
12815
    #
 
12816
@@ -4987,23 +4987,19 @@
 
12817
    ldr%(sh%)\\t%0, %1"
 
12818
   [(set_attr "length" "8,4")
 
12819
    (set_attr "type" "alu_shift,load_byte")
 
12820
-   (set_attr "predicable" "yes")
 
12821
-   (set_attr "pool_range" "*,256")
 
12822
-   (set_attr "neg_pool_range" "*,244")]
 
12823
+   (set_attr "predicable" "yes")]
 
12824
 )
 
12825
 
 
12826
 ;; ??? Check Thumb-2 pool range
 
12827
 (define_insn "*arm_extendhisi2_v6"
 
12828
   [(set (match_operand:SI 0 "s_register_operand" "=r,r")
 
12829
-       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
 
12830
+       (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
 
12831
   "TARGET_32BIT && arm_arch6"
 
12832
   "@
 
12833
    sxth%?\\t%0, %1
 
12834
    ldr%(sh%)\\t%0, %1"
 
12835
   [(set_attr "type" "simple_alu_shift,load_byte")
 
12836
-   (set_attr "predicable" "yes")
 
12837
-   (set_attr "pool_range" "*,256")
 
12838
-   (set_attr "neg_pool_range" "*,244")]
 
12839
+   (set_attr "predicable" "yes")]
 
12840
 )
 
12841
 
 
12842
 (define_insn "*arm_extendhisi2addsi"
 
12843
@@ -5045,9 +5041,7 @@
 
12844
   "TARGET_ARM && arm_arch4"
 
12845
   "ldr%(sb%)\\t%0, %1"
 
12846
   [(set_attr "type" "load_byte")
 
12847
-   (set_attr "predicable" "yes")
 
12848
-   (set_attr "pool_range" "256")
 
12849
-   (set_attr "neg_pool_range" "244")]
 
12850
+   (set_attr "predicable" "yes")]
 
12851
 )
 
12852
 
 
12853
 (define_expand "extendqisi2"
 
12854
@@ -5087,9 +5081,7 @@
 
12855
    ldr%(sb%)\\t%0, %1"
 
12856
   [(set_attr "length" "8,4")
 
12857
    (set_attr "type" "alu_shift,load_byte")
 
12858
-   (set_attr "predicable" "yes")
 
12859
-   (set_attr "pool_range" "*,256")
 
12860
-   (set_attr "neg_pool_range" "*,244")]
 
12861
+   (set_attr "predicable" "yes")]
 
12862
 )
 
12863
 
 
12864
 (define_insn "*arm_extendqisi_v6"
 
12865
@@ -5101,9 +5093,7 @@
 
12866
    sxtb%?\\t%0, %1
 
12867
    ldr%(sb%)\\t%0, %1"
 
12868
   [(set_attr "type" "simple_alu_shift,load_byte")
 
12869
-   (set_attr "predicable" "yes")
 
12870
-   (set_attr "pool_range" "*,256")
 
12871
-   (set_attr "neg_pool_range" "*,244")]
 
12872
+   (set_attr "predicable" "yes")]
 
12873
 )
 
12874
 
 
12875
 (define_insn "*arm_extendqisi2addsi"
 
12876
@@ -7630,12 +7620,13 @@
 
12877
 
 
12878
 (define_insn "*arm_cmpdi_unsigned"
 
12879
   [(set (reg:CC_CZ CC_REGNUM)
 
12880
-       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
 
12881
-                      (match_operand:DI 1 "arm_di_operand"     "rDi")))]
 
12882
+       (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
 
12883
+                      (match_operand:DI 1 "arm_di_operand"     "rDi,rDi")))]
 
12884
   "TARGET_32BIT"
 
12885
   "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
 
12886
   [(set_attr "conds" "set")
 
12887
-   (set_attr "length" "8")]
 
12888
+   (set_attr "arch" "a,t2")
 
12889
+   (set_attr "length" "8,10")]
 
12890
 )
 
12891
 
 
12892
 (define_insn "*arm_cmpdi_zero"
 
12893
Index: gcc/config/arm/t-rtems-eabi
 
12894
===================================================================
 
12895
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_8_3_release)
 
12896
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_8-branch)
 
12897
@@ -1,47 +1,167 @@
 
12898
 # Custom RTEMS EABI multilibs
 
12899
 
 
12900
-MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
 
12901
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
 
12902
+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
 
12903
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
 
12904
 
 
12905
 # Enumeration of multilibs
 
12906
 
 
12907
 MULTILIB_EXCEPTIONS =
 
12908
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
12909
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
 
12910
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
12911
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
 
12912
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12913
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
12914
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
 
12915
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
 
12916
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
12917
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
 
12918
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
12919
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
 
12920
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12921
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
12922
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
 
12923
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
 
12924
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
12925
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
 
12926
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
12927
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
 
12928
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12929
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
12930
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
 
12931
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
 
12932
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
12933
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
 
12934
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
12935
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
 
12936
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12937
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
12938
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
 
12939
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
 
12940
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
 
12941
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
 
12942
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
12943
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
 
12944
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12945
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
 
12946
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
 
12947
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
 
12948
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
12949
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
 
12950
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
12951
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
 
12952
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12953
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
 
12954
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
 
12955
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
 
12956
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
12957
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
 
12958
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
12959
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
 
12960
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12961
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
 
12962
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
 
12963
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
 
12964
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
12965
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
 
12966
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
12967
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
 
12968
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12969
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
 
12970
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
 
12971
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
 
12972
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
12973
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
 
12974
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
12975
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
 
12976
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12977
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
 
12978
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
 
12979
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
 
12980
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
 
12981
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
 
12982
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
 
12983
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
 
12984
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12985
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
 
12986
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
 
12987
+MULTILIB_EXCEPTIONS += mbig-endian
 
12988
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
12989
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
 
12990
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
12991
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
 
12992
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
12993
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
 
12994
 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
 
12995
 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
 
12996
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
12997
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
 
12998
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
12999
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
 
13000
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13001
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
 
13002
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
 
13003
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
 
13004
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13005
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
 
13006
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13007
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
 
13008
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13009
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
 
13010
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
 
13011
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
 
13012
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13013
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
 
13014
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13015
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
 
13016
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13017
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
 
13018
 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
 
13019
 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
 
13020
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
 
13021
 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
 
13022
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
 
13023
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
 
13024
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13025
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
 
13026
 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
 
13027
 # MULTILIB_EXCEPTIONS += mthumb
 
13028
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
 
13029
 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
 
13030
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13031
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
 
13032
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13033
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
 
13034
 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
 
13035
 MULTILIB_EXCEPTIONS += march=armv6-m
 
13036
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
 
13037
 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
 
13038
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
 
13039
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
 
13040
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13041
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
 
13042
 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
 
13043
 MULTILIB_EXCEPTIONS += march=armv7-a
 
13044
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
 
13045
 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
 
13046
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 
13047
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
 
13048
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13049
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
 
13050
 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
 
13051
 MULTILIB_EXCEPTIONS += march=armv7-r
 
13052
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
 
13053
 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
 
13054
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
 
13055
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
 
13056
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13057
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
 
13058
 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
 
13059
 MULTILIB_EXCEPTIONS += march=armv7-m
 
13060
 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
 
13061
 MULTILIB_EXCEPTIONS += mfpu=neon
 
13062
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
 
13063
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
 
13064
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
 
13065
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
 
13066
 MULTILIB_EXCEPTIONS += mfloat-abi=hard
 
13067
Index: gcc/config/pa/pa.md
 
13068
===================================================================
 
13069
--- a/src/gcc/config/pa/pa.md   (.../tags/gcc_4_8_3_release)
 
13070
+++ b/src/gcc/config/pa/pa.md   (.../branches/gcc-4_8-branch)
 
13071
@@ -123,7 +123,7 @@
 
13072
 ;; type "binary" insns have two input operands (1,2) and one output (0)
 
13073
 
 
13074
 (define_attr "type"
 
13075
-  "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload"
 
13076
+  "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload,trap"
 
13077
   (const_string "binary"))
 
13078
 
 
13079
 (define_attr "pa_combine_type"
 
13080
@@ -166,7 +166,7 @@
 
13081
 ;; For conditional branches. Frame related instructions are not allowed
 
13082
 ;; because they confuse the unwind support.
 
13083
 (define_attr "in_branch_delay" "false,true"
 
13084
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
13085
+  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
 
13086
                     (eq_attr "length" "4")
 
13087
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13088
                (const_string "true")
 
13089
@@ -175,7 +175,7 @@
 
13090
 ;; Disallow instructions which use the FPU since they will tie up the FPU
 
13091
 ;; even if the instruction is nullified.
 
13092
 (define_attr "in_nullified_branch_delay" "false,true"
 
13093
-  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
 
13094
+  (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch,trap")
 
13095
                     (eq_attr "length" "4")
 
13096
                     (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13097
                (const_string "true")
 
13098
@@ -184,7 +184,7 @@
 
13099
 ;; For calls and millicode calls.  Allow unconditional branches in the
 
13100
 ;; delay slot.
 
13101
 (define_attr "in_call_delay" "false,true"
 
13102
-  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
 
13103
+  (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
 
13104
              (eq_attr "length" "4")
 
13105
              (not (match_test "RTX_FRAME_RELATED_P (insn)")))
 
13106
           (const_string "true")
 
13107
@@ -5331,6 +5331,15 @@
 
13108
   [(set_attr "type" "binary,binary")
 
13109
    (set_attr "length" "4,4")])
 
13110
 
 
13111
+;; Trap instructions.
 
13112
+
 
13113
+(define_insn "trap"
 
13114
+  [(trap_if (const_int 1) (const_int 0))]
 
13115
+  ""
 
13116
+  "{addit|addi,tc},<> 1,%%r0,%%r0"
 
13117
+  [(set_attr "type" "trap")
 
13118
+   (set_attr "length" "4")])
 
13119
+
 
13120
 ;; Clobbering a "register_operand" instead of a match_scratch
 
13121
 ;; in operand3 of millicode calls avoids spilling %r1 and
 
13122
 ;; produces better code.
 
13123
Index: gcc/config/pa/pa.c
 
13124
===================================================================
 
13125
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_8_3_release)
 
13126
+++ b/src/gcc/config/pa/pa.c    (.../branches/gcc-4_8-branch)
 
13127
@@ -3237,7 +3237,12 @@
 
13128
       && aligned_p
 
13129
       && function_label_operand (x, VOIDmode))
 
13130
     {
 
13131
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
 
13132
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
 
13133
+
 
13134
+      /* We don't want an OPD when generating fast indirect calls.  */
 
13135
+      if (!TARGET_FAST_INDIRECT_CALLS)
 
13136
+       fputs ("P%", asm_out_file);
 
13137
+
 
13138
       output_addr_const (asm_out_file, x);
 
13139
       fputc ('\n', asm_out_file);
 
13140
       return true;
 
13141
@@ -4160,9 +4165,8 @@
 
13142
 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 
13143
 {
 
13144
   rtx insn = get_last_insn ();
 
13145
+  bool extra_nop;
 
13146
 
 
13147
-  last_address = 0;
 
13148
-
 
13149
   /* pa_expand_epilogue does the dirty work now.  We just need
 
13150
      to output the assembler directives which denote the end
 
13151
      of a function.
 
13152
@@ -4185,14 +4189,16 @@
 
13153
   if (insn && GET_CODE (insn) == CALL_INSN)
 
13154
     {
 
13155
       fputs ("\tnop\n", file);
 
13156
-      last_address += 4;
 
13157
+      extra_nop = true;
 
13158
     }
 
13159
+  else
 
13160
+    extra_nop = false;
 
13161
 
 
13162
   fputs ("\t.EXIT\n\t.PROCEND\n", file);
 
13163
 
 
13164
   if (TARGET_SOM && TARGET_GAS)
 
13165
     {
 
13166
-      /* We done with this subspace except possibly for some additional
 
13167
+      /* We are done with this subspace except possibly for some additional
 
13168
         debug information.  Forget that we are in this subspace to ensure
 
13169
         that the next function is output in its own subspace.  */
 
13170
       in_section = NULL;
 
13171
@@ -4199,12 +4205,20 @@
 
13172
       cfun->machine->in_nsubspa = 2;
 
13173
     }
 
13174
 
 
13175
+  /* Thunks do their own insn accounting.  */
 
13176
+  if (cfun->is_thunk)
 
13177
+    return;
 
13178
+
 
13179
   if (INSN_ADDRESSES_SET_P ())
 
13180
     {
 
13181
+      last_address = extra_nop ? 4 : 0;
 
13182
       insn = get_last_nonnote_insn ();
 
13183
-      last_address += INSN_ADDRESSES (INSN_UID (insn));
 
13184
-      if (INSN_P (insn))
 
13185
-       last_address += insn_default_length (insn);
 
13186
+      if (insn)
 
13187
+       {
 
13188
+         last_address += INSN_ADDRESSES (INSN_UID (insn));
 
13189
+         if (INSN_P (insn))
 
13190
+           last_address += insn_default_length (insn);
 
13191
+       }
 
13192
       last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
 
13193
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
 
13194
     }
 
13195
@@ -8270,8 +8284,7 @@
 
13196
   xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
 
13197
   xoperands[2] = GEN_INT (delta);
 
13198
 
 
13199
-  ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
 
13200
-  fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
 
13201
+  final_start_function (emit_barrier (), file, 1);
 
13202
 
 
13203
   /* Output the thunk.  We know that the function is in the same
 
13204
      translation unit (i.e., the same space) as the thunk, and that
 
13205
@@ -8301,12 +8314,16 @@
 
13206
                   || ((DECL_SECTION_NAME (thunk_fndecl)
 
13207
                        == DECL_SECTION_NAME (function))
 
13208
                       && last_address < 262132)))
 
13209
+             /* In this case, we need to be able to reach the start of
 
13210
+                the stub table even though the function is likely closer
 
13211
+                and can be jumped to directly.  */
 
13212
              || (targetm_common.have_named_sections
 
13213
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
 
13214
                  && DECL_SECTION_NAME (function) == NULL
 
13215
-                 && last_address < 262132)
 
13216
+                 && total_code_bytes < MAX_PCREL17F_OFFSET)
 
13217
+             /* Likewise.  */
 
13218
              || (!targetm_common.have_named_sections
 
13219
-                 && last_address < 262132))))
 
13220
+                 && total_code_bytes < MAX_PCREL17F_OFFSET))))
 
13221
     {
 
13222
       if (!val_14)
 
13223
        output_asm_insn ("addil L'%2,%%r26", xoperands);
 
13224
@@ -8477,17 +8494,8 @@
 
13225
        }
 
13226
     }
 
13227
 
 
13228
-  fprintf (file, "\t.EXIT\n\t.PROCEND\n");
 
13229
+  final_end_function ();
 
13230
 
 
13231
-  if (TARGET_SOM && TARGET_GAS)
 
13232
-    {
 
13233
-      /* We done with this subspace except possibly for some additional
 
13234
-        debug information.  Forget that we are in this subspace to ensure
 
13235
-        that the next function is output in its own subspace.  */
 
13236
-      in_section = NULL;
 
13237
-      cfun->machine->in_nsubspa = 2;
 
13238
-    }
 
13239
-
 
13240
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
 
13241
     {
 
13242
       switch_to_section (data_section);
 
13243
Index: gcc/tree-vect-slp.c
 
13244
===================================================================
 
13245
--- a/src/gcc/tree-vect-slp.c   (.../tags/gcc_4_8_3_release)
 
13246
+++ b/src/gcc/tree-vect-slp.c   (.../branches/gcc-4_8-branch)
 
13247
@@ -1837,7 +1837,10 @@
 
13248
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
 
13249
            && !STMT_SLP_TYPE (stmt_vinfo)
 
13250
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
 
13251
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
 
13252
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
 
13253
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
 
13254
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
 
13255
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
 
13256
            && !(gimple_code (use_stmt) == GIMPLE_PHI
 
13257
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
 
13258
                   == vect_reduction_def))
 
13259
@@ -2377,13 +2380,21 @@
 
13260
             neutral_op = build_int_cst (TREE_TYPE (op), -1);
 
13261
             break;
 
13262
 
 
13263
-          case MAX_EXPR:
 
13264
-          case MIN_EXPR:
 
13265
-            def_stmt = SSA_NAME_DEF_STMT (op);
 
13266
-            loop = (gimple_bb (stmt))->loop_father;
 
13267
-            neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
13268
-                                                loop_preheader_edge (loop));
 
13269
-            break;
 
13270
+         /* For MIN/MAX we don't have an easy neutral operand but
 
13271
+            the initial values can be used fine here.  Only for
 
13272
+            a reduction chain we have to force a neutral element.  */
 
13273
+         case MAX_EXPR:
 
13274
+         case MIN_EXPR:
 
13275
+           if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
 
13276
+             neutral_op = NULL;
 
13277
+           else
 
13278
+             {
 
13279
+               def_stmt = SSA_NAME_DEF_STMT (op);
 
13280
+               loop = (gimple_bb (stmt))->loop_father;
 
13281
+               neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
 
13282
+                                                   loop_preheader_edge (loop));
 
13283
+             }
 
13284
+           break;
 
13285
 
 
13286
           default:
 
13287
             neutral_op = NULL;
 
13288
Index: gcc/regcprop.c
 
13289
===================================================================
 
13290
--- a/src/gcc/regcprop.c        (.../tags/gcc_4_8_3_release)
 
13291
+++ b/src/gcc/regcprop.c        (.../branches/gcc-4_8-branch)
 
13292
@@ -1039,7 +1039,17 @@
 
13293
             but instead among CLOBBERs on the CALL_INSN, we could wrongly
 
13294
             assume the value in it is still live.  */
 
13295
          if (ksvd.ignore_set_reg)
 
13296
-           note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
13297
+           {
 
13298
+             note_stores (PATTERN (insn), kill_clobbered_value, vd);
 
13299
+             for (exp = CALL_INSN_FUNCTION_USAGE (insn);
 
13300
+                  exp;
 
13301
+                  exp = XEXP (exp, 1))
 
13302
+               {
 
13303
+                 rtx x = XEXP (exp, 0);
 
13304
+                 if (GET_CODE (x) == CLOBBER)
 
13305
+                   kill_value (SET_DEST (x), vd);
 
13306
+               }
 
13307
+           }
 
13308
        }
 
13309
 
 
13310
       /* Notice stores.  */
 
13311
Index: libobjc/encoding.c
 
13312
===================================================================
 
13313
--- a/src/libobjc/encoding.c    (.../tags/gcc_4_8_3_release)
 
13314
+++ b/src/libobjc/encoding.c    (.../branches/gcc-4_8-branch)
 
13315
@@ -192,6 +192,8 @@
 
13316
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
 
13317
    : MAX (COMPUTED, SPECIFIED));})
 
13318
 
 
13319
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
 
13320
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
 
13321
 
 
13322
 /* Skip a variable name, enclosed in quotes (").  */
 
13323
 static inline
 
13324
Index: libobjc/ChangeLog
 
13325
===================================================================
 
13326
--- a/src/libobjc/ChangeLog     (.../tags/gcc_4_8_3_release)
 
13327
+++ b/src/libobjc/ChangeLog     (.../branches/gcc-4_8-branch)
 
13328
@@ -1,3 +1,16 @@
 
13329
+2014-07-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
13330
+
 
13331
+       PR libobjc/61920
 
13332
+       * encoding.c (rs6000_special_adjust_field_align_p): Use definition
 
13333
+       that matches the 4.8 branch ABI.
 
13334
+
 
13335
+2014-07-27  Alan Modra  <amodra@gmail.com>
 
13336
+           Matthias Klose  <doko@ubuntu.com>
 
13337
+
 
13338
+       PR libobjc/61920
 
13339
+
 
13340
+       * encoding.c: Define rs6000_special_adjust_field_align_p.
 
13341
+
 
13342
 2014-05-22  Release Manager
 
13343
 
 
13344
        * GCC 4.8.3 released.
 
13345
Index: libgfortran/m4/in_pack.m4
 
13346
===================================================================
 
13347
--- a/src/libgfortran/m4/in_pack.m4     (.../tags/gcc_4_8_3_release)
 
13348
+++ b/src/libgfortran/m4/in_pack.m4     (.../branches/gcc-4_8-branch)
 
13349
@@ -79,7 +79,7 @@
 
13350
     return source->base_addr;
 
13351
 
 
13352
   /* Allocate storage for the destination.  */
 
13353
-  destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
 
13354
+  destptr = xmallocarray (ssize, sizeof ('rtype_name`));
 
13355
   dest = destptr;
 
13356
   src = source->base_addr;
 
13357
   stride0 = stride[0];
 
13358
Index: libgfortran/m4/pack.m4
 
13359
===================================================================
 
13360
--- a/src/libgfortran/m4/pack.m4        (.../tags/gcc_4_8_3_release)
 
13361
+++ b/src/libgfortran/m4/pack.m4        (.../branches/gcc-4_8-branch)
 
13362
@@ -168,8 +168,8 @@
 
13363
 
 
13364
          ret->offset = 0;
 
13365
 
 
13366
-         /* xmalloc allocates a single byte for zero size.  */
 
13367
-         ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
 
13368
+         /* xmallocarray allocates a single byte for zero size.  */
 
13369
+         ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
 
13370
 
 
13371
          if (total == 0)
 
13372
            return;
 
13373
Index: libgfortran/m4/spread.m4
 
13374
===================================================================
 
13375
--- a/src/libgfortran/m4/spread.m4      (.../tags/gcc_4_8_3_release)
 
13376
+++ b/src/libgfortran/m4/spread.m4      (.../branches/gcc-4_8-branch)
 
13377
@@ -102,8 +102,8 @@
 
13378
        }
 
13379
       ret->offset = 0;
 
13380
 
 
13381
-      /* xmalloc allocates a single byte for zero size.  */
 
13382
-      ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
 
13383
+      /* xmallocarray allocates a single byte for zero size.  */
 
13384
+      ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
 
13385
       if (rs <= 0)
 
13386
         return;
 
13387
     }
 
13388
@@ -245,7 +245,7 @@
 
13389
 
 
13390
   if (ret->base_addr == NULL)
 
13391
     {
 
13392
-      ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
 
13393
+      ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
 
13394
       ret->offset = 0;
 
13395
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
13396
     }
 
13397
Index: libgfortran/m4/transpose.m4
 
13398
===================================================================
 
13399
--- a/src/libgfortran/m4/transpose.m4   (.../tags/gcc_4_8_3_release)
 
13400
+++ b/src/libgfortran/m4/transpose.m4   (.../branches/gcc-4_8-branch)
 
13401
@@ -61,7 +61,8 @@
 
13402
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
13403
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
13404
 
 
13405
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
 
13406
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
13407
+                                     sizeof ('rtype_name`));
 
13408
       ret->offset = 0;
 
13409
     } else if (unlikely (compile_options.bounds_check))
 
13410
     {
 
13411
Index: libgfortran/m4/iforeach.m4
 
13412
===================================================================
 
13413
--- a/src/libgfortran/m4/iforeach.m4    (.../tags/gcc_4_8_3_release)
 
13414
+++ b/src/libgfortran/m4/iforeach.m4    (.../branches/gcc-4_8-branch)
 
13415
@@ -30,7 +30,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 (rtype_name) * rank);
 
13420
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
13421
     }
 
13422
   else
 
13423
     {
 
13424
@@ -133,7 +133,7 @@
 
13425
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
13426
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13427
       retarray->offset = 0;
 
13428
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
13429
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
13430
     }
 
13431
   else
 
13432
     {
 
13433
@@ -264,7 +264,7 @@
 
13434
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
13435
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
13436
       retarray->offset = 0;
 
13437
-      retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
 
13438
+      retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
 
13439
     }
 
13440
   else if (unlikely (compile_options.bounds_check))
 
13441
     {
 
13442
Index: libgfortran/m4/eoshift1.m4
 
13443
===================================================================
 
13444
--- a/src/libgfortran/m4/eoshift1.m4    (.../tags/gcc_4_8_3_release)
 
13445
+++ b/src/libgfortran/m4/eoshift1.m4    (.../branches/gcc-4_8-branch)
 
13446
@@ -106,8 +106,8 @@
 
13447
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
13448
 
 
13449
         }
 
13450
-      /* xmalloc allocates a single byte for zero size.  */
 
13451
-      ret->base_addr = xmalloc (size * arraysize);
 
13452
+      /* xmallocarray allocates a single byte for zero size.  */
 
13453
+      ret->base_addr = xmallocarray (arraysize, size);
 
13454
 
 
13455
     }
 
13456
   else if (unlikely (compile_options.bounds_check))
 
13457
Index: libgfortran/m4/eoshift3.m4
 
13458
===================================================================
 
13459
--- a/src/libgfortran/m4/eoshift3.m4    (.../tags/gcc_4_8_3_release)
 
13460
+++ b/src/libgfortran/m4/eoshift3.m4    (.../branches/gcc-4_8-branch)
 
13461
@@ -90,7 +90,7 @@
 
13462
     {
 
13463
       int i;
 
13464
 
 
13465
-      ret->base_addr = xmalloc (size * arraysize);
 
13466
+      ret->base_addr = xmallocarray (arraysize, size);
 
13467
       ret->offset = 0;
 
13468
       ret->dtype = array->dtype;
 
13469
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
13470
@@ -108,8 +108,8 @@
 
13471
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
13472
 
 
13473
         }
 
13474
-      /* xmalloc allocates a single byte for zero size.  */
 
13475
-      ret->base_addr = xmalloc (size * arraysize);
 
13476
+      /* xmallocarray allocates a single byte for zero size.  */
 
13477
+      ret->base_addr = xmallocarray (arraysize, size);
 
13478
 
 
13479
     }
 
13480
   else if (unlikely (compile_options.bounds_check))
 
13481
Index: libgfortran/m4/shape.m4
 
13482
===================================================================
 
13483
--- a/src/libgfortran/m4/shape.m4       (.../tags/gcc_4_8_3_release)
 
13484
+++ b/src/libgfortran/m4/shape.m4       (.../branches/gcc-4_8-branch)
 
13485
@@ -50,7 +50,7 @@
 
13486
     {
 
13487
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
13488
       ret->offset = 0;
 
13489
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
 
13490
+      ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
 
13491
     }
 
13492
 
 
13493
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
13494
Index: libgfortran/m4/cshift1.m4
 
13495
===================================================================
 
13496
--- a/src/libgfortran/m4/cshift1.m4     (.../tags/gcc_4_8_3_release)
 
13497
+++ b/src/libgfortran/m4/cshift1.m4     (.../branches/gcc-4_8-branch)
 
13498
@@ -81,7 +81,7 @@
 
13499
     {
 
13500
       int i;
 
13501
 
 
13502
-      ret->base_addr = xmalloc (size * arraysize);
 
13503
+      ret->base_addr = xmallocarray (arraysize, size);
 
13504
       ret->offset = 0;
 
13505
       ret->dtype = array->dtype;
 
13506
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
13507
Index: libgfortran/m4/matmull.m4
 
13508
===================================================================
 
13509
--- a/src/libgfortran/m4/matmull.m4     (.../tags/gcc_4_8_3_release)
 
13510
+++ b/src/libgfortran/m4/matmull.m4     (.../branches/gcc-4_8-branch)
 
13511
@@ -89,7 +89,7 @@
 
13512
         }
 
13513
           
 
13514
       retarray->base_addr
 
13515
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
13516
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
13517
       retarray->offset = 0;
 
13518
     }
 
13519
     else if (unlikely (compile_options.bounds_check))
 
13520
Index: libgfortran/m4/bessel.m4
 
13521
===================================================================
 
13522
--- a/src/libgfortran/m4/bessel.m4      (.../tags/gcc_4_8_3_release)
 
13523
+++ b/src/libgfortran/m4/bessel.m4      (.../branches/gcc-4_8-branch)
 
13524
@@ -56,7 +56,7 @@
 
13525
     {
 
13526
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
13527
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
13528
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
13529
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
13530
       ret->offset = 0;
 
13531
     }
 
13532
 
 
13533
@@ -123,7 +123,7 @@
 
13534
     {
 
13535
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
13536
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
13537
-      ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
 
13538
+      ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
 
13539
       ret->offset = 0;
 
13540
     }
 
13541
 
 
13542
@@ -163,7 +163,7 @@
 
13543
 
 
13544
   x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
 
13545
 
 
13546
-  for (i = 2; i <= n1+n2; i++)
 
13547
+  for (i = 2; i <= n2 - n1; i++)
 
13548
     {
 
13549
 #if defined('rtype_name`_INFINITY)
 
13550
       if (unlikely (last2 == -'rtype_name`_INFINITY))
 
13551
Index: libgfortran/m4/unpack.m4
 
13552
===================================================================
 
13553
--- a/src/libgfortran/m4/unpack.m4      (.../tags/gcc_4_8_3_release)
 
13554
+++ b/src/libgfortran/m4/unpack.m4      (.../branches/gcc-4_8-branch)
 
13555
@@ -100,7 +100,7 @@
 
13556
          rs *= extent[n];
 
13557
        }
 
13558
       ret->offset = 0;
 
13559
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
13560
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
13561
     }
 
13562
   else
 
13563
     {
 
13564
@@ -245,7 +245,7 @@
 
13565
          rs *= extent[n];
 
13566
        }
 
13567
       ret->offset = 0;
 
13568
-      ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
 
13569
+      ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
 
13570
     }
 
13571
   else
 
13572
     {
 
13573
Index: libgfortran/m4/reshape.m4
 
13574
===================================================================
 
13575
--- a/src/libgfortran/m4/reshape.m4     (.../tags/gcc_4_8_3_release)
 
13576
+++ b/src/libgfortran/m4/reshape.m4     (.../branches/gcc-4_8-branch)
 
13577
@@ -115,11 +115,11 @@
 
13578
       ret->offset = 0;
 
13579
 
 
13580
       if (unlikely (rs < 1))
 
13581
-        alloc_size = 1;
 
13582
+        alloc_size = 0;
 
13583
       else
 
13584
-        alloc_size = rs * sizeof ('rtype_name`);
 
13585
+        alloc_size = rs;
 
13586
 
 
13587
-      ret->base_addr = xmalloc (alloc_size);
 
13588
+      ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
 
13589
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
13590
     }
 
13591
 
 
13592
Index: libgfortran/m4/ifunction_logical.m4
 
13593
===================================================================
 
13594
--- a/src/libgfortran/m4/ifunction_logical.m4   (.../tags/gcc_4_8_3_release)
 
13595
+++ b/src/libgfortran/m4/ifunction_logical.m4   (.../branches/gcc-4_8-branch)
 
13596
@@ -89,8 +89,7 @@
 
13597
       retarray->offset = 0;
 
13598
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13599
 
 
13600
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13601
-                  * extent[rank-1];
 
13602
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13603
 
 
13604
       if (alloc_size == 0)
 
13605
        {
 
13606
@@ -99,7 +98,7 @@
 
13607
          return;
 
13608
        }
 
13609
       else
 
13610
-       retarray->base_addr = xmalloc (alloc_size);
 
13611
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
13612
     }
 
13613
   else
 
13614
     {
 
13615
Index: libgfortran/m4/ifunction.m4
 
13616
===================================================================
 
13617
--- a/src/libgfortran/m4/ifunction.m4   (.../tags/gcc_4_8_3_release)
 
13618
+++ b/src/libgfortran/m4/ifunction.m4   (.../branches/gcc-4_8-branch)
 
13619
@@ -85,10 +85,9 @@
 
13620
       retarray->offset = 0;
 
13621
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13622
 
 
13623
-      alloc_size = sizeof (rtype_name) * 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->base_addr = xmalloc (alloc_size);
 
13628
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
13629
       if (alloc_size == 0)
 
13630
        {
 
13631
          /* Make sure we have a zero-sized array.  */
 
13632
@@ -260,8 +259,7 @@
 
13633
 
 
13634
        }
 
13635
 
 
13636
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13637
-                  * extent[rank-1];
 
13638
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13639
 
 
13640
       retarray->offset = 0;
 
13641
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13642
@@ -273,7 +271,7 @@
 
13643
          return;
 
13644
        }
 
13645
       else
 
13646
-       retarray->base_addr = xmalloc (alloc_size);
 
13647
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
13648
 
 
13649
     }
 
13650
   else
 
13651
@@ -417,8 +415,7 @@
 
13652
       retarray->offset = 0;
 
13653
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
13654
 
 
13655
-      alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
13656
-                  * extent[rank-1];
 
13657
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
13658
 
 
13659
       if (alloc_size == 0)
 
13660
        {
 
13661
@@ -427,7 +424,7 @@
 
13662
          return;
 
13663
        }
 
13664
       else
 
13665
-       retarray->base_addr = xmalloc (alloc_size);
 
13666
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
 
13667
     }
 
13668
   else
 
13669
     {
 
13670
Index: libgfortran/m4/matmul.m4
 
13671
===================================================================
 
13672
--- a/src/libgfortran/m4/matmul.m4      (.../tags/gcc_4_8_3_release)
 
13673
+++ b/src/libgfortran/m4/matmul.m4      (.../branches/gcc-4_8-branch)
 
13674
@@ -125,7 +125,7 @@
 
13675
         }
 
13676
 
 
13677
       retarray->base_addr
 
13678
-       = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
 
13679
+       = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
 
13680
       retarray->offset = 0;
 
13681
     }
 
13682
     else if (unlikely (compile_options.bounds_check))
 
13683
Index: libgfortran/configure
 
13684
===================================================================
 
13685
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
 
13686
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
 
13687
@@ -2595,6 +2595,7 @@
 
13688
 as_fn_append ac_func_list " getegid"
 
13689
 as_fn_append ac_func_list " secure_getenv"
 
13690
 as_fn_append ac_func_list " __secure_getenv"
 
13691
+as_fn_append ac_func_list " strtok_r"
 
13692
 as_fn_append ac_header_list " math.h"
 
13693
 # Check that the precious variables saved in the cache have kept the same
 
13694
 # value.
 
13695
@@ -12339,7 +12340,7 @@
 
13696
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
13697
   lt_status=$lt_dlunknown
 
13698
   cat > conftest.$ac_ext <<_LT_EOF
 
13699
-#line 12342 "configure"
 
13700
+#line 12343 "configure"
 
13701
 #include "confdefs.h"
 
13702
 
 
13703
 #if HAVE_DLFCN_H
 
13704
@@ -12445,7 +12446,7 @@
 
13705
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
13706
   lt_status=$lt_dlunknown
 
13707
   cat > conftest.$ac_ext <<_LT_EOF
 
13708
-#line 12448 "configure"
 
13709
+#line 12449 "configure"
 
13710
 #include "confdefs.h"
 
13711
 
 
13712
 #if HAVE_DLFCN_H
 
13713
@@ -16506,6 +16507,8 @@
 
13714
 
 
13715
 
 
13716
 
 
13717
+
 
13718
+
 
13719
 
 
13720
 
 
13721
 
 
13722
Index: libgfortran/runtime/in_pack_generic.c
 
13723
===================================================================
 
13724
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
 
13725
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
 
13726
@@ -180,7 +180,7 @@
 
13727
     return source->base_addr;
 
13728
 
 
13729
    /* Allocate storage for the destination.  */
 
13730
-  destptr = xmalloc (ssize * size);
 
13731
+  destptr = xmallocarray (ssize, size);
 
13732
   dest = (char *)destptr;
 
13733
   src = source->base_addr;
 
13734
   stride0 = stride[0] * size;
 
13735
Index: libgfortran/runtime/memory.c
 
13736
===================================================================
 
13737
--- a/src/libgfortran/runtime/memory.c  (.../tags/gcc_4_8_3_release)
 
13738
+++ b/src/libgfortran/runtime/memory.c  (.../branches/gcc-4_8-branch)
 
13739
@@ -25,8 +25,13 @@
 
13740
 
 
13741
 #include "libgfortran.h"
 
13742
 #include <stdlib.h>
 
13743
+#include <errno.h>
 
13744
 
 
13745
+#ifndef SIZE_MAX
 
13746
+#define SIZE_MAX ((size_t)-1)
 
13747
+#endif
 
13748
 
 
13749
+
 
13750
 void *
 
13751
 xmalloc (size_t n)
 
13752
 {
 
13753
@@ -44,12 +49,34 @@
 
13754
 }
 
13755
 
 
13756
 
 
13757
+void *
 
13758
+xmallocarray (size_t nmemb, size_t size)
 
13759
+{
 
13760
+  void *p;
 
13761
+
 
13762
+  if (!nmemb || !size)
 
13763
+    size = nmemb = 1;
 
13764
+  else if (nmemb > SIZE_MAX / size)
 
13765
+    {
 
13766
+      errno = ENOMEM;
 
13767
+      os_error ("Integer overflow in xmallocarray");
 
13768
+    }
 
13769
+
 
13770
+  p = malloc (nmemb * size);
 
13771
+
 
13772
+  if (!p)
 
13773
+    os_error ("Memory allocation failed in xmallocarray");
 
13774
+
 
13775
+  return p;
 
13776
+}
 
13777
+
 
13778
+
 
13779
 /* calloc wrapper that aborts on error.  */
 
13780
 
 
13781
 void *
 
13782
 xcalloc (size_t nmemb, size_t size)
 
13783
 {
 
13784
-  if (nmemb * size == 0)
 
13785
+  if (!nmemb || !size)
 
13786
     nmemb = size = 1;
 
13787
 
 
13788
   void *p = calloc (nmemb, size);
 
13789
Index: libgfortran/runtime/convert_char.c
 
13790
===================================================================
 
13791
--- a/src/libgfortran/runtime/convert_char.c    (.../tags/gcc_4_8_3_release)
 
13792
+++ b/src/libgfortran/runtime/convert_char.c    (.../branches/gcc-4_8-branch)
 
13793
@@ -44,7 +44,7 @@
 
13794
   gfc_charlen_type i, l;
 
13795
 
 
13796
   l = len > 0 ? len : 0;
 
13797
-  *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
 
13798
+  *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
 
13799
 
 
13800
   for (i = 0; i < l; i++)
 
13801
     (*dst)[i] = src[i];
 
13802
@@ -60,7 +60,7 @@
 
13803
   gfc_charlen_type i, l;
 
13804
 
 
13805
   l = len > 0 ? len : 0;
 
13806
-  *dst = xmalloc ((l + 1) * sizeof (unsigned char));
 
13807
+  *dst = xmalloc (l + 1);
 
13808
 
 
13809
   for (i = 0; i < l; i++)
 
13810
     (*dst)[i] = src[i];
 
13811
Index: libgfortran/runtime/environ.c
 
13812
===================================================================
 
13813
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
 
13814
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
 
13815
@@ -833,7 +833,7 @@
 
13816
     }
 
13817
   else
 
13818
     {
 
13819
-      elist = xmalloc (unit_count * sizeof (exception_t));
 
13820
+      elist = xmallocarray (unit_count, sizeof (exception_t));
 
13821
       do_count = 0;
 
13822
       p = val;
 
13823
       do_parse ();
 
13824
Index: libgfortran/runtime/main.c
 
13825
===================================================================
 
13826
--- a/src/libgfortran/runtime/main.c    (.../tags/gcc_4_8_3_release)
 
13827
+++ b/src/libgfortran/runtime/main.c    (.../branches/gcc-4_8-branch)
 
13828
@@ -153,6 +153,16 @@
 
13829
 }
 
13830
 
 
13831
 
 
13832
+#ifndef HAVE_STRTOK_R
 
13833
+static char*
 
13834
+gfstrtok_r (char *str, const char *delim, 
 
13835
+           char **saveptr __attribute__ ((unused)))
 
13836
+{
 
13837
+  return strtok (str, delim);
 
13838
+}
 
13839
+#define strtok_r gfstrtok_r
 
13840
+#endif
 
13841
+
 
13842
 char *addr2line_path;
 
13843
 
 
13844
 /* Find addr2line and store the path.  */
 
13845
@@ -161,30 +171,32 @@
 
13846
 find_addr2line (void)
 
13847
 {
 
13848
 #ifdef HAVE_ACCESS
 
13849
-#define A2L_LEN 10
 
13850
+#define A2L_LEN 11
 
13851
   char *path = secure_getenv ("PATH");
 
13852
   if (!path)
 
13853
     return;
 
13854
+  char *tp = strdup (path);
 
13855
+  if (!tp)
 
13856
+    return;
 
13857
   size_t n = strlen (path);
 
13858
-  char ap[n + 1 + A2L_LEN];
 
13859
-  size_t ai = 0;
 
13860
-  for (size_t i = 0; i < n; i++)
 
13861
+  char *ap = xmalloc (n + A2L_LEN);
 
13862
+  char *saveptr;
 
13863
+  for (char *str = tp;; str = NULL)
 
13864
     {
 
13865
-      if (path[i] != ':')
 
13866
-       ap[ai++] = path[i];
 
13867
-      else
 
13868
+      char *token = strtok_r (str, ":", &saveptr);
 
13869
+      if (!token)
 
13870
+       break;
 
13871
+      size_t toklen = strlen (token);
 
13872
+      memcpy (ap, token, toklen);
 
13873
+      memcpy (ap + toklen, "/addr2line", A2L_LEN);
 
13874
+      if (access (ap, R_OK|X_OK) == 0)
 
13875
        {
 
13876
-         ap[ai++] = '/';
 
13877
-         memcpy (ap + ai, "addr2line", A2L_LEN);
 
13878
-         if (access (ap, R_OK|X_OK) == 0)
 
13879
-           {
 
13880
-             addr2line_path = strdup (ap);
 
13881
-             return;
 
13882
-           }
 
13883
-         else
 
13884
-           ai = 0;
 
13885
+         addr2line_path = strdup (ap);
 
13886
+         break;
 
13887
        }
 
13888
     }
 
13889
+  free (tp);
 
13890
+  free (ap);
 
13891
 #endif
 
13892
 }
 
13893
 
 
13894
Index: libgfortran/intrinsics/string_intrinsics_inc.c
 
13895
===================================================================
 
13896
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../tags/gcc_4_8_3_release)
 
13897
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c        (.../branches/gcc-4_8-branch)
 
13898
@@ -164,7 +164,7 @@
 
13899
   else
 
13900
     {
 
13901
       /* Allocate space for result string.  */
 
13902
-      *dest = xmalloc (*len * sizeof (CHARTYPE));
 
13903
+      *dest = xmallocarray (*len, sizeof (CHARTYPE));
 
13904
 
 
13905
       /* Copy string if necessary.  */
 
13906
       memcpy (*dest, src, *len * sizeof (CHARTYPE));
 
13907
@@ -442,7 +442,7 @@
 
13908
     *dest = &zero_length_string;
 
13909
   else
 
13910
     {
 
13911
-      CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
 
13912
+      CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
 
13913
       memcpy (tmp, res, reslen * sizeof (CHARTYPE));
 
13914
       MEMSET (&tmp[reslen], ' ', *rlen - reslen);
 
13915
       *dest = tmp;
 
13916
Index: libgfortran/intrinsics/pack_generic.c
 
13917
===================================================================
 
13918
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
 
13919
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
 
13920
@@ -152,8 +152,8 @@
 
13921
          GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
 
13922
 
 
13923
          ret->offset = 0;
 
13924
-         /* xmalloc allocates a single byte for zero size.  */
 
13925
-         ret->base_addr = xmalloc (size * total);
 
13926
+         /* xmallocarray allocates a single byte for zero size.  */
 
13927
+         ret->base_addr = xmallocarray (total, size);
 
13928
 
 
13929
          if (total == 0)
 
13930
            return;      /* In this case, nothing remains to be done.  */
 
13931
@@ -519,7 +519,7 @@
 
13932
 
 
13933
       ret->offset = 0;
 
13934
 
 
13935
-      ret->base_addr = xmalloc (size * total);
 
13936
+      ret->base_addr = xmallocarray (total, size);
 
13937
 
 
13938
       if (total == 0)
 
13939
        return;
 
13940
Index: libgfortran/intrinsics/transpose_generic.c
 
13941
===================================================================
 
13942
--- a/src/libgfortran/intrinsics/transpose_generic.c    (.../tags/gcc_4_8_3_release)
 
13943
+++ b/src/libgfortran/intrinsics/transpose_generic.c    (.../branches/gcc-4_8-branch)
 
13944
@@ -60,7 +60,7 @@
 
13945
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
13946
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
13947
 
 
13948
-      ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
 
13949
+      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
 
13950
       ret->offset = 0;
 
13951
     }
 
13952
   else if (unlikely (compile_options.bounds_check))
 
13953
Index: libgfortran/intrinsics/cshift0.c
 
13954
===================================================================
 
13955
--- a/src/libgfortran/intrinsics/cshift0.c      (.../tags/gcc_4_8_3_release)
 
13956
+++ b/src/libgfortran/intrinsics/cshift0.c      (.../branches/gcc-4_8-branch)
 
13957
@@ -79,8 +79,8 @@
 
13958
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
13959
         }
 
13960
 
 
13961
-      /* xmalloc allocates a single byte for zero size.  */
 
13962
-      ret->base_addr = xmalloc (size * arraysize);
 
13963
+      /* xmallocarray allocates a single byte for zero size.  */
 
13964
+      ret->base_addr = xmallocarray (arraysize, size);
 
13965
     }
 
13966
   else if (unlikely (compile_options.bounds_check))
 
13967
     {
 
13968
Index: libgfortran/intrinsics/ctime.c
 
13969
===================================================================
 
13970
--- a/src/libgfortran/intrinsics/ctime.c        (.../tags/gcc_4_8_3_release)
 
13971
+++ b/src/libgfortran/intrinsics/ctime.c        (.../branches/gcc-4_8-branch)
 
13972
@@ -31,31 +31,53 @@
 
13973
 #include <string.h>
 
13974
 
 
13975
 
 
13976
-/* strftime-like function that fills a C string with %c format which
 
13977
-   is identical to ctime in the default locale. As ctime and ctime_r
 
13978
-   are poorly specified and their usage not recommended, the
 
13979
-   implementation instead uses strftime.  */
 
13980
+/* Maximum space a ctime-like string might need. A "normal" ctime
 
13981
+   string is 26 bytes, and in our case 24 bytes as we don't include
 
13982
+   the trailing newline and null. However, the longest possible year
 
13983
+   number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
 
13984
+   32-bit signed integer) so an extra 7 bytes are needed. */
 
13985
+#define CTIME_BUFSZ 31
 
13986
 
 
13987
-static size_t
 
13988
-strctime (char *s, size_t max, const time_t *timep)
 
13989
+
 
13990
+/* Thread-safe ctime-like function that fills a Fortran
 
13991
+   string. ctime_r is a portability headache and marked as obsolescent
 
13992
+   in POSIX 2008, which recommends strftime in its place. However,
 
13993
+   strftime(..., "%c",...)  doesn't produce ctime-like output on
 
13994
+   MinGW, so do it manually with snprintf.  */
 
13995
+
 
13996
+static int
 
13997
+gf_ctime (char *s, size_t max, const time_t timev)
 
13998
 {
 
13999
   struct tm ltm;
 
14000
   int failed;
 
14001
+  char buf[CTIME_BUFSZ + 1];
 
14002
   /* Some targets provide a localtime_r based on a draft of the POSIX
 
14003
      standard where the return type is int rather than the
 
14004
      standardized struct tm*.  */
 
14005
-  __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, &ltm)) 
 
14006
+  __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, &ltm)) 
 
14007
                         == 5,
 
14008
-                        failed = localtime_r (timep, &ltm) == NULL,
 
14009
-                        failed = localtime_r (timep, &ltm) != 0);
 
14010
+                        failed = localtime_r (&timev, &ltm) == NULL,
 
14011
+                        failed = localtime_r (&timev, &ltm) != 0);
 
14012
   if (failed)
 
14013
-    return 0;
 
14014
-  return strftime (s, max, "%c", &ltm);
 
14015
+    goto blank;
 
14016
+  int n = snprintf (buf, sizeof (buf), 
 
14017
+                   "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
 
14018
+                   "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
 
14019
+                   "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
 
14020
+                   ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 
 
14021
+                   1900 + ltm.tm_year);
 
14022
+  if (n < 0)
 
14023
+    goto blank;
 
14024
+  if ((size_t) n <= max)
 
14025
+    {
 
14026
+      cf_strcpy (s, max, buf);
 
14027
+      return n;
 
14028
+    }
 
14029
+ blank:
 
14030
+  memset (s, ' ', max);
 
14031
+  return 0;
 
14032
 }
 
14033
 
 
14034
-/* In the default locale, the date and time representation fits in 26
 
14035
-   bytes. However, other locales might need more space.  */
 
14036
-#define CSZ 100
 
14037
 
 
14038
 extern void fdate (char **, gfc_charlen_type *);
 
14039
 export_proto(fdate);
 
14040
@@ -64,8 +86,8 @@
 
14041
 fdate (char ** date, gfc_charlen_type * date_len)
 
14042
 {
 
14043
   time_t now = time(NULL);
 
14044
-  *date = xmalloc (CSZ);
 
14045
-  *date_len = strctime (*date, CSZ, &now);
 
14046
+  *date = xmalloc (CTIME_BUFSZ);
 
14047
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
14048
 }
 
14049
 
 
14050
 
 
14051
@@ -76,10 +98,7 @@
 
14052
 fdate_sub (char * date, gfc_charlen_type date_len)
 
14053
 {
 
14054
   time_t now = time(NULL);
 
14055
-  char *s = xmalloc (date_len + 1);
 
14056
-  size_t n = strctime (s, date_len + 1, &now);
 
14057
-  fstrcpy (date, date_len, s, n);
 
14058
-  free (s);
 
14059
+  gf_ctime (date, date_len, now);
 
14060
 }
 
14061
 
 
14062
 
 
14063
@@ -91,8 +110,8 @@
 
14064
 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
 
14065
 {
 
14066
   time_t now = t;
 
14067
-  *date = xmalloc (CSZ);
 
14068
-  *date_len = strctime (*date, CSZ, &now);
 
14069
+  *date = xmalloc (CTIME_BUFSZ);
 
14070
+  *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
 
14071
 }
 
14072
 
 
14073
 
 
14074
@@ -103,8 +122,5 @@
 
14075
 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
 
14076
 {
 
14077
   time_t now = *t;
 
14078
-  char *s = xmalloc (date_len + 1);
 
14079
-  size_t n = strctime (s, date_len + 1, &now);
 
14080
-  fstrcpy (date, date_len, s, n);
 
14081
-  free (s);
 
14082
+  gf_ctime (date, date_len, now);
 
14083
 }
 
14084
Index: libgfortran/intrinsics/spread_generic.c
 
14085
===================================================================
 
14086
--- a/src/libgfortran/intrinsics/spread_generic.c       (.../tags/gcc_4_8_3_release)
 
14087
+++ b/src/libgfortran/intrinsics/spread_generic.c       (.../branches/gcc-4_8-branch)
 
14088
@@ -100,7 +100,7 @@
 
14089
          GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
 
14090
        }
 
14091
       ret->offset = 0;
 
14092
-      ret->base_addr = xmalloc (rs * size);
 
14093
+      ret->base_addr = xmallocarray (rs, size);
 
14094
 
 
14095
       if (rs <= 0)
 
14096
        return;
 
14097
@@ -245,7 +245,7 @@
 
14098
 
 
14099
   if (ret->base_addr == NULL)
 
14100
     {
 
14101
-      ret->base_addr = xmalloc (ncopies * size);
 
14102
+      ret->base_addr = xmallocarray (ncopies, size);
 
14103
       ret->offset = 0;
 
14104
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14105
     }
 
14106
Index: libgfortran/intrinsics/unpack_generic.c
 
14107
===================================================================
 
14108
--- a/src/libgfortran/intrinsics/unpack_generic.c       (.../tags/gcc_4_8_3_release)
 
14109
+++ b/src/libgfortran/intrinsics/unpack_generic.c       (.../branches/gcc-4_8-branch)
 
14110
@@ -125,7 +125,7 @@
 
14111
          rs *= extent[n];
 
14112
        }
 
14113
       ret->offset = 0;
 
14114
-      ret->base_addr = xmalloc (rs * size);
 
14115
+      ret->base_addr = xmallocarray (rs, size);
 
14116
     }
 
14117
   else
 
14118
     {
 
14119
Index: libgfortran/intrinsics/eoshift0.c
 
14120
===================================================================
 
14121
--- a/src/libgfortran/intrinsics/eoshift0.c     (.../tags/gcc_4_8_3_release)
 
14122
+++ b/src/libgfortran/intrinsics/eoshift0.c     (.../branches/gcc-4_8-branch)
 
14123
@@ -86,8 +86,8 @@
 
14124
 
 
14125
         }
 
14126
 
 
14127
-      /* xmalloc allocates a single byte for zero size.  */
 
14128
-      ret->base_addr = xmalloc (size * arraysize);
 
14129
+      /* xmallocarray allocates a single byte for zero size.  */
 
14130
+      ret->base_addr = xmallocarray (arraysize, size);
 
14131
     }
 
14132
   else if (unlikely (compile_options.bounds_check))
 
14133
     {
 
14134
Index: libgfortran/intrinsics/eoshift2.c
 
14135
===================================================================
 
14136
--- a/src/libgfortran/intrinsics/eoshift2.c     (.../tags/gcc_4_8_3_release)
 
14137
+++ b/src/libgfortran/intrinsics/eoshift2.c     (.../branches/gcc-4_8-branch)
 
14138
@@ -78,8 +78,8 @@
 
14139
       ret->offset = 0;
 
14140
       ret->dtype = array->dtype;
 
14141
 
 
14142
-      /* xmalloc allocates a single byte for zero size.  */
 
14143
-      ret->base_addr = xmalloc (size * arraysize);
 
14144
+      /* xmallocarray allocates a single byte for zero size.  */
 
14145
+      ret->base_addr = xmallocarray (arraysize, size);
 
14146
 
 
14147
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14148
         {
 
14149
Index: libgfortran/intrinsics/reshape_generic.c
 
14150
===================================================================
 
14151
--- a/src/libgfortran/intrinsics/reshape_generic.c      (.../tags/gcc_4_8_3_release)
 
14152
+++ b/src/libgfortran/intrinsics/reshape_generic.c      (.../branches/gcc-4_8-branch)
 
14153
@@ -99,11 +99,11 @@
 
14154
       ret->offset = 0;
 
14155
 
 
14156
       if (unlikely (rs < 1))
 
14157
-       alloc_size = 1;
 
14158
+       alloc_size = 0; /* xmalloc will allocate 1 byte.  */
 
14159
       else
 
14160
-       alloc_size = rs * size;
 
14161
+       alloc_size = rs;
 
14162
 
 
14163
-      ret->base_addr = xmalloc (alloc_size);
 
14164
+      ret->base_addr = xmallocarray (alloc_size, size);
 
14165
 
 
14166
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
14167
     }
 
14168
Index: libgfortran/configure.ac
 
14169
===================================================================
 
14170
--- a/src/libgfortran/configure.ac      (.../tags/gcc_4_8_3_release)
 
14171
+++ b/src/libgfortran/configure.ac      (.../branches/gcc-4_8-branch)
 
14172
@@ -267,7 +267,7 @@
 
14173
 strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
 
14174
 getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
 
14175
 readlink getgid getpid getppid getuid geteuid umask getegid \
 
14176
-secure_getenv __secure_getenv)
 
14177
+secure_getenv __secure_getenv strtok_r)
 
14178
 
 
14179
 # Check strerror_r, cannot be above as versions with two and three arguments exist
 
14180
 LIBGFOR_CHECK_STRERROR_R
 
14181
Index: libgfortran/ChangeLog
 
14182
===================================================================
 
14183
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
 
14184
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
 
14185
@@ -1,3 +1,94 @@
 
14186
+2014-10-20  Janne Blomqvist  <jb@gcc.gnu.org>
 
14187
+
 
14188
+       PR libfortran/63589
 
14189
+       * configure.ac: Check for strtok_r.
 
14190
+       * runtime/main.c (gfstrtok_r): Fallback implementation of
 
14191
+       strtok_r.
 
14192
+       (find_addr2line): Use strtok_r to split PATH.
 
14193
+       * config.h.in: Regenerated.
 
14194
+       * configure: Regenerated.
 
14195
+
 
14196
+2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
 
14197
+
 
14198
+       PR libgfortran/62188
 
14199
+       * m4/bessel.m4: Avoid indexing off the end of an array.
 
14200
+       * generated/bessel_r10.c: Regenerated.
 
14201
+       * generated/bessel_r16.c: Ditto.
 
14202
+       * generated/bessel_r4.c: Ditto.
 
14203
+       * generated/bessel_r8.c: Ditto.
 
14204
+
 
14205
+2014-07-31  Janne Blomqvist  <jb@gcc.gnu.org>
 
14206
+
 
14207
+       Backport from mainline
 
14208
+       CVE-2014-5044
 
14209
+        * libgfortran.h (xmallocarray): New prototype.
 
14210
+        * runtime/memory.c (xmallocarray): New function.
 
14211
+        (xcalloc): Check for nonzero separately instead of multiplying.
 
14212
+        * generated/*.c: Regenerated.
 
14213
+        * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
 
14214
+        xmalloc.
 
14215
+        * intrinsics/eoshift0.c (eoshift0): Likewise.
 
14216
+        * intrinsics/eoshift2.c (eoshift2): Likewise.
 
14217
+        * intrinsics/pack_generic.c (pack_internal): Likewise.
 
14218
+        (pack_s_internal): Likewise.
 
14219
+        * intrinsics/reshape_generic.c (reshape_internal): Likewise.
 
14220
+        * intrinsics/spread_generic.c (spread_internal): Likewise.
 
14221
+        (spread_internal_scalar): Likewise.
 
14222
+        * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
 
14223
+        (string_minmax): Likewise.
 
14224
+        * intrinsics/transpose_generic.c (transpose_internal): Likewise.
 
14225
+        * intrinsics/unpack_generic.c (unpack_internal): Likewise.
 
14226
+        * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
 
14227
+        * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
 
14228
+        xmalloc.
 
14229
+        * io/unit.c (get_internal_unit): Likewise.
 
14230
+        (filename_from_unit): Don't cast xmalloc return value.
 
14231
+        * io/write.c (nml_write_obj): Likewise, formatting.
 
14232
+        * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
 
14233
+        instead of xmalloc.
 
14234
+        (besse_yn_r'rtype_kind`): Likewise.
 
14235
+        * m4/cshift1.m4 (cshift1): Likewise.
 
14236
+        * m4/eoshift1.m4 (eoshift1): Likewise.
 
14237
+        * m4/eoshift3.m4 (eoshift3): Likewise.
 
14238
+        * m4/iforeach.m4: Likewise.
 
14239
+        * m4/ifunction.m4: Likewise.
 
14240
+        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
 
14241
+        Likewise.
 
14242
+        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
 
14243
+        * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
 
14244
+        * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
 
14245
+        * m4/pack.m4 (pack_'rtype_code`): Likewise.
 
14246
+        * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
 
14247
+        * m4/shape.m4 (shape_'rtype_kind`): Likewise.
 
14248
+        * m4/spread.m4 (spread_'rtype_code`): Likewise.
 
14249
+        (spread_scalar_'rtype_code`): Likewise.
 
14250
+        * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
 
14251
+        * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
 
14252
+        (unpack1_'rtype_code`): Likewise.
 
14253
+        * runtime/convert_char.c (convert_char1_to_char4): Likewise.
 
14254
+        (convert_char4_to_char1): Simplify.
 
14255
+        * runtime/environ.c (init_unformatted): Call xmallocarray instead
 
14256
+        of xmalloc.
 
14257
+        * runtime/in_pack_generic.c (internal_pack): Likewise.
 
14258
+
 
14259
+2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
 
14260
+
 
14261
+       Backport from mainline
 
14262
+       PR libfortran/61310
 
14263
+       * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
 
14264
+       instead of strftime.
 
14265
+       (fdate): Use gf_ctime.
 
14266
+       (fdate_sub): Likewise.
 
14267
+       (ctime): Likewise.
 
14268
+       (ctime_sub): Likewise.
 
14269
+
 
14270
+2014-05-25  Janne Blomqvist  <jb@gcc.gnu.org>
 
14271
+
 
14272
+       Backport from trunk.
 
14273
+       PR libfortran/61187
 
14274
+       * io/unix.c (raw_close): Check if s->fd is -1.
 
14275
+       (fd_to_stream): Check return value of fstat(), handle error.
 
14276
+
 
14277
 2014-05-22  Release Manager
 
14278
 
 
14279
        * GCC 4.8.3 released.
 
14280
Index: libgfortran/generated/spread_r10.c
 
14281
===================================================================
 
14282
--- a/src/libgfortran/generated/spread_r10.c    (.../tags/gcc_4_8_3_release)
 
14283
+++ b/src/libgfortran/generated/spread_r10.c    (.../branches/gcc-4_8-branch)
 
14284
@@ -101,8 +101,8 @@
 
14285
        }
 
14286
       ret->offset = 0;
 
14287
 
 
14288
-      /* xmalloc allocates a single byte for zero size.  */
 
14289
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
 
14290
+      /* xmallocarray allocates a single byte for zero size.  */
 
14291
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
 
14292
       if (rs <= 0)
 
14293
         return;
 
14294
     }
 
14295
@@ -244,7 +244,7 @@
 
14296
 
 
14297
   if (ret->base_addr == NULL)
 
14298
     {
 
14299
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
 
14300
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
 
14301
       ret->offset = 0;
 
14302
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
14303
     }
 
14304
Index: libgfortran/generated/maxloc1_4_r8.c
 
14305
===================================================================
 
14306
--- a/src/libgfortran/generated/maxloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
14307
+++ b/src/libgfortran/generated/maxloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
14308
@@ -98,10 +98,9 @@
 
14309
       retarray->offset = 0;
 
14310
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14311
 
 
14312
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14313
-                  * extent[rank-1];
 
14314
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14315
 
 
14316
-      retarray->base_addr = xmalloc (alloc_size);
 
14317
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14318
       if (alloc_size == 0)
 
14319
        {
 
14320
          /* Make sure we have a zero-sized array.  */
 
14321
@@ -294,8 +293,7 @@
 
14322
 
 
14323
        }
 
14324
 
 
14325
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14326
-                  * extent[rank-1];
 
14327
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14328
 
 
14329
       retarray->offset = 0;
 
14330
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14331
@@ -307,7 +305,7 @@
 
14332
          return;
 
14333
        }
 
14334
       else
 
14335
-       retarray->base_addr = xmalloc (alloc_size);
 
14336
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14337
 
 
14338
     }
 
14339
   else
 
14340
@@ -485,8 +483,7 @@
 
14341
       retarray->offset = 0;
 
14342
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14343
 
 
14344
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14345
-                  * extent[rank-1];
 
14346
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14347
 
 
14348
       if (alloc_size == 0)
 
14349
        {
 
14350
@@ -495,7 +492,7 @@
 
14351
          return;
 
14352
        }
 
14353
       else
 
14354
-       retarray->base_addr = xmalloc (alloc_size);
 
14355
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14356
     }
 
14357
   else
 
14358
     {
 
14359
Index: libgfortran/generated/norm2_r4.c
 
14360
===================================================================
 
14361
--- a/src/libgfortran/generated/norm2_r4.c      (.../tags/gcc_4_8_3_release)
 
14362
+++ b/src/libgfortran/generated/norm2_r4.c      (.../branches/gcc-4_8-branch)
 
14363
@@ -101,10 +101,9 @@
 
14364
       retarray->offset = 0;
 
14365
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14366
 
 
14367
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14368
-                  * extent[rank-1];
 
14369
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14370
 
 
14371
-      retarray->base_addr = xmalloc (alloc_size);
 
14372
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14373
       if (alloc_size == 0)
 
14374
        {
 
14375
          /* Make sure we have a zero-sized array.  */
 
14376
Index: libgfortran/generated/parity_l2.c
 
14377
===================================================================
 
14378
--- a/src/libgfortran/generated/parity_l2.c     (.../tags/gcc_4_8_3_release)
 
14379
+++ b/src/libgfortran/generated/parity_l2.c     (.../branches/gcc-4_8-branch)
 
14380
@@ -98,10 +98,9 @@
 
14381
       retarray->offset = 0;
 
14382
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14383
 
 
14384
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14385
-                  * extent[rank-1];
 
14386
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14387
 
 
14388
-      retarray->base_addr = xmalloc (alloc_size);
 
14389
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
14390
       if (alloc_size == 0)
 
14391
        {
 
14392
          /* Make sure we have a zero-sized array.  */
 
14393
Index: libgfortran/generated/eoshift3_4.c
 
14394
===================================================================
 
14395
--- a/src/libgfortran/generated/eoshift3_4.c    (.../tags/gcc_4_8_3_release)
 
14396
+++ b/src/libgfortran/generated/eoshift3_4.c    (.../branches/gcc-4_8-branch)
 
14397
@@ -89,7 +89,7 @@
 
14398
     {
 
14399
       int i;
 
14400
 
 
14401
-      ret->base_addr = xmalloc (size * arraysize);
 
14402
+      ret->base_addr = xmallocarray (arraysize, size);
 
14403
       ret->offset = 0;
 
14404
       ret->dtype = array->dtype;
 
14405
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
14406
@@ -107,8 +107,8 @@
 
14407
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14408
 
 
14409
         }
 
14410
-      /* xmalloc allocates a single byte for zero size.  */
 
14411
-      ret->base_addr = xmalloc (size * arraysize);
 
14412
+      /* xmallocarray allocates a single byte for zero size.  */
 
14413
+      ret->base_addr = xmallocarray (arraysize, size);
 
14414
 
 
14415
     }
 
14416
   else if (unlikely (compile_options.bounds_check))
 
14417
Index: libgfortran/generated/transpose_c8.c
 
14418
===================================================================
 
14419
--- a/src/libgfortran/generated/transpose_c8.c  (.../tags/gcc_4_8_3_release)
 
14420
+++ b/src/libgfortran/generated/transpose_c8.c  (.../branches/gcc-4_8-branch)
 
14421
@@ -60,7 +60,8 @@
 
14422
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
14423
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
14424
 
 
14425
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
 
14426
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
14427
+                                     sizeof (GFC_COMPLEX_8));
 
14428
       ret->offset = 0;
 
14429
     } else if (unlikely (compile_options.bounds_check))
 
14430
     {
 
14431
Index: libgfortran/generated/eoshift1_8.c
 
14432
===================================================================
 
14433
--- a/src/libgfortran/generated/eoshift1_8.c    (.../tags/gcc_4_8_3_release)
 
14434
+++ b/src/libgfortran/generated/eoshift1_8.c    (.../branches/gcc-4_8-branch)
 
14435
@@ -105,8 +105,8 @@
 
14436
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
14437
 
 
14438
         }
 
14439
-      /* xmalloc allocates a single byte for zero size.  */
 
14440
-      ret->base_addr = xmalloc (size * arraysize);
 
14441
+      /* xmallocarray allocates a single byte for zero size.  */
 
14442
+      ret->base_addr = xmallocarray (arraysize, size);
 
14443
 
 
14444
     }
 
14445
   else if (unlikely (compile_options.bounds_check))
 
14446
Index: libgfortran/generated/reshape_r16.c
 
14447
===================================================================
 
14448
--- a/src/libgfortran/generated/reshape_r16.c   (.../tags/gcc_4_8_3_release)
 
14449
+++ b/src/libgfortran/generated/reshape_r16.c   (.../branches/gcc-4_8-branch)
 
14450
@@ -111,11 +111,11 @@
 
14451
       ret->offset = 0;
 
14452
 
 
14453
       if (unlikely (rs < 1))
 
14454
-        alloc_size = 1;
 
14455
+        alloc_size = 0;
 
14456
       else
 
14457
-        alloc_size = rs * sizeof (GFC_REAL_16);
 
14458
+        alloc_size = rs;
 
14459
 
 
14460
-      ret->base_addr = xmalloc (alloc_size);
 
14461
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
14462
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
14463
     }
 
14464
 
 
14465
Index: libgfortran/generated/bessel_r4.c
 
14466
===================================================================
 
14467
--- a/src/libgfortran/generated/bessel_r4.c     (.../tags/gcc_4_8_3_release)
 
14468
+++ b/src/libgfortran/generated/bessel_r4.c     (.../branches/gcc-4_8-branch)
 
14469
@@ -55,7 +55,7 @@
 
14470
     {
 
14471
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14472
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14473
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
14474
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
14475
       ret->offset = 0;
 
14476
     }
 
14477
 
 
14478
@@ -122,7 +122,7 @@
 
14479
     {
 
14480
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
14481
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
14482
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
 
14483
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
 
14484
       ret->offset = 0;
 
14485
     }
 
14486
 
 
14487
@@ -162,7 +162,7 @@
 
14488
 
 
14489
   x2rev = GFC_REAL_4_LITERAL(2.)/x;
 
14490
 
 
14491
-  for (i = 2; i <= n1+n2; i++)
 
14492
+  for (i = 2; i <= n2 - n1; i++)
 
14493
     {
 
14494
 #if defined(GFC_REAL_4_INFINITY)
 
14495
       if (unlikely (last2 == -GFC_REAL_4_INFINITY))
 
14496
Index: libgfortran/generated/any_l2.c
 
14497
===================================================================
 
14498
--- a/src/libgfortran/generated/any_l2.c        (.../tags/gcc_4_8_3_release)
 
14499
+++ b/src/libgfortran/generated/any_l2.c        (.../branches/gcc-4_8-branch)
 
14500
@@ -101,8 +101,7 @@
 
14501
       retarray->offset = 0;
 
14502
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14503
 
 
14504
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14505
-                  * extent[rank-1];
 
14506
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14507
 
 
14508
       if (alloc_size == 0)
 
14509
        {
 
14510
@@ -111,7 +110,7 @@
 
14511
          return;
 
14512
        }
 
14513
       else
 
14514
-       retarray->base_addr = xmalloc (alloc_size);
 
14515
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
14516
     }
 
14517
   else
 
14518
     {
 
14519
Index: libgfortran/generated/product_r4.c
 
14520
===================================================================
 
14521
--- a/src/libgfortran/generated/product_r4.c    (.../tags/gcc_4_8_3_release)
 
14522
+++ b/src/libgfortran/generated/product_r4.c    (.../branches/gcc-4_8-branch)
 
14523
@@ -97,10 +97,9 @@
 
14524
       retarray->offset = 0;
 
14525
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14526
 
 
14527
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14528
-                  * extent[rank-1];
 
14529
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14530
 
 
14531
-      retarray->base_addr = xmalloc (alloc_size);
 
14532
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14533
       if (alloc_size == 0)
 
14534
        {
 
14535
          /* Make sure we have a zero-sized array.  */
 
14536
@@ -272,8 +271,7 @@
 
14537
 
 
14538
        }
 
14539
 
 
14540
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14541
-                  * extent[rank-1];
 
14542
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14543
 
 
14544
       retarray->offset = 0;
 
14545
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14546
@@ -285,7 +283,7 @@
 
14547
          return;
 
14548
        }
 
14549
       else
 
14550
-       retarray->base_addr = xmalloc (alloc_size);
 
14551
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14552
 
 
14553
     }
 
14554
   else
 
14555
@@ -430,8 +428,7 @@
 
14556
       retarray->offset = 0;
 
14557
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14558
 
 
14559
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14560
-                  * extent[rank-1];
 
14561
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14562
 
 
14563
       if (alloc_size == 0)
 
14564
        {
 
14565
@@ -440,7 +437,7 @@
 
14566
          return;
 
14567
        }
 
14568
       else
 
14569
-       retarray->base_addr = xmalloc (alloc_size);
 
14570
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
14571
     }
 
14572
   else
 
14573
     {
 
14574
Index: libgfortran/generated/iany_i1.c
 
14575
===================================================================
 
14576
--- a/src/libgfortran/generated/iany_i1.c       (.../tags/gcc_4_8_3_release)
 
14577
+++ b/src/libgfortran/generated/iany_i1.c       (.../branches/gcc-4_8-branch)
 
14578
@@ -97,10 +97,9 @@
 
14579
       retarray->offset = 0;
 
14580
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14581
 
 
14582
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14583
-                  * extent[rank-1];
 
14584
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14585
 
 
14586
-      retarray->base_addr = xmalloc (alloc_size);
 
14587
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14588
       if (alloc_size == 0)
 
14589
        {
 
14590
          /* Make sure we have a zero-sized array.  */
 
14591
@@ -272,8 +271,7 @@
 
14592
 
 
14593
        }
 
14594
 
 
14595
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14596
-                  * extent[rank-1];
 
14597
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14598
 
 
14599
       retarray->offset = 0;
 
14600
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14601
@@ -285,7 +283,7 @@
 
14602
          return;
 
14603
        }
 
14604
       else
 
14605
-       retarray->base_addr = xmalloc (alloc_size);
 
14606
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14607
 
 
14608
     }
 
14609
   else
 
14610
@@ -430,8 +428,7 @@
 
14611
       retarray->offset = 0;
 
14612
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14613
 
 
14614
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14615
-                  * extent[rank-1];
 
14616
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14617
 
 
14618
       if (alloc_size == 0)
 
14619
        {
 
14620
@@ -440,7 +437,7 @@
 
14621
          return;
 
14622
        }
 
14623
       else
 
14624
-       retarray->base_addr = xmalloc (alloc_size);
 
14625
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
14626
     }
 
14627
   else
 
14628
     {
 
14629
Index: libgfortran/generated/parity_l16.c
 
14630
===================================================================
 
14631
--- a/src/libgfortran/generated/parity_l16.c    (.../tags/gcc_4_8_3_release)
 
14632
+++ b/src/libgfortran/generated/parity_l16.c    (.../branches/gcc-4_8-branch)
 
14633
@@ -98,10 +98,9 @@
 
14634
       retarray->offset = 0;
 
14635
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14636
 
 
14637
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14638
-                  * extent[rank-1];
 
14639
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14640
 
 
14641
-      retarray->base_addr = xmalloc (alloc_size);
 
14642
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
14643
       if (alloc_size == 0)
 
14644
        {
 
14645
          /* Make sure we have a zero-sized array.  */
 
14646
Index: libgfortran/generated/in_pack_r4.c
 
14647
===================================================================
 
14648
--- a/src/libgfortran/generated/in_pack_r4.c    (.../tags/gcc_4_8_3_release)
 
14649
+++ b/src/libgfortran/generated/in_pack_r4.c    (.../branches/gcc-4_8-branch)
 
14650
@@ -76,7 +76,7 @@
 
14651
     return source->base_addr;
 
14652
 
 
14653
   /* Allocate storage for the destination.  */
 
14654
-  destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
 
14655
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
 
14656
   dest = destptr;
 
14657
   src = source->base_addr;
 
14658
   stride0 = stride[0];
 
14659
Index: libgfortran/generated/product_i2.c
 
14660
===================================================================
 
14661
--- a/src/libgfortran/generated/product_i2.c    (.../tags/gcc_4_8_3_release)
 
14662
+++ b/src/libgfortran/generated/product_i2.c    (.../branches/gcc-4_8-branch)
 
14663
@@ -97,10 +97,9 @@
 
14664
       retarray->offset = 0;
 
14665
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14666
 
 
14667
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14668
-                  * extent[rank-1];
 
14669
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14670
 
 
14671
-      retarray->base_addr = xmalloc (alloc_size);
 
14672
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
14673
       if (alloc_size == 0)
 
14674
        {
 
14675
          /* Make sure we have a zero-sized array.  */
 
14676
@@ -272,8 +271,7 @@
 
14677
 
 
14678
        }
 
14679
 
 
14680
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14681
-                  * extent[rank-1];
 
14682
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14683
 
 
14684
       retarray->offset = 0;
 
14685
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14686
@@ -285,7 +283,7 @@
 
14687
          return;
 
14688
        }
 
14689
       else
 
14690
-       retarray->base_addr = xmalloc (alloc_size);
 
14691
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
14692
 
 
14693
     }
 
14694
   else
 
14695
@@ -430,8 +428,7 @@
 
14696
       retarray->offset = 0;
 
14697
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14698
 
 
14699
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14700
-                  * extent[rank-1];
 
14701
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14702
 
 
14703
       if (alloc_size == 0)
 
14704
        {
 
14705
@@ -440,7 +437,7 @@
 
14706
          return;
 
14707
        }
 
14708
       else
 
14709
-       retarray->base_addr = xmalloc (alloc_size);
 
14710
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
14711
     }
 
14712
   else
 
14713
     {
 
14714
Index: libgfortran/generated/iparity_i4.c
 
14715
===================================================================
 
14716
--- a/src/libgfortran/generated/iparity_i4.c    (.../tags/gcc_4_8_3_release)
 
14717
+++ b/src/libgfortran/generated/iparity_i4.c    (.../branches/gcc-4_8-branch)
 
14718
@@ -97,10 +97,9 @@
 
14719
       retarray->offset = 0;
 
14720
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14721
 
 
14722
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14723
-                  * extent[rank-1];
 
14724
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14725
 
 
14726
-      retarray->base_addr = xmalloc (alloc_size);
 
14727
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14728
       if (alloc_size == 0)
 
14729
        {
 
14730
          /* Make sure we have a zero-sized array.  */
 
14731
@@ -272,8 +271,7 @@
 
14732
 
 
14733
        }
 
14734
 
 
14735
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14736
-                  * extent[rank-1];
 
14737
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14738
 
 
14739
       retarray->offset = 0;
 
14740
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14741
@@ -285,7 +283,7 @@
 
14742
          return;
 
14743
        }
 
14744
       else
 
14745
-       retarray->base_addr = xmalloc (alloc_size);
 
14746
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14747
 
 
14748
     }
 
14749
   else
 
14750
@@ -430,8 +428,7 @@
 
14751
       retarray->offset = 0;
 
14752
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14753
 
 
14754
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14755
-                  * extent[rank-1];
 
14756
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14757
 
 
14758
       if (alloc_size == 0)
 
14759
        {
 
14760
@@ -440,7 +437,7 @@
 
14761
          return;
 
14762
        }
 
14763
       else
 
14764
-       retarray->base_addr = xmalloc (alloc_size);
 
14765
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
14766
     }
 
14767
   else
 
14768
     {
 
14769
Index: libgfortran/generated/minloc0_4_i1.c
 
14770
===================================================================
 
14771
--- a/src/libgfortran/generated/minloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
14772
+++ b/src/libgfortran/generated/minloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
14773
@@ -58,7 +58,7 @@
 
14774
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14775
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14776
       retarray->offset = 0;
 
14777
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14778
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14779
     }
 
14780
   else
 
14781
     {
 
14782
@@ -199,7 +199,7 @@
 
14783
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14784
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14785
       retarray->offset = 0;
 
14786
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14787
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14788
     }
 
14789
   else
 
14790
     {
 
14791
@@ -367,7 +367,7 @@
 
14792
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14793
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14794
       retarray->offset = 0;
 
14795
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14796
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14797
     }
 
14798
   else if (unlikely (compile_options.bounds_check))
 
14799
     {
 
14800
Index: libgfortran/generated/reshape_c4.c
 
14801
===================================================================
 
14802
--- a/src/libgfortran/generated/reshape_c4.c    (.../tags/gcc_4_8_3_release)
 
14803
+++ b/src/libgfortran/generated/reshape_c4.c    (.../branches/gcc-4_8-branch)
 
14804
@@ -111,11 +111,11 @@
 
14805
       ret->offset = 0;
 
14806
 
 
14807
       if (unlikely (rs < 1))
 
14808
-        alloc_size = 1;
 
14809
+        alloc_size = 0;
 
14810
       else
 
14811
-        alloc_size = rs * sizeof (GFC_COMPLEX_4);
 
14812
+        alloc_size = rs;
 
14813
 
 
14814
-      ret->base_addr = xmalloc (alloc_size);
 
14815
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
14816
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
14817
     }
 
14818
 
 
14819
Index: libgfortran/generated/maxloc0_4_r16.c
 
14820
===================================================================
 
14821
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
14822
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
14823
@@ -58,7 +58,7 @@
 
14824
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14825
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14826
       retarray->offset = 0;
 
14827
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14828
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14829
     }
 
14830
   else
 
14831
     {
 
14832
@@ -199,7 +199,7 @@
 
14833
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
14834
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14835
       retarray->offset = 0;
 
14836
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14837
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14838
     }
 
14839
   else
 
14840
     {
 
14841
@@ -367,7 +367,7 @@
 
14842
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
14843
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
14844
       retarray->offset = 0;
 
14845
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
14846
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
14847
     }
 
14848
   else if (unlikely (compile_options.bounds_check))
 
14849
     {
 
14850
Index: libgfortran/generated/iall_i8.c
 
14851
===================================================================
 
14852
--- a/src/libgfortran/generated/iall_i8.c       (.../tags/gcc_4_8_3_release)
 
14853
+++ b/src/libgfortran/generated/iall_i8.c       (.../branches/gcc-4_8-branch)
 
14854
@@ -97,10 +97,9 @@
 
14855
       retarray->offset = 0;
 
14856
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14857
 
 
14858
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14859
-                  * extent[rank-1];
 
14860
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14861
 
 
14862
-      retarray->base_addr = xmalloc (alloc_size);
 
14863
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14864
       if (alloc_size == 0)
 
14865
        {
 
14866
          /* Make sure we have a zero-sized array.  */
 
14867
@@ -272,8 +271,7 @@
 
14868
 
 
14869
        }
 
14870
 
 
14871
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14872
-                  * extent[rank-1];
 
14873
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14874
 
 
14875
       retarray->offset = 0;
 
14876
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14877
@@ -285,7 +283,7 @@
 
14878
          return;
 
14879
        }
 
14880
       else
 
14881
-       retarray->base_addr = xmalloc (alloc_size);
 
14882
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14883
 
 
14884
     }
 
14885
   else
 
14886
@@ -430,8 +428,7 @@
 
14887
       retarray->offset = 0;
 
14888
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14889
 
 
14890
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14891
-                  * extent[rank-1];
 
14892
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14893
 
 
14894
       if (alloc_size == 0)
 
14895
        {
 
14896
@@ -440,7 +437,7 @@
 
14897
          return;
 
14898
        }
 
14899
       else
 
14900
-       retarray->base_addr = xmalloc (alloc_size);
 
14901
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14902
     }
 
14903
   else
 
14904
     {
 
14905
Index: libgfortran/generated/maxloc1_8_r16.c
 
14906
===================================================================
 
14907
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
14908
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
14909
@@ -98,10 +98,9 @@
 
14910
       retarray->offset = 0;
 
14911
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14912
 
 
14913
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14914
-                  * extent[rank-1];
 
14915
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14916
 
 
14917
-      retarray->base_addr = xmalloc (alloc_size);
 
14918
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14919
       if (alloc_size == 0)
 
14920
        {
 
14921
          /* Make sure we have a zero-sized array.  */
 
14922
@@ -294,8 +293,7 @@
 
14923
 
 
14924
        }
 
14925
 
 
14926
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14927
-                  * extent[rank-1];
 
14928
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14929
 
 
14930
       retarray->offset = 0;
 
14931
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14932
@@ -307,7 +305,7 @@
 
14933
          return;
 
14934
        }
 
14935
       else
 
14936
-       retarray->base_addr = xmalloc (alloc_size);
 
14937
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14938
 
 
14939
     }
 
14940
   else
 
14941
@@ -485,8 +483,7 @@
 
14942
       retarray->offset = 0;
 
14943
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14944
 
 
14945
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14946
-                  * extent[rank-1];
 
14947
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14948
 
 
14949
       if (alloc_size == 0)
 
14950
        {
 
14951
@@ -495,7 +492,7 @@
 
14952
          return;
 
14953
        }
 
14954
       else
 
14955
-       retarray->base_addr = xmalloc (alloc_size);
 
14956
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
14957
     }
 
14958
   else
 
14959
     {
 
14960
Index: libgfortran/generated/sum_r16.c
 
14961
===================================================================
 
14962
--- a/src/libgfortran/generated/sum_r16.c       (.../tags/gcc_4_8_3_release)
 
14963
+++ b/src/libgfortran/generated/sum_r16.c       (.../branches/gcc-4_8-branch)
 
14964
@@ -97,10 +97,9 @@
 
14965
       retarray->offset = 0;
 
14966
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14967
 
 
14968
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14969
-                  * extent[rank-1];
 
14970
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14971
 
 
14972
-      retarray->base_addr = xmalloc (alloc_size);
 
14973
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
14974
       if (alloc_size == 0)
 
14975
        {
 
14976
          /* Make sure we have a zero-sized array.  */
 
14977
@@ -272,8 +271,7 @@
 
14978
 
 
14979
        }
 
14980
 
 
14981
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
14982
-                  * extent[rank-1];
 
14983
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
14984
 
 
14985
       retarray->offset = 0;
 
14986
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14987
@@ -285,7 +283,7 @@
 
14988
          return;
 
14989
        }
 
14990
       else
 
14991
-       retarray->base_addr = xmalloc (alloc_size);
 
14992
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
14993
 
 
14994
     }
 
14995
   else
 
14996
@@ -430,8 +428,7 @@
 
14997
       retarray->offset = 0;
 
14998
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
14999
 
 
15000
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15001
-                  * extent[rank-1];
 
15002
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15003
 
 
15004
       if (alloc_size == 0)
 
15005
        {
 
15006
@@ -440,7 +437,7 @@
 
15007
          return;
 
15008
        }
 
15009
       else
 
15010
-       retarray->base_addr = xmalloc (alloc_size);
 
15011
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15012
     }
 
15013
   else
 
15014
     {
 
15015
Index: libgfortran/generated/sum_i1.c
 
15016
===================================================================
 
15017
--- a/src/libgfortran/generated/sum_i1.c        (.../tags/gcc_4_8_3_release)
 
15018
+++ b/src/libgfortran/generated/sum_i1.c        (.../branches/gcc-4_8-branch)
 
15019
@@ -97,10 +97,9 @@
 
15020
       retarray->offset = 0;
 
15021
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15022
 
 
15023
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15024
-                  * extent[rank-1];
 
15025
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15026
 
 
15027
-      retarray->base_addr = xmalloc (alloc_size);
 
15028
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15029
       if (alloc_size == 0)
 
15030
        {
 
15031
          /* Make sure we have a zero-sized array.  */
 
15032
@@ -272,8 +271,7 @@
 
15033
 
 
15034
        }
 
15035
 
 
15036
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15037
-                  * extent[rank-1];
 
15038
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15039
 
 
15040
       retarray->offset = 0;
 
15041
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15042
@@ -285,7 +283,7 @@
 
15043
          return;
 
15044
        }
 
15045
       else
 
15046
-       retarray->base_addr = xmalloc (alloc_size);
 
15047
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15048
 
 
15049
     }
 
15050
   else
 
15051
@@ -430,8 +428,7 @@
 
15052
       retarray->offset = 0;
 
15053
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15054
 
 
15055
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15056
-                  * extent[rank-1];
 
15057
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15058
 
 
15059
       if (alloc_size == 0)
 
15060
        {
 
15061
@@ -440,7 +437,7 @@
 
15062
          return;
 
15063
        }
 
15064
       else
 
15065
-       retarray->base_addr = xmalloc (alloc_size);
 
15066
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
15067
     }
 
15068
   else
 
15069
     {
 
15070
Index: libgfortran/generated/in_pack_i2.c
 
15071
===================================================================
 
15072
--- a/src/libgfortran/generated/in_pack_i2.c    (.../tags/gcc_4_8_3_release)
 
15073
+++ b/src/libgfortran/generated/in_pack_i2.c    (.../branches/gcc-4_8-branch)
 
15074
@@ -76,7 +76,7 @@
 
15075
     return source->base_addr;
 
15076
 
 
15077
   /* Allocate storage for the destination.  */
 
15078
-  destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
 
15079
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
 
15080
   dest = destptr;
 
15081
   src = source->base_addr;
 
15082
   stride0 = stride[0];
 
15083
Index: libgfortran/generated/transpose_r10.c
 
15084
===================================================================
 
15085
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
 
15086
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
 
15087
@@ -60,7 +60,8 @@
 
15088
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
15089
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
15090
 
 
15091
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
 
15092
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
15093
+                                     sizeof (GFC_REAL_10));
 
15094
       ret->offset = 0;
 
15095
     } else if (unlikely (compile_options.bounds_check))
 
15096
     {
 
15097
Index: libgfortran/generated/maxloc1_16_r16.c
 
15098
===================================================================
 
15099
--- a/src/libgfortran/generated/maxloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
15100
+++ b/src/libgfortran/generated/maxloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
15101
@@ -98,10 +98,9 @@
 
15102
       retarray->offset = 0;
 
15103
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15104
 
 
15105
-      alloc_size = sizeof (GFC_INTEGER_16) * 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->base_addr = xmalloc (alloc_size);
 
15110
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15111
       if (alloc_size == 0)
 
15112
        {
 
15113
          /* Make sure we have a zero-sized array.  */
 
15114
@@ -294,8 +293,7 @@
 
15115
 
 
15116
        }
 
15117
 
 
15118
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15119
-                  * extent[rank-1];
 
15120
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15121
 
 
15122
       retarray->offset = 0;
 
15123
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15124
@@ -307,7 +305,7 @@
 
15125
          return;
 
15126
        }
 
15127
       else
 
15128
-       retarray->base_addr = xmalloc (alloc_size);
 
15129
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15130
 
 
15131
     }
 
15132
   else
 
15133
@@ -485,8 +483,7 @@
 
15134
       retarray->offset = 0;
 
15135
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15136
 
 
15137
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15138
-                  * extent[rank-1];
 
15139
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15140
 
 
15141
       if (alloc_size == 0)
 
15142
        {
 
15143
@@ -495,7 +492,7 @@
 
15144
          return;
 
15145
        }
 
15146
       else
 
15147
-       retarray->base_addr = xmalloc (alloc_size);
 
15148
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15149
     }
 
15150
   else
 
15151
     {
 
15152
Index: libgfortran/generated/maxloc1_16_i4.c
 
15153
===================================================================
 
15154
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
15155
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
15156
@@ -98,10 +98,9 @@
 
15157
       retarray->offset = 0;
 
15158
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15159
 
 
15160
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15161
-                  * extent[rank-1];
 
15162
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15163
 
 
15164
-      retarray->base_addr = xmalloc (alloc_size);
 
15165
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15166
       if (alloc_size == 0)
 
15167
        {
 
15168
          /* Make sure we have a zero-sized array.  */
 
15169
@@ -294,8 +293,7 @@
 
15170
 
 
15171
        }
 
15172
 
 
15173
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15174
-                  * extent[rank-1];
 
15175
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15176
 
 
15177
       retarray->offset = 0;
 
15178
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15179
@@ -307,7 +305,7 @@
 
15180
          return;
 
15181
        }
 
15182
       else
 
15183
-       retarray->base_addr = xmalloc (alloc_size);
 
15184
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15185
 
 
15186
     }
 
15187
   else
 
15188
@@ -485,8 +483,7 @@
 
15189
       retarray->offset = 0;
 
15190
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15191
 
 
15192
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15193
-                  * extent[rank-1];
 
15194
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15195
 
 
15196
       if (alloc_size == 0)
 
15197
        {
 
15198
@@ -495,7 +492,7 @@
 
15199
          return;
 
15200
        }
 
15201
       else
 
15202
-       retarray->base_addr = xmalloc (alloc_size);
 
15203
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15204
     }
 
15205
   else
 
15206
     {
 
15207
Index: libgfortran/generated/spread_i1.c
 
15208
===================================================================
 
15209
--- a/src/libgfortran/generated/spread_i1.c     (.../tags/gcc_4_8_3_release)
 
15210
+++ b/src/libgfortran/generated/spread_i1.c     (.../branches/gcc-4_8-branch)
 
15211
@@ -101,8 +101,8 @@
 
15212
        }
 
15213
       ret->offset = 0;
 
15214
 
 
15215
-      /* xmalloc allocates a single byte for zero size.  */
 
15216
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
 
15217
+      /* xmallocarray allocates a single byte for zero size.  */
 
15218
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
 
15219
       if (rs <= 0)
 
15220
         return;
 
15221
     }
 
15222
@@ -244,7 +244,7 @@
 
15223
 
 
15224
   if (ret->base_addr == NULL)
 
15225
     {
 
15226
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
 
15227
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
 
15228
       ret->offset = 0;
 
15229
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15230
     }
 
15231
Index: libgfortran/generated/maxloc0_16_i8.c
 
15232
===================================================================
 
15233
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
15234
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
15235
@@ -58,7 +58,7 @@
 
15236
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15237
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15238
       retarray->offset = 0;
 
15239
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15240
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15241
     }
 
15242
   else
 
15243
     {
 
15244
@@ -199,7 +199,7 @@
 
15245
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15246
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15247
       retarray->offset = 0;
 
15248
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15249
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15250
     }
 
15251
   else
 
15252
     {
 
15253
@@ -367,7 +367,7 @@
 
15254
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15255
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15256
       retarray->offset = 0;
 
15257
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15258
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15259
     }
 
15260
   else if (unlikely (compile_options.bounds_check))
 
15261
     {
 
15262
Index: libgfortran/generated/maxval_r16.c
 
15263
===================================================================
 
15264
--- a/src/libgfortran/generated/maxval_r16.c    (.../tags/gcc_4_8_3_release)
 
15265
+++ b/src/libgfortran/generated/maxval_r16.c    (.../branches/gcc-4_8-branch)
 
15266
@@ -97,10 +97,9 @@
 
15267
       retarray->offset = 0;
 
15268
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15269
 
 
15270
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15271
-                  * extent[rank-1];
 
15272
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15273
 
 
15274
-      retarray->base_addr = xmalloc (alloc_size);
 
15275
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15276
       if (alloc_size == 0)
 
15277
        {
 
15278
          /* Make sure we have a zero-sized array.  */
 
15279
@@ -286,8 +285,7 @@
 
15280
 
 
15281
        }
 
15282
 
 
15283
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15284
-                  * extent[rank-1];
 
15285
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15286
 
 
15287
       retarray->offset = 0;
 
15288
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15289
@@ -299,7 +297,7 @@
 
15290
          return;
 
15291
        }
 
15292
       else
 
15293
-       retarray->base_addr = xmalloc (alloc_size);
 
15294
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15295
 
 
15296
     }
 
15297
   else
 
15298
@@ -472,8 +470,7 @@
 
15299
       retarray->offset = 0;
 
15300
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15301
 
 
15302
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15303
-                  * extent[rank-1];
 
15304
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15305
 
 
15306
       if (alloc_size == 0)
 
15307
        {
 
15308
@@ -482,7 +479,7 @@
 
15309
          return;
 
15310
        }
 
15311
       else
 
15312
-       retarray->base_addr = xmalloc (alloc_size);
 
15313
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
15314
     }
 
15315
   else
 
15316
     {
 
15317
Index: libgfortran/generated/product_c10.c
 
15318
===================================================================
 
15319
--- a/src/libgfortran/generated/product_c10.c   (.../tags/gcc_4_8_3_release)
 
15320
+++ b/src/libgfortran/generated/product_c10.c   (.../branches/gcc-4_8-branch)
 
15321
@@ -97,10 +97,9 @@
 
15322
       retarray->offset = 0;
 
15323
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15324
 
 
15325
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15326
-                  * extent[rank-1];
 
15327
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15328
 
 
15329
-      retarray->base_addr = xmalloc (alloc_size);
 
15330
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15331
       if (alloc_size == 0)
 
15332
        {
 
15333
          /* Make sure we have a zero-sized array.  */
 
15334
@@ -272,8 +271,7 @@
 
15335
 
 
15336
        }
 
15337
 
 
15338
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15339
-                  * extent[rank-1];
 
15340
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15341
 
 
15342
       retarray->offset = 0;
 
15343
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15344
@@ -285,7 +283,7 @@
 
15345
          return;
 
15346
        }
 
15347
       else
 
15348
-       retarray->base_addr = xmalloc (alloc_size);
 
15349
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15350
 
 
15351
     }
 
15352
   else
 
15353
@@ -430,8 +428,7 @@
 
15354
       retarray->offset = 0;
 
15355
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15356
 
 
15357
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15358
-                  * extent[rank-1];
 
15359
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15360
 
 
15361
       if (alloc_size == 0)
 
15362
        {
 
15363
@@ -440,7 +437,7 @@
 
15364
          return;
 
15365
        }
 
15366
       else
 
15367
-       retarray->base_addr = xmalloc (alloc_size);
 
15368
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
15369
     }
 
15370
   else
 
15371
     {
 
15372
Index: libgfortran/generated/minloc1_8_i4.c
 
15373
===================================================================
 
15374
--- a/src/libgfortran/generated/minloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
15375
+++ b/src/libgfortran/generated/minloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
15376
@@ -98,10 +98,9 @@
 
15377
       retarray->offset = 0;
 
15378
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15379
 
 
15380
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15381
-                  * extent[rank-1];
 
15382
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15383
 
 
15384
-      retarray->base_addr = xmalloc (alloc_size);
 
15385
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15386
       if (alloc_size == 0)
 
15387
        {
 
15388
          /* Make sure we have a zero-sized array.  */
 
15389
@@ -294,8 +293,7 @@
 
15390
 
 
15391
        }
 
15392
 
 
15393
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15394
-                  * extent[rank-1];
 
15395
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15396
 
 
15397
       retarray->offset = 0;
 
15398
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15399
@@ -307,7 +305,7 @@
 
15400
          return;
 
15401
        }
 
15402
       else
 
15403
-       retarray->base_addr = xmalloc (alloc_size);
 
15404
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15405
 
 
15406
     }
 
15407
   else
 
15408
@@ -485,8 +483,7 @@
 
15409
       retarray->offset = 0;
 
15410
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15411
 
 
15412
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15413
-                  * extent[rank-1];
 
15414
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15415
 
 
15416
       if (alloc_size == 0)
 
15417
        {
 
15418
@@ -495,7 +492,7 @@
 
15419
          return;
 
15420
        }
 
15421
       else
 
15422
-       retarray->base_addr = xmalloc (alloc_size);
 
15423
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
15424
     }
 
15425
   else
 
15426
     {
 
15427
Index: libgfortran/generated/minloc0_16_i16.c
 
15428
===================================================================
 
15429
--- a/src/libgfortran/generated/minloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
15430
+++ b/src/libgfortran/generated/minloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
15431
@@ -58,7 +58,7 @@
 
15432
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15433
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15434
       retarray->offset = 0;
 
15435
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15436
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15437
     }
 
15438
   else
 
15439
     {
 
15440
@@ -199,7 +199,7 @@
 
15441
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15442
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15443
       retarray->offset = 0;
 
15444
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15445
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15446
     }
 
15447
   else
 
15448
     {
 
15449
@@ -367,7 +367,7 @@
 
15450
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15451
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15452
       retarray->offset = 0;
 
15453
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15454
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15455
     }
 
15456
   else if (unlikely (compile_options.bounds_check))
 
15457
     {
 
15458
Index: libgfortran/generated/matmul_r16.c
 
15459
===================================================================
 
15460
--- a/src/libgfortran/generated/matmul_r16.c    (.../tags/gcc_4_8_3_release)
 
15461
+++ b/src/libgfortran/generated/matmul_r16.c    (.../branches/gcc-4_8-branch)
 
15462
@@ -124,7 +124,7 @@
 
15463
         }
 
15464
 
 
15465
       retarray->base_addr
 
15466
-       = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
 
15467
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
 
15468
       retarray->offset = 0;
 
15469
     }
 
15470
     else if (unlikely (compile_options.bounds_check))
 
15471
Index: libgfortran/generated/minloc0_4_r4.c
 
15472
===================================================================
 
15473
--- a/src/libgfortran/generated/minloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
15474
+++ b/src/libgfortran/generated/minloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
15475
@@ -58,7 +58,7 @@
 
15476
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15477
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15478
       retarray->offset = 0;
 
15479
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15480
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15481
     }
 
15482
   else
 
15483
     {
 
15484
@@ -199,7 +199,7 @@
 
15485
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15486
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15487
       retarray->offset = 0;
 
15488
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15489
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15490
     }
 
15491
   else
 
15492
     {
 
15493
@@ -367,7 +367,7 @@
 
15494
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15495
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15496
       retarray->offset = 0;
 
15497
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15498
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15499
     }
 
15500
   else if (unlikely (compile_options.bounds_check))
 
15501
     {
 
15502
Index: libgfortran/generated/iany_i2.c
 
15503
===================================================================
 
15504
--- a/src/libgfortran/generated/iany_i2.c       (.../tags/gcc_4_8_3_release)
 
15505
+++ b/src/libgfortran/generated/iany_i2.c       (.../branches/gcc-4_8-branch)
 
15506
@@ -97,10 +97,9 @@
 
15507
       retarray->offset = 0;
 
15508
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15509
 
 
15510
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15511
-                  * extent[rank-1];
 
15512
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15513
 
 
15514
-      retarray->base_addr = xmalloc (alloc_size);
 
15515
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15516
       if (alloc_size == 0)
 
15517
        {
 
15518
          /* Make sure we have a zero-sized array.  */
 
15519
@@ -272,8 +271,7 @@
 
15520
 
 
15521
        }
 
15522
 
 
15523
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15524
-                  * extent[rank-1];
 
15525
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15526
 
 
15527
       retarray->offset = 0;
 
15528
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15529
@@ -285,7 +283,7 @@
 
15530
          return;
 
15531
        }
 
15532
       else
 
15533
-       retarray->base_addr = xmalloc (alloc_size);
 
15534
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15535
 
 
15536
     }
 
15537
   else
 
15538
@@ -430,8 +428,7 @@
 
15539
       retarray->offset = 0;
 
15540
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15541
 
 
15542
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15543
-                  * extent[rank-1];
 
15544
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15545
 
 
15546
       if (alloc_size == 0)
 
15547
        {
 
15548
@@ -440,7 +437,7 @@
 
15549
          return;
 
15550
        }
 
15551
       else
 
15552
-       retarray->base_addr = xmalloc (alloc_size);
 
15553
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15554
     }
 
15555
   else
 
15556
     {
 
15557
Index: libgfortran/generated/sum_r4.c
 
15558
===================================================================
 
15559
--- a/src/libgfortran/generated/sum_r4.c        (.../tags/gcc_4_8_3_release)
 
15560
+++ b/src/libgfortran/generated/sum_r4.c        (.../branches/gcc-4_8-branch)
 
15561
@@ -97,10 +97,9 @@
 
15562
       retarray->offset = 0;
 
15563
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15564
 
 
15565
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15566
-                  * extent[rank-1];
 
15567
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15568
 
 
15569
-      retarray->base_addr = xmalloc (alloc_size);
 
15570
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15571
       if (alloc_size == 0)
 
15572
        {
 
15573
          /* Make sure we have a zero-sized array.  */
 
15574
@@ -272,8 +271,7 @@
 
15575
 
 
15576
        }
 
15577
 
 
15578
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15579
-                  * extent[rank-1];
 
15580
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15581
 
 
15582
       retarray->offset = 0;
 
15583
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15584
@@ -285,7 +283,7 @@
 
15585
          return;
 
15586
        }
 
15587
       else
 
15588
-       retarray->base_addr = xmalloc (alloc_size);
 
15589
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15590
 
 
15591
     }
 
15592
   else
 
15593
@@ -430,8 +428,7 @@
 
15594
       retarray->offset = 0;
 
15595
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15596
 
 
15597
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15598
-                  * extent[rank-1];
 
15599
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15600
 
 
15601
       if (alloc_size == 0)
 
15602
        {
 
15603
@@ -440,7 +437,7 @@
 
15604
          return;
 
15605
        }
 
15606
       else
 
15607
-       retarray->base_addr = xmalloc (alloc_size);
 
15608
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
15609
     }
 
15610
   else
 
15611
     {
 
15612
Index: libgfortran/generated/unpack_c8.c
 
15613
===================================================================
 
15614
--- a/src/libgfortran/generated/unpack_c8.c     (.../tags/gcc_4_8_3_release)
 
15615
+++ b/src/libgfortran/generated/unpack_c8.c     (.../branches/gcc-4_8-branch)
 
15616
@@ -99,7 +99,7 @@
 
15617
          rs *= extent[n];
 
15618
        }
 
15619
       ret->offset = 0;
 
15620
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
15621
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
15622
     }
 
15623
   else
 
15624
     {
 
15625
@@ -244,7 +244,7 @@
 
15626
          rs *= extent[n];
 
15627
        }
 
15628
       ret->offset = 0;
 
15629
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
 
15630
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
 
15631
     }
 
15632
   else
 
15633
     {
 
15634
Index: libgfortran/generated/in_pack_c16.c
 
15635
===================================================================
 
15636
--- a/src/libgfortran/generated/in_pack_c16.c   (.../tags/gcc_4_8_3_release)
 
15637
+++ b/src/libgfortran/generated/in_pack_c16.c   (.../branches/gcc-4_8-branch)
 
15638
@@ -76,7 +76,7 @@
 
15639
     return source->base_addr;
 
15640
 
 
15641
   /* Allocate storage for the destination.  */
 
15642
-  destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
 
15643
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
 
15644
   dest = destptr;
 
15645
   src = source->base_addr;
 
15646
   stride0 = stride[0];
 
15647
Index: libgfortran/generated/minloc0_4_i2.c
 
15648
===================================================================
 
15649
--- a/src/libgfortran/generated/minloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
15650
+++ b/src/libgfortran/generated/minloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
15651
@@ -58,7 +58,7 @@
 
15652
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15653
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15654
       retarray->offset = 0;
 
15655
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15656
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15657
     }
 
15658
   else
 
15659
     {
 
15660
@@ -199,7 +199,7 @@
 
15661
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15662
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15663
       retarray->offset = 0;
 
15664
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15665
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15666
     }
 
15667
   else
 
15668
     {
 
15669
@@ -367,7 +367,7 @@
 
15670
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15671
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15672
       retarray->offset = 0;
 
15673
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
15674
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
15675
     }
 
15676
   else if (unlikely (compile_options.bounds_check))
 
15677
     {
 
15678
Index: libgfortran/generated/spread_c10.c
 
15679
===================================================================
 
15680
--- a/src/libgfortran/generated/spread_c10.c    (.../tags/gcc_4_8_3_release)
 
15681
+++ b/src/libgfortran/generated/spread_c10.c    (.../branches/gcc-4_8-branch)
 
15682
@@ -101,8 +101,8 @@
 
15683
        }
 
15684
       ret->offset = 0;
 
15685
 
 
15686
-      /* xmalloc allocates a single byte for zero size.  */
 
15687
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
 
15688
+      /* xmallocarray allocates a single byte for zero size.  */
 
15689
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
 
15690
       if (rs <= 0)
 
15691
         return;
 
15692
     }
 
15693
@@ -244,7 +244,7 @@
 
15694
 
 
15695
   if (ret->base_addr == NULL)
 
15696
     {
 
15697
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
 
15698
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
 
15699
       ret->offset = 0;
 
15700
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15701
     }
 
15702
Index: libgfortran/generated/maxloc0_8_i1.c
 
15703
===================================================================
 
15704
--- a/src/libgfortran/generated/maxloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
15705
+++ b/src/libgfortran/generated/maxloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
15706
@@ -58,7 +58,7 @@
 
15707
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15708
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15709
       retarray->offset = 0;
 
15710
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15711
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15712
     }
 
15713
   else
 
15714
     {
 
15715
@@ -199,7 +199,7 @@
 
15716
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15717
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15718
       retarray->offset = 0;
 
15719
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15720
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15721
     }
 
15722
   else
 
15723
     {
 
15724
@@ -367,7 +367,7 @@
 
15725
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15726
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15727
       retarray->offset = 0;
 
15728
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15729
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15730
     }
 
15731
   else if (unlikely (compile_options.bounds_check))
 
15732
     {
 
15733
Index: libgfortran/generated/spread_r4.c
 
15734
===================================================================
 
15735
--- a/src/libgfortran/generated/spread_r4.c     (.../tags/gcc_4_8_3_release)
 
15736
+++ b/src/libgfortran/generated/spread_r4.c     (.../branches/gcc-4_8-branch)
 
15737
@@ -101,8 +101,8 @@
 
15738
        }
 
15739
       ret->offset = 0;
 
15740
 
 
15741
-      /* xmalloc allocates a single byte for zero size.  */
 
15742
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
 
15743
+      /* xmallocarray allocates a single byte for zero size.  */
 
15744
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
 
15745
       if (rs <= 0)
 
15746
         return;
 
15747
     }
 
15748
@@ -244,7 +244,7 @@
 
15749
 
 
15750
   if (ret->base_addr == NULL)
 
15751
     {
 
15752
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
 
15753
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
 
15754
       ret->offset = 0;
 
15755
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
15756
     }
 
15757
Index: libgfortran/generated/minloc0_8_i8.c
 
15758
===================================================================
 
15759
--- a/src/libgfortran/generated/minloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
15760
+++ b/src/libgfortran/generated/minloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
15761
@@ -58,7 +58,7 @@
 
15762
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15763
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15764
       retarray->offset = 0;
 
15765
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15766
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15767
     }
 
15768
   else
 
15769
     {
 
15770
@@ -199,7 +199,7 @@
 
15771
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15772
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15773
       retarray->offset = 0;
 
15774
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15775
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15776
     }
 
15777
   else
 
15778
     {
 
15779
@@ -367,7 +367,7 @@
 
15780
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15781
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15782
       retarray->offset = 0;
 
15783
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
15784
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
15785
     }
 
15786
   else if (unlikely (compile_options.bounds_check))
 
15787
     {
 
15788
Index: libgfortran/generated/matmul_c8.c
 
15789
===================================================================
 
15790
--- a/src/libgfortran/generated/matmul_c8.c     (.../tags/gcc_4_8_3_release)
 
15791
+++ b/src/libgfortran/generated/matmul_c8.c     (.../branches/gcc-4_8-branch)
 
15792
@@ -124,7 +124,7 @@
 
15793
         }
 
15794
 
 
15795
       retarray->base_addr
 
15796
-       = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
 
15797
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
 
15798
       retarray->offset = 0;
 
15799
     }
 
15800
     else if (unlikely (compile_options.bounds_check))
 
15801
Index: libgfortran/generated/minloc1_16_r10.c
 
15802
===================================================================
 
15803
--- a/src/libgfortran/generated/minloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
15804
+++ b/src/libgfortran/generated/minloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
15805
@@ -98,10 +98,9 @@
 
15806
       retarray->offset = 0;
 
15807
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15808
 
 
15809
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15810
-                  * extent[rank-1];
 
15811
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15812
 
 
15813
-      retarray->base_addr = xmalloc (alloc_size);
 
15814
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15815
       if (alloc_size == 0)
 
15816
        {
 
15817
          /* Make sure we have a zero-sized array.  */
 
15818
@@ -294,8 +293,7 @@
 
15819
 
 
15820
        }
 
15821
 
 
15822
-      alloc_size = sizeof (GFC_INTEGER_16) * 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->offset = 0;
 
15827
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15828
@@ -307,7 +305,7 @@
 
15829
          return;
 
15830
        }
 
15831
       else
 
15832
-       retarray->base_addr = xmalloc (alloc_size);
 
15833
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15834
 
 
15835
     }
 
15836
   else
 
15837
@@ -485,8 +483,7 @@
 
15838
       retarray->offset = 0;
 
15839
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15840
 
 
15841
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15842
-                  * extent[rank-1];
 
15843
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15844
 
 
15845
       if (alloc_size == 0)
 
15846
        {
 
15847
@@ -495,7 +492,7 @@
 
15848
          return;
 
15849
        }
 
15850
       else
 
15851
-       retarray->base_addr = xmalloc (alloc_size);
 
15852
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15853
     }
 
15854
   else
 
15855
     {
 
15856
Index: libgfortran/generated/sum_i2.c
 
15857
===================================================================
 
15858
--- a/src/libgfortran/generated/sum_i2.c        (.../tags/gcc_4_8_3_release)
 
15859
+++ b/src/libgfortran/generated/sum_i2.c        (.../branches/gcc-4_8-branch)
 
15860
@@ -97,10 +97,9 @@
 
15861
       retarray->offset = 0;
 
15862
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15863
 
 
15864
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15865
-                  * extent[rank-1];
 
15866
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15867
 
 
15868
-      retarray->base_addr = xmalloc (alloc_size);
 
15869
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15870
       if (alloc_size == 0)
 
15871
        {
 
15872
          /* Make sure we have a zero-sized array.  */
 
15873
@@ -272,8 +271,7 @@
 
15874
 
 
15875
        }
 
15876
 
 
15877
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15878
-                  * extent[rank-1];
 
15879
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15880
 
 
15881
       retarray->offset = 0;
 
15882
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15883
@@ -285,7 +283,7 @@
 
15884
          return;
 
15885
        }
 
15886
       else
 
15887
-       retarray->base_addr = xmalloc (alloc_size);
 
15888
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15889
 
 
15890
     }
 
15891
   else
 
15892
@@ -430,8 +428,7 @@
 
15893
       retarray->offset = 0;
 
15894
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15895
 
 
15896
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15897
-                  * extent[rank-1];
 
15898
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15899
 
 
15900
       if (alloc_size == 0)
 
15901
        {
 
15902
@@ -440,7 +437,7 @@
 
15903
          return;
 
15904
        }
 
15905
       else
 
15906
-       retarray->base_addr = xmalloc (alloc_size);
 
15907
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
15908
     }
 
15909
   else
 
15910
     {
 
15911
Index: libgfortran/generated/iparity_i16.c
 
15912
===================================================================
 
15913
--- a/src/libgfortran/generated/iparity_i16.c   (.../tags/gcc_4_8_3_release)
 
15914
+++ b/src/libgfortran/generated/iparity_i16.c   (.../branches/gcc-4_8-branch)
 
15915
@@ -97,10 +97,9 @@
 
15916
       retarray->offset = 0;
 
15917
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15918
 
 
15919
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15920
-                  * extent[rank-1];
 
15921
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15922
 
 
15923
-      retarray->base_addr = xmalloc (alloc_size);
 
15924
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15925
       if (alloc_size == 0)
 
15926
        {
 
15927
          /* Make sure we have a zero-sized array.  */
 
15928
@@ -272,8 +271,7 @@
 
15929
 
 
15930
        }
 
15931
 
 
15932
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15933
-                  * extent[rank-1];
 
15934
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15935
 
 
15936
       retarray->offset = 0;
 
15937
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15938
@@ -285,7 +283,7 @@
 
15939
          return;
 
15940
        }
 
15941
       else
 
15942
-       retarray->base_addr = xmalloc (alloc_size);
 
15943
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15944
 
 
15945
     }
 
15946
   else
 
15947
@@ -430,8 +428,7 @@
 
15948
       retarray->offset = 0;
 
15949
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
15950
 
 
15951
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
15952
-                  * extent[rank-1];
 
15953
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
15954
 
 
15955
       if (alloc_size == 0)
 
15956
        {
 
15957
@@ -440,7 +437,7 @@
 
15958
          return;
 
15959
        }
 
15960
       else
 
15961
-       retarray->base_addr = xmalloc (alloc_size);
 
15962
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
15963
     }
 
15964
   else
 
15965
     {
 
15966
Index: libgfortran/generated/minloc0_16_i1.c
 
15967
===================================================================
 
15968
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
15969
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
15970
@@ -58,7 +58,7 @@
 
15971
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15972
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15973
       retarray->offset = 0;
 
15974
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15975
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15976
     }
 
15977
   else
 
15978
     {
 
15979
@@ -199,7 +199,7 @@
 
15980
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
15981
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15982
       retarray->offset = 0;
 
15983
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15984
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15985
     }
 
15986
   else
 
15987
     {
 
15988
@@ -367,7 +367,7 @@
 
15989
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
15990
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
15991
       retarray->offset = 0;
 
15992
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
15993
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
15994
     }
 
15995
   else if (unlikely (compile_options.bounds_check))
 
15996
     {
 
15997
Index: libgfortran/generated/reshape_c16.c
 
15998
===================================================================
 
15999
--- a/src/libgfortran/generated/reshape_c16.c   (.../tags/gcc_4_8_3_release)
 
16000
+++ b/src/libgfortran/generated/reshape_c16.c   (.../branches/gcc-4_8-branch)
 
16001
@@ -111,11 +111,11 @@
 
16002
       ret->offset = 0;
 
16003
 
 
16004
       if (unlikely (rs < 1))
 
16005
-        alloc_size = 1;
 
16006
+        alloc_size = 0;
 
16007
       else
 
16008
-        alloc_size = rs * sizeof (GFC_COMPLEX_16);
 
16009
+        alloc_size = rs;
 
16010
 
 
16011
-      ret->base_addr = xmalloc (alloc_size);
 
16012
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
16013
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
16014
     }
 
16015
 
 
16016
Index: libgfortran/generated/pack_c4.c
 
16017
===================================================================
 
16018
--- a/src/libgfortran/generated/pack_c4.c       (.../tags/gcc_4_8_3_release)
 
16019
+++ b/src/libgfortran/generated/pack_c4.c       (.../branches/gcc-4_8-branch)
 
16020
@@ -167,8 +167,8 @@
 
16021
 
 
16022
          ret->offset = 0;
 
16023
 
 
16024
-         /* xmalloc allocates a single byte for zero size.  */
 
16025
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
 
16026
+         /* xmallocarray allocates a single byte for zero size.  */
 
16027
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
 
16028
 
 
16029
          if (total == 0)
 
16030
            return;
 
16031
Index: libgfortran/generated/parity_l4.c
 
16032
===================================================================
 
16033
--- a/src/libgfortran/generated/parity_l4.c     (.../tags/gcc_4_8_3_release)
 
16034
+++ b/src/libgfortran/generated/parity_l4.c     (.../branches/gcc-4_8-branch)
 
16035
@@ -98,10 +98,9 @@
 
16036
       retarray->offset = 0;
 
16037
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16038
 
 
16039
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16040
-                  * extent[rank-1];
 
16041
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16042
 
 
16043
-      retarray->base_addr = xmalloc (alloc_size);
 
16044
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
16045
       if (alloc_size == 0)
 
16046
        {
 
16047
          /* Make sure we have a zero-sized array.  */
 
16048
Index: libgfortran/generated/spread_i2.c
 
16049
===================================================================
 
16050
--- a/src/libgfortran/generated/spread_i2.c     (.../tags/gcc_4_8_3_release)
 
16051
+++ b/src/libgfortran/generated/spread_i2.c     (.../branches/gcc-4_8-branch)
 
16052
@@ -101,8 +101,8 @@
 
16053
        }
 
16054
       ret->offset = 0;
 
16055
 
 
16056
-      /* xmalloc allocates a single byte for zero size.  */
 
16057
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
 
16058
+      /* xmallocarray allocates a single byte for zero size.  */
 
16059
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
 
16060
       if (rs <= 0)
 
16061
         return;
 
16062
     }
 
16063
@@ -244,7 +244,7 @@
 
16064
 
 
16065
   if (ret->base_addr == NULL)
 
16066
     {
 
16067
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
 
16068
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
 
16069
       ret->offset = 0;
 
16070
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
16071
     }
 
16072
Index: libgfortran/generated/any_l4.c
 
16073
===================================================================
 
16074
--- a/src/libgfortran/generated/any_l4.c        (.../tags/gcc_4_8_3_release)
 
16075
+++ b/src/libgfortran/generated/any_l4.c        (.../branches/gcc-4_8-branch)
 
16076
@@ -101,8 +101,7 @@
 
16077
       retarray->offset = 0;
 
16078
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16079
 
 
16080
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16081
-                  * extent[rank-1];
 
16082
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16083
 
 
16084
       if (alloc_size == 0)
 
16085
        {
 
16086
@@ -111,7 +110,7 @@
 
16087
          return;
 
16088
        }
 
16089
       else
 
16090
-       retarray->base_addr = xmalloc (alloc_size);
 
16091
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
16092
     }
 
16093
   else
 
16094
     {
 
16095
Index: libgfortran/generated/maxloc1_4_i8.c
 
16096
===================================================================
 
16097
--- a/src/libgfortran/generated/maxloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
16098
+++ b/src/libgfortran/generated/maxloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
16099
@@ -98,10 +98,9 @@
 
16100
       retarray->offset = 0;
 
16101
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16102
 
 
16103
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16104
-                  * extent[rank-1];
 
16105
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16106
 
 
16107
-      retarray->base_addr = xmalloc (alloc_size);
 
16108
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16109
       if (alloc_size == 0)
 
16110
        {
 
16111
          /* Make sure we have a zero-sized array.  */
 
16112
@@ -294,8 +293,7 @@
 
16113
 
 
16114
        }
 
16115
 
 
16116
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16117
-                  * extent[rank-1];
 
16118
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16119
 
 
16120
       retarray->offset = 0;
 
16121
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16122
@@ -307,7 +305,7 @@
 
16123
          return;
 
16124
        }
 
16125
       else
 
16126
-       retarray->base_addr = xmalloc (alloc_size);
 
16127
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16128
 
 
16129
     }
 
16130
   else
 
16131
@@ -485,8 +483,7 @@
 
16132
       retarray->offset = 0;
 
16133
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16134
 
 
16135
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16136
-                  * extent[rank-1];
 
16137
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16138
 
 
16139
       if (alloc_size == 0)
 
16140
        {
 
16141
@@ -495,7 +492,7 @@
 
16142
          return;
 
16143
        }
 
16144
       else
 
16145
-       retarray->base_addr = xmalloc (alloc_size);
 
16146
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16147
     }
 
16148
   else
 
16149
     {
 
16150
Index: libgfortran/generated/maxloc0_8_r4.c
 
16151
===================================================================
 
16152
--- a/src/libgfortran/generated/maxloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
16153
+++ b/src/libgfortran/generated/maxloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
16154
@@ -58,7 +58,7 @@
 
16155
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16156
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16157
       retarray->offset = 0;
 
16158
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16159
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16160
     }
 
16161
   else
 
16162
     {
 
16163
@@ -199,7 +199,7 @@
 
16164
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16165
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16166
       retarray->offset = 0;
 
16167
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16168
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16169
     }
 
16170
   else
 
16171
     {
 
16172
@@ -367,7 +367,7 @@
 
16173
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16174
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16175
       retarray->offset = 0;
 
16176
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16177
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16178
     }
 
16179
   else if (unlikely (compile_options.bounds_check))
 
16180
     {
 
16181
Index: libgfortran/generated/maxloc1_4_i16.c
 
16182
===================================================================
 
16183
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
16184
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
16185
@@ -98,10 +98,9 @@
 
16186
       retarray->offset = 0;
 
16187
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16188
 
 
16189
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16190
-                  * extent[rank-1];
 
16191
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16192
 
 
16193
-      retarray->base_addr = xmalloc (alloc_size);
 
16194
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16195
       if (alloc_size == 0)
 
16196
        {
 
16197
          /* Make sure we have a zero-sized array.  */
 
16198
@@ -294,8 +293,7 @@
 
16199
 
 
16200
        }
 
16201
 
 
16202
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16203
-                  * extent[rank-1];
 
16204
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16205
 
 
16206
       retarray->offset = 0;
 
16207
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16208
@@ -307,7 +305,7 @@
 
16209
          return;
 
16210
        }
 
16211
       else
 
16212
-       retarray->base_addr = xmalloc (alloc_size);
 
16213
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16214
 
 
16215
     }
 
16216
   else
 
16217
@@ -485,8 +483,7 @@
 
16218
       retarray->offset = 0;
 
16219
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16220
 
 
16221
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16222
-                  * extent[rank-1];
 
16223
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16224
 
 
16225
       if (alloc_size == 0)
 
16226
        {
 
16227
@@ -495,7 +492,7 @@
 
16228
          return;
 
16229
        }
 
16230
       else
 
16231
-       retarray->base_addr = xmalloc (alloc_size);
 
16232
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16233
     }
 
16234
   else
 
16235
     {
 
16236
Index: libgfortran/generated/minloc0_4_r10.c
 
16237
===================================================================
 
16238
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
16239
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
16240
@@ -58,7 +58,7 @@
 
16241
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16242
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16243
       retarray->offset = 0;
 
16244
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16245
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16246
     }
 
16247
   else
 
16248
     {
 
16249
@@ -199,7 +199,7 @@
 
16250
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16251
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16252
       retarray->offset = 0;
 
16253
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16254
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16255
     }
 
16256
   else
 
16257
     {
 
16258
@@ -367,7 +367,7 @@
 
16259
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16260
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16261
       retarray->offset = 0;
 
16262
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16263
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16264
     }
 
16265
   else if (unlikely (compile_options.bounds_check))
 
16266
     {
 
16267
Index: libgfortran/generated/minloc0_8_i16.c
 
16268
===================================================================
 
16269
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
16270
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
16271
@@ -58,7 +58,7 @@
 
16272
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16273
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16274
       retarray->offset = 0;
 
16275
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16276
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16277
     }
 
16278
   else
 
16279
     {
 
16280
@@ -199,7 +199,7 @@
 
16281
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16282
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16283
       retarray->offset = 0;
 
16284
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16285
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16286
     }
 
16287
   else
 
16288
     {
 
16289
@@ -367,7 +367,7 @@
 
16290
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16291
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16292
       retarray->offset = 0;
 
16293
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16294
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16295
     }
 
16296
   else if (unlikely (compile_options.bounds_check))
 
16297
     {
 
16298
Index: libgfortran/generated/minloc1_8_r10.c
 
16299
===================================================================
 
16300
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
16301
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
16302
@@ -98,10 +98,9 @@
 
16303
       retarray->offset = 0;
 
16304
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16305
 
 
16306
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16307
-                  * extent[rank-1];
 
16308
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16309
 
 
16310
-      retarray->base_addr = xmalloc (alloc_size);
 
16311
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16312
       if (alloc_size == 0)
 
16313
        {
 
16314
          /* Make sure we have a zero-sized array.  */
 
16315
@@ -294,8 +293,7 @@
 
16316
 
 
16317
        }
 
16318
 
 
16319
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16320
-                  * extent[rank-1];
 
16321
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16322
 
 
16323
       retarray->offset = 0;
 
16324
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16325
@@ -307,7 +305,7 @@
 
16326
          return;
 
16327
        }
 
16328
       else
 
16329
-       retarray->base_addr = xmalloc (alloc_size);
 
16330
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16331
 
 
16332
     }
 
16333
   else
 
16334
@@ -485,8 +483,7 @@
 
16335
       retarray->offset = 0;
 
16336
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16337
 
 
16338
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16339
-                  * extent[rank-1];
 
16340
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16341
 
 
16342
       if (alloc_size == 0)
 
16343
        {
 
16344
@@ -495,7 +492,7 @@
 
16345
          return;
 
16346
        }
 
16347
       else
 
16348
-       retarray->base_addr = xmalloc (alloc_size);
 
16349
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16350
     }
 
16351
   else
 
16352
     {
 
16353
Index: libgfortran/generated/minloc0_16_r4.c
 
16354
===================================================================
 
16355
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
16356
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
16357
@@ -58,7 +58,7 @@
 
16358
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16359
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16360
       retarray->offset = 0;
 
16361
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16362
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16363
     }
 
16364
   else
 
16365
     {
 
16366
@@ -199,7 +199,7 @@
 
16367
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16368
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16369
       retarray->offset = 0;
 
16370
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16371
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16372
     }
 
16373
   else
 
16374
     {
 
16375
@@ -367,7 +367,7 @@
 
16376
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16377
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16378
       retarray->offset = 0;
 
16379
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16380
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16381
     }
 
16382
   else if (unlikely (compile_options.bounds_check))
 
16383
     {
 
16384
Index: libgfortran/generated/product_i4.c
 
16385
===================================================================
 
16386
--- a/src/libgfortran/generated/product_i4.c    (.../tags/gcc_4_8_3_release)
 
16387
+++ b/src/libgfortran/generated/product_i4.c    (.../branches/gcc-4_8-branch)
 
16388
@@ -97,10 +97,9 @@
 
16389
       retarray->offset = 0;
 
16390
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16391
 
 
16392
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16393
-                  * extent[rank-1];
 
16394
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16395
 
 
16396
-      retarray->base_addr = xmalloc (alloc_size);
 
16397
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16398
       if (alloc_size == 0)
 
16399
        {
 
16400
          /* Make sure we have a zero-sized array.  */
 
16401
@@ -272,8 +271,7 @@
 
16402
 
 
16403
        }
 
16404
 
 
16405
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16406
-                  * extent[rank-1];
 
16407
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16408
 
 
16409
       retarray->offset = 0;
 
16410
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16411
@@ -285,7 +283,7 @@
 
16412
          return;
 
16413
        }
 
16414
       else
 
16415
-       retarray->base_addr = xmalloc (alloc_size);
 
16416
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16417
 
 
16418
     }
 
16419
   else
 
16420
@@ -430,8 +428,7 @@
 
16421
       retarray->offset = 0;
 
16422
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16423
 
 
16424
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16425
-                  * extent[rank-1];
 
16426
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16427
 
 
16428
       if (alloc_size == 0)
 
16429
        {
 
16430
@@ -440,7 +437,7 @@
 
16431
          return;
 
16432
        }
 
16433
       else
 
16434
-       retarray->base_addr = xmalloc (alloc_size);
 
16435
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16436
     }
 
16437
   else
 
16438
     {
 
16439
Index: libgfortran/generated/sum_c16.c
 
16440
===================================================================
 
16441
--- a/src/libgfortran/generated/sum_c16.c       (.../tags/gcc_4_8_3_release)
 
16442
+++ b/src/libgfortran/generated/sum_c16.c       (.../branches/gcc-4_8-branch)
 
16443
@@ -97,10 +97,9 @@
 
16444
       retarray->offset = 0;
 
16445
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16446
 
 
16447
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16448
-                  * extent[rank-1];
 
16449
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16450
 
 
16451
-      retarray->base_addr = xmalloc (alloc_size);
 
16452
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
16453
       if (alloc_size == 0)
 
16454
        {
 
16455
          /* Make sure we have a zero-sized array.  */
 
16456
@@ -272,8 +271,7 @@
 
16457
 
 
16458
        }
 
16459
 
 
16460
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16461
-                  * extent[rank-1];
 
16462
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16463
 
 
16464
       retarray->offset = 0;
 
16465
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16466
@@ -285,7 +283,7 @@
 
16467
          return;
 
16468
        }
 
16469
       else
 
16470
-       retarray->base_addr = xmalloc (alloc_size);
 
16471
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
16472
 
 
16473
     }
 
16474
   else
 
16475
@@ -430,8 +428,7 @@
 
16476
       retarray->offset = 0;
 
16477
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16478
 
 
16479
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16480
-                  * extent[rank-1];
 
16481
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16482
 
 
16483
       if (alloc_size == 0)
 
16484
        {
 
16485
@@ -440,7 +437,7 @@
 
16486
          return;
 
16487
        }
 
16488
       else
 
16489
-       retarray->base_addr = xmalloc (alloc_size);
 
16490
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
16491
     }
 
16492
   else
 
16493
     {
 
16494
Index: libgfortran/generated/transpose_c10.c
 
16495
===================================================================
 
16496
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
 
16497
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
 
16498
@@ -60,7 +60,8 @@
 
16499
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
16500
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
16501
 
 
16502
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
 
16503
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
16504
+                                     sizeof (GFC_COMPLEX_10));
 
16505
       ret->offset = 0;
 
16506
     } else if (unlikely (compile_options.bounds_check))
 
16507
     {
 
16508
Index: libgfortran/generated/maxloc1_16_r8.c
 
16509
===================================================================
 
16510
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
16511
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
16512
@@ -98,10 +98,9 @@
 
16513
       retarray->offset = 0;
 
16514
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16515
 
 
16516
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16517
-                  * extent[rank-1];
 
16518
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16519
 
 
16520
-      retarray->base_addr = xmalloc (alloc_size);
 
16521
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16522
       if (alloc_size == 0)
 
16523
        {
 
16524
          /* Make sure we have a zero-sized array.  */
 
16525
@@ -294,8 +293,7 @@
 
16526
 
 
16527
        }
 
16528
 
 
16529
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16530
-                  * extent[rank-1];
 
16531
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16532
 
 
16533
       retarray->offset = 0;
 
16534
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16535
@@ -307,7 +305,7 @@
 
16536
          return;
 
16537
        }
 
16538
       else
 
16539
-       retarray->base_addr = xmalloc (alloc_size);
 
16540
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16541
 
 
16542
     }
 
16543
   else
 
16544
@@ -485,8 +483,7 @@
 
16545
       retarray->offset = 0;
 
16546
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16547
 
 
16548
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16549
-                  * extent[rank-1];
 
16550
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16551
 
 
16552
       if (alloc_size == 0)
 
16553
        {
 
16554
@@ -495,7 +492,7 @@
 
16555
          return;
 
16556
        }
 
16557
       else
 
16558
-       retarray->base_addr = xmalloc (alloc_size);
 
16559
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16560
     }
 
16561
   else
 
16562
     {
 
16563
Index: libgfortran/generated/transpose_r4.c
 
16564
===================================================================
 
16565
--- a/src/libgfortran/generated/transpose_r4.c  (.../tags/gcc_4_8_3_release)
 
16566
+++ b/src/libgfortran/generated/transpose_r4.c  (.../branches/gcc-4_8-branch)
 
16567
@@ -60,7 +60,8 @@
 
16568
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
16569
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
16570
 
 
16571
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
 
16572
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
16573
+                                     sizeof (GFC_REAL_4));
 
16574
       ret->offset = 0;
 
16575
     } else if (unlikely (compile_options.bounds_check))
 
16576
     {
 
16577
Index: libgfortran/generated/cshift1_4.c
 
16578
===================================================================
 
16579
--- a/src/libgfortran/generated/cshift1_4.c     (.../tags/gcc_4_8_3_release)
 
16580
+++ b/src/libgfortran/generated/cshift1_4.c     (.../branches/gcc-4_8-branch)
 
16581
@@ -80,7 +80,7 @@
 
16582
     {
 
16583
       int i;
 
16584
 
 
16585
-      ret->base_addr = xmalloc (size * arraysize);
 
16586
+      ret->base_addr = xmallocarray (arraysize, size);
 
16587
       ret->offset = 0;
 
16588
       ret->dtype = array->dtype;
 
16589
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
16590
Index: libgfortran/generated/maxloc0_8_i2.c
 
16591
===================================================================
 
16592
--- a/src/libgfortran/generated/maxloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
16593
+++ b/src/libgfortran/generated/maxloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
16594
@@ -58,7 +58,7 @@
 
16595
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16596
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16597
       retarray->offset = 0;
 
16598
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16599
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16600
     }
 
16601
   else
 
16602
     {
 
16603
@@ -199,7 +199,7 @@
 
16604
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16605
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16606
       retarray->offset = 0;
 
16607
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16608
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16609
     }
 
16610
   else
 
16611
     {
 
16612
@@ -367,7 +367,7 @@
 
16613
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16614
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16615
       retarray->offset = 0;
 
16616
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
16617
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
16618
     }
 
16619
   else if (unlikely (compile_options.bounds_check))
 
16620
     {
 
16621
Index: libgfortran/generated/count_8_l.c
 
16622
===================================================================
 
16623
--- a/src/libgfortran/generated/count_8_l.c     (.../tags/gcc_4_8_3_release)
 
16624
+++ b/src/libgfortran/generated/count_8_l.c     (.../branches/gcc-4_8-branch)
 
16625
@@ -101,8 +101,7 @@
 
16626
       retarray->offset = 0;
 
16627
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16628
 
 
16629
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16630
-                  * extent[rank-1];
 
16631
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16632
 
 
16633
       if (alloc_size == 0)
 
16634
        {
 
16635
@@ -111,7 +110,7 @@
 
16636
          return;
 
16637
        }
 
16638
       else
 
16639
-       retarray->base_addr = xmalloc (alloc_size);
 
16640
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16641
     }
 
16642
   else
 
16643
     {
 
16644
Index: libgfortran/generated/in_pack_i4.c
 
16645
===================================================================
 
16646
--- a/src/libgfortran/generated/in_pack_i4.c    (.../tags/gcc_4_8_3_release)
 
16647
+++ b/src/libgfortran/generated/in_pack_i4.c    (.../branches/gcc-4_8-branch)
 
16648
@@ -76,7 +76,7 @@
 
16649
     return source->base_addr;
 
16650
 
 
16651
   /* Allocate storage for the destination.  */
 
16652
-  destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
 
16653
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
 
16654
   dest = destptr;
 
16655
   src = source->base_addr;
 
16656
   stride0 = stride[0];
 
16657
Index: libgfortran/generated/minloc0_16_i2.c
 
16658
===================================================================
 
16659
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
16660
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
16661
@@ -58,7 +58,7 @@
 
16662
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16663
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16664
       retarray->offset = 0;
 
16665
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16666
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16667
     }
 
16668
   else
 
16669
     {
 
16670
@@ -199,7 +199,7 @@
 
16671
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16672
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16673
       retarray->offset = 0;
 
16674
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16675
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16676
     }
 
16677
   else
 
16678
     {
 
16679
@@ -367,7 +367,7 @@
 
16680
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16681
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16682
       retarray->offset = 0;
 
16683
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16684
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16685
     }
 
16686
   else if (unlikely (compile_options.bounds_check))
 
16687
     {
 
16688
Index: libgfortran/generated/minloc1_8_r8.c
 
16689
===================================================================
 
16690
--- a/src/libgfortran/generated/minloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
16691
+++ b/src/libgfortran/generated/minloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
16692
@@ -98,10 +98,9 @@
 
16693
       retarray->offset = 0;
 
16694
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16695
 
 
16696
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16697
-                  * extent[rank-1];
 
16698
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16699
 
 
16700
-      retarray->base_addr = xmalloc (alloc_size);
 
16701
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16702
       if (alloc_size == 0)
 
16703
        {
 
16704
          /* Make sure we have a zero-sized array.  */
 
16705
@@ -294,8 +293,7 @@
 
16706
 
 
16707
        }
 
16708
 
 
16709
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16710
-                  * extent[rank-1];
 
16711
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16712
 
 
16713
       retarray->offset = 0;
 
16714
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16715
@@ -307,7 +305,7 @@
 
16716
          return;
 
16717
        }
 
16718
       else
 
16719
-       retarray->base_addr = xmalloc (alloc_size);
 
16720
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16721
 
 
16722
     }
 
16723
   else
 
16724
@@ -485,8 +483,7 @@
 
16725
       retarray->offset = 0;
 
16726
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16727
 
 
16728
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16729
-                  * extent[rank-1];
 
16730
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16731
 
 
16732
       if (alloc_size == 0)
 
16733
        {
 
16734
@@ -495,7 +492,7 @@
 
16735
          return;
 
16736
        }
 
16737
       else
 
16738
-       retarray->base_addr = xmalloc (alloc_size);
 
16739
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
16740
     }
 
16741
   else
 
16742
     {
 
16743
Index: libgfortran/generated/matmul_c16.c
 
16744
===================================================================
 
16745
--- a/src/libgfortran/generated/matmul_c16.c    (.../tags/gcc_4_8_3_release)
 
16746
+++ b/src/libgfortran/generated/matmul_c16.c    (.../branches/gcc-4_8-branch)
 
16747
@@ -124,7 +124,7 @@
 
16748
         }
 
16749
 
 
16750
       retarray->base_addr
 
16751
-       = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
 
16752
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
 
16753
       retarray->offset = 0;
 
16754
     }
 
16755
     else if (unlikely (compile_options.bounds_check))
 
16756
Index: libgfortran/generated/minval_i1.c
 
16757
===================================================================
 
16758
--- a/src/libgfortran/generated/minval_i1.c     (.../tags/gcc_4_8_3_release)
 
16759
+++ b/src/libgfortran/generated/minval_i1.c     (.../branches/gcc-4_8-branch)
 
16760
@@ -97,10 +97,9 @@
 
16761
       retarray->offset = 0;
 
16762
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16763
 
 
16764
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16765
-                  * extent[rank-1];
 
16766
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16767
 
 
16768
-      retarray->base_addr = xmalloc (alloc_size);
 
16769
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16770
       if (alloc_size == 0)
 
16771
        {
 
16772
          /* Make sure we have a zero-sized array.  */
 
16773
@@ -286,8 +285,7 @@
 
16774
 
 
16775
        }
 
16776
 
 
16777
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16778
-                  * extent[rank-1];
 
16779
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16780
 
 
16781
       retarray->offset = 0;
 
16782
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16783
@@ -299,7 +297,7 @@
 
16784
          return;
 
16785
        }
 
16786
       else
 
16787
-       retarray->base_addr = xmalloc (alloc_size);
 
16788
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16789
 
 
16790
     }
 
16791
   else
 
16792
@@ -472,8 +470,7 @@
 
16793
       retarray->offset = 0;
 
16794
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16795
 
 
16796
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16797
-                  * extent[rank-1];
 
16798
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16799
 
 
16800
       if (alloc_size == 0)
 
16801
        {
 
16802
@@ -482,7 +479,7 @@
 
16803
          return;
 
16804
        }
 
16805
       else
 
16806
-       retarray->base_addr = xmalloc (alloc_size);
 
16807
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
16808
     }
 
16809
   else
 
16810
     {
 
16811
Index: libgfortran/generated/shape_i16.c
 
16812
===================================================================
 
16813
--- a/src/libgfortran/generated/shape_i16.c     (.../tags/gcc_4_8_3_release)
 
16814
+++ b/src/libgfortran/generated/shape_i16.c     (.../branches/gcc-4_8-branch)
 
16815
@@ -49,7 +49,7 @@
 
16816
     {
 
16817
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
16818
       ret->offset = 0;
 
16819
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16820
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16821
     }
 
16822
 
 
16823
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
16824
Index: libgfortran/generated/iany_i4.c
 
16825
===================================================================
 
16826
--- a/src/libgfortran/generated/iany_i4.c       (.../tags/gcc_4_8_3_release)
 
16827
+++ b/src/libgfortran/generated/iany_i4.c       (.../branches/gcc-4_8-branch)
 
16828
@@ -97,10 +97,9 @@
 
16829
       retarray->offset = 0;
 
16830
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16831
 
 
16832
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16833
-                  * extent[rank-1];
 
16834
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16835
 
 
16836
-      retarray->base_addr = xmalloc (alloc_size);
 
16837
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16838
       if (alloc_size == 0)
 
16839
        {
 
16840
          /* Make sure we have a zero-sized array.  */
 
16841
@@ -272,8 +271,7 @@
 
16842
 
 
16843
        }
 
16844
 
 
16845
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16846
-                  * extent[rank-1];
 
16847
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16848
 
 
16849
       retarray->offset = 0;
 
16850
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16851
@@ -285,7 +283,7 @@
 
16852
          return;
 
16853
        }
 
16854
       else
 
16855
-       retarray->base_addr = xmalloc (alloc_size);
 
16856
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16857
 
 
16858
     }
 
16859
   else
 
16860
@@ -430,8 +428,7 @@
 
16861
       retarray->offset = 0;
 
16862
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16863
 
 
16864
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16865
-                  * extent[rank-1];
 
16866
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16867
 
 
16868
       if (alloc_size == 0)
 
16869
        {
 
16870
@@ -440,7 +437,7 @@
 
16871
          return;
 
16872
        }
 
16873
       else
 
16874
-       retarray->base_addr = xmalloc (alloc_size);
 
16875
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
16876
     }
 
16877
   else
 
16878
     {
 
16879
Index: libgfortran/generated/minloc0_16_r16.c
 
16880
===================================================================
 
16881
--- a/src/libgfortran/generated/minloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
16882
+++ b/src/libgfortran/generated/minloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
16883
@@ -58,7 +58,7 @@
 
16884
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16885
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16886
       retarray->offset = 0;
 
16887
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16888
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16889
     }
 
16890
   else
 
16891
     {
 
16892
@@ -199,7 +199,7 @@
 
16893
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
16894
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16895
       retarray->offset = 0;
 
16896
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16897
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16898
     }
 
16899
   else
 
16900
     {
 
16901
@@ -367,7 +367,7 @@
 
16902
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16903
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16904
       retarray->offset = 0;
 
16905
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
16906
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
16907
     }
 
16908
   else if (unlikely (compile_options.bounds_check))
 
16909
     {
 
16910
Index: libgfortran/generated/product_i16.c
 
16911
===================================================================
 
16912
--- a/src/libgfortran/generated/product_i16.c   (.../tags/gcc_4_8_3_release)
 
16913
+++ b/src/libgfortran/generated/product_i16.c   (.../branches/gcc-4_8-branch)
 
16914
@@ -97,10 +97,9 @@
 
16915
       retarray->offset = 0;
 
16916
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16917
 
 
16918
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16919
-                  * extent[rank-1];
 
16920
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16921
 
 
16922
-      retarray->base_addr = xmalloc (alloc_size);
 
16923
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16924
       if (alloc_size == 0)
 
16925
        {
 
16926
          /* Make sure we have a zero-sized array.  */
 
16927
@@ -272,8 +271,7 @@
 
16928
 
 
16929
        }
 
16930
 
 
16931
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16932
-                  * extent[rank-1];
 
16933
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16934
 
 
16935
       retarray->offset = 0;
 
16936
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16937
@@ -285,7 +283,7 @@
 
16938
          return;
 
16939
        }
 
16940
       else
 
16941
-       retarray->base_addr = xmalloc (alloc_size);
 
16942
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16943
 
 
16944
     }
 
16945
   else
 
16946
@@ -430,8 +428,7 @@
 
16947
       retarray->offset = 0;
 
16948
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
16949
 
 
16950
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
16951
-                  * extent[rank-1];
 
16952
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
16953
 
 
16954
       if (alloc_size == 0)
 
16955
        {
 
16956
@@ -440,7 +437,7 @@
 
16957
          return;
 
16958
        }
 
16959
       else
 
16960
-       retarray->base_addr = xmalloc (alloc_size);
 
16961
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
16962
     }
 
16963
   else
 
16964
     {
 
16965
Index: libgfortran/generated/unpack_i1.c
 
16966
===================================================================
 
16967
--- a/src/libgfortran/generated/unpack_i1.c     (.../tags/gcc_4_8_3_release)
 
16968
+++ b/src/libgfortran/generated/unpack_i1.c     (.../branches/gcc-4_8-branch)
 
16969
@@ -99,7 +99,7 @@
 
16970
          rs *= extent[n];
 
16971
        }
 
16972
       ret->offset = 0;
 
16973
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
16974
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
16975
     }
 
16976
   else
 
16977
     {
 
16978
@@ -244,7 +244,7 @@
 
16979
          rs *= extent[n];
 
16980
        }
 
16981
       ret->offset = 0;
 
16982
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
 
16983
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
 
16984
     }
 
16985
   else
 
16986
     {
 
16987
Index: libgfortran/generated/minloc0_4_i4.c
 
16988
===================================================================
 
16989
--- a/src/libgfortran/generated/minloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
16990
+++ b/src/libgfortran/generated/minloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
16991
@@ -58,7 +58,7 @@
 
16992
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
16993
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
16994
       retarray->offset = 0;
 
16995
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
16996
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
16997
     }
 
16998
   else
 
16999
     {
 
17000
@@ -199,7 +199,7 @@
 
17001
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17002
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17003
       retarray->offset = 0;
 
17004
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17005
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17006
     }
 
17007
   else
 
17008
     {
 
17009
@@ -367,7 +367,7 @@
 
17010
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17011
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17012
       retarray->offset = 0;
 
17013
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
17014
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
17015
     }
 
17016
   else if (unlikely (compile_options.bounds_check))
 
17017
     {
 
17018
Index: libgfortran/generated/matmul_i1.c
 
17019
===================================================================
 
17020
--- a/src/libgfortran/generated/matmul_i1.c     (.../tags/gcc_4_8_3_release)
 
17021
+++ b/src/libgfortran/generated/matmul_i1.c     (.../branches/gcc-4_8-branch)
 
17022
@@ -124,7 +124,7 @@
 
17023
         }
 
17024
 
 
17025
       retarray->base_addr
 
17026
-       = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
 
17027
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
 
17028
       retarray->offset = 0;
 
17029
     }
 
17030
     else if (unlikely (compile_options.bounds_check))
 
17031
Index: libgfortran/generated/minval_r4.c
 
17032
===================================================================
 
17033
--- a/src/libgfortran/generated/minval_r4.c     (.../tags/gcc_4_8_3_release)
 
17034
+++ b/src/libgfortran/generated/minval_r4.c     (.../branches/gcc-4_8-branch)
 
17035
@@ -97,10 +97,9 @@
 
17036
       retarray->offset = 0;
 
17037
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17038
 
 
17039
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17040
-                  * extent[rank-1];
 
17041
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17042
 
 
17043
-      retarray->base_addr = xmalloc (alloc_size);
 
17044
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17045
       if (alloc_size == 0)
 
17046
        {
 
17047
          /* Make sure we have a zero-sized array.  */
 
17048
@@ -286,8 +285,7 @@
 
17049
 
 
17050
        }
 
17051
 
 
17052
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17053
-                  * extent[rank-1];
 
17054
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17055
 
 
17056
       retarray->offset = 0;
 
17057
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17058
@@ -299,7 +297,7 @@
 
17059
          return;
 
17060
        }
 
17061
       else
 
17062
-       retarray->base_addr = xmalloc (alloc_size);
 
17063
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17064
 
 
17065
     }
 
17066
   else
 
17067
@@ -472,8 +470,7 @@
 
17068
       retarray->offset = 0;
 
17069
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17070
 
 
17071
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17072
-                  * extent[rank-1];
 
17073
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17074
 
 
17075
       if (alloc_size == 0)
 
17076
        {
 
17077
@@ -482,7 +479,7 @@
 
17078
          return;
 
17079
        }
 
17080
       else
 
17081
-       retarray->base_addr = xmalloc (alloc_size);
 
17082
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
17083
     }
 
17084
   else
 
17085
     {
 
17086
Index: libgfortran/generated/spread_i16.c
 
17087
===================================================================
 
17088
--- a/src/libgfortran/generated/spread_i16.c    (.../tags/gcc_4_8_3_release)
 
17089
+++ b/src/libgfortran/generated/spread_i16.c    (.../branches/gcc-4_8-branch)
 
17090
@@ -101,8 +101,8 @@
 
17091
        }
 
17092
       ret->offset = 0;
 
17093
 
 
17094
-      /* xmalloc allocates a single byte for zero size.  */
 
17095
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
 
17096
+      /* xmallocarray allocates a single byte for zero size.  */
 
17097
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
 
17098
       if (rs <= 0)
 
17099
         return;
 
17100
     }
 
17101
@@ -244,7 +244,7 @@
 
17102
 
 
17103
   if (ret->base_addr == NULL)
 
17104
     {
 
17105
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
 
17106
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
 
17107
       ret->offset = 0;
 
17108
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17109
     }
 
17110
Index: libgfortran/generated/sum_i4.c
 
17111
===================================================================
 
17112
--- a/src/libgfortran/generated/sum_i4.c        (.../tags/gcc_4_8_3_release)
 
17113
+++ b/src/libgfortran/generated/sum_i4.c        (.../branches/gcc-4_8-branch)
 
17114
@@ -97,10 +97,9 @@
 
17115
       retarray->offset = 0;
 
17116
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17117
 
 
17118
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17119
-                  * extent[rank-1];
 
17120
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17121
 
 
17122
-      retarray->base_addr = xmalloc (alloc_size);
 
17123
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17124
       if (alloc_size == 0)
 
17125
        {
 
17126
          /* Make sure we have a zero-sized array.  */
 
17127
@@ -272,8 +271,7 @@
 
17128
 
 
17129
        }
 
17130
 
 
17131
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17132
-                  * extent[rank-1];
 
17133
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17134
 
 
17135
       retarray->offset = 0;
 
17136
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17137
@@ -285,7 +283,7 @@
 
17138
          return;
 
17139
        }
 
17140
       else
 
17141
-       retarray->base_addr = xmalloc (alloc_size);
 
17142
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17143
 
 
17144
     }
 
17145
   else
 
17146
@@ -430,8 +428,7 @@
 
17147
       retarray->offset = 0;
 
17148
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17149
 
 
17150
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17151
-                  * extent[rank-1];
 
17152
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17153
 
 
17154
       if (alloc_size == 0)
 
17155
        {
 
17156
@@ -440,7 +437,7 @@
 
17157
          return;
 
17158
        }
 
17159
       else
 
17160
-       retarray->base_addr = xmalloc (alloc_size);
 
17161
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17162
     }
 
17163
   else
 
17164
     {
 
17165
Index: libgfortran/generated/unpack_r10.c
 
17166
===================================================================
 
17167
--- a/src/libgfortran/generated/unpack_r10.c    (.../tags/gcc_4_8_3_release)
 
17168
+++ b/src/libgfortran/generated/unpack_r10.c    (.../branches/gcc-4_8-branch)
 
17169
@@ -99,7 +99,7 @@
 
17170
          rs *= extent[n];
 
17171
        }
 
17172
       ret->offset = 0;
 
17173
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
17174
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
17175
     }
 
17176
   else
 
17177
     {
 
17178
@@ -244,7 +244,7 @@
 
17179
          rs *= extent[n];
 
17180
        }
 
17181
       ret->offset = 0;
 
17182
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
 
17183
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
 
17184
     }
 
17185
   else
 
17186
     {
 
17187
Index: libgfortran/generated/bessel_r16.c
 
17188
===================================================================
 
17189
--- a/src/libgfortran/generated/bessel_r16.c    (.../tags/gcc_4_8_3_release)
 
17190
+++ b/src/libgfortran/generated/bessel_r16.c    (.../branches/gcc-4_8-branch)
 
17191
@@ -59,7 +59,7 @@
 
17192
     {
 
17193
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17194
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17195
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
17196
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
17197
       ret->offset = 0;
 
17198
     }
 
17199
 
 
17200
@@ -126,7 +126,7 @@
 
17201
     {
 
17202
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17203
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17204
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
 
17205
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
 
17206
       ret->offset = 0;
 
17207
     }
 
17208
 
 
17209
@@ -166,7 +166,7 @@
 
17210
 
 
17211
   x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
17212
 
 
17213
-  for (i = 2; i <= n1+n2; i++)
 
17214
+  for (i = 2; i <= n2 - n1; i++)
 
17215
     {
 
17216
 #if defined(GFC_REAL_16_INFINITY)
 
17217
       if (unlikely (last2 == -GFC_REAL_16_INFINITY))
 
17218
Index: libgfortran/generated/norm2_r8.c
 
17219
===================================================================
 
17220
--- a/src/libgfortran/generated/norm2_r8.c      (.../tags/gcc_4_8_3_release)
 
17221
+++ b/src/libgfortran/generated/norm2_r8.c      (.../branches/gcc-4_8-branch)
 
17222
@@ -101,10 +101,9 @@
 
17223
       retarray->offset = 0;
 
17224
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17225
 
 
17226
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17227
-                  * extent[rank-1];
 
17228
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17229
 
 
17230
-      retarray->base_addr = xmalloc (alloc_size);
 
17231
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17232
       if (alloc_size == 0)
 
17233
        {
 
17234
          /* Make sure we have a zero-sized array.  */
 
17235
Index: libgfortran/generated/spread_i4.c
 
17236
===================================================================
 
17237
--- a/src/libgfortran/generated/spread_i4.c     (.../tags/gcc_4_8_3_release)
 
17238
+++ b/src/libgfortran/generated/spread_i4.c     (.../branches/gcc-4_8-branch)
 
17239
@@ -101,8 +101,8 @@
 
17240
        }
 
17241
       ret->offset = 0;
 
17242
 
 
17243
-      /* xmalloc allocates a single byte for zero size.  */
 
17244
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
 
17245
+      /* xmallocarray allocates a single byte for zero size.  */
 
17246
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
 
17247
       if (rs <= 0)
 
17248
         return;
 
17249
     }
 
17250
@@ -244,7 +244,7 @@
 
17251
 
 
17252
   if (ret->base_addr == NULL)
 
17253
     {
 
17254
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
 
17255
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
 
17256
       ret->offset = 0;
 
17257
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
17258
     }
 
17259
Index: libgfortran/generated/eoshift3_8.c
 
17260
===================================================================
 
17261
--- a/src/libgfortran/generated/eoshift3_8.c    (.../tags/gcc_4_8_3_release)
 
17262
+++ b/src/libgfortran/generated/eoshift3_8.c    (.../branches/gcc-4_8-branch)
 
17263
@@ -89,7 +89,7 @@
 
17264
     {
 
17265
       int i;
 
17266
 
 
17267
-      ret->base_addr = xmalloc (size * arraysize);
 
17268
+      ret->base_addr = xmallocarray (arraysize, size);
 
17269
       ret->offset = 0;
 
17270
       ret->dtype = array->dtype;
 
17271
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
17272
@@ -107,8 +107,8 @@
 
17273
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
17274
 
 
17275
         }
 
17276
-      /* xmalloc allocates a single byte for zero size.  */
 
17277
-      ret->base_addr = xmalloc (size * arraysize);
 
17278
+      /* xmallocarray allocates a single byte for zero size.  */
 
17279
+      ret->base_addr = xmallocarray (arraysize, size);
 
17280
 
 
17281
     }
 
17282
   else if (unlikely (compile_options.bounds_check))
 
17283
Index: libgfortran/generated/minloc1_4_i1.c
 
17284
===================================================================
 
17285
--- a/src/libgfortran/generated/minloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
17286
+++ b/src/libgfortran/generated/minloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
17287
@@ -98,10 +98,9 @@
 
17288
       retarray->offset = 0;
 
17289
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17290
 
 
17291
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17292
-                  * extent[rank-1];
 
17293
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17294
 
 
17295
-      retarray->base_addr = xmalloc (alloc_size);
 
17296
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17297
       if (alloc_size == 0)
 
17298
        {
 
17299
          /* Make sure we have a zero-sized array.  */
 
17300
@@ -294,8 +293,7 @@
 
17301
 
 
17302
        }
 
17303
 
 
17304
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17305
-                  * extent[rank-1];
 
17306
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17307
 
 
17308
       retarray->offset = 0;
 
17309
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17310
@@ -307,7 +305,7 @@
 
17311
          return;
 
17312
        }
 
17313
       else
 
17314
-       retarray->base_addr = xmalloc (alloc_size);
 
17315
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17316
 
 
17317
     }
 
17318
   else
 
17319
@@ -485,8 +483,7 @@
 
17320
       retarray->offset = 0;
 
17321
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17322
 
 
17323
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17324
-                  * extent[rank-1];
 
17325
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17326
 
 
17327
       if (alloc_size == 0)
 
17328
        {
 
17329
@@ -495,7 +492,7 @@
 
17330
          return;
 
17331
        }
 
17332
       else
 
17333
-       retarray->base_addr = xmalloc (alloc_size);
 
17334
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17335
     }
 
17336
   else
 
17337
     {
 
17338
Index: libgfortran/generated/minval_i2.c
 
17339
===================================================================
 
17340
--- a/src/libgfortran/generated/minval_i2.c     (.../tags/gcc_4_8_3_release)
 
17341
+++ b/src/libgfortran/generated/minval_i2.c     (.../branches/gcc-4_8-branch)
 
17342
@@ -97,10 +97,9 @@
 
17343
       retarray->offset = 0;
 
17344
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17345
 
 
17346
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17347
-                  * extent[rank-1];
 
17348
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17349
 
 
17350
-      retarray->base_addr = xmalloc (alloc_size);
 
17351
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17352
       if (alloc_size == 0)
 
17353
        {
 
17354
          /* Make sure we have a zero-sized array.  */
 
17355
@@ -286,8 +285,7 @@
 
17356
 
 
17357
        }
 
17358
 
 
17359
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17360
-                  * extent[rank-1];
 
17361
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17362
 
 
17363
       retarray->offset = 0;
 
17364
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17365
@@ -299,7 +297,7 @@
 
17366
          return;
 
17367
        }
 
17368
       else
 
17369
-       retarray->base_addr = xmalloc (alloc_size);
 
17370
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17371
 
 
17372
     }
 
17373
   else
 
17374
@@ -472,8 +470,7 @@
 
17375
       retarray->offset = 0;
 
17376
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17377
 
 
17378
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17379
-                  * extent[rank-1];
 
17380
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17381
 
 
17382
       if (alloc_size == 0)
 
17383
        {
 
17384
@@ -482,7 +479,7 @@
 
17385
          return;
 
17386
        }
 
17387
       else
 
17388
-       retarray->base_addr = xmalloc (alloc_size);
 
17389
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
17390
     }
 
17391
   else
 
17392
     {
 
17393
Index: libgfortran/generated/bessel_r8.c
 
17394
===================================================================
 
17395
--- a/src/libgfortran/generated/bessel_r8.c     (.../tags/gcc_4_8_3_release)
 
17396
+++ b/src/libgfortran/generated/bessel_r8.c     (.../branches/gcc-4_8-branch)
 
17397
@@ -55,7 +55,7 @@
 
17398
     {
 
17399
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17400
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17401
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
17402
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
17403
       ret->offset = 0;
 
17404
     }
 
17405
 
 
17406
@@ -122,7 +122,7 @@
 
17407
     {
 
17408
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
17409
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
17410
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
 
17411
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
 
17412
       ret->offset = 0;
 
17413
     }
 
17414
 
 
17415
@@ -162,7 +162,7 @@
 
17416
 
 
17417
   x2rev = GFC_REAL_8_LITERAL(2.)/x;
 
17418
 
 
17419
-  for (i = 2; i <= n1+n2; i++)
 
17420
+  for (i = 2; i <= n2 - n1; i++)
 
17421
     {
 
17422
 #if defined(GFC_REAL_8_INFINITY)
 
17423
       if (unlikely (last2 == -GFC_REAL_8_INFINITY))
 
17424
Index: libgfortran/generated/unpack_r4.c
 
17425
===================================================================
 
17426
--- a/src/libgfortran/generated/unpack_r4.c     (.../tags/gcc_4_8_3_release)
 
17427
+++ b/src/libgfortran/generated/unpack_r4.c     (.../branches/gcc-4_8-branch)
 
17428
@@ -99,7 +99,7 @@
 
17429
          rs *= extent[n];
 
17430
        }
 
17431
       ret->offset = 0;
 
17432
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
17433
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
17434
     }
 
17435
   else
 
17436
     {
 
17437
@@ -244,7 +244,7 @@
 
17438
          rs *= extent[n];
 
17439
        }
 
17440
       ret->offset = 0;
 
17441
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
 
17442
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
 
17443
     }
 
17444
   else
 
17445
     {
 
17446
Index: libgfortran/generated/product_r8.c
 
17447
===================================================================
 
17448
--- a/src/libgfortran/generated/product_r8.c    (.../tags/gcc_4_8_3_release)
 
17449
+++ b/src/libgfortran/generated/product_r8.c    (.../branches/gcc-4_8-branch)
 
17450
@@ -97,10 +97,9 @@
 
17451
       retarray->offset = 0;
 
17452
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17453
 
 
17454
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17455
-                  * extent[rank-1];
 
17456
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17457
 
 
17458
-      retarray->base_addr = xmalloc (alloc_size);
 
17459
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17460
       if (alloc_size == 0)
 
17461
        {
 
17462
          /* Make sure we have a zero-sized array.  */
 
17463
@@ -272,8 +271,7 @@
 
17464
 
 
17465
        }
 
17466
 
 
17467
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17468
-                  * extent[rank-1];
 
17469
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17470
 
 
17471
       retarray->offset = 0;
 
17472
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17473
@@ -285,7 +283,7 @@
 
17474
          return;
 
17475
        }
 
17476
       else
 
17477
-       retarray->base_addr = xmalloc (alloc_size);
 
17478
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17479
 
 
17480
     }
 
17481
   else
 
17482
@@ -430,8 +428,7 @@
 
17483
       retarray->offset = 0;
 
17484
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17485
 
 
17486
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17487
-                  * extent[rank-1];
 
17488
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17489
 
 
17490
       if (alloc_size == 0)
 
17491
        {
 
17492
@@ -440,7 +437,7 @@
 
17493
          return;
 
17494
        }
 
17495
       else
 
17496
-       retarray->base_addr = xmalloc (alloc_size);
 
17497
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
17498
     }
 
17499
   else
 
17500
     {
 
17501
Index: libgfortran/generated/matmul_r4.c
 
17502
===================================================================
 
17503
--- a/src/libgfortran/generated/matmul_r4.c     (.../tags/gcc_4_8_3_release)
 
17504
+++ b/src/libgfortran/generated/matmul_r4.c     (.../branches/gcc-4_8-branch)
 
17505
@@ -124,7 +124,7 @@
 
17506
         }
 
17507
 
 
17508
       retarray->base_addr
 
17509
-       = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
 
17510
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
 
17511
       retarray->offset = 0;
 
17512
     }
 
17513
     else if (unlikely (compile_options.bounds_check))
 
17514
Index: libgfortran/generated/unpack_i2.c
 
17515
===================================================================
 
17516
--- a/src/libgfortran/generated/unpack_i2.c     (.../tags/gcc_4_8_3_release)
 
17517
+++ b/src/libgfortran/generated/unpack_i2.c     (.../branches/gcc-4_8-branch)
 
17518
@@ -99,7 +99,7 @@
 
17519
          rs *= extent[n];
 
17520
        }
 
17521
       ret->offset = 0;
 
17522
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
17523
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
17524
     }
 
17525
   else
 
17526
     {
 
17527
@@ -244,7 +244,7 @@
 
17528
          rs *= extent[n];
 
17529
        }
 
17530
       ret->offset = 0;
 
17531
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
 
17532
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
 
17533
     }
 
17534
   else
 
17535
     {
 
17536
Index: libgfortran/generated/in_pack_r8.c
 
17537
===================================================================
 
17538
--- a/src/libgfortran/generated/in_pack_r8.c    (.../tags/gcc_4_8_3_release)
 
17539
+++ b/src/libgfortran/generated/in_pack_r8.c    (.../branches/gcc-4_8-branch)
 
17540
@@ -76,7 +76,7 @@
 
17541
     return source->base_addr;
 
17542
 
 
17543
   /* Allocate storage for the destination.  */
 
17544
-  destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
 
17545
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
 
17546
   dest = destptr;
 
17547
   src = source->base_addr;
 
17548
   stride0 = stride[0];
 
17549
Index: libgfortran/generated/maxloc1_4_r16.c
 
17550
===================================================================
 
17551
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
17552
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
17553
@@ -98,10 +98,9 @@
 
17554
       retarray->offset = 0;
 
17555
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17556
 
 
17557
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17558
-                  * extent[rank-1];
 
17559
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17560
 
 
17561
-      retarray->base_addr = xmalloc (alloc_size);
 
17562
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17563
       if (alloc_size == 0)
 
17564
        {
 
17565
          /* Make sure we have a zero-sized array.  */
 
17566
@@ -294,8 +293,7 @@
 
17567
 
 
17568
        }
 
17569
 
 
17570
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17571
-                  * extent[rank-1];
 
17572
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17573
 
 
17574
       retarray->offset = 0;
 
17575
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17576
@@ -307,7 +305,7 @@
 
17577
          return;
 
17578
        }
 
17579
       else
 
17580
-       retarray->base_addr = xmalloc (alloc_size);
 
17581
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17582
 
 
17583
     }
 
17584
   else
 
17585
@@ -485,8 +483,7 @@
 
17586
       retarray->offset = 0;
 
17587
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17588
 
 
17589
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17590
-                  * extent[rank-1];
 
17591
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17592
 
 
17593
       if (alloc_size == 0)
 
17594
        {
 
17595
@@ -495,7 +492,7 @@
 
17596
          return;
 
17597
        }
 
17598
       else
 
17599
-       retarray->base_addr = xmalloc (alloc_size);
 
17600
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17601
     }
 
17602
   else
 
17603
     {
 
17604
Index: libgfortran/generated/minloc0_8_r16.c
 
17605
===================================================================
 
17606
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
17607
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
17608
@@ -58,7 +58,7 @@
 
17609
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17610
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17611
       retarray->offset = 0;
 
17612
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17613
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17614
     }
 
17615
   else
 
17616
     {
 
17617
@@ -199,7 +199,7 @@
 
17618
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17619
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17620
       retarray->offset = 0;
 
17621
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17622
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17623
     }
 
17624
   else
 
17625
     {
 
17626
@@ -367,7 +367,7 @@
 
17627
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17628
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17629
       retarray->offset = 0;
 
17630
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17631
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17632
     }
 
17633
   else if (unlikely (compile_options.bounds_check))
 
17634
     {
 
17635
Index: libgfortran/generated/reshape_c8.c
 
17636
===================================================================
 
17637
--- a/src/libgfortran/generated/reshape_c8.c    (.../tags/gcc_4_8_3_release)
 
17638
+++ b/src/libgfortran/generated/reshape_c8.c    (.../branches/gcc-4_8-branch)
 
17639
@@ -111,11 +111,11 @@
 
17640
       ret->offset = 0;
 
17641
 
 
17642
       if (unlikely (rs < 1))
 
17643
-        alloc_size = 1;
 
17644
+        alloc_size = 0;
 
17645
       else
 
17646
-        alloc_size = rs * sizeof (GFC_COMPLEX_8);
 
17647
+        alloc_size = rs;
 
17648
 
 
17649
-      ret->base_addr = xmalloc (alloc_size);
 
17650
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
17651
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
17652
     }
 
17653
 
 
17654
Index: libgfortran/generated/iparity_i8.c
 
17655
===================================================================
 
17656
--- a/src/libgfortran/generated/iparity_i8.c    (.../tags/gcc_4_8_3_release)
 
17657
+++ b/src/libgfortran/generated/iparity_i8.c    (.../branches/gcc-4_8-branch)
 
17658
@@ -97,10 +97,9 @@
 
17659
       retarray->offset = 0;
 
17660
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17661
 
 
17662
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17663
-                  * extent[rank-1];
 
17664
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17665
 
 
17666
-      retarray->base_addr = xmalloc (alloc_size);
 
17667
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17668
       if (alloc_size == 0)
 
17669
        {
 
17670
          /* Make sure we have a zero-sized array.  */
 
17671
@@ -272,8 +271,7 @@
 
17672
 
 
17673
        }
 
17674
 
 
17675
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17676
-                  * extent[rank-1];
 
17677
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17678
 
 
17679
       retarray->offset = 0;
 
17680
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17681
@@ -285,7 +283,7 @@
 
17682
          return;
 
17683
        }
 
17684
       else
 
17685
-       retarray->base_addr = xmalloc (alloc_size);
 
17686
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17687
 
 
17688
     }
 
17689
   else
 
17690
@@ -430,8 +428,7 @@
 
17691
       retarray->offset = 0;
 
17692
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17693
 
 
17694
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17695
-                  * extent[rank-1];
 
17696
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17697
 
 
17698
       if (alloc_size == 0)
 
17699
        {
 
17700
@@ -440,7 +437,7 @@
 
17701
          return;
 
17702
        }
 
17703
       else
 
17704
-       retarray->base_addr = xmalloc (alloc_size);
 
17705
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
17706
     }
 
17707
   else
 
17708
     {
 
17709
Index: libgfortran/generated/count_1_l.c
 
17710
===================================================================
 
17711
--- a/src/libgfortran/generated/count_1_l.c     (.../tags/gcc_4_8_3_release)
 
17712
+++ b/src/libgfortran/generated/count_1_l.c     (.../branches/gcc-4_8-branch)
 
17713
@@ -101,8 +101,7 @@
 
17714
       retarray->offset = 0;
 
17715
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17716
 
 
17717
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17718
-                  * extent[rank-1];
 
17719
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17720
 
 
17721
       if (alloc_size == 0)
 
17722
        {
 
17723
@@ -111,7 +110,7 @@
 
17724
          return;
 
17725
        }
 
17726
       else
 
17727
-       retarray->base_addr = xmalloc (alloc_size);
 
17728
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
17729
     }
 
17730
   else
 
17731
     {
 
17732
Index: libgfortran/generated/maxloc0_8_i4.c
 
17733
===================================================================
 
17734
--- a/src/libgfortran/generated/maxloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
17735
+++ b/src/libgfortran/generated/maxloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
17736
@@ -58,7 +58,7 @@
 
17737
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17738
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17739
       retarray->offset = 0;
 
17740
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17741
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17742
     }
 
17743
   else
 
17744
     {
 
17745
@@ -199,7 +199,7 @@
 
17746
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17747
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17748
       retarray->offset = 0;
 
17749
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17750
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17751
     }
 
17752
   else
 
17753
     {
 
17754
@@ -367,7 +367,7 @@
 
17755
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17756
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17757
       retarray->offset = 0;
 
17758
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
17759
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
17760
     }
 
17761
   else if (unlikely (compile_options.bounds_check))
 
17762
     {
 
17763
Index: libgfortran/generated/matmul_i2.c
 
17764
===================================================================
 
17765
--- a/src/libgfortran/generated/matmul_i2.c     (.../tags/gcc_4_8_3_release)
 
17766
+++ b/src/libgfortran/generated/matmul_i2.c     (.../branches/gcc-4_8-branch)
 
17767
@@ -124,7 +124,7 @@
 
17768
         }
 
17769
 
 
17770
       retarray->base_addr
 
17771
-       = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
 
17772
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
 
17773
       retarray->offset = 0;
 
17774
     }
 
17775
     else if (unlikely (compile_options.bounds_check))
 
17776
Index: libgfortran/generated/minloc1_4_r4.c
 
17777
===================================================================
 
17778
--- a/src/libgfortran/generated/minloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
17779
+++ b/src/libgfortran/generated/minloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
17780
@@ -98,10 +98,9 @@
 
17781
       retarray->offset = 0;
 
17782
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17783
 
 
17784
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17785
-                  * extent[rank-1];
 
17786
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17787
 
 
17788
-      retarray->base_addr = xmalloc (alloc_size);
 
17789
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17790
       if (alloc_size == 0)
 
17791
        {
 
17792
          /* Make sure we have a zero-sized array.  */
 
17793
@@ -294,8 +293,7 @@
 
17794
 
 
17795
        }
 
17796
 
 
17797
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17798
-                  * extent[rank-1];
 
17799
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17800
 
 
17801
       retarray->offset = 0;
 
17802
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17803
@@ -307,7 +305,7 @@
 
17804
          return;
 
17805
        }
 
17806
       else
 
17807
-       retarray->base_addr = xmalloc (alloc_size);
 
17808
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17809
 
 
17810
     }
 
17811
   else
 
17812
@@ -485,8 +483,7 @@
 
17813
       retarray->offset = 0;
 
17814
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17815
 
 
17816
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17817
-                  * extent[rank-1];
 
17818
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17819
 
 
17820
       if (alloc_size == 0)
 
17821
        {
 
17822
@@ -495,7 +492,7 @@
 
17823
          return;
 
17824
        }
 
17825
       else
 
17826
-       retarray->base_addr = xmalloc (alloc_size);
 
17827
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17828
     }
 
17829
   else
 
17830
     {
 
17831
Index: libgfortran/generated/transpose_i16.c
 
17832
===================================================================
 
17833
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
 
17834
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
 
17835
@@ -60,7 +60,8 @@
 
17836
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
17837
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
17838
 
 
17839
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
 
17840
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
17841
+                                     sizeof (GFC_INTEGER_16));
 
17842
       ret->offset = 0;
 
17843
     } else if (unlikely (compile_options.bounds_check))
 
17844
     {
 
17845
Index: libgfortran/generated/minloc0_16_i4.c
 
17846
===================================================================
 
17847
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
17848
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
17849
@@ -58,7 +58,7 @@
 
17850
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17851
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17852
       retarray->offset = 0;
 
17853
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17854
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17855
     }
 
17856
   else
 
17857
     {
 
17858
@@ -199,7 +199,7 @@
 
17859
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
17860
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17861
       retarray->offset = 0;
 
17862
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17863
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17864
     }
 
17865
   else
 
17866
     {
 
17867
@@ -367,7 +367,7 @@
 
17868
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
17869
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
17870
       retarray->offset = 0;
 
17871
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
17872
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
17873
     }
 
17874
   else if (unlikely (compile_options.bounds_check))
 
17875
     {
 
17876
Index: libgfortran/generated/transpose_i4.c
 
17877
===================================================================
 
17878
--- a/src/libgfortran/generated/transpose_i4.c  (.../tags/gcc_4_8_3_release)
 
17879
+++ b/src/libgfortran/generated/transpose_i4.c  (.../branches/gcc-4_8-branch)
 
17880
@@ -60,7 +60,8 @@
 
17881
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
17882
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
17883
 
 
17884
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
 
17885
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
17886
+                                     sizeof (GFC_INTEGER_4));
 
17887
       ret->offset = 0;
 
17888
     } else if (unlikely (compile_options.bounds_check))
 
17889
     {
 
17890
Index: libgfortran/generated/maxloc1_16_i8.c
 
17891
===================================================================
 
17892
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
17893
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
17894
@@ -98,10 +98,9 @@
 
17895
       retarray->offset = 0;
 
17896
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17897
 
 
17898
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17899
-                  * extent[rank-1];
 
17900
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17901
 
 
17902
-      retarray->base_addr = xmalloc (alloc_size);
 
17903
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17904
       if (alloc_size == 0)
 
17905
        {
 
17906
          /* Make sure we have a zero-sized array.  */
 
17907
@@ -294,8 +293,7 @@
 
17908
 
 
17909
        }
 
17910
 
 
17911
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17912
-                  * extent[rank-1];
 
17913
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17914
 
 
17915
       retarray->offset = 0;
 
17916
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17917
@@ -307,7 +305,7 @@
 
17918
          return;
 
17919
        }
 
17920
       else
 
17921
-       retarray->base_addr = xmalloc (alloc_size);
 
17922
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17923
 
 
17924
     }
 
17925
   else
 
17926
@@ -485,8 +483,7 @@
 
17927
       retarray->offset = 0;
 
17928
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17929
 
 
17930
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17931
-                  * extent[rank-1];
 
17932
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17933
 
 
17934
       if (alloc_size == 0)
 
17935
        {
 
17936
@@ -495,7 +492,7 @@
 
17937
          return;
 
17938
        }
 
17939
       else
 
17940
-       retarray->base_addr = xmalloc (alloc_size);
 
17941
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
17942
     }
 
17943
   else
 
17944
     {
 
17945
Index: libgfortran/generated/minloc1_4_i2.c
 
17946
===================================================================
 
17947
--- a/src/libgfortran/generated/minloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
17948
+++ b/src/libgfortran/generated/minloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
17949
@@ -98,10 +98,9 @@
 
17950
       retarray->offset = 0;
 
17951
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17952
 
 
17953
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17954
-                  * extent[rank-1];
 
17955
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17956
 
 
17957
-      retarray->base_addr = xmalloc (alloc_size);
 
17958
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17959
       if (alloc_size == 0)
 
17960
        {
 
17961
          /* Make sure we have a zero-sized array.  */
 
17962
@@ -294,8 +293,7 @@
 
17963
 
 
17964
        }
 
17965
 
 
17966
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17967
-                  * extent[rank-1];
 
17968
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17969
 
 
17970
       retarray->offset = 0;
 
17971
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17972
@@ -307,7 +305,7 @@
 
17973
          return;
 
17974
        }
 
17975
       else
 
17976
-       retarray->base_addr = xmalloc (alloc_size);
 
17977
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17978
 
 
17979
     }
 
17980
   else
 
17981
@@ -485,8 +483,7 @@
 
17982
       retarray->offset = 0;
 
17983
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
17984
 
 
17985
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
17986
-                  * extent[rank-1];
 
17987
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
17988
 
 
17989
       if (alloc_size == 0)
 
17990
        {
 
17991
@@ -495,7 +492,7 @@
 
17992
          return;
 
17993
        }
 
17994
       else
 
17995
-       retarray->base_addr = xmalloc (alloc_size);
 
17996
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
17997
     }
 
17998
   else
 
17999
     {
 
18000
Index: libgfortran/generated/matmul_l16.c
 
18001
===================================================================
 
18002
--- a/src/libgfortran/generated/matmul_l16.c    (.../tags/gcc_4_8_3_release)
 
18003
+++ b/src/libgfortran/generated/matmul_l16.c    (.../branches/gcc-4_8-branch)
 
18004
@@ -88,7 +88,7 @@
 
18005
         }
 
18006
           
 
18007
       retarray->base_addr
 
18008
-       = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
 
18009
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
 
18010
       retarray->offset = 0;
 
18011
     }
 
18012
     else if (unlikely (compile_options.bounds_check))
 
18013
Index: libgfortran/generated/maxloc1_8_i1.c
 
18014
===================================================================
 
18015
--- a/src/libgfortran/generated/maxloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
18016
+++ b/src/libgfortran/generated/maxloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
18017
@@ -98,10 +98,9 @@
 
18018
       retarray->offset = 0;
 
18019
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18020
 
 
18021
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18022
-                  * extent[rank-1];
 
18023
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18024
 
 
18025
-      retarray->base_addr = xmalloc (alloc_size);
 
18026
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18027
       if (alloc_size == 0)
 
18028
        {
 
18029
          /* Make sure we have a zero-sized array.  */
 
18030
@@ -294,8 +293,7 @@
 
18031
 
 
18032
        }
 
18033
 
 
18034
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18035
-                  * extent[rank-1];
 
18036
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18037
 
 
18038
       retarray->offset = 0;
 
18039
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18040
@@ -307,7 +305,7 @@
 
18041
          return;
 
18042
        }
 
18043
       else
 
18044
-       retarray->base_addr = xmalloc (alloc_size);
 
18045
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18046
 
 
18047
     }
 
18048
   else
 
18049
@@ -485,8 +483,7 @@
 
18050
       retarray->offset = 0;
 
18051
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18052
 
 
18053
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18054
-                  * extent[rank-1];
 
18055
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18056
 
 
18057
       if (alloc_size == 0)
 
18058
        {
 
18059
@@ -495,7 +492,7 @@
 
18060
          return;
 
18061
        }
 
18062
       else
 
18063
-       retarray->base_addr = xmalloc (alloc_size);
 
18064
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18065
     }
 
18066
   else
 
18067
     {
 
18068
Index: libgfortran/generated/minloc1_8_i8.c
 
18069
===================================================================
 
18070
--- a/src/libgfortran/generated/minloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
18071
+++ b/src/libgfortran/generated/minloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
18072
@@ -98,10 +98,9 @@
 
18073
       retarray->offset = 0;
 
18074
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18075
 
 
18076
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18077
-                  * extent[rank-1];
 
18078
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18079
 
 
18080
-      retarray->base_addr = xmalloc (alloc_size);
 
18081
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18082
       if (alloc_size == 0)
 
18083
        {
 
18084
          /* Make sure we have a zero-sized array.  */
 
18085
@@ -294,8 +293,7 @@
 
18086
 
 
18087
        }
 
18088
 
 
18089
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18090
-                  * extent[rank-1];
 
18091
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18092
 
 
18093
       retarray->offset = 0;
 
18094
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18095
@@ -307,7 +305,7 @@
 
18096
          return;
 
18097
        }
 
18098
       else
 
18099
-       retarray->base_addr = xmalloc (alloc_size);
 
18100
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18101
 
 
18102
     }
 
18103
   else
 
18104
@@ -485,8 +483,7 @@
 
18105
       retarray->offset = 0;
 
18106
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18107
 
 
18108
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18109
-                  * extent[rank-1];
 
18110
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18111
 
 
18112
       if (alloc_size == 0)
 
18113
        {
 
18114
@@ -495,7 +492,7 @@
 
18115
          return;
 
18116
        }
 
18117
       else
 
18118
-       retarray->base_addr = xmalloc (alloc_size);
 
18119
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18120
     }
 
18121
   else
 
18122
     {
 
18123
Index: libgfortran/generated/minloc0_4_r8.c
 
18124
===================================================================
 
18125
--- a/src/libgfortran/generated/minloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
18126
+++ b/src/libgfortran/generated/minloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
18127
@@ -58,7 +58,7 @@
 
18128
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18129
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18130
       retarray->offset = 0;
 
18131
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18132
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18133
     }
 
18134
   else
 
18135
     {
 
18136
@@ -199,7 +199,7 @@
 
18137
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18138
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18139
       retarray->offset = 0;
 
18140
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18141
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18142
     }
 
18143
   else
 
18144
     {
 
18145
@@ -367,7 +367,7 @@
 
18146
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18147
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18148
       retarray->offset = 0;
 
18149
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18150
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18151
     }
 
18152
   else if (unlikely (compile_options.bounds_check))
 
18153
     {
 
18154
Index: libgfortran/generated/product_r16.c
 
18155
===================================================================
 
18156
--- a/src/libgfortran/generated/product_r16.c   (.../tags/gcc_4_8_3_release)
 
18157
+++ b/src/libgfortran/generated/product_r16.c   (.../branches/gcc-4_8-branch)
 
18158
@@ -97,10 +97,9 @@
 
18159
       retarray->offset = 0;
 
18160
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18161
 
 
18162
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18163
-                  * extent[rank-1];
 
18164
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18165
 
 
18166
-      retarray->base_addr = xmalloc (alloc_size);
 
18167
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18168
       if (alloc_size == 0)
 
18169
        {
 
18170
          /* Make sure we have a zero-sized array.  */
 
18171
@@ -272,8 +271,7 @@
 
18172
 
 
18173
        }
 
18174
 
 
18175
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18176
-                  * extent[rank-1];
 
18177
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18178
 
 
18179
       retarray->offset = 0;
 
18180
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18181
@@ -285,7 +283,7 @@
 
18182
          return;
 
18183
        }
 
18184
       else
 
18185
-       retarray->base_addr = xmalloc (alloc_size);
 
18186
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18187
 
 
18188
     }
 
18189
   else
 
18190
@@ -430,8 +428,7 @@
 
18191
       retarray->offset = 0;
 
18192
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18193
 
 
18194
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18195
-                  * extent[rank-1];
 
18196
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18197
 
 
18198
       if (alloc_size == 0)
 
18199
        {
 
18200
@@ -440,7 +437,7 @@
 
18201
          return;
 
18202
        }
 
18203
       else
 
18204
-       retarray->base_addr = xmalloc (alloc_size);
 
18205
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
18206
     }
 
18207
   else
 
18208
     {
 
18209
Index: libgfortran/generated/sum_r8.c
 
18210
===================================================================
 
18211
--- a/src/libgfortran/generated/sum_r8.c        (.../tags/gcc_4_8_3_release)
 
18212
+++ b/src/libgfortran/generated/sum_r8.c        (.../branches/gcc-4_8-branch)
 
18213
@@ -97,10 +97,9 @@
 
18214
       retarray->offset = 0;
 
18215
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18216
 
 
18217
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18218
-                  * extent[rank-1];
 
18219
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18220
 
 
18221
-      retarray->base_addr = xmalloc (alloc_size);
 
18222
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18223
       if (alloc_size == 0)
 
18224
        {
 
18225
          /* Make sure we have a zero-sized array.  */
 
18226
@@ -272,8 +271,7 @@
 
18227
 
 
18228
        }
 
18229
 
 
18230
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18231
-                  * extent[rank-1];
 
18232
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18233
 
 
18234
       retarray->offset = 0;
 
18235
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18236
@@ -285,7 +283,7 @@
 
18237
          return;
 
18238
        }
 
18239
       else
 
18240
-       retarray->base_addr = xmalloc (alloc_size);
 
18241
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18242
 
 
18243
     }
 
18244
   else
 
18245
@@ -430,8 +428,7 @@
 
18246
       retarray->offset = 0;
 
18247
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18248
 
 
18249
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18250
-                  * extent[rank-1];
 
18251
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18252
 
 
18253
       if (alloc_size == 0)
 
18254
        {
 
18255
@@ -440,7 +437,7 @@
 
18256
          return;
 
18257
        }
 
18258
       else
 
18259
-       retarray->base_addr = xmalloc (alloc_size);
 
18260
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
18261
     }
 
18262
   else
 
18263
     {
 
18264
Index: libgfortran/generated/norm2_r10.c
 
18265
===================================================================
 
18266
--- a/src/libgfortran/generated/norm2_r10.c     (.../tags/gcc_4_8_3_release)
 
18267
+++ b/src/libgfortran/generated/norm2_r10.c     (.../branches/gcc-4_8-branch)
 
18268
@@ -101,10 +101,9 @@
 
18269
       retarray->offset = 0;
 
18270
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18271
 
 
18272
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18273
-                  * extent[rank-1];
 
18274
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18275
 
 
18276
-      retarray->base_addr = xmalloc (alloc_size);
 
18277
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18278
       if (alloc_size == 0)
 
18279
        {
 
18280
          /* Make sure we have a zero-sized array.  */
 
18281
Index: libgfortran/generated/unpack_c10.c
 
18282
===================================================================
 
18283
--- a/src/libgfortran/generated/unpack_c10.c    (.../tags/gcc_4_8_3_release)
 
18284
+++ b/src/libgfortran/generated/unpack_c10.c    (.../branches/gcc-4_8-branch)
 
18285
@@ -99,7 +99,7 @@
 
18286
          rs *= extent[n];
 
18287
        }
 
18288
       ret->offset = 0;
 
18289
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
18290
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
18291
     }
 
18292
   else
 
18293
     {
 
18294
@@ -244,7 +244,7 @@
 
18295
          rs *= extent[n];
 
18296
        }
 
18297
       ret->offset = 0;
 
18298
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
 
18299
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
 
18300
     }
 
18301
   else
 
18302
     {
 
18303
Index: libgfortran/generated/spread_r8.c
 
18304
===================================================================
 
18305
--- a/src/libgfortran/generated/spread_r8.c     (.../tags/gcc_4_8_3_release)
 
18306
+++ b/src/libgfortran/generated/spread_r8.c     (.../branches/gcc-4_8-branch)
 
18307
@@ -101,8 +101,8 @@
 
18308
        }
 
18309
       ret->offset = 0;
 
18310
 
 
18311
-      /* xmalloc allocates a single byte for zero size.  */
 
18312
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
 
18313
+      /* xmallocarray allocates a single byte for zero size.  */
 
18314
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
 
18315
       if (rs <= 0)
 
18316
         return;
 
18317
     }
 
18318
@@ -244,7 +244,7 @@
 
18319
 
 
18320
   if (ret->base_addr == NULL)
 
18321
     {
 
18322
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
 
18323
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
 
18324
       ret->offset = 0;
 
18325
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
18326
     }
 
18327
Index: libgfortran/generated/minloc1_16_i16.c
 
18328
===================================================================
 
18329
--- a/src/libgfortran/generated/minloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
18330
+++ b/src/libgfortran/generated/minloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
18331
@@ -98,10 +98,9 @@
 
18332
       retarray->offset = 0;
 
18333
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18334
 
 
18335
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18336
-                  * extent[rank-1];
 
18337
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18338
 
 
18339
-      retarray->base_addr = xmalloc (alloc_size);
 
18340
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18341
       if (alloc_size == 0)
 
18342
        {
 
18343
          /* Make sure we have a zero-sized array.  */
 
18344
@@ -294,8 +293,7 @@
 
18345
 
 
18346
        }
 
18347
 
 
18348
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18349
-                  * extent[rank-1];
 
18350
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18351
 
 
18352
       retarray->offset = 0;
 
18353
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18354
@@ -307,7 +305,7 @@
 
18355
          return;
 
18356
        }
 
18357
       else
 
18358
-       retarray->base_addr = xmalloc (alloc_size);
 
18359
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18360
 
 
18361
     }
 
18362
   else
 
18363
@@ -485,8 +483,7 @@
 
18364
       retarray->offset = 0;
 
18365
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18366
 
 
18367
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18368
-                  * extent[rank-1];
 
18369
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18370
 
 
18371
       if (alloc_size == 0)
 
18372
        {
 
18373
@@ -495,7 +492,7 @@
 
18374
          return;
 
18375
        }
 
18376
       else
 
18377
-       retarray->base_addr = xmalloc (alloc_size);
 
18378
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18379
     }
 
18380
   else
 
18381
     {
 
18382
Index: libgfortran/generated/maxloc1_8_r4.c
 
18383
===================================================================
 
18384
--- a/src/libgfortran/generated/maxloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
18385
+++ b/src/libgfortran/generated/maxloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
18386
@@ -98,10 +98,9 @@
 
18387
       retarray->offset = 0;
 
18388
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18389
 
 
18390
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18391
-                  * extent[rank-1];
 
18392
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18393
 
 
18394
-      retarray->base_addr = xmalloc (alloc_size);
 
18395
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18396
       if (alloc_size == 0)
 
18397
        {
 
18398
          /* Make sure we have a zero-sized array.  */
 
18399
@@ -294,8 +293,7 @@
 
18400
 
 
18401
        }
 
18402
 
 
18403
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18404
-                  * extent[rank-1];
 
18405
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18406
 
 
18407
       retarray->offset = 0;
 
18408
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18409
@@ -307,7 +305,7 @@
 
18410
          return;
 
18411
        }
 
18412
       else
 
18413
-       retarray->base_addr = xmalloc (alloc_size);
 
18414
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18415
 
 
18416
     }
 
18417
   else
 
18418
@@ -485,8 +483,7 @@
 
18419
       retarray->offset = 0;
 
18420
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18421
 
 
18422
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18423
-                  * extent[rank-1];
 
18424
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18425
 
 
18426
       if (alloc_size == 0)
 
18427
        {
 
18428
@@ -495,7 +492,7 @@
 
18429
          return;
 
18430
        }
 
18431
       else
 
18432
-       retarray->base_addr = xmalloc (alloc_size);
 
18433
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18434
     }
 
18435
   else
 
18436
     {
 
18437
Index: libgfortran/generated/minloc1_16_i1.c
 
18438
===================================================================
 
18439
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
18440
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
18441
@@ -98,10 +98,9 @@
 
18442
       retarray->offset = 0;
 
18443
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18444
 
 
18445
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18446
-                  * extent[rank-1];
 
18447
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18448
 
 
18449
-      retarray->base_addr = xmalloc (alloc_size);
 
18450
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18451
       if (alloc_size == 0)
 
18452
        {
 
18453
          /* Make sure we have a zero-sized array.  */
 
18454
@@ -294,8 +293,7 @@
 
18455
 
 
18456
        }
 
18457
 
 
18458
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18459
-                  * extent[rank-1];
 
18460
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18461
 
 
18462
       retarray->offset = 0;
 
18463
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18464
@@ -307,7 +305,7 @@
 
18465
          return;
 
18466
        }
 
18467
       else
 
18468
-       retarray->base_addr = xmalloc (alloc_size);
 
18469
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18470
 
 
18471
     }
 
18472
   else
 
18473
@@ -485,8 +483,7 @@
 
18474
       retarray->offset = 0;
 
18475
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18476
 
 
18477
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18478
-                  * extent[rank-1];
 
18479
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18480
 
 
18481
       if (alloc_size == 0)
 
18482
        {
 
18483
@@ -495,7 +492,7 @@
 
18484
          return;
 
18485
        }
 
18486
       else
 
18487
-       retarray->base_addr = xmalloc (alloc_size);
 
18488
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
18489
     }
 
18490
   else
 
18491
     {
 
18492
Index: libgfortran/generated/spread_r16.c
 
18493
===================================================================
 
18494
--- a/src/libgfortran/generated/spread_r16.c    (.../tags/gcc_4_8_3_release)
 
18495
+++ b/src/libgfortran/generated/spread_r16.c    (.../branches/gcc-4_8-branch)
 
18496
@@ -101,8 +101,8 @@
 
18497
        }
 
18498
       ret->offset = 0;
 
18499
 
 
18500
-      /* xmalloc allocates a single byte for zero size.  */
 
18501
-      ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
 
18502
+      /* xmallocarray allocates a single byte for zero size.  */
 
18503
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
 
18504
       if (rs <= 0)
 
18505
         return;
 
18506
     }
 
18507
@@ -244,7 +244,7 @@
 
18508
 
 
18509
   if (ret->base_addr == NULL)
 
18510
     {
 
18511
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
 
18512
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
 
18513
       ret->offset = 0;
 
18514
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
18515
     }
 
18516
Index: libgfortran/generated/pack_c8.c
 
18517
===================================================================
 
18518
--- a/src/libgfortran/generated/pack_c8.c       (.../tags/gcc_4_8_3_release)
 
18519
+++ b/src/libgfortran/generated/pack_c8.c       (.../branches/gcc-4_8-branch)
 
18520
@@ -167,8 +167,8 @@
 
18521
 
 
18522
          ret->offset = 0;
 
18523
 
 
18524
-         /* xmalloc allocates a single byte for zero size.  */
 
18525
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
 
18526
+         /* xmallocarray allocates a single byte for zero size.  */
 
18527
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
 
18528
 
 
18529
          if (total == 0)
 
18530
            return;
 
18531
Index: libgfortran/generated/minval_r10.c
 
18532
===================================================================
 
18533
--- a/src/libgfortran/generated/minval_r10.c    (.../tags/gcc_4_8_3_release)
 
18534
+++ b/src/libgfortran/generated/minval_r10.c    (.../branches/gcc-4_8-branch)
 
18535
@@ -97,10 +97,9 @@
 
18536
       retarray->offset = 0;
 
18537
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18538
 
 
18539
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18540
-                  * extent[rank-1];
 
18541
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18542
 
 
18543
-      retarray->base_addr = xmalloc (alloc_size);
 
18544
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18545
       if (alloc_size == 0)
 
18546
        {
 
18547
          /* Make sure we have a zero-sized array.  */
 
18548
@@ -286,8 +285,7 @@
 
18549
 
 
18550
        }
 
18551
 
 
18552
-      alloc_size = sizeof (GFC_REAL_10) * 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->offset = 0;
 
18557
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18558
@@ -299,7 +297,7 @@
 
18559
          return;
 
18560
        }
 
18561
       else
 
18562
-       retarray->base_addr = xmalloc (alloc_size);
 
18563
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18564
 
 
18565
     }
 
18566
   else
 
18567
@@ -472,8 +470,7 @@
 
18568
       retarray->offset = 0;
 
18569
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18570
 
 
18571
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18572
-                  * extent[rank-1];
 
18573
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18574
 
 
18575
       if (alloc_size == 0)
 
18576
        {
 
18577
@@ -482,7 +479,7 @@
 
18578
          return;
 
18579
        }
 
18580
       else
 
18581
-       retarray->base_addr = xmalloc (alloc_size);
 
18582
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
18583
     }
 
18584
   else
 
18585
     {
 
18586
Index: libgfortran/generated/parity_l8.c
 
18587
===================================================================
 
18588
--- a/src/libgfortran/generated/parity_l8.c     (.../tags/gcc_4_8_3_release)
 
18589
+++ b/src/libgfortran/generated/parity_l8.c     (.../branches/gcc-4_8-branch)
 
18590
@@ -98,10 +98,9 @@
 
18591
       retarray->offset = 0;
 
18592
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18593
 
 
18594
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18595
-                  * extent[rank-1];
 
18596
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18597
 
 
18598
-      retarray->base_addr = xmalloc (alloc_size);
 
18599
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
18600
       if (alloc_size == 0)
 
18601
        {
 
18602
          /* Make sure we have a zero-sized array.  */
 
18603
Index: libgfortran/generated/minval_i4.c
 
18604
===================================================================
 
18605
--- a/src/libgfortran/generated/minval_i4.c     (.../tags/gcc_4_8_3_release)
 
18606
+++ b/src/libgfortran/generated/minval_i4.c     (.../branches/gcc-4_8-branch)
 
18607
@@ -97,10 +97,9 @@
 
18608
       retarray->offset = 0;
 
18609
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18610
 
 
18611
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18612
-                  * extent[rank-1];
 
18613
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18614
 
 
18615
-      retarray->base_addr = xmalloc (alloc_size);
 
18616
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18617
       if (alloc_size == 0)
 
18618
        {
 
18619
          /* Make sure we have a zero-sized array.  */
 
18620
@@ -286,8 +285,7 @@
 
18621
 
 
18622
        }
 
18623
 
 
18624
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18625
-                  * extent[rank-1];
 
18626
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18627
 
 
18628
       retarray->offset = 0;
 
18629
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18630
@@ -299,7 +297,7 @@
 
18631
          return;
 
18632
        }
 
18633
       else
 
18634
-       retarray->base_addr = xmalloc (alloc_size);
 
18635
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18636
 
 
18637
     }
 
18638
   else
 
18639
@@ -472,8 +470,7 @@
 
18640
       retarray->offset = 0;
 
18641
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18642
 
 
18643
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18644
-                  * extent[rank-1];
 
18645
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18646
 
 
18647
       if (alloc_size == 0)
 
18648
        {
 
18649
@@ -482,7 +479,7 @@
 
18650
          return;
 
18651
        }
 
18652
       else
 
18653
-       retarray->base_addr = xmalloc (alloc_size);
 
18654
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18655
     }
 
18656
   else
 
18657
     {
 
18658
Index: libgfortran/generated/maxloc1_8_i2.c
 
18659
===================================================================
 
18660
--- a/src/libgfortran/generated/maxloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
18661
+++ b/src/libgfortran/generated/maxloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
18662
@@ -98,10 +98,9 @@
 
18663
       retarray->offset = 0;
 
18664
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18665
 
 
18666
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18667
-                  * extent[rank-1];
 
18668
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18669
 
 
18670
-      retarray->base_addr = xmalloc (alloc_size);
 
18671
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18672
       if (alloc_size == 0)
 
18673
        {
 
18674
          /* Make sure we have a zero-sized array.  */
 
18675
@@ -294,8 +293,7 @@
 
18676
 
 
18677
        }
 
18678
 
 
18679
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18680
-                  * extent[rank-1];
 
18681
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18682
 
 
18683
       retarray->offset = 0;
 
18684
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18685
@@ -307,7 +305,7 @@
 
18686
          return;
 
18687
        }
 
18688
       else
 
18689
-       retarray->base_addr = xmalloc (alloc_size);
 
18690
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18691
 
 
18692
     }
 
18693
   else
 
18694
@@ -485,8 +483,7 @@
 
18695
       retarray->offset = 0;
 
18696
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18697
 
 
18698
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18699
-                  * extent[rank-1];
 
18700
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18701
 
 
18702
       if (alloc_size == 0)
 
18703
        {
 
18704
@@ -495,7 +492,7 @@
 
18705
          return;
 
18706
        }
 
18707
       else
 
18708
-       retarray->base_addr = xmalloc (alloc_size);
 
18709
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18710
     }
 
18711
   else
 
18712
     {
 
18713
Index: libgfortran/generated/any_l8.c
 
18714
===================================================================
 
18715
--- a/src/libgfortran/generated/any_l8.c        (.../tags/gcc_4_8_3_release)
 
18716
+++ b/src/libgfortran/generated/any_l8.c        (.../branches/gcc-4_8-branch)
 
18717
@@ -101,8 +101,7 @@
 
18718
       retarray->offset = 0;
 
18719
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18720
 
 
18721
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18722
-                  * extent[rank-1];
 
18723
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18724
 
 
18725
       if (alloc_size == 0)
 
18726
        {
 
18727
@@ -111,7 +110,7 @@
 
18728
          return;
 
18729
        }
 
18730
       else
 
18731
-       retarray->base_addr = xmalloc (alloc_size);
 
18732
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
18733
     }
 
18734
   else
 
18735
     {
 
18736
Index: libgfortran/generated/maxloc0_16_r10.c
 
18737
===================================================================
 
18738
--- a/src/libgfortran/generated/maxloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
18739
+++ b/src/libgfortran/generated/maxloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
18740
@@ -58,7 +58,7 @@
 
18741
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18742
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18743
       retarray->offset = 0;
 
18744
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18745
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18746
     }
 
18747
   else
 
18748
     {
 
18749
@@ -199,7 +199,7 @@
 
18750
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18751
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18752
       retarray->offset = 0;
 
18753
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18754
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18755
     }
 
18756
   else
 
18757
     {
 
18758
@@ -367,7 +367,7 @@
 
18759
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18760
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18761
       retarray->offset = 0;
 
18762
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
18763
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
18764
     }
 
18765
   else if (unlikely (compile_options.bounds_check))
 
18766
     {
 
18767
Index: libgfortran/generated/minloc0_4_i16.c
 
18768
===================================================================
 
18769
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
18770
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
18771
@@ -58,7 +58,7 @@
 
18772
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18773
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18774
       retarray->offset = 0;
 
18775
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18776
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18777
     }
 
18778
   else
 
18779
     {
 
18780
@@ -199,7 +199,7 @@
 
18781
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18782
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18783
       retarray->offset = 0;
 
18784
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18785
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18786
     }
 
18787
   else
 
18788
     {
 
18789
@@ -367,7 +367,7 @@
 
18790
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18791
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18792
       retarray->offset = 0;
 
18793
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
18794
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
18795
     }
 
18796
   else if (unlikely (compile_options.bounds_check))
 
18797
     {
 
18798
Index: libgfortran/generated/maxloc0_8_r8.c
 
18799
===================================================================
 
18800
--- a/src/libgfortran/generated/maxloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
18801
+++ b/src/libgfortran/generated/maxloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
18802
@@ -58,7 +58,7 @@
 
18803
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18804
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18805
       retarray->offset = 0;
 
18806
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18807
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18808
     }
 
18809
   else
 
18810
     {
 
18811
@@ -199,7 +199,7 @@
 
18812
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18813
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18814
       retarray->offset = 0;
 
18815
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18816
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18817
     }
 
18818
   else
 
18819
     {
 
18820
@@ -367,7 +367,7 @@
 
18821
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18822
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18823
       retarray->offset = 0;
 
18824
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18825
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18826
     }
 
18827
   else if (unlikely (compile_options.bounds_check))
 
18828
     {
 
18829
Index: libgfortran/generated/minloc1_4_r10.c
 
18830
===================================================================
 
18831
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
18832
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
18833
@@ -98,10 +98,9 @@
 
18834
       retarray->offset = 0;
 
18835
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18836
 
 
18837
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18838
-                  * extent[rank-1];
 
18839
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18840
 
 
18841
-      retarray->base_addr = xmalloc (alloc_size);
 
18842
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18843
       if (alloc_size == 0)
 
18844
        {
 
18845
          /* Make sure we have a zero-sized array.  */
 
18846
@@ -294,8 +293,7 @@
 
18847
 
 
18848
        }
 
18849
 
 
18850
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18851
-                  * extent[rank-1];
 
18852
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18853
 
 
18854
       retarray->offset = 0;
 
18855
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18856
@@ -307,7 +305,7 @@
 
18857
          return;
 
18858
        }
 
18859
       else
 
18860
-       retarray->base_addr = xmalloc (alloc_size);
 
18861
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18862
 
 
18863
     }
 
18864
   else
 
18865
@@ -485,8 +483,7 @@
 
18866
       retarray->offset = 0;
 
18867
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18868
 
 
18869
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18870
-                  * extent[rank-1];
 
18871
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18872
 
 
18873
       if (alloc_size == 0)
 
18874
        {
 
18875
@@ -495,7 +492,7 @@
 
18876
          return;
 
18877
        }
 
18878
       else
 
18879
-       retarray->base_addr = xmalloc (alloc_size);
 
18880
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
18881
     }
 
18882
   else
 
18883
     {
 
18884
Index: libgfortran/generated/minloc1_8_i16.c
 
18885
===================================================================
 
18886
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
18887
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
18888
@@ -98,10 +98,9 @@
 
18889
       retarray->offset = 0;
 
18890
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18891
 
 
18892
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18893
-                  * extent[rank-1];
 
18894
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18895
 
 
18896
-      retarray->base_addr = xmalloc (alloc_size);
 
18897
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18898
       if (alloc_size == 0)
 
18899
        {
 
18900
          /* Make sure we have a zero-sized array.  */
 
18901
@@ -294,8 +293,7 @@
 
18902
 
 
18903
        }
 
18904
 
 
18905
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18906
-                  * extent[rank-1];
 
18907
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18908
 
 
18909
       retarray->offset = 0;
 
18910
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18911
@@ -307,7 +305,7 @@
 
18912
          return;
 
18913
        }
 
18914
       else
 
18915
-       retarray->base_addr = xmalloc (alloc_size);
 
18916
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18917
 
 
18918
     }
 
18919
   else
 
18920
@@ -485,8 +483,7 @@
 
18921
       retarray->offset = 0;
 
18922
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18923
 
 
18924
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
18925
-                  * extent[rank-1];
 
18926
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
18927
 
 
18928
       if (alloc_size == 0)
 
18929
        {
 
18930
@@ -495,7 +492,7 @@
 
18931
          return;
 
18932
        }
 
18933
       else
 
18934
-       retarray->base_addr = xmalloc (alloc_size);
 
18935
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
18936
     }
 
18937
   else
 
18938
     {
 
18939
Index: libgfortran/generated/maxloc0_8_r10.c
 
18940
===================================================================
 
18941
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
18942
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
18943
@@ -58,7 +58,7 @@
 
18944
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18945
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18946
       retarray->offset = 0;
 
18947
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18948
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18949
     }
 
18950
   else
 
18951
     {
 
18952
@@ -199,7 +199,7 @@
 
18953
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
18954
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18955
       retarray->offset = 0;
 
18956
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18957
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18958
     }
 
18959
   else
 
18960
     {
 
18961
@@ -367,7 +367,7 @@
 
18962
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
18963
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
18964
       retarray->offset = 0;
 
18965
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
18966
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
18967
     }
 
18968
   else if (unlikely (compile_options.bounds_check))
 
18969
     {
 
18970
Index: libgfortran/generated/unpack_i4.c
 
18971
===================================================================
 
18972
--- a/src/libgfortran/generated/unpack_i4.c     (.../tags/gcc_4_8_3_release)
 
18973
+++ b/src/libgfortran/generated/unpack_i4.c     (.../branches/gcc-4_8-branch)
 
18974
@@ -99,7 +99,7 @@
 
18975
          rs *= extent[n];
 
18976
        }
 
18977
       ret->offset = 0;
 
18978
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
18979
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
18980
     }
 
18981
   else
 
18982
     {
 
18983
@@ -244,7 +244,7 @@
 
18984
          rs *= extent[n];
 
18985
        }
 
18986
       ret->offset = 0;
 
18987
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
 
18988
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
 
18989
     }
 
18990
   else
 
18991
     {
 
18992
Index: libgfortran/generated/minloc1_16_r4.c
 
18993
===================================================================
 
18994
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
18995
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
18996
@@ -98,10 +98,9 @@
 
18997
       retarray->offset = 0;
 
18998
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
18999
 
 
19000
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19001
-                  * extent[rank-1];
 
19002
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19003
 
 
19004
-      retarray->base_addr = xmalloc (alloc_size);
 
19005
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19006
       if (alloc_size == 0)
 
19007
        {
 
19008
          /* Make sure we have a zero-sized array.  */
 
19009
@@ -294,8 +293,7 @@
 
19010
 
 
19011
        }
 
19012
 
 
19013
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19014
-                  * extent[rank-1];
 
19015
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19016
 
 
19017
       retarray->offset = 0;
 
19018
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19019
@@ -307,7 +305,7 @@
 
19020
          return;
 
19021
        }
 
19022
       else
 
19023
-       retarray->base_addr = xmalloc (alloc_size);
 
19024
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19025
 
 
19026
     }
 
19027
   else
 
19028
@@ -485,8 +483,7 @@
 
19029
       retarray->offset = 0;
 
19030
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19031
 
 
19032
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19033
-                  * extent[rank-1];
 
19034
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19035
 
 
19036
       if (alloc_size == 0)
 
19037
        {
 
19038
@@ -495,7 +492,7 @@
 
19039
          return;
 
19040
        }
 
19041
       else
 
19042
-       retarray->base_addr = xmalloc (alloc_size);
 
19043
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19044
     }
 
19045
   else
 
19046
     {
 
19047
Index: libgfortran/generated/product_i8.c
 
19048
===================================================================
 
19049
--- a/src/libgfortran/generated/product_i8.c    (.../tags/gcc_4_8_3_release)
 
19050
+++ b/src/libgfortran/generated/product_i8.c    (.../branches/gcc-4_8-branch)
 
19051
@@ -97,10 +97,9 @@
 
19052
       retarray->offset = 0;
 
19053
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19054
 
 
19055
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19056
-                  * extent[rank-1];
 
19057
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19058
 
 
19059
-      retarray->base_addr = xmalloc (alloc_size);
 
19060
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19061
       if (alloc_size == 0)
 
19062
        {
 
19063
          /* Make sure we have a zero-sized array.  */
 
19064
@@ -272,8 +271,7 @@
 
19065
 
 
19066
        }
 
19067
 
 
19068
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19069
-                  * extent[rank-1];
 
19070
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19071
 
 
19072
       retarray->offset = 0;
 
19073
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19074
@@ -285,7 +283,7 @@
 
19075
          return;
 
19076
        }
 
19077
       else
 
19078
-       retarray->base_addr = xmalloc (alloc_size);
 
19079
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19080
 
 
19081
     }
 
19082
   else
 
19083
@@ -430,8 +428,7 @@
 
19084
       retarray->offset = 0;
 
19085
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19086
 
 
19087
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19088
-                  * extent[rank-1];
 
19089
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19090
 
 
19091
       if (alloc_size == 0)
 
19092
        {
 
19093
@@ -440,7 +437,7 @@
 
19094
          return;
 
19095
        }
 
19096
       else
 
19097
-       retarray->base_addr = xmalloc (alloc_size);
 
19098
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19099
     }
 
19100
   else
 
19101
     {
 
19102
Index: libgfortran/generated/minloc0_16_r8.c
 
19103
===================================================================
 
19104
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
19105
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
19106
@@ -58,7 +58,7 @@
 
19107
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19108
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19109
       retarray->offset = 0;
 
19110
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19111
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19112
     }
 
19113
   else
 
19114
     {
 
19115
@@ -199,7 +199,7 @@
 
19116
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19117
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19118
       retarray->offset = 0;
 
19119
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19120
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19121
     }
 
19122
   else
 
19123
     {
 
19124
@@ -367,7 +367,7 @@
 
19125
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19126
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19127
       retarray->offset = 0;
 
19128
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
19129
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
19130
     }
 
19131
   else if (unlikely (compile_options.bounds_check))
 
19132
     {
 
19133
Index: libgfortran/generated/count_2_l.c
 
19134
===================================================================
 
19135
--- a/src/libgfortran/generated/count_2_l.c     (.../tags/gcc_4_8_3_release)
 
19136
+++ b/src/libgfortran/generated/count_2_l.c     (.../branches/gcc-4_8-branch)
 
19137
@@ -101,8 +101,7 @@
 
19138
       retarray->offset = 0;
 
19139
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19140
 
 
19141
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19142
-                  * extent[rank-1];
 
19143
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19144
 
 
19145
       if (alloc_size == 0)
 
19146
        {
 
19147
@@ -111,7 +110,7 @@
 
19148
          return;
 
19149
        }
 
19150
       else
 
19151
-       retarray->base_addr = xmalloc (alloc_size);
 
19152
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
19153
     }
 
19154
   else
 
19155
     {
 
19156
Index: libgfortran/generated/transpose_r8.c
 
19157
===================================================================
 
19158
--- a/src/libgfortran/generated/transpose_r8.c  (.../tags/gcc_4_8_3_release)
 
19159
+++ b/src/libgfortran/generated/transpose_r8.c  (.../branches/gcc-4_8-branch)
 
19160
@@ -60,7 +60,8 @@
 
19161
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19162
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19163
 
 
19164
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
 
19165
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19166
+                                     sizeof (GFC_REAL_8));
 
19167
       ret->offset = 0;
 
19168
     } else if (unlikely (compile_options.bounds_check))
 
19169
     {
 
19170
Index: libgfortran/generated/cshift1_8.c
 
19171
===================================================================
 
19172
--- a/src/libgfortran/generated/cshift1_8.c     (.../tags/gcc_4_8_3_release)
 
19173
+++ b/src/libgfortran/generated/cshift1_8.c     (.../branches/gcc-4_8-branch)
 
19174
@@ -80,7 +80,7 @@
 
19175
     {
 
19176
       int i;
 
19177
 
 
19178
-      ret->base_addr = xmalloc (size * arraysize);
 
19179
+      ret->base_addr = xmallocarray (arraysize, size);
 
19180
       ret->offset = 0;
 
19181
       ret->dtype = array->dtype;
 
19182
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
19183
Index: libgfortran/generated/matmul_i4.c
 
19184
===================================================================
 
19185
--- a/src/libgfortran/generated/matmul_i4.c     (.../tags/gcc_4_8_3_release)
 
19186
+++ b/src/libgfortran/generated/matmul_i4.c     (.../branches/gcc-4_8-branch)
 
19187
@@ -124,7 +124,7 @@
 
19188
         }
 
19189
 
 
19190
       retarray->base_addr
 
19191
-       = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
 
19192
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
 
19193
       retarray->offset = 0;
 
19194
     }
 
19195
     else if (unlikely (compile_options.bounds_check))
 
19196
Index: libgfortran/generated/pack_r10.c
 
19197
===================================================================
 
19198
--- a/src/libgfortran/generated/pack_r10.c      (.../tags/gcc_4_8_3_release)
 
19199
+++ b/src/libgfortran/generated/pack_r10.c      (.../branches/gcc-4_8-branch)
 
19200
@@ -167,8 +167,8 @@
 
19201
 
 
19202
          ret->offset = 0;
 
19203
 
 
19204
-         /* xmalloc allocates a single byte for zero size.  */
 
19205
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
 
19206
+         /* xmallocarray allocates a single byte for zero size.  */
 
19207
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
 
19208
 
 
19209
          if (total == 0)
 
19210
            return;
 
19211
Index: libgfortran/generated/minloc1_16_i2.c
 
19212
===================================================================
 
19213
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
19214
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
19215
@@ -98,10 +98,9 @@
 
19216
       retarray->offset = 0;
 
19217
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19218
 
 
19219
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19220
-                  * extent[rank-1];
 
19221
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19222
 
 
19223
-      retarray->base_addr = xmalloc (alloc_size);
 
19224
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19225
       if (alloc_size == 0)
 
19226
        {
 
19227
          /* Make sure we have a zero-sized array.  */
 
19228
@@ -294,8 +293,7 @@
 
19229
 
 
19230
        }
 
19231
 
 
19232
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19233
-                  * extent[rank-1];
 
19234
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19235
 
 
19236
       retarray->offset = 0;
 
19237
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19238
@@ -307,7 +305,7 @@
 
19239
          return;
 
19240
        }
 
19241
       else
 
19242
-       retarray->base_addr = xmalloc (alloc_size);
 
19243
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19244
 
 
19245
     }
 
19246
   else
 
19247
@@ -485,8 +483,7 @@
 
19248
       retarray->offset = 0;
 
19249
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19250
 
 
19251
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19252
-                  * extent[rank-1];
 
19253
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19254
 
 
19255
       if (alloc_size == 0)
 
19256
        {
 
19257
@@ -495,7 +492,7 @@
 
19258
          return;
 
19259
        }
 
19260
       else
 
19261
-       retarray->base_addr = xmalloc (alloc_size);
 
19262
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19263
     }
 
19264
   else
 
19265
     {
 
19266
Index: libgfortran/generated/in_pack_i8.c
 
19267
===================================================================
 
19268
--- a/src/libgfortran/generated/in_pack_i8.c    (.../tags/gcc_4_8_3_release)
 
19269
+++ b/src/libgfortran/generated/in_pack_i8.c    (.../branches/gcc-4_8-branch)
 
19270
@@ -76,7 +76,7 @@
 
19271
     return source->base_addr;
 
19272
 
 
19273
   /* Allocate storage for the destination.  */
 
19274
-  destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
 
19275
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
 
19276
   dest = destptr;
 
19277
   src = source->base_addr;
 
19278
   stride0 = stride[0];
 
19279
Index: libgfortran/generated/transpose_r16.c
 
19280
===================================================================
 
19281
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
 
19282
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
 
19283
@@ -60,7 +60,8 @@
 
19284
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
19285
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
19286
 
 
19287
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
 
19288
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
19289
+                                     sizeof (GFC_REAL_16));
 
19290
       ret->offset = 0;
 
19291
     } else if (unlikely (compile_options.bounds_check))
 
19292
     {
 
19293
Index: libgfortran/generated/minloc1_4_i4.c
 
19294
===================================================================
 
19295
--- a/src/libgfortran/generated/minloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
19296
+++ b/src/libgfortran/generated/minloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
19297
@@ -98,10 +98,9 @@
 
19298
       retarray->offset = 0;
 
19299
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19300
 
 
19301
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19302
-                  * extent[rank-1];
 
19303
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19304
 
 
19305
-      retarray->base_addr = xmalloc (alloc_size);
 
19306
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19307
       if (alloc_size == 0)
 
19308
        {
 
19309
          /* Make sure we have a zero-sized array.  */
 
19310
@@ -294,8 +293,7 @@
 
19311
 
 
19312
        }
 
19313
 
 
19314
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19315
-                  * extent[rank-1];
 
19316
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19317
 
 
19318
       retarray->offset = 0;
 
19319
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19320
@@ -307,7 +305,7 @@
 
19321
          return;
 
19322
        }
 
19323
       else
 
19324
-       retarray->base_addr = xmalloc (alloc_size);
 
19325
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19326
 
 
19327
     }
 
19328
   else
 
19329
@@ -485,8 +483,7 @@
 
19330
       retarray->offset = 0;
 
19331
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19332
 
 
19333
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19334
-                  * extent[rank-1];
 
19335
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19336
 
 
19337
       if (alloc_size == 0)
 
19338
        {
 
19339
@@ -495,7 +492,7 @@
 
19340
          return;
 
19341
        }
 
19342
       else
 
19343
-       retarray->base_addr = xmalloc (alloc_size);
 
19344
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
19345
     }
 
19346
   else
 
19347
     {
 
19348
Index: libgfortran/generated/maxval_i1.c
 
19349
===================================================================
 
19350
--- a/src/libgfortran/generated/maxval_i1.c     (.../tags/gcc_4_8_3_release)
 
19351
+++ b/src/libgfortran/generated/maxval_i1.c     (.../branches/gcc-4_8-branch)
 
19352
@@ -97,10 +97,9 @@
 
19353
       retarray->offset = 0;
 
19354
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19355
 
 
19356
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19357
-                  * extent[rank-1];
 
19358
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19359
 
 
19360
-      retarray->base_addr = xmalloc (alloc_size);
 
19361
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19362
       if (alloc_size == 0)
 
19363
        {
 
19364
          /* Make sure we have a zero-sized array.  */
 
19365
@@ -286,8 +285,7 @@
 
19366
 
 
19367
        }
 
19368
 
 
19369
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19370
-                  * extent[rank-1];
 
19371
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19372
 
 
19373
       retarray->offset = 0;
 
19374
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19375
@@ -299,7 +297,7 @@
 
19376
          return;
 
19377
        }
 
19378
       else
 
19379
-       retarray->base_addr = xmalloc (alloc_size);
 
19380
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19381
 
 
19382
     }
 
19383
   else
 
19384
@@ -472,8 +470,7 @@
 
19385
       retarray->offset = 0;
 
19386
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19387
 
 
19388
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19389
-                  * extent[rank-1];
 
19390
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19391
 
 
19392
       if (alloc_size == 0)
 
19393
        {
 
19394
@@ -482,7 +479,7 @@
 
19395
          return;
 
19396
        }
 
19397
       else
 
19398
-       retarray->base_addr = xmalloc (alloc_size);
 
19399
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
19400
     }
 
19401
   else
 
19402
     {
 
19403
Index: libgfortran/generated/product_c16.c
 
19404
===================================================================
 
19405
--- a/src/libgfortran/generated/product_c16.c   (.../tags/gcc_4_8_3_release)
 
19406
+++ b/src/libgfortran/generated/product_c16.c   (.../branches/gcc-4_8-branch)
 
19407
@@ -97,10 +97,9 @@
 
19408
       retarray->offset = 0;
 
19409
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19410
 
 
19411
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19412
-                  * extent[rank-1];
 
19413
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19414
 
 
19415
-      retarray->base_addr = xmalloc (alloc_size);
 
19416
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
19417
       if (alloc_size == 0)
 
19418
        {
 
19419
          /* Make sure we have a zero-sized array.  */
 
19420
@@ -272,8 +271,7 @@
 
19421
 
 
19422
        }
 
19423
 
 
19424
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19425
-                  * extent[rank-1];
 
19426
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19427
 
 
19428
       retarray->offset = 0;
 
19429
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19430
@@ -285,7 +283,7 @@
 
19431
          return;
 
19432
        }
 
19433
       else
 
19434
-       retarray->base_addr = xmalloc (alloc_size);
 
19435
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
19436
 
 
19437
     }
 
19438
   else
 
19439
@@ -430,8 +428,7 @@
 
19440
       retarray->offset = 0;
 
19441
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19442
 
 
19443
-      alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19444
-                  * extent[rank-1];
 
19445
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19446
 
 
19447
       if (alloc_size == 0)
 
19448
        {
 
19449
@@ -440,7 +437,7 @@
 
19450
          return;
 
19451
        }
 
19452
       else
 
19453
-       retarray->base_addr = xmalloc (alloc_size);
 
19454
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
 
19455
     }
 
19456
   else
 
19457
     {
 
19458
Index: libgfortran/generated/reshape_r4.c
 
19459
===================================================================
 
19460
--- a/src/libgfortran/generated/reshape_r4.c    (.../tags/gcc_4_8_3_release)
 
19461
+++ b/src/libgfortran/generated/reshape_r4.c    (.../branches/gcc-4_8-branch)
 
19462
@@ -111,11 +111,11 @@
 
19463
       ret->offset = 0;
 
19464
 
 
19465
       if (unlikely (rs < 1))
 
19466
-        alloc_size = 1;
 
19467
+        alloc_size = 0;
 
19468
       else
 
19469
-        alloc_size = rs * sizeof (GFC_REAL_4);
 
19470
+        alloc_size = rs;
 
19471
 
 
19472
-      ret->base_addr = xmalloc (alloc_size);
 
19473
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
19474
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
19475
     }
 
19476
 
 
19477
Index: libgfortran/generated/iany_i8.c
 
19478
===================================================================
 
19479
--- a/src/libgfortran/generated/iany_i8.c       (.../tags/gcc_4_8_3_release)
 
19480
+++ b/src/libgfortran/generated/iany_i8.c       (.../branches/gcc-4_8-branch)
 
19481
@@ -97,10 +97,9 @@
 
19482
       retarray->offset = 0;
 
19483
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19484
 
 
19485
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19486
-                  * extent[rank-1];
 
19487
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19488
 
 
19489
-      retarray->base_addr = xmalloc (alloc_size);
 
19490
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19491
       if (alloc_size == 0)
 
19492
        {
 
19493
          /* Make sure we have a zero-sized array.  */
 
19494
@@ -272,8 +271,7 @@
 
19495
 
 
19496
        }
 
19497
 
 
19498
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19499
-                  * extent[rank-1];
 
19500
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19501
 
 
19502
       retarray->offset = 0;
 
19503
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19504
@@ -285,7 +283,7 @@
 
19505
          return;
 
19506
        }
 
19507
       else
 
19508
-       retarray->base_addr = xmalloc (alloc_size);
 
19509
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19510
 
 
19511
     }
 
19512
   else
 
19513
@@ -430,8 +428,7 @@
 
19514
       retarray->offset = 0;
 
19515
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19516
 
 
19517
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19518
-                  * extent[rank-1];
 
19519
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19520
 
 
19521
       if (alloc_size == 0)
 
19522
        {
 
19523
@@ -440,7 +437,7 @@
 
19524
          return;
 
19525
        }
 
19526
       else
 
19527
-       retarray->base_addr = xmalloc (alloc_size);
 
19528
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19529
     }
 
19530
   else
 
19531
     {
 
19532
Index: libgfortran/generated/cshift1_16.c
 
19533
===================================================================
 
19534
--- a/src/libgfortran/generated/cshift1_16.c    (.../tags/gcc_4_8_3_release)
 
19535
+++ b/src/libgfortran/generated/cshift1_16.c    (.../branches/gcc-4_8-branch)
 
19536
@@ -80,7 +80,7 @@
 
19537
     {
 
19538
       int i;
 
19539
 
 
19540
-      ret->base_addr = xmalloc (size * arraysize);
 
19541
+      ret->base_addr = xmallocarray (arraysize, size);
 
19542
       ret->offset = 0;
 
19543
       ret->dtype = array->dtype;
 
19544
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
19545
Index: libgfortran/generated/maxloc0_4_i1.c
 
19546
===================================================================
 
19547
--- a/src/libgfortran/generated/maxloc0_4_i1.c  (.../tags/gcc_4_8_3_release)
 
19548
+++ b/src/libgfortran/generated/maxloc0_4_i1.c  (.../branches/gcc-4_8-branch)
 
19549
@@ -58,7 +58,7 @@
 
19550
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19551
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19552
       retarray->offset = 0;
 
19553
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19554
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19555
     }
 
19556
   else
 
19557
     {
 
19558
@@ -199,7 +199,7 @@
 
19559
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19560
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19561
       retarray->offset = 0;
 
19562
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19563
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19564
     }
 
19565
   else
 
19566
     {
 
19567
@@ -367,7 +367,7 @@
 
19568
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19569
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19570
       retarray->offset = 0;
 
19571
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19572
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19573
     }
 
19574
   else if (unlikely (compile_options.bounds_check))
 
19575
     {
 
19576
Index: libgfortran/generated/minloc0_4_i8.c
 
19577
===================================================================
 
19578
--- a/src/libgfortran/generated/minloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
19579
+++ b/src/libgfortran/generated/minloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
19580
@@ -58,7 +58,7 @@
 
19581
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19582
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19583
       retarray->offset = 0;
 
19584
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19585
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19586
     }
 
19587
   else
 
19588
     {
 
19589
@@ -199,7 +199,7 @@
 
19590
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
19591
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19592
       retarray->offset = 0;
 
19593
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19594
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19595
     }
 
19596
   else
 
19597
     {
 
19598
@@ -367,7 +367,7 @@
 
19599
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
19600
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
19601
       retarray->offset = 0;
 
19602
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
19603
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
19604
     }
 
19605
   else if (unlikely (compile_options.bounds_check))
 
19606
     {
 
19607
Index: libgfortran/generated/spread_c16.c
 
19608
===================================================================
 
19609
--- a/src/libgfortran/generated/spread_c16.c    (.../tags/gcc_4_8_3_release)
 
19610
+++ b/src/libgfortran/generated/spread_c16.c    (.../branches/gcc-4_8-branch)
 
19611
@@ -101,8 +101,8 @@
 
19612
        }
 
19613
       ret->offset = 0;
 
19614
 
 
19615
-      /* xmalloc allocates a single byte for zero size.  */
 
19616
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
 
19617
+      /* xmallocarray allocates a single byte for zero size.  */
 
19618
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
 
19619
       if (rs <= 0)
 
19620
         return;
 
19621
     }
 
19622
@@ -244,7 +244,7 @@
 
19623
 
 
19624
   if (ret->base_addr == NULL)
 
19625
     {
 
19626
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
 
19627
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
 
19628
       ret->offset = 0;
 
19629
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
19630
     }
 
19631
Index: libgfortran/generated/maxval_r4.c
 
19632
===================================================================
 
19633
--- a/src/libgfortran/generated/maxval_r4.c     (.../tags/gcc_4_8_3_release)
 
19634
+++ b/src/libgfortran/generated/maxval_r4.c     (.../branches/gcc-4_8-branch)
 
19635
@@ -97,10 +97,9 @@
 
19636
       retarray->offset = 0;
 
19637
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19638
 
 
19639
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19640
-                  * extent[rank-1];
 
19641
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19642
 
 
19643
-      retarray->base_addr = xmalloc (alloc_size);
 
19644
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
19645
       if (alloc_size == 0)
 
19646
        {
 
19647
          /* Make sure we have a zero-sized array.  */
 
19648
@@ -286,8 +285,7 @@
 
19649
 
 
19650
        }
 
19651
 
 
19652
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19653
-                  * extent[rank-1];
 
19654
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19655
 
 
19656
       retarray->offset = 0;
 
19657
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19658
@@ -299,7 +297,7 @@
 
19659
          return;
 
19660
        }
 
19661
       else
 
19662
-       retarray->base_addr = xmalloc (alloc_size);
 
19663
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
19664
 
 
19665
     }
 
19666
   else
 
19667
@@ -472,8 +470,7 @@
 
19668
       retarray->offset = 0;
 
19669
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19670
 
 
19671
-      alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19672
-                  * extent[rank-1];
 
19673
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19674
 
 
19675
       if (alloc_size == 0)
 
19676
        {
 
19677
@@ -482,7 +479,7 @@
 
19678
          return;
 
19679
        }
 
19680
       else
 
19681
-       retarray->base_addr = xmalloc (alloc_size);
 
19682
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
 
19683
     }
 
19684
   else
 
19685
     {
 
19686
Index: libgfortran/generated/minval_r8.c
 
19687
===================================================================
 
19688
--- a/src/libgfortran/generated/minval_r8.c     (.../tags/gcc_4_8_3_release)
 
19689
+++ b/src/libgfortran/generated/minval_r8.c     (.../branches/gcc-4_8-branch)
 
19690
@@ -97,10 +97,9 @@
 
19691
       retarray->offset = 0;
 
19692
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19693
 
 
19694
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19695
-                  * extent[rank-1];
 
19696
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19697
 
 
19698
-      retarray->base_addr = xmalloc (alloc_size);
 
19699
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19700
       if (alloc_size == 0)
 
19701
        {
 
19702
          /* Make sure we have a zero-sized array.  */
 
19703
@@ -286,8 +285,7 @@
 
19704
 
 
19705
        }
 
19706
 
 
19707
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19708
-                  * extent[rank-1];
 
19709
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19710
 
 
19711
       retarray->offset = 0;
 
19712
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19713
@@ -299,7 +297,7 @@
 
19714
          return;
 
19715
        }
 
19716
       else
 
19717
-       retarray->base_addr = xmalloc (alloc_size);
 
19718
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19719
 
 
19720
     }
 
19721
   else
 
19722
@@ -472,8 +470,7 @@
 
19723
       retarray->offset = 0;
 
19724
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19725
 
 
19726
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19727
-                  * extent[rank-1];
 
19728
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19729
 
 
19730
       if (alloc_size == 0)
 
19731
        {
 
19732
@@ -482,7 +479,7 @@
 
19733
          return;
 
19734
        }
 
19735
       else
 
19736
-       retarray->base_addr = xmalloc (alloc_size);
 
19737
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
19738
     }
 
19739
   else
 
19740
     {
 
19741
Index: libgfortran/generated/minloc1_16_r16.c
 
19742
===================================================================
 
19743
--- a/src/libgfortran/generated/minloc1_16_r16.c        (.../tags/gcc_4_8_3_release)
 
19744
+++ b/src/libgfortran/generated/minloc1_16_r16.c        (.../branches/gcc-4_8-branch)
 
19745
@@ -98,10 +98,9 @@
 
19746
       retarray->offset = 0;
 
19747
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19748
 
 
19749
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19750
-                  * extent[rank-1];
 
19751
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19752
 
 
19753
-      retarray->base_addr = xmalloc (alloc_size);
 
19754
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19755
       if (alloc_size == 0)
 
19756
        {
 
19757
          /* Make sure we have a zero-sized array.  */
 
19758
@@ -294,8 +293,7 @@
 
19759
 
 
19760
        }
 
19761
 
 
19762
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19763
-                  * extent[rank-1];
 
19764
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19765
 
 
19766
       retarray->offset = 0;
 
19767
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19768
@@ -307,7 +305,7 @@
 
19769
          return;
 
19770
        }
 
19771
       else
 
19772
-       retarray->base_addr = xmalloc (alloc_size);
 
19773
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19774
 
 
19775
     }
 
19776
   else
 
19777
@@ -485,8 +483,7 @@
 
19778
       retarray->offset = 0;
 
19779
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19780
 
 
19781
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19782
-                  * extent[rank-1];
 
19783
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19784
 
 
19785
       if (alloc_size == 0)
 
19786
        {
 
19787
@@ -495,7 +492,7 @@
 
19788
          return;
 
19789
        }
 
19790
       else
 
19791
-       retarray->base_addr = xmalloc (alloc_size);
 
19792
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
19793
     }
 
19794
   else
 
19795
     {
 
19796
Index: libgfortran/generated/unpack_i16.c
 
19797
===================================================================
 
19798
--- a/src/libgfortran/generated/unpack_i16.c    (.../tags/gcc_4_8_3_release)
 
19799
+++ b/src/libgfortran/generated/unpack_i16.c    (.../branches/gcc-4_8-branch)
 
19800
@@ -99,7 +99,7 @@
 
19801
          rs *= extent[n];
 
19802
        }
 
19803
       ret->offset = 0;
 
19804
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
19805
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
19806
     }
 
19807
   else
 
19808
     {
 
19809
@@ -244,7 +244,7 @@
 
19810
          rs *= extent[n];
 
19811
        }
 
19812
       ret->offset = 0;
 
19813
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
 
19814
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
 
19815
     }
 
19816
   else
 
19817
     {
 
19818
Index: libgfortran/generated/sum_i8.c
 
19819
===================================================================
 
19820
--- a/src/libgfortran/generated/sum_i8.c        (.../tags/gcc_4_8_3_release)
 
19821
+++ b/src/libgfortran/generated/sum_i8.c        (.../branches/gcc-4_8-branch)
 
19822
@@ -97,10 +97,9 @@
 
19823
       retarray->offset = 0;
 
19824
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19825
 
 
19826
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19827
-                  * extent[rank-1];
 
19828
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19829
 
 
19830
-      retarray->base_addr = xmalloc (alloc_size);
 
19831
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19832
       if (alloc_size == 0)
 
19833
        {
 
19834
          /* Make sure we have a zero-sized array.  */
 
19835
@@ -272,8 +271,7 @@
 
19836
 
 
19837
        }
 
19838
 
 
19839
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19840
-                  * extent[rank-1];
 
19841
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19842
 
 
19843
       retarray->offset = 0;
 
19844
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19845
@@ -285,7 +283,7 @@
 
19846
          return;
 
19847
        }
 
19848
       else
 
19849
-       retarray->base_addr = xmalloc (alloc_size);
 
19850
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19851
 
 
19852
     }
 
19853
   else
 
19854
@@ -430,8 +428,7 @@
 
19855
       retarray->offset = 0;
 
19856
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19857
 
 
19858
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19859
-                  * extent[rank-1];
 
19860
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19861
 
 
19862
       if (alloc_size == 0)
 
19863
        {
 
19864
@@ -440,7 +437,7 @@
 
19865
          return;
 
19866
        }
 
19867
       else
 
19868
-       retarray->base_addr = xmalloc (alloc_size);
 
19869
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
19870
     }
 
19871
   else
 
19872
     {
 
19873
Index: libgfortran/generated/pack_i1.c
 
19874
===================================================================
 
19875
--- a/src/libgfortran/generated/pack_i1.c       (.../tags/gcc_4_8_3_release)
 
19876
+++ b/src/libgfortran/generated/pack_i1.c       (.../branches/gcc-4_8-branch)
 
19877
@@ -167,8 +167,8 @@
 
19878
 
 
19879
          ret->offset = 0;
 
19880
 
 
19881
-         /* xmalloc allocates a single byte for zero size.  */
 
19882
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
 
19883
+         /* xmallocarray allocates a single byte for zero size.  */
 
19884
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
 
19885
 
 
19886
          if (total == 0)
 
19887
            return;
 
19888
Index: libgfortran/generated/any_l16.c
 
19889
===================================================================
 
19890
--- a/src/libgfortran/generated/any_l16.c       (.../tags/gcc_4_8_3_release)
 
19891
+++ b/src/libgfortran/generated/any_l16.c       (.../branches/gcc-4_8-branch)
 
19892
@@ -101,8 +101,7 @@
 
19893
       retarray->offset = 0;
 
19894
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19895
 
 
19896
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19897
-                  * extent[rank-1];
 
19898
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19899
 
 
19900
       if (alloc_size == 0)
 
19901
        {
 
19902
@@ -111,7 +110,7 @@
 
19903
          return;
 
19904
        }
 
19905
       else
 
19906
-       retarray->base_addr = xmalloc (alloc_size);
 
19907
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
19908
     }
 
19909
   else
 
19910
     {
 
19911
Index: libgfortran/generated/spread_i8.c
 
19912
===================================================================
 
19913
--- a/src/libgfortran/generated/spread_i8.c     (.../tags/gcc_4_8_3_release)
 
19914
+++ b/src/libgfortran/generated/spread_i8.c     (.../branches/gcc-4_8-branch)
 
19915
@@ -101,8 +101,8 @@
 
19916
        }
 
19917
       ret->offset = 0;
 
19918
 
 
19919
-      /* xmalloc allocates a single byte for zero size.  */
 
19920
-      ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
 
19921
+      /* xmallocarray allocates a single byte for zero size.  */
 
19922
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
 
19923
       if (rs <= 0)
 
19924
         return;
 
19925
     }
 
19926
@@ -244,7 +244,7 @@
 
19927
 
 
19928
   if (ret->base_addr == NULL)
 
19929
     {
 
19930
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
 
19931
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
 
19932
       ret->offset = 0;
 
19933
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
19934
     }
 
19935
Index: libgfortran/generated/maxval_i2.c
 
19936
===================================================================
 
19937
--- a/src/libgfortran/generated/maxval_i2.c     (.../tags/gcc_4_8_3_release)
 
19938
+++ b/src/libgfortran/generated/maxval_i2.c     (.../branches/gcc-4_8-branch)
 
19939
@@ -97,10 +97,9 @@
 
19940
       retarray->offset = 0;
 
19941
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19942
 
 
19943
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19944
-                  * extent[rank-1];
 
19945
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19946
 
 
19947
-      retarray->base_addr = xmalloc (alloc_size);
 
19948
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
19949
       if (alloc_size == 0)
 
19950
        {
 
19951
          /* Make sure we have a zero-sized array.  */
 
19952
@@ -286,8 +285,7 @@
 
19953
 
 
19954
        }
 
19955
 
 
19956
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19957
-                  * extent[rank-1];
 
19958
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19959
 
 
19960
       retarray->offset = 0;
 
19961
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19962
@@ -299,7 +297,7 @@
 
19963
          return;
 
19964
        }
 
19965
       else
 
19966
-       retarray->base_addr = xmalloc (alloc_size);
 
19967
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
19968
 
 
19969
     }
 
19970
   else
 
19971
@@ -472,8 +470,7 @@
 
19972
       retarray->offset = 0;
 
19973
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19974
 
 
19975
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19976
-                  * extent[rank-1];
 
19977
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
19978
 
 
19979
       if (alloc_size == 0)
 
19980
        {
 
19981
@@ -482,7 +479,7 @@
 
19982
          return;
 
19983
        }
 
19984
       else
 
19985
-       retarray->base_addr = xmalloc (alloc_size);
 
19986
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
19987
     }
 
19988
   else
 
19989
     {
 
19990
Index: libgfortran/generated/maxloc1_8_i4.c
 
19991
===================================================================
 
19992
--- a/src/libgfortran/generated/maxloc1_8_i4.c  (.../tags/gcc_4_8_3_release)
 
19993
+++ b/src/libgfortran/generated/maxloc1_8_i4.c  (.../branches/gcc-4_8-branch)
 
19994
@@ -98,10 +98,9 @@
 
19995
       retarray->offset = 0;
 
19996
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
19997
 
 
19998
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
19999
-                  * extent[rank-1];
 
20000
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20001
 
 
20002
-      retarray->base_addr = xmalloc (alloc_size);
 
20003
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20004
       if (alloc_size == 0)
 
20005
        {
 
20006
          /* Make sure we have a zero-sized array.  */
 
20007
@@ -294,8 +293,7 @@
 
20008
 
 
20009
        }
 
20010
 
 
20011
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20012
-                  * extent[rank-1];
 
20013
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20014
 
 
20015
       retarray->offset = 0;
 
20016
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20017
@@ -307,7 +305,7 @@
 
20018
          return;
 
20019
        }
 
20020
       else
 
20021
-       retarray->base_addr = xmalloc (alloc_size);
 
20022
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20023
 
 
20024
     }
 
20025
   else
 
20026
@@ -485,8 +483,7 @@
 
20027
       retarray->offset = 0;
 
20028
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20029
 
 
20030
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20031
-                  * extent[rank-1];
 
20032
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20033
 
 
20034
       if (alloc_size == 0)
 
20035
        {
 
20036
@@ -495,7 +492,7 @@
 
20037
          return;
 
20038
        }
 
20039
       else
 
20040
-       retarray->base_addr = xmalloc (alloc_size);
 
20041
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20042
     }
 
20043
   else
 
20044
     {
 
20045
Index: libgfortran/generated/unpack_r8.c
 
20046
===================================================================
 
20047
--- a/src/libgfortran/generated/unpack_r8.c     (.../tags/gcc_4_8_3_release)
 
20048
+++ b/src/libgfortran/generated/unpack_r8.c     (.../branches/gcc-4_8-branch)
 
20049
@@ -99,7 +99,7 @@
 
20050
          rs *= extent[n];
 
20051
        }
 
20052
       ret->offset = 0;
 
20053
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
20054
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
20055
     }
 
20056
   else
 
20057
     {
 
20058
@@ -244,7 +244,7 @@
 
20059
          rs *= extent[n];
 
20060
        }
 
20061
       ret->offset = 0;
 
20062
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
 
20063
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
 
20064
     }
 
20065
   else
 
20066
     {
 
20067
Index: libgfortran/generated/maxloc0_4_r4.c
 
20068
===================================================================
 
20069
--- a/src/libgfortran/generated/maxloc0_4_r4.c  (.../tags/gcc_4_8_3_release)
 
20070
+++ b/src/libgfortran/generated/maxloc0_4_r4.c  (.../branches/gcc-4_8-branch)
 
20071
@@ -58,7 +58,7 @@
 
20072
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20073
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20074
       retarray->offset = 0;
 
20075
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20076
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20077
     }
 
20078
   else
 
20079
     {
 
20080
@@ -199,7 +199,7 @@
 
20081
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20082
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20083
       retarray->offset = 0;
 
20084
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20085
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20086
     }
 
20087
   else
 
20088
     {
 
20089
@@ -367,7 +367,7 @@
 
20090
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20091
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20092
       retarray->offset = 0;
 
20093
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20094
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20095
     }
 
20096
   else if (unlikely (compile_options.bounds_check))
 
20097
     {
 
20098
Index: libgfortran/generated/all_l1.c
 
20099
===================================================================
 
20100
--- a/src/libgfortran/generated/all_l1.c        (.../tags/gcc_4_8_3_release)
 
20101
+++ b/src/libgfortran/generated/all_l1.c        (.../branches/gcc-4_8-branch)
 
20102
@@ -101,8 +101,7 @@
 
20103
       retarray->offset = 0;
 
20104
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20105
 
 
20106
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20107
-                  * extent[rank-1];
 
20108
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20109
 
 
20110
       if (alloc_size == 0)
 
20111
        {
 
20112
@@ -111,7 +110,7 @@
 
20113
          return;
 
20114
        }
 
20115
       else
 
20116
-       retarray->base_addr = xmalloc (alloc_size);
 
20117
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
20118
     }
 
20119
   else
 
20120
     {
 
20121
Index: libgfortran/generated/matmul_r8.c
 
20122
===================================================================
 
20123
--- a/src/libgfortran/generated/matmul_r8.c     (.../tags/gcc_4_8_3_release)
 
20124
+++ b/src/libgfortran/generated/matmul_r8.c     (.../branches/gcc-4_8-branch)
 
20125
@@ -124,7 +124,7 @@
 
20126
         }
 
20127
 
 
20128
       retarray->base_addr
 
20129
-       = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
 
20130
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
 
20131
       retarray->offset = 0;
 
20132
     }
 
20133
     else if (unlikely (compile_options.bounds_check))
 
20134
Index: libgfortran/generated/minloc0_4_r16.c
 
20135
===================================================================
 
20136
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
 
20137
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
 
20138
@@ -58,7 +58,7 @@
 
20139
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20140
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20141
       retarray->offset = 0;
 
20142
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20143
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20144
     }
 
20145
   else
 
20146
     {
 
20147
@@ -199,7 +199,7 @@
 
20148
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20149
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20150
       retarray->offset = 0;
 
20151
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20152
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20153
     }
 
20154
   else
 
20155
     {
 
20156
@@ -367,7 +367,7 @@
 
20157
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20158
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20159
       retarray->offset = 0;
 
20160
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20161
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20162
     }
 
20163
   else if (unlikely (compile_options.bounds_check))
 
20164
     {
 
20165
Index: libgfortran/generated/maxloc0_4_i2.c
 
20166
===================================================================
 
20167
--- a/src/libgfortran/generated/maxloc0_4_i2.c  (.../tags/gcc_4_8_3_release)
 
20168
+++ b/src/libgfortran/generated/maxloc0_4_i2.c  (.../branches/gcc-4_8-branch)
 
20169
@@ -58,7 +58,7 @@
 
20170
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20171
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20172
       retarray->offset = 0;
 
20173
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20174
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20175
     }
 
20176
   else
 
20177
     {
 
20178
@@ -199,7 +199,7 @@
 
20179
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20180
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20181
       retarray->offset = 0;
 
20182
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20183
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20184
     }
 
20185
   else
 
20186
     {
 
20187
@@ -367,7 +367,7 @@
 
20188
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20189
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20190
       retarray->offset = 0;
 
20191
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
20192
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
20193
     }
 
20194
   else if (unlikely (compile_options.bounds_check))
 
20195
     {
 
20196
Index: libgfortran/generated/minloc1_8_r16.c
 
20197
===================================================================
 
20198
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
 
20199
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
 
20200
@@ -98,10 +98,9 @@
 
20201
       retarray->offset = 0;
 
20202
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20203
 
 
20204
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20205
-                  * extent[rank-1];
 
20206
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20207
 
 
20208
-      retarray->base_addr = xmalloc (alloc_size);
 
20209
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20210
       if (alloc_size == 0)
 
20211
        {
 
20212
          /* Make sure we have a zero-sized array.  */
 
20213
@@ -294,8 +293,7 @@
 
20214
 
 
20215
        }
 
20216
 
 
20217
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20218
-                  * extent[rank-1];
 
20219
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20220
 
 
20221
       retarray->offset = 0;
 
20222
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20223
@@ -307,7 +305,7 @@
 
20224
          return;
 
20225
        }
 
20226
       else
 
20227
-       retarray->base_addr = xmalloc (alloc_size);
 
20228
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20229
 
 
20230
     }
 
20231
   else
 
20232
@@ -485,8 +483,7 @@
 
20233
       retarray->offset = 0;
 
20234
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20235
 
 
20236
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20237
-                  * extent[rank-1];
 
20238
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20239
 
 
20240
       if (alloc_size == 0)
 
20241
        {
 
20242
@@ -495,7 +492,7 @@
 
20243
          return;
 
20244
        }
 
20245
       else
 
20246
-       retarray->base_addr = xmalloc (alloc_size);
 
20247
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20248
     }
 
20249
   else
 
20250
     {
 
20251
Index: libgfortran/generated/pack_c10.c
 
20252
===================================================================
 
20253
--- a/src/libgfortran/generated/pack_c10.c      (.../tags/gcc_4_8_3_release)
 
20254
+++ b/src/libgfortran/generated/pack_c10.c      (.../branches/gcc-4_8-branch)
 
20255
@@ -167,8 +167,8 @@
 
20256
 
 
20257
          ret->offset = 0;
 
20258
 
 
20259
-         /* xmalloc allocates a single byte for zero size.  */
 
20260
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
 
20261
+         /* xmallocarray allocates a single byte for zero size.  */
 
20262
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
 
20263
 
 
20264
          if (total == 0)
 
20265
            return;
 
20266
Index: libgfortran/generated/pack_r4.c
 
20267
===================================================================
 
20268
--- a/src/libgfortran/generated/pack_r4.c       (.../tags/gcc_4_8_3_release)
 
20269
+++ b/src/libgfortran/generated/pack_r4.c       (.../branches/gcc-4_8-branch)
 
20270
@@ -167,8 +167,8 @@
 
20271
 
 
20272
          ret->offset = 0;
 
20273
 
 
20274
-         /* xmalloc allocates a single byte for zero size.  */
 
20275
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
 
20276
+         /* xmallocarray allocates a single byte for zero size.  */
 
20277
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
 
20278
 
 
20279
          if (total == 0)
 
20280
            return;
 
20281
Index: libgfortran/generated/transpose_c16.c
 
20282
===================================================================
 
20283
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
 
20284
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
 
20285
@@ -60,7 +60,8 @@
 
20286
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
20287
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
20288
 
 
20289
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
 
20290
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
20291
+                                     sizeof (GFC_COMPLEX_16));
 
20292
       ret->offset = 0;
 
20293
     } else if (unlikely (compile_options.bounds_check))
 
20294
     {
 
20295
Index: libgfortran/generated/maxloc0_8_i8.c
 
20296
===================================================================
 
20297
--- a/src/libgfortran/generated/maxloc0_8_i8.c  (.../tags/gcc_4_8_3_release)
 
20298
+++ b/src/libgfortran/generated/maxloc0_8_i8.c  (.../branches/gcc-4_8-branch)
 
20299
@@ -58,7 +58,7 @@
 
20300
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20301
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20302
       retarray->offset = 0;
 
20303
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20304
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20305
     }
 
20306
   else
 
20307
     {
 
20308
@@ -199,7 +199,7 @@
 
20309
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20310
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20311
       retarray->offset = 0;
 
20312
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20313
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20314
     }
 
20315
   else
 
20316
     {
 
20317
@@ -367,7 +367,7 @@
 
20318
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20319
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20320
       retarray->offset = 0;
 
20321
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
20322
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
20323
     }
 
20324
   else if (unlikely (compile_options.bounds_check))
 
20325
     {
 
20326
Index: libgfortran/generated/minloc1_4_r8.c
 
20327
===================================================================
 
20328
--- a/src/libgfortran/generated/minloc1_4_r8.c  (.../tags/gcc_4_8_3_release)
 
20329
+++ b/src/libgfortran/generated/minloc1_4_r8.c  (.../branches/gcc-4_8-branch)
 
20330
@@ -98,10 +98,9 @@
 
20331
       retarray->offset = 0;
 
20332
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20333
 
 
20334
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20335
-                  * extent[rank-1];
 
20336
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20337
 
 
20338
-      retarray->base_addr = xmalloc (alloc_size);
 
20339
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20340
       if (alloc_size == 0)
 
20341
        {
 
20342
          /* Make sure we have a zero-sized array.  */
 
20343
@@ -294,8 +293,7 @@
 
20344
 
 
20345
        }
 
20346
 
 
20347
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20348
-                  * extent[rank-1];
 
20349
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20350
 
 
20351
       retarray->offset = 0;
 
20352
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20353
@@ -307,7 +305,7 @@
 
20354
          return;
 
20355
        }
 
20356
       else
 
20357
-       retarray->base_addr = xmalloc (alloc_size);
 
20358
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20359
 
 
20360
     }
 
20361
   else
 
20362
@@ -485,8 +483,7 @@
 
20363
       retarray->offset = 0;
 
20364
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20365
 
 
20366
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20367
-                  * extent[rank-1];
 
20368
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20369
 
 
20370
       if (alloc_size == 0)
 
20371
        {
 
20372
@@ -495,7 +492,7 @@
 
20373
          return;
 
20374
        }
 
20375
       else
 
20376
-       retarray->base_addr = xmalloc (alloc_size);
 
20377
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20378
     }
 
20379
   else
 
20380
     {
 
20381
Index: libgfortran/generated/minloc1_16_i4.c
 
20382
===================================================================
 
20383
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
 
20384
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
 
20385
@@ -98,10 +98,9 @@
 
20386
       retarray->offset = 0;
 
20387
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20388
 
 
20389
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20390
-                  * extent[rank-1];
 
20391
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20392
 
 
20393
-      retarray->base_addr = xmalloc (alloc_size);
 
20394
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20395
       if (alloc_size == 0)
 
20396
        {
 
20397
          /* Make sure we have a zero-sized array.  */
 
20398
@@ -294,8 +293,7 @@
 
20399
 
 
20400
        }
 
20401
 
 
20402
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20403
-                  * extent[rank-1];
 
20404
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20405
 
 
20406
       retarray->offset = 0;
 
20407
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20408
@@ -307,7 +305,7 @@
 
20409
          return;
 
20410
        }
 
20411
       else
 
20412
-       retarray->base_addr = xmalloc (alloc_size);
 
20413
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20414
 
 
20415
     }
 
20416
   else
 
20417
@@ -485,8 +483,7 @@
 
20418
       retarray->offset = 0;
 
20419
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20420
 
 
20421
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20422
-                  * extent[rank-1];
 
20423
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20424
 
 
20425
       if (alloc_size == 0)
 
20426
        {
 
20427
@@ -495,7 +492,7 @@
 
20428
          return;
 
20429
        }
 
20430
       else
 
20431
-       retarray->base_addr = xmalloc (alloc_size);
 
20432
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20433
     }
 
20434
   else
 
20435
     {
 
20436
Index: libgfortran/generated/minloc0_16_i8.c
 
20437
===================================================================
 
20438
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
 
20439
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
 
20440
@@ -58,7 +58,7 @@
 
20441
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20442
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20443
       retarray->offset = 0;
 
20444
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20445
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20446
     }
 
20447
   else
 
20448
     {
 
20449
@@ -199,7 +199,7 @@
 
20450
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20451
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20452
       retarray->offset = 0;
 
20453
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20454
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20455
     }
 
20456
   else
 
20457
     {
 
20458
@@ -367,7 +367,7 @@
 
20459
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20460
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20461
       retarray->offset = 0;
 
20462
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20463
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20464
     }
 
20465
   else if (unlikely (compile_options.bounds_check))
 
20466
     {
 
20467
Index: libgfortran/generated/pack_i2.c
 
20468
===================================================================
 
20469
--- a/src/libgfortran/generated/pack_i2.c       (.../tags/gcc_4_8_3_release)
 
20470
+++ b/src/libgfortran/generated/pack_i2.c       (.../branches/gcc-4_8-branch)
 
20471
@@ -167,8 +167,8 @@
 
20472
 
 
20473
          ret->offset = 0;
 
20474
 
 
20475
-         /* xmalloc allocates a single byte for zero size.  */
 
20476
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
 
20477
+         /* xmallocarray allocates a single byte for zero size.  */
 
20478
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
 
20479
 
 
20480
          if (total == 0)
 
20481
            return;
 
20482
Index: libgfortran/generated/transpose_i8.c
 
20483
===================================================================
 
20484
--- a/src/libgfortran/generated/transpose_i8.c  (.../tags/gcc_4_8_3_release)
 
20485
+++ b/src/libgfortran/generated/transpose_i8.c  (.../branches/gcc-4_8-branch)
 
20486
@@ -60,7 +60,8 @@
 
20487
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
20488
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
20489
 
 
20490
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
 
20491
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
20492
+                                     sizeof (GFC_INTEGER_8));
 
20493
       ret->offset = 0;
 
20494
     } else if (unlikely (compile_options.bounds_check))
 
20495
     {
 
20496
Index: libgfortran/generated/eoshift1_16.c
 
20497
===================================================================
 
20498
--- a/src/libgfortran/generated/eoshift1_16.c   (.../tags/gcc_4_8_3_release)
 
20499
+++ b/src/libgfortran/generated/eoshift1_16.c   (.../branches/gcc-4_8-branch)
 
20500
@@ -105,8 +105,8 @@
 
20501
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
20502
 
 
20503
         }
 
20504
-      /* xmalloc allocates a single byte for zero size.  */
 
20505
-      ret->base_addr = xmalloc (size * arraysize);
 
20506
+      /* xmallocarray allocates a single byte for zero size.  */
 
20507
+      ret->base_addr = xmallocarray (arraysize, size);
 
20508
 
 
20509
     }
 
20510
   else if (unlikely (compile_options.bounds_check))
 
20511
Index: libgfortran/generated/all_l2.c
 
20512
===================================================================
 
20513
--- a/src/libgfortran/generated/all_l2.c        (.../tags/gcc_4_8_3_release)
 
20514
+++ b/src/libgfortran/generated/all_l2.c        (.../branches/gcc-4_8-branch)
 
20515
@@ -101,8 +101,7 @@
 
20516
       retarray->offset = 0;
 
20517
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20518
 
 
20519
-      alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20520
-                  * extent[rank-1];
 
20521
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20522
 
 
20523
       if (alloc_size == 0)
 
20524
        {
 
20525
@@ -111,7 +110,7 @@
 
20526
          return;
 
20527
        }
 
20528
       else
 
20529
-       retarray->base_addr = xmalloc (alloc_size);
 
20530
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
 
20531
     }
 
20532
   else
 
20533
     {
 
20534
Index: libgfortran/generated/product_c4.c
 
20535
===================================================================
 
20536
--- a/src/libgfortran/generated/product_c4.c    (.../tags/gcc_4_8_3_release)
 
20537
+++ b/src/libgfortran/generated/product_c4.c    (.../branches/gcc-4_8-branch)
 
20538
@@ -97,10 +97,9 @@
 
20539
       retarray->offset = 0;
 
20540
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20541
 
 
20542
-      alloc_size = sizeof (GFC_COMPLEX_4) * 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_COMPLEX_4));
 
20548
       if (alloc_size == 0)
 
20549
        {
 
20550
          /* Make sure we have a zero-sized array.  */
 
20551
@@ -272,8 +271,7 @@
 
20552
 
 
20553
        }
 
20554
 
 
20555
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20556
-                  * extent[rank-1];
 
20557
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20558
 
 
20559
       retarray->offset = 0;
 
20560
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20561
@@ -285,7 +283,7 @@
 
20562
          return;
 
20563
        }
 
20564
       else
 
20565
-       retarray->base_addr = xmalloc (alloc_size);
 
20566
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
20567
 
 
20568
     }
 
20569
   else
 
20570
@@ -430,8 +428,7 @@
 
20571
       retarray->offset = 0;
 
20572
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20573
 
 
20574
-      alloc_size = sizeof (GFC_COMPLEX_4) * 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
@@ -440,7 +437,7 @@
 
20581
          return;
 
20582
        }
 
20583
       else
 
20584
-       retarray->base_addr = xmalloc (alloc_size);
 
20585
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
20586
     }
 
20587
   else
 
20588
     {
 
20589
Index: libgfortran/generated/iall_i1.c
 
20590
===================================================================
 
20591
--- a/src/libgfortran/generated/iall_i1.c       (.../tags/gcc_4_8_3_release)
 
20592
+++ b/src/libgfortran/generated/iall_i1.c       (.../branches/gcc-4_8-branch)
 
20593
@@ -97,10 +97,9 @@
 
20594
       retarray->offset = 0;
 
20595
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20596
 
 
20597
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20598
-                  * extent[rank-1];
 
20599
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20600
 
 
20601
-      retarray->base_addr = xmalloc (alloc_size);
 
20602
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20603
       if (alloc_size == 0)
 
20604
        {
 
20605
          /* Make sure we have a zero-sized array.  */
 
20606
@@ -272,8 +271,7 @@
 
20607
 
 
20608
        }
 
20609
 
 
20610
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20611
-                  * extent[rank-1];
 
20612
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20613
 
 
20614
       retarray->offset = 0;
 
20615
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20616
@@ -285,7 +283,7 @@
 
20617
          return;
 
20618
        }
 
20619
       else
 
20620
-       retarray->base_addr = xmalloc (alloc_size);
 
20621
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20622
 
 
20623
     }
 
20624
   else
 
20625
@@ -430,8 +428,7 @@
 
20626
       retarray->offset = 0;
 
20627
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20628
 
 
20629
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20630
-                  * extent[rank-1];
 
20631
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20632
 
 
20633
       if (alloc_size == 0)
 
20634
        {
 
20635
@@ -440,7 +437,7 @@
 
20636
          return;
 
20637
        }
 
20638
       else
 
20639
-       retarray->base_addr = xmalloc (alloc_size);
 
20640
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
20641
     }
 
20642
   else
 
20643
     {
 
20644
Index: libgfortran/generated/reshape_i4.c
 
20645
===================================================================
 
20646
--- a/src/libgfortran/generated/reshape_i4.c    (.../tags/gcc_4_8_3_release)
 
20647
+++ b/src/libgfortran/generated/reshape_i4.c    (.../branches/gcc-4_8-branch)
 
20648
@@ -111,11 +111,11 @@
 
20649
       ret->offset = 0;
 
20650
 
 
20651
       if (unlikely (rs < 1))
 
20652
-        alloc_size = 1;
 
20653
+        alloc_size = 0;
 
20654
       else
 
20655
-        alloc_size = rs * sizeof (GFC_INTEGER_4);
 
20656
+        alloc_size = rs;
 
20657
 
 
20658
-      ret->base_addr = xmalloc (alloc_size);
 
20659
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20660
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
20661
     }
 
20662
 
 
20663
Index: libgfortran/generated/in_pack_r10.c
 
20664
===================================================================
 
20665
--- a/src/libgfortran/generated/in_pack_r10.c   (.../tags/gcc_4_8_3_release)
 
20666
+++ b/src/libgfortran/generated/in_pack_r10.c   (.../branches/gcc-4_8-branch)
 
20667
@@ -76,7 +76,7 @@
 
20668
     return source->base_addr;
 
20669
 
 
20670
   /* Allocate storage for the destination.  */
 
20671
-  destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
 
20672
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
 
20673
   dest = destptr;
 
20674
   src = source->base_addr;
 
20675
   stride0 = stride[0];
 
20676
Index: libgfortran/generated/in_pack_c4.c
 
20677
===================================================================
 
20678
--- a/src/libgfortran/generated/in_pack_c4.c    (.../tags/gcc_4_8_3_release)
 
20679
+++ b/src/libgfortran/generated/in_pack_c4.c    (.../branches/gcc-4_8-branch)
 
20680
@@ -76,7 +76,7 @@
 
20681
     return source->base_addr;
 
20682
 
 
20683
   /* Allocate storage for the destination.  */
 
20684
-  destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
 
20685
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
 
20686
   dest = destptr;
 
20687
   src = source->base_addr;
 
20688
   stride0 = stride[0];
 
20689
Index: libgfortran/generated/all_l16.c
 
20690
===================================================================
 
20691
--- a/src/libgfortran/generated/all_l16.c       (.../tags/gcc_4_8_3_release)
 
20692
+++ b/src/libgfortran/generated/all_l16.c       (.../branches/gcc-4_8-branch)
 
20693
@@ -101,8 +101,7 @@
 
20694
       retarray->offset = 0;
 
20695
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20696
 
 
20697
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20698
-                  * extent[rank-1];
 
20699
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20700
 
 
20701
       if (alloc_size == 0)
 
20702
        {
 
20703
@@ -111,7 +110,7 @@
 
20704
          return;
 
20705
        }
 
20706
       else
 
20707
-       retarray->base_addr = xmalloc (alloc_size);
 
20708
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
 
20709
     }
 
20710
   else
 
20711
     {
 
20712
Index: libgfortran/generated/maxloc0_16_i1.c
 
20713
===================================================================
 
20714
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
 
20715
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
 
20716
@@ -58,7 +58,7 @@
 
20717
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20718
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20719
       retarray->offset = 0;
 
20720
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20721
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20722
     }
 
20723
   else
 
20724
     {
 
20725
@@ -199,7 +199,7 @@
 
20726
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
20727
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20728
       retarray->offset = 0;
 
20729
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20730
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20731
     }
 
20732
   else
 
20733
     {
 
20734
@@ -367,7 +367,7 @@
 
20735
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
20736
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
20737
       retarray->offset = 0;
 
20738
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
20739
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
20740
     }
 
20741
   else if (unlikely (compile_options.bounds_check))
 
20742
     {
 
20743
Index: libgfortran/generated/maxloc1_8_r8.c
 
20744
===================================================================
 
20745
--- a/src/libgfortran/generated/maxloc1_8_r8.c  (.../tags/gcc_4_8_3_release)
 
20746
+++ b/src/libgfortran/generated/maxloc1_8_r8.c  (.../branches/gcc-4_8-branch)
 
20747
@@ -98,10 +98,9 @@
 
20748
       retarray->offset = 0;
 
20749
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20750
 
 
20751
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20752
-                  * extent[rank-1];
 
20753
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20754
 
 
20755
-      retarray->base_addr = xmalloc (alloc_size);
 
20756
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20757
       if (alloc_size == 0)
 
20758
        {
 
20759
          /* Make sure we have a zero-sized array.  */
 
20760
@@ -294,8 +293,7 @@
 
20761
 
 
20762
        }
 
20763
 
 
20764
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20765
-                  * extent[rank-1];
 
20766
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20767
 
 
20768
       retarray->offset = 0;
 
20769
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20770
@@ -307,7 +305,7 @@
 
20771
          return;
 
20772
        }
 
20773
       else
 
20774
-       retarray->base_addr = xmalloc (alloc_size);
 
20775
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20776
 
 
20777
     }
 
20778
   else
 
20779
@@ -485,8 +483,7 @@
 
20780
       retarray->offset = 0;
 
20781
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20782
 
 
20783
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20784
-                  * extent[rank-1];
 
20785
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20786
 
 
20787
       if (alloc_size == 0)
 
20788
        {
 
20789
@@ -495,7 +492,7 @@
 
20790
          return;
 
20791
        }
 
20792
       else
 
20793
-       retarray->base_addr = xmalloc (alloc_size);
 
20794
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20795
     }
 
20796
   else
 
20797
     {
 
20798
Index: libgfortran/generated/minval_i16.c
 
20799
===================================================================
 
20800
--- a/src/libgfortran/generated/minval_i16.c    (.../tags/gcc_4_8_3_release)
 
20801
+++ b/src/libgfortran/generated/minval_i16.c    (.../branches/gcc-4_8-branch)
 
20802
@@ -97,10 +97,9 @@
 
20803
       retarray->offset = 0;
 
20804
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20805
 
 
20806
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20807
-                  * extent[rank-1];
 
20808
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20809
 
 
20810
-      retarray->base_addr = xmalloc (alloc_size);
 
20811
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20812
       if (alloc_size == 0)
 
20813
        {
 
20814
          /* Make sure we have a zero-sized array.  */
 
20815
@@ -286,8 +285,7 @@
 
20816
 
 
20817
        }
 
20818
 
 
20819
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20820
-                  * extent[rank-1];
 
20821
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20822
 
 
20823
       retarray->offset = 0;
 
20824
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20825
@@ -299,7 +297,7 @@
 
20826
          return;
 
20827
        }
 
20828
       else
 
20829
-       retarray->base_addr = xmalloc (alloc_size);
 
20830
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20831
 
 
20832
     }
 
20833
   else
 
20834
@@ -472,8 +470,7 @@
 
20835
       retarray->offset = 0;
 
20836
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20837
 
 
20838
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20839
-                  * extent[rank-1];
 
20840
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20841
 
 
20842
       if (alloc_size == 0)
 
20843
        {
 
20844
@@ -482,7 +479,7 @@
 
20845
          return;
 
20846
        }
 
20847
       else
 
20848
-       retarray->base_addr = xmalloc (alloc_size);
 
20849
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
20850
     }
 
20851
   else
 
20852
     {
 
20853
Index: libgfortran/generated/reshape_r10.c
 
20854
===================================================================
 
20855
--- a/src/libgfortran/generated/reshape_r10.c   (.../tags/gcc_4_8_3_release)
 
20856
+++ b/src/libgfortran/generated/reshape_r10.c   (.../branches/gcc-4_8-branch)
 
20857
@@ -111,11 +111,11 @@
 
20858
       ret->offset = 0;
 
20859
 
 
20860
       if (unlikely (rs < 1))
 
20861
-        alloc_size = 1;
 
20862
+        alloc_size = 0;
 
20863
       else
 
20864
-        alloc_size = rs * sizeof (GFC_REAL_10);
 
20865
+        alloc_size = rs;
 
20866
 
 
20867
-      ret->base_addr = xmalloc (alloc_size);
 
20868
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
20869
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
20870
     }
 
20871
 
 
20872
Index: libgfortran/generated/unpack_r16.c
 
20873
===================================================================
 
20874
--- a/src/libgfortran/generated/unpack_r16.c    (.../tags/gcc_4_8_3_release)
 
20875
+++ b/src/libgfortran/generated/unpack_r16.c    (.../branches/gcc-4_8-branch)
 
20876
@@ -99,7 +99,7 @@
 
20877
          rs *= extent[n];
 
20878
        }
 
20879
       ret->offset = 0;
 
20880
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
20881
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
20882
     }
 
20883
   else
 
20884
     {
 
20885
@@ -244,7 +244,7 @@
 
20886
          rs *= extent[n];
 
20887
        }
 
20888
       ret->offset = 0;
 
20889
-      ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
 
20890
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
 
20891
     }
 
20892
   else
 
20893
     {
 
20894
Index: libgfortran/generated/maxval_i4.c
 
20895
===================================================================
 
20896
--- a/src/libgfortran/generated/maxval_i4.c     (.../tags/gcc_4_8_3_release)
 
20897
+++ b/src/libgfortran/generated/maxval_i4.c     (.../branches/gcc-4_8-branch)
 
20898
@@ -97,10 +97,9 @@
 
20899
       retarray->offset = 0;
 
20900
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20901
 
 
20902
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20903
-                  * extent[rank-1];
 
20904
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20905
 
 
20906
-      retarray->base_addr = xmalloc (alloc_size);
 
20907
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20908
       if (alloc_size == 0)
 
20909
        {
 
20910
          /* Make sure we have a zero-sized array.  */
 
20911
@@ -286,8 +285,7 @@
 
20912
 
 
20913
        }
 
20914
 
 
20915
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20916
-                  * extent[rank-1];
 
20917
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20918
 
 
20919
       retarray->offset = 0;
 
20920
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20921
@@ -299,7 +297,7 @@
 
20922
          return;
 
20923
        }
 
20924
       else
 
20925
-       retarray->base_addr = xmalloc (alloc_size);
 
20926
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20927
 
 
20928
     }
 
20929
   else
 
20930
@@ -472,8 +470,7 @@
 
20931
       retarray->offset = 0;
 
20932
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20933
 
 
20934
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20935
-                  * extent[rank-1];
 
20936
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20937
 
 
20938
       if (alloc_size == 0)
 
20939
        {
 
20940
@@ -482,7 +479,7 @@
 
20941
          return;
 
20942
        }
 
20943
       else
 
20944
-       retarray->base_addr = xmalloc (alloc_size);
 
20945
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
20946
     }
 
20947
   else
 
20948
     {
 
20949
Index: libgfortran/generated/minval_i8.c
 
20950
===================================================================
 
20951
--- a/src/libgfortran/generated/minval_i8.c     (.../tags/gcc_4_8_3_release)
 
20952
+++ b/src/libgfortran/generated/minval_i8.c     (.../branches/gcc-4_8-branch)
 
20953
@@ -97,10 +97,9 @@
 
20954
       retarray->offset = 0;
 
20955
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20956
 
 
20957
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20958
-                  * extent[rank-1];
 
20959
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20960
 
 
20961
-      retarray->base_addr = xmalloc (alloc_size);
 
20962
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20963
       if (alloc_size == 0)
 
20964
        {
 
20965
          /* Make sure we have a zero-sized array.  */
 
20966
@@ -286,8 +285,7 @@
 
20967
 
 
20968
        }
 
20969
 
 
20970
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20971
-                  * extent[rank-1];
 
20972
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20973
 
 
20974
       retarray->offset = 0;
 
20975
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20976
@@ -299,7 +297,7 @@
 
20977
          return;
 
20978
        }
 
20979
       else
 
20980
-       retarray->base_addr = xmalloc (alloc_size);
 
20981
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
20982
 
 
20983
     }
 
20984
   else
 
20985
@@ -472,8 +470,7 @@
 
20986
       retarray->offset = 0;
 
20987
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
20988
 
 
20989
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
20990
-                  * extent[rank-1];
 
20991
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
20992
 
 
20993
       if (alloc_size == 0)
 
20994
        {
 
20995
@@ -482,7 +479,7 @@
 
20996
          return;
 
20997
        }
 
20998
       else
 
20999
-       retarray->base_addr = xmalloc (alloc_size);
 
21000
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21001
     }
 
21002
   else
 
21003
     {
 
21004
Index: libgfortran/generated/maxloc0_16_i16.c
 
21005
===================================================================
 
21006
--- a/src/libgfortran/generated/maxloc0_16_i16.c        (.../tags/gcc_4_8_3_release)
 
21007
+++ b/src/libgfortran/generated/maxloc0_16_i16.c        (.../branches/gcc-4_8-branch)
 
21008
@@ -58,7 +58,7 @@
 
21009
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21010
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21011
       retarray->offset = 0;
 
21012
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21013
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21014
     }
 
21015
   else
 
21016
     {
 
21017
@@ -199,7 +199,7 @@
 
21018
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21019
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21020
       retarray->offset = 0;
 
21021
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21022
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21023
     }
 
21024
   else
 
21025
     {
 
21026
@@ -367,7 +367,7 @@
 
21027
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21028
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21029
       retarray->offset = 0;
 
21030
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21031
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21032
     }
 
21033
   else if (unlikely (compile_options.bounds_check))
 
21034
     {
 
21035
Index: libgfortran/generated/shape_i4.c
 
21036
===================================================================
 
21037
--- a/src/libgfortran/generated/shape_i4.c      (.../tags/gcc_4_8_3_release)
 
21038
+++ b/src/libgfortran/generated/shape_i4.c      (.../branches/gcc-4_8-branch)
 
21039
@@ -49,7 +49,7 @@
 
21040
     {
 
21041
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
21042
       ret->offset = 0;
 
21043
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21044
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21045
     }
 
21046
 
 
21047
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
21048
Index: libgfortran/generated/minloc1_4_i16.c
 
21049
===================================================================
 
21050
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
 
21051
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
 
21052
@@ -98,10 +98,9 @@
 
21053
       retarray->offset = 0;
 
21054
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21055
 
 
21056
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21057
-                  * extent[rank-1];
 
21058
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21059
 
 
21060
-      retarray->base_addr = xmalloc (alloc_size);
 
21061
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21062
       if (alloc_size == 0)
 
21063
        {
 
21064
          /* Make sure we have a zero-sized array.  */
 
21065
@@ -294,8 +293,7 @@
 
21066
 
 
21067
        }
 
21068
 
 
21069
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21070
-                  * extent[rank-1];
 
21071
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21072
 
 
21073
       retarray->offset = 0;
 
21074
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21075
@@ -307,7 +305,7 @@
 
21076
          return;
 
21077
        }
 
21078
       else
 
21079
-       retarray->base_addr = xmalloc (alloc_size);
 
21080
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21081
 
 
21082
     }
 
21083
   else
 
21084
@@ -485,8 +483,7 @@
 
21085
       retarray->offset = 0;
 
21086
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21087
 
 
21088
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21089
-                  * extent[rank-1];
 
21090
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21091
 
 
21092
       if (alloc_size == 0)
 
21093
        {
 
21094
@@ -495,7 +492,7 @@
 
21095
          return;
 
21096
        }
 
21097
       else
 
21098
-       retarray->base_addr = xmalloc (alloc_size);
 
21099
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21100
     }
 
21101
   else
 
21102
     {
 
21103
Index: libgfortran/generated/maxloc0_4_r10.c
 
21104
===================================================================
 
21105
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
 
21106
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
 
21107
@@ -58,7 +58,7 @@
 
21108
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21109
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21110
       retarray->offset = 0;
 
21111
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21112
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21113
     }
 
21114
   else
 
21115
     {
 
21116
@@ -199,7 +199,7 @@
 
21117
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21118
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21119
       retarray->offset = 0;
 
21120
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21121
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21122
     }
 
21123
   else
 
21124
     {
 
21125
@@ -367,7 +367,7 @@
 
21126
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21127
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21128
       retarray->offset = 0;
 
21129
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21130
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21131
     }
 
21132
   else if (unlikely (compile_options.bounds_check))
 
21133
     {
 
21134
Index: libgfortran/generated/maxloc0_8_i16.c
 
21135
===================================================================
 
21136
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
 
21137
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
 
21138
@@ -58,7 +58,7 @@
 
21139
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21140
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21141
       retarray->offset = 0;
 
21142
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21143
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21144
     }
 
21145
   else
 
21146
     {
 
21147
@@ -199,7 +199,7 @@
 
21148
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21149
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21150
       retarray->offset = 0;
 
21151
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21152
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21153
     }
 
21154
   else
 
21155
     {
 
21156
@@ -367,7 +367,7 @@
 
21157
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21158
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21159
       retarray->offset = 0;
 
21160
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21161
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21162
     }
 
21163
   else if (unlikely (compile_options.bounds_check))
 
21164
     {
 
21165
Index: libgfortran/generated/iall_i2.c
 
21166
===================================================================
 
21167
--- a/src/libgfortran/generated/iall_i2.c       (.../tags/gcc_4_8_3_release)
 
21168
+++ b/src/libgfortran/generated/iall_i2.c       (.../branches/gcc-4_8-branch)
 
21169
@@ -97,10 +97,9 @@
 
21170
       retarray->offset = 0;
 
21171
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21172
 
 
21173
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21174
-                  * extent[rank-1];
 
21175
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21176
 
 
21177
-      retarray->base_addr = xmalloc (alloc_size);
 
21178
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21179
       if (alloc_size == 0)
 
21180
        {
 
21181
          /* Make sure we have a zero-sized array.  */
 
21182
@@ -272,8 +271,7 @@
 
21183
 
 
21184
        }
 
21185
 
 
21186
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21187
-                  * extent[rank-1];
 
21188
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21189
 
 
21190
       retarray->offset = 0;
 
21191
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21192
@@ -285,7 +283,7 @@
 
21193
          return;
 
21194
        }
 
21195
       else
 
21196
-       retarray->base_addr = xmalloc (alloc_size);
 
21197
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21198
 
 
21199
     }
 
21200
   else
 
21201
@@ -430,8 +428,7 @@
 
21202
       retarray->offset = 0;
 
21203
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21204
 
 
21205
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21206
-                  * extent[rank-1];
 
21207
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21208
 
 
21209
       if (alloc_size == 0)
 
21210
        {
 
21211
@@ -440,7 +437,7 @@
 
21212
          return;
 
21213
        }
 
21214
       else
 
21215
-       retarray->base_addr = xmalloc (alloc_size);
 
21216
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
21217
     }
 
21218
   else
 
21219
     {
 
21220
Index: libgfortran/generated/maxloc1_8_r10.c
 
21221
===================================================================
 
21222
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
 
21223
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
 
21224
@@ -98,10 +98,9 @@
 
21225
       retarray->offset = 0;
 
21226
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21227
 
 
21228
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21229
-                  * extent[rank-1];
 
21230
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21231
 
 
21232
-      retarray->base_addr = xmalloc (alloc_size);
 
21233
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21234
       if (alloc_size == 0)
 
21235
        {
 
21236
          /* Make sure we have a zero-sized array.  */
 
21237
@@ -294,8 +293,7 @@
 
21238
 
 
21239
        }
 
21240
 
 
21241
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21242
-                  * extent[rank-1];
 
21243
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21244
 
 
21245
       retarray->offset = 0;
 
21246
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21247
@@ -307,7 +305,7 @@
 
21248
          return;
 
21249
        }
 
21250
       else
 
21251
-       retarray->base_addr = xmalloc (alloc_size);
 
21252
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21253
 
 
21254
     }
 
21255
   else
 
21256
@@ -485,8 +483,7 @@
 
21257
       retarray->offset = 0;
 
21258
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21259
 
 
21260
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21261
-                  * extent[rank-1];
 
21262
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21263
 
 
21264
       if (alloc_size == 0)
 
21265
        {
 
21266
@@ -495,7 +492,7 @@
 
21267
          return;
 
21268
        }
 
21269
       else
 
21270
-       retarray->base_addr = xmalloc (alloc_size);
 
21271
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
21272
     }
 
21273
   else
 
21274
     {
 
21275
Index: libgfortran/generated/maxloc0_16_r4.c
 
21276
===================================================================
 
21277
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
 
21278
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
 
21279
@@ -58,7 +58,7 @@
 
21280
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21281
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21282
       retarray->offset = 0;
 
21283
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21284
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21285
     }
 
21286
   else
 
21287
     {
 
21288
@@ -199,7 +199,7 @@
 
21289
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21290
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21291
       retarray->offset = 0;
 
21292
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21293
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21294
     }
 
21295
   else
 
21296
     {
 
21297
@@ -367,7 +367,7 @@
 
21298
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21299
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21300
       retarray->offset = 0;
 
21301
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21302
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21303
     }
 
21304
   else if (unlikely (compile_options.bounds_check))
 
21305
     {
 
21306
Index: libgfortran/generated/minloc0_8_i1.c
 
21307
===================================================================
 
21308
--- a/src/libgfortran/generated/minloc0_8_i1.c  (.../tags/gcc_4_8_3_release)
 
21309
+++ b/src/libgfortran/generated/minloc0_8_i1.c  (.../branches/gcc-4_8-branch)
 
21310
@@ -58,7 +58,7 @@
 
21311
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21312
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21313
       retarray->offset = 0;
 
21314
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21315
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21316
     }
 
21317
   else
 
21318
     {
 
21319
@@ -199,7 +199,7 @@
 
21320
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21321
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21322
       retarray->offset = 0;
 
21323
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21324
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21325
     }
 
21326
   else
 
21327
     {
 
21328
@@ -367,7 +367,7 @@
 
21329
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21330
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21331
       retarray->offset = 0;
 
21332
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21333
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21334
     }
 
21335
   else if (unlikely (compile_options.bounds_check))
 
21336
     {
 
21337
Index: libgfortran/generated/minloc1_16_r8.c
 
21338
===================================================================
 
21339
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
 
21340
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
 
21341
@@ -98,10 +98,9 @@
 
21342
       retarray->offset = 0;
 
21343
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21344
 
 
21345
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21346
-                  * extent[rank-1];
 
21347
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21348
 
 
21349
-      retarray->base_addr = xmalloc (alloc_size);
 
21350
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21351
       if (alloc_size == 0)
 
21352
        {
 
21353
          /* Make sure we have a zero-sized array.  */
 
21354
@@ -294,8 +293,7 @@
 
21355
 
 
21356
        }
 
21357
 
 
21358
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21359
-                  * extent[rank-1];
 
21360
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21361
 
 
21362
       retarray->offset = 0;
 
21363
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21364
@@ -307,7 +305,7 @@
 
21365
          return;
 
21366
        }
 
21367
       else
 
21368
-       retarray->base_addr = xmalloc (alloc_size);
 
21369
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21370
 
 
21371
     }
 
21372
   else
 
21373
@@ -485,8 +483,7 @@
 
21374
       retarray->offset = 0;
 
21375
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21376
 
 
21377
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21378
-                  * extent[rank-1];
 
21379
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21380
 
 
21381
       if (alloc_size == 0)
 
21382
        {
 
21383
@@ -495,7 +492,7 @@
 
21384
          return;
 
21385
        }
 
21386
       else
 
21387
-       retarray->base_addr = xmalloc (alloc_size);
 
21388
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21389
     }
 
21390
   else
 
21391
     {
 
21392
Index: libgfortran/generated/unpack_i8.c
 
21393
===================================================================
 
21394
--- a/src/libgfortran/generated/unpack_i8.c     (.../tags/gcc_4_8_3_release)
 
21395
+++ b/src/libgfortran/generated/unpack_i8.c     (.../branches/gcc-4_8-branch)
 
21396
@@ -99,7 +99,7 @@
 
21397
          rs *= extent[n];
 
21398
        }
 
21399
       ret->offset = 0;
 
21400
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
21401
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
21402
     }
 
21403
   else
 
21404
     {
 
21405
@@ -244,7 +244,7 @@
 
21406
          rs *= extent[n];
 
21407
        }
 
21408
       ret->offset = 0;
 
21409
-      ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
 
21410
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
 
21411
     }
 
21412
   else
 
21413
     {
 
21414
Index: libgfortran/generated/maxloc0_4_i4.c
 
21415
===================================================================
 
21416
--- a/src/libgfortran/generated/maxloc0_4_i4.c  (.../tags/gcc_4_8_3_release)
 
21417
+++ b/src/libgfortran/generated/maxloc0_4_i4.c  (.../branches/gcc-4_8-branch)
 
21418
@@ -58,7 +58,7 @@
 
21419
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21420
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21421
       retarray->offset = 0;
 
21422
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21423
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21424
     }
 
21425
   else
 
21426
     {
 
21427
@@ -199,7 +199,7 @@
 
21428
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21429
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21430
       retarray->offset = 0;
 
21431
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21432
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21433
     }
 
21434
   else
 
21435
     {
 
21436
@@ -367,7 +367,7 @@
 
21437
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21438
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21439
       retarray->offset = 0;
 
21440
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
21441
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
21442
     }
 
21443
   else if (unlikely (compile_options.bounds_check))
 
21444
     {
 
21445
Index: libgfortran/generated/count_4_l.c
 
21446
===================================================================
 
21447
--- a/src/libgfortran/generated/count_4_l.c     (.../tags/gcc_4_8_3_release)
 
21448
+++ b/src/libgfortran/generated/count_4_l.c     (.../branches/gcc-4_8-branch)
 
21449
@@ -101,8 +101,7 @@
 
21450
       retarray->offset = 0;
 
21451
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21452
 
 
21453
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21454
-                  * extent[rank-1];
 
21455
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21456
 
 
21457
       if (alloc_size == 0)
 
21458
        {
 
21459
@@ -111,7 +110,7 @@
 
21460
          return;
 
21461
        }
 
21462
       else
 
21463
-       retarray->base_addr = xmalloc (alloc_size);
 
21464
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21465
     }
 
21466
   else
 
21467
     {
 
21468
Index: libgfortran/generated/sum_r10.c
 
21469
===================================================================
 
21470
--- a/src/libgfortran/generated/sum_r10.c       (.../tags/gcc_4_8_3_release)
 
21471
+++ b/src/libgfortran/generated/sum_r10.c       (.../branches/gcc-4_8-branch)
 
21472
@@ -97,10 +97,9 @@
 
21473
       retarray->offset = 0;
 
21474
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21475
 
 
21476
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21477
-                  * extent[rank-1];
 
21478
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21479
 
 
21480
-      retarray->base_addr = xmalloc (alloc_size);
 
21481
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21482
       if (alloc_size == 0)
 
21483
        {
 
21484
          /* Make sure we have a zero-sized array.  */
 
21485
@@ -272,8 +271,7 @@
 
21486
 
 
21487
        }
 
21488
 
 
21489
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21490
-                  * extent[rank-1];
 
21491
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21492
 
 
21493
       retarray->offset = 0;
 
21494
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21495
@@ -285,7 +283,7 @@
 
21496
          return;
 
21497
        }
 
21498
       else
 
21499
-       retarray->base_addr = xmalloc (alloc_size);
 
21500
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21501
 
 
21502
     }
 
21503
   else
 
21504
@@ -430,8 +428,7 @@
 
21505
       retarray->offset = 0;
 
21506
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21507
 
 
21508
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21509
-                  * extent[rank-1];
 
21510
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21511
 
 
21512
       if (alloc_size == 0)
 
21513
        {
 
21514
@@ -440,7 +437,7 @@
 
21515
          return;
 
21516
        }
 
21517
       else
 
21518
-       retarray->base_addr = xmalloc (alloc_size);
 
21519
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21520
     }
 
21521
   else
 
21522
     {
 
21523
Index: libgfortran/generated/sum_c4.c
 
21524
===================================================================
 
21525
--- a/src/libgfortran/generated/sum_c4.c        (.../tags/gcc_4_8_3_release)
 
21526
+++ b/src/libgfortran/generated/sum_c4.c        (.../branches/gcc-4_8-branch)
 
21527
@@ -97,10 +97,9 @@
 
21528
       retarray->offset = 0;
 
21529
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21530
 
 
21531
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21532
-                  * extent[rank-1];
 
21533
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21534
 
 
21535
-      retarray->base_addr = xmalloc (alloc_size);
 
21536
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21537
       if (alloc_size == 0)
 
21538
        {
 
21539
          /* Make sure we have a zero-sized array.  */
 
21540
@@ -272,8 +271,7 @@
 
21541
 
 
21542
        }
 
21543
 
 
21544
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21545
-                  * extent[rank-1];
 
21546
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21547
 
 
21548
       retarray->offset = 0;
 
21549
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21550
@@ -285,7 +283,7 @@
 
21551
          return;
 
21552
        }
 
21553
       else
 
21554
-       retarray->base_addr = xmalloc (alloc_size);
 
21555
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21556
 
 
21557
     }
 
21558
   else
 
21559
@@ -430,8 +428,7 @@
 
21560
       retarray->offset = 0;
 
21561
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21562
 
 
21563
-      alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21564
-                  * extent[rank-1];
 
21565
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21566
 
 
21567
       if (alloc_size == 0)
 
21568
        {
 
21569
@@ -440,7 +437,7 @@
 
21570
          return;
 
21571
        }
 
21572
       else
 
21573
-       retarray->base_addr = xmalloc (alloc_size);
 
21574
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
 
21575
     }
 
21576
   else
 
21577
     {
 
21578
Index: libgfortran/generated/maxloc1_16_r10.c
 
21579
===================================================================
 
21580
--- a/src/libgfortran/generated/maxloc1_16_r10.c        (.../tags/gcc_4_8_3_release)
 
21581
+++ b/src/libgfortran/generated/maxloc1_16_r10.c        (.../branches/gcc-4_8-branch)
 
21582
@@ -98,10 +98,9 @@
 
21583
       retarray->offset = 0;
 
21584
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21585
 
 
21586
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21587
-                  * extent[rank-1];
 
21588
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21589
 
 
21590
-      retarray->base_addr = xmalloc (alloc_size);
 
21591
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21592
       if (alloc_size == 0)
 
21593
        {
 
21594
          /* Make sure we have a zero-sized array.  */
 
21595
@@ -294,8 +293,7 @@
 
21596
 
 
21597
        }
 
21598
 
 
21599
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21600
-                  * extent[rank-1];
 
21601
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21602
 
 
21603
       retarray->offset = 0;
 
21604
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21605
@@ -307,7 +305,7 @@
 
21606
          return;
 
21607
        }
 
21608
       else
 
21609
-       retarray->base_addr = xmalloc (alloc_size);
 
21610
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21611
 
 
21612
     }
 
21613
   else
 
21614
@@ -485,8 +483,7 @@
 
21615
       retarray->offset = 0;
 
21616
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21617
 
 
21618
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21619
-                  * extent[rank-1];
 
21620
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21621
 
 
21622
       if (alloc_size == 0)
 
21623
        {
 
21624
@@ -495,7 +492,7 @@
 
21625
          return;
 
21626
        }
 
21627
       else
 
21628
-       retarray->base_addr = xmalloc (alloc_size);
 
21629
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
21630
     }
 
21631
   else
 
21632
     {
 
21633
Index: libgfortran/generated/pack_i16.c
 
21634
===================================================================
 
21635
--- a/src/libgfortran/generated/pack_i16.c      (.../tags/gcc_4_8_3_release)
 
21636
+++ b/src/libgfortran/generated/pack_i16.c      (.../branches/gcc-4_8-branch)
 
21637
@@ -167,8 +167,8 @@
 
21638
 
 
21639
          ret->offset = 0;
 
21640
 
 
21641
-         /* xmalloc allocates a single byte for zero size.  */
 
21642
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
 
21643
+         /* xmallocarray allocates a single byte for zero size.  */
 
21644
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
 
21645
 
 
21646
          if (total == 0)
 
21647
            return;
 
21648
Index: libgfortran/generated/matmul_i8.c
 
21649
===================================================================
 
21650
--- a/src/libgfortran/generated/matmul_i8.c     (.../tags/gcc_4_8_3_release)
 
21651
+++ b/src/libgfortran/generated/matmul_i8.c     (.../branches/gcc-4_8-branch)
 
21652
@@ -124,7 +124,7 @@
 
21653
         }
 
21654
 
 
21655
       retarray->base_addr
 
21656
-       = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
 
21657
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
 
21658
       retarray->offset = 0;
 
21659
     }
 
21660
     else if (unlikely (compile_options.bounds_check))
 
21661
Index: libgfortran/generated/maxloc0_16_i2.c
 
21662
===================================================================
 
21663
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
 
21664
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
 
21665
@@ -58,7 +58,7 @@
 
21666
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21667
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21668
       retarray->offset = 0;
 
21669
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21670
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21671
     }
 
21672
   else
 
21673
     {
 
21674
@@ -199,7 +199,7 @@
 
21675
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21676
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21677
       retarray->offset = 0;
 
21678
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21679
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21680
     }
 
21681
   else
 
21682
     {
 
21683
@@ -367,7 +367,7 @@
 
21684
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21685
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21686
       retarray->offset = 0;
 
21687
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
21688
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
21689
     }
 
21690
   else if (unlikely (compile_options.bounds_check))
 
21691
     {
 
21692
Index: libgfortran/generated/spread_c4.c
 
21693
===================================================================
 
21694
--- a/src/libgfortran/generated/spread_c4.c     (.../tags/gcc_4_8_3_release)
 
21695
+++ b/src/libgfortran/generated/spread_c4.c     (.../branches/gcc-4_8-branch)
 
21696
@@ -101,8 +101,8 @@
 
21697
        }
 
21698
       ret->offset = 0;
 
21699
 
 
21700
-      /* xmalloc allocates a single byte for zero size.  */
 
21701
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
 
21702
+      /* xmallocarray allocates a single byte for zero size.  */
 
21703
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
 
21704
       if (rs <= 0)
 
21705
         return;
 
21706
     }
 
21707
@@ -244,7 +244,7 @@
 
21708
 
 
21709
   if (ret->base_addr == NULL)
 
21710
     {
 
21711
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
 
21712
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
 
21713
       ret->offset = 0;
 
21714
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
21715
     }
 
21716
Index: libgfortran/generated/maxval_r10.c
 
21717
===================================================================
 
21718
--- a/src/libgfortran/generated/maxval_r10.c    (.../tags/gcc_4_8_3_release)
 
21719
+++ b/src/libgfortran/generated/maxval_r10.c    (.../branches/gcc-4_8-branch)
 
21720
@@ -97,10 +97,9 @@
 
21721
       retarray->offset = 0;
 
21722
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21723
 
 
21724
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21725
-                  * extent[rank-1];
 
21726
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21727
 
 
21728
-      retarray->base_addr = xmalloc (alloc_size);
 
21729
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21730
       if (alloc_size == 0)
 
21731
        {
 
21732
          /* Make sure we have a zero-sized array.  */
 
21733
@@ -286,8 +285,7 @@
 
21734
 
 
21735
        }
 
21736
 
 
21737
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21738
-                  * extent[rank-1];
 
21739
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21740
 
 
21741
       retarray->offset = 0;
 
21742
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21743
@@ -299,7 +297,7 @@
 
21744
          return;
 
21745
        }
 
21746
       else
 
21747
-       retarray->base_addr = xmalloc (alloc_size);
 
21748
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21749
 
 
21750
     }
 
21751
   else
 
21752
@@ -472,8 +470,7 @@
 
21753
       retarray->offset = 0;
 
21754
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21755
 
 
21756
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21757
-                  * extent[rank-1];
 
21758
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21759
 
 
21760
       if (alloc_size == 0)
 
21761
        {
 
21762
@@ -482,7 +479,7 @@
 
21763
          return;
 
21764
        }
 
21765
       else
 
21766
-       retarray->base_addr = xmalloc (alloc_size);
 
21767
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
21768
     }
 
21769
   else
 
21770
     {
 
21771
Index: libgfortran/generated/pack_i4.c
 
21772
===================================================================
 
21773
--- a/src/libgfortran/generated/pack_i4.c       (.../tags/gcc_4_8_3_release)
 
21774
+++ b/src/libgfortran/generated/pack_i4.c       (.../branches/gcc-4_8-branch)
 
21775
@@ -167,8 +167,8 @@
 
21776
 
 
21777
          ret->offset = 0;
 
21778
 
 
21779
-         /* xmalloc allocates a single byte for zero size.  */
 
21780
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
 
21781
+         /* xmallocarray allocates a single byte for zero size.  */
 
21782
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
 
21783
 
 
21784
          if (total == 0)
 
21785
            return;
 
21786
Index: libgfortran/generated/maxloc1_4_i1.c
 
21787
===================================================================
 
21788
--- a/src/libgfortran/generated/maxloc1_4_i1.c  (.../tags/gcc_4_8_3_release)
 
21789
+++ b/src/libgfortran/generated/maxloc1_4_i1.c  (.../branches/gcc-4_8-branch)
 
21790
@@ -98,10 +98,9 @@
 
21791
       retarray->offset = 0;
 
21792
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21793
 
 
21794
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21795
-                  * extent[rank-1];
 
21796
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21797
 
 
21798
-      retarray->base_addr = xmalloc (alloc_size);
 
21799
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21800
       if (alloc_size == 0)
 
21801
        {
 
21802
          /* Make sure we have a zero-sized array.  */
 
21803
@@ -294,8 +293,7 @@
 
21804
 
 
21805
        }
 
21806
 
 
21807
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21808
-                  * extent[rank-1];
 
21809
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21810
 
 
21811
       retarray->offset = 0;
 
21812
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21813
@@ -307,7 +305,7 @@
 
21814
          return;
 
21815
        }
 
21816
       else
 
21817
-       retarray->base_addr = xmalloc (alloc_size);
 
21818
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21819
 
 
21820
     }
 
21821
   else
 
21822
@@ -485,8 +483,7 @@
 
21823
       retarray->offset = 0;
 
21824
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21825
 
 
21826
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21827
-                  * extent[rank-1];
 
21828
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21829
 
 
21830
       if (alloc_size == 0)
 
21831
        {
 
21832
@@ -495,7 +492,7 @@
 
21833
          return;
 
21834
        }
 
21835
       else
 
21836
-       retarray->base_addr = xmalloc (alloc_size);
 
21837
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21838
     }
 
21839
   else
 
21840
     {
 
21841
Index: libgfortran/generated/matmul_r10.c
 
21842
===================================================================
 
21843
--- a/src/libgfortran/generated/matmul_r10.c    (.../tags/gcc_4_8_3_release)
 
21844
+++ b/src/libgfortran/generated/matmul_r10.c    (.../branches/gcc-4_8-branch)
 
21845
@@ -124,7 +124,7 @@
 
21846
         }
 
21847
 
 
21848
       retarray->base_addr
 
21849
-       = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
 
21850
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
 
21851
       retarray->offset = 0;
 
21852
     }
 
21853
     else if (unlikely (compile_options.bounds_check))
 
21854
Index: libgfortran/generated/minloc1_4_i8.c
 
21855
===================================================================
 
21856
--- a/src/libgfortran/generated/minloc1_4_i8.c  (.../tags/gcc_4_8_3_release)
 
21857
+++ b/src/libgfortran/generated/minloc1_4_i8.c  (.../branches/gcc-4_8-branch)
 
21858
@@ -98,10 +98,9 @@
 
21859
       retarray->offset = 0;
 
21860
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21861
 
 
21862
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21863
-                  * extent[rank-1];
 
21864
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21865
 
 
21866
-      retarray->base_addr = xmalloc (alloc_size);
 
21867
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21868
       if (alloc_size == 0)
 
21869
        {
 
21870
          /* Make sure we have a zero-sized array.  */
 
21871
@@ -294,8 +293,7 @@
 
21872
 
 
21873
        }
 
21874
 
 
21875
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21876
-                  * extent[rank-1];
 
21877
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21878
 
 
21879
       retarray->offset = 0;
 
21880
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21881
@@ -307,7 +305,7 @@
 
21882
          return;
 
21883
        }
 
21884
       else
 
21885
-       retarray->base_addr = xmalloc (alloc_size);
 
21886
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21887
 
 
21888
     }
 
21889
   else
 
21890
@@ -485,8 +483,7 @@
 
21891
       retarray->offset = 0;
 
21892
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21893
 
 
21894
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21895
-                  * extent[rank-1];
 
21896
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21897
 
 
21898
       if (alloc_size == 0)
 
21899
        {
 
21900
@@ -495,7 +492,7 @@
 
21901
          return;
 
21902
        }
 
21903
       else
 
21904
-       retarray->base_addr = xmalloc (alloc_size);
 
21905
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
21906
     }
 
21907
   else
 
21908
     {
 
21909
Index: libgfortran/generated/minloc0_8_r4.c
 
21910
===================================================================
 
21911
--- a/src/libgfortran/generated/minloc0_8_r4.c  (.../tags/gcc_4_8_3_release)
 
21912
+++ b/src/libgfortran/generated/minloc0_8_r4.c  (.../branches/gcc-4_8-branch)
 
21913
@@ -58,7 +58,7 @@
 
21914
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21915
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21916
       retarray->offset = 0;
 
21917
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21918
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21919
     }
 
21920
   else
 
21921
     {
 
21922
@@ -199,7 +199,7 @@
 
21923
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
21924
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21925
       retarray->offset = 0;
 
21926
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21927
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21928
     }
 
21929
   else
 
21930
     {
 
21931
@@ -367,7 +367,7 @@
 
21932
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
21933
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
21934
       retarray->offset = 0;
 
21935
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
21936
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
21937
     }
 
21938
   else if (unlikely (compile_options.bounds_check))
 
21939
     {
 
21940
Index: libgfortran/generated/matmul_l4.c
 
21941
===================================================================
 
21942
--- a/src/libgfortran/generated/matmul_l4.c     (.../tags/gcc_4_8_3_release)
 
21943
+++ b/src/libgfortran/generated/matmul_l4.c     (.../branches/gcc-4_8-branch)
 
21944
@@ -88,7 +88,7 @@
 
21945
         }
 
21946
           
 
21947
       retarray->base_addr
 
21948
-       = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
 
21949
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
 
21950
       retarray->offset = 0;
 
21951
     }
 
21952
     else if (unlikely (compile_options.bounds_check))
 
21953
Index: libgfortran/generated/reshape_r8.c
 
21954
===================================================================
 
21955
--- a/src/libgfortran/generated/reshape_r8.c    (.../tags/gcc_4_8_3_release)
 
21956
+++ b/src/libgfortran/generated/reshape_r8.c    (.../branches/gcc-4_8-branch)
 
21957
@@ -111,11 +111,11 @@
 
21958
       ret->offset = 0;
 
21959
 
 
21960
       if (unlikely (rs < 1))
 
21961
-        alloc_size = 1;
 
21962
+        alloc_size = 0;
 
21963
       else
 
21964
-        alloc_size = rs * sizeof (GFC_REAL_8);
 
21965
+        alloc_size = rs;
 
21966
 
 
21967
-      ret->base_addr = xmalloc (alloc_size);
 
21968
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
21969
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
21970
     }
 
21971
 
 
21972
Index: libgfortran/generated/in_pack_c10.c
 
21973
===================================================================
 
21974
--- a/src/libgfortran/generated/in_pack_c10.c   (.../tags/gcc_4_8_3_release)
 
21975
+++ b/src/libgfortran/generated/in_pack_c10.c   (.../branches/gcc-4_8-branch)
 
21976
@@ -76,7 +76,7 @@
 
21977
     return source->base_addr;
 
21978
 
 
21979
   /* Allocate storage for the destination.  */
 
21980
-  destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
 
21981
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
 
21982
   dest = destptr;
 
21983
   src = source->base_addr;
 
21984
   stride0 = stride[0];
 
21985
Index: libgfortran/generated/all_l4.c
 
21986
===================================================================
 
21987
--- a/src/libgfortran/generated/all_l4.c        (.../tags/gcc_4_8_3_release)
 
21988
+++ b/src/libgfortran/generated/all_l4.c        (.../branches/gcc-4_8-branch)
 
21989
@@ -101,8 +101,7 @@
 
21990
       retarray->offset = 0;
 
21991
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
21992
 
 
21993
-      alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
21994
-                  * extent[rank-1];
 
21995
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
21996
 
 
21997
       if (alloc_size == 0)
 
21998
        {
 
21999
@@ -111,7 +110,7 @@
 
22000
          return;
 
22001
        }
 
22002
       else
 
22003
-       retarray->base_addr = xmalloc (alloc_size);
 
22004
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
 
22005
     }
 
22006
   else
 
22007
     {
 
22008
Index: libgfortran/generated/minloc0_8_i2.c
 
22009
===================================================================
 
22010
--- a/src/libgfortran/generated/minloc0_8_i2.c  (.../tags/gcc_4_8_3_release)
 
22011
+++ b/src/libgfortran/generated/minloc0_8_i2.c  (.../branches/gcc-4_8-branch)
 
22012
@@ -58,7 +58,7 @@
 
22013
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22014
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22015
       retarray->offset = 0;
 
22016
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22017
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22018
     }
 
22019
   else
 
22020
     {
 
22021
@@ -199,7 +199,7 @@
 
22022
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22023
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22024
       retarray->offset = 0;
 
22025
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22026
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22027
     }
 
22028
   else
 
22029
     {
 
22030
@@ -367,7 +367,7 @@
 
22031
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22032
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22033
       retarray->offset = 0;
 
22034
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22035
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22036
     }
 
22037
   else if (unlikely (compile_options.bounds_check))
 
22038
     {
 
22039
Index: libgfortran/generated/norm2_r16.c
 
22040
===================================================================
 
22041
--- a/src/libgfortran/generated/norm2_r16.c     (.../tags/gcc_4_8_3_release)
 
22042
+++ b/src/libgfortran/generated/norm2_r16.c     (.../branches/gcc-4_8-branch)
 
22043
@@ -105,10 +105,9 @@
 
22044
       retarray->offset = 0;
 
22045
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22046
 
 
22047
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22048
-                  * extent[rank-1];
 
22049
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22050
 
 
22051
-      retarray->base_addr = xmalloc (alloc_size);
 
22052
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22053
       if (alloc_size == 0)
 
22054
        {
 
22055
          /* Make sure we have a zero-sized array.  */
 
22056
Index: libgfortran/generated/reshape_c10.c
 
22057
===================================================================
 
22058
--- a/src/libgfortran/generated/reshape_c10.c   (.../tags/gcc_4_8_3_release)
 
22059
+++ b/src/libgfortran/generated/reshape_c10.c   (.../branches/gcc-4_8-branch)
 
22060
@@ -111,11 +111,11 @@
 
22061
       ret->offset = 0;
 
22062
 
 
22063
       if (unlikely (rs < 1))
 
22064
-        alloc_size = 1;
 
22065
+        alloc_size = 0;
 
22066
       else
 
22067
-        alloc_size = rs * sizeof (GFC_COMPLEX_10);
 
22068
+        alloc_size = rs;
 
22069
 
 
22070
-      ret->base_addr = xmalloc (alloc_size);
 
22071
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
22072
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
22073
     }
 
22074
 
 
22075
Index: libgfortran/generated/unpack_c16.c
 
22076
===================================================================
 
22077
--- a/src/libgfortran/generated/unpack_c16.c    (.../tags/gcc_4_8_3_release)
 
22078
+++ b/src/libgfortran/generated/unpack_c16.c    (.../branches/gcc-4_8-branch)
 
22079
@@ -99,7 +99,7 @@
 
22080
          rs *= extent[n];
 
22081
        }
 
22082
       ret->offset = 0;
 
22083
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
22084
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
22085
     }
 
22086
   else
 
22087
     {
 
22088
@@ -244,7 +244,7 @@
 
22089
          rs *= extent[n];
 
22090
        }
 
22091
       ret->offset = 0;
 
22092
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
 
22093
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
 
22094
     }
 
22095
   else
 
22096
     {
 
22097
Index: libgfortran/generated/maxloc1_4_r4.c
 
22098
===================================================================
 
22099
--- a/src/libgfortran/generated/maxloc1_4_r4.c  (.../tags/gcc_4_8_3_release)
 
22100
+++ b/src/libgfortran/generated/maxloc1_4_r4.c  (.../branches/gcc-4_8-branch)
 
22101
@@ -98,10 +98,9 @@
 
22102
       retarray->offset = 0;
 
22103
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22104
 
 
22105
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22106
-                  * extent[rank-1];
 
22107
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22108
 
 
22109
-      retarray->base_addr = xmalloc (alloc_size);
 
22110
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22111
       if (alloc_size == 0)
 
22112
        {
 
22113
          /* Make sure we have a zero-sized array.  */
 
22114
@@ -294,8 +293,7 @@
 
22115
 
 
22116
        }
 
22117
 
 
22118
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22119
-                  * extent[rank-1];
 
22120
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22121
 
 
22122
       retarray->offset = 0;
 
22123
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22124
@@ -307,7 +305,7 @@
 
22125
          return;
 
22126
        }
 
22127
       else
 
22128
-       retarray->base_addr = xmalloc (alloc_size);
 
22129
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22130
 
 
22131
     }
 
22132
   else
 
22133
@@ -485,8 +483,7 @@
 
22134
       retarray->offset = 0;
 
22135
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22136
 
 
22137
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22138
-                  * extent[rank-1];
 
22139
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22140
 
 
22141
       if (alloc_size == 0)
 
22142
        {
 
22143
@@ -495,7 +492,7 @@
 
22144
          return;
 
22145
        }
 
22146
       else
 
22147
-       retarray->base_addr = xmalloc (alloc_size);
 
22148
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22149
     }
 
22150
   else
 
22151
     {
 
22152
Index: libgfortran/generated/maxval_r8.c
 
22153
===================================================================
 
22154
--- a/src/libgfortran/generated/maxval_r8.c     (.../tags/gcc_4_8_3_release)
 
22155
+++ b/src/libgfortran/generated/maxval_r8.c     (.../branches/gcc-4_8-branch)
 
22156
@@ -97,10 +97,9 @@
 
22157
       retarray->offset = 0;
 
22158
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22159
 
 
22160
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22161
-                  * extent[rank-1];
 
22162
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22163
 
 
22164
-      retarray->base_addr = xmalloc (alloc_size);
 
22165
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22166
       if (alloc_size == 0)
 
22167
        {
 
22168
          /* Make sure we have a zero-sized array.  */
 
22169
@@ -286,8 +285,7 @@
 
22170
 
 
22171
        }
 
22172
 
 
22173
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22174
-                  * extent[rank-1];
 
22175
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22176
 
 
22177
       retarray->offset = 0;
 
22178
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22179
@@ -299,7 +297,7 @@
 
22180
          return;
 
22181
        }
 
22182
       else
 
22183
-       retarray->base_addr = xmalloc (alloc_size);
 
22184
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22185
 
 
22186
     }
 
22187
   else
 
22188
@@ -472,8 +470,7 @@
 
22189
       retarray->offset = 0;
 
22190
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22191
 
 
22192
-      alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22193
-                  * extent[rank-1];
 
22194
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22195
 
 
22196
       if (alloc_size == 0)
 
22197
        {
 
22198
@@ -482,7 +479,7 @@
 
22199
          return;
 
22200
        }
 
22201
       else
 
22202
-       retarray->base_addr = xmalloc (alloc_size);
 
22203
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
 
22204
     }
 
22205
   else
 
22206
     {
 
22207
Index: libgfortran/generated/transpose_c4.c
 
22208
===================================================================
 
22209
--- a/src/libgfortran/generated/transpose_c4.c  (.../tags/gcc_4_8_3_release)
 
22210
+++ b/src/libgfortran/generated/transpose_c4.c  (.../branches/gcc-4_8-branch)
 
22211
@@ -60,7 +60,8 @@
 
22212
       GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
 
22213
                        GFC_DESCRIPTOR_EXTENT(source, 1));
 
22214
 
 
22215
-      ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
 
22216
+      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
 
22217
+                                     sizeof (GFC_COMPLEX_4));
 
22218
       ret->offset = 0;
 
22219
     } else if (unlikely (compile_options.bounds_check))
 
22220
     {
 
22221
Index: libgfortran/generated/eoshift1_4.c
 
22222
===================================================================
 
22223
--- a/src/libgfortran/generated/eoshift1_4.c    (.../tags/gcc_4_8_3_release)
 
22224
+++ b/src/libgfortran/generated/eoshift1_4.c    (.../branches/gcc-4_8-branch)
 
22225
@@ -105,8 +105,8 @@
 
22226
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
22227
 
 
22228
         }
 
22229
-      /* xmalloc allocates a single byte for zero size.  */
 
22230
-      ret->base_addr = xmalloc (size * arraysize);
 
22231
+      /* xmallocarray allocates a single byte for zero size.  */
 
22232
+      ret->base_addr = xmallocarray (arraysize, size);
 
22233
 
 
22234
     }
 
22235
   else if (unlikely (compile_options.bounds_check))
 
22236
Index: libgfortran/generated/minval_r16.c
 
22237
===================================================================
 
22238
--- a/src/libgfortran/generated/minval_r16.c    (.../tags/gcc_4_8_3_release)
 
22239
+++ b/src/libgfortran/generated/minval_r16.c    (.../branches/gcc-4_8-branch)
 
22240
@@ -97,10 +97,9 @@
 
22241
       retarray->offset = 0;
 
22242
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22243
 
 
22244
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22245
-                  * extent[rank-1];
 
22246
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22247
 
 
22248
-      retarray->base_addr = xmalloc (alloc_size);
 
22249
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22250
       if (alloc_size == 0)
 
22251
        {
 
22252
          /* Make sure we have a zero-sized array.  */
 
22253
@@ -286,8 +285,7 @@
 
22254
 
 
22255
        }
 
22256
 
 
22257
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22258
-                  * extent[rank-1];
 
22259
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22260
 
 
22261
       retarray->offset = 0;
 
22262
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22263
@@ -299,7 +297,7 @@
 
22264
          return;
 
22265
        }
 
22266
       else
 
22267
-       retarray->base_addr = xmalloc (alloc_size);
 
22268
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22269
 
 
22270
     }
 
22271
   else
 
22272
@@ -472,8 +470,7 @@
 
22273
       retarray->offset = 0;
 
22274
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22275
 
 
22276
-      alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22277
-                  * extent[rank-1];
 
22278
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22279
 
 
22280
       if (alloc_size == 0)
 
22281
        {
 
22282
@@ -482,7 +479,7 @@
 
22283
          return;
 
22284
        }
 
22285
       else
 
22286
-       retarray->base_addr = xmalloc (alloc_size);
 
22287
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
 
22288
     }
 
22289
   else
 
22290
     {
 
22291
Index: libgfortran/generated/iany_i16.c
 
22292
===================================================================
 
22293
--- a/src/libgfortran/generated/iany_i16.c      (.../tags/gcc_4_8_3_release)
 
22294
+++ b/src/libgfortran/generated/iany_i16.c      (.../branches/gcc-4_8-branch)
 
22295
@@ -97,10 +97,9 @@
 
22296
       retarray->offset = 0;
 
22297
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22298
 
 
22299
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22300
-                  * extent[rank-1];
 
22301
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22302
 
 
22303
-      retarray->base_addr = xmalloc (alloc_size);
 
22304
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22305
       if (alloc_size == 0)
 
22306
        {
 
22307
          /* Make sure we have a zero-sized array.  */
 
22308
@@ -272,8 +271,7 @@
 
22309
 
 
22310
        }
 
22311
 
 
22312
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22313
-                  * extent[rank-1];
 
22314
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22315
 
 
22316
       retarray->offset = 0;
 
22317
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22318
@@ -285,7 +283,7 @@
 
22319
          return;
 
22320
        }
 
22321
       else
 
22322
-       retarray->base_addr = xmalloc (alloc_size);
 
22323
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22324
 
 
22325
     }
 
22326
   else
 
22327
@@ -430,8 +428,7 @@
 
22328
       retarray->offset = 0;
 
22329
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22330
 
 
22331
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22332
-                  * extent[rank-1];
 
22333
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22334
 
 
22335
       if (alloc_size == 0)
 
22336
        {
 
22337
@@ -440,7 +437,7 @@
 
22338
          return;
 
22339
        }
 
22340
       else
 
22341
-       retarray->base_addr = xmalloc (alloc_size);
 
22342
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22343
     }
 
22344
   else
 
22345
     {
 
22346
Index: libgfortran/generated/maxloc1_4_i2.c
 
22347
===================================================================
 
22348
--- a/src/libgfortran/generated/maxloc1_4_i2.c  (.../tags/gcc_4_8_3_release)
 
22349
+++ b/src/libgfortran/generated/maxloc1_4_i2.c  (.../branches/gcc-4_8-branch)
 
22350
@@ -98,10 +98,9 @@
 
22351
       retarray->offset = 0;
 
22352
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22353
 
 
22354
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22355
-                  * extent[rank-1];
 
22356
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22357
 
 
22358
-      retarray->base_addr = xmalloc (alloc_size);
 
22359
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22360
       if (alloc_size == 0)
 
22361
        {
 
22362
          /* Make sure we have a zero-sized array.  */
 
22363
@@ -294,8 +293,7 @@
 
22364
 
 
22365
        }
 
22366
 
 
22367
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22368
-                  * extent[rank-1];
 
22369
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22370
 
 
22371
       retarray->offset = 0;
 
22372
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22373
@@ -307,7 +305,7 @@
 
22374
          return;
 
22375
        }
 
22376
       else
 
22377
-       retarray->base_addr = xmalloc (alloc_size);
 
22378
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22379
 
 
22380
     }
 
22381
   else
 
22382
@@ -485,8 +483,7 @@
 
22383
       retarray->offset = 0;
 
22384
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22385
 
 
22386
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22387
-                  * extent[rank-1];
 
22388
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22389
 
 
22390
       if (alloc_size == 0)
 
22391
        {
 
22392
@@ -495,7 +492,7 @@
 
22393
          return;
 
22394
        }
 
22395
       else
 
22396
-       retarray->base_addr = xmalloc (alloc_size);
 
22397
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22398
     }
 
22399
   else
 
22400
     {
 
22401
Index: libgfortran/generated/maxloc1_8_i8.c
 
22402
===================================================================
 
22403
--- a/src/libgfortran/generated/maxloc1_8_i8.c  (.../tags/gcc_4_8_3_release)
 
22404
+++ b/src/libgfortran/generated/maxloc1_8_i8.c  (.../branches/gcc-4_8-branch)
 
22405
@@ -98,10 +98,9 @@
 
22406
       retarray->offset = 0;
 
22407
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22408
 
 
22409
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22410
-                  * extent[rank-1];
 
22411
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22412
 
 
22413
-      retarray->base_addr = xmalloc (alloc_size);
 
22414
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22415
       if (alloc_size == 0)
 
22416
        {
 
22417
          /* Make sure we have a zero-sized array.  */
 
22418
@@ -294,8 +293,7 @@
 
22419
 
 
22420
        }
 
22421
 
 
22422
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22423
-                  * extent[rank-1];
 
22424
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22425
 
 
22426
       retarray->offset = 0;
 
22427
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22428
@@ -307,7 +305,7 @@
 
22429
          return;
 
22430
        }
 
22431
       else
 
22432
-       retarray->base_addr = xmalloc (alloc_size);
 
22433
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22434
 
 
22435
     }
 
22436
   else
 
22437
@@ -485,8 +483,7 @@
 
22438
       retarray->offset = 0;
 
22439
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22440
 
 
22441
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22442
-                  * extent[rank-1];
 
22443
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22444
 
 
22445
       if (alloc_size == 0)
 
22446
        {
 
22447
@@ -495,7 +492,7 @@
 
22448
          return;
 
22449
        }
 
22450
       else
 
22451
-       retarray->base_addr = xmalloc (alloc_size);
 
22452
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
22453
     }
 
22454
   else
 
22455
     {
 
22456
Index: libgfortran/generated/maxloc0_4_r8.c
 
22457
===================================================================
 
22458
--- a/src/libgfortran/generated/maxloc0_4_r8.c  (.../tags/gcc_4_8_3_release)
 
22459
+++ b/src/libgfortran/generated/maxloc0_4_r8.c  (.../branches/gcc-4_8-branch)
 
22460
@@ -58,7 +58,7 @@
 
22461
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22462
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22463
       retarray->offset = 0;
 
22464
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22465
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22466
     }
 
22467
   else
 
22468
     {
 
22469
@@ -199,7 +199,7 @@
 
22470
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22471
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22472
       retarray->offset = 0;
 
22473
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22474
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22475
     }
 
22476
   else
 
22477
     {
 
22478
@@ -367,7 +367,7 @@
 
22479
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22480
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22481
       retarray->offset = 0;
 
22482
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
22483
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
22484
     }
 
22485
   else if (unlikely (compile_options.bounds_check))
 
22486
     {
 
22487
Index: libgfortran/generated/maxloc0_16_r16.c
 
22488
===================================================================
 
22489
--- a/src/libgfortran/generated/maxloc0_16_r16.c        (.../tags/gcc_4_8_3_release)
 
22490
+++ b/src/libgfortran/generated/maxloc0_16_r16.c        (.../branches/gcc-4_8-branch)
 
22491
@@ -58,7 +58,7 @@
 
22492
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22493
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22494
       retarray->offset = 0;
 
22495
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22496
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22497
     }
 
22498
   else
 
22499
     {
 
22500
@@ -199,7 +199,7 @@
 
22501
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22502
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22503
       retarray->offset = 0;
 
22504
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22505
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22506
     }
 
22507
   else
 
22508
     {
 
22509
@@ -367,7 +367,7 @@
 
22510
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22511
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22512
       retarray->offset = 0;
 
22513
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22514
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22515
     }
 
22516
   else if (unlikely (compile_options.bounds_check))
 
22517
     {
 
22518
Index: libgfortran/generated/sum_c10.c
 
22519
===================================================================
 
22520
--- a/src/libgfortran/generated/sum_c10.c       (.../tags/gcc_4_8_3_release)
 
22521
+++ b/src/libgfortran/generated/sum_c10.c       (.../branches/gcc-4_8-branch)
 
22522
@@ -97,10 +97,9 @@
 
22523
       retarray->offset = 0;
 
22524
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22525
 
 
22526
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22527
-                  * extent[rank-1];
 
22528
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22529
 
 
22530
-      retarray->base_addr = xmalloc (alloc_size);
 
22531
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
22532
       if (alloc_size == 0)
 
22533
        {
 
22534
          /* Make sure we have a zero-sized array.  */
 
22535
@@ -272,8 +271,7 @@
 
22536
 
 
22537
        }
 
22538
 
 
22539
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22540
-                  * extent[rank-1];
 
22541
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22542
 
 
22543
       retarray->offset = 0;
 
22544
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22545
@@ -285,7 +283,7 @@
 
22546
          return;
 
22547
        }
 
22548
       else
 
22549
-       retarray->base_addr = xmalloc (alloc_size);
 
22550
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
22551
 
 
22552
     }
 
22553
   else
 
22554
@@ -430,8 +428,7 @@
 
22555
       retarray->offset = 0;
 
22556
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22557
 
 
22558
-      alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22559
-                  * extent[rank-1];
 
22560
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22561
 
 
22562
       if (alloc_size == 0)
 
22563
        {
 
22564
@@ -440,7 +437,7 @@
 
22565
          return;
 
22566
        }
 
22567
       else
 
22568
-       retarray->base_addr = xmalloc (alloc_size);
 
22569
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
 
22570
     }
 
22571
   else
 
22572
     {
 
22573
Index: libgfortran/generated/iall_i4.c
 
22574
===================================================================
 
22575
--- a/src/libgfortran/generated/iall_i4.c       (.../tags/gcc_4_8_3_release)
 
22576
+++ b/src/libgfortran/generated/iall_i4.c       (.../branches/gcc-4_8-branch)
 
22577
@@ -97,10 +97,9 @@
 
22578
       retarray->offset = 0;
 
22579
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22580
 
 
22581
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22582
-                  * extent[rank-1];
 
22583
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22584
 
 
22585
-      retarray->base_addr = xmalloc (alloc_size);
 
22586
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22587
       if (alloc_size == 0)
 
22588
        {
 
22589
          /* Make sure we have a zero-sized array.  */
 
22590
@@ -272,8 +271,7 @@
 
22591
 
 
22592
        }
 
22593
 
 
22594
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22595
-                  * extent[rank-1];
 
22596
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22597
 
 
22598
       retarray->offset = 0;
 
22599
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22600
@@ -285,7 +283,7 @@
 
22601
          return;
 
22602
        }
 
22603
       else
 
22604
-       retarray->base_addr = xmalloc (alloc_size);
 
22605
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22606
 
 
22607
     }
 
22608
   else
 
22609
@@ -430,8 +428,7 @@
 
22610
       retarray->offset = 0;
 
22611
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22612
 
 
22613
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22614
-                  * extent[rank-1];
 
22615
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22616
 
 
22617
       if (alloc_size == 0)
 
22618
        {
 
22619
@@ -440,7 +437,7 @@
 
22620
          return;
 
22621
        }
 
22622
       else
 
22623
-       retarray->base_addr = xmalloc (alloc_size);
 
22624
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22625
     }
 
22626
   else
 
22627
     {
 
22628
Index: libgfortran/generated/minloc1_4_r16.c
 
22629
===================================================================
 
22630
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
 
22631
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
 
22632
@@ -98,10 +98,9 @@
 
22633
       retarray->offset = 0;
 
22634
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22635
 
 
22636
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22637
-                  * extent[rank-1];
 
22638
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22639
 
 
22640
-      retarray->base_addr = xmalloc (alloc_size);
 
22641
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22642
       if (alloc_size == 0)
 
22643
        {
 
22644
          /* Make sure we have a zero-sized array.  */
 
22645
@@ -294,8 +293,7 @@
 
22646
 
 
22647
        }
 
22648
 
 
22649
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22650
-                  * extent[rank-1];
 
22651
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22652
 
 
22653
       retarray->offset = 0;
 
22654
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22655
@@ -307,7 +305,7 @@
 
22656
          return;
 
22657
        }
 
22658
       else
 
22659
-       retarray->base_addr = xmalloc (alloc_size);
 
22660
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22661
 
 
22662
     }
 
22663
   else
 
22664
@@ -485,8 +483,7 @@
 
22665
       retarray->offset = 0;
 
22666
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22667
 
 
22668
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22669
-                  * extent[rank-1];
 
22670
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22671
 
 
22672
       if (alloc_size == 0)
 
22673
        {
 
22674
@@ -495,7 +492,7 @@
 
22675
          return;
 
22676
        }
 
22677
       else
 
22678
-       retarray->base_addr = xmalloc (alloc_size);
 
22679
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
22680
     }
 
22681
   else
 
22682
     {
 
22683
Index: libgfortran/generated/maxloc0_8_r16.c
 
22684
===================================================================
 
22685
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
 
22686
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
 
22687
@@ -58,7 +58,7 @@
 
22688
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22689
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22690
       retarray->offset = 0;
 
22691
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22692
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22693
     }
 
22694
   else
 
22695
     {
 
22696
@@ -199,7 +199,7 @@
 
22697
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22698
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22699
       retarray->offset = 0;
 
22700
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22701
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22702
     }
 
22703
   else
 
22704
     {
 
22705
@@ -367,7 +367,7 @@
 
22706
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22707
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22708
       retarray->offset = 0;
 
22709
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
22710
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
22711
     }
 
22712
   else if (unlikely (compile_options.bounds_check))
 
22713
     {
 
22714
Index: libgfortran/generated/pack_r8.c
 
22715
===================================================================
 
22716
--- a/src/libgfortran/generated/pack_r8.c       (.../tags/gcc_4_8_3_release)
 
22717
+++ b/src/libgfortran/generated/pack_r8.c       (.../branches/gcc-4_8-branch)
 
22718
@@ -167,8 +167,8 @@
 
22719
 
 
22720
          ret->offset = 0;
 
22721
 
 
22722
-         /* xmalloc allocates a single byte for zero size.  */
 
22723
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
 
22724
+         /* xmallocarray allocates a single byte for zero size.  */
 
22725
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
 
22726
 
 
22727
          if (total == 0)
 
22728
            return;
 
22729
Index: libgfortran/generated/matmul_c10.c
 
22730
===================================================================
 
22731
--- a/src/libgfortran/generated/matmul_c10.c    (.../tags/gcc_4_8_3_release)
 
22732
+++ b/src/libgfortran/generated/matmul_c10.c    (.../branches/gcc-4_8-branch)
 
22733
@@ -124,7 +124,7 @@
 
22734
         }
 
22735
 
 
22736
       retarray->base_addr
 
22737
-       = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
 
22738
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
 
22739
       retarray->offset = 0;
 
22740
     }
 
22741
     else if (unlikely (compile_options.bounds_check))
 
22742
Index: libgfortran/generated/maxloc0_16_i4.c
 
22743
===================================================================
 
22744
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
 
22745
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
 
22746
@@ -58,7 +58,7 @@
 
22747
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22748
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22749
       retarray->offset = 0;
 
22750
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22751
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22752
     }
 
22753
   else
 
22754
     {
 
22755
@@ -199,7 +199,7 @@
 
22756
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22757
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22758
       retarray->offset = 0;
 
22759
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22760
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22761
     }
 
22762
   else
 
22763
     {
 
22764
@@ -367,7 +367,7 @@
 
22765
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22766
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22767
       retarray->offset = 0;
 
22768
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22769
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22770
     }
 
22771
   else if (unlikely (compile_options.bounds_check))
 
22772
     {
 
22773
Index: libgfortran/generated/pack_r16.c
 
22774
===================================================================
 
22775
--- a/src/libgfortran/generated/pack_r16.c      (.../tags/gcc_4_8_3_release)
 
22776
+++ b/src/libgfortran/generated/pack_r16.c      (.../branches/gcc-4_8-branch)
 
22777
@@ -167,8 +167,8 @@
 
22778
 
 
22779
          ret->offset = 0;
 
22780
 
 
22781
-         /* xmalloc allocates a single byte for zero size.  */
 
22782
-         ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
 
22783
+         /* xmallocarray allocates a single byte for zero size.  */
 
22784
+         ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
 
22785
 
 
22786
          if (total == 0)
 
22787
            return;
 
22788
Index: libgfortran/generated/minloc1_16_i8.c
 
22789
===================================================================
 
22790
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
 
22791
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
 
22792
@@ -98,10 +98,9 @@
 
22793
       retarray->offset = 0;
 
22794
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22795
 
 
22796
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22797
-                  * extent[rank-1];
 
22798
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22799
 
 
22800
-      retarray->base_addr = xmalloc (alloc_size);
 
22801
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22802
       if (alloc_size == 0)
 
22803
        {
 
22804
          /* Make sure we have a zero-sized array.  */
 
22805
@@ -294,8 +293,7 @@
 
22806
 
 
22807
        }
 
22808
 
 
22809
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22810
-                  * extent[rank-1];
 
22811
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22812
 
 
22813
       retarray->offset = 0;
 
22814
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22815
@@ -307,7 +305,7 @@
 
22816
          return;
 
22817
        }
 
22818
       else
 
22819
-       retarray->base_addr = xmalloc (alloc_size);
 
22820
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22821
 
 
22822
     }
 
22823
   else
 
22824
@@ -485,8 +483,7 @@
 
22825
       retarray->offset = 0;
 
22826
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22827
 
 
22828
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22829
-                  * extent[rank-1];
 
22830
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22831
 
 
22832
       if (alloc_size == 0)
 
22833
        {
 
22834
@@ -495,7 +492,7 @@
 
22835
          return;
 
22836
        }
 
22837
       else
 
22838
-       retarray->base_addr = xmalloc (alloc_size);
 
22839
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
22840
     }
 
22841
   else
 
22842
     {
 
22843
Index: libgfortran/generated/minloc0_16_r10.c
 
22844
===================================================================
 
22845
--- a/src/libgfortran/generated/minloc0_16_r10.c        (.../tags/gcc_4_8_3_release)
 
22846
+++ b/src/libgfortran/generated/minloc0_16_r10.c        (.../branches/gcc-4_8-branch)
 
22847
@@ -58,7 +58,7 @@
 
22848
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22849
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22850
       retarray->offset = 0;
 
22851
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22852
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22853
     }
 
22854
   else
 
22855
     {
 
22856
@@ -199,7 +199,7 @@
 
22857
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
22858
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22859
       retarray->offset = 0;
 
22860
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22861
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22862
     }
 
22863
   else
 
22864
     {
 
22865
@@ -367,7 +367,7 @@
 
22866
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
22867
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
22868
       retarray->offset = 0;
 
22869
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
22870
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
22871
     }
 
22872
   else if (unlikely (compile_options.bounds_check))
 
22873
     {
 
22874
Index: libgfortran/generated/unpack_c4.c
 
22875
===================================================================
 
22876
--- a/src/libgfortran/generated/unpack_c4.c     (.../tags/gcc_4_8_3_release)
 
22877
+++ b/src/libgfortran/generated/unpack_c4.c     (.../branches/gcc-4_8-branch)
 
22878
@@ -99,7 +99,7 @@
 
22879
          rs *= extent[n];
 
22880
        }
 
22881
       ret->offset = 0;
 
22882
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
22883
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
22884
     }
 
22885
   else
 
22886
     {
 
22887
@@ -244,7 +244,7 @@
 
22888
          rs *= extent[n];
 
22889
        }
 
22890
       ret->offset = 0;
 
22891
-      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
 
22892
+      ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
 
22893
     }
 
22894
   else
 
22895
     {
 
22896
Index: libgfortran/generated/iparity_i1.c
 
22897
===================================================================
 
22898
--- a/src/libgfortran/generated/iparity_i1.c    (.../tags/gcc_4_8_3_release)
 
22899
+++ b/src/libgfortran/generated/iparity_i1.c    (.../branches/gcc-4_8-branch)
 
22900
@@ -97,10 +97,9 @@
 
22901
       retarray->offset = 0;
 
22902
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22903
 
 
22904
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22905
-                  * extent[rank-1];
 
22906
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22907
 
 
22908
-      retarray->base_addr = xmalloc (alloc_size);
 
22909
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22910
       if (alloc_size == 0)
 
22911
        {
 
22912
          /* Make sure we have a zero-sized array.  */
 
22913
@@ -272,8 +271,7 @@
 
22914
 
 
22915
        }
 
22916
 
 
22917
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22918
-                  * extent[rank-1];
 
22919
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22920
 
 
22921
       retarray->offset = 0;
 
22922
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22923
@@ -285,7 +283,7 @@
 
22924
          return;
 
22925
        }
 
22926
       else
 
22927
-       retarray->base_addr = xmalloc (alloc_size);
 
22928
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22929
 
 
22930
     }
 
22931
   else
 
22932
@@ -430,8 +428,7 @@
 
22933
       retarray->offset = 0;
 
22934
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22935
 
 
22936
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22937
-                  * extent[rank-1];
 
22938
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22939
 
 
22940
       if (alloc_size == 0)
 
22941
        {
 
22942
@@ -440,7 +437,7 @@
 
22943
          return;
 
22944
        }
 
22945
       else
 
22946
-       retarray->base_addr = xmalloc (alloc_size);
 
22947
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
22948
     }
 
22949
   else
 
22950
     {
 
22951
Index: libgfortran/generated/product_c8.c
 
22952
===================================================================
 
22953
--- a/src/libgfortran/generated/product_c8.c    (.../tags/gcc_4_8_3_release)
 
22954
+++ b/src/libgfortran/generated/product_c8.c    (.../branches/gcc-4_8-branch)
 
22955
@@ -97,10 +97,9 @@
 
22956
       retarray->offset = 0;
 
22957
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22958
 
 
22959
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22960
-                  * extent[rank-1];
 
22961
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22962
 
 
22963
-      retarray->base_addr = xmalloc (alloc_size);
 
22964
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
22965
       if (alloc_size == 0)
 
22966
        {
 
22967
          /* Make sure we have a zero-sized array.  */
 
22968
@@ -272,8 +271,7 @@
 
22969
 
 
22970
        }
 
22971
 
 
22972
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22973
-                  * extent[rank-1];
 
22974
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22975
 
 
22976
       retarray->offset = 0;
 
22977
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22978
@@ -285,7 +283,7 @@
 
22979
          return;
 
22980
        }
 
22981
       else
 
22982
-       retarray->base_addr = xmalloc (alloc_size);
 
22983
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
22984
 
 
22985
     }
 
22986
   else
 
22987
@@ -430,8 +428,7 @@
 
22988
       retarray->offset = 0;
 
22989
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
22990
 
 
22991
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
22992
-                  * extent[rank-1];
 
22993
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
22994
 
 
22995
       if (alloc_size == 0)
 
22996
        {
 
22997
@@ -440,7 +437,7 @@
 
22998
          return;
 
22999
        }
 
23000
       else
 
23001
-       retarray->base_addr = xmalloc (alloc_size);
 
23002
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
23003
     }
 
23004
   else
 
23005
     {
 
23006
Index: libgfortran/generated/in_pack_i16.c
 
23007
===================================================================
 
23008
--- a/src/libgfortran/generated/in_pack_i16.c   (.../tags/gcc_4_8_3_release)
 
23009
+++ b/src/libgfortran/generated/in_pack_i16.c   (.../branches/gcc-4_8-branch)
 
23010
@@ -76,7 +76,7 @@
 
23011
     return source->base_addr;
 
23012
 
 
23013
   /* Allocate storage for the destination.  */
 
23014
-  destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
 
23015
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
 
23016
   dest = destptr;
 
23017
   src = source->base_addr;
 
23018
   stride0 = stride[0];
 
23019
Index: libgfortran/generated/minloc0_8_i4.c
 
23020
===================================================================
 
23021
--- a/src/libgfortran/generated/minloc0_8_i4.c  (.../tags/gcc_4_8_3_release)
 
23022
+++ b/src/libgfortran/generated/minloc0_8_i4.c  (.../branches/gcc-4_8-branch)
 
23023
@@ -58,7 +58,7 @@
 
23024
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23025
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23026
       retarray->offset = 0;
 
23027
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23028
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23029
     }
 
23030
   else
 
23031
     {
 
23032
@@ -199,7 +199,7 @@
 
23033
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23034
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23035
       retarray->offset = 0;
 
23036
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23037
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23038
     }
 
23039
   else
 
23040
     {
 
23041
@@ -367,7 +367,7 @@
 
23042
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23043
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23044
       retarray->offset = 0;
 
23045
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23046
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23047
     }
 
23048
   else if (unlikely (compile_options.bounds_check))
 
23049
     {
 
23050
Index: libgfortran/generated/matmul_c4.c
 
23051
===================================================================
 
23052
--- a/src/libgfortran/generated/matmul_c4.c     (.../tags/gcc_4_8_3_release)
 
23053
+++ b/src/libgfortran/generated/matmul_c4.c     (.../branches/gcc-4_8-branch)
 
23054
@@ -124,7 +124,7 @@
 
23055
         }
 
23056
 
 
23057
       retarray->base_addr
 
23058
-       = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
 
23059
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
 
23060
       retarray->offset = 0;
 
23061
     }
 
23062
     else if (unlikely (compile_options.bounds_check))
 
23063
Index: libgfortran/generated/reshape_i8.c
 
23064
===================================================================
 
23065
--- a/src/libgfortran/generated/reshape_i8.c    (.../tags/gcc_4_8_3_release)
 
23066
+++ b/src/libgfortran/generated/reshape_i8.c    (.../branches/gcc-4_8-branch)
 
23067
@@ -111,11 +111,11 @@
 
23068
       ret->offset = 0;
 
23069
 
 
23070
       if (unlikely (rs < 1))
 
23071
-        alloc_size = 1;
 
23072
+        alloc_size = 0;
 
23073
       else
 
23074
-        alloc_size = rs * sizeof (GFC_INTEGER_8);
 
23075
+        alloc_size = rs;
 
23076
 
 
23077
-      ret->base_addr = xmalloc (alloc_size);
 
23078
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23079
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23080
     }
 
23081
 
 
23082
Index: libgfortran/generated/in_pack_c8.c
 
23083
===================================================================
 
23084
--- a/src/libgfortran/generated/in_pack_c8.c    (.../tags/gcc_4_8_3_release)
 
23085
+++ b/src/libgfortran/generated/in_pack_c8.c    (.../branches/gcc-4_8-branch)
 
23086
@@ -76,7 +76,7 @@
 
23087
     return source->base_addr;
 
23088
 
 
23089
   /* Allocate storage for the destination.  */
 
23090
-  destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
 
23091
+  destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
 
23092
   dest = destptr;
 
23093
   src = source->base_addr;
 
23094
   stride0 = stride[0];
 
23095
Index: libgfortran/generated/bessel_r10.c
 
23096
===================================================================
 
23097
--- a/src/libgfortran/generated/bessel_r10.c    (.../tags/gcc_4_8_3_release)
 
23098
+++ b/src/libgfortran/generated/bessel_r10.c    (.../branches/gcc-4_8-branch)
 
23099
@@ -55,7 +55,7 @@
 
23100
     {
 
23101
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
23102
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
23103
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
23104
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
23105
       ret->offset = 0;
 
23106
     }
 
23107
 
 
23108
@@ -122,7 +122,7 @@
 
23109
     {
 
23110
       size_t size = n2 < n1 ? 0 : n2-n1+1; 
 
23111
       GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
 
23112
-      ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
 
23113
+      ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
 
23114
       ret->offset = 0;
 
23115
     }
 
23116
 
 
23117
@@ -162,7 +162,7 @@
 
23118
 
 
23119
   x2rev = GFC_REAL_10_LITERAL(2.)/x;
 
23120
 
 
23121
-  for (i = 2; i <= n1+n2; i++)
 
23122
+  for (i = 2; i <= n2 - n1; i++)
 
23123
     {
 
23124
 #if defined(GFC_REAL_10_INFINITY)
 
23125
       if (unlikely (last2 == -GFC_REAL_10_INFINITY))
 
23126
Index: libgfortran/generated/iall_i16.c
 
23127
===================================================================
 
23128
--- a/src/libgfortran/generated/iall_i16.c      (.../tags/gcc_4_8_3_release)
 
23129
+++ b/src/libgfortran/generated/iall_i16.c      (.../branches/gcc-4_8-branch)
 
23130
@@ -97,10 +97,9 @@
 
23131
       retarray->offset = 0;
 
23132
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23133
 
 
23134
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23135
-                  * extent[rank-1];
 
23136
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23137
 
 
23138
-      retarray->base_addr = xmalloc (alloc_size);
 
23139
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23140
       if (alloc_size == 0)
 
23141
        {
 
23142
          /* Make sure we have a zero-sized array.  */
 
23143
@@ -272,8 +271,7 @@
 
23144
 
 
23145
        }
 
23146
 
 
23147
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23148
-                  * extent[rank-1];
 
23149
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23150
 
 
23151
       retarray->offset = 0;
 
23152
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23153
@@ -285,7 +283,7 @@
 
23154
          return;
 
23155
        }
 
23156
       else
 
23157
-       retarray->base_addr = xmalloc (alloc_size);
 
23158
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23159
 
 
23160
     }
 
23161
   else
 
23162
@@ -430,8 +428,7 @@
 
23163
       retarray->offset = 0;
 
23164
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23165
 
 
23166
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23167
-                  * extent[rank-1];
 
23168
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23169
 
 
23170
       if (alloc_size == 0)
 
23171
        {
 
23172
@@ -440,7 +437,7 @@
 
23173
          return;
 
23174
        }
 
23175
       else
 
23176
-       retarray->base_addr = xmalloc (alloc_size);
 
23177
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23178
     }
 
23179
   else
 
23180
     {
 
23181
Index: libgfortran/generated/maxloc1_16_i1.c
 
23182
===================================================================
 
23183
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
 
23184
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
 
23185
@@ -98,10 +98,9 @@
 
23186
       retarray->offset = 0;
 
23187
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23188
 
 
23189
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23190
-                  * extent[rank-1];
 
23191
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23192
 
 
23193
-      retarray->base_addr = xmalloc (alloc_size);
 
23194
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23195
       if (alloc_size == 0)
 
23196
        {
 
23197
          /* Make sure we have a zero-sized array.  */
 
23198
@@ -294,8 +293,7 @@
 
23199
 
 
23200
        }
 
23201
 
 
23202
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23203
-                  * extent[rank-1];
 
23204
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23205
 
 
23206
       retarray->offset = 0;
 
23207
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23208
@@ -307,7 +305,7 @@
 
23209
          return;
 
23210
        }
 
23211
       else
 
23212
-       retarray->base_addr = xmalloc (alloc_size);
 
23213
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23214
 
 
23215
     }
 
23216
   else
 
23217
@@ -485,8 +483,7 @@
 
23218
       retarray->offset = 0;
 
23219
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23220
 
 
23221
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23222
-                  * extent[rank-1];
 
23223
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23224
 
 
23225
       if (alloc_size == 0)
 
23226
        {
 
23227
@@ -495,7 +492,7 @@
 
23228
          return;
 
23229
        }
 
23230
       else
 
23231
-       retarray->base_addr = xmalloc (alloc_size);
 
23232
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23233
     }
 
23234
   else
 
23235
     {
 
23236
Index: libgfortran/generated/reshape_i16.c
 
23237
===================================================================
 
23238
--- a/src/libgfortran/generated/reshape_i16.c   (.../tags/gcc_4_8_3_release)
 
23239
+++ b/src/libgfortran/generated/reshape_i16.c   (.../branches/gcc-4_8-branch)
 
23240
@@ -111,11 +111,11 @@
 
23241
       ret->offset = 0;
 
23242
 
 
23243
       if (unlikely (rs < 1))
 
23244
-        alloc_size = 1;
 
23245
+        alloc_size = 0;
 
23246
       else
 
23247
-        alloc_size = rs * sizeof (GFC_INTEGER_16);
 
23248
+        alloc_size = rs;
 
23249
 
 
23250
-      ret->base_addr = xmalloc (alloc_size);
 
23251
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23252
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
 
23253
     }
 
23254
 
 
23255
Index: libgfortran/generated/count_16_l.c
 
23256
===================================================================
 
23257
--- a/src/libgfortran/generated/count_16_l.c    (.../tags/gcc_4_8_3_release)
 
23258
+++ b/src/libgfortran/generated/count_16_l.c    (.../branches/gcc-4_8-branch)
 
23259
@@ -101,8 +101,7 @@
 
23260
       retarray->offset = 0;
 
23261
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23262
 
 
23263
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23264
-                  * extent[rank-1];
 
23265
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23266
 
 
23267
       if (alloc_size == 0)
 
23268
        {
 
23269
@@ -111,7 +110,7 @@
 
23270
          return;
 
23271
        }
 
23272
       else
 
23273
-       retarray->base_addr = xmalloc (alloc_size);
 
23274
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23275
     }
 
23276
   else
 
23277
     {
 
23278
Index: libgfortran/generated/minloc1_8_i1.c
 
23279
===================================================================
 
23280
--- a/src/libgfortran/generated/minloc1_8_i1.c  (.../tags/gcc_4_8_3_release)
 
23281
+++ b/src/libgfortran/generated/minloc1_8_i1.c  (.../branches/gcc-4_8-branch)
 
23282
@@ -98,10 +98,9 @@
 
23283
       retarray->offset = 0;
 
23284
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23285
 
 
23286
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23287
-                  * extent[rank-1];
 
23288
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23289
 
 
23290
-      retarray->base_addr = xmalloc (alloc_size);
 
23291
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23292
       if (alloc_size == 0)
 
23293
        {
 
23294
          /* Make sure we have a zero-sized array.  */
 
23295
@@ -294,8 +293,7 @@
 
23296
 
 
23297
        }
 
23298
 
 
23299
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23300
-                  * extent[rank-1];
 
23301
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23302
 
 
23303
       retarray->offset = 0;
 
23304
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23305
@@ -307,7 +305,7 @@
 
23306
          return;
 
23307
        }
 
23308
       else
 
23309
-       retarray->base_addr = xmalloc (alloc_size);
 
23310
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23311
 
 
23312
     }
 
23313
   else
 
23314
@@ -485,8 +483,7 @@
 
23315
       retarray->offset = 0;
 
23316
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23317
 
 
23318
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23319
-                  * extent[rank-1];
 
23320
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23321
 
 
23322
       if (alloc_size == 0)
 
23323
        {
 
23324
@@ -495,7 +492,7 @@
 
23325
          return;
 
23326
        }
 
23327
       else
 
23328
-       retarray->base_addr = xmalloc (alloc_size);
 
23329
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23330
     }
 
23331
   else
 
23332
     {
 
23333
Index: libgfortran/generated/maxloc1_4_i4.c
 
23334
===================================================================
 
23335
--- a/src/libgfortran/generated/maxloc1_4_i4.c  (.../tags/gcc_4_8_3_release)
 
23336
+++ b/src/libgfortran/generated/maxloc1_4_i4.c  (.../branches/gcc-4_8-branch)
 
23337
@@ -98,10 +98,9 @@
 
23338
       retarray->offset = 0;
 
23339
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23340
 
 
23341
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23342
-                  * extent[rank-1];
 
23343
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23344
 
 
23345
-      retarray->base_addr = xmalloc (alloc_size);
 
23346
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23347
       if (alloc_size == 0)
 
23348
        {
 
23349
          /* Make sure we have a zero-sized array.  */
 
23350
@@ -294,8 +293,7 @@
 
23351
 
 
23352
        }
 
23353
 
 
23354
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23355
-                  * extent[rank-1];
 
23356
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23357
 
 
23358
       retarray->offset = 0;
 
23359
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23360
@@ -307,7 +305,7 @@
 
23361
          return;
 
23362
        }
 
23363
       else
 
23364
-       retarray->base_addr = xmalloc (alloc_size);
 
23365
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23366
 
 
23367
     }
 
23368
   else
 
23369
@@ -485,8 +483,7 @@
 
23370
       retarray->offset = 0;
 
23371
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23372
 
 
23373
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23374
-                  * extent[rank-1];
 
23375
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23376
 
 
23377
       if (alloc_size == 0)
 
23378
        {
 
23379
@@ -495,7 +492,7 @@
 
23380
          return;
 
23381
        }
 
23382
       else
 
23383
-       retarray->base_addr = xmalloc (alloc_size);
 
23384
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23385
     }
 
23386
   else
 
23387
     {
 
23388
Index: libgfortran/generated/maxval_i8.c
 
23389
===================================================================
 
23390
--- a/src/libgfortran/generated/maxval_i8.c     (.../tags/gcc_4_8_3_release)
 
23391
+++ b/src/libgfortran/generated/maxval_i8.c     (.../branches/gcc-4_8-branch)
 
23392
@@ -97,10 +97,9 @@
 
23393
       retarray->offset = 0;
 
23394
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23395
 
 
23396
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23397
-                  * extent[rank-1];
 
23398
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23399
 
 
23400
-      retarray->base_addr = xmalloc (alloc_size);
 
23401
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23402
       if (alloc_size == 0)
 
23403
        {
 
23404
          /* Make sure we have a zero-sized array.  */
 
23405
@@ -286,8 +285,7 @@
 
23406
 
 
23407
        }
 
23408
 
 
23409
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23410
-                  * extent[rank-1];
 
23411
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23412
 
 
23413
       retarray->offset = 0;
 
23414
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23415
@@ -299,7 +297,7 @@
 
23416
          return;
 
23417
        }
 
23418
       else
 
23419
-       retarray->base_addr = xmalloc (alloc_size);
 
23420
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23421
 
 
23422
     }
 
23423
   else
 
23424
@@ -472,8 +470,7 @@
 
23425
       retarray->offset = 0;
 
23426
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23427
 
 
23428
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23429
-                  * extent[rank-1];
 
23430
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23431
 
 
23432
       if (alloc_size == 0)
 
23433
        {
 
23434
@@ -482,7 +479,7 @@
 
23435
          return;
 
23436
        }
 
23437
       else
 
23438
-       retarray->base_addr = xmalloc (alloc_size);
 
23439
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23440
     }
 
23441
   else
 
23442
     {
 
23443
Index: libgfortran/generated/eoshift3_16.c
 
23444
===================================================================
 
23445
--- a/src/libgfortran/generated/eoshift3_16.c   (.../tags/gcc_4_8_3_release)
 
23446
+++ b/src/libgfortran/generated/eoshift3_16.c   (.../branches/gcc-4_8-branch)
 
23447
@@ -89,7 +89,7 @@
 
23448
     {
 
23449
       int i;
 
23450
 
 
23451
-      ret->base_addr = xmalloc (size * arraysize);
 
23452
+      ret->base_addr = xmallocarray (arraysize, size);
 
23453
       ret->offset = 0;
 
23454
       ret->dtype = array->dtype;
 
23455
       for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
 
23456
@@ -107,8 +107,8 @@
 
23457
          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
 
23458
 
 
23459
         }
 
23460
-      /* xmalloc allocates a single byte for zero size.  */
 
23461
-      ret->base_addr = xmalloc (size * arraysize);
 
23462
+      /* xmallocarray allocates a single byte for zero size.  */
 
23463
+      ret->base_addr = xmallocarray (arraysize, size);
 
23464
 
 
23465
     }
 
23466
   else if (unlikely (compile_options.bounds_check))
 
23467
Index: libgfortran/generated/shape_i8.c
 
23468
===================================================================
 
23469
--- a/src/libgfortran/generated/shape_i8.c      (.../tags/gcc_4_8_3_release)
 
23470
+++ b/src/libgfortran/generated/shape_i8.c      (.../branches/gcc-4_8-branch)
 
23471
@@ -49,7 +49,7 @@
 
23472
     {
 
23473
       GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
 
23474
       ret->offset = 0;
 
23475
-      ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23476
+      ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23477
     }
 
23478
 
 
23479
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
23480
Index: libgfortran/generated/maxloc0_4_i16.c
 
23481
===================================================================
 
23482
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
 
23483
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
 
23484
@@ -58,7 +58,7 @@
 
23485
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23486
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23487
       retarray->offset = 0;
 
23488
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23489
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23490
     }
 
23491
   else
 
23492
     {
 
23493
@@ -199,7 +199,7 @@
 
23494
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23495
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23496
       retarray->offset = 0;
 
23497
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23498
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23499
     }
 
23500
   else
 
23501
     {
 
23502
@@ -367,7 +367,7 @@
 
23503
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23504
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23505
       retarray->offset = 0;
 
23506
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23507
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23508
     }
 
23509
   else if (unlikely (compile_options.bounds_check))
 
23510
     {
 
23511
Index: libgfortran/generated/maxloc1_4_r10.c
 
23512
===================================================================
 
23513
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
 
23514
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
 
23515
@@ -98,10 +98,9 @@
 
23516
       retarray->offset = 0;
 
23517
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23518
 
 
23519
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23520
-                  * extent[rank-1];
 
23521
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23522
 
 
23523
-      retarray->base_addr = xmalloc (alloc_size);
 
23524
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23525
       if (alloc_size == 0)
 
23526
        {
 
23527
          /* Make sure we have a zero-sized array.  */
 
23528
@@ -294,8 +293,7 @@
 
23529
 
 
23530
        }
 
23531
 
 
23532
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23533
-                  * extent[rank-1];
 
23534
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23535
 
 
23536
       retarray->offset = 0;
 
23537
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23538
@@ -307,7 +305,7 @@
 
23539
          return;
 
23540
        }
 
23541
       else
 
23542
-       retarray->base_addr = xmalloc (alloc_size);
 
23543
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23544
 
 
23545
     }
 
23546
   else
 
23547
@@ -485,8 +483,7 @@
 
23548
       retarray->offset = 0;
 
23549
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23550
 
 
23551
-      alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23552
-                  * extent[rank-1];
 
23553
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23554
 
 
23555
       if (alloc_size == 0)
 
23556
        {
 
23557
@@ -495,7 +492,7 @@
 
23558
          return;
 
23559
        }
 
23560
       else
 
23561
-       retarray->base_addr = xmalloc (alloc_size);
 
23562
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
 
23563
     }
 
23564
   else
 
23565
     {
 
23566
Index: libgfortran/generated/maxloc1_8_i16.c
 
23567
===================================================================
 
23568
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
 
23569
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
 
23570
@@ -98,10 +98,9 @@
 
23571
       retarray->offset = 0;
 
23572
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23573
 
 
23574
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23575
-                  * extent[rank-1];
 
23576
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23577
 
 
23578
-      retarray->base_addr = xmalloc (alloc_size);
 
23579
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23580
       if (alloc_size == 0)
 
23581
        {
 
23582
          /* Make sure we have a zero-sized array.  */
 
23583
@@ -294,8 +293,7 @@
 
23584
 
 
23585
        }
 
23586
 
 
23587
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23588
-                  * extent[rank-1];
 
23589
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23590
 
 
23591
       retarray->offset = 0;
 
23592
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23593
@@ -307,7 +305,7 @@
 
23594
          return;
 
23595
        }
 
23596
       else
 
23597
-       retarray->base_addr = xmalloc (alloc_size);
 
23598
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23599
 
 
23600
     }
 
23601
   else
 
23602
@@ -485,8 +483,7 @@
 
23603
       retarray->offset = 0;
 
23604
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23605
 
 
23606
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23607
-                  * extent[rank-1];
 
23608
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23609
 
 
23610
       if (alloc_size == 0)
 
23611
        {
 
23612
@@ -495,7 +492,7 @@
 
23613
          return;
 
23614
        }
 
23615
       else
 
23616
-       retarray->base_addr = xmalloc (alloc_size);
 
23617
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23618
     }
 
23619
   else
 
23620
     {
 
23621
Index: libgfortran/generated/minloc0_8_r10.c
 
23622
===================================================================
 
23623
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
 
23624
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
 
23625
@@ -58,7 +58,7 @@
 
23626
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23627
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23628
       retarray->offset = 0;
 
23629
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23630
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23631
     }
 
23632
   else
 
23633
     {
 
23634
@@ -199,7 +199,7 @@
 
23635
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23636
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23637
       retarray->offset = 0;
 
23638
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23639
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23640
     }
 
23641
   else
 
23642
     {
 
23643
@@ -367,7 +367,7 @@
 
23644
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23645
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23646
       retarray->offset = 0;
 
23647
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
23648
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
23649
     }
 
23650
   else if (unlikely (compile_options.bounds_check))
 
23651
     {
 
23652
Index: libgfortran/generated/iparity_i2.c
 
23653
===================================================================
 
23654
--- a/src/libgfortran/generated/iparity_i2.c    (.../tags/gcc_4_8_3_release)
 
23655
+++ b/src/libgfortran/generated/iparity_i2.c    (.../branches/gcc-4_8-branch)
 
23656
@@ -97,10 +97,9 @@
 
23657
       retarray->offset = 0;
 
23658
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23659
 
 
23660
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23661
-                  * extent[rank-1];
 
23662
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23663
 
 
23664
-      retarray->base_addr = xmalloc (alloc_size);
 
23665
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
23666
       if (alloc_size == 0)
 
23667
        {
 
23668
          /* Make sure we have a zero-sized array.  */
 
23669
@@ -272,8 +271,7 @@
 
23670
 
 
23671
        }
 
23672
 
 
23673
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23674
-                  * extent[rank-1];
 
23675
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23676
 
 
23677
       retarray->offset = 0;
 
23678
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23679
@@ -285,7 +283,7 @@
 
23680
          return;
 
23681
        }
 
23682
       else
 
23683
-       retarray->base_addr = xmalloc (alloc_size);
 
23684
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
23685
 
 
23686
     }
 
23687
   else
 
23688
@@ -430,8 +428,7 @@
 
23689
       retarray->offset = 0;
 
23690
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23691
 
 
23692
-      alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23693
-                  * extent[rank-1];
 
23694
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23695
 
 
23696
       if (alloc_size == 0)
 
23697
        {
 
23698
@@ -440,7 +437,7 @@
 
23699
          return;
 
23700
        }
 
23701
       else
 
23702
-       retarray->base_addr = xmalloc (alloc_size);
 
23703
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
 
23704
     }
 
23705
   else
 
23706
     {
 
23707
Index: libgfortran/generated/maxloc1_16_r4.c
 
23708
===================================================================
 
23709
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
 
23710
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
 
23711
@@ -98,10 +98,9 @@
 
23712
       retarray->offset = 0;
 
23713
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23714
 
 
23715
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23716
-                  * extent[rank-1];
 
23717
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23718
 
 
23719
-      retarray->base_addr = xmalloc (alloc_size);
 
23720
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23721
       if (alloc_size == 0)
 
23722
        {
 
23723
          /* Make sure we have a zero-sized array.  */
 
23724
@@ -294,8 +293,7 @@
 
23725
 
 
23726
        }
 
23727
 
 
23728
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23729
-                  * extent[rank-1];
 
23730
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23731
 
 
23732
       retarray->offset = 0;
 
23733
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23734
@@ -307,7 +305,7 @@
 
23735
          return;
 
23736
        }
 
23737
       else
 
23738
-       retarray->base_addr = xmalloc (alloc_size);
 
23739
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23740
 
 
23741
     }
 
23742
   else
 
23743
@@ -485,8 +483,7 @@
 
23744
       retarray->offset = 0;
 
23745
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23746
 
 
23747
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23748
-                  * extent[rank-1];
 
23749
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23750
 
 
23751
       if (alloc_size == 0)
 
23752
        {
 
23753
@@ -495,7 +492,7 @@
 
23754
          return;
 
23755
        }
 
23756
       else
 
23757
-       retarray->base_addr = xmalloc (alloc_size);
 
23758
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23759
     }
 
23760
   else
 
23761
     {
 
23762
Index: libgfortran/generated/maxloc0_16_r8.c
 
23763
===================================================================
 
23764
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
 
23765
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
 
23766
@@ -58,7 +58,7 @@
 
23767
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23768
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23769
       retarray->offset = 0;
 
23770
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23771
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23772
     }
 
23773
   else
 
23774
     {
 
23775
@@ -199,7 +199,7 @@
 
23776
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23777
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23778
       retarray->offset = 0;
 
23779
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23780
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23781
     }
 
23782
   else
 
23783
     {
 
23784
@@ -367,7 +367,7 @@
 
23785
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23786
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23787
       retarray->offset = 0;
 
23788
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
 
23789
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
 
23790
     }
 
23791
   else if (unlikely (compile_options.bounds_check))
 
23792
     {
 
23793
Index: libgfortran/generated/sum_i16.c
 
23794
===================================================================
 
23795
--- a/src/libgfortran/generated/sum_i16.c       (.../tags/gcc_4_8_3_release)
 
23796
+++ b/src/libgfortran/generated/sum_i16.c       (.../branches/gcc-4_8-branch)
 
23797
@@ -97,10 +97,9 @@
 
23798
       retarray->offset = 0;
 
23799
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23800
 
 
23801
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23802
-                  * extent[rank-1];
 
23803
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23804
 
 
23805
-      retarray->base_addr = xmalloc (alloc_size);
 
23806
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23807
       if (alloc_size == 0)
 
23808
        {
 
23809
          /* Make sure we have a zero-sized array.  */
 
23810
@@ -272,8 +271,7 @@
 
23811
 
 
23812
        }
 
23813
 
 
23814
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23815
-                  * extent[rank-1];
 
23816
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23817
 
 
23818
       retarray->offset = 0;
 
23819
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23820
@@ -285,7 +283,7 @@
 
23821
          return;
 
23822
        }
 
23823
       else
 
23824
-       retarray->base_addr = xmalloc (alloc_size);
 
23825
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23826
 
 
23827
     }
 
23828
   else
 
23829
@@ -430,8 +428,7 @@
 
23830
       retarray->offset = 0;
 
23831
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23832
 
 
23833
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23834
-                  * extent[rank-1];
 
23835
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23836
 
 
23837
       if (alloc_size == 0)
 
23838
        {
 
23839
@@ -440,7 +437,7 @@
 
23840
          return;
 
23841
        }
 
23842
       else
 
23843
-       retarray->base_addr = xmalloc (alloc_size);
 
23844
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23845
     }
 
23846
   else
 
23847
     {
 
23848
Index: libgfortran/generated/maxloc0_4_i8.c
 
23849
===================================================================
 
23850
--- a/src/libgfortran/generated/maxloc0_4_i8.c  (.../tags/gcc_4_8_3_release)
 
23851
+++ b/src/libgfortran/generated/maxloc0_4_i8.c  (.../branches/gcc-4_8-branch)
 
23852
@@ -58,7 +58,7 @@
 
23853
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23854
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23855
       retarray->offset = 0;
 
23856
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23857
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23858
     }
 
23859
   else
 
23860
     {
 
23861
@@ -199,7 +199,7 @@
 
23862
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
23863
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23864
       retarray->offset = 0;
 
23865
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23866
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23867
     }
 
23868
   else
 
23869
     {
 
23870
@@ -367,7 +367,7 @@
 
23871
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
23872
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
23873
       retarray->offset = 0;
 
23874
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
 
23875
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
 
23876
     }
 
23877
   else if (unlikely (compile_options.bounds_check))
 
23878
     {
 
23879
Index: libgfortran/generated/pack_c16.c
 
23880
===================================================================
 
23881
--- a/src/libgfortran/generated/pack_c16.c      (.../tags/gcc_4_8_3_release)
 
23882
+++ b/src/libgfortran/generated/pack_c16.c      (.../branches/gcc-4_8-branch)
 
23883
@@ -167,8 +167,8 @@
 
23884
 
 
23885
          ret->offset = 0;
 
23886
 
 
23887
-         /* xmalloc allocates a single byte for zero size.  */
 
23888
-         ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
 
23889
+         /* xmallocarray allocates a single byte for zero size.  */
 
23890
+         ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
 
23891
 
 
23892
          if (total == 0)
 
23893
            return;
 
23894
Index: libgfortran/generated/maxloc1_16_i16.c
 
23895
===================================================================
 
23896
--- a/src/libgfortran/generated/maxloc1_16_i16.c        (.../tags/gcc_4_8_3_release)
 
23897
+++ b/src/libgfortran/generated/maxloc1_16_i16.c        (.../branches/gcc-4_8-branch)
 
23898
@@ -98,10 +98,9 @@
 
23899
       retarray->offset = 0;
 
23900
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23901
 
 
23902
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23903
-                  * extent[rank-1];
 
23904
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23905
 
 
23906
-      retarray->base_addr = xmalloc (alloc_size);
 
23907
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23908
       if (alloc_size == 0)
 
23909
        {
 
23910
          /* Make sure we have a zero-sized array.  */
 
23911
@@ -294,8 +293,7 @@
 
23912
 
 
23913
        }
 
23914
 
 
23915
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23916
-                  * extent[rank-1];
 
23917
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23918
 
 
23919
       retarray->offset = 0;
 
23920
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23921
@@ -307,7 +305,7 @@
 
23922
          return;
 
23923
        }
 
23924
       else
 
23925
-       retarray->base_addr = xmalloc (alloc_size);
 
23926
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23927
 
 
23928
     }
 
23929
   else
 
23930
@@ -485,8 +483,7 @@
 
23931
       retarray->offset = 0;
 
23932
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23933
 
 
23934
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23935
-                  * extent[rank-1];
 
23936
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23937
 
 
23938
       if (alloc_size == 0)
 
23939
        {
 
23940
@@ -495,7 +492,7 @@
 
23941
          return;
 
23942
        }
 
23943
       else
 
23944
-       retarray->base_addr = xmalloc (alloc_size);
 
23945
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
23946
     }
 
23947
   else
 
23948
     {
 
23949
Index: libgfortran/generated/minloc1_8_r4.c
 
23950
===================================================================
 
23951
--- a/src/libgfortran/generated/minloc1_8_r4.c  (.../tags/gcc_4_8_3_release)
 
23952
+++ b/src/libgfortran/generated/minloc1_8_r4.c  (.../branches/gcc-4_8-branch)
 
23953
@@ -98,10 +98,9 @@
 
23954
       retarray->offset = 0;
 
23955
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23956
 
 
23957
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23958
-                  * extent[rank-1];
 
23959
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23960
 
 
23961
-      retarray->base_addr = xmalloc (alloc_size);
 
23962
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23963
       if (alloc_size == 0)
 
23964
        {
 
23965
          /* Make sure we have a zero-sized array.  */
 
23966
@@ -294,8 +293,7 @@
 
23967
 
 
23968
        }
 
23969
 
 
23970
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23971
-                  * extent[rank-1];
 
23972
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23973
 
 
23974
       retarray->offset = 0;
 
23975
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23976
@@ -307,7 +305,7 @@
 
23977
          return;
 
23978
        }
 
23979
       else
 
23980
-       retarray->base_addr = xmalloc (alloc_size);
 
23981
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
23982
 
 
23983
     }
 
23984
   else
 
23985
@@ -485,8 +483,7 @@
 
23986
       retarray->offset = 0;
 
23987
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
23988
 
 
23989
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
23990
-                  * extent[rank-1];
 
23991
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
23992
 
 
23993
       if (alloc_size == 0)
 
23994
        {
 
23995
@@ -495,7 +492,7 @@
 
23996
          return;
 
23997
        }
 
23998
       else
 
23999
-       retarray->base_addr = xmalloc (alloc_size);
 
24000
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24001
     }
 
24002
   else
 
24003
     {
 
24004
Index: libgfortran/generated/sum_c8.c
 
24005
===================================================================
 
24006
--- a/src/libgfortran/generated/sum_c8.c        (.../tags/gcc_4_8_3_release)
 
24007
+++ b/src/libgfortran/generated/sum_c8.c        (.../branches/gcc-4_8-branch)
 
24008
@@ -97,10 +97,9 @@
 
24009
       retarray->offset = 0;
 
24010
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24011
 
 
24012
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24013
-                  * extent[rank-1];
 
24014
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24015
 
 
24016
-      retarray->base_addr = xmalloc (alloc_size);
 
24017
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24018
       if (alloc_size == 0)
 
24019
        {
 
24020
          /* Make sure we have a zero-sized array.  */
 
24021
@@ -272,8 +271,7 @@
 
24022
 
 
24023
        }
 
24024
 
 
24025
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24026
-                  * extent[rank-1];
 
24027
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24028
 
 
24029
       retarray->offset = 0;
 
24030
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24031
@@ -285,7 +283,7 @@
 
24032
          return;
 
24033
        }
 
24034
       else
 
24035
-       retarray->base_addr = xmalloc (alloc_size);
 
24036
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24037
 
 
24038
     }
 
24039
   else
 
24040
@@ -430,8 +428,7 @@
 
24041
       retarray->offset = 0;
 
24042
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24043
 
 
24044
-      alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24045
-                  * extent[rank-1];
 
24046
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24047
 
 
24048
       if (alloc_size == 0)
 
24049
        {
 
24050
@@ -440,7 +437,7 @@
 
24051
          return;
 
24052
        }
 
24053
       else
 
24054
-       retarray->base_addr = xmalloc (alloc_size);
 
24055
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
 
24056
     }
 
24057
   else
 
24058
     {
 
24059
Index: libgfortran/generated/maxloc1_16_i2.c
 
24060
===================================================================
 
24061
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
 
24062
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
 
24063
@@ -98,10 +98,9 @@
 
24064
       retarray->offset = 0;
 
24065
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24066
 
 
24067
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24068
-                  * extent[rank-1];
 
24069
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24070
 
 
24071
-      retarray->base_addr = xmalloc (alloc_size);
 
24072
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24073
       if (alloc_size == 0)
 
24074
        {
 
24075
          /* Make sure we have a zero-sized array.  */
 
24076
@@ -294,8 +293,7 @@
 
24077
 
 
24078
        }
 
24079
 
 
24080
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24081
-                  * extent[rank-1];
 
24082
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24083
 
 
24084
       retarray->offset = 0;
 
24085
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24086
@@ -307,7 +305,7 @@
 
24087
          return;
 
24088
        }
 
24089
       else
 
24090
-       retarray->base_addr = xmalloc (alloc_size);
 
24091
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24092
 
 
24093
     }
 
24094
   else
 
24095
@@ -485,8 +483,7 @@
 
24096
       retarray->offset = 0;
 
24097
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24098
 
 
24099
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24100
-                  * extent[rank-1];
 
24101
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24102
 
 
24103
       if (alloc_size == 0)
 
24104
        {
 
24105
@@ -495,7 +492,7 @@
 
24106
          return;
 
24107
        }
 
24108
       else
 
24109
-       retarray->base_addr = xmalloc (alloc_size);
 
24110
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24111
     }
 
24112
   else
 
24113
     {
 
24114
Index: libgfortran/generated/parity_l1.c
 
24115
===================================================================
 
24116
--- a/src/libgfortran/generated/parity_l1.c     (.../tags/gcc_4_8_3_release)
 
24117
+++ b/src/libgfortran/generated/parity_l1.c     (.../branches/gcc-4_8-branch)
 
24118
@@ -98,10 +98,9 @@
 
24119
       retarray->offset = 0;
 
24120
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24121
 
 
24122
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24123
-                  * extent[rank-1];
 
24124
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24125
 
 
24126
-      retarray->base_addr = xmalloc (alloc_size);
 
24127
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
24128
       if (alloc_size == 0)
 
24129
        {
 
24130
          /* Make sure we have a zero-sized array.  */
 
24131
Index: libgfortran/generated/maxval_i16.c
 
24132
===================================================================
 
24133
--- a/src/libgfortran/generated/maxval_i16.c    (.../tags/gcc_4_8_3_release)
 
24134
+++ b/src/libgfortran/generated/maxval_i16.c    (.../branches/gcc-4_8-branch)
 
24135
@@ -97,10 +97,9 @@
 
24136
       retarray->offset = 0;
 
24137
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24138
 
 
24139
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24140
-                  * extent[rank-1];
 
24141
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24142
 
 
24143
-      retarray->base_addr = xmalloc (alloc_size);
 
24144
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24145
       if (alloc_size == 0)
 
24146
        {
 
24147
          /* Make sure we have a zero-sized array.  */
 
24148
@@ -286,8 +285,7 @@
 
24149
 
 
24150
        }
 
24151
 
 
24152
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24153
-                  * extent[rank-1];
 
24154
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24155
 
 
24156
       retarray->offset = 0;
 
24157
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24158
@@ -299,7 +297,7 @@
 
24159
          return;
 
24160
        }
 
24161
       else
 
24162
-       retarray->base_addr = xmalloc (alloc_size);
 
24163
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24164
 
 
24165
     }
 
24166
   else
 
24167
@@ -472,8 +470,7 @@
 
24168
       retarray->offset = 0;
 
24169
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24170
 
 
24171
-      alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24172
-                  * extent[rank-1];
 
24173
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24174
 
 
24175
       if (alloc_size == 0)
 
24176
        {
 
24177
@@ -482,7 +479,7 @@
 
24178
          return;
 
24179
        }
 
24180
       else
 
24181
-       retarray->base_addr = xmalloc (alloc_size);
 
24182
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
 
24183
     }
 
24184
   else
 
24185
     {
 
24186
Index: libgfortran/generated/spread_c8.c
 
24187
===================================================================
 
24188
--- a/src/libgfortran/generated/spread_c8.c     (.../tags/gcc_4_8_3_release)
 
24189
+++ b/src/libgfortran/generated/spread_c8.c     (.../branches/gcc-4_8-branch)
 
24190
@@ -101,8 +101,8 @@
 
24191
        }
 
24192
       ret->offset = 0;
 
24193
 
 
24194
-      /* xmalloc allocates a single byte for zero size.  */
 
24195
-      ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
 
24196
+      /* xmallocarray allocates a single byte for zero size.  */
 
24197
+      ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
 
24198
       if (rs <= 0)
 
24199
         return;
 
24200
     }
 
24201
@@ -244,7 +244,7 @@
 
24202
 
 
24203
   if (ret->base_addr == NULL)
 
24204
     {
 
24205
-      ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
 
24206
+      ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
 
24207
       ret->offset = 0;
 
24208
       GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
 
24209
     }
 
24210
Index: libgfortran/generated/matmul_i16.c
 
24211
===================================================================
 
24212
--- a/src/libgfortran/generated/matmul_i16.c    (.../tags/gcc_4_8_3_release)
 
24213
+++ b/src/libgfortran/generated/matmul_i16.c    (.../branches/gcc-4_8-branch)
 
24214
@@ -124,7 +124,7 @@
 
24215
         }
 
24216
 
 
24217
       retarray->base_addr
 
24218
-       = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
 
24219
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
 
24220
       retarray->offset = 0;
 
24221
     }
 
24222
     else if (unlikely (compile_options.bounds_check))
 
24223
Index: libgfortran/generated/pack_i8.c
 
24224
===================================================================
 
24225
--- a/src/libgfortran/generated/pack_i8.c       (.../tags/gcc_4_8_3_release)
 
24226
+++ b/src/libgfortran/generated/pack_i8.c       (.../branches/gcc-4_8-branch)
 
24227
@@ -167,8 +167,8 @@
 
24228
 
 
24229
          ret->offset = 0;
 
24230
 
 
24231
-         /* xmalloc allocates a single byte for zero size.  */
 
24232
-         ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
 
24233
+         /* xmallocarray allocates a single byte for zero size.  */
 
24234
+         ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
 
24235
 
 
24236
          if (total == 0)
 
24237
            return;
 
24238
Index: libgfortran/generated/any_l1.c
 
24239
===================================================================
 
24240
--- a/src/libgfortran/generated/any_l1.c        (.../tags/gcc_4_8_3_release)
 
24241
+++ b/src/libgfortran/generated/any_l1.c        (.../branches/gcc-4_8-branch)
 
24242
@@ -101,8 +101,7 @@
 
24243
       retarray->offset = 0;
 
24244
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24245
 
 
24246
-      alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24247
-                  * extent[rank-1];
 
24248
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24249
 
 
24250
       if (alloc_size == 0)
 
24251
        {
 
24252
@@ -111,7 +110,7 @@
 
24253
          return;
 
24254
        }
 
24255
       else
 
24256
-       retarray->base_addr = xmalloc (alloc_size);
 
24257
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
 
24258
     }
 
24259
   else
 
24260
     {
 
24261
Index: libgfortran/generated/minloc1_8_i2.c
 
24262
===================================================================
 
24263
--- a/src/libgfortran/generated/minloc1_8_i2.c  (.../tags/gcc_4_8_3_release)
 
24264
+++ b/src/libgfortran/generated/minloc1_8_i2.c  (.../branches/gcc-4_8-branch)
 
24265
@@ -98,10 +98,9 @@
 
24266
       retarray->offset = 0;
 
24267
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24268
 
 
24269
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24270
-                  * extent[rank-1];
 
24271
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24272
 
 
24273
-      retarray->base_addr = xmalloc (alloc_size);
 
24274
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24275
       if (alloc_size == 0)
 
24276
        {
 
24277
          /* Make sure we have a zero-sized array.  */
 
24278
@@ -294,8 +293,7 @@
 
24279
 
 
24280
        }
 
24281
 
 
24282
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24283
-                  * extent[rank-1];
 
24284
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24285
 
 
24286
       retarray->offset = 0;
 
24287
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24288
@@ -307,7 +305,7 @@
 
24289
          return;
 
24290
        }
 
24291
       else
 
24292
-       retarray->base_addr = xmalloc (alloc_size);
 
24293
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24294
 
 
24295
     }
 
24296
   else
 
24297
@@ -485,8 +483,7 @@
 
24298
       retarray->offset = 0;
 
24299
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24300
 
 
24301
-      alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24302
-                  * extent[rank-1];
 
24303
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24304
 
 
24305
       if (alloc_size == 0)
 
24306
        {
 
24307
@@ -495,7 +492,7 @@
 
24308
          return;
 
24309
        }
 
24310
       else
 
24311
-       retarray->base_addr = xmalloc (alloc_size);
 
24312
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
 
24313
     }
 
24314
   else
 
24315
     {
 
24316
Index: libgfortran/generated/minloc0_8_r8.c
 
24317
===================================================================
 
24318
--- a/src/libgfortran/generated/minloc0_8_r8.c  (.../tags/gcc_4_8_3_release)
 
24319
+++ b/src/libgfortran/generated/minloc0_8_r8.c  (.../branches/gcc-4_8-branch)
 
24320
@@ -58,7 +58,7 @@
 
24321
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24322
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24323
       retarray->offset = 0;
 
24324
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24325
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24326
     }
 
24327
   else
 
24328
     {
 
24329
@@ -199,7 +199,7 @@
 
24330
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
 
24331
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24332
       retarray->offset = 0;
 
24333
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24334
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24335
     }
 
24336
   else
 
24337
     {
 
24338
@@ -367,7 +367,7 @@
 
24339
       GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
 
24340
       retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
 
24341
       retarray->offset = 0;
 
24342
-      retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
 
24343
+      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
 
24344
     }
 
24345
   else if (unlikely (compile_options.bounds_check))
 
24346
     {
 
24347
Index: libgfortran/generated/matmul_l8.c
 
24348
===================================================================
 
24349
--- a/src/libgfortran/generated/matmul_l8.c     (.../tags/gcc_4_8_3_release)
 
24350
+++ b/src/libgfortran/generated/matmul_l8.c     (.../branches/gcc-4_8-branch)
 
24351
@@ -88,7 +88,7 @@
 
24352
         }
 
24353
           
 
24354
       retarray->base_addr
 
24355
-       = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
 
24356
+       = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
 
24357
       retarray->offset = 0;
 
24358
     }
 
24359
     else if (unlikely (compile_options.bounds_check))
 
24360
Index: libgfortran/generated/product_r10.c
 
24361
===================================================================
 
24362
--- a/src/libgfortran/generated/product_r10.c   (.../tags/gcc_4_8_3_release)
 
24363
+++ b/src/libgfortran/generated/product_r10.c   (.../branches/gcc-4_8-branch)
 
24364
@@ -97,10 +97,9 @@
 
24365
       retarray->offset = 0;
 
24366
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24367
 
 
24368
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24369
-                  * extent[rank-1];
 
24370
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24371
 
 
24372
-      retarray->base_addr = xmalloc (alloc_size);
 
24373
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24374
       if (alloc_size == 0)
 
24375
        {
 
24376
          /* Make sure we have a zero-sized array.  */
 
24377
@@ -272,8 +271,7 @@
 
24378
 
 
24379
        }
 
24380
 
 
24381
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24382
-                  * extent[rank-1];
 
24383
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24384
 
 
24385
       retarray->offset = 0;
 
24386
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24387
@@ -285,7 +283,7 @@
 
24388
          return;
 
24389
        }
 
24390
       else
 
24391
-       retarray->base_addr = xmalloc (alloc_size);
 
24392
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24393
 
 
24394
     }
 
24395
   else
 
24396
@@ -430,8 +428,7 @@
 
24397
       retarray->offset = 0;
 
24398
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24399
 
 
24400
-      alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24401
-                  * extent[rank-1];
 
24402
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24403
 
 
24404
       if (alloc_size == 0)
 
24405
        {
 
24406
@@ -440,7 +437,7 @@
 
24407
          return;
 
24408
        }
 
24409
       else
 
24410
-       retarray->base_addr = xmalloc (alloc_size);
 
24411
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
 
24412
     }
 
24413
   else
 
24414
     {
 
24415
Index: libgfortran/generated/product_i1.c
 
24416
===================================================================
 
24417
--- a/src/libgfortran/generated/product_i1.c    (.../tags/gcc_4_8_3_release)
 
24418
+++ b/src/libgfortran/generated/product_i1.c    (.../branches/gcc-4_8-branch)
 
24419
@@ -97,10 +97,9 @@
 
24420
       retarray->offset = 0;
 
24421
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24422
 
 
24423
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24424
-                  * extent[rank-1];
 
24425
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24426
 
 
24427
-      retarray->base_addr = xmalloc (alloc_size);
 
24428
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24429
       if (alloc_size == 0)
 
24430
        {
 
24431
          /* Make sure we have a zero-sized array.  */
 
24432
@@ -272,8 +271,7 @@
 
24433
 
 
24434
        }
 
24435
 
 
24436
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24437
-                  * extent[rank-1];
 
24438
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24439
 
 
24440
       retarray->offset = 0;
 
24441
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24442
@@ -285,7 +283,7 @@
 
24443
          return;
 
24444
        }
 
24445
       else
 
24446
-       retarray->base_addr = xmalloc (alloc_size);
 
24447
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24448
 
 
24449
     }
 
24450
   else
 
24451
@@ -430,8 +428,7 @@
 
24452
       retarray->offset = 0;
 
24453
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24454
 
 
24455
-      alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24456
-                  * extent[rank-1];
 
24457
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24458
 
 
24459
       if (alloc_size == 0)
 
24460
        {
 
24461
@@ -440,7 +437,7 @@
 
24462
          return;
 
24463
        }
 
24464
       else
 
24465
-       retarray->base_addr = xmalloc (alloc_size);
 
24466
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
 
24467
     }
 
24468
   else
 
24469
     {
 
24470
Index: libgfortran/generated/all_l8.c
 
24471
===================================================================
 
24472
--- a/src/libgfortran/generated/all_l8.c        (.../tags/gcc_4_8_3_release)
 
24473
+++ b/src/libgfortran/generated/all_l8.c        (.../branches/gcc-4_8-branch)
 
24474
@@ -101,8 +101,7 @@
 
24475
       retarray->offset = 0;
 
24476
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
24477
 
 
24478
-      alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
 
24479
-                  * extent[rank-1];
 
24480
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
24481
 
 
24482
       if (alloc_size == 0)
 
24483
        {
 
24484
@@ -111,7 +110,7 @@
 
24485
          return;
 
24486
        }
 
24487
       else
 
24488
-       retarray->base_addr = xmalloc (alloc_size);
 
24489
+       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
 
24490
     }
 
24491
   else
 
24492
     {
 
24493
Index: libgfortran/generated/in_pack_r16.c
 
24494
===================================================================
 
24495
--- a/src/libgfortran/generated/in_pack_r16.c   (.../tags/gcc_4_8_3_release)
 
24496
+++ b/src/libgfortran/generated/in_pack_r16.c   (.../branches/gcc-4_8-branch)
 
24497
@@ -76,7 +76,7 @@
 
24498
     return source->base_addr;
 
24499
 
 
24500
   /* Allocate storage for the destination.  */
 
24501
-  destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
 
24502
+  destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
 
24503
   dest = destptr;
 
24504
   src = source->base_addr;
 
24505
   stride0 = stride[0];
 
24506
Index: libgfortran/generated/in_pack_i1.c
 
24507
===================================================================
 
24508
--- a/src/libgfortran/generated/in_pack_i1.c    (.../tags/gcc_4_8_3_release)
 
24509
+++ b/src/libgfortran/generated/in_pack_i1.c    (.../branches/gcc-4_8-branch)
 
24510
@@ -76,7 +76,7 @@
 
24511
     return source->base_addr;
 
24512
 
 
24513
   /* Allocate storage for the destination.  */
 
24514
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
 
24515
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
 
24516
   dest = destptr;
 
24517
   src = source->base_addr;
 
24518
   stride0 = stride[0];
 
24519
Index: libgfortran/libgfortran.h
 
24520
===================================================================
 
24521
--- a/src/libgfortran/libgfortran.h     (.../tags/gcc_4_8_3_release)
 
24522
+++ b/src/libgfortran/libgfortran.h     (.../branches/gcc-4_8-branch)
 
24523
@@ -751,6 +751,9 @@
 
24524
 extern void *xmalloc (size_t) __attribute__ ((malloc));
 
24525
 internal_proto(xmalloc);
 
24526
 
 
24527
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
 
24528
+internal_proto(xmallocarray);
 
24529
+
 
24530
 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
 
24531
 internal_proto(xcalloc);
 
24532
 
 
24533
Index: libgfortran/config.h.in
 
24534
===================================================================
 
24535
--- a/src/libgfortran/config.h.in       (.../tags/gcc_4_8_3_release)
 
24536
+++ b/src/libgfortran/config.h.in       (.../branches/gcc-4_8-branch)
 
24537
@@ -711,6 +711,9 @@
 
24538
 /* Define to 1 if you have the `strtof' function. */
 
24539
 #undef HAVE_STRTOF
 
24540
 
 
24541
+/* Define to 1 if you have the `strtok_r' function. */
 
24542
+#undef HAVE_STRTOK_R
 
24543
+
 
24544
 /* Define to 1 if you have the `strtold' function. */
 
24545
 #undef HAVE_STRTOLD
 
24546
 
 
24547
Index: libgfortran/io/list_read.c
 
24548
===================================================================
 
24549
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_8_3_release)
 
24550
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_8-branch)
 
24551
@@ -2354,7 +2354,7 @@
 
24552
 {
 
24553
   index_type len = strlen (nl->var_name) + 1;
 
24554
   int dim;
 
24555
-  char * ext_name = (char*)xmalloc (len + 1);
 
24556
+  char * ext_name = xmalloc (len + 1);
 
24557
   memcpy (ext_name, nl->var_name, len-1);
 
24558
   memcpy (ext_name + len - 1, "%", 2);
 
24559
   for (nl = nl->next; nl; nl = nl->next)
 
24560
Index: libgfortran/io/unit.c
 
24561
===================================================================
 
24562
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
 
24563
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
 
24564
@@ -455,7 +455,7 @@
 
24565
     {
 
24566
       iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
 
24567
       iunit->ls = (array_loop_spec *)
 
24568
-       xmalloc (iunit->rank * sizeof (array_loop_spec));
 
24569
+       xmallocarray (iunit->rank, sizeof (array_loop_spec));
 
24570
       dtp->internal_unit_len *=
 
24571
        init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
 
24572
 
 
24573
Index: libgfortran/io/unix.c
 
24574
===================================================================
 
24575
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
 
24576
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
 
24577
@@ -407,7 +407,9 @@
 
24578
 {
 
24579
   int retval;
 
24580
   
 
24581
-  if (s->fd != STDOUT_FILENO
 
24582
+  if (s->fd == -1)
 
24583
+    retval = -1;
 
24584
+  else if (s->fd != STDOUT_FILENO
 
24585
       && s->fd != STDERR_FILENO
 
24586
       && s->fd != STDIN_FILENO)
 
24587
     retval = close (s->fd);
 
24588
@@ -983,7 +985,15 @@
 
24589
 
 
24590
   /* Get the current length of the file. */
 
24591
 
 
24592
-  fstat (fd, &statbuf);
 
24593
+  if (fstat (fd, &statbuf) == -1)
 
24594
+    {
 
24595
+      s->st_dev = s->st_ino = -1;
 
24596
+      s->file_length = 0;
 
24597
+      if (errno == EBADF)
 
24598
+       s->fd = -1;
 
24599
+      raw_init (s);
 
24600
+      return (stream *) s;
 
24601
+    }
 
24602
 
 
24603
   s->st_dev = statbuf.st_dev;
 
24604
   s->st_ino = statbuf.st_ino;
 
24605
Index: libgfortran/io/transfer.c
 
24606
===================================================================
 
24607
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_8_3_release)
 
24608
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_8-branch)
 
24609
@@ -3776,9 +3776,9 @@
 
24610
   if (nml->var_rank > 0)
 
24611
     {
 
24612
       nml->dim = (descriptor_dimension*)
 
24613
-                  xmalloc (nml->var_rank * sizeof (descriptor_dimension));
 
24614
+       xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
 
24615
       nml->ls = (array_loop_spec*)
 
24616
-                 xmalloc (nml->var_rank * sizeof (array_loop_spec));
 
24617
+       xmallocarray (nml->var_rank, sizeof (array_loop_spec));
 
24618
     }
 
24619
   else
 
24620
     {
 
24621
Index: libgfortran/io/write.c
 
24622
===================================================================
 
24623
--- a/src/libgfortran/io/write.c        (.../tags/gcc_4_8_3_release)
 
24624
+++ b/src/libgfortran/io/write.c        (.../branches/gcc-4_8-branch)
 
24625
@@ -1863,7 +1863,7 @@
 
24626
              base_var_name_len = base ? strlen (base->var_name) : 0;
 
24627
              ext_name_len = base_name_len + base_var_name_len 
 
24628
                + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
 
24629
-             ext_name = (char*)xmalloc (ext_name_len);
 
24630
+             ext_name = xmalloc (ext_name_len);
 
24631
 
 
24632
              memcpy (ext_name, base_name, base_name_len);
 
24633
              clen = strlen (obj->var_name + base_var_name_len);
 
24634
@@ -1892,7 +1892,7 @@
 
24635
              /* Now obj_name.  */
 
24636
 
 
24637
              obj_name_len = strlen (obj->var_name) + 1;
 
24638
-             obj_name = xmalloc (obj_name_len+1);
 
24639
+             obj_name = xmalloc (obj_name_len + 1);
 
24640
              memcpy (obj_name, obj->var_name, obj_name_len-1);
 
24641
              memcpy (obj_name + obj_name_len-1, "%", 2);
 
24642
 
 
24643
Index: libada/Makefile.in
 
24644
===================================================================
 
24645
--- a/src/libada/Makefile.in    (.../tags/gcc_4_8_3_release)
 
24646
+++ b/src/libada/Makefile.in    (.../branches/gcc-4_8-branch)
 
24647
@@ -60,7 +60,7 @@
 
24648
 PICFLAG = @PICFLAG@
 
24649
 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
 
24650
 GNATLIBCFLAGS= -g -O2
 
24651
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
 
24652
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
 
24653
        -fexceptions -DIN_RTS @have_getipinfo@
 
24654
 
 
24655
 host_subdir = @host_subdir@
 
24656
Index: libada/ChangeLog
 
24657
===================================================================
 
24658
--- a/src/libada/ChangeLog      (.../tags/gcc_4_8_3_release)
 
24659
+++ b/src/libada/ChangeLog      (.../branches/gcc-4_8-branch)
 
24660
@@ -1,3 +1,7 @@
 
24661
+2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
 
24662
+
 
24663
+       * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
 
24664
+
 
24665
 2014-05-22  Release Manager
 
24666
 
 
24667
        * GCC 4.8.3 released.
 
24668
Index: libffi/src/powerpc/linux64_closure.S
 
24669
===================================================================
 
24670
--- a/src/libffi/src/powerpc/linux64_closure.S  (.../tags/gcc_4_8_3_release)
 
24671
+++ b/src/libffi/src/powerpc/linux64_closure.S  (.../branches/gcc-4_8-branch)
 
24672
@@ -381,7 +381,8 @@
 
24673
        .align 3
 
24674
 .LEFDE1:
 
24675
 
 
24676
-# if defined __ELF__ && defined __linux__
 
24677
+#endif
 
24678
+
 
24679
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
24680
        .section        .note.GNU-stack,"",@progbits
 
24681
-# endif
 
24682
 #endif
 
24683
Index: libffi/src/powerpc/linux64.S
 
24684
===================================================================
 
24685
--- a/src/libffi/src/powerpc/linux64.S  (.../tags/gcc_4_8_3_release)
 
24686
+++ b/src/libffi/src/powerpc/linux64.S  (.../branches/gcc-4_8-branch)
 
24687
@@ -254,7 +254,8 @@
 
24688
        .align 3
 
24689
 .LEFDE1:
 
24690
 
 
24691
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
24692
+#endif
 
24693
+
 
24694
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
 
24695
        .section        .note.GNU-stack,"",@progbits
 
24696
-# endif
 
24697
 #endif
 
24698
Index: libffi/ChangeLog
 
24699
===================================================================
 
24700
--- a/src/libffi/ChangeLog      (.../tags/gcc_4_8_3_release)
 
24701
+++ b/src/libffi/ChangeLog      (.../branches/gcc-4_8-branch)
 
24702
@@ -1,3 +1,9 @@
 
24703
+2014-09-11  Jakub Jelinek  <jakub@redhat.com>
 
24704
+
 
24705
+       * src/powerpc/linux64.S: Emit .note.GNU-stack even when
 
24706
+       POWERPC64 is not defined.
 
24707
+       * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.
 
24708
+
 
24709
 2014-05-22  Release Manager
 
24710
 
 
24711
        * GCC 4.8.3 released.
 
24712
Index: libcpp/ChangeLog
 
24713
===================================================================
 
24714
--- a/src/libcpp/ChangeLog      (.../tags/gcc_4_8_3_release)
 
24715
+++ b/src/libcpp/ChangeLog      (.../branches/gcc-4_8-branch)
 
24716
@@ -1,3 +1,14 @@
 
24717
+2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
24718
+
 
24719
+       Backport from mainline r215873
 
24720
+       2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
24721
+
 
24722
+       * lex.c (search_line_fast): Add new version to be used for Power8
 
24723
+       and later targets when Altivec is enabled.  Restrict the existing
 
24724
+       Altivec version to big-endian systems so that lvsr is not used on
 
24725
+       little endian, where it is deprecated.  Remove LE-specific code
 
24726
+       from the now-BE-only version.
 
24727
+
 
24728
 2014-05-22  Release Manager
 
24729
 
 
24730
        * GCC 4.8.3 released.
 
24731
Index: libcpp/lex.c
 
24732
===================================================================
 
24733
--- a/src/libcpp/lex.c  (.../tags/gcc_4_8_3_release)
 
24734
+++ b/src/libcpp/lex.c  (.../branches/gcc-4_8-branch)
 
24735
@@ -515,9 +515,111 @@
 
24736
   search_line_fast = impl;
 
24737
 }
 
24738
 
 
24739
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
 
24740
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
 
24741
 
 
24742
-/* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 
24743
+/* A vection of the fast scanner using AltiVec vectorized byte compares
 
24744
+   and VSX unaligned loads (when VSX is available).  This is otherwise
 
24745
+   the same as the pre-GCC 5 version.  */
 
24746
+
 
24747
+static const uchar *
 
24748
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 
24749
+{
 
24750
+  typedef __attribute__((altivec(vector))) unsigned char vc;
 
24751
+
 
24752
+  const vc repl_nl = {
 
24753
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
 
24754
+    '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
 
24755
+  };
 
24756
+  const vc repl_cr = {
 
24757
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', 
 
24758
+    '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
 
24759
+  };
 
24760
+  const vc repl_bs = {
 
24761
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
 
24762
+    '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
 
24763
+  };
 
24764
+  const vc repl_qm = {
 
24765
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
24766
+    '?', '?', '?', '?', '?', '?', '?', '?', 
 
24767
+  };
 
24768
+  const vc zero = { 0 };
 
24769
+
 
24770
+  vc data, t;
 
24771
+
 
24772
+  /* Main loop processing 16 bytes at a time.  */
 
24773
+  do
 
24774
+    {
 
24775
+      vc m_nl, m_cr, m_bs, m_qm;
 
24776
+
 
24777
+      data = *((const vc *)s);
 
24778
+      s += 16;
 
24779
+
 
24780
+      m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
 
24781
+      m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
 
24782
+      m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
 
24783
+      m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
 
24784
+      t = (m_nl | m_cr) | (m_bs | m_qm);
 
24785
+
 
24786
+      /* T now contains 0xff in bytes for which we matched one of the relevant
 
24787
+        characters.  We want to exit the loop if any byte in T is non-zero.
 
24788
+        Below is the expansion of vec_any_ne(t, zero).  */
 
24789
+    }
 
24790
+  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
 
24791
+
 
24792
+  /* Restore s to to point to the 16 bytes we just processed.  */
 
24793
+  s -= 16;
 
24794
+
 
24795
+  {
 
24796
+#define N  (sizeof(vc) / sizeof(long))
 
24797
+
 
24798
+    union {
 
24799
+      vc v;
 
24800
+      /* Statically assert that N is 2 or 4.  */
 
24801
+      unsigned long l[(N == 2 || N == 4) ? N : -1];
 
24802
+    } u;
 
24803
+    unsigned long l, i = 0;
 
24804
+
 
24805
+    u.v = t;
 
24806
+
 
24807
+    /* Find the first word of T that is non-zero.  */
 
24808
+    switch (N)
 
24809
+      {
 
24810
+      case 4:
 
24811
+       l = u.l[i++];
 
24812
+       if (l != 0)
 
24813
+         break;
 
24814
+       s += sizeof(unsigned long);
 
24815
+       l = u.l[i++];
 
24816
+       if (l != 0)
 
24817
+         break;
 
24818
+       s += sizeof(unsigned long);
 
24819
+      case 2:
 
24820
+       l = u.l[i++];
 
24821
+       if (l != 0)
 
24822
+         break;
 
24823
+       s += sizeof(unsigned long);
 
24824
+       l = u.l[i];
 
24825
+      }
 
24826
+
 
24827
+    /* L now contains 0xff in bytes for which we matched one of the
 
24828
+       relevant characters.  We can find the byte index by finding
 
24829
+       its bit index and dividing by 8.  */
 
24830
+#ifdef __BIG_ENDIAN__
 
24831
+    l = __builtin_clzl(l) >> 3;
 
24832
+#else
 
24833
+    l = __builtin_ctzl(l) >> 3;
 
24834
+#endif
 
24835
+    return s + l;
 
24836
+
 
24837
+#undef N
 
24838
+  }
 
24839
+}
 
24840
+
 
24841
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
 
24842
+
 
24843
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
 
24844
+   This cannot be used for little endian because vec_lvsl/lvsr are
 
24845
+   deprecated for little endian and the code won't work properly.  */
 
24846
 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
 
24847
    so we can't compile this function without -maltivec on the command line
 
24848
    (or implied by some other switch).  */
 
24849
@@ -559,13 +661,8 @@
 
24850
      beginning with all ones and shifting in zeros according to the
 
24851
      mis-alignment.  The LVSR instruction pulls the exact shift we
 
24852
      want from the address.  */
 
24853
-#ifdef __BIG_ENDIAN__
 
24854
   mask = __builtin_vec_lvsr(0, s);
 
24855
   mask = __builtin_vec_perm(zero, ones, mask);
 
24856
-#else
 
24857
-  mask = __builtin_vec_lvsl(0, s);
 
24858
-  mask = __builtin_vec_perm(ones, zero, mask);
 
24859
-#endif
 
24860
   data &= mask;
 
24861
 
 
24862
   /* While altivec loads mask addresses, we still need to align S so
 
24863
@@ -629,11 +726,7 @@
 
24864
     /* L now contains 0xff in bytes for which we matched one of the
 
24865
        relevant characters.  We can find the byte index by finding
 
24866
        its bit index and dividing by 8.  */
 
24867
-#ifdef __BIG_ENDIAN__
 
24868
     l = __builtin_clzl(l) >> 3;
 
24869
-#else
 
24870
-    l = __builtin_ctzl(l) >> 3;
 
24871
-#endif
 
24872
     return s + l;
 
24873
 
 
24874
 #undef N
 
24875
Index: .
 
24876
===================================================================
 
24877
--- a/src/.     (.../tags/gcc_4_8_3_release)
 
24878
+++ b/src/.     (.../branches/gcc-4_8-branch)
 
24879
 
 
24880
Property changes on: .
 
24881
___________________________________________________________________
 
24882
Modified: svn:mergeinfo
 
24883
   Merged /trunk:r211733,215049