1 Index: libstdc++-v3/python/libstdcxx/v6/printers.py
2 ===================================================================
3 --- libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_8_3_release) (revision 217117)
4 +++ libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_8-branch) (revision 217117)
6 -# Pretty-printers for libstc++.
7 +# Pretty-printers for libstdc++.
9 # Copyright (C) 2008-2013 Free Software Foundation, Inc.
17 +### Python 2 + Python 3 compatibility code
19 +# Resources about compatibility:
21 +# * <http://pythonhosted.org/six/>: Documentation of the "six" module
23 +# FIXME: The handling of e.g. std::basic_string (at least on char)
24 +# probably needs updating to work with Python 3's new string rules.
26 +# In particular, Python 3 has a separate type (called byte) for
27 +# bytestrings, and a special b"" syntax for the byte literals; the old
28 +# str() type has been redefined to always store Unicode text.
30 +# We probably can't do much about this until this GDB PR is addressed:
31 +# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
33 +if sys.version_info[0] > 2:
36 + # Python 3 folds these into the normal functions.
39 + # Also, int subsumes long
44 + """Compatibility mixin for iterators
46 + Instead of writing next() methods for iterators, write
47 + __next__() methods and use this mixin to make them work in
48 + Python 2 as well as Python 3.
50 + Idea stolen from the "six" documentation:
51 + <http://pythonhosted.org/six/#six.Iterator>
55 + return self.__next__()
57 + # In Python 2, we still need these from itertools
58 + from itertools import imap, izip
60 # Try to use the new-style pretty-printing if available.
64 # anything fancier here.
65 field = typ.fields()[0]
66 if not field.is_base_class:
67 - raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
68 + raise ValueError("Cannot find type %s::%s" % (str(orig), name))
71 class SharedPointerPrinter:
77 + class _iterator(Iterator):
78 def __init__(self, nodetype, head):
79 self.nodetype = nodetype
80 self.base = head['_M_next']
87 if self.base == self.head:
89 elt = self.base.cast(self.nodetype).dereference()
91 class StdSlistPrinter:
92 "Print a __gnu_cxx::slist"
95 + class _iterator(Iterator):
96 def __init__(self, nodetype, head):
97 self.nodetype = nodetype
98 self.base = head['_M_head']['_M_next']
104 + def __next__(self):
107 elt = self.base.cast(self.nodetype).dereference()
109 class StdVectorPrinter:
110 "Print a std::vector"
113 + class _iterator(Iterator):
114 def __init__ (self, start, finish, bitvec):
122 + def __next__(self):
124 self.count = self.count + 1
127 class StdTuplePrinter:
131 + class _iterator(Iterator):
132 def __init__ (self, head):
135 @@ -276,13 +320,13 @@
136 # Set the actual head to the first pair.
137 self.head = self.head.cast (nodes[0].type)
138 elif len (nodes) != 0:
139 - raise ValueError, "Top of tuple tree does not consist of a single node."
140 + raise ValueError("Top of tuple tree does not consist of a single node.")
147 + def __next__ (self):
148 nodes = self.head.type.fields ()
149 # Check for further recursions in the inheritance tree.
153 # Check that this iteration has an expected structure.
155 - raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
156 + raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
158 # - Left node is the next recursion parent.
159 # - Right node is the actual class contained in the tuple.
161 return self.visualizer.display_hint ()
164 -class RbtreeIterator:
165 +class RbtreeIterator(Iterator):
166 def __init__(self, rbtree):
167 self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
168 self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
171 return int (self.size)
174 + def __next__(self):
175 if self.count == self.size:
179 "Print a std::map or std::multimap"
181 # Turn an RbtreeIterator into a pretty-print iterator.
183 + class _iter(Iterator):
184 def __init__(self, rbiter, type):
192 + def __next__(self):
193 if self.count % 2 == 0:
194 - n = self.rbiter.next()
195 + n = next(self.rbiter)
196 n = n.cast(self.type).dereference()['_M_value_field']
200 "Print a std::set or std::multiset"
202 # Turn an RbtreeIterator into a pretty-print iterator.
204 + class _iter(Iterator):
205 def __init__(self, rbiter, type):
213 - item = self.rbiter.next()
214 + def __next__(self):
215 + item = next(self.rbiter)
216 item = item.cast(self.type).dereference()['_M_value_field']
217 # FIXME: this is weird ... what to do?
218 # Maybe a 'set' display hint?
220 class StdDequePrinter:
224 + class _iter(Iterator):
225 def __init__(self, node, start, end, last, buffer_size):
233 + def __next__(self):
234 if self.p == self.last:
238 def display_hint (self):
241 -class Tr1HashtableIterator:
242 +class Tr1HashtableIterator(Iterator):
243 def __init__ (self, hash):
244 self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
245 self.node_type = find_type(hash.type, '__node_type').pointer()
251 + def __next__ (self):
254 node = self.node.cast(self.node_type)
259 - counter = itertools.imap (self.format_count, itertools.count())
260 - return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
261 + counter = imap (self.format_count, itertools.count())
262 + return izip (counter, Tr1HashtableIterator (self.hashtable()))
264 class Tr1UnorderedMapPrinter:
265 "Print a tr1::unordered_map"
266 @@ -688,11 +732,11 @@
270 - counter = itertools.imap (self.format_count, itertools.count())
271 + counter = imap (self.format_count, itertools.count())
272 # Map over the hash table and flatten the result.
273 - data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
274 + data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
275 # Zip the two iterators together.
276 - return itertools.izip (counter, data)
277 + return izip (counter, data)
279 def display_hint (self):
282 class StdForwardListPrinter:
283 "Print a std::forward_list"
286 + class _iterator(Iterator):
287 def __init__(self, nodetype, head):
288 self.nodetype = nodetype
289 self.base = head['_M_next']
295 + def __next__(self):
298 elt = self.base.cast(self.nodetype).dereference()
300 # A small sanity check.
302 if not self.compiled_rx.match(name + '<>'):
303 - raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
304 + raise ValueError('libstdc++ programming error: "%s" does not match' % name)
305 printer = RxPrinter(name, function)
306 self.subprinters.append(printer)
307 self.lookup[name] = printer
308 Index: libstdc++-v3/scripts/run_doxygen
309 ===================================================================
310 --- libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release) (revision 217117)
311 +++ libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch) (revision 217117)
316 - # Also drop in the header file and style sheet
317 - doxygen -w latex header.tex doxygen.sty
318 + # Grrr, Doxygen 1.8.x changed the -w latex options.
319 + need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
321 + # Also drop in the header file (maybe footer file) and style sheet
322 + if $need_footer; then
323 + doxygen -w latex header.tex footer.tex doxygen.sty
325 + doxygen -w latex header.tex doxygen.sty
329 echo :: LaTeX pages begin with
330 Index: libstdc++-v3/doc/xml/manual/containers.xml
331 ===================================================================
332 --- libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release) (revision 217117)
333 +++ libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch) (revision 217117)
335 <section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
338 - Yes it is, and that's okay. This is a decision that we preserved
339 - when we imported SGI's STL implementation. The following is
340 + Yes it is, and that was okay until the 2011 edition of the C++ standard.
341 + In future GCC will change it to O(1) but O(N) was a decision that we
342 + preserved when we imported SGI's STL implementation. The following is
343 quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
350 -<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
351 -<?dbhtml filename="vector.html"?>
355 - <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
358 - In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
359 - message to the list</link>, Daniel Kostecky announced work on an
360 - alternate form of <code>std::vector</code> that would support
361 - hints on the number of elements to be over-allocated. The design
362 - was also described, along with possible implementation choices.
365 - 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>
366 - and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
369 - </section></section>
372 <!-- Sect1 02 : Associative -->
373 Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
374 ===================================================================
375 --- libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release) (revision 217117)
376 +++ libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch) (revision 217117)
377 @@ -226,10 +226,12 @@
381 + <?dbhtml bgcolor="#B0B0B0" ?>
382 <entry>18.8.6</entry>
383 <entry><code>nested_exception</code></entry>
386 + <entry>Partial</entry>
387 + <entry>Follows an earlier C++0x draft, not the final specification.
392 @@ -612,10 +614,11 @@
396 + <?dbhtml bgcolor="#B0B0B0" ?>
397 <entry>20.6.12.4</entry>
398 <entry><code>uninitialized_fill_n</code></entry>
401 + <entry>Partial</entry>
402 + <entry>Returns <code>void</code>.</entry>
405 <entry>20.6.13</entry>
406 @@ -1119,10 +1122,13 @@
410 + <?dbhtml bgcolor="#B0B0B0" ?>
412 <entry>Class template <code>basic_string</code></entry>
415 + <entry>Partial</entry>
416 + <entry>Non-conforming Copy-On-Write implementation.
417 + Missing <code>getline</code> overloads for rvalue streams.
422 @@ -1190,10 +1196,11 @@
426 + <?dbhtml bgcolor="#B0B0B0" ?>
427 <entry>22.3.3.1</entry>
428 <entry>Character classification</entry>
431 + <entry>Partial</entry>
432 + <entry>Missing <code>isblank</code>.</entry>
435 <entry>22.3.3.2</entry>
436 @@ -1272,16 +1279,18 @@
440 + <?dbhtml bgcolor="#B0B0B0" ?>
441 <entry>22.4.5.1</entry>
442 <entry>Class template <code>time_get</code></entry>
445 + <entry>Partial</entry>
446 + <entry>Missing <code>get</code> and <code>do_get</code></entry>
449 + <?dbhtml bgcolor="#B0B0B0" ?>
450 <entry>22.4.5.2</entry>
451 <entry>Class template <code>time_get_byname</code></entry>
454 + <entry>Partial</entry>
455 + <entry>Likewise</entry>
458 <entry>22.4.5.3</entry>
459 @@ -1434,8 +1443,10 @@
460 <entry>23.3.5</entry>
461 <entry>Class template <code>list</code></entry>
462 <entry>Partial</entry>
463 - <entry><code>insert</code> and <code>erase</code> members do not
464 - take <code>const_iterator</code> arguments (N2350).</entry>
466 + <code>insert</code> and <code>erase</code> members do not
467 + take <code>const_iterator</code> arguments (N2350).
471 <?dbhtml bgcolor="#B0B0B0" ?>
472 @@ -1650,10 +1661,11 @@
476 + <?dbhtml bgcolor="#B0B0B0" ?>
478 <entry>Mutating sequence operations</entry>
481 + <entry>Partial</entry>
482 + <entry><code>rotate</code> returns <code>void</code>.</entry>
486 @@ -2060,10 +2072,13 @@
490 + <?dbhtml bgcolor="#B0B0B0" ?>
492 <entry>C Library</entry>
495 + <entry>Partial</entry>
496 + <entry><code><ctgmath></code> doesn't include
497 + <code><ccomplex></code>
502 @@ -2143,6 +2158,7 @@
503 Missing move and swap operations on <code>basic_ios</code>.
504 Missing <code>io_errc</code> and <code>iostream_category</code>.
505 <code>ios_base::failure</code> is not derived from <code>system_error</code>.
506 + Missing <code>ios_base::hexfloat</code>.
510 Index: libstdc++-v3/doc/html/index.html
511 ===================================================================
512 --- libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release) (revision 217117)
513 +++ libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch) (revision 217117)
515 </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.
518 -</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.
519 +</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.
522 </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.
525 </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
526 <acronym class="acronym">GNU</acronym> General Public License version 3
527 - </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>
528 \ No newline at end of file
529 + </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>
530 Index: libstdc++-v3/doc/html/manual/status.html
531 ===================================================================
532 --- libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release) (revision 217117)
533 +++ libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch) (revision 217117)
535 <code class="code">set_new_handler</code> is not thread-safe.
536 </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>.
537 <code class="code">set_terminate</code> is not thread-safe.
538 - </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">
539 + </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.
540 + </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">
541 <span class="emphasis"><em>19</em></span>
542 </td><td colspan="3" align="left">
543 <span class="emphasis"><em>Diagnostics</em></span>
545 <span class="emphasis"><em>20</em></span>
546 </td><td colspan="3" align="left">
547 <span class="emphasis"><em>General utilities</em></span>
548 - </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"><memory></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">
549 + </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"><memory></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">
552 <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
553 @@ -187,14 +188,16 @@
554 <span class="emphasis"><em>21</em></span>
555 </td><td colspan="3" align="left">
556 <span class="emphasis"><em>Strings</em></span>
557 - </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<char></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<char16_t></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<char32_t></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<wchar_t></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.
558 + </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<char></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<char16_t></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<char32_t></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<wchar_t></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.
559 + Missing <code class="code">getline</code> overloads for rvalue streams.
560 + </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.
561 Missing <code class="filename"><cuchar></code>
562 </td></tr><tr><td align="left">
563 <span class="emphasis"><em>22</em></span>
564 </td><td colspan="3" align="left">
565 <span class="emphasis"><em>Localization</em></span>
566 - </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"><locale></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<char16_t></code> and
567 - <code class="code">codecvt<char32_t></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">
568 + </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"><locale></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<char16_t></code> and
569 + <code class="code">codecvt<char32_t></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">
570 <span class="emphasis"><em>23</em></span>
571 </td><td colspan="3" align="left">
572 <span class="emphasis"><em>Containers</em></span>
574 </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>
575 meet the requirements
576 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
577 - 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
578 - 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
579 + 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.
580 + <code class="code">insert</code> and <code class="code">erase</code> members do not
581 + take <code class="code">const_iterator</code> arguments (N2350).
582 + </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
583 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<bool></code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
584 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">
585 <span class="emphasis"><em>24</em></span>
586 @@ -212,11 +217,13 @@
587 <span class="emphasis"><em>25</em></span>
588 </td><td colspan="3" align="left">
589 <span class="emphasis"><em>Algorithms</em></span>
590 - </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">
591 + </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">
592 <span class="emphasis"><em>26</em></span>
593 </td><td colspan="3" align="left">
594 <span class="emphasis"><em>Numerics</em></span>
595 - </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"><random></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"><valarray></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"><numeric></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">
596 + </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"><random></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"><valarray></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"><numeric></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"><ctgmath></code> doesn't include
597 + <code class="code"><ccomplex></code>
598 + </td></tr><tr><td align="left">
599 <span class="emphasis"><em>27</em></span>
600 </td><td colspan="3" align="left">
601 <span class="emphasis"><em>Input/output library</em></span>
603 Missing move and swap operations on <code class="code">basic_ios</code>.
604 Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
605 <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
606 + Missing <code class="code">ios_base::hexfloat</code>.
607 </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">
608 Missing move and swap operations
609 Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
610 Index: libstdc++-v3/doc/html/manual/abi.html
611 ===================================================================
612 --- libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release) (revision 217117)
613 +++ libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch) (revision 217117)
615 definitions, where the version definition is the maximum for a
616 particular release. Labels are cumulative. If a particular release
617 is not listed, it has the same version labels as the preceding
618 - 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>
619 + 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>
620 Release versioning on the libstdc++.so binary, implemented in
621 the same way as the libgcc_s.so binary above. Listed is the
622 filename: <code class="constant">DT_SONAME</code> can be deduced from
624 has the same filename and <code class="constant">DT_SONAME</code> as the
626 </p><p>It is versioned as follows:
627 - </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>
628 + </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>
629 Note 1: Error should be libstdc++.so.3.0.3.
631 Note 2: Not strictly required.
633 GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
634 release.) If a particular release is not listed, it has the same
635 version labels as the preceding release.
636 - </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,
637 + </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,
638 __GXX_ABI_VERSION. This macro is defined as the version of the
639 compiler v3 ABI, with g++ 3.0 being version 100. This macro will
640 be automatically defined whenever g++ is used (the curious can
641 Index: libstdc++-v3/doc/html/manual/std_contents.html
642 ===================================================================
643 --- libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release) (revision 217117)
644 +++ libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch) (revision 217117)
646 </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.
649 -</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.
650 +</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.
653 </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.
655 </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.Â
658 -</td></tr></table></div></body></html>
659 \ No newline at end of file
660 +</td></tr></table></div></body></html>
661 Index: libstdc++-v3/doc/html/manual/containers.html
662 ===================================================================
663 --- libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release) (revision 217117)
664 +++ libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch) (revision 217117)
666 </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.Â
668 <a id="idm269999493408" class="indexterm"></a>
669 -</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>
670 - Yes it is, and that's okay. This is a decision that we preserved
671 - when we imported SGI's STL implementation. The following is
672 +</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>
673 + Yes it is, and that was okay until the 2011 edition of the C++ standard.
674 + In future GCC will change it to O(1) but O(N) was a decision that we
675 + preserved when we imported SGI's STL implementation. The following is
676 quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
677 </p><div class="blockquote"><blockquote class="blockquote"><p>
678 The size() member function, for list and slist, takes time
680 </p><pre class="programlisting">
683 - </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>
684 - </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>
685 - In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
686 - message to the list</a>, Daniel Kostecky announced work on an
687 - alternate form of <code class="code">std::vector</code> that would support
688 - hints on the number of elements to be over-allocated. The design
689 - was also described, along with possible implementation choices.
691 - 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>
692 - and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
693 - </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>
694 \ No newline at end of file
695 + </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>
696 Index: libstdc++-v3/doc/html/manual/index.html
697 ===================================================================
698 --- libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release) (revision 217117)
699 +++ libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch) (revision 217117)
701 </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.
704 -</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.
705 +</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.
708 </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.
710 </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.Â
713 -</td></tr></table></div></body></html>
714 \ No newline at end of file
715 +</td></tr></table></div></body></html>
716 Index: libstdc++-v3/include/std/future
717 ===================================================================
718 --- libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release) (revision 217117)
719 +++ libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch) (revision 217117)
720 @@ -351,12 +351,14 @@
722 _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
724 - bool __set = __ignore_failure;
725 + bool __set = false;
726 // all calls to this function are serialized,
727 // side-effects of invoking __res only happen once
728 call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
732 + _M_cond.notify_all();
733 + else if (!__ignore_failure)
734 __throw_future_error(int(future_errc::promise_already_satisfied));
738 lock_guard<mutex> __lock(_M_mutex);
739 _M_result.swap(__res);
741 - _M_cond.notify_all();
745 @@ -983,22 +984,25 @@
747 set_value(const _Res& __r)
749 + auto __future = _M_future;
750 auto __setter = _State::__setter(this, __r);
751 - _M_future->_M_set_result(std::move(__setter));
752 + __future->_M_set_result(std::move(__setter));
756 set_value(_Res&& __r)
758 + auto __future = _M_future;
759 auto __setter = _State::__setter(this, std::move(__r));
760 - _M_future->_M_set_result(std::move(__setter));
761 + __future->_M_set_result(std::move(__setter));
765 set_exception(exception_ptr __p)
767 + auto __future = _M_future;
768 auto __setter = _State::__setter(__p, this);
769 - _M_future->_M_set_result(std::move(__setter));
770 + __future->_M_set_result(std::move(__setter));
774 @@ -1081,15 +1085,17 @@
778 + auto __future = _M_future;
779 auto __setter = _State::__setter(this, __r);
780 - _M_future->_M_set_result(std::move(__setter));
781 + __future->_M_set_result(std::move(__setter));
785 set_exception(exception_ptr __p)
787 + auto __future = _M_future;
788 auto __setter = _State::__setter(__p, this);
789 - _M_future->_M_set_result(std::move(__setter));
790 + __future->_M_set_result(std::move(__setter));
794 @@ -1166,8 +1172,9 @@
796 set_exception(exception_ptr __p)
798 + auto __future = _M_future;
799 auto __setter = _State::__setter(__p, this);
800 - _M_future->_M_set_result(std::move(__setter));
801 + __future->_M_set_result(std::move(__setter));
805 @@ -1193,8 +1200,9 @@
807 promise<void>::set_value()
809 + auto __future = _M_future;
810 auto __setter = _State::__setter(this);
811 - _M_future->_M_set_result(std::move(__setter));
812 + __future->_M_set_result(std::move(__setter));
816 Index: libstdc++-v3/include/ext/rope
817 ===================================================================
818 --- libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release) (revision 217117)
819 +++ libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch) (revision 217117)
820 @@ -1544,7 +1544,7 @@
821 typedef typename _Base::allocator_type allocator_type;
822 using _Base::_M_tree_ptr;
823 using _Base::get_allocator;
824 - using _Base::_M_get_allocator;
825 + using _Base::_M_get_allocator;
826 typedef __GC_CONST _CharT* _Cstrptr;
828 static _CharT _S_empty_c_str[1];
829 @@ -1876,8 +1876,9 @@
830 const allocator_type& __a = allocator_type())
833 - this->_M_tree_ptr = (0 == __len) ?
834 - 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
835 + this->_M_tree_ptr = (0 == __len)
837 + : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
840 rope(const rope& __x, const allocator_type& __a = allocator_type())
841 Index: libstdc++-v3/include/bits/stl_tree.h
842 ===================================================================
843 --- libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release) (revision 217117)
844 +++ libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch) (revision 217117)
845 @@ -510,11 +510,11 @@
849 - { return static_cast<_Link_type>(&this->_M_impl._M_header); }
850 + { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
854 - { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
855 + { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
857 static const_reference
858 _S_value(_Const_Link_type __x)
859 Index: libstdc++-v3/include/tr2/bool_set
860 ===================================================================
861 --- libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release) (revision 217117)
862 +++ libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch) (revision 217117)
866 * See N2136, Bool_set: multi-valued logic
867 - * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
868 + * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
870 * The implicit conversion to bool is slippery! I may use the new
871 * explicit conversion. This has been specialized in the language
872 Index: libstdc++-v3/ChangeLog
873 ===================================================================
874 --- libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
875 +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
877 +2014-10-15 Jason Merrill <jason@redhat.com>
879 + * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
880 + dynamic_cast more gracefully.
882 +2014-10-14 Kai Tietz <ktietz@redhat.com>
885 + * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
886 + Define to avoid leak.
887 + * config/os/mingw32-w64/os_defines.h: Likewise.
889 +2014-10-03 Jonathan Wakely <jwakely@redhat.com>
892 + * doc/xml/manual/containers.xml: Remove outdated section. Update
894 + * doc/html/*: Regenerate.
896 +2014-10-01 Jonathan Wakely <jwakely@redhat.com>
898 + * doc/xml/manual/status_cxx2011.xml: Corrections.
899 + * doc/html/manual/status.html: Regenerate.
901 +2014-08-28 Samuel Bronson <naesten@gmail.com>
903 + Backport r212453 from trunk
904 + 2014-07-11 Samuel Bronson <naesten@gmail.com>
905 + Matthias Klose <doko@ubuntu.com>
908 + * python/libstdcxx/v6/printers.py: Port to Python 2+3
909 + (imap): New compat function.
911 + (Iterator): New mixin to allow writing iterators in Python 3 style
912 + regardless of which version we're running on.
913 + [Python3] (long) New compat alias for "int".
914 + * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
916 + Backport r210625 from trunk
917 + 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
919 + * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
921 +2014-08-26 John David Anglin <danglin@gcc.gnu.org>
923 + * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
925 +2014-08-26 Jonathan Wakely <jwakely@redhat.com>
927 + * doc/xml/manual/status_cxx2011.xml: Correct status table.
928 + * doc/html/manual/*: Regenerate.
930 +2014-08-04 Jonathan Wakely <jwakely@redhat.com>
932 + Backported from mainline
933 + 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
936 + * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
937 + const allocator_type&)): Pass non-const allocator to
938 + _S_new_RopeFunction.
939 + * testsuite/ext/rope/61946.cc: New.
941 +2014-08-04 Zifei Tong <zifeitong@gmail.com>
943 + * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
944 + _GLIBCXX_ prefix to macro.
946 +2014-06-03 Jonathan Wakely <jwakely@redhat.com>
948 + Backport from mainline
949 + 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
952 + * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
954 + Backport from mainline
955 + 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
958 + * include/std/future (__future_base::_State_baseV2::_M_set_result):
959 + Signal condition variable after call_once returns.
960 + (__future_base::_State_baseV2::_M_do_set): Do not signal here.
961 + (promise::set_value, promise::set_exception): Increment the reference
962 + count on the shared state until the function returns.
963 + * testsuite/30_threads/promise/60966.cc: New.
965 +2014-05-29 Jonathan Wakely <jwakely@redhat.com>
967 + * include/tr2/bool_set: Use UTF-8 for accented characters.
968 + * scripts/run_doxygen: Handle Doxygen 1.8.x change.
970 2014-05-22 Release Manager
972 * GCC 4.8.3 released.
973 Index: libstdc++-v3/libsupc++/atexit_thread.cc
974 ===================================================================
975 --- libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release) (revision 217117)
976 +++ libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch) (revision 217117)
979 #include "bits/gthr.h"
981 -#if HAVE___CXA_THREAD_ATEXIT_IMPL
982 +#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
984 extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
987 return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
990 -#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
991 +#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
994 // One element in a singly-linked stack of cleanups.
999 -#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1000 +#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1001 Index: libstdc++-v3/libsupc++/dyncast.cc
1002 ===================================================================
1003 --- libstdc++-v3/libsupc++/dyncast.cc (.../tags/gcc_4_8_3_release) (revision 217117)
1004 +++ libstdc++-v3/libsupc++/dyncast.cc (.../branches/gcc-4_8-branch) (revision 217117)
1006 adjust_pointer <void> (src_ptr, prefix->whole_object);
1007 const __class_type_info *whole_type = prefix->whole_type;
1008 __class_type_info::__dyncast_result result;
1010 + // If the whole object vptr doesn't refer to the whole object type, we're
1011 + // in the middle of constructing a primary base, and src is a separate
1012 + // base. This has undefined behavior and we can't find anything outside
1013 + // of the base we're actually constructing, so fail now rather than
1014 + // segfault later trying to use a vbase offset that doesn't exist.
1015 + const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
1016 + const vtable_prefix *whole_prefix =
1017 + adjust_pointer <vtable_prefix> (whole_vtable,
1018 + -offsetof (vtable_prefix, origin));
1019 + if (whole_prefix->whole_type != whole_type)
1022 whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
1023 dst_type, whole_ptr, src_type, src_ptr, result);
1024 Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1025 ===================================================================
1026 --- libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release) (revision 0)
1027 +++ libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch) (revision 217117)
1029 +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1030 +// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1031 +// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1032 +// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1033 +// { dg-require-cstdint "" }
1034 +// { dg-require-gthreads "" }
1035 +// { dg-require-atomic-builtins "" }
1037 +// Copyright (C) 2014 Free Software Foundation, Inc.
1039 +// This file is part of the GNU ISO C++ Library. This library is free
1040 +// software; you can redistribute it and/or modify it under the
1041 +// terms of the GNU General Public License as published by the
1042 +// Free Software Foundation; either version 3, or (at your option)
1043 +// any later version.
1045 +// This library is distributed in the hope that it will be useful,
1046 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1047 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1048 +// GNU General Public License for more details.
1050 +// You should have received a copy of the GNU General Public License along
1051 +// with this library; see the file COPYING3. If not see
1052 +// <http://www.gnu.org/licenses/>.
1055 +// This test hangs if std::promise::~promise() destroys the
1056 +// shared state before std::promise::set_value() finishes using it.
1062 +const int THREADS = 10;
1064 +void run_task(std::promise<void>* pr)
1066 + std::this_thread::sleep_for(std::chrono::milliseconds(100));
1072 + std::vector<std::promise<void>*> tasks(THREADS);
1073 + std::vector<std::thread> threads(THREADS);
1074 + std::vector<std::future<void>> futures(THREADS);
1076 + for (int i = 0; i < THREADS; ++i)
1078 + std::promise<void>* task = new std::promise<void>;
1080 + futures[i] = task->get_future();
1081 + threads[i] = std::thread(run_task, task);
1084 + for (int i = 0; i < THREADS; ++i)
1086 + // the temporary future releases the state as soon as wait() returns
1087 + std::future<void>(std::move(futures[i])).wait();
1088 + // state is ready, should now be safe to delete promise, so it
1089 + // releases the shared state too
1093 + for (auto& t : threads)
1096 Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1097 ===================================================================
1098 --- libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release) (revision 0)
1099 +++ libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch) (revision 217117)
1101 +// Copyright (C) 2014 Free Software Foundation, Inc.
1103 +// This file is part of the GNU ISO C++ Library. This library is free
1104 +// software; you can redistribute it and/or modify it under the
1105 +// terms of the GNU General Public License as published by the
1106 +// Free Software Foundation; either version 3, or (at your option)
1107 +// any later version.
1109 +// This library is distributed in the hope that it will be useful,
1110 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1111 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1112 +// GNU General Public License for more details.
1114 +// You should have received a copy of the GNU General Public License along
1115 +// with this library; see the file COPYING3. If not see
1116 +// <http://www.gnu.org/licenses/>.
1118 +// { dg-do compile }
1120 +#include <ext/rope>
1122 +struct empty_char_prod : __gnu_cxx::char_producer<char>
1124 + virtual void operator()(size_t, size_t, char*) {}
1129 + empty_char_prod* ecp = new empty_char_prod;
1130 + __gnu_cxx::crope excrope( ecp, 10L, true );
1132 Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1133 ===================================================================
1134 --- libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release) (revision 217117)
1135 +++ libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch) (revision 217117)
1140 - set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1141 + set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1143 if {!$do_whatis_tests} {
1144 send_log "skipping 'whatis' tests - gdb too old"
1146 # but not earlier versions.
1147 # Return 1 if the version is ok, 0 otherwise.
1148 proc gdb_version_check {} {
1149 - return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1150 + return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1151 "<built-in function lookup_global_symbol>"]
1153 Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
1154 ===================================================================
1155 --- libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../tags/gcc_4_8_3_release) (revision 217117)
1156 +++ libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../branches/gcc-4_8-branch) (revision 217117)
1158 #define _GLIBCXX_LLP64 1
1161 +// See libstdc++/59807
1162 +#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1165 Index: libstdc++-v3/config/os/mingw32/os_defines.h
1166 ===================================================================
1167 --- libstdc++-v3/config/os/mingw32/os_defines.h (.../tags/gcc_4_8_3_release) (revision 217117)
1168 +++ libstdc++-v3/config/os/mingw32/os_defines.h (.../branches/gcc-4_8-branch) (revision 217117)
1170 #define _GLIBCXX_LLP64 1
1173 +// See libstdc++/59807
1174 +#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1177 Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1178 ===================================================================
1179 --- libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release) (revision 217117)
1180 +++ libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch) (revision 217117)
1182 FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1183 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1184 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1185 +FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1186 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1187 FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1188 FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1190 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1191 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1192 FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1193 +FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1194 +FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1195 FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1196 FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1197 FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1198 @@ -1204,6 +1207,7 @@
1199 FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1200 FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1201 FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1202 +FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1203 FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1204 FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1205 FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1206 @@ -1471,6 +1475,11 @@
1207 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1208 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1209 FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1210 +FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1211 +FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1212 +FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1213 +FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1214 +FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1215 FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1216 FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1217 FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1218 @@ -1900,6 +1909,8 @@
1219 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1220 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1221 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1222 +FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1223 +FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1224 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1225 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1226 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1227 @@ -2436,6 +2447,7 @@
1228 FUNC:__cxa_guard_release@@CXXABI_1.3
1229 FUNC:__cxa_pure_virtual@@CXXABI_1.3
1230 FUNC:__cxa_rethrow@@CXXABI_1.3
1231 +FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1232 FUNC:__cxa_throw@@CXXABI_1.3
1233 FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1234 FUNC:__cxa_vec_cctor@@CXXABI_1.3
1235 @@ -2482,6 +2494,7 @@
1236 OBJECT:0:CXXABI_1.3.4
1237 OBJECT:0:CXXABI_1.3.5
1238 OBJECT:0:CXXABI_1.3.6
1239 +OBJECT:0:CXXABI_1.3.7
1240 OBJECT:0:CXXABI_TM_1
1241 OBJECT:0:GLIBCXX_3.4
1242 OBJECT:0:GLIBCXX_3.4.1
1243 @@ -2493,6 +2506,8 @@
1244 OBJECT:0:GLIBCXX_3.4.15
1245 OBJECT:0:GLIBCXX_3.4.16
1246 OBJECT:0:GLIBCXX_3.4.17
1247 +OBJECT:0:GLIBCXX_3.4.18
1248 +OBJECT:0:GLIBCXX_3.4.19
1249 OBJECT:0:GLIBCXX_3.4.2
1250 OBJECT:0:GLIBCXX_3.4.3
1251 OBJECT:0:GLIBCXX_3.4.4
1252 @@ -2992,6 +3007,8 @@
1253 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1254 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1255 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1256 +OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1257 +OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1258 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1259 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1260 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1262 ===================================================================
1263 --- configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
1264 +++ configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
1265 @@ -1154,6 +1154,9 @@
1267 host_makefile_frag="config/mh-mingw"
1270 + host_makefile_frag="config/mh-alpha-linux"
1273 host_makefile_frag="config/mh-pa-hpux10"
1276 ===================================================================
1277 --- ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
1278 +++ ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
1280 +2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1283 + * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1284 + * configure: Regenerate.
1286 2014-05-22 Release Manager
1288 * GCC 4.8.3 released.
1289 Index: contrib/ChangeLog
1290 ===================================================================
1291 --- contrib/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
1292 +++ contrib/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
1294 +2014-07-07 Richard Biener <rguenther@suse.de>
1296 + * gennews: Use gcc-3.0/index.html.
1298 2014-05-22 Release Manager
1300 * GCC 4.8.3 released.
1301 Index: contrib/gennews
1302 ===================================================================
1303 --- contrib/gennews (.../tags/gcc_4_8_3_release) (revision 217117)
1304 +++ contrib/gennews (.../branches/gcc-4_8-branch) (revision 217117)
1306 gcc-3.3/index.html gcc-3.3/changes.html
1307 gcc-3.2/index.html gcc-3.2/changes.html
1308 gcc-3.1/index.html gcc-3.1/changes.html
1309 - gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1310 + gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1311 gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
1312 egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
1313 egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
1314 Index: config/mh-alpha-linux
1315 ===================================================================
1316 --- config/mh-alpha-linux (.../tags/gcc_4_8_3_release) (revision 0)
1317 +++ config/mh-alpha-linux (.../branches/gcc-4_8-branch) (revision 217117)
1319 +# Prevent GPREL16 relocation truncation
1320 +LDFLAGS += -Wl,--no-relax
1321 +BOOT_LDFLAGS += -Wl,--no-relax
1322 Index: config/ChangeLog
1323 ===================================================================
1324 --- config/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
1325 +++ config/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
1327 +2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1330 + * mh-alpha-linux: New file.
1332 2014-05-22 Release Manager
1334 * GCC 4.8.3 released.
1335 Index: libjava/classpath
1336 ===================================================================
1337 --- libjava/classpath (.../tags/gcc_4_8_3_release) (revision 217117)
1338 +++ libjava/classpath (.../branches/gcc-4_8-branch) (revision 217117)
1340 Property changes on: libjava/classpath
1341 ___________________________________________________________________
1342 Modified: svn:mergeinfo
1343 Merged /trunk/libjava/classpath:r211733,215049
1345 ===================================================================
1346 --- configure (.../tags/gcc_4_8_3_release) (revision 217117)
1347 +++ configure (.../branches/gcc-4_8-branch) (revision 217117)
1348 @@ -3834,6 +3834,9 @@
1350 host_makefile_frag="config/mh-mingw"
1353 + host_makefile_frag="config/mh-alpha-linux"
1356 host_makefile_frag="config/mh-pa-hpux10"
1358 Index: libgcc/ChangeLog
1359 ===================================================================
1360 --- libgcc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
1361 +++ libgcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
1363 +2014-10-26 John David Anglin <danglin@gcc.gnu.org>
1365 + * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
1366 + (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
1367 + memory read accesses are ok.
1369 +2014-09-18 Joseph Myers <joseph@codesourcery.com>
1371 + * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
1372 + bits not set bits as indicating trapping exceptions.
1374 2014-05-22 Release Manager
1376 * GCC 4.8.3 released.
1377 Index: libgcc/config/i386/sfp-machine.h
1378 ===================================================================
1379 --- libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release) (revision 217117)
1380 +++ libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch) (revision 217117)
1382 __sfp_handle_exceptions (_fex); \
1385 -#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1386 +#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1388 #define FP_ROUNDMODE (_fcw & FP_RND_MASK)
1390 Index: libgcc/config/pa/linux-unwind.h
1391 ===================================================================
1392 --- libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release) (revision 217117)
1393 +++ libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch) (revision 217117)
1396 #include <sys/ucontext.h>
1398 +/* Return TRUE if read access to *P is allowed. */
1401 +pa32_read_access_ok (void *p)
1405 + __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
1409 /* Unfortunately, because of various bugs and changes to the kernel,
1410 we have several cases to deal with.
1413 tell us how to locate the sigcontext structure.
1415 Note that with a 2.4 64-bit kernel, the signal context is not properly
1416 - passed back to userspace so the unwind will not work correctly. */
1417 + passed back to userspace so the unwind will not work correctly.
1419 + There is also a bug in various glibc versions. The (CONTEXT)->ra
1420 + for the outermost frame is not marked as undefined, so we need to
1421 + check whether read access is allowed for all the accesses used in
1422 + searching for the signal trampoline. */
1424 #define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
1426 static _Unwind_Reason_Code
1428 e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
1431 - if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
1432 + if (pa32_read_access_ok (pc)
1433 + && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1435 - else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
1436 + else if (pa32_read_access_ok (&pc[4])
1437 + && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
1442 - else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
1443 + else if (pa32_read_access_ok (&pc[5])
1444 + && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
1448 @@ -96,13 +115,16 @@
1449 word boundary and we can then determine the frame offset. */
1450 sp = (unsigned long)context->ra;
1451 pc = (unsigned int *)sp;
1452 - if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
1454 + && pa32_read_access_ok (pc)
1455 + && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1458 return _URC_END_OF_STACK;
1461 - if (pc[1] != 0x3414015a
1462 + if (!pa32_read_access_ok (&pc[3])
1463 + || pc[1] != 0x3414015a
1464 || pc[2] != 0xe4008200
1465 || pc[3] != 0x08000240)
1466 return _URC_END_OF_STACK;
1467 Index: gcc/doc/sourcebuild.texi
1468 ===================================================================
1469 --- gcc/doc/sourcebuild.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1470 +++ gcc/doc/sourcebuild.texi (.../branches/gcc-4_8-branch) (revision 217117)
1471 @@ -1299,6 +1299,9 @@
1473 Target has @code{double} that is 64 bits or longer.
1475 +@item longdouble128
1476 +Target has 128-bit @code{long double}.
1479 Target has @code{int} that is at 32 bits or longer.
1481 Index: gcc/doc/extend.texi
1482 ===================================================================
1483 --- gcc/doc/extend.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1484 +++ gcc/doc/extend.texi (.../branches/gcc-4_8-branch) (revision 217117)
1486 This is more friendly to code living in shared libraries, as it reduces
1487 the number of dynamic relocations that are needed, and by consequence,
1488 allows the data to be read-only.
1489 +This alternative with label differences is not supported for the AVR target,
1490 +please use the first approach for AVR programs.
1492 The @code{&&foo} expressions for the same label might have different
1493 values if the containing function is inlined or cloned. If a program
1494 @@ -10490,7 +10492,7 @@
1498 -v32qi __builtin_ia32_mpsadbw256 (v32qi,v32qi,v32qi,int)
1499 +v32qi __builtin_ia32_mpsadbw256 (v32qi,v32qi,int)
1500 v32qi __builtin_ia32_pabsb256 (v32qi)
1501 v16hi __builtin_ia32_pabsw256 (v16hi)
1502 v8si __builtin_ia32_pabsd256 (v8si)
1503 @@ -10725,8 +10727,8 @@
1505 v2df __builtin_ia32_vfrczpd (v2df)
1506 v4sf __builtin_ia32_vfrczps (v4sf)
1507 -v2df __builtin_ia32_vfrczsd (v2df, v2df)
1508 -v4sf __builtin_ia32_vfrczss (v4sf, v4sf)
1509 +v2df __builtin_ia32_vfrczsd (v2df)
1510 +v4sf __builtin_ia32_vfrczss (v4sf)
1511 v4df __builtin_ia32_vfrczpd256 (v4df)
1512 v8sf __builtin_ia32_vfrczps256 (v8sf)
1513 v2di __builtin_ia32_vpcmov (v2di, v2di, v2di)
1514 @@ -11855,8 +11857,6 @@
1515 uint64_t __builtin_ppc_get_timebase ();
1516 unsigned long __builtin_ppc_mftb ();
1517 double __builtin_unpack_longdouble (long double, int);
1518 -double __builtin_longdouble_dw0 (long double);
1519 -double __builtin_longdouble_dw1 (long double);
1520 long double __builtin_pack_longdouble (double, double);
1523 Index: gcc/doc/tm.texi
1524 ===================================================================
1525 --- gcc/doc/tm.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1526 +++ gcc/doc/tm.texi (.../branches/gcc-4_8-branch) (revision 217117)
1527 @@ -3930,6 +3930,13 @@
1528 @c above is overfull. not sure what to do. --mew 5feb93 did
1529 @c something, not sure if it looks good. --mew 10feb93
1531 +@defmac INCOMING_REG_PARM_STACK_SPACE (@var{fndecl})
1532 +Like @code{REG_PARM_STACK_SPACE}, but for incoming register arguments.
1533 +Define this macro if space guaranteed when compiling a function body
1534 +is different to space required when making a call, a situation that
1535 +can arise with K&R style function definitions.
1538 @defmac OUTGOING_REG_PARM_STACK_SPACE (@var{fntype})
1539 Define this to a nonzero value if it is the responsibility of the
1540 caller to allocate the area reserved for arguments passed in registers
1541 Index: gcc/doc/tm.texi.in
1542 ===================================================================
1543 --- gcc/doc/tm.texi.in (.../tags/gcc_4_8_3_release) (revision 217117)
1544 +++ gcc/doc/tm.texi.in (.../branches/gcc-4_8-branch) (revision 217117)
1545 @@ -3898,6 +3898,13 @@
1546 @c above is overfull. not sure what to do. --mew 5feb93 did
1547 @c something, not sure if it looks good. --mew 10feb93
1549 +@defmac INCOMING_REG_PARM_STACK_SPACE (@var{fndecl})
1550 +Like @code{REG_PARM_STACK_SPACE}, but for incoming register arguments.
1551 +Define this macro if space guaranteed when compiling a function body
1552 +is different to space required when making a call, a situation that
1553 +can arise with K&R style function definitions.
1556 @defmac OUTGOING_REG_PARM_STACK_SPACE (@var{fntype})
1557 Define this to a nonzero value if it is the responsibility of the
1558 caller to allocate the area reserved for arguments passed in registers
1559 Index: gcc/doc/invoke.texi
1560 ===================================================================
1561 --- gcc/doc/invoke.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1562 +++ gcc/doc/invoke.texi (.../branches/gcc-4_8-branch) (revision 217117)
1565 -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol
1566 -mtls-dialect=desc -mtls-dialect=traditional @gol
1567 +-mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 @gol
1568 -march=@var{name} -mcpu=@var{name} -mtune=@var{name}}
1570 @emph{Adapteva Epiphany Options}
1571 @@ -1009,6 +1010,7 @@
1572 -ffixed-@var{reg} -fexceptions @gol
1573 -fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
1574 -fasynchronous-unwind-tables @gol
1575 +-fno-gnu-unique @gol
1576 -finhibit-size-directive -finstrument-functions @gol
1577 -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
1578 -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
1579 @@ -10933,6 +10935,14 @@
1580 Use traditional TLS as the thread-local storage mechanism for dynamic accesses
1583 +@item -mfix-cortex-a53-835769
1584 +@itemx -mno-fix-cortex-a53-835769
1585 +@opindex -mfix-cortex-a53-835769
1586 +@opindex -mno-fix-cortex-a53-835769
1587 +Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769.
1588 +This will involve inserting a NOP instruction between memory instructions and
1589 +64-bit integer multiply-accumulate instructions.
1591 @item -march=@var{name}
1593 Specify the name of the target architecture, optionally suffixed by one or
1594 @@ -11271,8 +11281,8 @@
1596 @option{-march=native} causes the compiler to auto-detect the architecture
1597 of the build computer. At present, this feature is only supported on
1598 -Linux, and not all architectures are recognized. If the auto-detect is
1599 -unsuccessful the option has no effect.
1600 +GNU/Linux, and not all architectures are recognized. If the auto-detect
1601 +is unsuccessful the option has no effect.
1603 @item -mtune=@var{name}
1605 @@ -11317,7 +11327,7 @@
1607 @option{-mtune=native} causes the compiler to auto-detect the CPU
1608 of the build computer. At present, this feature is only supported on
1609 -Linux, and not all architectures are recognized. If the auto-detect is
1610 +GNU/Linux, and not all architectures are recognized. If the auto-detect is
1611 unsuccessful the option has no effect.
1613 @item -mcpu=@var{name}
1614 @@ -11338,8 +11348,8 @@
1616 @option{-mcpu=native} causes the compiler to auto-detect the CPU
1617 of the build computer. At present, this feature is only supported on
1618 -Linux, and not all architectures are recognized. If the auto-detect is
1619 -unsuccessful the option has no effect.
1620 +GNU/Linux, and not all architectures are recognized. If the auto-detect
1621 +is unsuccessful the option has no effect.
1623 @item -mfpu=@var{name}
1625 @@ -12479,7 +12489,7 @@
1628 Enable kernel development mode. The @option{-mkernel} option sets
1629 -@option{-static}, @option{-fno-common}, @option{-fno-cxa-atexit},
1630 +@option{-static}, @option{-fno-common}, @option{-fno-use-cxa-atexit},
1631 @option{-fno-exceptions}, @option{-fno-non-call-exceptions},
1632 @option{-fapple-kext}, @option{-fno-weak} and @option{-fno-rtti} where
1633 applicable. This mode also sets @option{-mno-altivec},
1634 @@ -18707,6 +18717,72 @@
1636 Generate code for the SH4.
1640 +Generate code for SH4-100.
1642 +@item -m4-100-nofpu
1643 +@opindex m4-100-nofpu
1644 +Generate code for SH4-100 in such a way that the
1645 +floating-point unit is not used.
1647 +@item -m4-100-single
1648 +@opindex m4-100-single
1649 +Generate code for SH4-100 assuming the floating-point unit is in
1650 +single-precision mode by default.
1652 +@item -m4-100-single-only
1653 +@opindex m4-100-single-only
1654 +Generate code for SH4-100 in such a way that no double-precision
1655 +floating-point operations are used.
1659 +Generate code for SH4-200.
1661 +@item -m4-200-nofpu
1662 +@opindex m4-200-nofpu
1663 +Generate code for SH4-200 without in such a way that the
1664 +floating-point unit is not used.
1666 +@item -m4-200-single
1667 +@opindex m4-200-single
1668 +Generate code for SH4-200 assuming the floating-point unit is in
1669 +single-precision mode by default.
1671 +@item -m4-200-single-only
1672 +@opindex m4-200-single-only
1673 +Generate code for SH4-200 in such a way that no double-precision
1674 +floating-point operations are used.
1678 +Generate code for SH4-300.
1680 +@item -m4-300-nofpu
1681 +@opindex m4-300-nofpu
1682 +Generate code for SH4-300 without in such a way that the
1683 +floating-point unit is not used.
1685 +@item -m4-300-single
1686 +@opindex m4-300-single
1687 +Generate code for SH4-300 in such a way that no double-precision
1688 +floating-point operations are used.
1690 +@item -m4-300-single-only
1691 +@opindex m4-300-single-only
1692 +Generate code for SH4-300 in such a way that no double-precision
1693 +floating-point operations are used.
1697 +Generate code for SH4-340 (no MMU, no FPU).
1701 +Generate code for SH4-500 (no FPU). Passes @option{-isa=sh4-nofpu} to the
1706 Generate code for the SH4al-dsp, or for a SH4a in such a way that the
1707 @@ -18732,6 +18808,33 @@
1708 @option{-dsp} to the assembler. GCC doesn't generate any DSP
1709 instructions at the moment.
1712 +@opindex m5-32media
1713 +Generate 32-bit code for SHmedia.
1715 +@item -m5-32media-nofpu
1716 +@opindex m5-32media-nofpu
1717 +Generate 32-bit code for SHmedia in such a way that the
1718 +floating-point unit is not used.
1721 +@opindex m5-64media
1722 +Generate 64-bit code for SHmedia.
1724 +@item -m5-64media-nofpu
1725 +@opindex m5-64media-nofpu
1726 +Generate 64-bit code for SHmedia in such a way that the
1727 +floating-point unit is not used.
1730 +@opindex m5-compact
1731 +Generate code for SHcompact.
1733 +@item -m5-compact-nofpu
1734 +@opindex m5-compact-nofpu
1735 +Generate code for SHcompact in such a way that the
1736 +floating-point unit is not used.
1740 Compile code for the processor in big-endian mode.
1741 @@ -18765,16 +18868,12 @@
1742 Enable the use of the instruction @code{fmovd}. Check @option{-mdalign} for
1743 alignment constraints.
1747 -Comply with the calling conventions defined by Renesas.
1752 Comply with the calling conventions defined by Renesas.
1756 +@opindex mno-renesas
1757 Comply with the calling conventions defined for GCC before the Renesas
1758 conventions were available. This option is the default for all
1759 targets of the SH toolchain.
1760 @@ -18782,12 +18881,12 @@
1763 Mark the @code{MAC} register as call-clobbered, even if
1764 -@option{-mhitachi} is given.
1765 +@option{-mrenesas} is given.
1772 Control the IEEE compliance of floating-point comparisons, which affects the
1773 handling of cases where the result of a comparison is unordered. By default
1774 @option{-mieee} is implicitly enabled. If @option{-ffinite-math-only} is
1775 @@ -18827,7 +18926,7 @@
1778 Disable compiler generated atomic sequences and emit library calls for atomic
1779 -operations. This is the default if the target is not @code{sh-*-linux*}.
1780 +operations. This is the default if the target is not @code{sh*-*-linux*}.
1783 Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
1784 @@ -18834,7 +18933,7 @@
1785 built-in functions. The generated atomic sequences require additional support
1786 from the interrupt/exception handling code of the system and are only suitable
1787 for SH3* and SH4* single-core systems. This option is enabled by default when
1788 -the target is @code{sh-*-linux*} and SH3* or SH4*. When the target is SH4A,
1789 +the target is @code{sh*-*-linux*} and SH3* or SH4*. When the target is SH4A,
1790 this option will also partially utilize the hardware atomic instructions
1791 @code{movli.l} and @code{movco.l} to create more efficient code, unless
1792 @samp{strict} is specified.
1793 @@ -18853,7 +18952,7 @@
1794 in privileged mode and is only suitable for single-core systems. Additional
1795 support from the interrupt/exception handling code of the system is not
1796 required. This model is enabled by default when the target is
1797 -@code{sh-*-linux*} and SH1* or SH2*.
1798 +@code{sh*-*-linux*} and SH1* or SH2*.
1801 Generate hardware atomic sequences using the @code{movli.l} and @code{movco.l}
1802 @@ -18888,10 +18987,6 @@
1803 processors the @code{tas.b} instruction must be used with caution since it
1804 can result in data corruption for certain cache configurations.
1808 -Optimize for space instead of speed. Implied by @option{-Os}.
1812 When generating position-independent code, emit function calls using
1813 @@ -18898,11 +18993,14 @@
1814 the Global Offset Table instead of the Procedure Linkage Table.
1817 +@itemx -mno-usermode
1819 -Don't generate privileged mode only code. This option
1820 -implies @option{-mno-inline-ic_invalidate}
1821 -if the inlined code would not work in user mode.
1822 -This is the default when the target is @code{sh-*-linux*}.
1823 +@opindex mno-usermode
1824 +Don't allow (allow) the compiler generating privileged mode code. Specifying
1825 +@option{-musermode} also implies @option{-mno-inline-ic_invalidate} if the
1826 +inlined code would not work in user mode. @option{-musermode} is the default
1827 +when the target is @code{sh*-*-linux*}. If the target is SH1* or SH2*
1828 +@option{-musermode} has no effect, since there is no user mode.
1830 @item -multcost=@var{number}
1831 @opindex multcost=@var{number}
1832 @@ -20357,6 +20455,20 @@
1833 table is exact at each instruction boundary, so it can be used for stack
1834 unwinding from asynchronous events (such as debugger or garbage collector).
1836 +@item -fno-gnu-unique
1837 +@opindex fno-gnu-unique
1838 +On systems with recent GNU assembler and C library, the C++ compiler
1839 +uses the @code{STB_GNU_UNIQUE} binding to make sure that definitions
1840 +of template static data members and static local variables in inline
1841 +functions are unique even in the presence of @code{RTLD_LOCAL}; this
1842 +is necessary to avoid problems with a library used by two different
1843 +@code{RTLD_LOCAL} plugins depending on a definition in one of them and
1844 +therefore disagreeing with the other one about the binding of the
1845 +symbol. But this causes @code{dlclose} to be ignored for affected
1846 +DSOs; if your program relies on reinitialization of a DSO via
1847 +@code{dlclose} and @code{dlopen}, you can use
1848 +@option{-fno-gnu-unique}.
1850 @item -fpcc-struct-return
1851 @opindex fpcc-struct-return
1852 Return ``short'' @code{struct} and @code{union} values in memory like
1853 Index: gcc/doc/md.texi
1854 ===================================================================
1855 --- gcc/doc/md.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1856 +++ gcc/doc/md.texi (.../branches/gcc-4_8-branch) (revision 217117)
1857 @@ -2081,6 +2081,18 @@
1859 If @option{-mmfpgpr} was used, a floating point register or NO_REGS.
1862 +Floating point register if direct moves are available, or NO_REGS.
1865 +FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.
1868 +FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.
1871 +FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.
1874 Floating point register if the LFIWAX instruction is enabled or NO_REGS.
1876 @@ -2112,7 +2124,7 @@
1877 Floating point register if the STFIWX instruction is enabled or NO_REGS.
1880 -VSX vector register to hold scalar float values or NO_REGS.
1881 +FP or VSX register to perform ISA 2.07 float ops or NO_REGS.
1884 Floating point register if the LFIWZX instruction is enabled or NO_REGS.
1885 Index: gcc/doc/install.texi
1886 ===================================================================
1887 --- gcc/doc/install.texi (.../tags/gcc_4_8_3_release) (revision 217117)
1888 +++ gcc/doc/install.texi (.../branches/gcc-4_8-branch) (revision 217117)
1889 @@ -2915,12 +2915,6 @@
1890 Solaris 2 (SPARC, Intel):
1893 -@uref{http://www.sunfreeware.com/,,Sunfreeware}
1896 -@uref{http://www.blastwave.org/,,Blastwave}
1899 @uref{http://www.opencsw.org/,,OpenCSW}
1902 @@ -2988,6 +2982,8 @@
1906 +@uref{#aarch64x-x-x,,aarch64*-*-*}
1908 @uref{#alpha-x-x,,alpha*-*-*}
1910 @uref{#alpha-dec-osf51,,alpha*-dec-osf5.1}
1911 @@ -3130,6 +3126,18 @@
1912 <!-- -------- host/target specific issues start here ---------------- -->
1916 +@heading @anchor{aarch64x-x-x}aarch64*-*-*
1917 +To enable a workaround for the Cortex-A53 erratum number 835769 by default
1918 +(for all CPUs regardless of -mcpu option given) at configure time use the
1919 +@option{--enable-fix-cortex-a53-835769} option. This will enable the fix by
1920 +default and can be explicitly disabled during during compilation by passing the
1921 +@option{-mno-fix-cortex-a53-835769} option. Conversely,
1922 +@option{--disable-fix-cortex-a53-835769} will disable the workaround by
1923 +default. The workaround is disabled by default if neither of
1924 +@option{--enable-fix-cortex-a53-835769} or
1925 +@option{--disable-fix-cortex-a53-835769} is given at configure time.
1927 @heading @anchor{alpha-x-x}alpha*-*-*
1929 This section contains general configuration information for all
1930 Index: gcc/tree-ssa-tail-merge.c
1931 ===================================================================
1932 --- gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release) (revision 217117)
1933 +++ gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch) (revision 217117)
1934 @@ -1060,6 +1060,24 @@
1938 +/* Return true if gimple operands T1 and T2 have the same value. */
1941 +gimple_operand_equal_value_p (tree t1, tree t2)
1946 + if (t1 == NULL_TREE
1947 + || t2 == NULL_TREE)
1950 + if (operand_equal_p (t1, t2, 0))
1953 + return gvn_uses_equal (t1, t2);
1956 /* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
1957 gimple_bb (s2) are members of SAME_SUCC. */
1959 @@ -1122,8 +1140,9 @@
1960 lhs2 = gimple_get_lhs (s2);
1961 if (TREE_CODE (lhs1) != SSA_NAME
1962 && TREE_CODE (lhs2) != SSA_NAME)
1963 - return (vn_valueize (gimple_vdef (s1))
1964 - == vn_valueize (gimple_vdef (s2)));
1965 + return (operand_equal_p (lhs1, lhs2, 0)
1966 + && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
1967 + gimple_assign_rhs1 (s2)));
1968 else if (TREE_CODE (lhs1) == SSA_NAME
1969 && TREE_CODE (lhs2) == SSA_NAME)
1970 return vn_valueize (lhs1) == vn_valueize (lhs2);
1971 Index: gcc/DATESTAMP
1972 ===================================================================
1973 --- gcc/DATESTAMP (.../tags/gcc_4_8_3_release) (revision 217117)
1974 +++ gcc/DATESTAMP (.../branches/gcc-4_8-branch) (revision 217117)
1979 ===================================================================
1980 --- gcc/ipa-cp.c (.../tags/gcc_4_8_3_release) (revision 217117)
1981 +++ gcc/ipa-cp.c (.../branches/gcc-4_8-branch) (revision 217117)
1983 else if (!opt_for_fn (node->symbol.decl, optimize)
1984 || !opt_for_fn (node->symbol.decl, flag_ipa_cp))
1985 reason = "non-optimized function";
1986 + else if (node->tm_clone)
1987 + reason = "transactional memory clone";
1989 if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
1990 fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
1991 @@ -2902,6 +2904,11 @@
1992 intersect_with_agg_replacements (cs->caller, src_idx,
2003 @@ -2917,6 +2924,11 @@
2005 intersect_with_plats (src_plats, &inter, 0);
2014 else if (jfunc->type == IPA_JF_ANCESTOR
2015 @@ -3000,7 +3012,8 @@
2016 vec<cgraph_edge_p> callers)
2018 struct ipa_node_params *dest_info = IPA_NODE_REF (node);
2019 - struct ipa_agg_replacement_value *res = NULL;
2020 + struct ipa_agg_replacement_value *res;
2021 + struct ipa_agg_replacement_value **tail = &res;
2022 struct cgraph_edge *cs;
2023 int i, j, count = ipa_get_param_count (dest_info);
2025 @@ -3044,8 +3057,8 @@
2026 v->offset = item->offset;
2027 v->value = item->value;
2028 v->by_ref = plats->aggs_by_ref;
2036 @@ -3052,6 +3065,7 @@
2037 if (inter.exists ())
2044 @@ -3060,7 +3074,8 @@
2045 static struct ipa_agg_replacement_value *
2046 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
2048 - struct ipa_agg_replacement_value *res = NULL;
2049 + struct ipa_agg_replacement_value *res;
2050 + struct ipa_agg_replacement_value **tail = &res;
2051 struct ipa_agg_jump_function *aggjf;
2052 struct ipa_agg_jf_item *item;
2054 @@ -3074,9 +3089,10 @@
2055 v->offset = item->offset;
2056 v->value = item->value;
2057 v->by_ref = aggjf->by_ref;
2067 Index: gcc/configure
2068 ===================================================================
2069 --- gcc/configure (.../tags/gcc_4_8_3_release) (revision 217117)
2070 +++ gcc/configure (.../branches/gcc-4_8-branch) (revision 217117)
2072 enable_gnu_indirect_function
2073 enable_initfini_array
2075 +enable_fix_cortex_a53_835769
2076 enable_gnu_unique_object
2077 enable_linker_build_id
2078 with_long_double_128
2079 @@ -1619,6 +1620,14 @@
2081 --enable-initfini-array use .init_array/.fini_array sections
2082 --enable-comdat enable COMDAT group support
2084 + --enable-fix-cortex-a53-835769
2085 + enable workaround for AArch64 Cortex-A53 erratum
2087 + --disable-fix-cortex-a53-835769
2088 + disable workaround for AArch64 Cortex-A53 erratum
2091 --enable-gnu-unique-object
2092 enable the use of the @gnu_unique_object ELF
2093 extension on glibc systems
2094 @@ -17838,7 +17847,7 @@
2095 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2096 lt_status=$lt_dlunknown
2097 cat > conftest.$ac_ext <<_LT_EOF
2098 -#line 17841 "configure"
2099 +#line 17850 "configure"
2100 #include "confdefs.h"
2103 @@ -17944,7 +17953,7 @@
2104 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2105 lt_status=$lt_dlunknown
2106 cat > conftest.$ac_ext <<_LT_EOF
2107 -#line 17947 "configure"
2108 +#line 17956 "configure"
2109 #include "confdefs.h"
2112 @@ -23796,6 +23805,28 @@
2113 $as_echo "$gcc_cv_lto_plugin" >&6; }
2118 + # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
2119 + # Check whether --enable-fix-cortex-a53-835769 was given.
2120 +if test "${enable_fix_cortex_a53_835769+set}" = set; then :
2121 + enableval=$enable_fix_cortex_a53_835769;
2122 + case $enableval in
2124 + tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
2129 + as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
2130 + Valid choices are 'yes' and 'no'." "$LINENO" 5
2138 # All TARGET_ABI_OSF targets.
2139 alpha*-*-linux* | alpha*-*-*bsd*)
2140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
2141 Index: gcc/fold-const.c
2142 ===================================================================
2143 --- gcc/fold-const.c (.../tags/gcc_4_8_3_release) (revision 217117)
2144 +++ gcc/fold-const.c (.../branches/gcc-4_8-branch) (revision 217117)
2145 @@ -9213,7 +9213,7 @@
2146 /* Transform comparisons of the form X +- C1 CMP Y +- C2 to
2147 X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
2148 the resulting offset is smaller in absolute value than the
2150 + original one and has the same sign. */
2151 if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
2152 && (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
2153 && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
2154 @@ -9232,19 +9232,20 @@
2157 /* Put the constant on the side where it doesn't overflow and is
2158 - of lower absolute value than before. */
2159 + of lower absolute value and of same sign than before. */
2160 cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2161 ? MINUS_EXPR : PLUS_EXPR,
2163 if (!TREE_OVERFLOW (cst)
2164 - && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
2165 + && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
2166 + && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
2168 fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2169 return fold_build2_loc (loc, code, type,
2171 - fold_build2_loc (loc,
2172 - TREE_CODE (arg1), TREE_TYPE (arg1),
2175 + fold_build2_loc (loc, TREE_CODE (arg1),
2180 cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2181 @@ -9251,13 +9252,15 @@
2182 ? MINUS_EXPR : PLUS_EXPR,
2184 if (!TREE_OVERFLOW (cst)
2185 - && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
2186 + && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
2187 + && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
2189 fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2190 return fold_build2_loc (loc, code, type,
2191 - fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
2194 + fold_build2_loc (loc, TREE_CODE (arg0),
2201 @@ -11218,7 +11221,6 @@
2203 double_int c1, c2, c3, msk;
2204 int width = TYPE_PRECISION (type), w;
2205 - bool try_simplify = true;
2207 c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
2208 c2 = tree_to_double_int (arg1);
2209 @@ -11255,20 +11257,7 @@
2213 - /* If X is a tree of the form (Y * K1) & K2, this might conflict
2214 - with that optimization from the BIT_AND_EXPR optimizations.
2215 - This could end up in an infinite recursion. */
2216 - if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
2217 - && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
2220 - tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
2221 - double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
2223 - try_simplify = (masked != c1);
2226 - if (try_simplify && c3 != c1)
2228 return fold_build2_loc (loc, BIT_IOR_EXPR, type,
2229 fold_build2_loc (loc, BIT_AND_EXPR, type,
2230 TREE_OPERAND (arg0, 0),
2231 @@ -11658,16 +11647,25 @@
2232 && TREE_CODE (arg0) == MULT_EXPR
2233 && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
2235 + double_int darg1 = tree_to_double_int (arg1);
2237 - = mask_with_tz (type, tree_to_double_int (arg1),
2238 + = mask_with_tz (type, darg1,
2239 tree_to_double_int (TREE_OPERAND (arg0, 1)));
2241 if (masked.is_zero ())
2242 return omit_two_operands_loc (loc, type, build_zero_cst (type),
2244 - else if (masked != tree_to_double_int (arg1))
2245 - return fold_build2_loc (loc, code, type, op0,
2246 - double_int_to_tree (type, masked));
2247 + else if (masked != darg1)
2249 + /* Avoid the transform if arg1 is a mask of some
2250 + mode which allows further optimizations. */
2251 + int pop = darg1.popcount ();
2252 + if (!(pop >= BITS_PER_UNIT
2253 + && exact_log2 (pop) != -1
2254 + && double_int::mask (pop) == darg1))
2255 + return fold_build2_loc (loc, code, type, op0,
2256 + double_int_to_tree (type, masked));
2260 /* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
2261 Index: gcc/omp-low.c
2262 ===================================================================
2263 --- gcc/omp-low.c (.../tags/gcc_4_8_3_release) (revision 217117)
2264 +++ gcc/omp-low.c (.../branches/gcc-4_8-branch) (revision 217117)
2265 @@ -1586,7 +1586,6 @@
2266 TREE_STATIC (decl) = 1;
2267 TREE_USED (decl) = 1;
2268 DECL_ARTIFICIAL (decl) = 1;
2269 - DECL_NAMELESS (decl) = 1;
2270 DECL_IGNORED_P (decl) = 0;
2271 TREE_PUBLIC (decl) = 0;
2272 DECL_UNINLINABLE (decl) = 1;
2274 ===================================================================
2275 --- gcc/toplev.c (.../tags/gcc_4_8_3_release) (revision 217117)
2276 +++ gcc/toplev.c (.../branches/gcc-4_8-branch) (revision 217117)
2277 @@ -1036,16 +1036,19 @@
2279 if (warn_stack_usage >= 0)
2281 + const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
2283 if (stack_usage_kind == DYNAMIC)
2284 - warning (OPT_Wstack_usage_, "stack usage might be unbounded");
2285 + warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
2286 else if (stack_usage > warn_stack_usage)
2288 if (stack_usage_kind == DYNAMIC_BOUNDED)
2289 - warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
2292 + OPT_Wstack_usage_, "stack usage might be %wd bytes",
2295 - warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
2297 + warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
2302 Index: gcc/DEV-PHASE
2303 ===================================================================
2304 --- gcc/DEV-PHASE (.../tags/gcc_4_8_3_release) (revision 217117)
2305 +++ gcc/DEV-PHASE (.../branches/gcc-4_8-branch) (revision 217117)
2308 Index: gcc/tree-ssa-sccvn.c
2309 ===================================================================
2310 --- gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release) (revision 217117)
2311 +++ gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch) (revision 217117)
2312 @@ -3015,33 +3015,12 @@
2313 /* If all value numbered to the same value, the phi node has that
2317 - if (is_gimple_min_invariant (sameval))
2319 - VN_INFO (PHI_RESULT (phi))->has_constants = true;
2320 - VN_INFO (PHI_RESULT (phi))->expr = sameval;
2324 - VN_INFO (PHI_RESULT (phi))->has_constants = false;
2325 - VN_INFO (PHI_RESULT (phi))->expr = sameval;
2327 + return set_ssa_val_to (PHI_RESULT (phi), sameval);
2329 - if (TREE_CODE (sameval) == SSA_NAME)
2330 - return visit_copy (PHI_RESULT (phi), sameval);
2332 - return set_ssa_val_to (PHI_RESULT (phi), sameval);
2335 /* Otherwise, see if it is equivalent to a phi node in this block. */
2336 result = vn_phi_lookup (phi);
2339 - if (TREE_CODE (result) == SSA_NAME)
2340 - changed = visit_copy (PHI_RESULT (phi), result);
2342 - changed = set_ssa_val_to (PHI_RESULT (phi), result);
2344 + changed = set_ssa_val_to (PHI_RESULT (phi), result);
2347 vn_phi_insert (phi, PHI_RESULT (phi));
2348 @@ -3142,24 +3121,18 @@
2349 catch those with constants. The goal here is to simultaneously
2350 combine constants between expressions, but avoid infinite
2351 expansion of expressions during simplification. */
2352 - if (TREE_CODE (op0) == SSA_NAME)
2354 - if (VN_INFO (op0)->has_constants
2355 + op0 = vn_valueize (op0);
2356 + if (TREE_CODE (op0) == SSA_NAME
2357 + && (VN_INFO (op0)->has_constants
2358 || TREE_CODE_CLASS (code) == tcc_comparison
2359 - || code == COMPLEX_EXPR)
2360 - op0 = valueize_expr (vn_get_expr_for (op0));
2362 - op0 = vn_valueize (op0);
2364 + || code == COMPLEX_EXPR))
2365 + op0 = valueize_expr (vn_get_expr_for (op0));
2367 - if (TREE_CODE (op1) == SSA_NAME)
2369 - if (VN_INFO (op1)->has_constants
2370 - || code == COMPLEX_EXPR)
2371 - op1 = valueize_expr (vn_get_expr_for (op1));
2373 - op1 = vn_valueize (op1);
2375 + op1 = vn_valueize (op1);
2376 + if (TREE_CODE (op1) == SSA_NAME
2377 + && (VN_INFO (op1)->has_constants
2378 + || code == COMPLEX_EXPR))
2379 + op1 = valueize_expr (vn_get_expr_for (op1));
2381 /* Pointer plus constant can be represented as invariant address.
2382 Do so to allow further propatation, see also tree forwprop. */
2383 @@ -3217,27 +3190,31 @@
2387 - if (VN_INFO (op0)->has_constants)
2388 - op0 = valueize_expr (vn_get_expr_for (op0));
2389 - else if (CONVERT_EXPR_CODE_P (code)
2390 - || code == REALPART_EXPR
2391 - || code == IMAGPART_EXPR
2392 - || code == VIEW_CONVERT_EXPR
2393 - || code == BIT_FIELD_REF)
2394 + op0 = vn_valueize (op0);
2395 + if (TREE_CODE (op0) == SSA_NAME)
2397 - /* We want to do tree-combining on conversion-like expressions.
2398 - Make sure we feed only SSA_NAMEs or constants to fold though. */
2399 - tree tem = valueize_expr (vn_get_expr_for (op0));
2400 - if (UNARY_CLASS_P (tem)
2401 - || BINARY_CLASS_P (tem)
2402 - || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2403 - || TREE_CODE (tem) == SSA_NAME
2404 - || TREE_CODE (tem) == CONSTRUCTOR
2405 - || is_gimple_min_invariant (tem))
2407 + if (VN_INFO (op0)->has_constants)
2408 + op0 = valueize_expr (vn_get_expr_for (op0));
2409 + else if (CONVERT_EXPR_CODE_P (code)
2410 + || code == REALPART_EXPR
2411 + || code == IMAGPART_EXPR
2412 + || code == VIEW_CONVERT_EXPR
2413 + || code == BIT_FIELD_REF)
2415 + /* We want to do tree-combining on conversion-like expressions.
2416 + Make sure we feed only SSA_NAMEs or constants to fold though. */
2417 + tree tem = valueize_expr (vn_get_expr_for (op0));
2418 + if (UNARY_CLASS_P (tem)
2419 + || BINARY_CLASS_P (tem)
2420 + || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2421 + || TREE_CODE (tem) == SSA_NAME
2422 + || TREE_CODE (tem) == CONSTRUCTOR
2423 + || is_gimple_min_invariant (tem))
2428 - /* Avoid folding if nothing changed, but remember the expression. */
2429 + /* Avoid folding if nothing changed. */
2430 if (op0 == orig_op0)
2433 Index: gcc/cgraphunit.c
2434 ===================================================================
2435 --- gcc/cgraphunit.c (.../tags/gcc_4_8_3_release) (revision 217117)
2436 +++ gcc/cgraphunit.c (.../branches/gcc-4_8-branch) (revision 217117)
2437 @@ -1097,7 +1097,7 @@
2438 /* We use local aliases for C++ thunks to force the tailcall
2439 to bind locally. This is a hack - to keep it working do
2440 the following (which is not strictly correct). */
2441 - && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
2442 + && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
2443 || ! DECL_VIRTUAL_P (target_node->symbol.decl))
2444 && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
2446 Index: gcc/ChangeLog
2447 ===================================================================
2448 --- gcc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
2449 +++ gcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
2451 +2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2453 + * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
2454 + recog state after aarch64_prev_real_insn call.
2456 +2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2458 + * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
2460 + * configure.ac: Add --enable-fix-cortex-a53-835769 option.
2461 + * configure: Regenerate.
2462 + * config/aarch64/aarch64.c (aarch64_override_options): Handle
2463 + TARGET_FIX_ERR_A53_835769_DEFAULT.
2464 + * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
2466 + * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
2468 +2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2470 + * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
2471 + * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
2472 + (FINAL_PRESCAN_INSN): Likewise.
2473 + * config/aarch64/aarch64.h (is_mem_p): New function.
2474 + (has_memory_op): Likewise.
2475 + (aarch64_prev_real_insn): Likewise.
2476 + (is_madd_op): Likewise.
2477 + (dep_between_memop_and_curr): Likewise.
2478 + (aarch64_madd_needs_nop): Likewise.
2479 + (aarch64_final_prescan_insn): Likewise.
2480 + * doc/invoke.texi (Document new option).
2482 +2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
2484 + * stor-layout.c (self_referential_size): Do not promote arguments.
2486 +2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2488 + Backport from mainline r215880
2489 + 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2491 + * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2492 + Issue a warning message when vec_lvsl or vec_lvsr is used with a
2493 + little endian target.
2495 + Backport from mainline r215882
2496 + 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2498 + * altivec.md (altivec_lvsl): New define_expand.
2499 + (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
2500 + (altivec_lvsr): New define_expand.
2501 + (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
2502 + * rs6000.c (rs6000_expand_builtin): Change to use
2503 + altivec_lvs[lr]_direct; remove commented-out code.
2505 +2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2507 + Backport from mainline
2508 + 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2510 + PR rtl-optimization/57003
2511 + * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
2512 + also check CALL_INSN_FUNCTION_USAGE for clobbers again after
2513 + killing regs_invalidated_by_call.
2515 +2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2517 + Backport from mainline
2518 + 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2521 + * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
2522 + atomic_fetch_<fetchop_name>si_hard,
2523 + atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
2524 + atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
2525 + atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
2526 + atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
2528 +2014-10-02 Martin Jambor <mjambor@suse.cz>
2530 + PR tree-optimization/63375
2531 + * tree-sra.c (build_access_from_expr_1): Disqualify volatile
2534 +2014-10-01 Jakub Jelinek <jakub@redhat.com>
2537 + * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
2541 + * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
2542 + argument to avx2_permv2ti.
2544 +2014-10-01 Uros Bizjak <ubizjak@gmail.com>
2546 + Backport from mainline
2547 + 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
2549 + * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
2550 + (fmod<mode>3): Ditto.
2551 + (fpremxf4_i387): Ditto.
2552 + (reminderxf3): Ditto.
2553 + (reminder<mode>3): Ditto.
2554 + (fprem1xf4_i387): Ditto.
2556 +2014-09-30 Jakub Jelinek <jakub@redhat.com>
2558 + PR inline-asm/63282
2559 + * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
2560 + or invert_jump_1 if jump isn't any_condjump_p.
2562 +2014-09-29 Charles Baylis <charles.baylis@linaro.org>
2564 + Backport from mainline r212303
2566 + * config/arm/arm-protos.h (arm_legitimate_address_p,
2567 + arm_is_constant_pool_ref): Add prototypes.
2568 + * config/arm/arm.c (arm_legitimate_address_p): Remove static.
2569 + (arm_is_constant_pool_ref) New function.
2570 + * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
2571 + arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
2572 + (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
2573 + operand and remove pool_range and neg_pool_range attributes.
2574 + (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
2575 + pool_range and neg_pool_range attributes.
2576 + * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
2577 + constant pool references.
2579 +2014-09-28 John David Anglin <danglin@gcc.gnu.org>
2581 + * config/pa/pa.c (pa_output_function_epilogue): Only update
2582 + last_address when a nonnote insn is found.
2584 +2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2586 + Backport from mainline
2587 + 2014-09-25 Nick Clifton <nickc@redhat.com>
2588 + 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2591 + * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
2592 + atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
2594 +2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2596 + Backport from mainline r215559
2597 + 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2600 + * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
2601 + Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
2603 +2014-09-25 Jakub Jelinek <jakub@redhat.com>
2605 + PR tree-optimization/63341
2606 + * tree-vectorizer.h (vect_create_data_ref_ptr,
2607 + vect_create_addr_base_for_vector_ref): Add another tree argument
2608 + defaulting to NULL_TREE.
2609 + * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
2610 + argument, pass it down to vect_create_addr_base_for_vector_ref.
2611 + (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
2612 + add that to base_offset too if non-NULL.
2613 + * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
2614 + for dr_explicit_realign_optimized set it to vector byte size
2615 + - 1 instead of setting offset, pass byte_offset down to
2616 + vect_create_data_ref_ptr.
2618 +2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2620 + Back port from trunk:
2621 + 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2623 + * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
2624 + refine the constraints used on 32/64-bit floating point moves.
2625 + (f32_av): Likewise.
2626 + (f64_vsx): Likewise.
2627 + (f64_dm): Likewise.
2628 + (f64_av): Likewise.
2629 + (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
2630 + (BOOL_REGS_OP1): Likewise.
2631 + (BOOL_REGS_OP2): Likewise.
2632 + (BOOL_REGS_UNARY): Likewise.
2633 + (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
2634 + 32/64-bit floating point moves. Do not use wa, instead use ww/ws
2635 + for moves involving VSX registers. Do not use constraints that
2636 + target VSX registers for decimal types.
2637 + (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
2638 + (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
2640 +2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2642 + Back port from trunk:
2643 + 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2645 + * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
2646 + for base_reg_operand to be common between LO_SUM and PLUS.
2647 + (fusion_gpr_mem_combo): New predicate to match a fused address
2648 + that combines the addis and memory offset address.
2650 + * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
2651 + calling signature.
2652 + (emit_fusion_gpr_load): Likewise.
2654 + * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
2655 + signature to pass each argument separately, rather than
2656 + using an operands array. Rewrite the insns found by peephole2 to
2657 + be a single insn, rather than hoping the insns will still be
2658 + together when the peephole pass is done. Drop being called via a
2660 + (emit_fusion_gpr_load): Change calling signature to be called from
2661 + the fusion_gpr_load_<mode> insns with a combined memory address
2662 + instead of the peephole pass passing the addis and offset
2665 + * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
2667 + (power8 fusion peephole): Drop support for doing power8 via a
2668 + normal peephole that was created by the peephole2 pass.
2669 + (power8 fusion peephole2): Create a new insn with the fused
2670 + address, so that the fused operation is kept together after
2671 + register allocation is done.
2672 + (fusion_gpr_load_<mode>): Likewise.
2674 +2014-09-17 Jakub Jelinek <jakub@redhat.com>
2677 + * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
2678 + if there are only debug stmts after the noreturn call, instead
2679 + remove the debug stmts.
2681 +2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2683 + * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
2684 + V2DF, V4SF, DF, and DI modes.
2685 + (vsx_fmav2df2): Likewise.
2686 + (vsx_float_fix_<mode>2): Likewise.
2687 + (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
2689 +2014-09-10 Alan Modra <amodra@gmail.com>
2692 + * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
2695 +2014-09-09 Richard Biener <rguenther@suse.de>
2697 + Backport from mainline
2698 + 2014-06-11 Richard Biener <rguenther@suse.de>
2700 + PR tree-optimization/61452
2701 + * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
2702 + expr and has_constants in case we found a leader.
2703 + (simplify_binary_expression): Always valueize operands first.
2704 + (simplify_unary_expression): Likewise.
2706 +2014-09-09 Richard Biener <rguenther@suse.de>
2708 + Backport from mainline
2709 + 2014-05-05 Richard Biener <rguenther@suse.de>
2711 + PR middle-end/61010
2712 + * fold-const.c (fold_binary_loc): Consistently avoid
2713 + canonicalizing X & CST away from a CST that is the mask
2716 + 2014-05-28 Richard Biener <rguenther@suse.de>
2718 + PR middle-end/61045
2719 + * fold-const.c (fold_comparison): When folding
2720 + X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
2721 + the sign of the remaining constant operand stays the same.
2723 + 2014-08-11 Richard Biener <rguenther@suse.de>
2725 + PR tree-optimization/62075
2726 + * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
2727 + handle uses in patterns.
2729 +2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2731 + Backport from mainline.
2732 + 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2734 + * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
2735 + (-mtune): Likewise.
2736 + (-mcpu): Likewise.
2738 +2014-09-08 Jakub Jelinek <jakub@redhat.com>
2740 + PR tree-optimization/60196
2741 + PR tree-optimization/63189
2742 + Backported from mainline
2743 + 2013-09-17 Cong Hou <congh@google.com>
2745 + * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
2746 + when checking the dot production pattern. The type of rhs operand
2747 + of multiply is now checked correctly.
2749 +2014-09-08 Jakub Jelinek <jakub@redhat.com>
2751 + Backported from mainline
2752 + 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
2755 + * haifa-sched.c (advance_one_cycle): Fix dump.
2756 + (schedule_block): Don't advance cycle if we are already at the
2757 + beginning of the cycle.
2759 +2014-09-03 Martin Jambor <mjambor@suse.cz>
2762 + * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
2763 + pass-trough jump functions correctly.
2765 +2014-09-03 Martin Jambor <mjambor@suse.cz>
2768 + * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
2769 + created replacements in ascending order of offsets.
2770 + (known_aggs_to_agg_replacement_list): Likewise.
2772 +2014-09-01 Marek Polacek <polacek@redhat.com>
2774 + Backport from mainline
2775 + 2014-08-21 Marek Polacek <polacek@redhat.com>
2778 + * expr.c (is_aligning_offset): Remove logical not.
2780 +2014-09-01 Marek Polacek <polacek@redhat.com>
2782 + Backport from mainline
2783 + 2014-08-19 Marek Polacek <polacek@redhat.com>
2786 + * cgraphunit.c (handle_alias_pairs): Fix condition.
2788 +2014-08-30 John David Anglin <danglin@gcc.gnu.org>
2790 + * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
2791 + prefix to function labels when generating fast indirect calls.
2793 +2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
2795 + * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
2797 +2014-08-26 Marek Polacek <polacek@redhat.com>
2799 + Backport from mainline
2800 + 2014-08-26 Marek Polacek <polacek@redhat.com>
2803 + * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
2804 + LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
2806 +2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2808 + Backport from mainline
2809 + 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2812 + * config/sh/sh.opt (musermode): Allow negative form.
2813 + * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
2814 + targets that don't support it.
2815 + * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
2816 + Document -mno-usermode option.
2818 +2014-08-23 John David Anglin <danglin@gcc.gnu.org>
2821 + * config/pa/pa.c (pa_output_function_epilogue): Don't set
2822 + last_address when the current function is a thunk.
2823 + (pa_asm_output_mi_thunk): When we don't have named sections or they
2824 + are not being used, check that thunk can reach the stub table with a
2827 +2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2829 + Backport fro mainline
2830 + 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2833 + * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
2834 + documentation to state it is only for VSX operations.
2836 + * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
2837 + constraint only active if VSX.
2839 + * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
2840 + wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
2841 + (lfiwzx): Likewise.
2843 +2014-08-15 Tom de Vries <tom@codesourcery.com>
2845 + Backport from mainline:
2846 + 2014-08-14 Tom de Vries <tom@codesourcery.com>
2848 + PR rtl-optimization/62004
2849 + PR rtl-optimization/62030
2850 + * ifcvt.c (rtx_interchangeable_p): New function.
2851 + (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
2853 + 2014-08-05 Richard Biener <rguenther@suse.de>
2855 + * emit-rtl.h (mem_attrs_eq_p): Declare.
2856 + * emit-rtl.c (mem_attrs_eq_p): Export.
2858 +2014-08-16 John David Anglin <danglin@gcc.gnu.org>
2860 + Backport from trunk:
2861 + 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
2864 + * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
2865 + size accounting for thunks.
2866 + (pa_asm_output_mi_thunk): Use final_start_function() and
2867 + final_end_function() to output function start and end directives.
2869 +2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2871 + Backport from mainline:
2872 + 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2874 + * doc/invoke.texi (SH options): Document missing processor variant
2875 + options. Remove references to Hitachi. Undocument deprecated mspace
2878 +2014-08-13 Felix Yang <fei.yang0953@gmail.com>
2880 + PR tree-optimization/62073
2881 + * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
2884 +2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2886 + Backport from mainline
2887 + 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
2889 + PR middle-end/62103
2890 + * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
2891 + bitfields, that is when size doesn't match the size of type or the
2892 + size of the constructor.
2894 +2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
2896 + Backport patch from mainline
2897 + 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2899 + * config/rs6000/constraints.md (wh constraint): New constraint,
2900 + for FP registers if direct move is available.
2901 + (wi constraint): New constraint, for VSX/FP registers that can
2902 + handle 64-bit integers.
2903 + (wj constraint): New constraint for VSX/FP registers that can
2904 + handle 64-bit integers for direct moves.
2905 + (wk constraint): New constraint for VSX/FP registers that can
2906 + handle 64-bit doubles for direct moves.
2907 + (wy constraint): Make documentation match implementation.
2909 + * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
2910 + scalar_in_vmx_p field to simplify tests of whether SFmode or
2911 + DFmode can go in the Altivec registers.
2912 + (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
2913 + (rs6000_setup_reg_addr_masks): Likewise.
2914 + (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
2915 + field, and wh/wi/wj/wk constraints.
2916 + (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
2917 + the wh/wi/wj/wk constraints.
2918 + (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
2919 + upper registers, prefer VSX registers unless the operation is a
2920 + memory operation with REG+OFFSET addressing.
2922 + * config/rs6000/vsx.md (VSr mode attribute): Add support for
2923 + DImode. Change SFmode to use ww constraint instead of d to allow
2924 + SF registers in the upper registers.
2927 + (VSr5): Fix thinko in comment.
2928 + (VSa): New mode attribute that is an alternative to wa, that
2929 + returns the VSX register class that a mode can go in, but may not
2930 + be the preferred register class.
2931 + (VS_64dm): New mode attribute for appropriate register classes for
2932 + referencing 64-bit elements of vectors for direct moves and normal
2934 + (VS_64reg): Likewise.
2935 + (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
2936 + register allocator to only registers the data type can handle.
2937 + (vsx_le_perm_load_<mode>): Likewise.
2938 + (vsx_le_perm_store_<mode>): Likewise.
2939 + (vsx_xxpermdi2_le_<mode>): Likewise.
2940 + (vsx_xxpermdi4_le_<mode>): Likewise.
2941 + (vsx_lxvd2x2_le_<mode>): Likewise.
2942 + (vsx_lxvd2x4_le_<mode>): Likewise.
2943 + (vsx_stxvd2x2_le_<mode>): Likewise.
2944 + (vsx_add<mode>3): Likewise.
2945 + (vsx_sub<mode>3): Likewise.
2946 + (vsx_mul<mode>3): Likewise.
2947 + (vsx_div<mode>3): Likewise.
2948 + (vsx_tdiv<mode>3_internal): Likewise.
2949 + (vsx_fre<mode>2): Likewise.
2950 + (vsx_neg<mode>2): Likewise.
2951 + (vsx_abs<mode>2): Likewise.
2952 + (vsx_nabs<mode>2): Likewise.
2953 + (vsx_smax<mode>3): Likewise.
2954 + (vsx_smin<mode>3): Likewise.
2955 + (vsx_sqrt<mode>2): Likewise.
2956 + (vsx_rsqrte<mode>2): Likewise.
2957 + (vsx_tsqrt<mode>2_internal): Likewise.
2958 + (vsx_fms<mode>4): Likewise.
2959 + (vsx_nfma<mode>4): Likewise.
2960 + (vsx_eq<mode>): Likewise.
2961 + (vsx_gt<mode>): Likewise.
2962 + (vsx_ge<mode>): Likewise.
2963 + (vsx_eq<mode>_p): Likewise.
2964 + (vsx_gt<mode>_p): Likewise.
2965 + (vsx_ge<mode>_p): Likewise.
2966 + (vsx_xxsel<mode>): Likewise.
2967 + (vsx_xxsel<mode>_uns): Likewise.
2968 + (vsx_copysign<mode>3): Likewise.
2969 + (vsx_float<VSi><mode>2): Likewise.
2970 + (vsx_floatuns<VSi><mode>2): Likewise.
2971 + (vsx_fix_trunc<mode><VSi>2): Likewise.
2972 + (vsx_fixuns_trunc<mode><VSi>2): Likewise.
2973 + (vsx_x<VSv>r<VSs>i): Likewise.
2974 + (vsx_x<VSv>r<VSs>ic): Likewise.
2975 + (vsx_btrunc<mode>2): Likewise.
2976 + (vsx_b2trunc<mode>2): Likewise.
2977 + (vsx_floor<mode>2): Likewise.
2978 + (vsx_ceil<mode>2): Likewise.
2979 + (vsx_<VS_spdp_insn>): Likewise.
2980 + (vsx_xscvspdp): Likewise.
2981 + (vsx_xvcvspuxds): Likewise.
2982 + (vsx_float_fix_<mode>2): Likewise.
2983 + (vsx_set_<mode>): Likewise.
2984 + (vsx_extract_<mode>_internal1): Likewise.
2985 + (vsx_extract_<mode>_internal2): Likewise.
2986 + (vsx_extract_<mode>_load): Likewise.
2987 + (vsx_extract_<mode>_store): Likewise.
2988 + (vsx_splat_<mode>): Likewise.
2989 + (vsx_xxspltw_<mode>): Likewise.
2990 + (vsx_xxspltw_<mode>_direct): Likewise.
2991 + (vsx_xxmrghw_<mode>): Likewise.
2992 + (vsx_xxmrglw_<mode>): Likewise.
2993 + (vsx_xxsldwi_<mode>): Likewise.
2994 + (vsx_xscvdpspn): Tighten constraints to only use register classes
2996 + (vsx_xscvspdpn): Likewise.
2997 + (vsx_xscvdpspn_scalar): Likewise.
2999 + * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
3000 + wj, and wk constraints.
3001 + (GPR_REG_CLASS_P): New helper macro for register classes targeting
3002 + general purpose registers.
3004 + * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
3006 + (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
3007 + DImode instead of wm. Use wk constraint for direct move of DFmode
3009 + (extendsidi2_lfiwax): Likewise.
3010 + (lfiwax): Likewise.
3011 + (lfiwzx): Likewise.
3012 + (movdi_internal64): Likewise.
3014 + * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
3015 + wk constraints. Make the wy constraint documentation match them
3018 +2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
3020 + Backport from mainline
3021 + 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3023 + PR tree-optimization/61375
3024 + * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
3025 + symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
3026 + (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
3028 +2014-08-01 Richard Biener <rguenther@suse.de>
3030 + PR tree-optimization/61964
3031 + * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
3032 + function merged from trunk.
3033 + (gimple_equal_p): Handle non-SSA LHS solely by structural
3036 +2014-07-25 Uros Bizjak <ubizjak@gmail.com>
3038 + * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
3040 +2014-07-24 Kyle McMartin <kyle@redhat.com>
3042 + * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
3044 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3046 + * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
3048 + * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
3049 + function. Issue -Wpsabi warning if future GCC releases will use
3050 + different field alignment rules for this type.
3051 + * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
3052 + * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
3053 + * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
3055 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3057 + * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
3058 + -Wpsabi note when encountering a type where future GCC releases
3059 + will apply different alignment requirements.
3061 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3063 + * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
3064 + does not fit fully into floating-point registers, and there is still
3065 + space in the register parameter area, issue -Wpsabi note that the ABI
3066 + will change in a future GCC release.
3068 +2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
3070 + * config/arm/t-rtems-eabi: Add
3071 + mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
3072 + mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
3073 + mbig-endian/mthumb/march=armv7-r, and
3074 + mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
3077 +2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
3079 + * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
3080 + (LIBTSAN_EARLY_SPEC): Likewise.
3081 + (STATIC_LIBASAN_LIBS): Likewise.
3082 + (STATIC_LIBTSAN_LIBS): Likewise.
3084 +2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
3086 + * toplev.c (output_stack_usage): Adjust the location of the warning.
3088 +2014-07-19 Daniel Cederman <cederman@gaisler.com>
3090 + * config/sparc/sync.md (*membar_storeload_leon3): New insn.
3091 + (*membar_storeload): Disable for LEON3.
3093 +2014-07-17 Richard Biener <rguenther@suse.de>
3095 + PR rtl-optimization/61801
3096 + * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
3097 + ASM_INPUT don't set reg_pending_barrier if it appears in a
3100 +2014-07-16 Jakub Jelinek <jakub@redhat.com>
3102 + * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
3103 + on the FUNCTION_DECL.
3105 +2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
3107 + * doc/install.texi: Remove links to defunct package providers for
3110 +2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
3112 + PR middle-end/53590
3113 + * function.c (allocate_struct_function): Revert r188667 change.
3115 +2014-07-04 Jakub Jelinek <jakub@redhat.com>
3117 + PR tree-optimization/61684
3118 + * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
3119 + rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
3121 +2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
3123 + Backport from Mainline
3124 + 2014-06-20 Jakub Jelinek <jakub@redhat.com>
3125 + 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
3127 + PR tree-optimization/61306
3128 + * tree-ssa-math-opts.c (struct symbolic_number): Store type of
3129 + expression instead of its size.
3130 + (do_shift_rotate): Adapt to change in struct symbolic_number. Return
3131 + false to prevent optimization when the result is unpredictable due to
3132 + arithmetic right shift of signed type with highest byte is set.
3133 + (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
3134 + (find_bswap_1): Likewise. Return NULL to prevent optimization when the
3135 + result is unpredictable due to sign extension.
3136 + (find_bswap): Adapt to change in struct symbolic_number.
3138 +2014-06-27 Uros Bizjak <ubizjak@gmail.com>
3140 + Backport from mainline
3141 + 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
3144 + * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
3146 +2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3149 + * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
3150 + extraction other than index 3.
3152 +2014-06-24 Jakub Jelinek <jakub@redhat.com>
3155 + * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
3156 + model family 6 CPU with has_longmode never use a CPU without
3159 +2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3161 + Backport from mainline
3163 + 2014-06-20 Julian Brown <julian@codesourcery.com>
3164 + Chung-Lin Tang <cltang@codesourcery.com>
3166 + * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
3167 + TARGET_THUMB1_ONLY. Add comments.
3169 +2014-06-18 Uros Bizjak <ubizjak@gmail.com>
3171 + Backport from mainline
3172 + 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
3175 + * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
3176 + define_insn_and_split pattern, merged from *floatunssi<mode>2_1
3177 + and corresponding splitters. Zero extend general register
3178 + or memory input operand to XMM temporary. Enable for
3179 + TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
3180 + (floatunssi<mode>2): Update expander predicate.
3182 +2014-06-18 Richard Henderson <rth@redhat.com>
3185 + * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
3187 +2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
3189 + Revert on gcc-4_8-branch.
3190 + * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
3191 + * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
3193 +2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
3195 + Backport from mainline
3198 + * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
3199 + variable 'size'; calculate 'size' right in the front; use
3200 + 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
3201 + pcum->aapcs_stack_words.
3203 +2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3205 + Backport from mainline
3207 + 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3209 + * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
3210 + (BU_MISC_2): Rename to ...
3211 + (BU_LDBL128_2): ... this.
3212 + * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
3213 + (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
3214 + * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
3215 + RS6000_BTM_LDBL128.
3216 + (rs6000_invalid_builtin): Add long double 128-bit builtin support.
3217 + (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
3218 + * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
3219 + (unpacktf_1): Likewise.
3220 + * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
3221 + (__builtin_longdouble_dw1): Likewise.
3222 + * doc/sourcebuild.texi (longdouble128): Document.
3224 +2014-06-13 Jason Merrill <jason@redhat.com>
3227 + * common.opt (-fno-gnu-unique): Add.
3228 + * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
3230 +2014-06-12 Georg-Johann Lay <avr@gjlay.de>
3232 + Backport from 2014-05-09 trunk r210272
3234 + * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
3235 + unsigned int initializers for regno_in, regno_out.
3237 + Backport from 2014-05-14 trunk r210418
3238 + * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
3239 + shifted values to avoid build warning.
3241 + Backport from 2014-06-12 trunk r211491
3244 + * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
3245 + loading from address spaces.
3247 +2014-06-12 Alan Modra <amodra@gmail.com>
3250 + * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
3251 + * doc/tm.texi: Regenerate.
3252 + * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
3253 + Use throughout in place of REG_PARM_STACK_SPACE.
3254 + * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
3255 + "incoming" param. Pass to rs6000_function_parms_need_stack.
3256 + (rs6000_function_parms_need_stack): Add "incoming" param, ignore
3257 + prototype_p when incoming. Use function decl when incoming
3258 + to handle K&R style functions.
3259 + * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
3260 + (INCOMING_REG_PARM_STACK_SPACE): Define.
3262 +2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3264 + Back port from trunk
3265 + 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3268 + * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
3269 + iterators, VSX_D that handles 64-bit types, and VSX_LE that
3270 + handles swapping the two 64-bit double words on little endian
3271 + systems. Include V1TImode and optionally TImode in VSX_LE so that
3272 + these types are properly swapped. Change all of the insns and
3273 + splits that do the 64-bit swaps to use VSX_LE.
3274 + (vsx_le_perm_load_<mode>): Likewise.
3275 + (vsx_le_perm_store_<mode>): Likewise.
3276 + (splitters for little endian memory operations): Likewise.
3277 + (vsx_xxpermdi2_le_<mode>): Likewise.
3278 + (vsx_lxvd2x2_le_<mode>): Likewise.
3279 + (vsx_stxvd2x2_le_<mode>): Likewise.
3281 +2014-06-05 Martin Jambor <mjambor@suse.cz>
3284 + * ipa-cp.c (determine_versionability): Pretend that tm_clones are
3287 +2014-06-04 Richard Biener <rguenther@suse.de>
3289 + PR tree-optimization/61383
3290 + * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
3293 +2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3295 + Backport from mainline
3296 + 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3298 + PR rtl-optimization/60866
3299 + * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
3300 + Default it to -1. Pass it down to init_simplejump_data.
3301 + (init_simplejump_data): New parameter old_seqno. Pass it down
3302 + to get_seqno_for_a_jump.
3303 + (get_seqno_for_a_jump): New parameter old_seqno. Use it for
3304 + initializing new jump seqno as a last resort. Add comment.
3305 + (sel_redirect_edge_and_branch): Save old seqno of the conditional
3306 + jump and pass it down to sel_init_new_insn.
3307 + (sel_redirect_edge_and_branch_force): Likewise.
3309 +2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3311 + Backport from mainline
3312 + 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3314 + PR rtl-optimization/60901
3315 + * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
3316 + bb predecessor belongs to the same scheduling region. Adjust comment.
3318 +2014-06-03 Uros Bizjak <ubizjak@gmail.com>
3320 + Backport from mainline
3321 + 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
3324 + * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
3325 + GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
3327 +2014-05-28 Guozhi Wei <carrot@google.com>
3330 + * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
3332 + (vqdmulhq_n_s16): Likewise.
3334 +2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
3336 + Backport from mainline
3337 + 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
3339 + * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
3340 + predicate to detect a negative quotient.
3342 +2014-05-28 Georg-Johann Lay <avr@gjlay.de>
3345 + * doc/extend.texi (Local Labels): Note that label differences are
3346 + not supported for AVR.
3348 +2014-05-26 Michael Tautschnig <mt@debian.org>
3351 + * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
3352 + __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
3354 +2014-05-23 Alan Modra <amodra@gmail.com>
3357 + * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
3358 + * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
3359 + Use "Y" constraint rather than "m".
3361 +2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3363 + Backport from mainline
3364 + 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3366 + * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
3368 +2014-05-22 Richard Earnshaw <rearnsha@arm.com>
3371 + * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
3373 +2013-05-22 Richard Biener <rguenther@suse.de>
3375 + * BASE-VER: Set to 4.8.4.
3376 + * DEV-PHASE: Set to prerelease.
3378 2014-05-22 Release Manager
3380 * GCC 4.8.3 released.
3381 Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
3382 ===================================================================
3383 --- gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release) (revision 0)
3384 +++ gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch) (revision 217117)
3386 +/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
3388 +/* { dg-do compile { target { powerpc64le-*-* } } } */
3389 +/* { dg-options "-O0 -Wdeprecated" } */
3391 +#include <altivec.h>
3397 + vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
3398 + vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
3400 Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
3401 ===================================================================
3402 --- gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release) (revision 0)
3403 +++ gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch) (revision 217117)
3405 +/* { dg-do run { target { powerpc64*-*-* } } } */
3406 +/* { dg-require-effective-target powerpc_vsx_ok } */
3407 +/* { dg-options "-mvsx" } */
3409 +#include <altivec.h>
3413 +vector double vec = (vector double) {99.0, 99.0};
3417 + int actual = vec_all_nge(vec, vec);
3421 + actual = vec_all_nle(vec, vec);
3425 + actual = vec_any_nge(vec, vec);
3429 + actual = vec_any_nle(vec, vec);
3435 Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
3436 ===================================================================
3437 --- gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release) (revision 217117)
3438 +++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch) (revision 217117)
3440 /* { dg-do compile { target { powerpc*-*-* } } } */
3441 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3442 /* { dg-require-effective-target powerpc_vsx_ok } */
3443 -/* { dg-options "-O3 -mcpu=power7" } */
3444 +/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
3446 /* Test the various load/store varients. */
3448 Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
3449 ===================================================================
3450 --- gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release) (revision 217117)
3451 +++ gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch) (revision 217117)
3453 /* { dg-do assemble } */
3454 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
3455 /* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
3456 +/* { dg-require-effective-target longdouble128 } */
3457 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
3459 typedef float TFmode __attribute__ ((mode (TF)));
3460 Index: gcc/testsuite/gcc.target/powerpc/pack02.c
3461 ===================================================================
3462 --- gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release) (revision 217117)
3463 +++ gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch) (revision 217117)
3465 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3466 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
3467 /* { dg-require-effective-target powerpc_fprs } */
3468 +/* { dg-require-effective-target longdouble128 } */
3469 /* { dg-options "-O2 -mhard-float" } */
3472 Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
3473 ===================================================================
3474 --- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release) (revision 0)
3475 +++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch) (revision 217117)
3477 +/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3478 +/* { dg-options "-mabi=elfv2" } */
3485 +void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
3489 Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
3490 ===================================================================
3491 --- gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release) (revision 0)
3492 +++ gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch) (revision 217117)
3494 +/* { dg-do compile { target { powerpc*-*-* } } } */
3495 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3496 +/* { dg-require-effective-target powerpc_htm_ok } */
3497 +/* { dg-options "-O2 -mhtm" } */
3499 +/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
3500 +/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
3502 +#include <htmintrin.h>
3506 + return _HTM_STATE(__builtin_ttest());
3508 Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
3509 ===================================================================
3510 --- gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release) (revision 0)
3511 +++ gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch) (revision 217117)
3513 +/* Test expected code generation for lvsl and lvsr on little endian.
3514 + Note that lvsl and lvsr are each produced once, but the filename
3515 + causes them to appear twice in the file. */
3517 +/* { dg-do compile { target { powerpc64le-*-* } } } */
3518 +/* { dg-options "-O0 -Wno-deprecated" } */
3519 +/* { dg-final { scan-assembler-times "lvsl" 2 } } */
3520 +/* { dg-final { scan-assembler-times "lvsr" 2 } } */
3521 +/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
3522 +/* { dg-final { scan-assembler-times "vperm" 2 } } */
3525 +#include <altivec.h>
3531 + vector unsigned char a = vec_lvsl (4, f);
3532 + vector unsigned char b = vec_lvsr (8, f);
3534 Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
3535 ===================================================================
3536 --- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release) (revision 0)
3537 +++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch) (revision 217117)
3539 +/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3540 +/* { dg-options "-mno-compat-align-parm" } */
3544 + long a __attribute__((aligned (16)));
3547 +void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
3551 Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
3552 ===================================================================
3553 --- gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release) (revision 0)
3554 +++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch) (revision 217117)
3556 +/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3557 +/* { dg-require-effective-target powerpc_altivec_ok } */
3558 +/* { dg-options "-maltivec" } */
3562 + int a __attribute__((vector_size (8)));
3563 + }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
3565 Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
3566 ===================================================================
3567 --- gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release) (revision 217117)
3568 +++ gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch) (revision 217117)
3570 /* { dg-do compile { target powerpc*-*-* } } */
3571 /* { dg-require-effective-target powerpc_altivec_ok } */
3572 -/* { dg-options "-maltivec -O0 -Wall" } */
3573 +/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
3575 #include <altivec.h>
3577 Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
3578 ===================================================================
3579 --- gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release) (revision 217117)
3580 +++ gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch) (revision 217117)
3582 /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
3583 /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
3584 /* { dg-require-effective-target powerpc_altivec_ok } */
3585 -/* { dg-options "-maltivec -O2" } */
3586 +/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
3588 #include <altivec.h>
3590 Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
3591 ===================================================================
3592 --- gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release) (revision 217117)
3593 +++ gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch) (revision 217117)
3595 /* { dg-do compile { target powerpc_altivec_ok } } */
3596 -/* { dg-options "-maltivec -mcpu=G5 -O2" } */
3597 +/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
3599 #include <altivec.h>
3601 Index: gcc/testsuite/gcc.target/alpha/pr61586.c
3602 ===================================================================
3603 --- gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release) (revision 0)
3604 +++ gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch) (revision 217117)
3606 +/* { dg-do compile } */
3607 +/* { dg-options "-O2 -mieee" } */
3609 +void foo (int *dimensions, double **params, int hh)
3613 + else if (dimensions[hh] > 0)
3614 + params[hh][0] = 1.0f;
3616 Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
3617 ===================================================================
3618 --- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release) (revision 0)
3619 +++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch) (revision 217117)
3621 +/* Test AAPCS64 layout and __builtin_va_start.
3623 + Pass named HFA/HVA argument on stack. */
3625 +/* { dg-do run { target aarch64*-*-* } } */
3627 +#ifndef IN_FRAMEWORK
3628 +#define AAPCS64_TEST_STDARG
3629 +#define TESTFILE "va_arg-14.c"
3630 +#include "type-def.h"
3632 +struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
3633 +struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
3634 +vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
3635 +vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
3637 +#include "abitest.h"
3639 + ARG (float, 1.0f, S0, 0)
3640 + ARG (float, 2.0f, S1, 1)
3641 + ARG (float, 3.0f, S2, 2)
3642 + ARG (float, 4.0f, S3, 3)
3643 + ARG (float, 5.0f, S4, 4)
3644 + ARG (float, 6.0f, S5, 5)
3645 + ARG (float, 7.0f, S6, 6)
3646 + ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
3647 + /* Previous argument size has been rounded up to the nearest multiple of
3649 + ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
3650 + /* NSAA is rounded up to the nearest natural alignment of float32x4. */
3651 + ARG (vf4_t, float32x4, STACK + 32, 9)
3652 + ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
3654 + LAST_ANON (double, 123456789.987, STACK + 64, 11)
3656 Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
3657 ===================================================================
3658 --- gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release) (revision 217117)
3659 +++ gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch) (revision 217117)
3674 Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
3675 ===================================================================
3676 --- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release) (revision 0)
3677 +++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch) (revision 217117)
3679 +/* Test AAPCS64 layout and __builtin_va_start.
3681 + Pass named HFA/HVA argument on stack. */
3683 +/* { dg-do run { target aarch64*-*-* } } */
3685 +#ifndef IN_FRAMEWORK
3686 +#define AAPCS64_TEST_STDARG
3687 +#define TESTFILE "va_arg-13.c"
3689 +struct float_float_t
3701 +#define HAS_DATA_INIT_FUNC
3705 + float_float.a = 1.2f;
3706 + float_float.b = 2.2f;
3708 + float_int.b8 = 4983.80f;
3711 +#include "abitest.h"
3713 + ARG (float, 1.0f, S0, 0)
3714 + ARG (float, 2.0f, S1, 1)
3715 + ARG (float, 3.0f, S2, 2)
3716 + ARG (float, 4.0f, S3, 3)
3717 + ARG (float, 5.0f, S4, 4)
3718 + ARG (float, 6.0f, S5, 5)
3719 + ARG (float, 7.0f, S6, 6)
3720 + ARG (struct float_float_t, float_float, STACK, 7)
3721 + ARG (int, 9, W0, 8)
3722 + ARG (int, 10, W1, 9)
3723 + ARG (int, 11, W2, 10)
3724 + ARG (int, 12, W3, 11)
3725 + ARG (int, 13, W4, 12)
3726 + ARG (int, 14, W5, 13)
3727 + ARG (int, 15, W6, LAST_NAMED_ARG_ID)
3729 + /* Note on the reason of using 'X7' instead of 'W7' here:
3730 + Using 'X7' makes sure the test works in the big-endian mode.
3731 + According to PCS rules B.4 and C.10, the size of float_int is rounded
3732 + to 8 bytes and prepared in the register X7 as if loaded via LDR from
3733 + the memory, with the content of the other 4 bytes unspecified. The
3734 + test framework will only compare the 4 relavent bytes. */
3735 + ANON (union float_int_t, float_int, X7, 15)
3736 + LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
3738 Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
3739 ===================================================================
3740 --- gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release) (revision 0)
3741 +++ gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch) (revision 217117)
3743 +/* Test AAPCS64 layout and __builtin_va_start.
3745 + Pass named __128int argument on stack. */
3747 +/* { dg-do run { target aarch64*-*-* } } */
3749 +#ifndef IN_FRAMEWORK
3750 +#define AAPCS64_TEST_STDARG
3751 +#define TESTFILE "va_arg-15.c"
3752 +#include "type-def.h"
3754 +union int128_t qword;
3756 +#define HAS_DATA_INIT_FUNC
3760 + /* Init signed quad-word integer. */
3761 + qword.l64 = 0xfdb9753102468aceLL;
3762 + qword.h64 = 0xeca8642013579bdfLL;
3765 +#include "abitest.h"
3767 + ARG (int, 1, W0, 0)
3768 + ARG (int, 2, W1, 1)
3769 + ARG (int, 3, W2, 2)
3770 + ARG (int, 4, W3, 3)
3771 + ARG (int, 5, W4, 4)
3772 + ARG (int, 6, W5, 5)
3773 + ARG (int, 7, W6, 6)
3774 + ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
3776 +#ifndef __AAPCS64_BIG_ENDIAN__
3777 + LAST_ANON (int, 8, STACK + 16, 8)
3779 + LAST_ANON (int, 8, STACK + 20, 8)
3782 Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
3783 ===================================================================
3784 --- gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release) (revision 0)
3785 +++ gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch) (revision 217117)
3787 +/* { dg-do assemble } */
3788 +/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
3791 +test (int a, double b, int c, int d, int e)
3794 + __asm__ __volatile ("// %0, %1"
3797 + : /* No clobbers */
3801 Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
3802 ===================================================================
3803 --- gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release) (revision 0)
3804 +++ gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch) (revision 217117)
3806 +/* { dg-do run } */
3807 +/* { dg-options "-std=gnu99" } */
3809 +#include <stdlib.h>
3810 +#include <stdarg.h>
3812 +#define NC __attribute__((noinline,noclone))
3814 +void NC vfun (char n, ...)
3825 + if (11 != va_arg (ap, int))
3829 + if (2222 != va_arg (ap, int))
3833 + if (333333 != va_arg (ap, __int24))
3837 + if (44444444 != va_arg (ap, long))
3841 + if (8888888888888888 != va_arg (ap, long long))
3850 +void NC boo_qi (const __flash char *p)
3855 +void NC boox_qi (const __memx char *p)
3860 +void NC boo_hi (const __flash int *p)
3865 +void NC boox_hi (const __memx int *p)
3870 +void NC boo_psi (const __flash __int24 *p)
3875 +void NC boox_psi (const __memx __int24 *p)
3880 +void NC boo_si (const __flash long *p)
3885 +void NC boox_si (const __memx long *p)
3890 +void NC boo_di (const __flash long long *p)
3895 +void NC boox_di (const __memx long long *p)
3900 +const __flash char f_qi = 11;
3901 +const __flash int f_hi = 2222;
3902 +const __flash __int24 f_psi = 333333;
3903 +const __flash long f_si = 44444444;
3904 +const __flash long long f_di = 8888888888888888;
3906 +const __memx char x_qi = 11;
3907 +const __memx int x_hi = 2222;
3908 +const __memx __int24 x_psi = 333333;
3909 +const __memx long x_si = 44444444;
3910 +const __memx long long x_di = 8888888888888888;
3914 +__int24 r_psi = 333333;
3915 +long r_si = 44444444;
3916 +long long r_di = 8888888888888888;
3928 + boox_psi (&x_psi);
3934 + boox_psi (&r_psi);
3940 Index: gcc/testsuite/gcc.target/i386/pr61923.c
3941 ===================================================================
3942 --- gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release) (revision 0)
3943 +++ gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch) (revision 217117)
3945 +/* PR debug/61923 */
3946 +/* { dg-do compile } */
3947 +/* { dg-options "-O2 -fcompare-debug" } */
3959 +struct ext4_map_blocks
3965 +int ext4_da_map_blocks_ei_0;
3966 +void fn1 (int p1, struct ext4_map_blocks *p2)
3971 + ext4_da_map_blocks_ei_0++;
3972 + arch_spinlock_t *lock;
3973 + switch (sizeof *&lock->tickets.head)
3975 + asm("" : "+m"(*&lock->tickets.head) : ""(0));
3979 + fn2 (p2->m_lblk, p2->m_len);
3981 Index: gcc/testsuite/gcc.target/i386/pr61423.c
3982 ===================================================================
3983 --- gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release) (revision 0)
3984 +++ gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch) (revision 217117)
3986 +/* PR target/61423 */
3987 +/* { dg-do run { target ia32 } } */
3988 +/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
3991 +static unsigned int A[N];
3994 +__attribute__((noinline))
3997 + unsigned int sum = 0;
4001 + for (i = 0; i < N; i++)
4014 + for(i = 0; i < N; i++)
4020 + __builtin_abort ();
4024 Index: gcc/testsuite/gcc.target/i386/pr60901.c
4025 ===================================================================
4026 --- gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release) (revision 0)
4027 +++ gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch) (revision 217117)
4029 +/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
4032 +extern void bar (void);
4033 +extern int baz (int);
4039 + for (j = 0; j < n; j++)
4041 + for (i = 1; i < j; i++)
4046 Index: gcc/testsuite/gcc.target/i386/pr61801.c
4047 ===================================================================
4048 --- gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release) (revision 0)
4049 +++ gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch) (revision 217117)
4051 +/* PR rtl-optimization/61801 */
4052 +/* { dg-do compile } */
4053 +/* { dg-options "-Os -fcompare-debug" } */
4067 + asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
4072 Index: gcc/testsuite/gcc.target/i386/pr61446.c
4073 ===================================================================
4074 --- gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release) (revision 0)
4075 +++ gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch) (revision 217117)
4077 +/* PR rtl-optimization/61446 */
4079 +/* { dg-do compile { target { ia32 } } } */
4080 +/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
4085 + const double dfa = a;
4086 + const unsigned int hi = dfa / 0x1p32f;
4087 + const unsigned int lo = dfa - (double) hi * 0x1p32f;
4089 + return ((unsigned long long) hi << (4 * (8))) | lo;
4091 Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
4092 ===================================================================
4093 --- gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release) (revision 0)
4094 +++ gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch) (revision 217117)
4096 +/* { dg-do run } */
4097 +/* { dg-options "-march=octeon" } */
4099 +extern void abort (void);
4103 + struct node *next;
4104 + struct node *prev;
4111 + struct node *first;
4114 +struct head heads[5];
4118 +struct head *head = &heads[2];
4120 +static int __attribute__((noinline))
4123 + node.prev = (void *)head;
4124 + head->first = &node;
4126 + struct node *n = head->first;
4127 + struct head *h = &heads[k];
4128 + struct node *next = n->next;
4130 + if (n->prev == (void *)h)
4133 + n->prev->next = next;
4135 + n->next = h->first;
4136 + return n->next == &node;
4146 Index: gcc/testsuite/gcc.target/sh/pr61996.c
4147 ===================================================================
4148 --- gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release) (revision 0)
4149 +++ gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch) (revision 217117)
4151 +/* Check that the option -musermode has no effect on targets that do not
4152 + support user/privileged mode and that it does not interfere with option
4153 + -matomic-model=soft-imask. */
4154 +/* { dg-do compile } */
4155 +/* { dg-options "-matomic-model=soft-imask" } */
4156 +/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
4163 Index: gcc/testsuite/lib/target-supports.exp
4164 ===================================================================
4165 --- gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release) (revision 217117)
4166 +++ gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch) (revision 217117)
4167 @@ -1790,6 +1790,15 @@
4171 +# Return 1 if the target supports long double of 128 bits,
4174 +proc check_effective_target_longdouble128 { } {
4175 + return [check_no_compiler_messages longdouble128 object {
4176 + int dummy[sizeof(long double) == 16 ? 1 : -1];
4180 # Return 1 if the target supports double of 64 bits,
4183 @@ -5329,3 +5338,40 @@
4188 +# Return 1 if <fenv.h> is available with all the standard IEEE
4189 +# exceptions and floating-point exceptions are raised by arithmetic
4190 +# operations. (If the target requires special options for "inexact"
4191 +# exceptions, those need to be specified in the testcases.)
4193 +proc check_effective_target_fenv_exceptions {} {
4194 + return [check_runtime fenv_exceptions {
4196 + #include <stdlib.h>
4197 + #ifndef FE_DIVBYZERO
4198 + # error Missing FE_DIVBYZERO
4200 + #ifndef FE_INEXACT
4201 + # error Missing FE_INEXACT
4203 + #ifndef FE_INVALID
4204 + # error Missing FE_INVALID
4206 + #ifndef FE_OVERFLOW
4207 + # error Missing FE_OVERFLOW
4209 + #ifndef FE_UNDERFLOW
4210 + # error Missing FE_UNDERFLOW
4212 + volatile float a = 0.0f, r;
4217 + if (fetestexcept (FE_INVALID))
4224 Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
4225 ===================================================================
4226 --- gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
4227 +++ gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4229 ! { dg-require-effective-target fortran_large_real }
4230 -! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
4231 -! Test XFAILed on these platforms because the system's printf() lacks
4232 +! { dg-do run { xfail powerpc*-apple-darwin* } }
4233 +! Test XFAILed on this platform because the system's printf() lacks
4234 ! proper support for denormalized long doubles. See PR24685
4236 ! This tests that the default formats for formatted I/O of reals are
4237 Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
4238 ===================================================================
4239 --- gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4240 +++ gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4242 +! { dg-do compile }
4243 +! { dg-options "-fdump-tree-original" }
4244 +! PR 61999 - this used to ICE.
4245 +! Original test case by A. Kasahara
4247 + use, intrinsic:: iso_fortran_env, only: output_unit
4251 + write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
4255 +! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
4256 +! { dg-final { cleanup-tree-dump "original" } }
4257 Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
4258 ===================================================================
4259 --- gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4260 +++ gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4263 +! { dg-do compile }
4264 +! { dg-options "-fopenmp" }
4267 + integer, parameter :: p(2) = (/ 11, 12 /)
4270 + !$omp parallel do default(none)
4275 Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
4276 ===================================================================
4277 --- gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4278 +++ gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4281 +! { dg-do compile }
4282 +! { dg-options "-fopenmp" }
4286 + integer :: s1, s2, s3
4289 + type(t), parameter :: u = t(1, 2, 3)
4291 + !$omp parallel do default(none)
4296 Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
4297 ===================================================================
4298 --- gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4299 +++ gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4302 +! { dg-options "-fcray-pointer" }
4317 + if (z /= 42) call abort
4319 Index: gcc/testsuite/gfortran.dg/dependency_44.f90
4320 ===================================================================
4321 --- gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4322 +++ gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4325 +! Tests fix for PR61780 in which the loop reversal mechanism was
4326 +! not accounting for the first index being an element so that no
4327 +! loop in this dimension is created.
4329 +! Contributed by Manfred Tietze on clf.
4333 + integer, parameter :: n = 10, k = 3
4335 + integer, dimension(n,n) :: y
4336 + integer :: res1(n), res2(n)
4349 + y(k,4:n) = y(k,3:n-1)
4353 + y(k,n:4:-1) = y(k,n-1:3:-1)
4358 + if (any(res1 /= res2)) call abort ()
4360 Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
4361 ===================================================================
4362 --- gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release) (revision 0)
4363 +++ gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch) (revision 217117)
4365 +C { dg-do compile }
4367 + INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
4370 + INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
4373 Index: gcc/testsuite/gfortran.dg/nint_2.f90
4374 ===================================================================
4375 --- gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
4376 +++ gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4378 ! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
4381 -! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
4382 +! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
4383 +! Note that this doesn't fail on powerpc64le-*-linux*.
4385 integer(kind=8) :: i1, i2
4387 Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
4388 ===================================================================
4389 --- gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
4390 +++ gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4394 call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4395 - call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4396 + call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
4397 call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4398 call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4400 Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
4401 ===================================================================
4402 --- gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4403 +++ gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4406 +! { dg-options "-ffrontend-optimize" }
4407 +! PR 62214 - this used to give the wrong result.
4408 +! Original test case by Oliver Fuhrer
4411 + CHARACTER(LEN=20) :: fullNames(2)
4412 + CHARACTER(LEN=255) :: pathName
4413 + CHARACTER(LEN=5) :: fileNames(2)
4415 + pathName = "/dir1/dir2/"
4416 + fileNames = (/ "file1", "file2" /)
4417 + fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
4418 + if (fullNames(1) /= '/dir1/dir2/file1' .or. &
4419 + & fullnames(2) /= '/dir1/dir2/file2') call abort
4421 Index: gcc/testsuite/gfortran.dg/pr45636.f90
4422 ===================================================================
4423 --- gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
4424 +++ gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4429 -! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
4430 +! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
4431 ! { dg-final { cleanup-tree-dump "forwprop2" } }
4432 Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
4433 ===================================================================
4434 --- gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release) (revision 0)
4435 +++ gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4438 +! Test the fix for PR61459.
4440 +! Contributed by John Wingate <johnww@tds.net>
4446 + public :: f_segfault, f_segfault_plus, f_workaround
4447 + integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
4451 + function f_segfault(x)
4452 + real, dimension(:), allocatable :: f_segfault
4453 + real, dimension(:), intent(in) :: x
4454 + allocate(f_segfault(2))
4455 + f_segfault = matmul(b,x)
4456 + end function f_segfault
4458 +! Sefaulted without the ALLOCATE as well.
4459 + function f_segfault_plus(x)
4460 + real, dimension(:), allocatable :: f_segfault_plus
4461 + real, dimension(:), intent(in) :: x
4462 + f_segfault_plus = matmul(b,x)
4463 + end function f_segfault_plus
4465 + function f_workaround(x)
4466 + real, dimension(:), allocatable :: f_workaround
4467 + real, dimension(:), intent(in) :: x
4468 + real, dimension(:), allocatable :: tmp
4469 + allocate(f_workaround(2),tmp(2))
4471 + f_workaround = tmp
4472 + end function f_workaround
4479 + real, dimension(2) :: x = 1.0, y
4480 + y = f_workaround (x)
4481 + if (any (f_segfault (x) .ne. y)) call abort
4482 + if (any (f_segfault_plus (x) .ne. y)) call abort
4484 Index: gcc/testsuite/gfortran.dg/bessel_7.f90
4485 ===================================================================
4486 --- gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release) (revision 217117)
4487 +++ gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch) (revision 217117)
4490 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]
4491 real,parameter :: myeps(size(values)) = epsilon(0.0) &
4492 - * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
4493 + * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
4494 ! The following is sufficient for me - the values above are a bit
4496 ! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
4497 Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
4498 ===================================================================
4499 --- gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release) (revision 0)
4500 +++ gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch) (revision 217117)
4502 +#ifdef __INT32_TYPE__
4503 +typedef __INT32_TYPE__ int32_t;
4505 +typedef int int32_t;
4508 +#ifdef __UINT32_TYPE__
4509 +typedef __UINT32_TYPE__ uint32_t;
4511 +typedef unsigned uint32_t;
4514 +#define __fake_const_swab32(x) ((uint32_t)( \
4515 + (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
4516 + (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
4517 + (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
4518 + (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
4520 +/* Previous version of bswap optimization failed to consider sign extension
4521 + and as a result would replace an expression *not* doing a bswap by a
4524 +__attribute__ ((noinline, noclone)) uint32_t
4525 +fake_bswap32 (uint32_t in)
4527 + return __fake_const_swab32 (in);
4533 + if (sizeof (int32_t) * __CHAR_BIT__ != 32)
4535 + if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4537 + if (fake_bswap32 (0x87654321) != 0xffffff87)
4538 + __builtin_abort ();
4541 Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
4542 ===================================================================
4543 --- gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release) (revision 0)
4544 +++ gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch) (revision 217117)
4546 +set additional_flags "-Wno-psabi"
4548 Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
4549 ===================================================================
4550 --- gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release) (revision 0)
4551 +++ gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch) (revision 217117)
4559 +static union U u = { 0x12345678 };
4561 +/* Constant folding used to fail to account for endianness when folding a
4567 +#ifdef __BYTE_ORDER__
4568 +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4569 + return u.b - 0x45678;
4571 + return u.b - 0x12345;
4576 Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
4577 ===================================================================
4578 --- gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release) (revision 0)
4579 +++ gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch) (revision 217117)
4591 + __builtin_abort ();
4594 Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
4595 ===================================================================
4596 --- gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release) (revision 217117)
4597 +++ gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch) (revision 217117)
4599 set additional_flags "-mno-mmx"
4602 +set additional_flags "-Wno-psabi"
4604 Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
4605 ===================================================================
4606 --- gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release) (revision 0)
4607 +++ gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch) (revision 217117)
4609 +#ifdef __INT16_TYPE__
4610 +typedef __INT16_TYPE__ int16_t;
4612 +typedef short int16_t;
4615 +#ifdef __UINT32_TYPE__
4616 +typedef __UINT32_TYPE__ uint32_t;
4618 +typedef unsigned uint32_t;
4621 +#define __fake_const_swab32(x) ((uint32_t)( \
4622 + (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
4623 + (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
4624 + (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
4625 + (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
4628 +/* Previous version of bswap optimization failed to consider sign extension
4629 + and as a result would replace an expression *not* doing a bswap by a
4632 +__attribute__ ((noinline, noclone)) uint32_t
4633 +fake_bswap32 (uint32_t in)
4635 + return __fake_const_swab32 (in);
4641 + if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4643 + if (sizeof (int16_t) * __CHAR_BIT__ != 16)
4645 + if (fake_bswap32 (0x81828384) != 0xff838281)
4646 + __builtin_abort ();
4649 Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
4650 ===================================================================
4651 --- gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release) (revision 0)
4652 +++ gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch) (revision 217117)
4654 +#ifdef __UINT64_TYPE__
4655 +typedef __UINT64_TYPE__ uint64_t;
4657 +typedef unsigned long long uint64_t;
4660 +#ifndef __SIZEOF_INT128__
4661 +#define __int128 long long
4664 +/* Some version of bswap optimization would ICE when analyzing a mask constant
4665 + too big for an HOST_WIDE_INT (PR61375). */
4667 +__attribute__ ((noinline, noclone)) uint64_t
4668 +uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
4670 + __int128 mask = (__int128)0xffff << 56;
4671 + return ((in1 & mask) >> 56) | in2;
4678 +#ifdef __SIZEOF_INT128__
4681 + if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
4683 + if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
4685 + if (uint128_central_bitsi_ior (in, 2) != 0x102)
4686 + __builtin_abort ();
4689 Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
4690 ===================================================================
4691 --- gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release) (revision 217117)
4692 +++ gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch) (revision 217117)
4697 +set additional_flags "-Wno-psabi"
4699 Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
4700 ===================================================================
4701 --- gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release) (revision 0)
4702 +++ gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch) (revision 217117)
4704 +set additional_flags "-Wno-psabi"
4706 Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
4707 ===================================================================
4708 --- gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release) (revision 0)
4709 +++ gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch) (revision 217117)
4711 +/* PR tree-optimization/61684 */
4716 +static short **e = 0;
4721 + for (; c < 1; c++)
4724 + a = d && (c && 1) & *b;
4726 Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
4727 ===================================================================
4728 --- gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release) (revision 0)
4729 +++ gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch) (revision 217117)
4731 +/* PR inline-asm/63282 */
4738 + asm volatile goto ("" : : : : a, b);
4744 Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
4745 ===================================================================
4746 --- gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release) (revision 0)
4747 +++ gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch) (revision 217117)
4749 +with Ada.Streams; use Ada.Streams;
\r
4751 +package body Opt41_Pkg is
\r
4753 + type Wstream is new Root_Stream_Type with record
\r
4754 + S : Unbounded_String;
\r
4757 + procedure Read (Stream : in out Wstream;
\r
4758 + Item : out Stream_Element_Array;
\r
4759 + Last : out Stream_Element_Offset) is null;
\r
4761 + procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
\r
4763 + for J in Item'Range loop
\r
4764 + Append (Stream.S, Character'Val (Item (J)));
\r
4768 + function Rec_Write (R : Rec) return Unbounded_String is
\r
4769 + S : aliased Wstream;
\r
4771 + Rec'Output (S'Access, R);
\r
4775 + type Rstream is new Root_Stream_Type with record
\r
4776 + S : String_Access;
\r
4777 + Idx : Integer := 1;
\r
4780 + procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
\r
4782 + procedure Read (Stream : in out Rstream;
\r
4783 + Item : out Stream_Element_Array;
\r
4784 + Last : out Stream_Element_Offset) is
\r
4786 + Last := Stream_Element_Offset'Min
\r
4787 + (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
\r
4788 + for I in Item'First .. Last loop
\r
4789 + Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
\r
4790 + Stream.Idx := Stream.Idx + 1;
\r
4794 + function Rec_Read (Str : String_Access) return Rec is
\r
4795 + S : aliased Rstream;
\r
4798 + return Rec'Input (S'Access);
\r
4802 Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
4803 ===================================================================
4804 --- gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release) (revision 0)
4805 +++ gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch) (revision 217117)
4807 +with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
\r
4809 +package Opt41_Pkg is
\r
4811 + type Enum is (One, Two, Three, Four, Five, Six);
\r
4813 + type Rec (D : Enum) is record
\r
4817 + when Two | Five | Six =>
\r
4818 + S : Unbounded_String;
\r
4820 + when Two => B : Boolean;
\r
4821 + when others => null;
\r
4828 + type Rec_Ptr is access all Rec;
\r
4830 + function Rec_Write (R : Rec) return Unbounded_String;
\r
4832 + function Rec_Read (Str : String_Access) return Rec;
\r
4835 Index: gcc/testsuite/gnat.dg/opt39.adb
4836 ===================================================================
4837 --- gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release) (revision 0)
4838 +++ gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch) (revision 217117)
4840 +-- { dg-do compile }
4841 +-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
4843 +procedure Opt39 (I : Integer) is
4845 + type Rec is record
4853 + procedure Set (A : access Rec; I : Integer) is
4854 + Tmp : Rec := A.all;
4863 + Set (R'Access, I);
4865 + raise Program_Error;
4869 +-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
4870 +-- { dg-final { cleanup-tree-dump "optimized" } }
4871 Index: gcc/testsuite/gnat.dg/opt41.adb
4872 ===================================================================
4873 --- gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release) (revision 0)
4874 +++ gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch) (revision 217117)
4877 +-- { dg-options "-Os" }
4879 +with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
4880 +with Opt41_Pkg; use Opt41_Pkg;
4883 + R : Rec := (Five, To_Unbounded_String ("CONFIG"));
4884 + SP : String_Access := new String'(To_String (Rec_Write (R)));
4885 + RP : Rec_Ptr := new Rec'(Rec_Read (SP));
4887 + if RP.D /= R.D then
4888 + raise Program_Error;
4891 Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
4892 ===================================================================
4893 --- gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release) (revision 0)
4894 +++ gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch) (revision 217117)
4897 +-- { dg-options "-gnato -O" }
4899 +procedure Overflow_Fixed is
4901 + type Unsigned_8_Bit is mod 2**8;
4903 + procedure Fixed_To_Eight (Value : Duration) is
4904 + Item : Unsigned_8_Bit;
4906 + Item := Unsigned_8_Bit(Value);
4907 + raise Program_Error;
4909 + when Constraint_Error => null; -- expected case
4913 + Fixed_To_Eight (-0.5);
4915 Index: gcc/testsuite/gnat.dg/aliasing1.adb
4916 ===================================================================
4917 --- gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release) (revision 217117)
4918 +++ gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch) (revision 217117)
4923 --- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
4924 +-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
4925 -- { dg-final { cleanup-tree-dump "optimized" } }
4926 Index: gcc/testsuite/gcc.dg/pr60866.c
4927 ===================================================================
4928 --- gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release) (revision 0)
4929 +++ gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch) (revision 217117)
4931 +/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
4932 +/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
4937 +foo (int w, int **dnroot, int **dn)
4940 + int *xchild = xchild;
4941 + for (; w < n; w++)
4945 + for (child = *dn; child; child = xchild)
4949 Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
4950 ===================================================================
4951 --- gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release) (revision 217117)
4952 +++ gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch) (revision 217117)
4954 /* { dg-do compile } */
4955 +/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4956 #include <altivec.h>
4957 typedef const volatile unsigned int _1;
4958 typedef const unsigned int _2;
4959 Index: gcc/testsuite/gcc.dg/vmx/ops.c
4960 ===================================================================
4961 --- gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release) (revision 217117)
4962 +++ gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch) (revision 217117)
4964 /* { dg-do compile } */
4965 +/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4966 #include <altivec.h>
4968 extern char * *var_char_ptr;
4969 Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
4970 ===================================================================
4971 --- gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release) (revision 217117)
4972 +++ gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch) (revision 217117)
4974 /* { dg-do compile } */
4975 +/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4977 /* Checks from the original ops.c that pass pointers to long or
4978 unsigned long for operations that support that in released versions
4979 Index: gcc/testsuite/gcc.dg/pr63342.c
4980 ===================================================================
4981 --- gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release) (revision 0)
4982 +++ gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch) (revision 217117)
4984 +/* PR debug/63342 */
4985 +/* { dg-do compile } */
4986 +/* { dg-options "-g -O2" } */
4987 +/* { dg-additional-options "-fpic" { target fpic } } */
4989 +static __thread double u[9], v[9];
4992 +foo (double **p, double **q)
5003 + for (i = 0; i < 9; i++)
5005 + double a = x + v[i];
5006 + s += u[i] * a * a;
5010 Index: gcc/testsuite/gcc.dg/pr63284.c
5011 ===================================================================
5012 --- gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release) (revision 0)
5013 +++ gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch) (revision 217117)
5015 +/* PR debug/63284 */
5016 +/* { dg-do compile } */
5017 +/* { dg-options "-O2 -fcompare-debug" } */
5019 +int a[10], *b, *d, c, f;
5057 Index: gcc/testsuite/gcc.dg/pr61045.c
5058 ===================================================================
5059 --- gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release) (revision 0)
5060 +++ gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch) (revision 217117)
5062 +/* { dg-do run } */
5063 +/* { dg-options "-fstrict-overflow" } */
5068 + int b = __INT_MAX__;
5069 + int t = (a - 2) > (b - 1);
5071 + __builtin_abort();
5074 Index: gcc/testsuite/gcc.dg/pr52769.c
5075 ===================================================================
5076 --- gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release) (revision 0)
5077 +++ gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch) (revision 217117)
5080 +/* { dg-do run } */
5081 +/* { dg-options "-O3" } */
5085 + int should_be_zero;
5093 + volatile foo_t foo = {
5098 + if (foo.should_be_zero != 0)
5099 + __builtin_abort ();
5103 Index: gcc/testsuite/gcc.dg/pr62004.c
5104 ===================================================================
5105 --- gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release) (revision 0)
5106 +++ gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch) (revision 217117)
5108 +/* { dg-do run } */
5109 +/* { dg-options "-O2 -fno-tree-tail-merge" } */
5113 + struct node *next;
5114 + struct node *prev;
5121 + struct node *first;
5124 +struct head heads[5];
5128 +struct head *head = &heads[2];
5135 + node.next = (void*)0;
5137 + node.prev = (void *)head;
5139 + head->first = &node;
5141 + struct node *n = head->first;
5143 + struct head *h = &heads[k];
5145 + heads[2].first = n->next;
5147 + if ((void*)n->prev == (void *)h)
5150 + /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5151 + p = n->prev->next;
5153 + return !(p == (void*)0);
5155 Index: gcc/testsuite/gcc.dg/pr51879-18.c
5156 ===================================================================
5157 --- gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release) (revision 217117)
5158 +++ gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch) (revision 217117)
5163 -/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
5164 +/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
5165 /* { dg-final { cleanup-tree-dump "pre" } } */
5166 Index: gcc/testsuite/gcc.dg/torture/pr61964.c
5167 ===================================================================
5168 --- gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release) (revision 0)
5169 +++ gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch) (revision 217117)
5171 +/* { dg-do run } */
5173 +extern void abort (void);
5175 +struct node { struct node *next, *prev; } node;
5176 +struct head { struct node *first; } heads[5];
5178 +struct head *head = &heads[2];
5180 +static int __attribute__((noinline))
5183 + node.prev = (void *)head;
5184 + head->first = &node;
5186 + struct node *n = head->first;
5187 + struct head *h = &heads[k];
5189 + if (n->prev == (void *)h)
5190 + h->first = n->next;
5192 + n->prev->next = n->next;
5194 + n->next = h->first;
5195 + return n->next == &node;
5204 Index: gcc/testsuite/gcc.dg/torture/pr61010.c
5205 ===================================================================
5206 --- gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release) (revision 0)
5207 +++ gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch) (revision 217117)
5209 +/* { dg-do compile } */
5214 + unsigned b = (a * 64 & 192) | 63U;
5217 Index: gcc/testsuite/gcc.dg/torture/pr61452.c
5218 ===================================================================
5219 --- gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release) (revision 0)
5220 +++ gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch) (revision 217117)
5222 +/* { dg-do run } */
5229 +fn1 (int p1, char p2)
5231 + return p1 || p2 ? 0 : p2;
5242 + b = fn1 (g = d = e, g);
5253 Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
5254 ===================================================================
5255 --- gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release) (revision 0)
5256 +++ gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch) (revision 217117)
5258 +/* { dg-do run } */
5260 +int a, b = 1, c, d, e, f, g;
5269 + g = g ? 0 : 1 % g;
5271 + for (; d < 1; d = e)
5293 Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
5294 ===================================================================
5295 --- gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release) (revision 0)
5296 +++ gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch) (revision 217117)
5298 +/* Test that exact underflow in __float128 signals the underflow
5299 + exception if trapping is enabled, but does not raise the flag
5302 +/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
5303 +/* { dg-options "-D_GNU_SOURCE" } */
5304 +/* { dg-require-effective-target fenv_exceptions } */
5307 +#include <setjmp.h>
5308 +#include <signal.h>
5309 +#include <stdlib.h>
5311 +volatile sig_atomic_t caught_sigfpe;
5315 +handle_sigfpe (int sig)
5317 + caught_sigfpe = 1;
5318 + siglongjmp (buf, 1);
5324 + volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
5325 + volatile __float128 r;
5327 + if (fetestexcept (FE_UNDERFLOW))
5329 + if (r != 0x1p-16384q)
5331 + feenableexcept (FE_UNDERFLOW);
5332 + signal (SIGFPE, handle_sigfpe);
5333 + if (sigsetjmp (buf, 1) == 0)
5335 + if (!caught_sigfpe)
5339 Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
5340 ===================================================================
5341 --- gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release) (revision 217117)
5342 +++ gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch) (revision 217117)
5344 T (20, 0, 4, 1, 5) \
5345 T (21, 2, 6, 3, 7) \
5346 T (22, 1, 2, 3, 0) \
5348 +T (23, 2, 1, 0, 3) \
5351 T (116, 1, 2, 4, 3) \
5352 T (117, 7, 3, 3, 0) \
5354 T (119, 0, 3, 5, 6) \
5355 T (120, 0, 0, 1, 5) \
5356 T (121, 4, 6, 2, 1) \
5357 -T (122, 2, 5, 6, 3) \
5358 T (123, 4, 6, 3, 2) \
5359 T (124, 4, 7, 5, 6) \
5360 T (125, 0, 4, 2, 4) \
5361 Index: gcc/testsuite/gcc.dg/stack-usage-2.c
5362 ===================================================================
5363 --- gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release) (revision 217117)
5364 +++ gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch) (revision 217117)
5366 /* { dg-do compile } */
5367 /* { dg-options "-Wstack-usage=512" } */
5370 +int foo1 (void) /* { dg-bogus "stack usage" } */
5375 -} /* { dg-bogus "stack usage" } */
5379 +int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5384 -} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5388 +int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5390 char arr[1024] __attribute__((aligned (512)));
5393 /* Force dynamic realignment of argument pointer. */
5394 __builtin_apply ((void (*)()) foo2, 0, 0);
5398 -} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5401 +int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
5406 -} /* { dg-warning "stack usage might be unbounded" } */
5408 Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
5409 ===================================================================
5410 --- gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release) (revision 0)
5411 +++ gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch) (revision 217117)
5413 +/* { dg-do compile } */
5414 +/* { dg-options "-O3" } */
5424 +static int fn2 (struct S);
5425 +void fn3 (struct S);
5430 + struct S h = { 0, 0 };
5438 + struct S j = { 0, 0 };
5457 + struct S f = { 0, 0 };
5461 Index: gcc/testsuite/gcc.dg/pr62030.c
5462 ===================================================================
5463 --- gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release) (revision 0)
5464 +++ gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch) (revision 217117)
5466 +/* { dg-do run } */
5467 +/* { dg-options "-O2" } */
5469 +extern void abort (void);
5473 + struct node *next;
5474 + struct node *prev;
5481 + struct node *first;
5484 +struct head heads[5];
5488 +struct head *head = &heads[2];
5490 +static int __attribute__((noinline))
5493 + node.prev = (void *)head;
5494 + head->first = &node;
5496 + struct node *n = head->first;
5497 + struct head *h = &heads[k];
5498 + struct node *next = n->next;
5500 + if (n->prev == (void *)h)
5503 + n->prev->next = next;
5505 + n->next = h->first;
5506 + return n->next == &node;
5516 Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
5517 ===================================================================
5518 --- gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release) (revision 0)
5519 +++ gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch) (revision 217117)
5521 +/* PR tree-optimization/63341 */
5522 +/* { dg-do run } */
5524 +#include "tree-vect.h"
5526 +typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
5527 +struct S { char e __attribute__((aligned (64))); U s[32]; };
5528 +struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
5529 + {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
5530 + {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
5531 + {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
5532 +unsigned short d[32] = { 1 };
5534 +__attribute__((noinline, noclone)) void
5538 + for (i = 0; i < 32; i++)
5539 + d[i] = t.s[i].s + 4;
5540 + for (i = 0; i < 32; i++)
5541 + if (d[i] != t.s[i].s + 4)
5544 + asm volatile ("" : : : "memory");
5555 +/* { dg-final { cleanup-tree-dump "vect" } } */
5556 Index: gcc/testsuite/gcc.dg/vect/pr63189.c
5557 ===================================================================
5558 --- gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release) (revision 0)
5559 +++ gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch) (revision 217117)
5561 +/* PR tree-optimization/63189 */
5562 +/* { dg-do run } */
5564 +#include "tree-vect.h"
5566 +short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
5568 +__attribute__((noinline, noclone)) void
5572 + for (j = 0; j < 8; j++)
5586 +/* { dg-final { cleanup-tree-dump "vect" } } */
5587 Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
5588 ===================================================================
5589 --- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release) (revision 0)
5590 +++ gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch) (revision 217117)
5592 +/* { dg-require-effective-target vect_int } */
5594 +#include <stdarg.h>
5595 +#include "tree-vect.h"
5600 +signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5601 +signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5603 +/* (short, int)->int->int dot product.
5604 + Not detected as a dot-product pattern. */
5606 +__attribute__ ((noinline)) int
5612 + for (i = 0; i < len; i++)
5614 + result += (X[i] * Y[i]);
5620 +/* (int, short)->int->int dot product.
5621 + Not detected as a dot-product pattern. */
5623 +__attribute__ ((noinline)) int
5629 + for (i = 0; i < len; i++)
5631 + result += (Y[i] * X[i]);
5644 + for (i = 0; i < N; i++)
5648 + __asm__ volatile ("");
5662 +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
5663 +/* { dg-final { cleanup-tree-dump "vect" } } */
5665 Index: gcc/testsuite/gcc.dg/vect/pr62073.c
5666 ===================================================================
5667 --- gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release) (revision 0)
5668 +++ gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch) (revision 217117)
5670 +/* { dg-do compile } */
5671 +/* { dg-additional-options "-O1" } */
5681 +int foo (long long p_56, int * p_57)
5688 + int **l_78 = &l_77;
5693 + for (g_76 = 1; g_76 >= 0; g_76--)
5696 + for (l_101 = 4; l_101 >= 0; l_101--)
5701 + int **l_113 = &l_77;
5709 +/* { dg-final { cleanup-tree-dump "vect" } } */
5710 Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
5711 ===================================================================
5712 --- gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release) (revision 0)
5713 +++ gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch) (revision 217117)
5715 +/* PR tree-optimization/63189 */
5716 +/* { dg-additional-options "-fwrapv" } */
5717 +/* { dg-do run } */
5719 +#include "tree-vect.h"
5721 +__attribute__((noinline, noclone)) static int
5722 +bar (const short *a, int len)
5727 + for (x = 0; x < len; x++)
5732 +__attribute__((noinline, noclone)) void
5735 + short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
5736 + if (bar (stuff, 9) != 36)
5748 +/* { dg-final { cleanup-tree-dump "vect" } } */
5749 Index: gcc/testsuite/gcc.dg/vect/pr62075.c
5750 ===================================================================
5751 --- gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release) (revision 0)
5752 +++ gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch) (revision 217117)
5754 +/* { dg-do compile } */
5767 + for (i = 0; i < 16; ++i)
5769 + x->b[i][0] = a[i][0];
5770 + x->c[i][0] = 0 != a[i][0];
5771 + x->b[i][1] = a[i][1];
5775 +/* { dg-final { cleanup-tree-dump "vect" } } */
5776 Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
5777 ===================================================================
5778 --- gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release) (revision 0)
5779 +++ gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch) (revision 217117)
5781 +/* PR tree-optimization/63189 */
5782 +/* { dg-do run } */
5784 +#include "tree-vect.h"
5786 +static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
5787 +static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
5789 +__attribute__((noinline, noclone)) static int
5793 + for (i = 0; i < 8; ++i)
5794 + sum += a[i] * b[i];
5798 +__attribute__((noinline, noclone)) void
5813 +/* { dg-final { cleanup-tree-dump "vect" } } */
5814 Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
5815 ===================================================================
5816 --- gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release) (revision 0)
5817 +++ gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch) (revision 217117)
5819 +/* PR tree-optimization/63341 */
5820 +/* { dg-do run } */
5822 +#include "tree-vect.h"
5824 +typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
5825 +struct S { char e __attribute__((aligned (64))); U s[32]; };
5826 +struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
5827 + {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
5828 + {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
5829 + {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
5830 +unsigned short d[32] = { 1 };
5832 +__attribute__((noinline, noclone)) void
5836 + for (i = 0; i < 32; i++)
5838 + if (__builtin_memcmp (d, t.s, sizeof d))
5850 +/* { dg-final { cleanup-tree-dump "vect" } } */
5851 Index: gcc/testsuite/ChangeLog
5852 ===================================================================
5853 --- gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
5854 +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
5856 +2014-11-03 Marek Polacek <polacek@redhat.com>
5859 + * gcc.dg/pr52769.c: New test.
5861 +2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5863 + * gcc.target/aarch64/madd_after_asm_1.c: New test.
5865 +2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
5867 + * gnat.dg/opt41.adb: New test.
5868 + * gnat.dg/opt41_pkg.ad[sb]: New helper.
5870 +2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5872 + Backport from mainline r215880
5873 + 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5875 + * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
5876 + failing with the new warning message.
5877 + * gcc.dg/vmx/3c-01a.c: Likewise.
5878 + * gcc.dg/vmx/ops-long-1.c: Likewise.
5879 + * gcc.dg/vmx/ops.c: Likewise.
5880 + * gcc.target/powerpc/altivec-20.c: Likewise.
5881 + * gcc.target/powerpc/altivec-6.c: Likewise.
5882 + * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
5883 + * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
5884 + * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
5886 + Backport from mainline r215882
5887 + 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5889 + * gcc.target/powerpc/lvsl-lvsr.c: New test.
5891 + Backport from mainline r216017
5892 + 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
5894 + * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
5895 + * gcc.dg/vmx/ops.c: Likewise.
5896 + * gcc.dg/vmx/ops-long-1.c: Likewise.
5898 +2014-10-10 Jakub Jelinek <jakub@redhat.com>
5901 + * gfortran.dg/gomp/pr59488-1.f90: New test.
5902 + * gfortran.dg/gomp/pr59488-2.f90: New test.
5904 +2014-10-01 Jakub Jelinek <jakub@redhat.com>
5907 + * gcc.dg/pr63342.c: New test.
5910 + * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
5911 + to test 24 in TESTS.
5913 +2014-10-01 Uros Bizjak <ubizjak@gmail.com>
5915 + Backport from mainline
5916 + 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5918 + * lib/target-supports.exp
5919 + (check_effective_target_fenv_exceptions): New function.
5921 +2014-09-30 Jakub Jelinek <jakub@redhat.com>
5923 + PR inline-asm/63282
5924 + * gcc.c-torture/compile/pr63282.c: New test.
5926 +2014-09-26 Jakub Jelinek <jakub@redhat.com>
5928 + * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
5929 + to default options.
5931 +2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5933 + Backport from mainline r215559
5934 + 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5937 + * gcc.target/powerpc/pr63335.c: New test.
5939 +2014-09-25 Jakub Jelinek <jakub@redhat.com>
5941 + PR tree-optimization/63341
5942 + * gcc.dg/vect/pr63341-1.c: New test.
5943 + * gcc.dg/vect/pr63341-2.c: New test.
5945 +2014-09-18 Joseph Myers <joseph@codesourcery.com>
5947 + * gcc.dg/torture/float128-exact-underflow.c: New test.
5949 +2014-09-17 Jakub Jelinek <jakub@redhat.com>
5952 + * gcc.dg/pr63284.c: New test.
5954 +2014-09-09 Richard Biener <rguenther@suse.de>
5956 + Backport from mainline
5957 + 2014-06-11 Richard Biener <rguenther@suse.de>
5959 + PR tree-optimization/61452
5960 + * gcc.dg/torture/pr61452.c: New testcase.
5962 +2014-09-09 Richard Biener <rguenther@suse.de>
5964 + Backport from mainline
5965 + 2014-05-05 Richard Biener <rguenther@suse.de>
5967 + PR middle-end/61010
5968 + * gcc.dg/torture/pr61010.c: New testcase.
5970 + 2014-05-28 Richard Biener <rguenther@suse.de>
5972 + PR middle-end/61045
5973 + * gcc.dg/pr61045.c: New testcase.
5975 + 2014-08-11 Richard Biener <rguenther@suse.de>
5977 + PR tree-optimization/62075
5978 + * gcc.dg/vect/pr62075.c: New testcase.
5980 +2014-09-08 Jakub Jelinek <jakub@redhat.com>
5982 + PR tree-optimization/60196
5983 + PR tree-optimization/63189
5984 + * gcc.dg/vect/pr63189.c: New test.
5985 + * gcc.dg/vect/pr60196-1.c: New test.
5986 + * gcc.dg/vect/pr60196-2.c: New test.
5988 + Backported from mainline
5989 + 2013-09-17 Cong Hou <congh@google.com>
5991 + * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
5992 + on two arrays with short and int types. This should not be recognized
5993 + as a dot product pattern.
5995 +2014-09-08 Jakub Jelinek <jakub@redhat.com>
5997 + Backported from mainline
5998 + 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
6001 + * gcc.target/i386/pr61923.c: New test.
6003 +2014-09-06 John David Anglin <danglin@gcc.gnu.org>
6005 + PR testsuite/56194
6006 + * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
6008 +2014-09-03 Marek Polacek <polacek@redhat.com>
6010 + Backport from mainline
6011 + 2014-09-02 Marek Polacek <polacek@redhat.com>
6014 + * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
6016 +2014-09-03 Martin Jambor <mjambor@suse.cz>
6019 + * g++.dg/ipa/pr62015.C: New test.
6021 +2014-09-03 Martin Jambor <mjambor@suse.cz>
6024 + * gcc.dg/ipa/pr61986.c: New test.
6026 +2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
6028 + * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
6029 + failure on s390*-*-linux-gnu.
6031 +2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6033 + Backport from mainline
6034 + 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6037 + * gcc.target/sh/pr61996.c: New.
6039 +2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
6041 + Backport from trunk
6043 + * gfortran.dg/array_assignment_5.f90: New test.
6045 +2014-08-15 Tom de Vries <tom@codesourcery.com>
6047 + Backport from mainline:
6048 + 2014-08-14 Tom de Vries <tom@codesourcery.com>
6050 + PR rtl-optimization/62004
6051 + PR rtl-optimization/62030
6052 + * gcc.dg/pr62004.c: New test.
6053 + * gcc.dg/pr62030.c: Same.
6054 + * gcc.target/mips/pr62030-octeon.c: Same.
6056 +2014-08-13 Felix Yang <fei.yang0953@gmail.com>
6058 + PR tree-optimization/62073
6059 + * gcc.dg/vect/pr62073.c: New test.
6061 +2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6063 + Backport from mainline
6064 + 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
6066 + PR middle-end/62103
6067 + * gcc.c-torture/execute/bitfld-6.c: New test.
6069 +2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
6071 + Backport from trunk
6073 + * gfortran.dg/dot_product_3.f90: New test case.
6075 +2014-08-07 John David Anglin <danglin@gcc.gnu.org>
6077 + PR tree-optimization/60707
6078 + * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
6080 +2014-08-06 Jakub Jelinek <jakub@redhat.com>
6082 + PR rtl-optimization/61801
6083 + * gcc.target/i386/pr61801.c: Rewritten.
6085 +2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
6087 + Backport from mainline
6088 + 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6090 + PR tree-optimization/61375
6091 + * gcc.c-torture/execute/pr61375-1.c: New test.
6093 +2014-08-01 Richard Biener <rguenther@suse.de>
6095 + PR tree-optimization/61964
6096 + * gcc.dg/torture/pr61964.c: New testcase.
6097 + * gcc.dg/pr51879-18.c: XFAIL.
6099 +2014-07-28 Richard Biener <rguenther@suse.de>
6101 + PR rtl-optimization/61801
6102 + * gcc.target/i386/pr61801.c: Fix testcase.
6104 +2014-07-28 Richard Biener <rguenther@suse.de>
6106 + PR rtl-optimization/61801
6107 + * gcc.target/i386/pr61801.c: New testcase.
6109 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6111 + Backport from mainline:
6112 + 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6114 + * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
6116 + * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
6117 + * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
6118 + * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
6119 + * gcc.c-torture/execute/pr23135.x: Likewise.
6121 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6123 + Backport from mainline:
6124 + 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6126 + * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
6128 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6130 + Backport from mainline:
6131 + 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6133 + * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
6135 +2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6137 + Backport from mainline:
6138 + 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6140 + * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
6142 +2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
6144 + * gcc.dg/stack-usage-2.c: Adjust.
6146 +2014-07-19 Paul Thomas <pault@gcc.gnu.org>
6148 + Backport from trunk.
6150 + * gfortran.dg/dependency_44.f90 : New test
6152 +2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
6154 + * gnat.dg/opt39.adb: New test.
6156 +2014-07-08 Paul Thomas <pault@gcc.gnu.org>
6160 + * gfortran.dg/allocatable_function_8.f90 : New test
6162 +2014-07-04 Jakub Jelinek <jakub@redhat.com>
6164 + PR tree-optimization/61684
6165 + * gcc.c-torture/compile/pr61684.c: New test.
6167 +2014-07-02 Jakub Jelinek <jakub@redhat.com>
6168 + Fritz Reese <Reese-Fritz@zai.com>
6170 + * gfortran.dg/oldstyle_5.f: New test.
6172 +2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
6174 + Backport from mainline
6175 + 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
6177 + PR tree-optimization/61306
6178 + * gcc.c-torture/execute/pr61306-1.c: New test.
6179 + * gcc.c-torture/execute/pr61306-2.c: Likewise.
6180 + * gcc.c-torture/execute/pr61306-3.c: Likewise.
6182 +2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6184 + * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
6186 +2014-06-27 Uros Bizjak <ubizjak@gmail.com>
6188 + Backport from mainline
6189 + 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
6192 + * gcc.target/alpha/pr61586.c: New test.
6194 +2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6196 + * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
6197 + powerpc*-*-linux*.
6199 +2014-06-18 Uros Bizjak <ubizjak@gmail.com>
6201 + Backport from mainline
6202 + 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
6204 + PR rtl-optimization/61094
6205 + PR rtl-optimization/61446
6206 + * gcc.target/i386/pr61446.c : New.
6208 + Backport from mainline
6209 + 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
6212 + * gcc.target/i386/pr61423.c: New test.
6214 +2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
6216 + Backport from mainline
6219 + * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
6220 + * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
6221 + * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
6222 + * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
6224 +2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6226 + Backport from trunk.
6228 + * gfortran.dg/cray_pointers_10.f90: New file.
6230 +2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6232 + Backport from mainline
6234 + 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6236 + * lib/target-supports.exp (check_effective_target_longdouble128): New.
6237 + * gcc.target/powerpc/pack02.c: Use it.
6238 + * gcc.target/powerpc/tfmode_off.c: Likewise.
6240 +2014-06-12 Georg-Johann Lay <avr@gjlay.de>
6242 + Backport from 2014-06-12 trunk r211491
6245 + * gcc.target/avr/torture/pr61443.c: New test.
6247 +2014-06-04 Richard Biener <rguenther@suse.de>
6249 + PR tree-optimization/61383
6250 + * gcc.dg/torture/pr61383-1.c: New testcase.
6252 +2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6254 + Backport from mainline
6255 + 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6257 + PR rtl-optimization/60866
6258 + * gcc.dg/pr60866.c: New test.
6260 +2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6262 + Backport from mainline
6263 + 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6265 + PR rtl-optimization/60901
6266 + * gcc.target/i386/pr60901.c: New test.
6268 +2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
6270 + Backport from mainline
6271 + 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6273 + * gnat.dg/overflow_fixed.adb: New test.
6275 +2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6277 + * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
6279 +2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6281 + Backport from mainline
6282 + 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6284 + * gcc.target/powerpc/htm-ttest.c: New test.
6286 2014-05-22 Release Manager
6288 * GCC 4.8.3 released.
6289 Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
6290 ===================================================================
6291 --- gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release) (revision 0)
6292 +++ gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch) (revision 217117)
6294 +// I think this dynamic_cast has undefined behavior when destroying E::o
6295 +// because we're the F period of destruction has started and ap doesn't
6296 +// point to the object currently being destroyed--but the reasonable
6297 +// options are success or failure, not SEGV.
6301 +extern "C" void abort();
6303 +struct A { virtual ~A(); };
6304 +struct B { virtual ~B() { } };
6305 +struct C : B, A { };
6306 +struct E : virtual B { A o; };
6307 +struct F : virtual C, virtual E { };
6313 + C* cp2 = dynamic_cast<C*>(ap);
6314 + if (cp2 != cp && cp2 != 0)
6322 Index: gcc/testsuite/g++.dg/ext/altivec-2.C
6323 ===================================================================
6324 --- gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release) (revision 217117)
6325 +++ gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch) (revision 217117)
6327 /* { dg-do compile { target powerpc*-*-* } } */
6328 /* { dg-require-effective-target powerpc_altivec_ok } */
6329 -/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
6330 +/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
6332 /* This test checks if AltiVec builtins accept const-qualified
6334 Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
6335 ===================================================================
6336 --- gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release) (revision 0)
6337 +++ gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch) (revision 217117)
6340 +// { dg-options "-std=gnu++11" }
6346 + // without '+0', gcc 4.6 gives a different error (no ICE though)
6347 + decltype(({ int y = x; y; })+0) v1 = 0;
6349 Index: gcc/testsuite/g++.dg/expr/cond12.C
6350 ===================================================================
6351 --- gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release) (revision 0)
6352 +++ gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch) (revision 217117)
6358 + X& operator=(const X&){}
6359 + X& operator=(X&){__builtin_abort();}
6362 +int main(int argv,char**) {
6364 + ((argv > 2) ? a : b) = X();
6366 Index: gcc/testsuite/g++.dg/init/const9.C
6367 ===================================================================
6368 --- gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release) (revision 217117)
6369 +++ gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch) (revision 217117)
6372 -// { dg-final { scan-assembler-not "rodata" } }
6373 +// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
6377 Index: gcc/testsuite/g++.dg/tls/thread_local10.C
6378 ===================================================================
6379 --- gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release) (revision 0)
6380 +++ gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch) (revision 217117)
6384 +// { dg-do run { target c++11 } }
6385 +// { dg-add-options tls }
6386 +// { dg-require-effective-target tls_runtime }
6390 +template <typename> struct A
6392 + static thread_local int s;
6397 +int f() { return 42; }
6398 +template <typename T> thread_local int A<T>::s = f();
6403 + __builtin_abort();
6405 Index: gcc/testsuite/g++.dg/parse/typename7.C
6406 ===================================================================
6407 --- gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release) (revision 217117)
6408 +++ gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch) (revision 217117)
6413 - template<typename> void foo(int); // { dg-message "note" }
6414 - template<typename T> void bar(T t) { // { dg-message "note" }
6415 + template<typename> void foo(int);
6416 + template<typename T> void bar(T t) {
6417 this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6418 - // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
6419 template<typename T> void bad(T t) {
6420 foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6425 A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6426 - // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
6428 B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
6430 Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
6431 ===================================================================
6432 --- gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release) (revision 217117)
6433 +++ gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch) (revision 217117)
6435 -void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
6436 +void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
6437 // { dg-prune-output "array bound" }
6438 Index: gcc/testsuite/g++.dg/parse/ambig7.C
6439 ===================================================================
6440 --- gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release) (revision 0)
6441 +++ gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch) (revision 217117)
6447 + Helper(int a, void (*pfunc)());
6450 +template <int I> void function();
6455 +Helper testOk(A, function<A>);
6456 +Helper testOk2(int(A), function<B>);
6457 +Helper testOk3((int(A)), function<A>);
6458 +Helper testFail(int(A), function<A>);
6459 Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
6460 ===================================================================
6461 --- gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release) (revision 217117)
6462 +++ gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch) (revision 217117)
6464 # This must be done after the compat-use-*-compiler definitions.
6467 +# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
6468 +load_lib g++-dg.exp
6472 # Save variables for the C++ compiler under test, which each test will
6473 Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
6474 ===================================================================
6475 --- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release) (revision 217117)
6476 +++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch) (revision 217117)
6478 /* Structure layout test generator.
6479 - Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
6480 + Copyright (C) 2004-2014
6481 Free Software Foundation, Inc.
6482 Contributed by Jakub Jelinek <jakub@redhat.com>.
6487 const char *dg_options[] = {
6488 -"/* { dg-options \"%s-I%s\" } */\n",
6489 +"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
6490 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
6491 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
6492 "/* { 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",
6493 Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
6494 ===================================================================
6495 --- gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release) (revision 0)
6496 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch) (revision 217117)
6499 +// { dg-do compile { target c++11 } }
6501 +template <class Coord> struct BasePoint
6504 + constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
6506 +template <class T> struct BaseCoord
6509 + constexpr BaseCoord (T) : value (1) {}
6511 +template <class units> struct IntCoordTyped : BaseCoord<int>, units
6513 + typedef BaseCoord Super;
6514 + constexpr IntCoordTyped (int) : Super (0) {}
6516 +template <class units>
6517 +struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
6519 + typedef BasePoint<IntCoordTyped<units> > Super;
6520 + constexpr IntPointTyped (int, int) : Super (0, 0) {}
6525 +IntPointTyped<A> a (0, 0);
6526 Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
6527 ===================================================================
6528 --- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release) (revision 0)
6529 +++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch) (revision 217117)
6532 +// { dg-options "-std=c++11 -Wall" }
6537 + return [&]() -> int {int __t; __t = t; return __t; }();
6538 + return [&t]() -> int {int __t; __t = t; return __t; }();
6540 Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
6541 ===================================================================
6542 --- gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release) (revision 0)
6543 +++ gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch) (revision 217117)
6546 +// { dg-do compile { target c++11 } }
6550 +template <typename>
6552 + typedef const char* name;
6555 +template <typename VT, typename... Fields>
6556 +void New(const char* name,
6557 + typename Fixed<Fields>::name... field_names);
6559 +template <typename VT, typename... Fields>
6560 +void CreateMetric(const char* name,
6561 + typename Fixed<Fields>::name... field_names,
6567 + CreateMetric<int, const char*>("abcd", "def", Base());
6569 Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
6570 ===================================================================
6571 --- gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release) (revision 0)
6572 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch) (revision 217117)
6575 +// { dg-do compile { target c++11 } }
6577 +template <typename T>
6579 + static constexpr int value = int(T{});
6581 Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
6582 ===================================================================
6583 --- gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release) (revision 0)
6584 +++ gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch) (revision 217117)
6587 +// { dg-do compile { target c++11 } }
6589 +template <typename _CharT> class A;
6590 +template <typename> class B;
6591 +template <class charT> class C;
6592 +template <> class C<char>
6594 + virtual void xparse (int &, const B<A<char> > &) const;
6596 +template <class T, class charT = char> class G : C<charT>
6600 + void default_value (const T &);
6601 + void xparse (int &, const B<A<charT> > &) const;
6603 +template <class T, class charT>
6604 +void validate (int &, const B<A<charT> > &, T *, int);
6605 +template <class T, class charT>
6606 +void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
6608 + validate (p1, p2, (T *)0, 0);
6610 +template <class T> G<T> *value (T *) { return new G<T>(0); }
6613 +template <typename T> struct D;
6614 +template <typename, int, int, int = 0, int = 0, int = 0 > class F;
6615 +template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
6617 +struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
6619 + typedef _Scalar Scalar;
6621 +template <typename, int, int, int, int, int _MaxCols> class F
6624 + typedef typename Eigen::D<F>::Scalar Scalar;
6625 + F (const Scalar &, const Scalar &, const Scalar &);
6627 +template <class... T>
6628 +void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
6630 +int main (int, char *[])
6632 + Eigen::F<double, 3, 1> a (0, 0, 0);
6633 + value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
6635 Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
6636 ===================================================================
6637 --- gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release) (revision 0)
6638 +++ gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch) (revision 217117)
6641 +// { dg-do compile { target c++11 } }
6644 + X& operator=(const X&) = delete;
6645 + X& operator=(X&& ) = default;
6650 + *(t ? &a : &b) = X();
6651 + (t ? a : b) = X();
6653 Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
6654 ===================================================================
6655 --- gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release) (revision 0)
6656 +++ gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch) (revision 217117)
6659 +// { dg-options "-std=c++11" }
6663 +void f(X&&); // { dg-message "void f" }
6667 + operator const X&() const;
6673 + f(w); // { dg-error "lvalue" }
6675 Index: gcc/testsuite/g++.dg/ipa/pr62015.C
6676 ===================================================================
6677 --- gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release) (revision 0)
6678 +++ gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch) (revision 217117)
6680 +/* { dg-do run } */
6681 +/* { dg-options "-O3 -std=c++11" } */
6684 +extern "C" int printf(const char *fmt, ...);
6685 +extern "C" void abort(void);
6688 + enum _Value { Left, Right, Invalid };
6690 + constexpr Side() : _value(Invalid) {}
6691 + constexpr Side(_Value value) : _value(value) {}
6692 + operator _Value() const { return (_Value)_value; }
6700 + void adjust(Side side, bool final);
6701 + void move(Side side);
6706 + adjust(Side::Invalid, false);
6709 +static void __attribute__((noinline))
6710 +check (int v, int final)
6717 +__attribute__((noinline))
6718 +void A::adjust(Side side, bool final)
6720 + check ((int)side, final);
6723 +void A::move(Side side)
6725 + adjust(side, false);
6726 + adjust(side, true);
6732 + t.move(Side::Left);
6735 Index: gcc/testsuite/g++.dg/template/local-fn1.C
6736 ===================================================================
6737 --- gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release) (revision 0)
6738 +++ gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch) (revision 217117)
6742 +template <typename T = int>
6748 Index: gcc/testsuite/g++.dg/template/conv14.C
6749 ===================================================================
6750 --- gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release) (revision 0)
6751 +++ gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch) (revision 217117)
6757 +template<typename Container, typename Key>
6760 +template<typename Container, typename Key, typename KeyStore = Key>
6766 + Variant(Container st, const Key& i) : index(i), state(st) {}
6768 + template<typename T>
6769 + operator T() const {
6770 + return Accessor<Container, KeyStore>::template get<T>(state, index);
6774 +class AutoCleanVariant : public Variant<XX*, int> {
6776 + AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
6778 + template<typename T>
6779 + operator T() const {
6780 + return Variant<XX*, int>::operator T();
6783 Index: gcc/testsuite/g++.dg/template/friend55.C
6784 ===================================================================
6785 --- gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release) (revision 0)
6786 +++ gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch) (revision 217117)
6790 +template <int I> struct A;
6791 +template <int I> class B {
6793 + template <int A_S> friend void A<A_S>::impl();
6797 +template<int I>struct A { void impl(); };
6800 +template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
6806 Index: gcc/testsuite/g++.dg/template/memclass5.C
6807 ===================================================================
6808 --- gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release) (revision 0)
6809 +++ gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch) (revision 217117)
6813 +template <typename T>
6816 + template <typename U>
6819 + typedef T result2;
6822 + typedef y<int> zy;
6829 + typedef double result2;
6834 + x<int>::zy::result2 xxx;
6835 + x<int>::y<int>::result2 xxx2;
6837 Index: gcc/testsuite/g++.dg/template/ptrmem27.C
6838 ===================================================================
6839 --- gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release) (revision 0)
6840 +++ gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch) (revision 217117)
6848 + int foo(int X::* ptr);
6850 + template <int X::* ptr>
6854 +int X::foo(int X::* ptr) {
6855 + int* p = &(this->*ptr); // OK.
6859 +template <int X::* ptr>
6861 + int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
6864 Index: gcc/cp/tree.c
6865 ===================================================================
6866 --- gcc/cp/tree.c (.../tags/gcc_4_8_3_release) (revision 217117)
6867 +++ gcc/cp/tree.c (.../branches/gcc-4_8-branch) (revision 217117)
6870 return lvalue_kind (TREE_OPERAND (ref, 0));
6873 + case DOTSTAR_EXPR:
6874 + if (TREE_CODE (ref) == MEMBER_REF)
6875 + op1_lvalue_kind = clk_ordinary;
6877 + op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
6878 + if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
6879 + op1_lvalue_kind = clk_none;
6880 + return op1_lvalue_kind;
6883 op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
6884 /* Look at the member designator. */
6885 @@ -3738,6 +3748,10 @@
6887 init_expr = get_target_expr (exp);
6888 exp = TARGET_EXPR_SLOT (init_expr);
6889 + if (CLASS_TYPE_P (TREE_TYPE (exp)))
6892 + exp = rvalue (exp);
6896 Index: gcc/cp/ChangeLog
6897 ===================================================================
6898 --- gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
6899 +++ gcc/cp/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
6901 +2014-10-15 Jason Merrill <jason@redhat.com>
6905 + * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
6906 + committed to this tentative parse.
6909 + * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
6910 + (iterative_hash_template_arg): Likewise.
6913 + * semantics.c (finish_member_declaration): Don't push closure
6917 + * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
6918 + * semantics.c (finish_id_expression): Don't call TLS wrapper in a
6921 +2014-08-07 Jason Merrill <jason@redhat.com>
6924 + * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
6927 + * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
6929 +2014-01-27 Jason Merrill <jason@redhat.com>
6933 + * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
6934 + list-initialization. A conversion to rvalue ref that involves
6935 + an lvalue-rvalue conversion is bad.
6936 + (convert_like_real): Give helpful error message.
6938 +2014-01-29 Jason Merrill <jason@redhat.com>
6941 + * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
6942 + have a friend template in a class template.
6943 + * pt.c (tsubst_friend_function): Look through it.
6944 + (push_template_decl_real): A friend member template is
6947 +2014-02-21 Jason Merrill <jason@redhat.com>
6950 + * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
6951 + of the partial instantiation, not the most general template.
6952 + (maybe_process_partial_specialization): Reassign everything on
6955 +2014-03-05 Jason Merrill <jason@redhat.com>
6958 + * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
6959 + if re-parsing might succeed.
6960 + * semantics.c (finish_id_expression): Use of a parameter outside
6961 + the function body is a parse error.
6963 +2014-06-30 Jason Merrill <jason@redhat.com>
6966 + * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
6969 + * pt.c (unify_one_argument): Type/expression mismatch just causes
6970 + deduction failure.
6973 + * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
6975 +2014-06-17 Jason Merrill <jason@redhat.com>
6978 + * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
6980 +2014-06-02 Jason Merrill <jason@redhat.com>
6983 + * pt.c (pack_deducible_p): Handle canonicalization.
6985 2014-05-22 Release Manager
6987 * GCC 4.8.3 released.
6989 ===================================================================
6990 --- gcc/cp/pt.c (.../tags/gcc_4_8_3_release) (revision 217117)
6991 +++ gcc/cp/pt.c (.../branches/gcc-4_8-branch) (revision 217117)
6992 @@ -907,11 +907,13 @@
6993 t; t = TREE_CHAIN (t))
6995 tree inst = TREE_VALUE (t);
6996 - if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
6997 + if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
6998 + || !COMPLETE_OR_OPEN_TYPE_P (inst))
7000 /* We already have a full specialization of this partial
7001 - instantiation. Reassign it to the new member
7002 - specialization template. */
7003 + instantiation, or a full specialization has been
7004 + looked up but not instantiated. Reassign it to the
7005 + new member specialization template. */
7013 - else if (COMPLETE_OR_OPEN_TYPE_P (inst))
7015 /* But if we've had an implicit instantiation, that's a
7016 problem ([temp.expl.spec]/6). */
7017 error ("specialization %qT after instantiation %qT",
7018 @@ -1569,6 +1571,7 @@
7022 + iterative_hash_template_arg (TREE_TYPE (arg), val);
7023 FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
7025 val = iterative_hash_template_arg (field, val);
7026 @@ -4308,7 +4311,8 @@
7027 in the template-parameter-list of the definition of a member of a
7030 - if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
7031 + if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
7032 + || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
7033 /* You can't have a function template declaration in a local
7034 scope, nor you can you define a member of a class template in a
7036 @@ -4572,7 +4576,8 @@
7037 DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
7039 /* See if this is a primary template. */
7040 - if (is_friend && ctx)
7041 + if (is_friend && ctx
7042 + && uses_template_parms_level (ctx, processing_template_decl))
7043 /* A friend template that specifies a class context, i.e.
7044 template <typename T> friend void A<T>::f();
7046 @@ -7454,7 +7459,7 @@
7049 /* Let's consider the explicit specialization of a member
7050 - of a class template specialization that is implicitely instantiated,
7051 + of a class template specialization that is implicitly instantiated,
7055 @@ -7552,9 +7557,9 @@
7057 /* Note this use of the partial instantiation so we can check it
7058 later in maybe_process_partial_specialization. */
7059 - DECL_TEMPLATE_INSTANTIATIONS (templ)
7060 + DECL_TEMPLATE_INSTANTIATIONS (found)
7061 = tree_cons (arglist, t,
7062 - DECL_TEMPLATE_INSTANTIATIONS (templ));
7063 + DECL_TEMPLATE_INSTANTIATIONS (found));
7065 if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
7066 /* Now that the type has been registered on the instantiations
7067 @@ -8289,10 +8294,17 @@
7069 if (COMPLETE_TYPE_P (context))
7071 + tree fn = new_friend;
7072 + /* do_friend adds the TEMPLATE_DECL for any member friend
7073 + template even if it isn't a member template, i.e.
7074 + template <class T> friend A<T>::f();
7075 + Look through it in that case. */
7076 + if (TREE_CODE (fn) == TEMPLATE_DECL
7077 + && !PRIMARY_TEMPLATE_P (fn))
7078 + fn = DECL_TEMPLATE_RESULT (fn);
7079 /* Check to see that the declaration is really present, and,
7080 possibly obtain an improved declaration. */
7081 - tree fn = check_classfn (context,
7082 - new_friend, NULL_TREE);
7083 + fn = check_classfn (context, fn, NULL_TREE);
7087 @@ -14488,6 +14500,16 @@
7090 tree r = tsubst_copy (t, args, complain, in_decl);
7091 + if (TREE_CODE (r) == VAR_DECL
7092 + && !processing_template_decl
7093 + && !cp_unevaluated_operand
7094 + && DECL_THREAD_LOCAL_P (r))
7096 + if (tree wrap = get_tls_wrapper_fn (r))
7097 + /* Replace an evaluated use of the thread_local variable with
7098 + a call to its wrapper. */
7099 + r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
7102 if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
7103 /* If the original type was a reference, we'll be wrapped in
7104 @@ -14934,7 +14956,7 @@
7106 for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
7107 packs; packs = TREE_CHAIN (packs))
7108 - if (TREE_VALUE (packs) == parm)
7109 + if (template_args_equal (TREE_VALUE (packs), parm))
7111 /* The template parameter pack is used in a function parameter
7112 pack. If this is the end of the parameter list, the
7113 @@ -15502,8 +15524,9 @@
7114 maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
7117 - gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7118 - == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
7119 + if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7120 + != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
7121 + return unify_template_argument_mismatch (explain_p, parm, arg);
7123 /* For deduction from an init-list we need the actual list. */
7124 if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
7125 @@ -19804,6 +19827,8 @@
7129 + if (dependent_type_p (TREE_TYPE (expression)))
7131 FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
7132 if (value_dependent_expression_p (val))
7134 @@ -20009,7 +20034,12 @@
7137 if (BASELINK_P (expression))
7138 - expression = BASELINK_FUNCTIONS (expression);
7140 + if (BASELINK_OPTYPE (expression)
7141 + && dependent_type_p (BASELINK_OPTYPE (expression)))
7143 + expression = BASELINK_FUNCTIONS (expression);
7146 if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
7148 Index: gcc/cp/semantics.c
7149 ===================================================================
7150 --- gcc/cp/semantics.c (.../tags/gcc_4_8_3_release) (revision 217117)
7151 +++ gcc/cp/semantics.c (.../branches/gcc-4_8-branch) (revision 217117)
7152 @@ -2735,8 +2735,10 @@
7156 - /* Enter the DECL into the scope of the class. */
7157 - else if (pushdecl_class_level (decl))
7158 + /* Enter the DECL into the scope of the class, if the class
7159 + isn't a closure (whose fields are supposed to be unnamed). */
7160 + else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
7161 + || pushdecl_class_level (decl))
7163 if (TREE_CODE (decl) == USING_DECL)
7165 @@ -3108,7 +3110,7 @@
7166 && DECL_CONTEXT (decl) == NULL_TREE
7167 && !cp_unevaluated_operand)
7169 - error ("use of parameter %qD outside function body", decl);
7170 + *error_msg = "use of parameter outside function body";
7171 return error_mark_node;
7174 @@ -3343,6 +3345,7 @@
7176 if (TREE_CODE (decl) == VAR_DECL
7177 && !cp_unevaluated_operand
7178 + && !processing_template_decl
7179 && DECL_THREAD_LOCAL_P (decl)
7180 && (wrap = get_tls_wrapper_fn (decl)))
7182 @@ -7296,7 +7299,9 @@
7183 constructor_elt *inner = base_field_constructor_elt (n, ce->index);
7186 - else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
7187 + else if (ce->index
7188 + && (TREE_CODE (ce->index) == NOP_EXPR
7189 + || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
7191 /* This is an initializer for an empty base; now that we've
7192 checked that it's constant, we can ignore it. */
7193 Index: gcc/cp/parser.c
7194 ===================================================================
7195 --- gcc/cp/parser.c (.../tags/gcc_4_8_3_release) (revision 217117)
7196 +++ gcc/cp/parser.c (.../branches/gcc-4_8-branch) (revision 217117)
7197 @@ -12831,7 +12831,12 @@
7198 the effort required to do the parse, nor will we issue duplicate
7199 error messages about problems during instantiation of the
7203 + /* Don't do this if we had a parse error in a declarator; re-parsing
7204 + might succeed if a name changes meaning (60361). */
7205 + && !(cp_parser_error_occurred (parser)
7206 + && cp_parser_parsing_tentatively (parser)
7207 + && parser->in_declarator_p))
7209 cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
7211 @@ -23774,8 +23779,6 @@
7213 cp_parser_abort_tentative_parse (cp_parser* parser)
7215 - gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
7216 - || errorcount > 0);
7217 cp_parser_simulate_error (parser);
7218 /* Now, pretend that we want to see if the construct was
7219 successfully parsed. */
7220 Index: gcc/cp/call.c
7221 ===================================================================
7222 --- gcc/cp/call.c (.../tags/gcc_4_8_3_release) (revision 217117)
7223 +++ gcc/cp/call.c (.../branches/gcc-4_8-branch) (revision 217117)
7224 @@ -1464,7 +1464,7 @@
7226 maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
7227 conv = implicit_conversion (to, from, expr, c_cast_p,
7229 + flags|LOOKUP_NO_TEMP_BIND, complain);
7230 if (!CLASS_TYPE_P (to)
7231 && CONSTRUCTOR_NELTS (expr) == 1)
7233 @@ -1624,9 +1624,9 @@
7237 - Otherwise, the reference shall be to a non-volatile const type.
7239 - Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
7240 + Otherwise, the reference shall be an lvalue reference to a
7241 + non-volatile const type, or the reference shall be an rvalue
7243 if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
7246 @@ -1664,7 +1664,16 @@
7247 /* This reference binding, unlike those above, requires the
7248 creation of a temporary. */
7249 conv->need_temporary_p = true;
7250 - conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
7251 + if (TYPE_REF_IS_RVALUE (rto))
7253 + conv->rvaluedness_matches_p = 1;
7254 + /* In the second case, if the reference is an rvalue reference and
7255 + the second standard conversion sequence of the user-defined
7256 + conversion sequence includes an lvalue-to-rvalue conversion, the
7257 + program is ill-formed. */
7258 + if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
7264 @@ -5811,7 +5820,7 @@
7265 && convs->kind != ck_list
7266 && convs->kind != ck_ambig
7267 && (convs->kind != ck_ref_bind
7268 - || convs->user_conv_p)
7269 + || (convs->user_conv_p && next_conversion (convs)->bad_p))
7270 && (convs->kind != ck_rvalue
7271 || SCALAR_TYPE_P (totype))
7272 && convs->kind != ck_base)
7273 @@ -6110,7 +6119,8 @@
7274 if (convs->bad_p && !next_conversion (convs)->bad_p)
7276 gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
7277 - && real_lvalue_p (expr));
7278 + && (real_lvalue_p (expr)
7279 + || next_conversion(convs)->kind == ck_rvalue));
7281 error_at (loc, "cannot bind %qT lvalue to %qT",
7282 TREE_TYPE (expr), totype);
7283 Index: gcc/cp/friend.c
7284 ===================================================================
7285 --- gcc/cp/friend.c (.../tags/gcc_4_8_3_release) (revision 217117)
7286 +++ gcc/cp/friend.c (.../branches/gcc-4_8-branch) (revision 217117)
7287 @@ -502,7 +502,13 @@
7288 ? current_template_parms
7291 - if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
7292 + if ((template_member_p
7293 + /* Always pull out the TEMPLATE_DECL if we have a friend
7294 + template in a class template so that it gets tsubsted
7295 + properly later on (59956). tsubst_friend_function knows
7296 + how to tell this apart from a member template. */
7297 + || (class_template_depth && friend_depth))
7298 + && decl && TREE_CODE (decl) == FUNCTION_DECL)
7299 decl = DECL_TI_TEMPLATE (decl);
7302 Index: gcc/haifa-sched.c
7303 ===================================================================
7304 --- gcc/haifa-sched.c (.../tags/gcc_4_8_3_release) (revision 217117)
7305 +++ gcc/haifa-sched.c (.../branches/gcc-4_8-branch) (revision 217117)
7306 @@ -2931,7 +2931,7 @@
7308 advance_state (curr_state);
7309 if (sched_verbose >= 6)
7310 - fprintf (sched_dump, ";;\tAdvanced a state.\n");
7311 + fprintf (sched_dump, ";;\tAdvance the current state.\n");
7314 /* Update register pressure after scheduling INSN. */
7315 @@ -5964,6 +5964,7 @@
7316 modulo_insns_scheduled = 0;
7318 ls.modulo_epilogue = false;
7319 + ls.first_cycle_insn_p = true;
7321 /* Loop until all the insns in BB are scheduled. */
7322 while ((*current_sched_info->schedule_more_p) ())
7323 @@ -6034,7 +6035,6 @@
7327 - ls.first_cycle_insn_p = true;
7328 ls.shadows_only_p = false;
7329 cycle_issued_insns = 0;
7330 ls.can_issue_more = issue_rate;
7331 @@ -6321,11 +6321,13 @@
7335 + ls.first_cycle_insn_p = true;
7337 if (ls.modulo_epilogue)
7340 - advance_one_cycle ();
7341 + if (!ls.first_cycle_insn_p)
7342 + advance_one_cycle ();
7343 perform_replacements_new_cycle ();
7346 Index: gcc/double-int.c
7347 ===================================================================
7348 --- gcc/double-int.c (.../tags/gcc_4_8_3_release) (revision 217117)
7349 +++ gcc/double-int.c (.../branches/gcc-4_8-branch) (revision 217117)
7351 == (unsigned HOST_WIDE_INT) htwice)
7352 && (labs_den <= ltwice)))
7356 /* quo = quo - 1; */
7357 add_double (*lquo, *hquo,
7358 (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
7359 Index: gcc/tree-ssa-math-opts.c
7360 ===================================================================
7361 --- gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release) (revision 217117)
7362 +++ gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch) (revision 217117)
7363 @@ -1537,7 +1537,7 @@
7365 struct symbolic_number {
7366 unsigned HOST_WIDEST_INT n;
7371 /* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
7372 @@ -1549,13 +1549,15 @@
7373 struct symbolic_number *n,
7376 + int bitsize = TYPE_PRECISION (n->type);
7381 /* Zero out the extra bits of N in order to avoid them being shifted
7382 into the significant bits. */
7383 - if (n->size < (int)sizeof (HOST_WIDEST_INT))
7384 - n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
7385 + if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7386 + n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7390 @@ -1563,20 +1565,24 @@
7394 + /* Arithmetic shift of signed type: result is dependent on the value. */
7395 + if (!TYPE_UNSIGNED (n->type)
7396 + && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
7401 - n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
7402 + n->n = (n->n << count) | (n->n >> (bitsize - count));
7405 - n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
7406 + n->n = (n->n >> count) | (n->n << (bitsize - count));
7411 /* Zero unused bits for size. */
7412 - if (n->size < (int)sizeof (HOST_WIDEST_INT))
7413 - n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
7414 + if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7415 + n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7419 @@ -1593,7 +1599,7 @@
7420 if (TREE_CODE (lhs_type) != INTEGER_TYPE)
7423 - if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
7424 + if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
7428 @@ -1650,20 +1656,25 @@
7429 to initialize the symbolic number. */
7434 /* Set up the symbolic number N by setting each byte to a
7435 value between 1 and the byte size of rhs1. The highest
7436 order byte is set to n->size and the lowest order
7438 - n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
7439 - if (n->size % BITS_PER_UNIT != 0)
7440 + n->type = TREE_TYPE (rhs1);
7441 + size = TYPE_PRECISION (n->type);
7442 + if (size % BITS_PER_UNIT != 0)
7444 - n->size /= BITS_PER_UNIT;
7445 + if (size > HOST_BITS_PER_WIDEST_INT)
7447 + size /= BITS_PER_UNIT;
7448 n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
7449 (unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
7451 - if (n->size < (int)sizeof (HOST_WIDEST_INT))
7452 + if (size < (int)sizeof (HOST_WIDEST_INT))
7453 n->n &= ((unsigned HOST_WIDEST_INT)1 <<
7454 - (n->size * BITS_PER_UNIT)) - 1;
7455 + (size * BITS_PER_UNIT)) - 1;
7457 source_expr1 = rhs1;
7459 @@ -1672,12 +1683,12 @@
7464 + int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
7465 unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
7466 unsigned HOST_WIDEST_INT tmp = val;
7468 /* Only constants masking full bytes are allowed. */
7469 - for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
7470 + for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
7471 if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
7474 @@ -1693,12 +1704,24 @@
7479 + int type_size, old_type_size;
7482 - type_size = TYPE_PRECISION (gimple_expr_type (stmt));
7483 + type = gimple_expr_type (stmt);
7484 + type_size = TYPE_PRECISION (type);
7485 if (type_size % BITS_PER_UNIT != 0)
7487 + if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
7490 + /* Sign extension: result is dependent on the value. */
7491 + old_type_size = TYPE_PRECISION (n->type);
7492 + if (!TYPE_UNSIGNED (n->type)
7493 + && type_size > old_type_size
7495 + ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
7498 if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
7500 /* If STMT casts to a smaller type mask out the bits not
7501 @@ -1705,7 +1728,7 @@
7502 belonging to the target type. */
7503 n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
7505 - n->size = type_size / BITS_PER_UNIT;
7510 @@ -1718,7 +1741,7 @@
7512 if (rhs_class == GIMPLE_BINARY_RHS)
7516 struct symbolic_number n1, n2;
7517 unsigned HOST_WIDEST_INT mask;
7519 @@ -1742,11 +1765,12 @@
7520 source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
7522 if (source_expr1 != source_expr2
7523 - || n1.size != n2.size)
7524 + || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
7527 - n->size = n1.size;
7528 - for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
7529 + n->type = n1.type;
7530 + size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
7531 + for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
7533 unsigned HOST_WIDEST_INT masked1, masked2;
7535 @@ -1785,7 +1809,7 @@
7537 struct symbolic_number n;
7540 + int limit, bitsize;
7542 /* The last parameter determines the depth search limit. It usually
7543 correlates directly to the number of bytes to be touched. We
7544 @@ -1800,13 +1824,14 @@
7547 /* Zero out the extra bits of N and CMP. */
7548 - if (n.size < (int)sizeof (HOST_WIDEST_INT))
7549 + bitsize = TYPE_PRECISION (n.type);
7550 + if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7552 unsigned HOST_WIDEST_INT mask =
7553 - ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
7554 + ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7557 - cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
7558 + cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
7561 /* A complete byte swap should make the symbolic number to start
7562 @@ -1828,7 +1853,7 @@
7563 bool changed = false;
7564 tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
7566 - if (BITS_PER_UNIT != 8)
7567 + if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
7570 if (sizeof (HOST_WIDEST_INT) < 8)
7572 ===================================================================
7573 --- gcc/ifcvt.c (.../tags/gcc_4_8_3_release) (revision 217117)
7574 +++ gcc/ifcvt.c (.../branches/gcc-4_8-branch) (revision 217117)
7575 @@ -294,6 +294,28 @@
7577 return (e) ? e->dest : NULL_BLOCK;
7580 +/* Return true if RTXs A and B can be safely interchanged. */
7583 +rtx_interchangeable_p (const_rtx a, const_rtx b)
7585 + if (!rtx_equal_p (a, b))
7588 + if (GET_CODE (a) != MEM)
7591 + /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
7592 + reference is not. Interchanging a dead type-unsafe memory reference with
7593 + a live type-safe one creates a live type-unsafe memory reference, in other
7594 + words, it makes the program illegal.
7595 + We check here conservatively whether the two memory references have equal
7596 + memory attributes. */
7598 + return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
7602 /* Go through a bunch of insns, converting them to conditional
7603 execution format if possible. Return TRUE if all of the non-note
7604 @@ -1014,6 +1036,9 @@
7605 || (rtx_equal_p (if_info->a, XEXP (cond, 1))
7606 && rtx_equal_p (if_info->b, XEXP (cond, 0))))
7608 + if (!rtx_interchangeable_p (if_info->a, if_info->b))
7611 y = (code == EQ) ? if_info->a : if_info->b;
7613 /* Avoid generating the move if the source is the destination. */
7614 @@ -2483,7 +2508,7 @@
7616 || insn_b != last_active_insn (else_bb, FALSE)
7617 || (set_b = single_set (insn_b)) == NULL_RTX
7618 - || ! rtx_equal_p (x, SET_DEST (set_b)))
7619 + || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
7623 @@ -2496,7 +2521,7 @@
7624 || BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
7625 || !NONJUMP_INSN_P (insn_b)
7626 || (set_b = single_set (insn_b)) == NULL_RTX
7627 - || ! rtx_equal_p (x, SET_DEST (set_b))
7628 + || ! rtx_interchangeable_p (x, SET_DEST (set_b))
7629 || ! noce_operand_ok (SET_SRC (set_b))
7630 || reg_overlap_mentioned_p (x, SET_SRC (set_b))
7631 || modified_between_p (SET_SRC (set_b), insn_b, jump)
7632 @@ -2562,7 +2587,7 @@
7634 /* Look and see if A and B are really the same. Avoid creating silly
7635 cmove constructs that no one will fix up later. */
7636 - if (rtx_equal_p (a, b))
7637 + if (rtx_interchangeable_p (a, b))
7639 /* If we have an INSN_B, we don't have to create any new rtl. Just
7640 move the instruction that we already have. If we don't have an
7641 @@ -4246,6 +4271,9 @@
7642 old_dest = JUMP_LABEL (jump);
7643 if (other_bb != new_dest)
7645 + if (!any_condjump_p (jump))
7648 if (JUMP_P (BB_END (dest_edge->src)))
7649 new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
7650 else if (new_dest == EXIT_BLOCK_PTR)
7651 Index: gcc/dwarf2out.c
7652 ===================================================================
7653 --- gcc/dwarf2out.c (.../tags/gcc_4_8_3_release) (revision 217117)
7654 +++ gcc/dwarf2out.c (.../branches/gcc-4_8-branch) (revision 217117)
7655 @@ -12234,7 +12234,7 @@
7656 op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
7657 VAR_INIT_STATUS_INITIALIZED);
7661 add_loc_descr (&mem_loc_result, op1);
7662 add_loc_descr (&mem_loc_result,
7663 new_loc_descr (DW_OP_plus, 0, 0));
7664 @@ -13882,6 +13882,10 @@
7668 + case TARGET_MEM_REF:
7673 return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
7676 ===================================================================
7677 --- gcc/expr.c (.../tags/gcc_4_8_3_release) (revision 217117)
7678 +++ gcc/expr.c (.../branches/gcc-4_8-branch) (revision 217117)
7679 @@ -10603,7 +10603,7 @@
7680 || !host_integerp (TREE_OPERAND (offset, 1), 1)
7681 || compare_tree_int (TREE_OPERAND (offset, 1),
7682 BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
7683 - || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
7684 + || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
7687 /* Look at the first operand of BIT_AND_EXPR and strip any conversion.
7688 Index: gcc/ada/socket.c
7689 ===================================================================
7690 --- gcc/ada/socket.c (.../tags/gcc_4_8_3_release) (revision 217117)
7691 +++ gcc/ada/socket.c (.../branches/gcc-4_8-branch) (revision 217117)
7696 -#if defined(__linux__) || defined(__GLIBC__)
7697 +#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
7698 (void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
7700 rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
7701 Index: gcc/ada/uintp.adb
7702 ===================================================================
7703 --- gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release) (revision 217117)
7704 +++ gcc/ada/uintp.adb (.../branches/gcc-4_8-branch) (revision 217117)
7705 @@ -171,22 +171,6 @@
7706 -- If Discard_Quotient is True, Quotient is set to No_Uint
7707 -- If Discard_Remainder is True, Remainder is set to No_Uint
7709 - function Vector_To_Uint
7710 - (In_Vec : UI_Vector;
7711 - Negative : Boolean) return Uint;
7712 - -- Functions that calculate values in UI_Vectors, call this function to
7713 - -- create and return the Uint value. In_Vec contains the multiple precision
7714 - -- (Base) representation of a non-negative value. Leading zeroes are
7715 - -- permitted. Negative is set if the desired result is the negative of the
7716 - -- given value. The result will be either the appropriate directly
7717 - -- represented value, or a table entry in the proper canonical format is
7718 - -- created and returned.
7720 - -- Note that Init_Operand puts a signed value in the result vector, but
7721 - -- Vector_To_Uint is always presented with a non-negative value. The
7722 - -- processing of signs is something that is done by the caller before
7723 - -- calling Vector_To_Uint.
7728 Index: gcc/ada/uintp.ads
7729 ===================================================================
7730 --- gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release) (revision 217117)
7731 +++ gcc/ada/uintp.ads (.../branches/gcc-4_8-branch) (revision 217117)
7733 Uint_Minus_80 : constant Uint;
7734 Uint_Minus_128 : constant Uint;
7736 + type UI_Vector is array (Pos range <>) of Int;
7737 + -- Vector containing the integer values of a Uint value
7739 + -- Note: An earlier version of this package used pointers of arrays of Ints
7740 + -- (dynamically allocated) for the Uint type. The change leads to a few
7741 + -- less natural idioms used throughout this code, but eliminates all uses
7742 + -- of the heap except for the table package itself. For example, Uint
7743 + -- parameters are often converted to UI_Vectors for internal manipulation.
7744 + -- This is done by creating the local UI_Vector using the function N_Digits
7745 + -- on the Uint to find the size needed for the vector, and then calling
7746 + -- Init_Operand to copy the values out of the table into the vector.
7751 @@ -252,6 +264,22 @@
7752 -- function is used for capacity checks, and it can be one bit off
7753 -- without affecting its usage.
7755 + function Vector_To_Uint
7756 + (In_Vec : UI_Vector;
7757 + Negative : Boolean) return Uint;
7758 + -- Functions that calculate values in UI_Vectors, call this function to
7759 + -- create and return the Uint value. In_Vec contains the multiple precision
7760 + -- (Base) representation of a non-negative value. Leading zeroes are
7761 + -- permitted. Negative is set if the desired result is the negative of the
7762 + -- given value. The result will be either the appropriate directly
7763 + -- represented value, or a table entry in the proper canonical format is
7764 + -- created and returned.
7766 + -- Note that Init_Operand puts a signed value in the result vector, but
7767 + -- Vector_To_Uint is always presented with a non-negative value. The
7768 + -- processing of signs is something that is done by the caller before
7769 + -- calling Vector_To_Uint.
7771 ---------------------
7772 -- Output Routines --
7773 ---------------------
7774 @@ -494,18 +522,6 @@
7775 -- UI_Vector is defined for this purpose and some internal subprograms
7776 -- used for converting from one to the other are defined.
7778 - type UI_Vector is array (Pos range <>) of Int;
7779 - -- Vector containing the integer values of a Uint value
7781 - -- Note: An earlier version of this package used pointers of arrays of Ints
7782 - -- (dynamically allocated) for the Uint type. The change leads to a few
7783 - -- less natural idioms used throughout this code, but eliminates all uses
7784 - -- of the heap except for the table package itself. For example, Uint
7785 - -- parameters are often converted to UI_Vectors for internal manipulation.
7786 - -- This is done by creating the local UI_Vector using the function N_Digits
7787 - -- on the Uint to find the size needed for the vector, and then calling
7788 - -- Init_Operand to copy the values out of the table into the vector.
7790 type Uint_Entry is record
7792 -- Length of entry in Udigits table in digits (i.e. in words)
7793 Index: gcc/ada/ChangeLog
7794 ===================================================================
7795 --- gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
7796 +++ gcc/ada/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
7798 +2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
7799 + Alan Modra <amodra@gmail.com>
7802 + * uintp.adb (Vector_To_Uint): Move from here to...
7803 + * uintp.ads (UI_Vector): Make public.
7804 + (Vector_To_Uint): ...here.
7806 +2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
7808 + * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
7809 + * gsocket.h Add include of <unistd.h> on RTEMS.
7811 +2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
7813 + * s-osinte-rtems.adb: Correct formatting of line in license block.
7815 2014-05-22 Release Manager
7817 * GCC 4.8.3 released.
7818 Index: gcc/ada/s-osinte-rtems.adb
7819 ===================================================================
7820 --- gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release) (revision 217117)
7821 +++ gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch) (revision 217117)
7823 -- You should have received a copy of the GNU General Public License and --
7824 -- a copy of the GCC Runtime Library Exception along with this program; --
7825 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
7826 --- <http://www.gnu.org/licenses/>.
7827 +-- <http://www.gnu.org/licenses/>. --
7829 -- GNARL was developed by the GNARL team at Florida State University. It is --
7830 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
7831 Index: gcc/ada/gsocket.h
7832 ===================================================================
7833 --- gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release) (revision 217117)
7834 +++ gcc/ada/gsocket.h (.../branches/gcc-4_8-branch) (revision 217117)
7835 @@ -183,6 +183,11 @@
7836 #include <sys/time.h>
7839 +#if defined(__rtems__)
7840 +#include <unistd.h>
7841 +/* Required, for read(), write(), and close() */
7845 * RTEMS has these .h files but not until you have built and installed RTEMS.
7846 * When building a C/C++ toolset, you also build the newlib C library, so the
7847 Index: gcc/tree-ssa-ifcombine.c
7848 ===================================================================
7849 --- gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release) (revision 217117)
7850 +++ gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch) (revision 217117)
7851 @@ -105,7 +105,11 @@
7853 gimple stmt = gsi_stmt (gsi);
7855 + if (is_gimple_debug (stmt))
7858 if (gimple_has_side_effects (stmt)
7859 + || gimple_could_trap_p (stmt)
7860 || gimple_vuse (stmt))
7864 while (is_gimple_assign (stmt)
7865 && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
7866 && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
7867 - <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
7868 + <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
7869 + && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
7870 || gimple_assign_ssa_name_copy_p (stmt)))
7871 stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
7873 Index: gcc/sel-sched-ir.c
7874 ===================================================================
7875 --- gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release) (revision 217117)
7876 +++ gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch) (revision 217117)
7878 static void free_av_set (basic_block);
7879 static void invalidate_av_set (basic_block);
7880 static void extend_insn_data (void);
7881 -static void sel_init_new_insn (insn_t, int);
7882 +static void sel_init_new_insn (insn_t, int, int = -1);
7883 static void finish_insns (void);
7885 /* Various list functions. */
7886 @@ -4011,9 +4011,10 @@
7890 -/* Compute seqno for INSN by its preds or succs. */
7891 +/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
7892 + seqno in corner cases. */
7894 -get_seqno_for_a_jump (insn_t insn)
7895 +get_seqno_for_a_jump (insn_t insn, int old_seqno)
7899 @@ -4069,8 +4070,16 @@
7901 seqno = get_seqno_by_succs (insn);
7905 + /* The only case where this could be here legally is that the only
7906 + unscheduled insn was a conditional jump that got removed and turned
7907 + into this unconditional one. Initialize from the old seqno
7908 + of that jump passed down to here. */
7909 + seqno = old_seqno;
7912 gcc_assert (seqno >= 0);
7917 @@ -4250,22 +4259,24 @@
7920 /* This is used to initialize spurious jumps generated by
7921 - sel_redirect_edge (). */
7922 + sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
7923 + in corner cases within get_seqno_for_a_jump. */
7925 -init_simplejump_data (insn_t insn)
7926 +init_simplejump_data (insn_t insn, int old_seqno)
7928 init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
7929 REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
7930 vNULL, true, false, false,
7932 - INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
7933 + INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
7934 init_first_time_insn_data (insn);
7937 /* Perform deferred initialization of insns. This is used to process
7938 - a new jump that may be created by redirect_edge. */
7940 -sel_init_new_insn (insn_t insn, int flags)
7941 + a new jump that may be created by redirect_edge. OLD_SEQNO is used
7942 + for initializing simplejumps in init_simplejump_data. */
7944 +sel_init_new_insn (insn_t insn, int flags, int old_seqno)
7946 /* We create data structures for bb when the first insn is emitted in it. */
7948 @@ -4292,7 +4303,7 @@
7949 if (flags & INSN_INIT_TODO_SIMPLEJUMP)
7951 extend_insn_data ();
7952 - init_simplejump_data (insn);
7953 + init_simplejump_data (insn, old_seqno);
7956 gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
7957 @@ -5578,8 +5589,7 @@
7960 /* A wrapper for redirect_edge_and_branch_force, which also initializes
7961 - data structures for possibly created bb and insns. Returns the newly
7962 - added bb or NULL, when a bb was not needed. */
7963 + data structures for possibly created bb and insns. */
7965 sel_redirect_edge_and_branch_force (edge e, basic_block to)
7967 @@ -5586,6 +5596,7 @@
7968 basic_block jump_bb, src, orig_dest = e->dest;
7971 + int old_seqno = -1;
7973 /* This function is now used only for bookkeeping code creation, where
7974 we'll never get the single pred of orig_dest block and thus will not
7975 @@ -5594,8 +5605,13 @@
7976 && !single_pred_p (orig_dest));
7978 prev_max_uid = get_max_uid ();
7979 + /* Compute and pass old_seqno down to sel_init_new_insn only for the case
7980 + when the conditional jump being redirected may become unconditional. */
7981 + if (any_condjump_p (BB_END (src))
7982 + && INSN_SEQNO (BB_END (src)) >= 0)
7983 + old_seqno = INSN_SEQNO (BB_END (src));
7985 jump_bb = redirect_edge_and_branch_force (e, to);
7987 if (jump_bb != NULL)
7988 sel_add_bb (jump_bb);
7990 @@ -5607,7 +5623,8 @@
7992 jump = find_new_jump (src, jump_bb, prev_max_uid);
7994 - sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
7995 + sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
7997 set_immediate_dominator (CDI_DOMINATORS, to,
7998 recompute_dominator (CDI_DOMINATORS, to));
7999 set_immediate_dominator (CDI_DOMINATORS, orig_dest,
8000 @@ -5626,6 +5643,7 @@
8002 bool recompute_toporder_p = false;
8003 bool maybe_unreachable = single_pred_p (orig_dest);
8004 + int old_seqno = -1;
8006 latch_edge_p = (pipelining_p
8007 && current_loop_nest
8008 @@ -5634,6 +5652,12 @@
8010 prev_max_uid = get_max_uid ();
8012 + /* Compute and pass old_seqno down to sel_init_new_insn only for the case
8013 + when the conditional jump being redirected may become unconditional. */
8014 + if (any_condjump_p (BB_END (src))
8015 + && INSN_SEQNO (BB_END (src)) >= 0)
8016 + old_seqno = INSN_SEQNO (BB_END (src));
8018 redirected = redirect_edge_and_branch (e, to);
8020 gcc_assert (redirected && !last_added_blocks.exists ());
8021 @@ -5654,7 +5678,7 @@
8023 jump = find_new_jump (src, NULL, prev_max_uid);
8025 - sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
8026 + sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
8028 /* Only update dominator info when we don't have unreachable blocks.
8029 Otherwise we'll update in maybe_tidy_empty_bb. */
8030 Index: gcc/fortran/interface.c
8031 ===================================================================
8032 --- gcc/fortran/interface.c (.../tags/gcc_4_8_3_release) (revision 217117)
8033 +++ gcc/fortran/interface.c (.../branches/gcc-4_8-branch) (revision 217117)
8034 @@ -1923,7 +1923,7 @@
8035 /* F2008, 12.5.2.5; IR F08/0073. */
8036 if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
8037 && ((CLASS_DATA (formal)->attr.class_pointer
8038 - && !formal->attr.intent == INTENT_IN)
8039 + && formal->attr.intent != INTENT_IN)
8040 || CLASS_DATA (formal)->attr.allocatable))
8042 if (actual->ts.type != BT_CLASS)
8043 Index: gcc/fortran/trans-expr.c
8044 ===================================================================
8045 --- gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release) (revision 217117)
8046 +++ gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch) (revision 217117)
8047 @@ -7096,7 +7096,7 @@
8049 res_desc = gfc_evaluate_now (desc, &se->pre);
8050 gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
8051 - se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
8052 + se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
8054 /* Free the lhs after the function call and copy the result data to
8055 the lhs descriptor. */
8056 Index: gcc/fortran/decl.c
8057 ===================================================================
8058 --- gcc/fortran/decl.c (.../tags/gcc_4_8_3_release) (revision 217117)
8059 +++ gcc/fortran/decl.c (.../branches/gcc-4_8-branch) (revision 217117)
8060 @@ -1996,6 +1996,13 @@
8061 if (gfc_notify_std (GFC_STD_GNU, "Old-style "
8062 "initialization at %C") == FAILURE)
8064 + else if (gfc_current_state () == COMP_DERIVED)
8066 + gfc_error ("Invalid old style initialization for derived type "
8067 + "component at %C");
8072 return match_old_style_init (name);
8074 Index: gcc/fortran/trans-openmp.c
8075 ===================================================================
8076 --- gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release) (revision 217117)
8077 +++ gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch) (revision 217117)
8078 @@ -115,6 +115,16 @@
8079 if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
8080 return OMP_CLAUSE_DEFAULT_SHARED;
8082 + /* These are either array or derived parameters, or vtables.
8083 + In the former cases, the OpenMP standard doesn't consider them to be
8084 + variables at all (they can't be redefined), but they can nevertheless appear
8085 + in parallel/task regions and for default(none) purposes treat them as shared.
8086 + For vtables likely the same handling is desirable. */
8087 + if (TREE_CODE (decl) == VAR_DECL
8088 + && TREE_READONLY (decl)
8089 + && TREE_STATIC (decl))
8090 + return OMP_CLAUSE_DEFAULT_SHARED;
8092 return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
8095 Index: gcc/fortran/ChangeLog
8096 ===================================================================
8097 --- gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
8098 +++ gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
8100 +2014-10-10 Jakub Jelinek <jakub@redhat.com>
8103 + * trans-openmp.c (gfc_omp_predetermined_sharing): Return
8104 + OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
8106 +2014-09-03 Marek Polacek <polacek@redhat.com>
8108 + Backport from trunk
8110 + * interface.c (compare_parameter): Fix condition.
8112 +2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
8114 + Backport from trunk
8116 + * gfortran.dg/array_assignment_5.f90: New test.
8118 +2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
8120 + Backport from trunk
8122 + * simplify.c (gfc_simplify_dot_product): Convert types of
8123 + vectors before calculating the result.
8125 +2014-07-19 Paul Thomas <pault@gcc.gnu.org>
8127 + Backport from trunk.
8129 + * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
8130 + that elements are skipped. This then correctly aligns 'reverse'
8131 + with the scalarizer loops.
8133 +2014-07-08 Paul Thomas <pault@gcc.gnu.org>
8137 + * trans-expr.c (fcncall_realloc_result): Use the natural type
8138 + for the address expression of 'res_desc'.
8140 +2014-07-02 Jakub Jelinek <jakub@redhat.com>
8141 + Fritz Reese <Reese-Fritz@zai.com>
8143 + * decl.c (variable_decl): Reject old style initialization
8144 + for derived type components.
8146 +2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8148 + Backport from trunk.
8150 + * trans-decl.c (gfc_create_module_variable): Don't create
8151 + Cray-pointee decls twice.
8153 +2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
8155 + Backport from mainline
8156 + PR libfortran/61310
8157 + * intrinsics.texi (CTIME): Remove mention of locale-dependent
8160 2014-05-22 Release Manager
8162 * GCC 4.8.3 released.
8163 Index: gcc/fortran/frontend-passes.c
8164 ===================================================================
8165 --- gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release) (revision 217117)
8166 +++ gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch) (revision 217117)
8167 @@ -874,6 +874,10 @@
8171 + case INTRINSIC_CONCAT:
8172 + /* Do not do string concatenations. */
8176 /* Binary operators. */
8177 if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
8178 Index: gcc/fortran/trans-decl.c
8179 ===================================================================
8180 --- gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release) (revision 217117)
8181 +++ gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch) (revision 217117)
8182 @@ -4084,8 +4084,8 @@
8185 /* Don't generate variables from other modules. Variables from
8186 - COMMONs will already have been generated. */
8187 - if (sym->attr.use_assoc || sym->attr.in_common)
8188 + COMMONs and Cray pointees will already have been generated. */
8189 + if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
8192 /* Equivalenced variables arrive here after creation. */
8193 Index: gcc/fortran/dependency.c
8194 ===================================================================
8195 --- gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release) (revision 217117)
8196 +++ gcc/fortran/dependency.c (.../branches/gcc-4_8-branch) (revision 217117)
8197 @@ -1779,6 +1779,7 @@
8198 gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
8202 gfc_dependency fin_dep;
8203 gfc_dependency this_dep;
8205 @@ -1828,6 +1829,8 @@
8209 + /* Index for the reverse array. */
8211 for (n=0; n < lref->u.ar.dimen; n++)
8213 /* Assume dependency when either of array reference is vector
8214 @@ -1862,31 +1865,37 @@
8215 The ability to reverse or not is set by previous conditions
8216 in this dimension. If reversal is not activated, the
8217 value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
8219 + /* Get the indexing right for the scalarizing loop. If this
8220 + is an element, there is no corresponding loop. */
8221 + if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
8224 if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
8225 && lref->u.ar.dimen_type[n] == DIMEN_RANGE)
8227 /* Set reverse if backward dependence and not inhibited. */
8228 - if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8229 - reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
8230 - GFC_REVERSE_SET : reverse[n];
8231 + if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8232 + reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
8233 + GFC_REVERSE_SET : reverse[m];
8235 /* Set forward if forward dependence and not inhibited. */
8236 - if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8237 - reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
8238 - GFC_FORWARD_SET : reverse[n];
8239 + if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8240 + reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
8241 + GFC_FORWARD_SET : reverse[m];
8243 /* Flag up overlap if dependence not compatible with
8244 the overall state of the expression. */
8245 - if (reverse && reverse[n] == GFC_REVERSE_SET
8246 + if (reverse && reverse[m] == GFC_REVERSE_SET
8247 && this_dep == GFC_DEP_FORWARD)
8249 - reverse[n] = GFC_INHIBIT_REVERSE;
8250 + reverse[m] = GFC_INHIBIT_REVERSE;
8251 this_dep = GFC_DEP_OVERLAP;
8253 - else if (reverse && reverse[n] == GFC_FORWARD_SET
8254 + else if (reverse && reverse[m] == GFC_FORWARD_SET
8255 && this_dep == GFC_DEP_BACKWARD)
8257 - reverse[n] = GFC_INHIBIT_REVERSE;
8258 + reverse[m] = GFC_INHIBIT_REVERSE;
8259 this_dep = GFC_DEP_OVERLAP;
8262 @@ -1893,7 +1902,7 @@
8263 /* If no intention of reversing or reversing is explicitly
8264 inhibited, convert backward dependence to overlap. */
8265 if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
8266 - || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
8267 + || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
8268 this_dep = GFC_DEP_OVERLAP;
8271 Index: gcc/fortran/intrinsic.texi
8272 ===================================================================
8273 --- gcc/fortran/intrinsic.texi (.../tags/gcc_4_8_3_release) (revision 217117)
8274 +++ gcc/fortran/intrinsic.texi (.../branches/gcc-4_8-branch) (revision 217117)
8275 @@ -3343,10 +3343,8 @@
8277 @item @emph{Description}:
8278 @code{CTIME} converts a system time value, such as returned by
8279 -@code{TIME8}, to a string. Unless the application has called
8280 -@code{setlocale}, the output will be in the default locale, of length
8281 -24 and of the form @samp{Sat Aug 19 18:13:14 1995}. In other locales,
8282 -a longer string may result.
8283 +@code{TIME8}, to a string. The output will be of the form @samp{Sat
8284 +Aug 19 18:13:14 1995}.
8286 This intrinsic is provided in both subroutine and function forms; however,
8287 only one form can be used in any given program unit.
8288 Index: gcc/fortran/simplify.c
8289 ===================================================================
8290 --- gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release) (revision 217117)
8291 +++ gcc/fortran/simplify.c (.../branches/gcc-4_8-branch) (revision 217117)
8292 @@ -1877,6 +1877,9 @@
8294 gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
8299 if (!is_constant_array_expr (vector_a)
8300 || !is_constant_array_expr (vector_b))
8302 @@ -1883,8 +1886,14 @@
8304 gcc_assert (vector_a->rank == 1);
8305 gcc_assert (vector_b->rank == 1);
8306 - gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
8308 + temp.expr_type = EXPR_OP;
8309 + gfc_clear_ts (&temp.ts);
8310 + temp.value.op.op = INTRINSIC_NONE;
8311 + temp.value.op.op1 = vector_a;
8312 + temp.value.op.op2 = vector_b;
8313 + gfc_type_convert_binary (&temp, 1);
8315 return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
8318 Index: gcc/configure.ac
8319 ===================================================================
8320 --- gcc/configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
8321 +++ gcc/configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
8322 @@ -3443,6 +3443,32 @@
8323 AC_MSG_RESULT($gcc_cv_lto_plugin)
8328 + # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
8329 + AC_ARG_ENABLE(fix-cortex-a53-835769,
8331 +AS_HELP_STRING([--enable-fix-cortex-a53-835769],
8332 + [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
8333 +AS_HELP_STRING([--disable-fix-cortex-a53-835769],
8334 + [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
8337 + case $enableval in
8339 + tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
8344 + AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
8345 + Valid choices are 'yes' and 'no'.])
8352 # All TARGET_ABI_OSF targets.
8353 alpha*-*-linux* | alpha*-*-*bsd*)
8354 gcc_GAS_CHECK_FEATURE([explicit relocation support],
8355 Index: gcc/function.c
8356 ===================================================================
8357 --- gcc/function.c (.../tags/gcc_4_8_3_release) (revision 217117)
8358 +++ gcc/function.c (.../branches/gcc-4_8-branch) (revision 217117)
8359 @@ -1354,9 +1354,13 @@
8360 #define STACK_POINTER_OFFSET 0
8363 +#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
8364 +#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
8367 /* If not defined, pick an appropriate default for the offset of dynamically
8368 allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
8369 - REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
8370 + INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
8372 #ifndef STACK_DYNAMIC_OFFSET
8374 @@ -1368,12 +1372,12 @@
8375 `crtl->outgoing_args_size'. Nevertheless, we must allow
8376 for it when allocating stack dynamic objects. */
8378 -#if defined(REG_PARM_STACK_SPACE)
8379 +#ifdef INCOMING_REG_PARM_STACK_SPACE
8380 #define STACK_DYNAMIC_OFFSET(FNDECL) \
8381 ((ACCUMULATE_OUTGOING_ARGS \
8382 ? (crtl->outgoing_args_size \
8383 + (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
8384 - : REG_PARM_STACK_SPACE (FNDECL))) \
8385 + : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
8386 : 0) + (STACK_POINTER_OFFSET))
8388 #define STACK_DYNAMIC_OFFSET(FNDECL) \
8389 @@ -2211,8 +2215,9 @@
8391 all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
8393 -#ifdef REG_PARM_STACK_SPACE
8394 - all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
8395 +#ifdef INCOMING_REG_PARM_STACK_SPACE
8396 + all->reg_parm_stack_space
8397 + = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
8401 @@ -4518,6 +4523,7 @@
8402 /* ??? This could be set on a per-function basis by the front-end
8403 but is this worth the hassle? */
8404 cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
8405 + cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
8409 Index: gcc/tree-vectorizer.h
8410 ===================================================================
8411 --- gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release) (revision 217117)
8412 +++ gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch) (revision 217117)
8414 #define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
8416 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
8417 -(L)->may_misalign_stmts.length () > 0
8418 +((L)->may_misalign_stmts.length () > 0)
8419 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
8420 -(L)->may_alias_ddrs.length () > 0
8421 +((L)->may_alias_ddrs.length () > 0)
8423 #define NITERS_KNOWN_P(n) \
8424 (host_integerp ((n),0) \
8426 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
8427 extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
8428 tree *, gimple_stmt_iterator *,
8429 - gimple *, bool, bool *);
8430 + gimple *, bool, bool *,
8431 + tree = NULL_TREE);
8432 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
8433 extern tree vect_create_destination_var (tree, tree);
8434 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
8436 extern int vect_get_place_in_interleaving_chain (gimple, gimple);
8437 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
8438 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
8439 - tree, struct loop *);
8440 + tree, struct loop *,
8441 + tree = NULL_TREE);
8443 /* In tree-vect-loop.c. */
8444 /* FORNOW: Used in tree-parloops.c. */
8445 Index: gcc/stor-layout.c
8446 ===================================================================
8447 --- gcc/stor-layout.c (.../tags/gcc_4_8_3_release) (revision 217117)
8448 +++ gcc/stor-layout.c (.../branches/gcc-4_8-branch) (revision 217117)
8449 @@ -234,12 +234,7 @@
8450 param_type = TREE_TYPE (ref);
8452 = build_decl (input_location, PARM_DECL, param_name, param_type);
8453 - if (targetm.calls.promote_prototypes (NULL_TREE)
8454 - && INTEGRAL_TYPE_P (param_type)
8455 - && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
8456 - DECL_ARG_TYPE (param_decl) = integer_type_node;
8458 - DECL_ARG_TYPE (param_decl) = param_type;
8459 + DECL_ARG_TYPE (param_decl) = param_type;
8460 DECL_ARTIFICIAL (param_decl) = 1;
8461 TREE_READONLY (param_decl) = 1;
8463 Index: gcc/tree-vect-loop.c
8464 ===================================================================
8465 --- gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release) (revision 217117)
8466 +++ gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch) (revision 217117)
8467 @@ -2205,7 +2205,8 @@
8470 def1 = SSA_NAME_DEF_STMT (op1);
8471 - if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
8472 + if (gimple_bb (def1)
8473 + && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
8475 && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
8476 && is_gimple_assign (def1))
8477 Index: gcc/tree-vect-data-refs.c
8478 ===================================================================
8479 --- gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release) (revision 217117)
8480 +++ gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch) (revision 217117)
8481 @@ -3553,6 +3553,9 @@
8483 if LOOP=i_loop: &in (relative to i_loop)
8484 if LOOP=j_loop: &in+i*2B (relative to j_loop)
8485 + BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
8486 + initial address. Unlike OFFSET, which is number of elements to
8487 + be added, BYTE_OFFSET is measured in bytes.
8490 1. Return an SSA_NAME whose value is the address of the memory location of
8491 @@ -3566,7 +3569,8 @@
8492 vect_create_addr_base_for_vector_ref (gimple stmt,
8493 gimple_seq *new_stmt_list,
8495 - struct loop *loop)
8496 + struct loop *loop,
8499 stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
8500 struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
8501 @@ -3628,7 +3632,17 @@
8502 base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
8503 gimple_seq_add_seq (new_stmt_list, seq);
8507 + tree tmp = create_tmp_var (sizetype, "offset");
8509 + byte_offset = fold_convert (sizetype, byte_offset);
8510 + base_offset = fold_build2 (PLUS_EXPR, sizetype,
8511 + base_offset, byte_offset);
8512 + base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
8513 + gimple_seq_add_seq (new_stmt_list, seq);
8516 /* base + base_offset */
8518 addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
8519 @@ -3692,6 +3706,10 @@
8520 5. BSI: location where the new stmts are to be placed if there is no loop
8521 6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
8522 pointing to the initial address.
8523 + 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
8524 + to the initial address accessed by the data-ref in STMT. This is
8525 + similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
8529 1. Declare a new ptr to vector_type, and have it point to the base of the
8530 @@ -3705,6 +3723,8 @@
8531 initial_address = &a[init];
8532 if OFFSET is supplied:
8533 initial_address = &a[init + OFFSET];
8534 + if BYTE_OFFSET is supplied:
8535 + initial_address = &a[init] + BYTE_OFFSET;
8537 Return the initial_address in INITIAL_ADDRESS.
8539 @@ -3722,7 +3742,7 @@
8540 vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
8541 tree offset, tree *initial_address,
8542 gimple_stmt_iterator *gsi, gimple *ptr_incr,
8543 - bool only_init, bool *inv_p)
8544 + bool only_init, bool *inv_p, tree byte_offset)
8546 const char *base_name;
8547 stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
8548 @@ -3881,10 +3901,10 @@
8549 /* (2) Calculate the initial address of the aggregate-pointer, and set
8550 the aggregate-pointer to point to it before the loop. */
8552 - /* Create: (&(base[init_val+offset]) in the loop preheader. */
8553 + /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
8555 new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
8557 + offset, loop, byte_offset);
8561 Index: gcc/emit-rtl.c
8562 ===================================================================
8563 --- gcc/emit-rtl.c (.../tags/gcc_4_8_3_release) (revision 217117)
8564 +++ gcc/emit-rtl.c (.../branches/gcc-4_8-branch) (revision 217117)
8567 /* Return true if the given memory attributes are equal. */
8571 mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
8573 return (p->alias == q->alias
8574 Index: gcc/gimple-fold.c
8575 ===================================================================
8576 --- gcc/gimple-fold.c (.../tags/gcc_4_8_3_release) (revision 217117)
8577 +++ gcc/gimple-fold.c (.../branches/gcc-4_8-branch) (revision 217117)
8578 @@ -2955,8 +2955,8 @@
8580 if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
8581 /* VIEW_CONVERT_EXPR is defined only for matching sizes. */
8582 - && operand_equal_p (TYPE_SIZE (type),
8583 - TYPE_SIZE (TREE_TYPE (ctor)), 0))
8584 + && !compare_tree_int (TYPE_SIZE (type), size)
8585 + && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
8587 ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
8588 ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
8589 Index: gcc/emit-rtl.h
8590 ===================================================================
8591 --- gcc/emit-rtl.h (.../tags/gcc_4_8_3_release) (revision 217117)
8592 +++ gcc/emit-rtl.h (.../branches/gcc-4_8-branch) (revision 217117)
8594 #ifndef GCC_EMIT_RTL_H
8595 #define GCC_EMIT_RTL_H
8597 +/* Return whether two MEM_ATTRs are equal. */
8598 +bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
8600 /* Set the alias set of MEM to SET. */
8601 extern void set_mem_alias_set (rtx, alias_set_type);
8603 Index: gcc/tree-cfgcleanup.c
8604 ===================================================================
8605 --- gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release) (revision 217117)
8606 +++ gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch) (revision 217117)
8607 @@ -498,7 +498,20 @@
8609 /* First split basic block if stmt is not last. */
8610 if (stmt != gsi_stmt (gsi_last_bb (bb)))
8611 - split_block (bb, stmt);
8613 + if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
8615 + /* Don't split if there are only debug stmts
8616 + after stmt, that can result in -fcompare-debug
8617 + failures. Remove the debug stmts instead,
8618 + they should be all unreachable anyway. */
8619 + gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
8620 + for (gsi_next (&gsi); !gsi_end_p (gsi); )
8621 + gsi_remove (&gsi, true);
8624 + split_block (bb, stmt);
8627 changed |= remove_fallthru_edge (bb->succs);
8629 Index: gcc/tree-sra.c
8630 ===================================================================
8631 --- gcc/tree-sra.c (.../tags/gcc_4_8_3_release) (revision 217117)
8632 +++ gcc/tree-sra.c (.../branches/gcc-4_8-branch) (revision 217117)
8633 @@ -1030,6 +1030,11 @@
8637 + if (TREE_THIS_VOLATILE (expr))
8639 + disqualify_base_of_expr (expr, "part of a volatile reference.");
8643 switch (TREE_CODE (expr))
8645 Index: gcc/common.opt
8646 ===================================================================
8647 --- gcc/common.opt (.../tags/gcc_4_8_3_release) (revision 217117)
8648 +++ gcc/common.opt (.../branches/gcc-4_8-branch) (revision 217117)
8649 @@ -1226,6 +1226,10 @@
8650 Common Report Var(flag_tm)
8651 Enable support for GNU transactional memory
8654 +Common Report Var(flag_gnu_unique) Init(1)
8655 +Use STB_GNU_UNIQUE if supported by the assembler
8659 Does nothing. Preserved for backward compatibility.
8660 Index: gcc/tree-vect-patterns.c
8661 ===================================================================
8662 --- gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release) (revision 217117)
8663 +++ gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch) (revision 217117)
8667 oprnd00 = gimple_assign_rhs1 (def_stmt);
8668 - if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
8669 + if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
8673 Index: gcc/sched-deps.c
8674 ===================================================================
8675 --- gcc/sched-deps.c (.../tags/gcc_4_8_3_release) (revision 217117)
8676 +++ gcc/sched-deps.c (.../branches/gcc-4_8-branch) (revision 217117)
8677 @@ -2744,7 +2744,8 @@
8678 Consider for instance a volatile asm that changes the fpu rounding
8679 mode. An insn should not be moved across this even if it only uses
8680 pseudo-regs because it might give an incorrectly rounded result. */
8681 - if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
8682 + if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
8683 + && !DEBUG_INSN_P (insn))
8684 reg_pending_barrier = TRUE_BARRIER;
8686 /* For all ASM_OPERANDS, we must traverse the vector of input operands.
8687 Index: gcc/tree-vect-stmts.c
8688 ===================================================================
8689 --- gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release) (revision 217117)
8690 +++ gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch) (revision 217117)
8691 @@ -4319,6 +4319,7 @@
8692 int i, j, group_size;
8693 tree msq = NULL_TREE, lsq;
8694 tree offset = NULL_TREE;
8695 + tree byte_offset = NULL_TREE;
8696 tree realignment_token = NULL_TREE;
8698 vec<tree> dr_chain = vNULL;
8699 @@ -4934,7 +4935,8 @@
8700 if (alignment_support_scheme == dr_explicit_realign_optimized)
8702 phi = SSA_NAME_DEF_STMT (msq);
8703 - offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
8704 + byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
8709 @@ -4955,7 +4957,8 @@
8711 dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
8712 offset, &dummy, gsi,
8713 - &ptr_incr, false, &inv_p);
8714 + &ptr_incr, false, &inv_p,
8717 dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
8718 TYPE_SIZE_UNIT (aggr_type));
8719 Index: gcc/config/alpha/elf.h
8720 ===================================================================
8721 --- gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release) (revision 217117)
8722 +++ gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch) (revision 217117)
8723 @@ -126,6 +126,10 @@
8724 "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
8725 %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
8727 +/* This variable should be set to 'true' if the target ABI requires
8728 + unwinding tables even when exceptions are not used. */
8729 +#define TARGET_UNWIND_TABLES_DEFAULT true
8731 /* Select a format to encode pointers in exception handling data. CODE
8732 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
8733 true if the symbol may be affected by dynamic relocations.
8734 Index: gcc/config/alpha/alpha.c
8735 ===================================================================
8736 --- gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release) (revision 217117)
8737 +++ gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch) (revision 217117)
8738 @@ -8658,6 +8658,11 @@
8743 + /* __builtin_unreachable can expand to no code at all,
8744 + leaving (barrier) RTXes in the instruction stream. */
8745 + goto close_shadow_notrapb;
8750 @@ -8673,6 +8678,7 @@
8751 n = emit_insn_before (gen_trapb (), i);
8752 PUT_MODE (n, TImode);
8753 PUT_MODE (i, TImode);
8754 + close_shadow_notrapb:
8758 Index: gcc/config/elfos.h
8759 ===================================================================
8760 --- gcc/config/elfos.h (.../tags/gcc_4_8_3_release) (revision 217117)
8761 +++ gcc/config/elfos.h (.../branches/gcc-4_8-branch) (revision 217117)
8763 /* Write the extra assembler code needed to declare an object properly. */
8765 #ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
8766 -#define USE_GNU_UNIQUE_OBJECT 1
8767 +#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
8769 #define USE_GNU_UNIQUE_OBJECT 0
8771 Index: gcc/config/sparc/sync.md
8772 ===================================================================
8773 --- gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release) (revision 217117)
8774 +++ gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch) (revision 217117)
8777 [(set_attr "type" "multi")])
8779 +;; For LEON3, STB has the effect of membar #StoreLoad.
8780 +(define_insn "*membar_storeload_leon3"
8781 + [(set (match_operand:BLK 0 "" "")
8782 + (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
8784 + "stb\t%%g0, [%%sp-1]"
8785 + [(set_attr "type" "store")])
8787 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
8788 (define_insn "*membar_storeload"
8789 [(set (match_operand:BLK 0 "" "")
8790 (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
8792 + "TARGET_V8 && !TARGET_LEON3"
8793 "ldstub\t[%%sp-1], %%g0"
8794 [(set_attr "type" "multi")])
8796 Index: gcc/config/i386/i386.md
8797 ===================================================================
8798 --- gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release) (revision 217117)
8799 +++ gcc/config/i386/i386.md (.../branches/gcc-4_8-branch) (revision 217117)
8800 @@ -5339,66 +5339,37 @@
8802 ;; Avoid store forwarding (partial memory) stall penalty by extending
8803 ;; SImode value to DImode through XMM register instead of pushing two
8804 -;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
8805 -;; targets benefit from this optimization. Also note that fild
8806 -;; loads from memory only.
8807 +;; SImode values to stack. Also note that fild loads from memory only.
8809 -(define_insn "*floatunssi<mode>2_1"
8810 - [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
8811 +(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
8812 + [(set (match_operand:X87MODEF 0 "register_operand" "=f")
8813 (unsigned_float:X87MODEF
8814 - (match_operand:SI 1 "nonimmediate_operand" "x,m")))
8815 - (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
8816 - (clobber (match_scratch:SI 3 "=X,x"))]
8817 + (match_operand:SI 1 "nonimmediate_operand" "rm")))
8818 + (clobber (match_scratch:DI 3 "=x"))
8819 + (clobber (match_operand:DI 2 "memory_operand" "=m"))]
8821 && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
8823 + && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
8825 + "&& reload_completed"
8826 + [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
8827 + (set (match_dup 2) (match_dup 3))
8828 + (set (match_dup 0)
8829 + (float:X87MODEF (match_dup 2)))]
8831 [(set_attr "type" "multi")
8832 (set_attr "mode" "<MODE>")])
8835 - [(set (match_operand:X87MODEF 0 "register_operand")
8836 - (unsigned_float:X87MODEF
8837 - (match_operand:SI 1 "register_operand")))
8838 - (clobber (match_operand:DI 2 "memory_operand"))
8839 - (clobber (match_scratch:SI 3))]
8841 - && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
8843 - && reload_completed"
8844 - [(set (match_dup 2) (match_dup 1))
8845 - (set (match_dup 0)
8846 - (float:X87MODEF (match_dup 2)))]
8847 - "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
8850 - [(set (match_operand:X87MODEF 0 "register_operand")
8851 - (unsigned_float:X87MODEF
8852 - (match_operand:SI 1 "memory_operand")))
8853 - (clobber (match_operand:DI 2 "memory_operand"))
8854 - (clobber (match_scratch:SI 3))]
8856 - && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
8858 - && reload_completed"
8859 - [(set (match_dup 2) (match_dup 3))
8860 - (set (match_dup 0)
8861 - (float:X87MODEF (match_dup 2)))]
8863 - emit_move_insn (operands[3], operands[1]);
8864 - operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
8867 (define_expand "floatunssi<mode>2"
8869 [(set (match_operand:X87MODEF 0 "register_operand")
8870 (unsigned_float:X87MODEF
8871 (match_operand:SI 1 "nonimmediate_operand")))
8872 - (clobber (match_dup 2))
8873 - (clobber (match_scratch:SI 3))])]
8874 + (clobber (match_scratch:DI 3))
8875 + (clobber (match_dup 2))])]
8877 && ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
8879 + && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
8880 || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
8882 if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
8883 @@ -13545,7 +13516,8 @@
8884 (set (reg:CCFP FPSR_REG)
8885 (unspec:CCFP [(match_dup 2) (match_dup 3)]
8887 - "TARGET_USE_FANCY_MATH_387"
8888 + "TARGET_USE_FANCY_MATH_387
8889 + && flag_finite_math_only"
8891 [(set_attr "type" "fpspc")
8892 (set_attr "mode" "XF")])
8893 @@ -13554,7 +13526,8 @@
8894 [(use (match_operand:XF 0 "register_operand"))
8895 (use (match_operand:XF 1 "general_operand"))
8896 (use (match_operand:XF 2 "general_operand"))]
8897 - "TARGET_USE_FANCY_MATH_387"
8898 + "TARGET_USE_FANCY_MATH_387
8899 + && flag_finite_math_only"
8901 rtx label = gen_label_rtx ();
8903 @@ -13577,7 +13550,8 @@
8904 [(use (match_operand:MODEF 0 "register_operand"))
8905 (use (match_operand:MODEF 1 "general_operand"))
8906 (use (match_operand:MODEF 2 "general_operand"))]
8907 - "TARGET_USE_FANCY_MATH_387"
8908 + "TARGET_USE_FANCY_MATH_387
8909 + && flag_finite_math_only"
8911 rtx (*gen_truncxf) (rtx, rtx);
8913 @@ -13616,7 +13590,8 @@
8914 (set (reg:CCFP FPSR_REG)
8915 (unspec:CCFP [(match_dup 2) (match_dup 3)]
8917 - "TARGET_USE_FANCY_MATH_387"
8918 + "TARGET_USE_FANCY_MATH_387
8919 + && flag_finite_math_only"
8921 [(set_attr "type" "fpspc")
8922 (set_attr "mode" "XF")])
8923 @@ -13625,7 +13600,8 @@
8924 [(use (match_operand:XF 0 "register_operand"))
8925 (use (match_operand:XF 1 "general_operand"))
8926 (use (match_operand:XF 2 "general_operand"))]
8927 - "TARGET_USE_FANCY_MATH_387"
8928 + "TARGET_USE_FANCY_MATH_387
8929 + && flag_finite_math_only"
8931 rtx label = gen_label_rtx ();
8933 @@ -13648,7 +13624,8 @@
8934 [(use (match_operand:MODEF 0 "register_operand"))
8935 (use (match_operand:MODEF 1 "general_operand"))
8936 (use (match_operand:MODEF 2 "general_operand"))]
8937 - "TARGET_USE_FANCY_MATH_387"
8938 + "TARGET_USE_FANCY_MATH_387
8939 + && flag_finite_math_only"
8941 rtx (*gen_truncxf) (rtx, rtx);
8943 Index: gcc/config/i386/driver-i386.c
8944 ===================================================================
8945 --- gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release) (revision 217117)
8946 +++ gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch) (revision 217117)
8947 @@ -713,6 +713,11 @@
8948 /* Assume Core 2. */
8951 + else if (has_longmode)
8952 + /* Perhaps some emulator? Assume x86-64, otherwise gcc
8953 + -march=native would be unusable for 64-bit compilations,
8954 + as all the CPUs below are 32-bit only. */
8957 /* It is Core Duo. */
8959 Index: gcc/config/i386/i386.c
8960 ===================================================================
8961 --- gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release) (revision 217117)
8962 +++ gcc/config/i386/i386.c (.../branches/gcc-4_8-branch) (revision 217117)
8963 @@ -20505,7 +20505,7 @@
8964 t1 = gen_reg_rtx (V32QImode);
8965 t2 = gen_reg_rtx (V32QImode);
8966 t3 = gen_reg_rtx (V32QImode);
8967 - vt2 = GEN_INT (128);
8968 + vt2 = GEN_INT (-128);
8969 for (i = 0; i < 32; i++)
8971 vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
8972 @@ -24640,13 +24640,17 @@
8976 - /* Assume that region is SCC, i.e. all immediate predecessors
8977 - of non-head block are in the same region. */
8979 + /* Regions are SCCs with the exception of selective
8980 + scheduling with pipelining of outer blocks enabled.
8981 + So also check that immediate predecessors of a non-head
8982 + block are in the same region. */
8983 FOR_EACH_EDGE (e, ei, bb->preds)
8985 /* Avoid creating of loop-carried dependencies through
8986 - using topological odering in region. */
8987 - if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
8988 + using topological ordering in the region. */
8989 + if (rgn == CONTAINING_RGN (e->src->index)
8990 + && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
8991 add_dependee_for_func_arg (first_arg, e->src);
8994 @@ -38807,8 +38811,8 @@
8995 op0 = gen_lowpart (V4DImode, d->op0);
8996 op1 = gen_lowpart (V4DImode, d->op1);
8998 - = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
8999 - || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
9000 + = GEN_INT ((d->perm[0] / (nelt / 2))
9001 + | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
9002 emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
9005 Index: gcc/config/sh/sh.c
9006 ===================================================================
9007 --- gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release) (revision 217117)
9008 +++ gcc/config/sh/sh.c (.../branches/gcc-4_8-branch) (revision 217117)
9009 @@ -808,6 +808,12 @@
9010 targetm.asm_out.aligned_op.di = NULL;
9011 targetm.asm_out.unaligned_op.di = NULL;
9014 + /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
9015 + Disable it for everything else. */
9016 + if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
9017 + TARGET_USERMODE = false;
9021 if (! strcmp (sh_div_str, "call-div1"))
9022 Index: gcc/config/sh/sync.md
9023 ===================================================================
9024 --- gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release) (revision 217117)
9025 +++ gcc/config/sh/sync.md (.../branches/gcc-4_8-branch) (revision 217117)
9027 (set (mem:SI (match_dup 1))
9029 [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
9030 + (set (reg:SI T_REG) (const_int 1))
9031 (clobber (reg:SI R0_REG))]
9032 "TARGET_ATOMIC_HARD_LLCS
9033 || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9035 (set (mem:QIHI (match_dup 1))
9037 [(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
9038 + (set (reg:SI T_REG) (const_int 1))
9039 (clobber (reg:SI R0_REG))
9040 (clobber (match_scratch:SI 3 "=&r"))
9041 (clobber (match_scratch:SI 4 "=1"))]
9043 [(FETCHOP:SI (mem:SI (match_dup 1))
9044 (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
9046 + (set (reg:SI T_REG) (const_int 1))
9047 (clobber (reg:SI R0_REG))]
9048 "TARGET_ATOMIC_HARD_LLCS
9049 || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9051 [(FETCHOP:QIHI (mem:QIHI (match_dup 1))
9052 (match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
9054 + (set (reg:SI T_REG) (const_int 1))
9055 (clobber (reg:SI R0_REG))
9056 (clobber (match_scratch:SI 3 "=&r"))
9057 (clobber (match_scratch:SI 4 "=1"))]
9059 [(not:SI (and:SI (mem:SI (match_dup 1))
9060 (match_operand:SI 2 "logical_operand" "rK08")))]
9062 + (set (reg:SI T_REG) (const_int 1))
9063 (clobber (reg:SI R0_REG))]
9064 "TARGET_ATOMIC_HARD_LLCS
9065 || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9067 [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
9068 (match_operand:QIHI 2 "logical_operand" "rK08")))]
9070 + (set (reg:SI T_REG) (const_int 1))
9071 (clobber (reg:SI R0_REG))
9072 (clobber (match_scratch:SI 3 "=&r"))
9073 (clobber (match_scratch:SI 4 "=1"))]
9077 " mov.<bwl> %3,@%1" "\n"
9081 [(set_attr "length" "20")])
9084 (set (mem:SI (match_dup 1))
9086 [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
9089 + (set (reg:SI T_REG) (const_int 1))]
9090 "TARGET_ATOMIC_HARD_LLCS
9091 || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9095 [(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
9097 + (set (reg:SI T_REG) (const_int 1))
9098 (clobber (reg:SI R0_REG))
9099 (clobber (match_scratch:SI 3 "=&r"))
9100 (clobber (match_scratch:SI 4 "=1"))]
9101 @@ -1124,7 +1132,8 @@
9102 (set (mem:SI (match_dup 1))
9104 [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
9107 + (set (reg:SI T_REG) (const_int 1))]
9108 "TARGET_ATOMIC_HARD_LLCS
9109 || (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9111 @@ -1145,6 +1154,7 @@
9113 [(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
9115 + (set (reg:SI T_REG) (const_int 1))
9116 (clobber (reg:SI R0_REG))
9117 (clobber (match_scratch:SI 3 "=&r"))
9118 (clobber (match_scratch:SI 4 "=1"))]
9119 @@ -1353,7 +1363,7 @@
9121 " mov.b @%0,r0" "\n"
9122 " mov.b %1,@%0" "\n"
9127 [(set_attr "length" "16")])
9128 Index: gcc/config/sh/sh.opt
9129 ===================================================================
9130 --- gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release) (revision 217117)
9131 +++ gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch) (revision 217117)
9133 Cost to assume for a multiply insn
9136 -Target Report RejectNegative Var(TARGET_USERMODE)
9137 +Target Var(TARGET_USERMODE)
9138 Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
9140 ;; We might want to enable this by default for TARGET_HARD_SH4, because
9141 Index: gcc/config/microblaze/predicates.md
9142 ===================================================================
9143 --- gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release) (revision 217117)
9144 +++ gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch) (revision 217117)
9146 (ior (match_operand 0 "const_0_operand")
9147 (match_operand 0 "register_operand")))
9149 -(define_predicate "reg_or_mem_operand"
9150 - (ior (match_operand 0 "memory_operand")
9151 - (match_operand 0 "register_operand")))
9153 ;; Return if the operand is either the PC or a label_ref.
9154 (define_special_predicate "pc_or_label_operand"
9155 (ior (match_code "pc,label_ref")
9156 Index: gcc/config/microblaze/microblaze.md
9157 ===================================================================
9158 --- gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release) (revision 217117)
9159 +++ gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch) (revision 217117)
9160 @@ -1119,18 +1119,6 @@
9164 -;;Load and store reverse
9165 -(define_insn "movsi4_rev"
9166 - [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
9167 - (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
9172 - [(set_attr "type" "load,store")
9173 - (set_attr "mode" "SI")
9174 - (set_attr "length" "4,4")])
9176 ;; 32-bit floating point moves
9178 (define_expand "movsf"
9179 Index: gcc/config/avr/avr-fixed.md
9180 ===================================================================
9181 --- gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release) (revision 217117)
9182 +++ gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch) (revision 217117)
9186 // Input and output of the libgcc function
9187 - const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
9188 - const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
9189 + const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
9190 + const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
9192 operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
9193 operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
9194 Index: gcc/config/avr/avr.md
9195 ===================================================================
9196 --- gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release) (revision 217117)
9197 +++ gcc/config/avr/avr.md (.../branches/gcc-4_8-branch) (revision 217117)
9198 @@ -367,6 +367,15 @@
9203 + // Avoid (subreg (mem)) for non-generic address spaces below. Because
9204 + // of the poor addressing capabilities of these spaces it's better to
9205 + // load them in one chunk. And it avoids PR61443.
9207 + if (MEM_P (operands[0])
9208 + && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
9209 + operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
9211 for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
9213 rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
9214 Index: gcc/config/avr/avr.h
9215 ===================================================================
9216 --- gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release) (revision 217117)
9217 +++ gcc/config/avr/avr.h (.../branches/gcc-4_8-branch) (revision 217117)
9218 @@ -250,18 +250,18 @@
9219 #define REG_CLASS_CONTENTS { \
9220 {0x00000000,0x00000000}, /* NO_REGS */ \
9221 {0x00000001,0x00000000}, /* R0_REG */ \
9222 - {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
9223 - {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
9224 - {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
9225 + {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
9226 + {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
9227 + {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
9228 {0x00000000,0x00000003}, /* STACK_REG, STACK */ \
9229 - {(3 << REG_Y) | (3 << REG_Z), \
9230 + {(3u << REG_Y) | (3u << REG_Z), \
9231 0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
9232 - {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
9233 + {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
9234 0x00000000}, /* POINTER_REGS, r26 - r31 */ \
9235 - {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
9236 + {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
9237 0x00000000}, /* ADDW_REGS, r24 - r31 */ \
9238 {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
9239 - {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
9240 + {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
9241 0x00000000}, /* LD_REGS, r16 - r31 */ \
9242 {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
9243 {0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
9244 Index: gcc/config/aarch64/arm_neon.h
9245 ===================================================================
9246 --- gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release) (revision 217117)
9247 +++ gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch) (revision 217117)
9248 @@ -13815,7 +13815,7 @@
9250 __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
9254 : /* No clobbers */);
9257 @@ -13837,7 +13837,7 @@
9259 __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
9263 : /* No clobbers */);
9266 Index: gcc/config/aarch64/aarch64.md
9267 ===================================================================
9268 --- gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release) (revision 217117)
9269 +++ gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch) (revision 217117)
9270 @@ -3292,6 +3292,7 @@
9271 (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
9273 (clobber (reg:DI LR_REGNUM))
9274 + (clobber (reg:CC CC_REGNUM))
9275 (clobber (match_scratch:DI 1 "=r"))]
9277 "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
9278 Index: gcc/config/aarch64/aarch64.opt
9279 ===================================================================
9280 --- gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release) (revision 217117)
9281 +++ gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch) (revision 217117)
9283 Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
9284 Generate code which uses only the general registers
9286 +mfix-cortex-a53-835769
9287 +Target Report Var(aarch64_fix_a53_err835769) Init(2)
9288 +Workaround for ARM Cortex-A53 Erratum number 835769
9291 Target Report RejectNegative InverseMask(BIG_END)
9292 Assume target CPU is configured as little endian
9293 Index: gcc/config/aarch64/aarch64-protos.h
9294 ===================================================================
9295 --- gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
9296 +++ gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
9299 extern void aarch64_split_combinev16qi (rtx operands[3]);
9300 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
9301 +extern bool aarch64_madd_needs_nop (rtx);
9302 +extern void aarch64_final_prescan_insn (rtx);
9304 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
9306 Index: gcc/config/aarch64/aarch64.c
9307 ===================================================================
9308 --- gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release) (revision 217117)
9309 +++ gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch) (revision 217117)
9310 @@ -1201,6 +1201,7 @@
9311 CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
9312 int ncrn, nvrn, nregs;
9313 bool allocate_ncrn, allocate_nvrn;
9314 + HOST_WIDE_INT size;
9316 /* We need to do this once per argument. */
9317 if (pcum->aapcs_arg_processed)
9318 @@ -1208,6 +1209,11 @@
9320 pcum->aapcs_arg_processed = true;
9322 + /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
9324 + = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
9327 allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
9328 allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
9330 @@ -1258,10 +1264,8 @@
9333 ncrn = pcum->aapcs_ncrn;
9334 - nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
9335 - + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
9336 + nregs = size / UNITS_PER_WORD;
9339 /* C6 - C9. though the sign and zero extension semantics are
9340 handled elsewhere. This is the case where the argument fits
9341 entirely general registers. */
9342 @@ -1309,13 +1313,12 @@
9343 pcum->aapcs_nextncrn = NUM_ARG_REGS;
9345 /* The argument is passed on stack; record the needed number of words for
9346 - this argument (we can re-use NREGS) and align the total size if
9348 + this argument and align the total size if necessary. */
9350 - pcum->aapcs_stack_words = nregs;
9351 + pcum->aapcs_stack_words = size / UNITS_PER_WORD;
9352 if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
9353 pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
9354 - 16 / UNITS_PER_WORD) + 1;
9355 + 16 / UNITS_PER_WORD);
9359 @@ -4845,6 +4848,15 @@
9360 aarch64_tune = selected_tune->core;
9361 aarch64_tune_params = selected_tune->tune;
9363 + if (aarch64_fix_a53_err835769 == 2)
9365 +#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
9366 + aarch64_fix_a53_err835769 = 1;
9368 + aarch64_fix_a53_err835769 = 0;
9372 aarch64_override_options_after_change ();
9375 @@ -6037,6 +6049,135 @@
9380 +/* Return true iff X is a MEM rtx. */
9383 +is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
9385 + return MEM_P (*x);
9389 +/* Return true if mem_insn contains a MEM RTX somewhere in it. */
9392 +has_memory_op (rtx mem_insn)
9394 + rtx pattern = PATTERN (mem_insn);
9395 + return for_each_rtx (&pattern, is_mem_p, NULL);
9399 +/* Find the first rtx before insn that will generate an assembly
9403 +aarch64_prev_real_insn (rtx insn)
9410 + insn = prev_real_insn (insn);
9412 + while (insn && recog_memoized (insn) < 0);
9417 +/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
9420 +is_madd_op (enum attr_v8type t1)
9422 + return t1 == V8TYPE_MADD
9423 + || t1 == V8TYPE_MADDL;
9427 +/* Check if there is a register dependency between a load and the insn
9428 + for which we hold recog_data. */
9431 +dep_between_memop_and_curr (rtx memop)
9436 + gcc_assert (GET_CODE (memop) == SET);
9438 + if (!REG_P (SET_DEST (memop)))
9441 + load_reg = SET_DEST (memop);
9442 + for (opno = 1; opno < recog_data.n_operands; opno++)
9444 + rtx operand = recog_data.operand[opno];
9445 + if (REG_P (operand)
9446 + && reg_overlap_mentioned_p (load_reg, operand))
9455 +/* When working around the Cortex-A53 erratum 835769,
9456 + given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
9457 + instruction and has a preceding memory instruction such that a NOP
9458 + should be inserted between them. */
9461 +aarch64_madd_needs_nop (rtx insn)
9463 + enum attr_v8type attr_type;
9467 + if (!aarch64_fix_a53_err835769)
9470 + if (recog_memoized (insn) < 0)
9473 + attr_type = get_attr_v8type (insn);
9474 + if (!is_madd_op (attr_type))
9477 + prev = aarch64_prev_real_insn (insn);
9478 + /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
9479 + Restore recog state to INSN to avoid state corruption. */
9480 + extract_constrain_insn_cached (insn);
9482 + if (!prev || !has_memory_op (prev))
9485 + body = single_set (prev);
9487 + /* If the previous insn is a memory op and there is no dependency between
9488 + it and the madd, emit a nop between them. If we know it's a memop but
9489 + body is NULL, return true to be safe. */
9490 + if (GET_MODE (recog_data.operand[0]) == DImode
9491 + && (!body || !dep_between_memop_and_curr (body)))
9498 +/* Implement FINAL_PRESCAN_INSN. */
9501 +aarch64_final_prescan_insn (rtx insn)
9503 + if (aarch64_madd_needs_nop (insn))
9504 + fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
9508 /* Return the equivalent letter for size. */
9509 static unsigned char
9510 sizetochar (int size)
9511 Index: gcc/config/aarch64/aarch64-linux.h
9512 ===================================================================
9513 --- gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release) (revision 217117)
9514 +++ gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch) (revision 217117)
9519 +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
9521 #endif /* GCC_AARCH64_LINUX_H */
9522 Index: gcc/config/aarch64/aarch64.h
9523 ===================================================================
9524 --- gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release) (revision 217117)
9525 +++ gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch) (revision 217117)
9526 @@ -465,6 +465,18 @@
9527 (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
9530 +/* If inserting NOP before a mult-accumulate insn remember to adjust the
9531 + length so that conditional branching code is updated appropriately. */
9532 +#define ADJUST_INSN_LENGTH(insn, length) \
9535 + if (aarch64_madd_needs_nop (insn)) \
9539 +#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
9540 + aarch64_final_prescan_insn (INSN); \
9542 /* The processor for which instructions should be scheduled. */
9543 extern enum aarch64_processor aarch64_tune;
9545 Index: gcc/config/rs6000/constraints.md
9546 ===================================================================
9547 --- gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release) (revision 217117)
9548 +++ gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch) (revision 217117)
9550 (define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
9551 "If -mmfpgpr was used, a floating point register or NO_REGS.")
9553 +(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
9554 + "Floating point register if direct moves are available, or NO_REGS.")
9556 +;; At present, DImode is not allowed in the Altivec registers. If in the
9557 +;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
9558 +(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
9559 + "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
9561 +(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
9562 + "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
9564 +(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
9565 + "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
9567 (define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
9568 "Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
9571 "Floating point register if the STFIWX instruction is enabled or NO_REGS.")
9573 (define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
9574 - "VSX vector register to hold scalar float values or NO_REGS.")
9575 + "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
9577 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
9578 "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
9579 Index: gcc/config/rs6000/predicates.md
9580 ===================================================================
9581 --- gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release) (revision 217117)
9582 +++ gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch) (revision 217117)
9583 @@ -1795,7 +1795,7 @@
9584 (define_predicate "fusion_gpr_mem_load"
9585 (match_code "mem,sign_extend,zero_extend")
9588 + rtx addr, base, offset;
9590 /* Handle sign/zero extend. */
9591 if (GET_CODE (op) == ZERO_EXTEND
9592 @@ -1825,24 +1825,79 @@
9595 addr = XEXP (op, 0);
9596 + if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
9599 + base = XEXP (addr, 0);
9600 + if (!base_reg_operand (base, GET_MODE (base)))
9603 + offset = XEXP (addr, 1);
9605 if (GET_CODE (addr) == PLUS)
9606 + return satisfies_constraint_I (offset);
9608 + else if (GET_CODE (addr) == LO_SUM)
9610 - rtx base = XEXP (addr, 0);
9611 - rtx offset = XEXP (addr, 1);
9612 + if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
9613 + return small_toc_ref (offset, GET_MODE (offset));
9615 - return (base_reg_operand (base, GET_MODE (base))
9616 - && satisfies_constraint_I (offset));
9617 + else if (TARGET_ELF && !TARGET_POWERPC64)
9618 + return CONSTANT_P (offset);
9621 - else if (GET_CODE (addr) == LO_SUM)
9625 +;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
9626 +;; memory field with both the addis and the memory offset. Sign extension
9627 +;; is not handled here, since lha and lwa are not fused.
9628 +(define_predicate "fusion_gpr_mem_combo"
9629 + (match_code "mem,zero_extend")
9631 + rtx addr, base, offset;
9633 + /* Handle zero extend. */
9634 + if (GET_CODE (op) == ZERO_EXTEND)
9636 - rtx base = XEXP (addr, 0);
9637 - rtx offset = XEXP (addr, 1);
9638 + op = XEXP (op, 0);
9639 + mode = GET_MODE (op);
9642 - if (!base_reg_operand (base, GET_MODE (base)))
9654 + if (!TARGET_POWERPC64)
9658 - else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
9663 + addr = XEXP (op, 0);
9664 + if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
9667 + base = XEXP (addr, 0);
9668 + if (!fusion_gpr_addis (base, GET_MODE (base)))
9671 + offset = XEXP (addr, 1);
9672 + if (GET_CODE (addr) == PLUS)
9673 + return satisfies_constraint_I (offset);
9675 + else if (GET_CODE (addr) == LO_SUM)
9677 + if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
9678 return small_toc_ref (offset, GET_MODE (offset));
9680 else if (TARGET_ELF && !TARGET_POWERPC64)
9681 Index: gcc/config/rs6000/htm.md
9682 ===================================================================
9683 --- gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release) (revision 217117)
9684 +++ gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch) (revision 217117)
9687 UNSPECV_HTM_TABORTWCI))
9688 (set (subreg:CC (match_dup 2) 0) (match_dup 1))
9689 - (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
9690 + (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
9691 (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
9692 (and:SI (match_dup 3) (const_int 15)))
9693 (clobber (scratch:CC))])]
9694 Index: gcc/config/rs6000/freebsd64.h
9695 ===================================================================
9696 --- gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release) (revision 217117)
9697 +++ gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch) (revision 217117)
9699 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
9700 #undef ADJUST_FIELD_ALIGN
9701 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
9702 - ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
9703 + (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
9706 && TARGET_ALIGN_NATURAL == 0 \
9707 Index: gcc/config/rs6000/rs6000-protos.h
9708 ===================================================================
9709 --- gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
9710 +++ gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
9712 extern bool gpr_or_gpr_p (rtx, rtx);
9713 extern bool direct_move_p (rtx, rtx);
9714 extern bool quad_load_store_p (rtx, rtx);
9715 -extern bool fusion_gpr_load_p (rtx *, bool);
9716 +extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
9717 extern void expand_fusion_gpr_load (rtx *);
9718 -extern const char *emit_fusion_gpr_load (rtx *);
9719 +extern const char *emit_fusion_gpr_load (rtx, rtx);
9720 extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
9722 extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
9726 extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
9727 +extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
9728 extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
9730 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
9732 extern rtx rs6000_libcall_value (enum machine_mode);
9733 extern rtx rs6000_va_arg (tree, tree);
9734 extern int function_ok_for_sibcall (tree);
9735 -extern int rs6000_reg_parm_stack_space (tree);
9736 +extern int rs6000_reg_parm_stack_space (tree, bool);
9737 extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
9738 extern bool rs6000_elf_in_small_data_p (const_tree);
9739 #ifdef ARGS_SIZE_RTX
9740 Index: gcc/config/rs6000/rs6000-builtin.def
9741 ===================================================================
9742 --- gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release) (revision 217117)
9743 +++ gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch) (revision 217117)
9744 @@ -622,20 +622,13 @@
9745 | RS6000_BTC_TERNARY), \
9746 CODE_FOR_ ## ICODE) /* ICODE */
9748 -/* Miscellaneous builtins. */
9749 -#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
9750 +/* 128-bit long double floating point builtins. */
9751 +#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
9752 RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
9753 "__builtin_" NAME, /* NAME */ \
9754 - RS6000_BTM_HARD_FLOAT, /* MASK */ \
9755 + (RS6000_BTM_HARD_FLOAT /* MASK */ \
9756 + | RS6000_BTM_LDBL128), \
9757 (RS6000_BTC_ ## ATTR /* ATTR */ \
9758 - | RS6000_BTC_UNARY), \
9759 - CODE_FOR_ ## ICODE) /* ICODE */
9761 -#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
9762 - RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
9763 - "__builtin_" NAME, /* NAME */ \
9764 - RS6000_BTM_HARD_FLOAT, /* MASK */ \
9765 - (RS6000_BTC_ ## ATTR /* ATTR */ \
9766 | RS6000_BTC_BINARY), \
9767 CODE_FOR_ ## ICODE) /* ICODE */
9769 @@ -1593,10 +1586,8 @@
9770 BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
9771 BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
9773 -BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
9774 -BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
9775 -BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
9776 -BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
9777 +BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
9778 +BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
9780 BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
9781 BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
9782 Index: gcc/config/rs6000/rs6000-c.c
9783 ===================================================================
9784 --- gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release) (revision 217117)
9785 +++ gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch) (revision 217117)
9786 @@ -4126,7 +4126,8 @@
9787 argument) is reversed. Patch the arguments here before building
9788 the resolved CALL_EXPR. */
9789 if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
9790 - && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
9791 + && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
9792 + && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
9795 t = args[2], args[2] = args[1], args[1] = t;
9796 @@ -4184,6 +4185,14 @@
9797 if (TARGET_DEBUG_BUILTIN)
9798 fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
9799 (int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
9801 + /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
9802 + if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
9803 + warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
9804 +assignment for unaligned loads and stores");
9805 + else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
9806 + warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
9807 +assignment for unaligned loads and stores");
9809 /* For now treat vec_splats and vec_promote as the same. */
9810 if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
9811 Index: gcc/config/rs6000/linux64.h
9812 ===================================================================
9813 --- gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release) (revision 217117)
9814 +++ gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch) (revision 217117)
9816 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
9817 #undef ADJUST_FIELD_ALIGN
9818 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
9819 - ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
9820 + (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
9823 && TARGET_ALIGN_NATURAL == 0 \
9824 Index: gcc/config/rs6000/rs6000.c
9825 ===================================================================
9826 --- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release) (revision 217117)
9827 +++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch) (revision 217117)
9829 enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
9830 enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
9831 addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
9832 + bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
9835 static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
9836 @@ -1704,8 +1705,7 @@
9838 if (TARGET_VSX && VSX_REGNO_P (regno)
9839 && (VECTOR_MEM_VSX_P (mode)
9840 - || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
9841 - || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
9842 + || reg_addr[mode].scalar_in_vmx_p
9843 || (TARGET_VSX_TIMODE && mode == TImode)
9844 || (TARGET_VADDUQM && mode == V1TImode)))
9846 @@ -1714,12 +1714,9 @@
9848 if (ALTIVEC_REGNO_P (regno))
9850 - if (mode == SFmode && !TARGET_UPPER_REGS_SF)
9851 + if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
9854 - if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
9857 return ALTIVEC_REGNO_P (last_regno);
9860 @@ -1897,14 +1894,16 @@
9861 if (rs6000_vector_unit[m] != VECTOR_NONE
9862 || rs6000_vector_mem[m] != VECTOR_NONE
9863 || (reg_addr[m].reload_store != CODE_FOR_nothing)
9864 - || (reg_addr[m].reload_load != CODE_FOR_nothing))
9865 + || (reg_addr[m].reload_load != CODE_FOR_nothing)
9866 + || reg_addr[m].scalar_in_vmx_p)
9869 - " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
9870 + " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
9871 rs6000_debug_vector_unit (rs6000_vector_unit[m]),
9872 rs6000_debug_vector_unit (rs6000_vector_mem[m]),
9873 (reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
9874 - (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
9875 + (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
9876 + (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
9879 fputs ("\n", stderr);
9880 @@ -2021,6 +2020,10 @@
9881 "wd reg_class = %s\n"
9882 "wf reg_class = %s\n"
9883 "wg reg_class = %s\n"
9884 + "wh reg_class = %s\n"
9885 + "wi reg_class = %s\n"
9886 + "wj reg_class = %s\n"
9887 + "wk reg_class = %s\n"
9888 "wl reg_class = %s\n"
9889 "wm reg_class = %s\n"
9890 "wr reg_class = %s\n"
9891 @@ -2040,6 +2043,10 @@
9892 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
9893 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
9894 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
9895 + reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
9896 + reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
9897 + reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
9898 + reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
9899 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
9900 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
9901 reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
9902 @@ -2324,6 +2331,8 @@
9904 for (m = 0; m < NUM_MACHINE_MODES; ++m)
9906 + enum machine_mode m2 = (enum machine_mode)m;
9908 /* SDmode is special in that we want to access it only via REG+REG
9909 addressing on power7 and above, since we want to use the LFIWZX and
9910 STFIWZX instructions to load it. */
9911 @@ -2358,13 +2367,12 @@
9914 && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
9915 - && GET_MODE_SIZE (m) <= 8
9916 - && !VECTOR_MODE_P (m)
9917 - && !COMPLEX_MODE_P (m)
9918 + && GET_MODE_SIZE (m2) <= 8
9919 + && !VECTOR_MODE_P (m2)
9920 + && !COMPLEX_MODE_P (m2)
9922 - && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
9923 - && !(m == DFmode && TARGET_UPPER_REGS_DF)
9924 - && !(m == SFmode && TARGET_UPPER_REGS_SF))
9925 + && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
9926 + && !reg_addr[m2].scalar_in_vmx_p)
9928 addr_mask |= RELOAD_REG_PRE_INCDEC;
9930 @@ -2595,16 +2603,22 @@
9931 f - Register class to use with traditional SFmode instructions.
9932 v - Altivec register.
9933 wa - Any VSX register.
9934 + wc - Reserved to represent individual CR bits (used in LLVM).
9935 wd - Preferred register class for V2DFmode.
9936 wf - Preferred register class for V4SFmode.
9937 wg - Float register for power6x move insns.
9938 + wh - FP register for direct move instructions.
9939 + wi - FP or VSX register to hold 64-bit integers for VSX insns.
9940 + wj - FP or VSX register to hold 64-bit integers for direct moves.
9941 + wk - FP or VSX register to hold 64-bit doubles for direct moves.
9942 wl - Float register if we can do 32-bit signed int loads.
9943 wm - VSX register for ISA 2.07 direct move operations.
9944 + wn - always NO_REGS.
9945 wr - GPR if 64-bit mode is permitted.
9946 ws - Register class to do ISA 2.06 DF operations.
9947 + wt - VSX register for TImode in VSX registers.
9948 wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
9949 wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
9950 - wt - VSX register for TImode in VSX registers.
9951 ww - Register class to do SF conversions in with VSX operations.
9952 wx - Float register if we can do 32-bit int stores.
9953 wy - Register class to do ISA 2.07 SF operations.
9954 @@ -2611,21 +2625,22 @@
9955 wz - Float register if we can do 32-bit unsigned int loads. */
9957 if (TARGET_HARD_FLOAT && TARGET_FPRS)
9958 - rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
9959 + rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
9961 if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
9962 - rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
9963 + rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
9967 rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
9968 - rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
9969 - rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
9970 + rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
9971 + rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
9972 + rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
9974 if (TARGET_VSX_TIMODE)
9975 - rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
9976 + rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
9978 - if (TARGET_UPPER_REGS_DF)
9979 + if (TARGET_UPPER_REGS_DF) /* DFmode */
9981 rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
9982 rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
9983 @@ -2639,19 +2654,26 @@
9985 rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
9987 - if (TARGET_MFPGPR)
9988 + if (TARGET_MFPGPR) /* DFmode */
9989 rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
9992 - rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
9993 + rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
9995 if (TARGET_DIRECT_MOVE)
9996 - rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
9998 + rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
9999 + rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
10000 + = rs6000_constraints[RS6000_CONSTRAINT_wi];
10001 + rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
10002 + = rs6000_constraints[RS6000_CONSTRAINT_ws];
10003 + rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
10006 if (TARGET_POWERPC64)
10007 rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
10009 - if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
10010 + if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
10012 rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
10013 rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
10014 @@ -2666,10 +2688,10 @@
10015 rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
10018 - rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
10019 + rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
10022 - rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
10023 + rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
10025 /* Set up the reload helper and direct move functions. */
10026 if (TARGET_VSX || TARGET_ALTIVEC)
10027 @@ -2692,10 +2714,11 @@
10028 reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
10029 if (TARGET_VSX && TARGET_UPPER_REGS_DF)
10031 - reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
10032 - reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
10033 - reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
10034 - reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
10035 + reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
10036 + reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
10037 + reg_addr[DFmode].scalar_in_vmx_p = true;
10038 + reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
10039 + reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
10041 if (TARGET_P8_VECTOR)
10043 @@ -2703,6 +2726,8 @@
10044 reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
10045 reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
10046 reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
10047 + if (TARGET_UPPER_REGS_SF)
10048 + reg_addr[SFmode].scalar_in_vmx_p = true;
10050 if (TARGET_VSX_TIMODE)
10052 @@ -2759,10 +2784,11 @@
10053 reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
10054 if (TARGET_VSX && TARGET_UPPER_REGS_DF)
10056 - reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
10057 - reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
10058 - reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
10059 - reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
10060 + reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
10061 + reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
10062 + reg_addr[DFmode].scalar_in_vmx_p = true;
10063 + reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
10064 + reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
10066 if (TARGET_P8_VECTOR)
10068 @@ -2770,6 +2796,8 @@
10069 reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
10070 reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
10071 reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
10072 + if (TARGET_UPPER_REGS_SF)
10073 + reg_addr[SFmode].scalar_in_vmx_p = true;
10075 if (TARGET_VSX_TIMODE)
10077 @@ -2810,6 +2838,7 @@
10079 for (m = 0; m < NUM_MACHINE_MODES; ++m)
10081 + enum machine_mode m2 = (enum machine_mode)m;
10082 int reg_size2 = reg_size;
10084 /* TFmode/TDmode always takes 2 registers, even in VSX. */
10085 @@ -2818,7 +2847,7 @@
10086 reg_size2 = UNITS_PER_FP_WORD;
10088 rs6000_class_max_nregs[m][c]
10089 - = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
10090 + = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
10094 @@ -3014,7 +3043,8 @@
10095 | ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
10096 | ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
10097 | ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
10098 - | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
10099 + | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
10100 + | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
10103 /* Override command line options. Mostly we process the processor type and
10104 @@ -5861,6 +5891,34 @@
10108 +/* Previous GCC releases forced all vector types to have 16-byte alignment. */
10111 +rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
10113 + if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
10115 + if (computed != 128)
10117 + static bool warned;
10118 + if (!warned && warn_psabi)
10121 + inform (input_location,
10122 + "the layout of aggregates containing vectors with"
10123 + " %d-byte alignment will change in a future GCC release",
10124 + computed / BITS_PER_UNIT);
10127 + /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
10128 + keep the special treatment of vector types, but warn if there will
10129 + be differences in future GCC releases. */
10136 /* AIX increases natural record alignment to doubleword if the first
10137 field is an FP double while the FP fields remain word aligned. */
10139 @@ -6109,7 +6167,8 @@
10142 extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
10143 - gcc_assert (extra >= 0);
10147 if (GET_CODE (addr) == LO_SUM)
10148 /* For lo_sum addresses, we must allow any offset except one that
10149 @@ -9198,14 +9257,51 @@
10150 || (type && TREE_CODE (type) == VECTOR_TYPE
10151 && int_size_in_bytes (type) >= 16))
10153 - else if (((TARGET_MACHO && rs6000_darwin64_abi)
10154 - || DEFAULT_ABI == ABI_ELFv2
10155 - || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
10156 - && mode == BLKmode
10157 - && type && TYPE_ALIGN (type) > 64)
10159 + /* Aggregate types that need > 8 byte alignment are quadword-aligned
10160 + in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
10161 + -mcompat-align-parm is used. */
10162 + if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
10163 + || DEFAULT_ABI == ABI_ELFv2)
10164 + && type && TYPE_ALIGN (type) > 64)
10166 + /* "Aggregate" means any AGGREGATE_TYPE except for single-element
10167 + or homogeneous float/vector aggregates here. We already handled
10168 + vector aggregates above, but still need to check for float here. */
10169 + bool aggregate_p = (AGGREGATE_TYPE_P (type)
10170 + && !SCALAR_FLOAT_MODE_P (elt_mode));
10172 + /* We used to check for BLKmode instead of the above aggregate type
10173 + check. Warn when this results in any difference to the ABI. */
10174 + if (aggregate_p != (mode == BLKmode))
10176 + static bool warned;
10177 + if (!warned && warn_psabi)
10180 + inform (input_location,
10181 + "the ABI of passing aggregates with %d-byte alignment"
10182 + " will change in a future GCC release",
10183 + (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
10187 + /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
10188 + keep using the BLKmode check, but warn if there will be differences
10189 + in future GCC releases. */
10190 + if (mode == BLKmode)
10194 + /* Similar for the Darwin64 ABI. Note that for historical reasons we
10195 + implement the "aggregate type" check as a BLKmode check here; this
10196 + means certain aggregate types are in fact not aligned. */
10197 + if (TARGET_MACHO && rs6000_darwin64_abi
10198 + && mode == BLKmode
10199 + && type && TYPE_ALIGN (type) > 64)
10202 - return PARM_BOUNDARY;
10204 + return PARM_BOUNDARY;
10207 /* The offset in words to the start of the parameter save area. */
10208 @@ -10243,6 +10339,7 @@
10211 unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
10214 /* Do we also need to pass this argument in the parameter
10216 @@ -10271,6 +10368,37 @@
10217 rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
10220 + /* If there were not enough FPRs to hold the argument, the rest
10221 + usually goes into memory. However, if the current position
10222 + is still within the register parameter area, a portion may
10223 + actually have to go into GPRs.
10225 + Note that it may happen that the portion of the argument
10226 + passed in the first "half" of the first GPR was already
10227 + passed in the last FPR as well.
10229 + For unnamed arguments, we already set up GPRs to cover the
10230 + whole argument in rs6000_psave_function_arg, so there is
10231 + nothing further to do at this point.
10233 + GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
10234 + GCC releases. To avoid any ABI change on the release branch,
10235 + we retain that original implementation here, but warn if we
10236 + encounter a case where the ABI will change in the future. */
10237 + fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
10238 + if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
10239 + && cum->nargs_prototype > 0)
10241 + static bool warned;
10242 + if (!warned && warn_psabi)
10245 + inform (input_location,
10246 + "the ABI of passing homogeneous float aggregates"
10247 + " will change in a future GCC release");
10251 return rs6000_finish_function_arg (mode, rvec, k);
10253 else if (align_words < GP_ARG_NUM_REG)
10254 @@ -10497,10 +10625,9 @@
10255 list, or passes any parameter in memory. */
10258 -rs6000_function_parms_need_stack (tree fun)
10259 +rs6000_function_parms_need_stack (tree fun, bool incoming)
10261 - function_args_iterator args_iter;
10263 + tree fntype, result;
10264 CUMULATIVE_ARGS args_so_far_v;
10265 cumulative_args_t args_so_far;
10267 @@ -10507,26 +10634,57 @@
10269 /* Must be a libcall, all of which only use reg parms. */
10274 - fun = TREE_TYPE (fun);
10275 + fntype = TREE_TYPE (fun);
10277 /* Varargs functions need the parameter save area. */
10278 - if (!prototype_p (fun) || stdarg_p (fun))
10279 + if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
10282 - INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
10283 + INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
10284 args_so_far = pack_cumulative_args (&args_so_far_v);
10286 - if (aggregate_value_p (TREE_TYPE (fun), fun))
10287 + /* When incoming, we will have been passed the function decl.
10288 + It is necessary to use the decl to handle K&R style functions,
10289 + where TYPE_ARG_TYPES may not be available. */
10292 - tree type = build_pointer_type (TREE_TYPE (fun));
10293 - rs6000_parm_needs_stack (args_so_far, type);
10294 + gcc_assert (DECL_P (fun));
10295 + result = DECL_RESULT (fun);
10298 + result = TREE_TYPE (fntype);
10300 - FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
10301 - if (rs6000_parm_needs_stack (args_so_far, arg_type))
10303 + if (result && aggregate_value_p (result, fntype))
10305 + if (!TYPE_P (result))
10306 + result = TREE_TYPE (result);
10307 + result = build_pointer_type (result);
10308 + rs6000_parm_needs_stack (args_so_far, result);
10315 + for (parm = DECL_ARGUMENTS (fun);
10316 + parm && parm != void_list_node;
10317 + parm = TREE_CHAIN (parm))
10318 + if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
10323 + function_args_iterator args_iter;
10326 + FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
10327 + if (rs6000_parm_needs_stack (args_so_far, arg_type))
10334 @@ -10537,7 +10695,7 @@
10335 all parameters in registers. */
10338 -rs6000_reg_parm_stack_space (tree fun)
10339 +rs6000_reg_parm_stack_space (tree fun, bool incoming)
10341 int reg_parm_stack_space;
10343 @@ -10555,7 +10713,7 @@
10345 /* ??? Recomputing this every time is a bit expensive. Is there
10346 a place to cache this information? */
10347 - if (rs6000_function_parms_need_stack (fun))
10348 + if (rs6000_function_parms_need_stack (fun, incoming))
10349 reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
10351 reg_parm_stack_space = 0;
10352 @@ -13544,11 +13702,15 @@
10353 else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
10354 == (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
10355 error ("Builtin function %s requires the -mhard-dfp and"
10356 - "-mpower8-vector options", name);
10357 + " -mpower8-vector options", name);
10358 else if ((fnmask & RS6000_BTM_DFP) != 0)
10359 error ("Builtin function %s requires the -mhard-dfp option", name);
10360 else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
10361 error ("Builtin function %s requires the -mpower8-vector option", name);
10362 + else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
10363 + == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
10364 + error ("Builtin function %s requires the -mhard-float and"
10365 + " -mlong-double-128 options", name);
10366 else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
10367 error ("Builtin function %s requires the -mhard-float option", name);
10369 @@ -13649,8 +13811,8 @@
10370 case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
10371 case ALTIVEC_BUILTIN_MASK_FOR_STORE:
10373 - int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
10374 - : (int) CODE_FOR_altivec_lvsl);
10375 + int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
10376 + : (int) CODE_FOR_altivec_lvsl_direct);
10377 enum machine_mode tmode = insn_data[icode].operand[0].mode;
10378 enum machine_mode mode = insn_data[icode].operand[1].mode;
10380 @@ -13678,7 +13840,6 @@
10381 || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
10382 target = gen_reg_rtx (tmode);
10384 - /*pat = gen_altivec_lvsr (target, op);*/
10385 pat = GEN_FCN (icode) (target, op);
10388 @@ -17099,7 +17260,14 @@
10389 prefer Altivec loads.. */
10390 if (rclass == VSX_REGS)
10392 - if (GET_MODE_SIZE (mode) <= 8)
10393 + if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
10395 + rtx addr = XEXP (x, 0);
10396 + if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
10397 + || legitimate_lo_sum_address_p (mode, addr, false))
10398 + return FLOAT_REGS;
10400 + else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
10403 if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
10404 @@ -31413,6 +31581,7 @@
10405 { "htm", RS6000_BTM_HTM, false, false },
10406 { "hard-dfp", RS6000_BTM_DFP, false, false },
10407 { "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
10408 + { "long-double-128", RS6000_BTM_LDBL128, false, false },
10411 /* Option variables that we want to support inside attribute((target)) and
10412 @@ -32663,25 +32832,14 @@
10414 /* Return true if the peephole2 can combine a load involving a combination of
10415 an addis instruction and a load with an offset that can be fused together on
10419 - The operands are:
10420 - operands[0] register set with addis
10421 - operands[1] value set via addis
10422 - operands[2] target register being loaded
10423 - operands[3] D-form memory reference using operands[0].
10425 - In addition, we are passed a boolean that is true if this is a peephole2,
10426 - and we can use see if the addis_reg is dead after the insn and can be
10427 - replaced by the target register. */
10430 -fusion_gpr_load_p (rtx *operands, bool peep2_p)
10431 +fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
10432 + rtx addis_value, /* addis value. */
10433 + rtx target, /* target register that is loaded. */
10434 + rtx mem) /* bottom part of the memory addr. */
10436 - rtx addis_reg = operands[0];
10437 - rtx addis_value = operands[1];
10438 - rtx target = operands[2];
10439 - rtx mem = operands[3];
10443 @@ -32695,9 +32853,6 @@
10444 if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
10447 - if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
10450 /* Allow sign/zero extension. */
10451 if (GET_CODE (mem) == ZERO_EXTEND
10452 || (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
10453 @@ -32706,22 +32861,22 @@
10457 + if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
10460 addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
10461 if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10464 /* Validate that the register used to load the high value is either the
10465 - register being loaded, or we can safely replace its use in a peephole2.
10466 + register being loaded, or we can safely replace its use.
10468 - If this is a peephole2, we assume that there are 2 instructions in the
10469 - peephole (addis and load), so we want to check if the target register was
10470 - not used in the memory address and the register to hold the addis result
10471 - is dead after the peephole. */
10472 + This function is only called from the peephole2 pass and we assume that
10473 + there are 2 instructions in the peephole (addis and load), so we want to
10474 + check if the target register was not used in the memory address and the
10475 + register to hold the addis result is dead after the peephole. */
10476 if (REGNO (addis_reg) != REGNO (target))
10481 if (reg_mentioned_p (target, mem))
10484 @@ -32762,9 +32917,6 @@
10485 enum machine_mode extend_mode = target_mode;
10486 enum machine_mode ptr_mode = Pmode;
10487 enum rtx_code extend = UNKNOWN;
10488 - rtx addis_reg = ((ptr_mode == target_mode)
10490 - : simplify_subreg (ptr_mode, target, target_mode, 0));
10492 if (GET_CODE (orig_mem) == ZERO_EXTEND
10493 || (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
10494 @@ -32781,13 +32933,14 @@
10495 gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
10497 offset = XEXP (orig_addr, 1);
10498 - new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
10499 - new_mem = change_address (orig_mem, target_mode, new_addr);
10500 + new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
10501 + new_mem = replace_equiv_address_nv (orig_mem, new_addr);
10503 if (extend != UNKNOWN)
10504 new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
10506 - emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
10507 + new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
10508 + UNSPEC_FUSION_GPR);
10509 emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
10511 if (extend == SIGN_EXTEND)
10512 @@ -32806,55 +32959,40 @@
10515 /* Return a string to fuse an addis instruction with a gpr load to the same
10516 - register that we loaded up the addis instruction. The code is complicated,
10517 - so we call output_asm_insn directly, and just return "".
10518 + register that we loaded up the addis instruction. The address that is used
10519 + is the logical address that was formed during peephole2:
10520 + (lo_sum (high) (low-part))
10522 - The operands are:
10523 - operands[0] register set with addis (must be same reg as target).
10524 - operands[1] value set via addis
10525 - operands[2] target register being loaded
10526 - operands[3] D-form memory reference using operands[0]. */
10527 + The code is complicated, so we call output_asm_insn directly, and just
10531 -emit_fusion_gpr_load (rtx *operands)
10532 +emit_fusion_gpr_load (rtx target, rtx mem)
10534 - rtx addis_reg = operands[0];
10535 - rtx addis_value = operands[1];
10536 - rtx target = operands[2];
10537 - rtx mem = operands[3];
10542 const char *addis_str = NULL;
10543 const char *load_str = NULL;
10544 - const char *extend_insn = NULL;
10545 const char *mode_name = NULL;
10546 char insn_template[80];
10547 enum machine_mode mode;
10548 const char *comment_str = ASM_COMMENT_START;
10549 - bool sign_p = false;
10551 - gcc_assert (REG_P (addis_reg) && REG_P (target));
10552 - gcc_assert (REGNO (addis_reg) == REGNO (target));
10553 + if (GET_CODE (mem) == ZERO_EXTEND)
10554 + mem = XEXP (mem, 0);
10556 + gcc_assert (REG_P (target) && MEM_P (mem));
10558 if (*comment_str == ' ')
10561 - /* Allow sign/zero extension. */
10562 - if (GET_CODE (mem) == ZERO_EXTEND)
10563 - mem = XEXP (mem, 0);
10565 - else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
10568 - mem = XEXP (mem, 0);
10571 - gcc_assert (MEM_P (mem));
10572 addr = XEXP (mem, 0);
10573 if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10574 gcc_unreachable ();
10576 + addis_value = XEXP (addr, 0);
10577 load_offset = XEXP (addr, 1);
10579 /* Now emit the load instruction to the same register. */
10580 @@ -32864,29 +33002,22 @@
10582 mode_name = "char";
10584 - extend_insn = "extsb %0,%0";
10588 mode_name = "short";
10590 - extend_insn = "extsh %0,%0";
10596 - extend_insn = "extsw %0,%0";
10600 - if (TARGET_POWERPC64)
10602 - mode_name = "long";
10606 - gcc_unreachable ();
10607 + gcc_assert (TARGET_POWERPC64);
10608 + mode_name = "long";
10613 @@ -33030,14 +33161,6 @@
10615 fatal_insn ("Unable to generate load offset for fusion", load_offset);
10617 - /* Handle sign extension. The peephole2 pass generates this as a separate
10618 - insn, but we handle it just in case it got reattached. */
10621 - gcc_assert (extend_insn != NULL);
10622 - output_asm_insn (extend_insn, fuse_ops);
10628 Index: gcc/config/rs6000/vsx.md
10629 ===================================================================
10630 --- gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release) (revision 217117)
10631 +++ gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch) (revision 217117)
10633 ;; Iterator for the 2 64-bit vector types
10634 (define_mode_iterator VSX_D [V2DF V2DI])
10636 +;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
10637 +;; lxvd2x to properly handle swapping words on little endian
10638 +(define_mode_iterator VSX_LE [V2DF
10641 + (TI "VECTOR_MEM_VSX_P (TImode)")])
10643 ;; Iterator for the 2 32-bit vector types
10644 (define_mode_iterator VSX_W [V4SF V4SI])
10646 @@ -79,19 +86,26 @@
10657 -;; Map the register class used for float<->int conversions
10658 +;; Map the register class used for float<->int conversions (floating point side)
10659 +;; VSr2 is the preferred register class, VSr3 is any register class that will
10661 (define_mode_attr VSr2 [(V2DF "wd")
10668 (define_mode_attr VSr3 [(V2DF "wa")
10675 ;; Map the register class for sp<->dp float conversions, destination
10676 (define_mode_attr VSr4 [(SF "ws")
10677 @@ -99,12 +113,27 @@
10681 -;; Map the register class for sp<->dp float conversions, destination
10682 +;; Map the register class for sp<->dp float conversions, source
10683 (define_mode_attr VSr5 [(SF "ws")
10688 +;; The VSX register class that a type can occupy, even if it is not the
10689 +;; preferred register class (VSr is the preferred register class that will get
10690 +;; allocated first).
10691 +(define_mode_attr VSa [(V16QI "wa")
10703 ;; Same size integer type for floating point data
10704 (define_mode_attr VSi [(V4SF "v4si")
10706 @@ -200,6 +229,16 @@
10710 +;; Map register class for 64-bit element in 128-bit vector for direct moves
10712 +(define_mode_attr VS_64dm [(V2DF "wk")
10715 +;; Map register class for 64-bit element in 128-bit vector for normal register
10716 +;; to register moves
10717 +(define_mode_attr VS_64reg [(V2DF "ws")
10720 ;; Constants for creating unspecs
10721 (define_c_enum "unspec"
10723 @@ -228,8 +267,8 @@
10724 ;; The patterns for LE permuted loads and stores come before the general
10725 ;; VSX moves so they match first.
10726 (define_insn_and_split "*vsx_le_perm_load_<mode>"
10727 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
10728 - (match_operand:VSX_D 1 "memory_operand" "Z"))]
10729 + [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
10730 + (match_operand:VSX_LE 1 "memory_operand" "Z"))]
10731 "!BYTES_BIG_ENDIAN && TARGET_VSX"
10733 "!BYTES_BIG_ENDIAN && TARGET_VSX"
10734 @@ -251,7 +290,7 @@
10735 (set_attr "length" "8")])
10737 (define_insn_and_split "*vsx_le_perm_load_<mode>"
10738 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
10739 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
10740 (match_operand:VSX_W 1 "memory_operand" "Z"))]
10741 "!BYTES_BIG_ENDIAN && TARGET_VSX"
10743 @@ -342,8 +381,8 @@
10744 (set_attr "length" "8")])
10746 (define_insn "*vsx_le_perm_store_<mode>"
10747 - [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
10748 - (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
10749 + [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
10750 + (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
10751 "!BYTES_BIG_ENDIAN && TARGET_VSX"
10753 [(set_attr "type" "vecstore")
10754 @@ -350,8 +389,8 @@
10755 (set_attr "length" "12")])
10758 - [(set (match_operand:VSX_D 0 "memory_operand" "")
10759 - (match_operand:VSX_D 1 "vsx_register_operand" ""))]
10760 + [(set (match_operand:VSX_LE 0 "memory_operand" "")
10761 + (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
10762 "!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
10763 [(set (match_dup 2)
10765 @@ -369,8 +408,8 @@
10766 ;; The post-reload split requires that we re-permute the source
10767 ;; register in case it is still live.
10769 - [(set (match_operand:VSX_D 0 "memory_operand" "")
10770 - (match_operand:VSX_D 1 "vsx_register_operand" ""))]
10771 + [(set (match_operand:VSX_LE 0 "memory_operand" "")
10772 + (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
10773 "!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
10774 [(set (match_dup 1)
10776 @@ -388,7 +427,7 @@
10778 (define_insn "*vsx_le_perm_store_<mode>"
10779 [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
10780 - (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
10781 + (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
10782 "!BYTES_BIG_ENDIAN && TARGET_VSX"
10784 [(set_attr "type" "vecstore")
10785 @@ -578,8 +617,8 @@
10788 (define_insn "*vsx_mov<mode>"
10789 - [(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")
10790 - (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
10791 + [(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")
10792 + (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
10793 "VECTOR_MEM_VSX_P (<MODE>mode)
10794 && (register_operand (operands[0], <MODE>mode)
10795 || register_operand (operands[1], <MODE>mode))"
10796 @@ -681,9 +720,9 @@
10797 ;; instructions are now combined with the insn for the traditional floating
10799 (define_insn "*vsx_add<mode>3"
10800 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10801 - (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10802 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10803 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10804 + (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10805 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10806 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10807 "xvadd<VSs> %x0,%x1,%x2"
10808 [(set_attr "type" "<VStype_simple>")
10809 @@ -690,9 +729,9 @@
10810 (set_attr "fp_type" "<VSfptype_simple>")])
10812 (define_insn "*vsx_sub<mode>3"
10813 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10814 - (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10815 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10816 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10817 + (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10818 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10819 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10820 "xvsub<VSs> %x0,%x1,%x2"
10821 [(set_attr "type" "<VStype_simple>")
10822 @@ -699,9 +738,9 @@
10823 (set_attr "fp_type" "<VSfptype_simple>")])
10825 (define_insn "*vsx_mul<mode>3"
10826 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10827 - (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10828 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10829 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10830 + (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10831 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10832 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10833 "xvmul<VSs> %x0,%x1,%x2"
10834 [(set_attr "type" "<VStype_simple>")
10835 @@ -708,9 +747,9 @@
10836 (set_attr "fp_type" "<VSfptype_mul>")])
10838 (define_insn "*vsx_div<mode>3"
10839 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10840 - (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10841 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10842 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10843 + (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10844 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10845 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10846 "xvdiv<VSs> %x0,%x1,%x2"
10847 [(set_attr "type" "<VStype_div>")
10848 @@ -746,8 +785,8 @@
10850 (define_insn "*vsx_tdiv<mode>3_internal"
10851 [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
10852 - (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
10853 - (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
10854 + (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
10855 + (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
10857 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10858 "x<VSv>tdiv<VSs> %0,%x1,%x2"
10859 @@ -755,8 +794,8 @@
10860 (set_attr "fp_type" "<VSfptype_simple>")])
10862 (define_insn "vsx_fre<mode>2"
10863 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10864 - (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
10865 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10866 + (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
10868 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10869 "xvre<VSs> %x0,%x1"
10870 @@ -764,8 +803,8 @@
10871 (set_attr "fp_type" "<VSfptype_simple>")])
10873 (define_insn "*vsx_neg<mode>2"
10874 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10875 - (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
10876 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10877 + (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
10878 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10879 "xvneg<VSs> %x0,%x1"
10880 [(set_attr "type" "<VStype_simple>")
10881 @@ -772,8 +811,8 @@
10882 (set_attr "fp_type" "<VSfptype_simple>")])
10884 (define_insn "*vsx_abs<mode>2"
10885 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10886 - (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
10887 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10888 + (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
10889 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10890 "xvabs<VSs> %x0,%x1"
10891 [(set_attr "type" "<VStype_simple>")
10892 @@ -780,10 +819,10 @@
10893 (set_attr "fp_type" "<VSfptype_simple>")])
10895 (define_insn "vsx_nabs<mode>2"
10896 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10897 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10900 - (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
10901 + (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
10902 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10903 "xvnabs<VSs> %x0,%x1"
10904 [(set_attr "type" "<VStype_simple>")
10905 @@ -790,9 +829,9 @@
10906 (set_attr "fp_type" "<VSfptype_simple>")])
10908 (define_insn "vsx_smax<mode>3"
10909 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10910 - (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10911 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10912 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10913 + (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10914 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10915 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10916 "xvmax<VSs> %x0,%x1,%x2"
10917 [(set_attr "type" "<VStype_simple>")
10918 @@ -799,9 +838,9 @@
10919 (set_attr "fp_type" "<VSfptype_simple>")])
10921 (define_insn "*vsx_smin<mode>3"
10922 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10923 - (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
10924 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
10925 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10926 + (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
10927 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
10928 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10929 "xvmin<VSs> %x0,%x1,%x2"
10930 [(set_attr "type" "<VStype_simple>")
10931 @@ -808,8 +847,8 @@
10932 (set_attr "fp_type" "<VSfptype_simple>")])
10934 (define_insn "*vsx_sqrt<mode>2"
10935 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10936 - (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
10937 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10938 + (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
10939 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10940 "xvsqrt<VSs> %x0,%x1"
10941 [(set_attr "type" "<VStype_sqrt>")
10942 @@ -816,8 +855,8 @@
10943 (set_attr "fp_type" "<VSfptype_sqrt>")])
10945 (define_insn "*vsx_rsqrte<mode>2"
10946 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
10947 - (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
10948 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
10949 + (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
10951 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10952 "xvrsqrte<VSs> %x0,%x1"
10953 @@ -852,7 +891,7 @@
10955 (define_insn "*vsx_tsqrt<mode>2_internal"
10956 [(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
10957 - (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
10958 + (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
10959 UNSPEC_VSX_TSQRT))]
10960 "VECTOR_UNIT_VSX_P (<MODE>mode)"
10961 "x<VSv>tsqrt<VSs> %0,%x1"
10962 @@ -865,11 +904,11 @@
10965 (define_insn "*vsx_fmav4sf4"
10966 - [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
10967 + [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
10969 - (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
10970 - (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
10971 - (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
10972 + (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
10973 + (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
10974 + (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
10975 "VECTOR_UNIT_VSX_P (V4SFmode)"
10977 xvmaddasp %x0,%x1,%x2
10978 @@ -880,11 +919,11 @@
10979 [(set_attr "type" "vecfloat")])
10981 (define_insn "*vsx_fmav2df4"
10982 - [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
10983 + [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
10985 - (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
10986 - (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
10987 - (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
10988 + (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
10989 + (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
10990 + (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
10991 "VECTOR_UNIT_VSX_P (V2DFmode)"
10993 xvmaddadp %x0,%x1,%x2
10994 @@ -894,12 +933,12 @@
10995 [(set_attr "type" "vecdouble")])
10997 (define_insn "*vsx_fms<mode>4"
10998 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
10999 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
11001 - (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
11002 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
11003 + (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
11004 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
11006 - (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
11007 + (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
11008 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11010 xvmsuba<VSs> %x0,%x1,%x2
11011 @@ -909,12 +948,12 @@
11012 [(set_attr "type" "<VStype_mul>")])
11014 (define_insn "*vsx_nfma<mode>4"
11015 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
11016 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
11019 - (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
11020 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
11021 - (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
11022 + (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
11023 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
11024 + (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
11025 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11027 xvnmadda<VSs> %x0,%x1,%x2
11028 @@ -959,9 +998,9 @@
11030 ;; Vector conditional expressions (no scalar version for these instructions)
11031 (define_insn "vsx_eq<mode>"
11032 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11033 - (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11034 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11035 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11036 + (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11037 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11038 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11039 "xvcmpeq<VSs> %x0,%x1,%x2"
11040 [(set_attr "type" "<VStype_simple>")
11041 @@ -968,9 +1007,9 @@
11042 (set_attr "fp_type" "<VSfptype_simple>")])
11044 (define_insn "vsx_gt<mode>"
11045 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11046 - (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11047 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11048 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11049 + (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11050 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11051 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11052 "xvcmpgt<VSs> %x0,%x1,%x2"
11053 [(set_attr "type" "<VStype_simple>")
11054 @@ -977,9 +1016,9 @@
11055 (set_attr "fp_type" "<VSfptype_simple>")])
11057 (define_insn "*vsx_ge<mode>"
11058 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11059 - (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11060 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11061 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11062 + (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11063 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11064 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11065 "xvcmpge<VSs> %x0,%x1,%x2"
11066 [(set_attr "type" "<VStype_simple>")
11067 @@ -990,10 +1029,10 @@
11068 (define_insn "*vsx_eq_<mode>_p"
11071 - [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11072 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11073 + [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11074 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11076 - (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11077 + (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11078 (eq:VSX_F (match_dup 1)
11080 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11081 @@ -1003,10 +1042,10 @@
11082 (define_insn "*vsx_gt_<mode>_p"
11085 - [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11086 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11087 + [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11088 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11090 - (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11091 + (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11092 (gt:VSX_F (match_dup 1)
11094 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11095 @@ -1016,10 +1055,10 @@
11096 (define_insn "*vsx_ge_<mode>_p"
11099 - [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11100 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11101 + [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11102 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11104 - (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11105 + (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11106 (ge:VSX_F (match_dup 1)
11108 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11109 @@ -1028,23 +1067,23 @@
11112 (define_insn "*vsx_xxsel<mode>"
11113 - [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
11114 + [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11115 (if_then_else:VSX_L
11116 - (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
11117 + (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
11118 (match_operand:VSX_L 4 "zero_constant" ""))
11119 - (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
11120 - (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
11121 + (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
11122 + (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
11123 "VECTOR_MEM_VSX_P (<MODE>mode)"
11124 "xxsel %x0,%x3,%x2,%x1"
11125 [(set_attr "type" "vecperm")])
11127 (define_insn "*vsx_xxsel<mode>_uns"
11128 - [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
11129 + [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11130 (if_then_else:VSX_L
11131 - (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
11132 + (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
11133 (match_operand:VSX_L 4 "zero_constant" ""))
11134 - (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
11135 - (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
11136 + (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
11137 + (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
11138 "VECTOR_MEM_VSX_P (<MODE>mode)"
11139 "xxsel %x0,%x3,%x2,%x1"
11140 [(set_attr "type" "vecperm")])
11141 @@ -1051,10 +1090,10 @@
11144 (define_insn "vsx_copysign<mode>3"
11145 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11146 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11148 - [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11149 - (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
11150 + [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11151 + (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
11153 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11154 "xvcpsgn<VSs> %x0,%x2,%x1"
11155 @@ -1067,7 +1106,7 @@
11156 ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
11157 ;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
11158 (define_insn "vsx_float<VSi><mode>2"
11159 - [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
11160 + [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
11161 (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
11162 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11163 "x<VSv>cvsx<VSc><VSs> %x0,%x1"
11164 @@ -1075,7 +1114,7 @@
11165 (set_attr "fp_type" "<VSfptype_simple>")])
11167 (define_insn "vsx_floatuns<VSi><mode>2"
11168 - [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
11169 + [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
11170 (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
11171 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11172 "x<VSv>cvux<VSc><VSs> %x0,%x1"
11173 @@ -1084,7 +1123,7 @@
11175 (define_insn "vsx_fix_trunc<mode><VSi>2"
11176 [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
11177 - (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
11178 + (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
11179 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11180 "x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
11181 [(set_attr "type" "<VStype_simple>")
11182 @@ -1092,7 +1131,7 @@
11184 (define_insn "vsx_fixuns_trunc<mode><VSi>2"
11185 [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
11186 - (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
11187 + (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
11188 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11189 "x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
11190 [(set_attr "type" "<VStype_simple>")
11191 @@ -1100,8 +1139,8 @@
11193 ;; Math rounding functions
11194 (define_insn "vsx_x<VSv>r<VSs>i"
11195 - [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11196 - (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11197 + [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11198 + (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11199 UNSPEC_VSX_ROUND_I))]
11200 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11201 "x<VSv>r<VSs>i %x0,%x1"
11202 @@ -1109,8 +1148,8 @@
11203 (set_attr "fp_type" "<VSfptype_simple>")])
11205 (define_insn "vsx_x<VSv>r<VSs>ic"
11206 - [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11207 - (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11208 + [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11209 + (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11210 UNSPEC_VSX_ROUND_IC))]
11211 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11212 "x<VSv>r<VSs>ic %x0,%x1"
11213 @@ -1118,8 +1157,8 @@
11214 (set_attr "fp_type" "<VSfptype_simple>")])
11216 (define_insn "vsx_btrunc<mode>2"
11217 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11218 - (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
11219 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11220 + (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
11221 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11222 "xvr<VSs>iz %x0,%x1"
11223 [(set_attr "type" "<VStype_simple>")
11224 @@ -1126,8 +1165,8 @@
11225 (set_attr "fp_type" "<VSfptype_simple>")])
11227 (define_insn "*vsx_b2trunc<mode>2"
11228 - [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11229 - (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11230 + [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11231 + (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11233 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11234 "x<VSv>r<VSs>iz %x0,%x1"
11235 @@ -1135,8 +1174,8 @@
11236 (set_attr "fp_type" "<VSfptype_simple>")])
11238 (define_insn "vsx_floor<mode>2"
11239 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11240 - (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11241 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11242 + (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11244 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11245 "xvr<VSs>im %x0,%x1"
11246 @@ -1144,8 +1183,8 @@
11247 (set_attr "fp_type" "<VSfptype_simple>")])
11249 (define_insn "vsx_ceil<mode>2"
11250 - [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11251 - (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11252 + [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11253 + (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11255 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11256 "xvr<VSs>ip %x0,%x1"
11257 @@ -1160,8 +1199,8 @@
11258 ;; scalar single precision instructions internally use the double format.
11259 ;; Prefer the altivec registers, since we likely will need to do a vperm
11260 (define_insn "vsx_<VS_spdp_insn>"
11261 - [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
11262 - (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
11263 + [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
11264 + (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
11265 UNSPEC_VSX_CVSPDP))]
11266 "VECTOR_UNIT_VSX_P (<MODE>mode)"
11267 "<VS_spdp_insn> %x0,%x1"
11268 @@ -1169,8 +1208,8 @@
11270 ;; xscvspdp, represent the scalar SF type as V4SF
11271 (define_insn "vsx_xscvspdp"
11272 - [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
11273 - (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
11274 + [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
11275 + (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
11276 UNSPEC_VSX_CVSPDP))]
11277 "VECTOR_UNIT_VSX_P (V4SFmode)"
11279 @@ -1197,7 +1236,7 @@
11281 ;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
11282 (define_insn "vsx_xscvdpspn"
11283 - [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
11284 + [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
11285 (unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
11286 UNSPEC_VSX_CVDPSPN))]
11288 @@ -1205,8 +1244,8 @@
11289 [(set_attr "type" "fp")])
11291 (define_insn "vsx_xscvspdpn"
11292 - [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
11293 - (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
11294 + [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
11295 + (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
11296 UNSPEC_VSX_CVSPDPN))]
11298 "xscvspdpn %x0,%x1"
11299 @@ -1213,8 +1252,8 @@
11300 [(set_attr "type" "fp")])
11302 (define_insn "vsx_xscvdpspn_scalar"
11303 - [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
11304 - (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
11305 + [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
11306 + (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
11307 UNSPEC_VSX_CVDPSPN))]
11309 "xscvdpspn %x0,%x1"
11310 @@ -1302,10 +1341,10 @@
11311 ;; since the xsrdpiz instruction does not truncate the value if the floating
11312 ;; point value is < LONG_MIN or > LONG_MAX.
11313 (define_insn "*vsx_float_fix_<mode>2"
11314 - [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
11315 + [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11318 - (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
11319 + (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
11320 "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
11321 && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
11322 && !flag_trapping_math && TARGET_FRIZ"
11323 @@ -1318,10 +1357,10 @@
11325 ;; Build a V2DF/V2DI vector from two scalars
11326 (define_insn "vsx_concat_<mode>"
11327 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
11328 + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11330 - (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
11331 - (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
11332 + (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
11333 + (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
11334 "VECTOR_MEM_VSX_P (<MODE>mode)"
11336 if (BYTES_BIG_ENDIAN)
11337 @@ -1352,9 +1391,9 @@
11338 ;; xxpermdi for little endian loads and stores. We need several of
11339 ;; these since the form of the PARALLEL differs by mode.
11340 (define_insn "*vsx_xxpermdi2_le_<mode>"
11341 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
11342 - (vec_select:VSX_D
11343 - (match_operand:VSX_D 1 "vsx_register_operand" "wa")
11344 + [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
11345 + (vec_select:VSX_LE
11346 + (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
11347 (parallel [(const_int 1) (const_int 0)])))]
11348 "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
11349 "xxpermdi %x0,%x1,%x1,2"
11350 @@ -1361,9 +1400,9 @@
11351 [(set_attr "type" "vecperm")])
11353 (define_insn "*vsx_xxpermdi4_le_<mode>"
11354 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
11355 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
11357 - (match_operand:VSX_W 1 "vsx_register_operand" "wa")
11358 + (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
11359 (parallel [(const_int 2) (const_int 3)
11360 (const_int 0) (const_int 1)])))]
11361 "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
11362 @@ -1401,9 +1440,9 @@
11363 ;; lxvd2x for little endian loads. We need several of
11364 ;; these since the form of the PARALLEL differs by mode.
11365 (define_insn "*vsx_lxvd2x2_le_<mode>"
11366 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
11367 - (vec_select:VSX_D
11368 - (match_operand:VSX_D 1 "memory_operand" "Z")
11369 + [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
11370 + (vec_select:VSX_LE
11371 + (match_operand:VSX_LE 1 "memory_operand" "Z")
11372 (parallel [(const_int 1) (const_int 0)])))]
11373 "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
11375 @@ -1410,7 +1449,7 @@
11376 [(set_attr "type" "vecload")])
11378 (define_insn "*vsx_lxvd2x4_le_<mode>"
11379 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
11380 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
11382 (match_operand:VSX_W 1 "memory_operand" "Z")
11383 (parallel [(const_int 2) (const_int 3)
11384 @@ -1450,9 +1489,9 @@
11385 ;; stxvd2x for little endian stores. We need several of
11386 ;; these since the form of the PARALLEL differs by mode.
11387 (define_insn "*vsx_stxvd2x2_le_<mode>"
11388 - [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
11389 - (vec_select:VSX_D
11390 - (match_operand:VSX_D 1 "vsx_register_operand" "wa")
11391 + [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
11392 + (vec_select:VSX_LE
11393 + (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
11394 (parallel [(const_int 1) (const_int 0)])))]
11395 "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
11397 @@ -1461,7 +1500,7 @@
11398 (define_insn "*vsx_stxvd2x4_le_<mode>"
11399 [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
11401 - (match_operand:VSX_W 1 "vsx_register_operand" "wa")
11402 + (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
11403 (parallel [(const_int 2) (const_int 3)
11404 (const_int 0) (const_int 1)])))]
11405 "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
11406 @@ -1513,11 +1552,12 @@
11408 ;; Set the element of a V2DI/VD2F mode
11409 (define_insn "vsx_set_<mode>"
11410 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
11411 - (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
11412 - (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
11413 - (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
11414 - UNSPEC_VSX_SET))]
11415 + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
11417 + [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
11418 + (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
11419 + (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
11420 + UNSPEC_VSX_SET))]
11421 "VECTOR_MEM_VSX_P (<MODE>mode)"
11423 int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
11424 @@ -1582,7 +1622,7 @@
11425 (define_insn_and_split "vsx_extract_v4sf"
11426 [(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
11428 - (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
11429 + (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
11430 (parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
11431 (clobber (match_scratch:V4SF 3 "=X,0"))]
11432 "VECTOR_UNIT_VSX_P (V4SFmode)"
11433 @@ -1606,7 +1646,7 @@
11435 if (GET_CODE (op3) == SCRATCH)
11436 op3 = gen_reg_rtx (V4SFmode);
11437 - emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
11438 + emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
11441 emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
11442 @@ -1765,9 +1805,9 @@
11445 (define_insn "vsx_splat_<mode>"
11446 - [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
11447 + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
11448 (vec_duplicate:VSX_D
11449 - (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
11450 + (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
11451 "VECTOR_MEM_VSX_P (<MODE>mode)"
11453 xxpermdi %x0,%x1,%x1,0
11454 @@ -1780,10 +1820,10 @@
11457 (define_insn "vsx_xxspltw_<mode>"
11458 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
11459 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
11460 (vec_duplicate:VSX_W
11461 (vec_select:<VS_scalar>
11462 - (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
11463 + (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
11465 [(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
11466 "VECTOR_MEM_VSX_P (<MODE>mode)"
11467 @@ -1796,8 +1836,8 @@
11468 [(set_attr "type" "vecperm")])
11470 (define_insn "vsx_xxspltw_<mode>_direct"
11471 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
11472 - (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
11473 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
11474 + (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
11475 (match_operand:QI 2 "u5bit_cint_operand" "i,i")]
11476 UNSPEC_VSX_XXSPLTW))]
11477 "VECTOR_MEM_VSX_P (<MODE>mode)"
11478 @@ -1806,11 +1846,11 @@
11480 ;; V4SF/V4SI interleave
11481 (define_insn "vsx_xxmrghw_<mode>"
11482 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
11483 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
11485 (vec_concat:<VS_double>
11486 - (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
11487 - (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
11488 + (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
11489 + (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
11490 (parallel [(const_int 0) (const_int 4)
11491 (const_int 1) (const_int 5)])))]
11492 "VECTOR_MEM_VSX_P (<MODE>mode)"
11493 @@ -1823,11 +1863,11 @@
11494 [(set_attr "type" "vecperm")])
11496 (define_insn "vsx_xxmrglw_<mode>"
11497 - [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
11498 + [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
11500 (vec_concat:<VS_double>
11501 - (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
11502 - (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
11503 + (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
11504 + (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
11505 (parallel [(const_int 2) (const_int 6)
11506 (const_int 3) (const_int 7)])))]
11507 "VECTOR_MEM_VSX_P (<MODE>mode)"
11508 @@ -1841,9 +1881,9 @@
11510 ;; Shift left double by word immediate
11511 (define_insn "vsx_xxsldwi_<mode>"
11512 - [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
11513 - (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
11514 - (match_operand:VSX_L 2 "vsx_register_operand" "wa")
11515 + [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
11516 + (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
11517 + (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
11518 (match_operand:QI 3 "u5bit_cint_operand" "i")]
11519 UNSPEC_VSX_SLDWI))]
11520 "VECTOR_MEM_VSX_P (<MODE>mode)"
11521 @@ -1924,7 +1964,7 @@
11522 ;; to the top element of the V2DF array without doing an extract.
11524 (define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
11525 - [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
11526 + [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
11530 Index: gcc/config/rs6000/rs6000.h
11531 ===================================================================
11532 --- gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release) (revision 217117)
11533 +++ gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch) (revision 217117)
11534 @@ -1438,6 +1438,10 @@
11535 RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
11536 RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
11537 RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
11538 + RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
11539 + RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
11540 + RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
11541 + RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
11542 RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
11543 RS6000_CONSTRAINT_wm, /* VSX register for direct move */
11544 RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
11545 @@ -1462,6 +1466,9 @@
11546 #define VSX_REG_CLASS_P(CLASS) \
11547 ((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
11549 +/* Return whether a given register class targets general purpose registers. */
11550 +#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
11552 /* Given an rtx X being reloaded into a reg required to be
11553 in class CLASS, return the class of reg to actually use.
11554 In general this is just CLASS; but on some machines
11555 @@ -1593,8 +1600,15 @@
11556 /* Define this if stack space is still allocated for a parameter passed
11557 in a register. The value is the number of bytes allocated to this
11559 -#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
11560 +#define REG_PARM_STACK_SPACE(FNDECL) \
11561 + rs6000_reg_parm_stack_space ((FNDECL), false)
11563 +/* Define this macro if space guaranteed when compiling a function body
11564 + is different to space required when making a call, a situation that
11565 + can arise with K&R style function definitions. */
11566 +#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
11567 + rs6000_reg_parm_stack_space ((FNDECL), true)
11569 /* Define this if the above stack space is to be considered part of the
11570 space allocated by the caller. */
11571 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
11572 @@ -2483,8 +2497,8 @@
11573 #define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
11575 /* Builtin targets. For now, we reuse the masks for those options that are in
11576 - target flags, and pick two random bits for SPE and paired which aren't in
11578 + target flags, and pick three random bits for SPE, paired and ldbl128 which
11579 + aren't in target_flags. */
11580 #define RS6000_BTM_ALWAYS 0 /* Always enabled. */
11581 #define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
11582 #define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
11583 @@ -2501,6 +2515,7 @@
11584 #define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
11585 #define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
11586 #define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
11587 +#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
11589 #define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
11591 @@ -2514,7 +2529,8 @@
11592 | RS6000_BTM_POPCNTD \
11593 | RS6000_BTM_CELL \
11595 - | RS6000_BTM_HARD_FLOAT)
11596 + | RS6000_BTM_HARD_FLOAT \
11597 + | RS6000_BTM_LDBL128)
11599 /* Define builtin enum index. */
11601 Index: gcc/config/rs6000/altivec.md
11602 ===================================================================
11603 --- gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release) (revision 217117)
11604 +++ gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch) (revision 217117)
11605 @@ -2297,7 +2297,31 @@
11607 [(set_attr "type" "vecsimple")])
11609 -(define_insn "altivec_lvsl"
11610 +(define_expand "altivec_lvsl"
11611 + [(use (match_operand:V16QI 0 "register_operand" ""))
11612 + (use (match_operand:V16QI 1 "memory_operand" ""))]
11615 + if (VECTOR_ELT_ORDER_BIG)
11616 + emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
11620 + rtx mask, perm[16], constv, vperm;
11621 + mask = gen_reg_rtx (V16QImode);
11622 + emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
11623 + for (i = 0; i < 16; ++i)
11624 + perm[i] = GEN_INT (i);
11625 + constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
11626 + constv = force_reg (V16QImode, constv);
11627 + vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
11629 + emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
11634 +(define_insn "altivec_lvsl_direct"
11635 [(set (match_operand:V16QI 0 "register_operand" "=v")
11636 (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
11638 @@ -2305,7 +2329,31 @@
11640 [(set_attr "type" "vecload")])
11642 -(define_insn "altivec_lvsr"
11643 +(define_expand "altivec_lvsr"
11644 + [(use (match_operand:V16QI 0 "register_operand" ""))
11645 + (use (match_operand:V16QI 1 "memory_operand" ""))]
11648 + if (VECTOR_ELT_ORDER_BIG)
11649 + emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
11653 + rtx mask, perm[16], constv, vperm;
11654 + mask = gen_reg_rtx (V16QImode);
11655 + emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
11656 + for (i = 0; i < 16; ++i)
11657 + perm[i] = GEN_INT (i);
11658 + constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
11659 + constv = force_reg (V16QImode, constv);
11660 + vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
11662 + emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
11667 +(define_insn "altivec_lvsr_direct"
11668 [(set (match_operand:V16QI 0 "register_operand" "=v")
11669 (unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
11671 Index: gcc/config/rs6000/rs6000.md
11672 ===================================================================
11673 --- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release) (revision 217117)
11674 +++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch) (revision 217117)
11675 @@ -134,6 +134,7 @@
11676 UNSPEC_UNPACK_128BIT
11679 + UNSPEC_FUSION_GPR
11683 @@ -317,8 +318,25 @@
11684 (define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
11686 ; Definitions for 32-bit fpr direct move
11687 -(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
11688 +; At present, the decimal modes are not allowed in the traditional altivec
11689 +; registers, so restrict the constraints to just the traditional FPRs.
11690 +(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
11692 +; Definitions for 32-bit VSX
11693 +(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
11695 +; Definitions for 32-bit use of altivec registers
11696 +(define_mode_attr f32_av [(SF "wu") (SD "wn")])
11698 +; Definitions for 64-bit VSX
11699 +(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
11701 +; Definitions for 64-bit direct move
11702 +(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
11704 +; Definitions for 64-bit use of altivec registers
11705 +(define_mode_attr f64_av [(DF "wv") (DD "wn")])
11707 ; These modes do not fit in integer registers in 32-bit mode.
11708 ; but on e500v2, the gpr are 64 bit registers
11709 (define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
11710 @@ -424,7 +442,7 @@
11713 ;; Mode attribute for boolean operation register constraints for output
11714 -(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
11715 +(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
11717 (V16QI "wa,v,&?r,?r,?r")
11718 (V8HI "wa,v,&?r,?r,?r")
11719 @@ -435,7 +453,7 @@
11720 (V1TI "wa,v,&?r,?r,?r")])
11722 ;; Mode attribute for boolean operation register constraints for operand1
11723 -(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
11724 +(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
11726 (V16QI "wa,v,r,0,r")
11727 (V8HI "wa,v,r,0,r")
11728 @@ -446,7 +464,7 @@
11729 (V1TI "wa,v,r,0,r")])
11731 ;; Mode attribute for boolean operation register constraints for operand2
11732 -(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
11733 +(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
11735 (V16QI "wa,v,r,r,0")
11736 (V8HI "wa,v,r,r,0")
11737 @@ -459,7 +477,7 @@
11738 ;; Mode attribute for boolean operation register constraints for operand1
11739 ;; for one_cmpl. To simplify things, we repeat the constraint where 0
11740 ;; is used for operand1 or operand2
11741 -(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
11742 +(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
11744 (V16QI "wa,v,r,0,0")
11745 (V8HI "wa,v,r,0,0")
11746 @@ -566,7 +584,7 @@
11749 (define_insn "*zero_extendsidi2_lfiwzx"
11750 - [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
11751 + [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
11752 (zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
11753 "TARGET_POWERPC64 && TARGET_LFIWZX"
11755 @@ -736,8 +754,8 @@
11758 (define_insn "*extendsidi2_lfiwax"
11759 - [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
11760 - (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
11761 + [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
11762 + (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
11763 "TARGET_POWERPC64 && TARGET_LFIWAX"
11766 @@ -760,7 +778,7 @@
11768 (define_insn "*extendsidi2_nocell"
11769 [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
11770 - (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
11771 + (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
11772 "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
11775 @@ -5614,7 +5632,7 @@
11776 ; We don't define lfiwax/lfiwzx with the normal definition, because we
11777 ; don't want to support putting SImode in FPR registers.
11778 (define_insn "lfiwax"
11779 - [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
11780 + [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
11781 (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
11783 "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
11784 @@ -5694,7 +5712,7 @@
11785 (set_attr "type" "fpload")])
11787 (define_insn "lfiwzx"
11788 - [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
11789 + [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
11790 (unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
11792 "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
11793 @@ -9210,8 +9228,8 @@
11796 (define_insn "mov<mode>_hardfloat"
11797 - [(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")
11798 - (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"))]
11799 + [(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")
11800 + (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"))]
11801 "(gpc_reg_operand (operands[0], <MODE>mode)
11802 || gpc_reg_operand (operands[1], <MODE>mode))
11803 && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
11804 @@ -9422,8 +9440,8 @@
11807 (define_insn "*mov<mode>_hardfloat32"
11808 - [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
11809 - (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
11810 + [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
11811 + (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
11812 "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
11813 && (gpc_reg_operand (operands[0], <MODE>mode)
11814 || gpc_reg_operand (operands[1], <MODE>mode))"
11815 @@ -9491,8 +9509,8 @@
11816 ; ld/std require word-aligned displacements -> 'Y' constraint.
11817 ; List Y->r and r->Y before r->r for reload.
11818 (define_insn "*mov<mode>_hardfloat64"
11819 - [(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")
11820 - (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"))]
11821 + [(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>")
11822 + (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"))]
11823 "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
11824 && (gpc_reg_operand (operands[0], <MODE>mode)
11825 || gpc_reg_operand (operands[1], <MODE>mode))"
11826 @@ -10272,8 +10290,8 @@
11827 { rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
11829 (define_insn "*movdi_internal64"
11830 - [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
11831 - (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
11832 + [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
11833 + (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
11835 && (gpc_reg_operand (operands[0], DImode)
11836 || gpc_reg_operand (operands[1], DImode))"
11837 @@ -10293,7 +10311,8 @@
11843 + xxlxor %x0,%x0,%x0"
11844 [(set_attr_alternative "type"
11846 (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
11847 @@ -10334,8 +10353,9 @@
11848 (const_string "mftgpr")
11849 (const_string "mffgpr")
11850 (const_string "mftgpr")
11851 - (const_string "mffgpr")])
11852 - (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
11853 + (const_string "mffgpr")
11854 + (const_string "vecsimple")])
11855 + (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
11857 ;; immediate value valid for a single instruction hiding in a const_double
11859 @@ -15751,23 +15771,10 @@
11860 ;; a GPR. The addis instruction must be adjacent to the load, and use the same
11861 ;; register that is being loaded. The fused ops must be physically adjacent.
11863 -;; We use define_peephole for the actual addis/load, and the register used to
11864 -;; hold the addis value must be the same as the register being loaded. We use
11865 -;; define_peephole2 to change the register used for addis to be the register
11866 -;; being loaded, since we can look at whether it is dead after the load insn.
11867 +;; Find cases where the addis that feeds into a load instruction is either used
11868 +;; once or is the same as the target register, and replace it with the fusion
11872 - [(set (match_operand:P 0 "base_reg_operand" "")
11873 - (match_operand:P 1 "fusion_gpr_addis" ""))
11874 - (set (match_operand:INT1 2 "base_reg_operand" "")
11875 - (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
11876 - "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
11878 - return emit_fusion_gpr_load (operands);
11880 - [(set_attr "type" "load")
11881 - (set_attr "length" "8")])
11884 [(set (match_operand:P 0 "base_reg_operand" "")
11885 (match_operand:P 1 "fusion_gpr_addis" ""))
11886 @@ -15774,9 +15781,8 @@
11887 (set (match_operand:INT1 2 "base_reg_operand" "")
11888 (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
11890 - && (REGNO (operands[0]) != REGNO (operands[2])
11891 - || GET_CODE (operands[3]) == SIGN_EXTEND)
11892 - && fusion_gpr_load_p (operands, true)"
11893 + && fusion_gpr_load_p (operands[0], operands[1], operands[2],
11897 expand_fusion_gpr_load (operands);
11898 @@ -15783,6 +15789,20 @@
11902 +;; Fusion insn, created by the define_peephole2 above (and eventually by
11905 +(define_insn "fusion_gpr_load_<mode>"
11906 + [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
11907 + (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
11908 + UNSPEC_FUSION_GPR))]
11909 + "TARGET_P8_FUSION"
11911 + return emit_fusion_gpr_load (operands[0], operands[1]);
11913 + [(set_attr "type" "load")
11914 + (set_attr "length" "8")])
11917 ;; Miscellaneous ISA 2.06 (power7) instructions
11918 (define_insn "addg6s"
11919 @@ -15847,26 +15867,6 @@
11923 -;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
11924 -;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
11927 -(define_expand "unpacktf_0"
11928 - [(set (match_operand:DF 0 "nonimmediate_operand" "")
11929 - (unspec:DF [(match_operand:TF 1 "register_operand" "")
11931 - UNSPEC_UNPACK_128BIT))]
11935 -(define_expand "unpacktf_1"
11936 - [(set (match_operand:DF 0 "nonimmediate_operand" "")
11937 - (unspec:DF [(match_operand:TF 1 "register_operand" "")
11939 - UNSPEC_UNPACK_128BIT))]
11943 (define_insn_and_split "unpack<mode>_dm"
11944 [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
11946 Index: gcc/config/rs6000/sysv4.h
11947 ===================================================================
11948 --- gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release) (revision 217117)
11949 +++ gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch) (revision 217117)
11950 @@ -292,7 +292,7 @@
11951 /* An expression for the alignment of a structure field FIELD if the
11952 alignment computed in the usual way is COMPUTED. */
11953 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
11954 - ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
11955 + (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
11958 #undef BIGGEST_FIELD_ALIGNMENT
11959 @@ -949,3 +949,27 @@
11960 #define TARGET_USES_SYSV4_OPT 1
11962 #undef DBX_REGISTER_NUMBER
11964 +/* Link -lasan early on the command line. For -static-libasan, don't link
11965 + it for -shared link, the executable should be compiled with -static-libasan
11966 + in that case, and for executable link link with --{,no-}whole-archive around
11967 + it to force everything into the executable. And similarly for -ltsan. */
11968 +#if defined(HAVE_LD_STATIC_DYNAMIC)
11969 +#undef LIBASAN_EARLY_SPEC
11970 +#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
11971 + "%{static-libasan:%{!shared:" \
11972 + LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
11973 + LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
11974 +#undef LIBTSAN_EARLY_SPEC
11975 +#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
11976 + LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
11977 + LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
11980 +/* Additional libraries needed by -static-libasan. */
11981 +#undef STATIC_LIBASAN_LIBS
11982 +#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
11984 +/* Additional libraries needed by -static-libtsan. */
11985 +#undef STATIC_LIBTSAN_LIBS
11986 +#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
11987 Index: gcc/config/arm/arm.c
11988 ===================================================================
11989 --- gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release) (revision 217117)
11990 +++ gcc/config/arm/arm.c (.../branches/gcc-4_8-branch) (revision 217117)
11992 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
11993 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
11994 inline static int thumb1_index_register_rtx_p (rtx, int);
11995 -static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
11996 static int thumb_far_jump_used_p (void);
11997 static bool thumb_force_lr_save (void);
11998 static unsigned arm_size_return_regs (void);
11999 @@ -24476,9 +24475,13 @@
12000 fputs (":\n", file);
12003 - /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
12004 + /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
12005 rtx tem = XEXP (DECL_RTL (function), 0);
12006 - tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
12007 + /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
12008 + pipeline offset is four rather than eight. Adjust the offset
12010 + tem = plus_constant (GET_MODE (tem), tem,
12011 + TARGET_THUMB1_ONLY ? -3 : -7);
12012 tem = gen_rtx_MINUS (GET_MODE (tem),
12014 gen_rtx_SYMBOL_REF (Pmode,
12015 @@ -27462,4 +27465,13 @@
12019 +/* return TRUE if x is a reference to a value in a constant pool */
12021 +arm_is_constant_pool_ref (rtx x)
12023 + return (MEM_P (x)
12024 + && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
12025 + && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
12028 #include "gt-arm.h"
12029 Index: gcc/config/arm/arm-protos.h
12030 ===================================================================
12031 --- gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release) (revision 217117)
12032 +++ gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch) (revision 217117)
12034 extern int legitimate_pic_operand_p (rtx);
12035 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
12036 extern rtx legitimize_tls_address (rtx, rtx);
12037 +extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
12038 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
12039 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
12040 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
12041 @@ -286,4 +287,6 @@
12043 extern void arm_emit_eabi_attribute (const char *, int, int);
12045 +extern bool arm_is_constant_pool_ref (rtx);
12047 #endif /* ! GCC_ARM_PROTOS_H */
12048 Index: gcc/config/arm/constraints.md
12049 ===================================================================
12050 --- gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release) (revision 217117)
12051 +++ gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch) (revision 217117)
12053 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
12055 ;; The following memory constraints have been used:
12056 -;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
12057 +;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
12058 ;; in ARM state: Uq
12059 ;; in Thumb state: Uu, Uw
12061 @@ -310,6 +310,12 @@
12062 An address valid for loading/storing register exclusive"
12063 (match_operand 0 "mem_noofs_operand"))
12065 +(define_memory_constraint "Uh"
12067 + An address suitable for byte and half-word loads which does not point inside a constant pool"
12068 + (and (match_code "mem")
12069 + (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
12071 (define_memory_constraint "Ut"
12073 In ARM/Thumb-2 state an address valid for loading/storing opaque structure
12074 @@ -356,7 +362,8 @@
12075 (and (match_code "mem")
12076 (match_test "TARGET_ARM
12077 && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
12078 - SIGN_EXTEND, 0)")))
12080 + && !arm_is_constant_pool_ref (op)")))
12082 (define_memory_constraint "Q"
12084 Index: gcc/config/arm/arm.md
12085 ===================================================================
12086 --- gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release) (revision 217117)
12087 +++ gcc/config/arm/arm.md (.../branches/gcc-4_8-branch) (revision 217117)
12088 @@ -4047,7 +4047,7 @@
12089 (define_insn "unaligned_loadhis"
12090 [(set (match_operand:SI 0 "s_register_operand" "=l,r")
12092 - (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
12093 + (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
12094 UNSPEC_UNALIGNED_LOAD)))]
12095 "unaligned_access && TARGET_32BIT"
12096 "ldr%(sh%)\t%0, %1\t@ unaligned"
12097 @@ -4655,7 +4655,7 @@
12099 (define_insn "*arm_zero_extendhisi2_v6"
12100 [(set (match_operand:SI 0 "s_register_operand" "=r,r")
12101 - (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12102 + (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12103 "TARGET_ARM && arm_arch6"
12106 @@ -4748,7 +4748,7 @@
12108 (define_insn "*arm_zero_extendqisi2_v6"
12109 [(set (match_operand:SI 0 "s_register_operand" "=r,r")
12110 - (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
12111 + (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
12112 "TARGET_ARM && arm_arch6"
12115 @@ -4980,7 +4980,7 @@
12117 (define_insn "*arm_extendhisi2"
12118 [(set (match_operand:SI 0 "s_register_operand" "=r,r")
12119 - (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12120 + (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12121 "TARGET_ARM && arm_arch4 && !arm_arch6"
12124 @@ -4987,23 +4987,19 @@
12125 ldr%(sh%)\\t%0, %1"
12126 [(set_attr "length" "8,4")
12127 (set_attr "type" "alu_shift,load_byte")
12128 - (set_attr "predicable" "yes")
12129 - (set_attr "pool_range" "*,256")
12130 - (set_attr "neg_pool_range" "*,244")]
12131 + (set_attr "predicable" "yes")]
12134 ;; ??? Check Thumb-2 pool range
12135 (define_insn "*arm_extendhisi2_v6"
12136 [(set (match_operand:SI 0 "s_register_operand" "=r,r")
12137 - (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12138 + (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12139 "TARGET_32BIT && arm_arch6"
12142 ldr%(sh%)\\t%0, %1"
12143 [(set_attr "type" "simple_alu_shift,load_byte")
12144 - (set_attr "predicable" "yes")
12145 - (set_attr "pool_range" "*,256")
12146 - (set_attr "neg_pool_range" "*,244")]
12147 + (set_attr "predicable" "yes")]
12150 (define_insn "*arm_extendhisi2addsi"
12151 @@ -5045,9 +5041,7 @@
12152 "TARGET_ARM && arm_arch4"
12153 "ldr%(sb%)\\t%0, %1"
12154 [(set_attr "type" "load_byte")
12155 - (set_attr "predicable" "yes")
12156 - (set_attr "pool_range" "256")
12157 - (set_attr "neg_pool_range" "244")]
12158 + (set_attr "predicable" "yes")]
12161 (define_expand "extendqisi2"
12162 @@ -5087,9 +5081,7 @@
12163 ldr%(sb%)\\t%0, %1"
12164 [(set_attr "length" "8,4")
12165 (set_attr "type" "alu_shift,load_byte")
12166 - (set_attr "predicable" "yes")
12167 - (set_attr "pool_range" "*,256")
12168 - (set_attr "neg_pool_range" "*,244")]
12169 + (set_attr "predicable" "yes")]
12172 (define_insn "*arm_extendqisi_v6"
12173 @@ -5101,9 +5093,7 @@
12175 ldr%(sb%)\\t%0, %1"
12176 [(set_attr "type" "simple_alu_shift,load_byte")
12177 - (set_attr "predicable" "yes")
12178 - (set_attr "pool_range" "*,256")
12179 - (set_attr "neg_pool_range" "*,244")]
12180 + (set_attr "predicable" "yes")]
12183 (define_insn "*arm_extendqisi2addsi"
12184 @@ -7630,12 +7620,13 @@
12186 (define_insn "*arm_cmpdi_unsigned"
12187 [(set (reg:CC_CZ CC_REGNUM)
12188 - (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
12189 - (match_operand:DI 1 "arm_di_operand" "rDi")))]
12190 + (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
12191 + (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
12193 "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
12194 [(set_attr "conds" "set")
12195 - (set_attr "length" "8")]
12196 + (set_attr "arch" "a,t2")
12197 + (set_attr "length" "8,10")]
12200 (define_insn "*arm_cmpdi_zero"
12201 Index: gcc/config/arm/t-rtems-eabi
12202 ===================================================================
12203 --- gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release) (revision 217117)
12204 +++ gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch) (revision 217117)
12206 # Custom RTEMS EABI multilibs
12208 -MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
12209 -MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
12210 +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
12211 +MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
12213 # Enumeration of multilibs
12215 MULTILIB_EXCEPTIONS =
12216 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
12217 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
12218 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12219 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
12220 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12221 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
12222 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
12223 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
12224 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
12225 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
12226 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12227 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
12228 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12229 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
12230 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
12231 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
12232 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
12233 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
12234 +# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12235 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
12236 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12237 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
12238 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
12239 +# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
12240 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
12241 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
12242 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12243 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
12244 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12245 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
12246 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
12247 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
12248 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
12249 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
12250 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
12251 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
12252 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
12253 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
12254 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
12255 +MULTILIB_EXCEPTIONS += mbig-endian/mthumb
12256 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
12257 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
12258 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12259 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
12260 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12261 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
12262 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
12263 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
12264 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
12265 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
12266 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12267 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
12268 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12269 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
12270 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
12271 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
12272 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
12273 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
12274 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12275 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
12276 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12277 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
12278 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
12279 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
12280 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
12281 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
12282 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12283 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
12284 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12285 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
12286 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
12287 +MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
12288 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
12289 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
12290 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
12291 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
12292 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
12293 +MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
12294 +MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
12295 +MULTILIB_EXCEPTIONS += mbig-endian
12296 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
12297 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
12298 +MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12299 +MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
12300 +MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12301 +MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
12302 MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
12303 # MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
12304 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
12305 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
12306 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12307 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
12308 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12309 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
12310 MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
12311 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
12312 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
12313 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
12314 +# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12315 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
12316 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12317 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
12318 MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
12319 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
12320 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
12321 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
12322 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12323 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
12324 +# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12325 +MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
12326 MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
12327 # MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
12328 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
12329 MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
12330 +MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
12331 +MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
12332 +MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
12333 +MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
12334 MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
12335 # MULTILIB_EXCEPTIONS += mthumb
12336 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
12337 MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
12338 +MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12339 +MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
12340 +MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12341 +MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
12342 MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
12343 MULTILIB_EXCEPTIONS += march=armv6-m
12344 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
12345 MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
12346 +MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12347 +MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
12348 +MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12349 +MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
12350 MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
12351 MULTILIB_EXCEPTIONS += march=armv7-a
12352 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
12353 MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
12354 +MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12355 +MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
12356 +MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12357 +MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
12358 MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
12359 MULTILIB_EXCEPTIONS += march=armv7-r
12360 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
12361 MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
12362 +MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12363 +MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
12364 +MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12365 +MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
12366 MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
12367 MULTILIB_EXCEPTIONS += march=armv7-m
12368 MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
12369 MULTILIB_EXCEPTIONS += mfpu=neon
12370 +MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
12371 +MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
12372 +MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
12373 +MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
12374 MULTILIB_EXCEPTIONS += mfloat-abi=hard
12375 Index: gcc/config/pa/pa.c
12376 ===================================================================
12377 --- gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release) (revision 217117)
12378 +++ gcc/config/pa/pa.c (.../branches/gcc-4_8-branch) (revision 217117)
12379 @@ -3237,7 +3237,12 @@
12381 && function_label_operand (x, VOIDmode))
12383 - fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
12384 + fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
12386 + /* We don't want an OPD when generating fast indirect calls. */
12387 + if (!TARGET_FAST_INDIRECT_CALLS)
12388 + fputs ("P%", asm_out_file);
12390 output_addr_const (asm_out_file, x);
12391 fputc ('\n', asm_out_file);
12393 @@ -4160,9 +4165,8 @@
12394 pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
12396 rtx insn = get_last_insn ();
12399 - last_address = 0;
12401 /* pa_expand_epilogue does the dirty work now. We just need
12402 to output the assembler directives which denote the end
12404 @@ -4185,14 +4189,16 @@
12405 if (insn && GET_CODE (insn) == CALL_INSN)
12407 fputs ("\tnop\n", file);
12408 - last_address += 4;
12409 + extra_nop = true;
12412 + extra_nop = false;
12414 fputs ("\t.EXIT\n\t.PROCEND\n", file);
12416 if (TARGET_SOM && TARGET_GAS)
12418 - /* We done with this subspace except possibly for some additional
12419 + /* We are done with this subspace except possibly for some additional
12420 debug information. Forget that we are in this subspace to ensure
12421 that the next function is output in its own subspace. */
12423 @@ -4199,12 +4205,20 @@
12424 cfun->machine->in_nsubspa = 2;
12427 + /* Thunks do their own insn accounting. */
12428 + if (cfun->is_thunk)
12431 if (INSN_ADDRESSES_SET_P ())
12433 + last_address = extra_nop ? 4 : 0;
12434 insn = get_last_nonnote_insn ();
12435 - last_address += INSN_ADDRESSES (INSN_UID (insn));
12436 - if (INSN_P (insn))
12437 - last_address += insn_default_length (insn);
12440 + last_address += INSN_ADDRESSES (INSN_UID (insn));
12441 + if (INSN_P (insn))
12442 + last_address += insn_default_length (insn);
12444 last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
12445 & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
12447 @@ -8270,8 +8284,7 @@
12448 xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
12449 xoperands[2] = GEN_INT (delta);
12451 - ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
12452 - fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
12453 + final_start_function (emit_barrier (), file, 1);
12455 /* Output the thunk. We know that the function is in the same
12456 translation unit (i.e., the same space) as the thunk, and that
12457 @@ -8301,12 +8314,16 @@
12458 || ((DECL_SECTION_NAME (thunk_fndecl)
12459 == DECL_SECTION_NAME (function))
12460 && last_address < 262132)))
12461 + /* In this case, we need to be able to reach the start of
12462 + the stub table even though the function is likely closer
12463 + and can be jumped to directly. */
12464 || (targetm_common.have_named_sections
12465 && DECL_SECTION_NAME (thunk_fndecl) == NULL
12466 && DECL_SECTION_NAME (function) == NULL
12467 - && last_address < 262132)
12468 + && total_code_bytes < MAX_PCREL17F_OFFSET)
12470 || (!targetm_common.have_named_sections
12471 - && last_address < 262132))))
12472 + && total_code_bytes < MAX_PCREL17F_OFFSET))))
12475 output_asm_insn ("addil L'%2,%%r26", xoperands);
12476 @@ -8477,17 +8494,8 @@
12480 - fprintf (file, "\t.EXIT\n\t.PROCEND\n");
12481 + final_end_function ();
12483 - if (TARGET_SOM && TARGET_GAS)
12485 - /* We done with this subspace except possibly for some additional
12486 - debug information. Forget that we are in this subspace to ensure
12487 - that the next function is output in its own subspace. */
12488 - in_section = NULL;
12489 - cfun->machine->in_nsubspa = 2;
12492 if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
12494 switch_to_section (data_section);
12495 Index: gcc/tree-vect-slp.c
12496 ===================================================================
12497 --- gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release) (revision 217117)
12498 +++ gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch) (revision 217117)
12499 @@ -1837,7 +1837,10 @@
12500 && (stmt_vinfo = vinfo_for_stmt (use_stmt))
12501 && !STMT_SLP_TYPE (stmt_vinfo)
12502 && (STMT_VINFO_RELEVANT (stmt_vinfo)
12503 - || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
12504 + || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
12505 + || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
12506 + && STMT_VINFO_RELATED_STMT (stmt_vinfo)
12507 + && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
12508 && !(gimple_code (use_stmt) == GIMPLE_PHI
12509 && STMT_VINFO_DEF_TYPE (stmt_vinfo)
12510 == vect_reduction_def))
12511 Index: gcc/regcprop.c
12512 ===================================================================
12513 --- gcc/regcprop.c (.../tags/gcc_4_8_3_release) (revision 217117)
12514 +++ gcc/regcprop.c (.../branches/gcc-4_8-branch) (revision 217117)
12515 @@ -1039,7 +1039,17 @@
12516 but instead among CLOBBERs on the CALL_INSN, we could wrongly
12517 assume the value in it is still live. */
12518 if (ksvd.ignore_set_reg)
12519 - note_stores (PATTERN (insn), kill_clobbered_value, vd);
12521 + note_stores (PATTERN (insn), kill_clobbered_value, vd);
12522 + for (exp = CALL_INSN_FUNCTION_USAGE (insn);
12524 + exp = XEXP (exp, 1))
12526 + rtx x = XEXP (exp, 0);
12527 + if (GET_CODE (x) == CLOBBER)
12528 + kill_value (SET_DEST (x), vd);
12533 /* Notice stores. */
12534 Index: libobjc/encoding.c
12535 ===================================================================
12536 --- libobjc/encoding.c (.../tags/gcc_4_8_3_release) (revision 217117)
12537 +++ libobjc/encoding.c (.../branches/gcc-4_8-branch) (revision 217117)
12538 @@ -192,6 +192,8 @@
12539 ? MAX (MAX (COMPUTED, SPECIFIED), 64) \
12540 : MAX (COMPUTED, SPECIFIED));})
12542 +#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
12543 + (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
12545 /* Skip a variable name, enclosed in quotes ("). */
12547 Index: libobjc/ChangeLog
12548 ===================================================================
12549 --- libobjc/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
12550 +++ libobjc/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
12552 +2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
12555 + * encoding.c (rs6000_special_adjust_field_align_p): Use definition
12556 + that matches the 4.8 branch ABI.
12558 +2014-07-27 Alan Modra <amodra@gmail.com>
12559 + Matthias Klose <doko@ubuntu.com>
12563 + * encoding.c: Define rs6000_special_adjust_field_align_p.
12565 2014-05-22 Release Manager
12567 * GCC 4.8.3 released.
12568 Index: libgfortran/m4/in_pack.m4
12569 ===================================================================
12570 --- libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12571 +++ libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12573 return source->base_addr;
12575 /* Allocate storage for the destination. */
12576 - destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
12577 + destptr = xmallocarray (ssize, sizeof ('rtype_name`));
12579 src = source->base_addr;
12580 stride0 = stride[0];
12581 Index: libgfortran/m4/pack.m4
12582 ===================================================================
12583 --- libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12584 +++ libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12585 @@ -168,8 +168,8 @@
12589 - /* xmalloc allocates a single byte for zero size. */
12590 - ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
12591 + /* xmallocarray allocates a single byte for zero size. */
12592 + ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
12596 Index: libgfortran/m4/spread.m4
12597 ===================================================================
12598 --- libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12599 +++ libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12600 @@ -102,8 +102,8 @@
12604 - /* xmalloc allocates a single byte for zero size. */
12605 - ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
12606 + /* xmallocarray allocates a single byte for zero size. */
12607 + ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
12611 @@ -245,7 +245,7 @@
12613 if (ret->base_addr == NULL)
12615 - ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
12616 + ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
12618 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
12620 Index: libgfortran/m4/transpose.m4
12621 ===================================================================
12622 --- libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12623 +++ libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12625 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
12626 GFC_DESCRIPTOR_EXTENT(source, 1));
12628 - ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
12629 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
12630 + sizeof ('rtype_name`));
12632 } else if (unlikely (compile_options.bounds_check))
12634 Index: libgfortran/m4/iforeach.m4
12635 ===================================================================
12636 --- libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12637 +++ libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12639 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12640 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12641 retarray->offset = 0;
12642 - retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
12643 + retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
12647 @@ -133,7 +133,7 @@
12648 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
12649 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12650 retarray->offset = 0;
12651 - retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
12652 + retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
12656 @@ -264,7 +264,7 @@
12657 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12658 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12659 retarray->offset = 0;
12660 - retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
12661 + retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
12663 else if (unlikely (compile_options.bounds_check))
12665 Index: libgfortran/m4/eoshift1.m4
12666 ===================================================================
12667 --- libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12668 +++ libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12669 @@ -106,8 +106,8 @@
12670 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
12673 - /* xmalloc allocates a single byte for zero size. */
12674 - ret->base_addr = xmalloc (size * arraysize);
12675 + /* xmallocarray allocates a single byte for zero size. */
12676 + ret->base_addr = xmallocarray (arraysize, size);
12679 else if (unlikely (compile_options.bounds_check))
12680 Index: libgfortran/m4/eoshift3.m4
12681 ===================================================================
12682 --- libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12683 +++ libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12688 - ret->base_addr = xmalloc (size * arraysize);
12689 + ret->base_addr = xmallocarray (arraysize, size);
12691 ret->dtype = array->dtype;
12692 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
12693 @@ -108,8 +108,8 @@
12694 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
12697 - /* xmalloc allocates a single byte for zero size. */
12698 - ret->base_addr = xmalloc (size * arraysize);
12699 + /* xmallocarray allocates a single byte for zero size. */
12700 + ret->base_addr = xmallocarray (arraysize, size);
12703 else if (unlikely (compile_options.bounds_check))
12704 Index: libgfortran/m4/shape.m4
12705 ===================================================================
12706 --- libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12707 +++ libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12710 GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
12712 - ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
12713 + ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
12716 stride = GFC_DESCRIPTOR_STRIDE(ret,0);
12717 Index: libgfortran/m4/cshift1.m4
12718 ===================================================================
12719 --- libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12720 +++ libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12725 - ret->base_addr = xmalloc (size * arraysize);
12726 + ret->base_addr = xmallocarray (arraysize, size);
12728 ret->dtype = array->dtype;
12729 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
12730 Index: libgfortran/m4/matmull.m4
12731 ===================================================================
12732 --- libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12733 +++ libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12737 retarray->base_addr
12738 - = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
12739 + = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
12740 retarray->offset = 0;
12742 else if (unlikely (compile_options.bounds_check))
12743 Index: libgfortran/m4/bessel.m4
12744 ===================================================================
12745 --- libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12746 +++ libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12749 size_t size = n2 < n1 ? 0 : n2-n1+1;
12750 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
12751 - ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
12752 + ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
12756 @@ -123,7 +123,7 @@
12758 size_t size = n2 < n1 ? 0 : n2-n1+1;
12759 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
12760 - ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
12761 + ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
12765 @@ -163,7 +163,7 @@
12767 x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
12769 - for (i = 2; i <= n1+n2; i++)
12770 + for (i = 2; i <= n2 - n1; i++)
12772 #if defined('rtype_name`_INFINITY)
12773 if (unlikely (last2 == -'rtype_name`_INFINITY))
12774 Index: libgfortran/m4/unpack.m4
12775 ===================================================================
12776 --- libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12777 +++ libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12778 @@ -100,7 +100,7 @@
12782 - ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
12783 + ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
12787 @@ -245,7 +245,7 @@
12791 - ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
12792 + ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
12796 Index: libgfortran/m4/reshape.m4
12797 ===================================================================
12798 --- libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12799 +++ libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12800 @@ -115,11 +115,11 @@
12803 if (unlikely (rs < 1))
12807 - alloc_size = rs * sizeof ('rtype_name`);
12810 - ret->base_addr = xmalloc (alloc_size);
12811 + ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
12812 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
12815 Index: libgfortran/m4/ifunction_logical.m4
12816 ===================================================================
12817 --- libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12818 +++ libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12820 retarray->offset = 0;
12821 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12823 - alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12824 - * extent[rank-1];
12825 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12827 if (alloc_size == 0)
12833 - retarray->base_addr = xmalloc (alloc_size);
12834 + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
12838 Index: libgfortran/m4/ifunction.m4
12839 ===================================================================
12840 --- libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12841 +++ libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12843 retarray->offset = 0;
12844 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12846 - alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12847 - * extent[rank-1];
12848 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12850 - retarray->base_addr = xmalloc (alloc_size);
12851 + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
12852 if (alloc_size == 0)
12854 /* Make sure we have a zero-sized array. */
12855 @@ -260,8 +259,7 @@
12859 - alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12860 - * extent[rank-1];
12861 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12863 retarray->offset = 0;
12864 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12865 @@ -273,7 +271,7 @@
12869 - retarray->base_addr = xmalloc (alloc_size);
12870 + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
12874 @@ -417,8 +415,7 @@
12875 retarray->offset = 0;
12876 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12878 - alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12879 - * extent[rank-1];
12880 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12882 if (alloc_size == 0)
12884 @@ -427,7 +424,7 @@
12888 - retarray->base_addr = xmalloc (alloc_size);
12889 + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
12893 Index: libgfortran/m4/matmul.m4
12894 ===================================================================
12895 --- libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release) (revision 217117)
12896 +++ libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch) (revision 217117)
12897 @@ -125,7 +125,7 @@
12900 retarray->base_addr
12901 - = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
12902 + = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
12903 retarray->offset = 0;
12905 else if (unlikely (compile_options.bounds_check))
12906 Index: libgfortran/configure
12907 ===================================================================
12908 --- libgfortran/configure (.../tags/gcc_4_8_3_release) (revision 217117)
12909 +++ libgfortran/configure (.../branches/gcc-4_8-branch) (revision 217117)
12910 @@ -2595,6 +2595,7 @@
12911 as_fn_append ac_func_list " getegid"
12912 as_fn_append ac_func_list " secure_getenv"
12913 as_fn_append ac_func_list " __secure_getenv"
12914 +as_fn_append ac_func_list " strtok_r"
12915 as_fn_append ac_header_list " math.h"
12916 # Check that the precious variables saved in the cache have kept the same
12918 @@ -12339,7 +12340,7 @@
12919 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12920 lt_status=$lt_dlunknown
12921 cat > conftest.$ac_ext <<_LT_EOF
12922 -#line 12342 "configure"
12923 +#line 12343 "configure"
12924 #include "confdefs.h"
12927 @@ -12445,7 +12446,7 @@
12928 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12929 lt_status=$lt_dlunknown
12930 cat > conftest.$ac_ext <<_LT_EOF
12931 -#line 12448 "configure"
12932 +#line 12449 "configure"
12933 #include "confdefs.h"
12936 @@ -16506,6 +16507,8 @@
12945 Index: libgfortran/runtime/in_pack_generic.c
12946 ===================================================================
12947 --- libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
12948 +++ libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
12949 @@ -180,7 +180,7 @@
12950 return source->base_addr;
12952 /* Allocate storage for the destination. */
12953 - destptr = xmalloc (ssize * size);
12954 + destptr = xmallocarray (ssize, size);
12955 dest = (char *)destptr;
12956 src = source->base_addr;
12957 stride0 = stride[0] * size;
12958 Index: libgfortran/runtime/memory.c
12959 ===================================================================
12960 --- libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release) (revision 217117)
12961 +++ libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch) (revision 217117)
12964 #include "libgfortran.h"
12965 #include <stdlib.h>
12966 +#include <errno.h>
12969 +#define SIZE_MAX ((size_t)-1)
12976 @@ -44,12 +49,34 @@
12981 +xmallocarray (size_t nmemb, size_t size)
12985 + if (!nmemb || !size)
12986 + size = nmemb = 1;
12987 + else if (nmemb > SIZE_MAX / size)
12990 + os_error ("Integer overflow in xmallocarray");
12993 + p = malloc (nmemb * size);
12996 + os_error ("Memory allocation failed in xmallocarray");
13002 /* calloc wrapper that aborts on error. */
13005 xcalloc (size_t nmemb, size_t size)
13007 - if (nmemb * size == 0)
13008 + if (!nmemb || !size)
13011 void *p = calloc (nmemb, size);
13012 Index: libgfortran/runtime/convert_char.c
13013 ===================================================================
13014 --- libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release) (revision 217117)
13015 +++ libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch) (revision 217117)
13017 gfc_charlen_type i, l;
13019 l = len > 0 ? len : 0;
13020 - *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
13021 + *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
13023 for (i = 0; i < l; i++)
13024 (*dst)[i] = src[i];
13026 gfc_charlen_type i, l;
13028 l = len > 0 ? len : 0;
13029 - *dst = xmalloc ((l + 1) * sizeof (unsigned char));
13030 + *dst = xmalloc (l + 1);
13032 for (i = 0; i < l; i++)
13033 (*dst)[i] = src[i];
13034 Index: libgfortran/runtime/environ.c
13035 ===================================================================
13036 --- libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release) (revision 217117)
13037 +++ libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch) (revision 217117)
13038 @@ -833,7 +833,7 @@
13042 - elist = xmalloc (unit_count * sizeof (exception_t));
13043 + elist = xmallocarray (unit_count, sizeof (exception_t));
13047 Index: libgfortran/runtime/main.c
13048 ===================================================================
13049 --- libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release) (revision 217117)
13050 +++ libgfortran/runtime/main.c (.../branches/gcc-4_8-branch) (revision 217117)
13051 @@ -153,6 +153,16 @@
13055 +#ifndef HAVE_STRTOK_R
13057 +gfstrtok_r (char *str, const char *delim,
13058 + char **saveptr __attribute__ ((unused)))
13060 + return strtok (str, delim);
13062 +#define strtok_r gfstrtok_r
13065 char *addr2line_path;
13067 /* Find addr2line and store the path. */
13068 @@ -161,30 +171,32 @@
13069 find_addr2line (void)
13072 -#define A2L_LEN 10
13073 +#define A2L_LEN 11
13074 char *path = secure_getenv ("PATH");
13077 + char *tp = strdup (path);
13080 size_t n = strlen (path);
13081 - char ap[n + 1 + A2L_LEN];
13083 - for (size_t i = 0; i < n; i++)
13084 + char *ap = xmalloc (n + A2L_LEN);
13086 + for (char *str = tp;; str = NULL)
13088 - if (path[i] != ':')
13089 - ap[ai++] = path[i];
13091 + char *token = strtok_r (str, ":", &saveptr);
13094 + size_t toklen = strlen (token);
13095 + memcpy (ap, token, toklen);
13096 + memcpy (ap + toklen, "/addr2line", A2L_LEN);
13097 + if (access (ap, R_OK|X_OK) == 0)
13100 - memcpy (ap + ai, "addr2line", A2L_LEN);
13101 - if (access (ap, R_OK|X_OK) == 0)
13103 - addr2line_path = strdup (ap);
13108 + addr2line_path = strdup (ap);
13117 Index: libgfortran/intrinsics/string_intrinsics_inc.c
13118 ===================================================================
13119 --- libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release) (revision 217117)
13120 +++ libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch) (revision 217117)
13121 @@ -164,7 +164,7 @@
13124 /* Allocate space for result string. */
13125 - *dest = xmalloc (*len * sizeof (CHARTYPE));
13126 + *dest = xmallocarray (*len, sizeof (CHARTYPE));
13128 /* Copy string if necessary. */
13129 memcpy (*dest, src, *len * sizeof (CHARTYPE));
13130 @@ -442,7 +442,7 @@
13131 *dest = &zero_length_string;
13134 - CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
13135 + CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
13136 memcpy (tmp, res, reslen * sizeof (CHARTYPE));
13137 MEMSET (&tmp[reslen], ' ', *rlen - reslen);
13139 Index: libgfortran/intrinsics/pack_generic.c
13140 ===================================================================
13141 --- libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
13142 +++ libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
13143 @@ -152,8 +152,8 @@
13144 GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
13147 - /* xmalloc allocates a single byte for zero size. */
13148 - ret->base_addr = xmalloc (size * total);
13149 + /* xmallocarray allocates a single byte for zero size. */
13150 + ret->base_addr = xmallocarray (total, size);
13153 return; /* In this case, nothing remains to be done. */
13154 @@ -519,7 +519,7 @@
13158 - ret->base_addr = xmalloc (size * total);
13159 + ret->base_addr = xmallocarray (total, size);
13163 Index: libgfortran/intrinsics/transpose_generic.c
13164 ===================================================================
13165 --- libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
13166 +++ libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
13168 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
13169 GFC_DESCRIPTOR_EXTENT(source, 1));
13171 - ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
13172 + ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
13175 else if (unlikely (compile_options.bounds_check))
13176 Index: libgfortran/intrinsics/cshift0.c
13177 ===================================================================
13178 --- libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release) (revision 217117)
13179 +++ libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch) (revision 217117)
13181 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13184 - /* xmalloc allocates a single byte for zero size. */
13185 - ret->base_addr = xmalloc (size * arraysize);
13186 + /* xmallocarray allocates a single byte for zero size. */
13187 + ret->base_addr = xmallocarray (arraysize, size);
13189 else if (unlikely (compile_options.bounds_check))
13191 Index: libgfortran/intrinsics/ctime.c
13192 ===================================================================
13193 --- libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release) (revision 217117)
13194 +++ libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch) (revision 217117)
13195 @@ -31,31 +31,53 @@
13196 #include <string.h>
13199 -/* strftime-like function that fills a C string with %c format which
13200 - is identical to ctime in the default locale. As ctime and ctime_r
13201 - are poorly specified and their usage not recommended, the
13202 - implementation instead uses strftime. */
13203 +/* Maximum space a ctime-like string might need. A "normal" ctime
13204 + string is 26 bytes, and in our case 24 bytes as we don't include
13205 + the trailing newline and null. However, the longest possible year
13206 + number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
13207 + 32-bit signed integer) so an extra 7 bytes are needed. */
13208 +#define CTIME_BUFSZ 31
13211 -strctime (char *s, size_t max, const time_t *timep)
13213 +/* Thread-safe ctime-like function that fills a Fortran
13214 + string. ctime_r is a portability headache and marked as obsolescent
13215 + in POSIX 2008, which recommends strftime in its place. However,
13216 + strftime(..., "%c",...) doesn't produce ctime-like output on
13217 + MinGW, so do it manually with snprintf. */
13220 +gf_ctime (char *s, size_t max, const time_t timev)
13224 + char buf[CTIME_BUFSZ + 1];
13225 /* Some targets provide a localtime_r based on a draft of the POSIX
13226 standard where the return type is int rather than the
13227 standardized struct tm*. */
13228 - __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
13229 + __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
13231 - failed = localtime_r (timep, <m) == NULL,
13232 - failed = localtime_r (timep, <m) != 0);
13233 + failed = localtime_r (&timev, <m) == NULL,
13234 + failed = localtime_r (&timev, <m) != 0);
13237 - return strftime (s, max, "%c", <m);
13239 + int n = snprintf (buf, sizeof (buf),
13240 + "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
13241 + "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
13242 + "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
13243 + ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
13244 + 1900 + ltm.tm_year);
13247 + if ((size_t) n <= max)
13249 + cf_strcpy (s, max, buf);
13253 + memset (s, ' ', max);
13257 -/* In the default locale, the date and time representation fits in 26
13258 - bytes. However, other locales might need more space. */
13261 extern void fdate (char **, gfc_charlen_type *);
13262 export_proto(fdate);
13264 fdate (char ** date, gfc_charlen_type * date_len)
13266 time_t now = time(NULL);
13267 - *date = xmalloc (CSZ);
13268 - *date_len = strctime (*date, CSZ, &now);
13269 + *date = xmalloc (CTIME_BUFSZ);
13270 + *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
13275 fdate_sub (char * date, gfc_charlen_type date_len)
13277 time_t now = time(NULL);
13278 - char *s = xmalloc (date_len + 1);
13279 - size_t n = strctime (s, date_len + 1, &now);
13280 - fstrcpy (date, date_len, s, n);
13282 + gf_ctime (date, date_len, now);
13287 PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
13290 - *date = xmalloc (CSZ);
13291 - *date_len = strctime (*date, CSZ, &now);
13292 + *date = xmalloc (CTIME_BUFSZ);
13293 + *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
13297 @@ -103,8 +122,5 @@
13298 ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
13301 - char *s = xmalloc (date_len + 1);
13302 - size_t n = strctime (s, date_len + 1, &now);
13303 - fstrcpy (date, date_len, s, n);
13305 + gf_ctime (date, date_len, now);
13307 Index: libgfortran/intrinsics/spread_generic.c
13308 ===================================================================
13309 --- libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
13310 +++ libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
13311 @@ -100,7 +100,7 @@
13312 GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
13315 - ret->base_addr = xmalloc (rs * size);
13316 + ret->base_addr = xmallocarray (rs, size);
13320 @@ -245,7 +245,7 @@
13322 if (ret->base_addr == NULL)
13324 - ret->base_addr = xmalloc (ncopies * size);
13325 + ret->base_addr = xmallocarray (ncopies, size);
13327 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13329 Index: libgfortran/intrinsics/unpack_generic.c
13330 ===================================================================
13331 --- libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
13332 +++ libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
13333 @@ -125,7 +125,7 @@
13337 - ret->base_addr = xmalloc (rs * size);
13338 + ret->base_addr = xmallocarray (rs, size);
13342 Index: libgfortran/intrinsics/eoshift0.c
13343 ===================================================================
13344 --- libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release) (revision 217117)
13345 +++ libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch) (revision 217117)
13350 - /* xmalloc allocates a single byte for zero size. */
13351 - ret->base_addr = xmalloc (size * arraysize);
13352 + /* xmallocarray allocates a single byte for zero size. */
13353 + ret->base_addr = xmallocarray (arraysize, size);
13355 else if (unlikely (compile_options.bounds_check))
13357 Index: libgfortran/intrinsics/eoshift2.c
13358 ===================================================================
13359 --- libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release) (revision 217117)
13360 +++ libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch) (revision 217117)
13363 ret->dtype = array->dtype;
13365 - /* xmalloc allocates a single byte for zero size. */
13366 - ret->base_addr = xmalloc (size * arraysize);
13367 + /* xmallocarray allocates a single byte for zero size. */
13368 + ret->base_addr = xmallocarray (arraysize, size);
13370 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
13372 Index: libgfortran/intrinsics/reshape_generic.c
13373 ===================================================================
13374 --- libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release) (revision 217117)
13375 +++ libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch) (revision 217117)
13376 @@ -99,11 +99,11 @@
13379 if (unlikely (rs < 1))
13381 + alloc_size = 0; /* xmalloc will allocate 1 byte. */
13383 - alloc_size = rs * size;
13386 - ret->base_addr = xmalloc (alloc_size);
13387 + ret->base_addr = xmallocarray (alloc_size, size);
13389 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
13391 Index: libgfortran/configure.ac
13392 ===================================================================
13393 --- libgfortran/configure.ac (.../tags/gcc_4_8_3_release) (revision 217117)
13394 +++ libgfortran/configure.ac (.../branches/gcc-4_8-branch) (revision 217117)
13395 @@ -267,7 +267,7 @@
13396 strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
13397 getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
13398 readlink getgid getpid getppid getuid geteuid umask getegid \
13399 -secure_getenv __secure_getenv)
13400 +secure_getenv __secure_getenv strtok_r)
13402 # Check strerror_r, cannot be above as versions with two and three arguments exist
13403 LIBGFOR_CHECK_STRERROR_R
13404 Index: libgfortran/ChangeLog
13405 ===================================================================
13406 --- libgfortran/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
13407 +++ libgfortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
13409 +2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
13411 + PR libfortran/63589
13412 + * configure.ac: Check for strtok_r.
13413 + * runtime/main.c (gfstrtok_r): Fallback implementation of
13415 + (find_addr2line): Use strtok_r to split PATH.
13416 + * config.h.in: Regenerated.
13417 + * configure: Regenerated.
13419 +2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
13421 + PR libgfortran/62188
13422 + * m4/bessel.m4: Avoid indexing off the end of an array.
13423 + * generated/bessel_r10.c: Regenerated.
13424 + * generated/bessel_r16.c: Ditto.
13425 + * generated/bessel_r4.c: Ditto.
13426 + * generated/bessel_r8.c: Ditto.
13428 +2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
13430 + Backport from mainline
13432 + * libgfortran.h (xmallocarray): New prototype.
13433 + * runtime/memory.c (xmallocarray): New function.
13434 + (xcalloc): Check for nonzero separately instead of multiplying.
13435 + * generated/*.c: Regenerated.
13436 + * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
13438 + * intrinsics/eoshift0.c (eoshift0): Likewise.
13439 + * intrinsics/eoshift2.c (eoshift2): Likewise.
13440 + * intrinsics/pack_generic.c (pack_internal): Likewise.
13441 + (pack_s_internal): Likewise.
13442 + * intrinsics/reshape_generic.c (reshape_internal): Likewise.
13443 + * intrinsics/spread_generic.c (spread_internal): Likewise.
13444 + (spread_internal_scalar): Likewise.
13445 + * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
13446 + (string_minmax): Likewise.
13447 + * intrinsics/transpose_generic.c (transpose_internal): Likewise.
13448 + * intrinsics/unpack_generic.c (unpack_internal): Likewise.
13449 + * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
13450 + * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
13452 + * io/unit.c (get_internal_unit): Likewise.
13453 + (filename_from_unit): Don't cast xmalloc return value.
13454 + * io/write.c (nml_write_obj): Likewise, formatting.
13455 + * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
13456 + instead of xmalloc.
13457 + (besse_yn_r'rtype_kind`): Likewise.
13458 + * m4/cshift1.m4 (cshift1): Likewise.
13459 + * m4/eoshift1.m4 (eoshift1): Likewise.
13460 + * m4/eoshift3.m4 (eoshift3): Likewise.
13461 + * m4/iforeach.m4: Likewise.
13462 + * m4/ifunction.m4: Likewise.
13463 + * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
13465 + * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
13466 + * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
13467 + * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
13468 + * m4/pack.m4 (pack_'rtype_code`): Likewise.
13469 + * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
13470 + * m4/shape.m4 (shape_'rtype_kind`): Likewise.
13471 + * m4/spread.m4 (spread_'rtype_code`): Likewise.
13472 + (spread_scalar_'rtype_code`): Likewise.
13473 + * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
13474 + * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
13475 + (unpack1_'rtype_code`): Likewise.
13476 + * runtime/convert_char.c (convert_char1_to_char4): Likewise.
13477 + (convert_char4_to_char1): Simplify.
13478 + * runtime/environ.c (init_unformatted): Call xmallocarray instead
13480 + * runtime/in_pack_generic.c (internal_pack): Likewise.
13482 +2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
13484 + Backport from mainline
13485 + PR libfortran/61310
13486 + * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
13487 + instead of strftime.
13488 + (fdate): Use gf_ctime.
13489 + (fdate_sub): Likewise.
13490 + (ctime): Likewise.
13491 + (ctime_sub): Likewise.
13493 +2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
13495 + Backport from trunk.
13496 + PR libfortran/61187
13497 + * io/unix.c (raw_close): Check if s->fd is -1.
13498 + (fd_to_stream): Check return value of fstat(), handle error.
13500 2014-05-22 Release Manager
13502 * GCC 4.8.3 released.
13503 Index: libgfortran/generated/spread_r10.c
13504 ===================================================================
13505 --- libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
13506 +++ libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
13507 @@ -101,8 +101,8 @@
13511 - /* xmalloc allocates a single byte for zero size. */
13512 - ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
13513 + /* xmallocarray allocates a single byte for zero size. */
13514 + ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
13518 @@ -244,7 +244,7 @@
13520 if (ret->base_addr == NULL)
13522 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
13523 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
13525 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13527 Index: libgfortran/generated/maxloc1_4_r8.c
13528 ===================================================================
13529 --- libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
13530 +++ libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
13532 retarray->offset = 0;
13533 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13535 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13536 - * extent[rank-1];
13537 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13539 - retarray->base_addr = xmalloc (alloc_size);
13540 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13541 if (alloc_size == 0)
13543 /* Make sure we have a zero-sized array. */
13544 @@ -294,8 +293,7 @@
13548 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13549 - * extent[rank-1];
13550 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13552 retarray->offset = 0;
13553 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13554 @@ -307,7 +305,7 @@
13558 - retarray->base_addr = xmalloc (alloc_size);
13559 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13563 @@ -485,8 +483,7 @@
13564 retarray->offset = 0;
13565 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13567 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13568 - * extent[rank-1];
13569 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13571 if (alloc_size == 0)
13573 @@ -495,7 +492,7 @@
13577 - retarray->base_addr = xmalloc (alloc_size);
13578 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13582 Index: libgfortran/generated/norm2_r4.c
13583 ===================================================================
13584 --- libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13585 +++ libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
13586 @@ -101,10 +101,9 @@
13587 retarray->offset = 0;
13588 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13590 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13591 - * extent[rank-1];
13592 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13594 - retarray->base_addr = xmalloc (alloc_size);
13595 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13596 if (alloc_size == 0)
13598 /* Make sure we have a zero-sized array. */
13599 Index: libgfortran/generated/parity_l2.c
13600 ===================================================================
13601 --- libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
13602 +++ libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
13604 retarray->offset = 0;
13605 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13607 - alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13608 - * extent[rank-1];
13609 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13611 - retarray->base_addr = xmalloc (alloc_size);
13612 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
13613 if (alloc_size == 0)
13615 /* Make sure we have a zero-sized array. */
13616 Index: libgfortran/generated/eoshift3_4.c
13617 ===================================================================
13618 --- libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13619 +++ libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch) (revision 217117)
13624 - ret->base_addr = xmalloc (size * arraysize);
13625 + ret->base_addr = xmallocarray (arraysize, size);
13627 ret->dtype = array->dtype;
13628 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
13629 @@ -107,8 +107,8 @@
13630 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13633 - /* xmalloc allocates a single byte for zero size. */
13634 - ret->base_addr = xmalloc (size * arraysize);
13635 + /* xmallocarray allocates a single byte for zero size. */
13636 + ret->base_addr = xmallocarray (arraysize, size);
13639 else if (unlikely (compile_options.bounds_check))
13640 Index: libgfortran/generated/transpose_c8.c
13641 ===================================================================
13642 --- libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
13643 +++ libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
13645 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
13646 GFC_DESCRIPTOR_EXTENT(source, 1));
13648 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
13649 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
13650 + sizeof (GFC_COMPLEX_8));
13652 } else if (unlikely (compile_options.bounds_check))
13654 Index: libgfortran/generated/eoshift1_8.c
13655 ===================================================================
13656 --- libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
13657 +++ libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch) (revision 217117)
13658 @@ -105,8 +105,8 @@
13659 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13662 - /* xmalloc allocates a single byte for zero size. */
13663 - ret->base_addr = xmalloc (size * arraysize);
13664 + /* xmallocarray allocates a single byte for zero size. */
13665 + ret->base_addr = xmallocarray (arraysize, size);
13668 else if (unlikely (compile_options.bounds_check))
13669 Index: libgfortran/generated/reshape_r16.c
13670 ===================================================================
13671 --- libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
13672 +++ libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
13673 @@ -111,11 +111,11 @@
13676 if (unlikely (rs < 1))
13680 - alloc_size = rs * sizeof (GFC_REAL_16);
13683 - ret->base_addr = xmalloc (alloc_size);
13684 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
13685 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
13688 Index: libgfortran/generated/bessel_r4.c
13689 ===================================================================
13690 --- libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13691 +++ libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
13694 size_t size = n2 < n1 ? 0 : n2-n1+1;
13695 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
13696 - ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
13697 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
13701 @@ -122,7 +122,7 @@
13703 size_t size = n2 < n1 ? 0 : n2-n1+1;
13704 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
13705 - ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
13706 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
13710 @@ -162,7 +162,7 @@
13712 x2rev = GFC_REAL_4_LITERAL(2.)/x;
13714 - for (i = 2; i <= n1+n2; i++)
13715 + for (i = 2; i <= n2 - n1; i++)
13717 #if defined(GFC_REAL_4_INFINITY)
13718 if (unlikely (last2 == -GFC_REAL_4_INFINITY))
13719 Index: libgfortran/generated/any_l2.c
13720 ===================================================================
13721 --- libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
13722 +++ libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
13723 @@ -101,8 +101,7 @@
13724 retarray->offset = 0;
13725 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13727 - alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13728 - * extent[rank-1];
13729 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13731 if (alloc_size == 0)
13733 @@ -111,7 +110,7 @@
13737 - retarray->base_addr = xmalloc (alloc_size);
13738 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
13742 Index: libgfortran/generated/product_r4.c
13743 ===================================================================
13744 --- libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13745 +++ libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
13747 retarray->offset = 0;
13748 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13750 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13751 - * extent[rank-1];
13752 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13754 - retarray->base_addr = xmalloc (alloc_size);
13755 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13756 if (alloc_size == 0)
13758 /* Make sure we have a zero-sized array. */
13759 @@ -272,8 +271,7 @@
13763 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13764 - * extent[rank-1];
13765 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13767 retarray->offset = 0;
13768 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13769 @@ -285,7 +283,7 @@
13773 - retarray->base_addr = xmalloc (alloc_size);
13774 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13778 @@ -430,8 +428,7 @@
13779 retarray->offset = 0;
13780 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13782 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13783 - * extent[rank-1];
13784 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13786 if (alloc_size == 0)
13788 @@ -440,7 +437,7 @@
13792 - retarray->base_addr = xmalloc (alloc_size);
13793 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13797 Index: libgfortran/generated/iany_i1.c
13798 ===================================================================
13799 --- libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
13800 +++ libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
13802 retarray->offset = 0;
13803 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13805 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13806 - * extent[rank-1];
13807 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13809 - retarray->base_addr = xmalloc (alloc_size);
13810 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
13811 if (alloc_size == 0)
13813 /* Make sure we have a zero-sized array. */
13814 @@ -272,8 +271,7 @@
13818 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13819 - * extent[rank-1];
13820 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13822 retarray->offset = 0;
13823 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13824 @@ -285,7 +283,7 @@
13828 - retarray->base_addr = xmalloc (alloc_size);
13829 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
13833 @@ -430,8 +428,7 @@
13834 retarray->offset = 0;
13835 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13837 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13838 - * extent[rank-1];
13839 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13841 if (alloc_size == 0)
13843 @@ -440,7 +437,7 @@
13847 - retarray->base_addr = xmalloc (alloc_size);
13848 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
13852 Index: libgfortran/generated/parity_l16.c
13853 ===================================================================
13854 --- libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
13855 +++ libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
13857 retarray->offset = 0;
13858 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13860 - alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13861 - * extent[rank-1];
13862 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13864 - retarray->base_addr = xmalloc (alloc_size);
13865 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
13866 if (alloc_size == 0)
13868 /* Make sure we have a zero-sized array. */
13869 Index: libgfortran/generated/in_pack_r4.c
13870 ===================================================================
13871 --- libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13872 +++ libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
13874 return source->base_addr;
13876 /* Allocate storage for the destination. */
13877 - destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
13878 + destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
13880 src = source->base_addr;
13881 stride0 = stride[0];
13882 Index: libgfortran/generated/product_i2.c
13883 ===================================================================
13884 --- libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
13885 +++ libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
13887 retarray->offset = 0;
13888 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13890 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13891 - * extent[rank-1];
13892 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13894 - retarray->base_addr = xmalloc (alloc_size);
13895 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13896 if (alloc_size == 0)
13898 /* Make sure we have a zero-sized array. */
13899 @@ -272,8 +271,7 @@
13903 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13904 - * extent[rank-1];
13905 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13907 retarray->offset = 0;
13908 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13909 @@ -285,7 +283,7 @@
13913 - retarray->base_addr = xmalloc (alloc_size);
13914 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13918 @@ -430,8 +428,7 @@
13919 retarray->offset = 0;
13920 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13922 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13923 - * extent[rank-1];
13924 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13926 if (alloc_size == 0)
13928 @@ -440,7 +437,7 @@
13932 - retarray->base_addr = xmalloc (alloc_size);
13933 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13937 Index: libgfortran/generated/iparity_i4.c
13938 ===================================================================
13939 --- libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
13940 +++ libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
13942 retarray->offset = 0;
13943 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13945 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13946 - * extent[rank-1];
13947 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13949 - retarray->base_addr = xmalloc (alloc_size);
13950 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13951 if (alloc_size == 0)
13953 /* Make sure we have a zero-sized array. */
13954 @@ -272,8 +271,7 @@
13958 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13959 - * extent[rank-1];
13960 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13962 retarray->offset = 0;
13963 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13964 @@ -285,7 +283,7 @@
13968 - retarray->base_addr = xmalloc (alloc_size);
13969 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13973 @@ -430,8 +428,7 @@
13974 retarray->offset = 0;
13975 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13977 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13978 - * extent[rank-1];
13979 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13981 if (alloc_size == 0)
13983 @@ -440,7 +437,7 @@
13987 - retarray->base_addr = xmalloc (alloc_size);
13988 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13992 Index: libgfortran/generated/minloc0_4_i1.c
13993 ===================================================================
13994 --- libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
13995 +++ libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
13997 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13998 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13999 retarray->offset = 0;
14000 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14001 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14005 @@ -199,7 +199,7 @@
14006 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14007 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14008 retarray->offset = 0;
14009 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14010 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14014 @@ -367,7 +367,7 @@
14015 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14016 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14017 retarray->offset = 0;
14018 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14019 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14021 else if (unlikely (compile_options.bounds_check))
14023 Index: libgfortran/generated/reshape_c4.c
14024 ===================================================================
14025 --- libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14026 +++ libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
14027 @@ -111,11 +111,11 @@
14030 if (unlikely (rs < 1))
14034 - alloc_size = rs * sizeof (GFC_COMPLEX_4);
14037 - ret->base_addr = xmalloc (alloc_size);
14038 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
14039 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14042 Index: libgfortran/generated/maxloc0_4_r16.c
14043 ===================================================================
14044 --- libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14045 +++ libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14047 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14048 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14049 retarray->offset = 0;
14050 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14051 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14055 @@ -199,7 +199,7 @@
14056 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14057 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14058 retarray->offset = 0;
14059 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14060 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14064 @@ -367,7 +367,7 @@
14065 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14066 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14067 retarray->offset = 0;
14068 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14069 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14071 else if (unlikely (compile_options.bounds_check))
14073 Index: libgfortran/generated/iall_i8.c
14074 ===================================================================
14075 --- libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
14076 +++ libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
14078 retarray->offset = 0;
14079 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14081 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14082 - * extent[rank-1];
14083 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14085 - retarray->base_addr = xmalloc (alloc_size);
14086 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14087 if (alloc_size == 0)
14089 /* Make sure we have a zero-sized array. */
14090 @@ -272,8 +271,7 @@
14094 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14095 - * extent[rank-1];
14096 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14098 retarray->offset = 0;
14099 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14100 @@ -285,7 +283,7 @@
14104 - retarray->base_addr = xmalloc (alloc_size);
14105 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14109 @@ -430,8 +428,7 @@
14110 retarray->offset = 0;
14111 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14113 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14114 - * extent[rank-1];
14115 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14117 if (alloc_size == 0)
14119 @@ -440,7 +437,7 @@
14123 - retarray->base_addr = xmalloc (alloc_size);
14124 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14128 Index: libgfortran/generated/maxloc1_8_r16.c
14129 ===================================================================
14130 --- libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14131 +++ libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14133 retarray->offset = 0;
14134 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14136 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14137 - * extent[rank-1];
14138 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14140 - retarray->base_addr = xmalloc (alloc_size);
14141 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14142 if (alloc_size == 0)
14144 /* Make sure we have a zero-sized array. */
14145 @@ -294,8 +293,7 @@
14149 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14150 - * extent[rank-1];
14151 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14153 retarray->offset = 0;
14154 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14155 @@ -307,7 +305,7 @@
14159 - retarray->base_addr = xmalloc (alloc_size);
14160 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14164 @@ -485,8 +483,7 @@
14165 retarray->offset = 0;
14166 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14168 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14169 - * extent[rank-1];
14170 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14172 if (alloc_size == 0)
14174 @@ -495,7 +492,7 @@
14178 - retarray->base_addr = xmalloc (alloc_size);
14179 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14183 Index: libgfortran/generated/sum_r16.c
14184 ===================================================================
14185 --- libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14186 +++ libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14188 retarray->offset = 0;
14189 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14191 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14192 - * extent[rank-1];
14193 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14195 - retarray->base_addr = xmalloc (alloc_size);
14196 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14197 if (alloc_size == 0)
14199 /* Make sure we have a zero-sized array. */
14200 @@ -272,8 +271,7 @@
14204 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14205 - * extent[rank-1];
14206 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14208 retarray->offset = 0;
14209 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14210 @@ -285,7 +283,7 @@
14214 - retarray->base_addr = xmalloc (alloc_size);
14215 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14219 @@ -430,8 +428,7 @@
14220 retarray->offset = 0;
14221 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14223 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14224 - * extent[rank-1];
14225 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14227 if (alloc_size == 0)
14229 @@ -440,7 +437,7 @@
14233 - retarray->base_addr = xmalloc (alloc_size);
14234 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14238 Index: libgfortran/generated/sum_i1.c
14239 ===================================================================
14240 --- libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
14241 +++ libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
14243 retarray->offset = 0;
14244 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14246 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14247 - * extent[rank-1];
14248 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14250 - retarray->base_addr = xmalloc (alloc_size);
14251 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14252 if (alloc_size == 0)
14254 /* Make sure we have a zero-sized array. */
14255 @@ -272,8 +271,7 @@
14259 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14260 - * extent[rank-1];
14261 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14263 retarray->offset = 0;
14264 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14265 @@ -285,7 +283,7 @@
14269 - retarray->base_addr = xmalloc (alloc_size);
14270 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14274 @@ -430,8 +428,7 @@
14275 retarray->offset = 0;
14276 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14278 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14279 - * extent[rank-1];
14280 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14282 if (alloc_size == 0)
14284 @@ -440,7 +437,7 @@
14288 - retarray->base_addr = xmalloc (alloc_size);
14289 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14293 Index: libgfortran/generated/in_pack_i2.c
14294 ===================================================================
14295 --- libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
14296 +++ libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
14298 return source->base_addr;
14300 /* Allocate storage for the destination. */
14301 - destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
14302 + destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
14304 src = source->base_addr;
14305 stride0 = stride[0];
14306 Index: libgfortran/generated/transpose_r10.c
14307 ===================================================================
14308 --- libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
14309 +++ libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
14311 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14312 GFC_DESCRIPTOR_EXTENT(source, 1));
14314 - ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
14315 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
14316 + sizeof (GFC_REAL_10));
14318 } else if (unlikely (compile_options.bounds_check))
14320 Index: libgfortran/generated/maxloc1_16_r16.c
14321 ===================================================================
14322 --- libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14323 +++ libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14325 retarray->offset = 0;
14326 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14328 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14329 - * extent[rank-1];
14330 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14332 - retarray->base_addr = xmalloc (alloc_size);
14333 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14334 if (alloc_size == 0)
14336 /* Make sure we have a zero-sized array. */
14337 @@ -294,8 +293,7 @@
14341 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14342 - * extent[rank-1];
14343 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14345 retarray->offset = 0;
14346 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14347 @@ -307,7 +305,7 @@
14351 - retarray->base_addr = xmalloc (alloc_size);
14352 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14356 @@ -485,8 +483,7 @@
14357 retarray->offset = 0;
14358 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14360 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14361 - * extent[rank-1];
14362 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14364 if (alloc_size == 0)
14366 @@ -495,7 +492,7 @@
14370 - retarray->base_addr = xmalloc (alloc_size);
14371 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14375 Index: libgfortran/generated/maxloc1_16_i4.c
14376 ===================================================================
14377 --- libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14378 +++ libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
14380 retarray->offset = 0;
14381 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14383 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14384 - * extent[rank-1];
14385 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14387 - retarray->base_addr = xmalloc (alloc_size);
14388 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14389 if (alloc_size == 0)
14391 /* Make sure we have a zero-sized array. */
14392 @@ -294,8 +293,7 @@
14396 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14397 - * extent[rank-1];
14398 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14400 retarray->offset = 0;
14401 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14402 @@ -307,7 +305,7 @@
14406 - retarray->base_addr = xmalloc (alloc_size);
14407 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14411 @@ -485,8 +483,7 @@
14412 retarray->offset = 0;
14413 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14415 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14416 - * extent[rank-1];
14417 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14419 if (alloc_size == 0)
14421 @@ -495,7 +492,7 @@
14425 - retarray->base_addr = xmalloc (alloc_size);
14426 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14430 Index: libgfortran/generated/spread_i1.c
14431 ===================================================================
14432 --- libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
14433 +++ libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
14434 @@ -101,8 +101,8 @@
14438 - /* xmalloc allocates a single byte for zero size. */
14439 - ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
14440 + /* xmallocarray allocates a single byte for zero size. */
14441 + ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
14445 @@ -244,7 +244,7 @@
14447 if (ret->base_addr == NULL)
14449 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
14450 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
14452 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14454 Index: libgfortran/generated/maxloc0_16_i8.c
14455 ===================================================================
14456 --- libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
14457 +++ libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
14459 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14460 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14461 retarray->offset = 0;
14462 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14463 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14467 @@ -199,7 +199,7 @@
14468 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14469 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14470 retarray->offset = 0;
14471 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14472 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14476 @@ -367,7 +367,7 @@
14477 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14478 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14479 retarray->offset = 0;
14480 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14481 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14483 else if (unlikely (compile_options.bounds_check))
14485 Index: libgfortran/generated/maxval_r16.c
14486 ===================================================================
14487 --- libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14488 +++ libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14490 retarray->offset = 0;
14491 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14493 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14494 - * extent[rank-1];
14495 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14497 - retarray->base_addr = xmalloc (alloc_size);
14498 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14499 if (alloc_size == 0)
14501 /* Make sure we have a zero-sized array. */
14502 @@ -286,8 +285,7 @@
14506 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14507 - * extent[rank-1];
14508 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14510 retarray->offset = 0;
14511 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14512 @@ -299,7 +297,7 @@
14516 - retarray->base_addr = xmalloc (alloc_size);
14517 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14521 @@ -472,8 +470,7 @@
14522 retarray->offset = 0;
14523 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14525 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14526 - * extent[rank-1];
14527 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14529 if (alloc_size == 0)
14531 @@ -482,7 +479,7 @@
14535 - retarray->base_addr = xmalloc (alloc_size);
14536 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14540 Index: libgfortran/generated/product_c10.c
14541 ===================================================================
14542 --- libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
14543 +++ libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
14545 retarray->offset = 0;
14546 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14548 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14549 - * extent[rank-1];
14550 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14552 - retarray->base_addr = xmalloc (alloc_size);
14553 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
14554 if (alloc_size == 0)
14556 /* Make sure we have a zero-sized array. */
14557 @@ -272,8 +271,7 @@
14561 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14562 - * extent[rank-1];
14563 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14565 retarray->offset = 0;
14566 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14567 @@ -285,7 +283,7 @@
14571 - retarray->base_addr = xmalloc (alloc_size);
14572 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
14576 @@ -430,8 +428,7 @@
14577 retarray->offset = 0;
14578 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14580 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14581 - * extent[rank-1];
14582 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14584 if (alloc_size == 0)
14586 @@ -440,7 +437,7 @@
14590 - retarray->base_addr = xmalloc (alloc_size);
14591 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
14595 Index: libgfortran/generated/minloc1_8_i4.c
14596 ===================================================================
14597 --- libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14598 +++ libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
14600 retarray->offset = 0;
14601 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14603 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14604 - * extent[rank-1];
14605 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14607 - retarray->base_addr = xmalloc (alloc_size);
14608 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14609 if (alloc_size == 0)
14611 /* Make sure we have a zero-sized array. */
14612 @@ -294,8 +293,7 @@
14616 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14617 - * extent[rank-1];
14618 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14620 retarray->offset = 0;
14621 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14622 @@ -307,7 +305,7 @@
14626 - retarray->base_addr = xmalloc (alloc_size);
14627 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14631 @@ -485,8 +483,7 @@
14632 retarray->offset = 0;
14633 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14635 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14636 - * extent[rank-1];
14637 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14639 if (alloc_size == 0)
14641 @@ -495,7 +492,7 @@
14645 - retarray->base_addr = xmalloc (alloc_size);
14646 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14650 Index: libgfortran/generated/minloc0_16_i16.c
14651 ===================================================================
14652 --- libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14653 +++ libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
14655 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14656 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14657 retarray->offset = 0;
14658 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14659 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14663 @@ -199,7 +199,7 @@
14664 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14665 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14666 retarray->offset = 0;
14667 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14668 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14672 @@ -367,7 +367,7 @@
14673 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14674 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14675 retarray->offset = 0;
14676 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14677 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14679 else if (unlikely (compile_options.bounds_check))
14681 Index: libgfortran/generated/matmul_r16.c
14682 ===================================================================
14683 --- libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14684 +++ libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
14685 @@ -124,7 +124,7 @@
14688 retarray->base_addr
14689 - = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
14690 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
14691 retarray->offset = 0;
14693 else if (unlikely (compile_options.bounds_check))
14694 Index: libgfortran/generated/minloc0_4_r4.c
14695 ===================================================================
14696 --- libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14697 +++ libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
14699 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14700 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14701 retarray->offset = 0;
14702 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14703 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14707 @@ -199,7 +199,7 @@
14708 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14709 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14710 retarray->offset = 0;
14711 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14712 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14716 @@ -367,7 +367,7 @@
14717 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14718 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14719 retarray->offset = 0;
14720 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14721 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14723 else if (unlikely (compile_options.bounds_check))
14725 Index: libgfortran/generated/iany_i2.c
14726 ===================================================================
14727 --- libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
14728 +++ libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
14730 retarray->offset = 0;
14731 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14733 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14734 - * extent[rank-1];
14735 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14737 - retarray->base_addr = xmalloc (alloc_size);
14738 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14739 if (alloc_size == 0)
14741 /* Make sure we have a zero-sized array. */
14742 @@ -272,8 +271,7 @@
14746 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14747 - * extent[rank-1];
14748 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14750 retarray->offset = 0;
14751 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14752 @@ -285,7 +283,7 @@
14756 - retarray->base_addr = xmalloc (alloc_size);
14757 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14761 @@ -430,8 +428,7 @@
14762 retarray->offset = 0;
14763 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14765 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14766 - * extent[rank-1];
14767 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14769 if (alloc_size == 0)
14771 @@ -440,7 +437,7 @@
14775 - retarray->base_addr = xmalloc (alloc_size);
14776 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14780 Index: libgfortran/generated/sum_r4.c
14781 ===================================================================
14782 --- libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14783 +++ libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
14785 retarray->offset = 0;
14786 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14788 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14789 - * extent[rank-1];
14790 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14792 - retarray->base_addr = xmalloc (alloc_size);
14793 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14794 if (alloc_size == 0)
14796 /* Make sure we have a zero-sized array. */
14797 @@ -272,8 +271,7 @@
14801 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14802 - * extent[rank-1];
14803 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14805 retarray->offset = 0;
14806 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14807 @@ -285,7 +283,7 @@
14811 - retarray->base_addr = xmalloc (alloc_size);
14812 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14816 @@ -430,8 +428,7 @@
14817 retarray->offset = 0;
14818 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14820 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14821 - * extent[rank-1];
14822 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14824 if (alloc_size == 0)
14826 @@ -440,7 +437,7 @@
14830 - retarray->base_addr = xmalloc (alloc_size);
14831 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14835 Index: libgfortran/generated/unpack_c8.c
14836 ===================================================================
14837 --- libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
14838 +++ libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
14843 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
14844 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
14848 @@ -244,7 +244,7 @@
14852 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
14853 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
14857 Index: libgfortran/generated/in_pack_c16.c
14858 ===================================================================
14859 --- libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
14860 +++ libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
14862 return source->base_addr;
14864 /* Allocate storage for the destination. */
14865 - destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
14866 + destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
14868 src = source->base_addr;
14869 stride0 = stride[0];
14870 Index: libgfortran/generated/minloc0_4_i2.c
14871 ===================================================================
14872 --- libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
14873 +++ libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
14875 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14876 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14877 retarray->offset = 0;
14878 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14879 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14883 @@ -199,7 +199,7 @@
14884 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14885 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14886 retarray->offset = 0;
14887 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14888 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14892 @@ -367,7 +367,7 @@
14893 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14894 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14895 retarray->offset = 0;
14896 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14897 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14899 else if (unlikely (compile_options.bounds_check))
14901 Index: libgfortran/generated/spread_c10.c
14902 ===================================================================
14903 --- libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
14904 +++ libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
14905 @@ -101,8 +101,8 @@
14909 - /* xmalloc allocates a single byte for zero size. */
14910 - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
14911 + /* xmallocarray allocates a single byte for zero size. */
14912 + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
14916 @@ -244,7 +244,7 @@
14918 if (ret->base_addr == NULL)
14920 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
14921 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
14923 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14925 Index: libgfortran/generated/maxloc0_8_i1.c
14926 ===================================================================
14927 --- libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
14928 +++ libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
14930 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14931 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14932 retarray->offset = 0;
14933 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14934 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14938 @@ -199,7 +199,7 @@
14939 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14940 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14941 retarray->offset = 0;
14942 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14943 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14947 @@ -367,7 +367,7 @@
14948 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14949 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14950 retarray->offset = 0;
14951 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14952 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14954 else if (unlikely (compile_options.bounds_check))
14956 Index: libgfortran/generated/spread_r4.c
14957 ===================================================================
14958 --- libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
14959 +++ libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
14960 @@ -101,8 +101,8 @@
14964 - /* xmalloc allocates a single byte for zero size. */
14965 - ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
14966 + /* xmallocarray allocates a single byte for zero size. */
14967 + ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
14971 @@ -244,7 +244,7 @@
14973 if (ret->base_addr == NULL)
14975 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
14976 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
14978 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14980 Index: libgfortran/generated/minloc0_8_i8.c
14981 ===================================================================
14982 --- libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
14983 +++ libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
14985 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14986 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14987 retarray->offset = 0;
14988 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14989 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14993 @@ -199,7 +199,7 @@
14994 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14995 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14996 retarray->offset = 0;
14997 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14998 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15002 @@ -367,7 +367,7 @@
15003 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15004 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15005 retarray->offset = 0;
15006 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15007 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15009 else if (unlikely (compile_options.bounds_check))
15011 Index: libgfortran/generated/matmul_c8.c
15012 ===================================================================
15013 --- libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
15014 +++ libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
15015 @@ -124,7 +124,7 @@
15018 retarray->base_addr
15019 - = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
15020 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
15021 retarray->offset = 0;
15023 else if (unlikely (compile_options.bounds_check))
15024 Index: libgfortran/generated/minloc1_16_r10.c
15025 ===================================================================
15026 --- libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
15027 +++ libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
15029 retarray->offset = 0;
15030 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15032 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15033 - * extent[rank-1];
15034 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15036 - retarray->base_addr = xmalloc (alloc_size);
15037 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15038 if (alloc_size == 0)
15040 /* Make sure we have a zero-sized array. */
15041 @@ -294,8 +293,7 @@
15045 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15046 - * extent[rank-1];
15047 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15049 retarray->offset = 0;
15050 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15051 @@ -307,7 +305,7 @@
15055 - retarray->base_addr = xmalloc (alloc_size);
15056 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15060 @@ -485,8 +483,7 @@
15061 retarray->offset = 0;
15062 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15064 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15065 - * extent[rank-1];
15066 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15068 if (alloc_size == 0)
15070 @@ -495,7 +492,7 @@
15074 - retarray->base_addr = xmalloc (alloc_size);
15075 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15079 Index: libgfortran/generated/sum_i2.c
15080 ===================================================================
15081 --- libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
15082 +++ libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
15084 retarray->offset = 0;
15085 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15087 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15088 - * extent[rank-1];
15089 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15091 - retarray->base_addr = xmalloc (alloc_size);
15092 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15093 if (alloc_size == 0)
15095 /* Make sure we have a zero-sized array. */
15096 @@ -272,8 +271,7 @@
15100 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15101 - * extent[rank-1];
15102 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15104 retarray->offset = 0;
15105 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15106 @@ -285,7 +283,7 @@
15110 - retarray->base_addr = xmalloc (alloc_size);
15111 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15115 @@ -430,8 +428,7 @@
15116 retarray->offset = 0;
15117 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15119 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15120 - * extent[rank-1];
15121 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15123 if (alloc_size == 0)
15125 @@ -440,7 +437,7 @@
15129 - retarray->base_addr = xmalloc (alloc_size);
15130 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15134 Index: libgfortran/generated/iparity_i16.c
15135 ===================================================================
15136 --- libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15137 +++ libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
15139 retarray->offset = 0;
15140 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15142 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15143 - * extent[rank-1];
15144 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15146 - retarray->base_addr = xmalloc (alloc_size);
15147 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15148 if (alloc_size == 0)
15150 /* Make sure we have a zero-sized array. */
15151 @@ -272,8 +271,7 @@
15155 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15156 - * extent[rank-1];
15157 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15159 retarray->offset = 0;
15160 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15161 @@ -285,7 +283,7 @@
15165 - retarray->base_addr = xmalloc (alloc_size);
15166 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15170 @@ -430,8 +428,7 @@
15171 retarray->offset = 0;
15172 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15174 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15175 - * extent[rank-1];
15176 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15178 if (alloc_size == 0)
15180 @@ -440,7 +437,7 @@
15184 - retarray->base_addr = xmalloc (alloc_size);
15185 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15189 Index: libgfortran/generated/minloc0_16_i1.c
15190 ===================================================================
15191 --- libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
15192 +++ libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
15194 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15195 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15196 retarray->offset = 0;
15197 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15198 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15202 @@ -199,7 +199,7 @@
15203 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15204 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15205 retarray->offset = 0;
15206 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15207 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15211 @@ -367,7 +367,7 @@
15212 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15213 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15214 retarray->offset = 0;
15215 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15216 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15218 else if (unlikely (compile_options.bounds_check))
15220 Index: libgfortran/generated/reshape_c16.c
15221 ===================================================================
15222 --- libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15223 +++ libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
15224 @@ -111,11 +111,11 @@
15227 if (unlikely (rs < 1))
15231 - alloc_size = rs * sizeof (GFC_COMPLEX_16);
15234 - ret->base_addr = xmalloc (alloc_size);
15235 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
15236 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15239 Index: libgfortran/generated/pack_c4.c
15240 ===================================================================
15241 --- libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15242 +++ libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
15243 @@ -167,8 +167,8 @@
15247 - /* xmalloc allocates a single byte for zero size. */
15248 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
15249 + /* xmallocarray allocates a single byte for zero size. */
15250 + ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
15254 Index: libgfortran/generated/parity_l4.c
15255 ===================================================================
15256 --- libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15257 +++ libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
15259 retarray->offset = 0;
15260 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15262 - alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15263 - * extent[rank-1];
15264 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15266 - retarray->base_addr = xmalloc (alloc_size);
15267 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
15268 if (alloc_size == 0)
15270 /* Make sure we have a zero-sized array. */
15271 Index: libgfortran/generated/spread_i2.c
15272 ===================================================================
15273 --- libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
15274 +++ libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
15275 @@ -101,8 +101,8 @@
15279 - /* xmalloc allocates a single byte for zero size. */
15280 - ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
15281 + /* xmallocarray allocates a single byte for zero size. */
15282 + ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
15286 @@ -244,7 +244,7 @@
15288 if (ret->base_addr == NULL)
15290 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
15291 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
15293 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15295 Index: libgfortran/generated/any_l4.c
15296 ===================================================================
15297 --- libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15298 +++ libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
15299 @@ -101,8 +101,7 @@
15300 retarray->offset = 0;
15301 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15303 - alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15304 - * extent[rank-1];
15305 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15307 if (alloc_size == 0)
15309 @@ -111,7 +110,7 @@
15313 - retarray->base_addr = xmalloc (alloc_size);
15314 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
15318 Index: libgfortran/generated/maxloc1_4_i8.c
15319 ===================================================================
15320 --- libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
15321 +++ libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
15323 retarray->offset = 0;
15324 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15326 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15327 - * extent[rank-1];
15328 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15330 - retarray->base_addr = xmalloc (alloc_size);
15331 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15332 if (alloc_size == 0)
15334 /* Make sure we have a zero-sized array. */
15335 @@ -294,8 +293,7 @@
15339 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15340 - * extent[rank-1];
15341 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15343 retarray->offset = 0;
15344 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15345 @@ -307,7 +305,7 @@
15349 - retarray->base_addr = xmalloc (alloc_size);
15350 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15354 @@ -485,8 +483,7 @@
15355 retarray->offset = 0;
15356 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15358 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15359 - * extent[rank-1];
15360 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15362 if (alloc_size == 0)
15364 @@ -495,7 +492,7 @@
15368 - retarray->base_addr = xmalloc (alloc_size);
15369 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15373 Index: libgfortran/generated/maxloc0_8_r4.c
15374 ===================================================================
15375 --- libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15376 +++ libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
15378 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15379 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15380 retarray->offset = 0;
15381 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15382 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15386 @@ -199,7 +199,7 @@
15387 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15388 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15389 retarray->offset = 0;
15390 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15391 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15395 @@ -367,7 +367,7 @@
15396 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15397 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15398 retarray->offset = 0;
15399 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15400 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15402 else if (unlikely (compile_options.bounds_check))
15404 Index: libgfortran/generated/maxloc1_4_i16.c
15405 ===================================================================
15406 --- libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15407 +++ libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
15409 retarray->offset = 0;
15410 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15412 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15413 - * extent[rank-1];
15414 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15416 - retarray->base_addr = xmalloc (alloc_size);
15417 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15418 if (alloc_size == 0)
15420 /* Make sure we have a zero-sized array. */
15421 @@ -294,8 +293,7 @@
15425 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15426 - * extent[rank-1];
15427 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15429 retarray->offset = 0;
15430 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15431 @@ -307,7 +305,7 @@
15435 - retarray->base_addr = xmalloc (alloc_size);
15436 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15440 @@ -485,8 +483,7 @@
15441 retarray->offset = 0;
15442 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15444 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15445 - * extent[rank-1];
15446 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15448 if (alloc_size == 0)
15450 @@ -495,7 +492,7 @@
15454 - retarray->base_addr = xmalloc (alloc_size);
15455 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15459 Index: libgfortran/generated/minloc0_4_r10.c
15460 ===================================================================
15461 --- libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
15462 +++ libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
15464 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15465 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15466 retarray->offset = 0;
15467 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15468 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15472 @@ -199,7 +199,7 @@
15473 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15474 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15475 retarray->offset = 0;
15476 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15477 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15481 @@ -367,7 +367,7 @@
15482 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15483 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15484 retarray->offset = 0;
15485 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15486 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15488 else if (unlikely (compile_options.bounds_check))
15490 Index: libgfortran/generated/minloc0_8_i16.c
15491 ===================================================================
15492 --- libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15493 +++ libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
15495 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15496 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15497 retarray->offset = 0;
15498 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15499 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15503 @@ -199,7 +199,7 @@
15504 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15505 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15506 retarray->offset = 0;
15507 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15508 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15512 @@ -367,7 +367,7 @@
15513 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15514 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15515 retarray->offset = 0;
15516 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15517 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15519 else if (unlikely (compile_options.bounds_check))
15521 Index: libgfortran/generated/minloc1_8_r10.c
15522 ===================================================================
15523 --- libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
15524 +++ libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
15526 retarray->offset = 0;
15527 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15529 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15530 - * extent[rank-1];
15531 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15533 - retarray->base_addr = xmalloc (alloc_size);
15534 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15535 if (alloc_size == 0)
15537 /* Make sure we have a zero-sized array. */
15538 @@ -294,8 +293,7 @@
15542 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15543 - * extent[rank-1];
15544 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15546 retarray->offset = 0;
15547 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15548 @@ -307,7 +305,7 @@
15552 - retarray->base_addr = xmalloc (alloc_size);
15553 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15557 @@ -485,8 +483,7 @@
15558 retarray->offset = 0;
15559 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15561 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15562 - * extent[rank-1];
15563 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15565 if (alloc_size == 0)
15567 @@ -495,7 +492,7 @@
15571 - retarray->base_addr = xmalloc (alloc_size);
15572 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15576 Index: libgfortran/generated/minloc0_16_r4.c
15577 ===================================================================
15578 --- libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15579 +++ libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
15581 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15582 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15583 retarray->offset = 0;
15584 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15585 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15589 @@ -199,7 +199,7 @@
15590 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15591 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15592 retarray->offset = 0;
15593 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15594 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15598 @@ -367,7 +367,7 @@
15599 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15600 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15601 retarray->offset = 0;
15602 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15603 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15605 else if (unlikely (compile_options.bounds_check))
15607 Index: libgfortran/generated/product_i4.c
15608 ===================================================================
15609 --- libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15610 +++ libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
15612 retarray->offset = 0;
15613 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15615 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15616 - * extent[rank-1];
15617 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15619 - retarray->base_addr = xmalloc (alloc_size);
15620 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15621 if (alloc_size == 0)
15623 /* Make sure we have a zero-sized array. */
15624 @@ -272,8 +271,7 @@
15628 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15629 - * extent[rank-1];
15630 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15632 retarray->offset = 0;
15633 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15634 @@ -285,7 +283,7 @@
15638 - retarray->base_addr = xmalloc (alloc_size);
15639 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15643 @@ -430,8 +428,7 @@
15644 retarray->offset = 0;
15645 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15647 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15648 - * extent[rank-1];
15649 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15651 if (alloc_size == 0)
15653 @@ -440,7 +437,7 @@
15657 - retarray->base_addr = xmalloc (alloc_size);
15658 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15662 Index: libgfortran/generated/sum_c16.c
15663 ===================================================================
15664 --- libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15665 +++ libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
15667 retarray->offset = 0;
15668 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15670 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15671 - * extent[rank-1];
15672 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15674 - retarray->base_addr = xmalloc (alloc_size);
15675 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
15676 if (alloc_size == 0)
15678 /* Make sure we have a zero-sized array. */
15679 @@ -272,8 +271,7 @@
15683 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15684 - * extent[rank-1];
15685 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15687 retarray->offset = 0;
15688 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15689 @@ -285,7 +283,7 @@
15693 - retarray->base_addr = xmalloc (alloc_size);
15694 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
15698 @@ -430,8 +428,7 @@
15699 retarray->offset = 0;
15700 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15702 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15703 - * extent[rank-1];
15704 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15706 if (alloc_size == 0)
15708 @@ -440,7 +437,7 @@
15712 - retarray->base_addr = xmalloc (alloc_size);
15713 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
15717 Index: libgfortran/generated/transpose_c10.c
15718 ===================================================================
15719 --- libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
15720 +++ libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
15722 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15723 GFC_DESCRIPTOR_EXTENT(source, 1));
15725 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
15726 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15727 + sizeof (GFC_COMPLEX_10));
15729 } else if (unlikely (compile_options.bounds_check))
15731 Index: libgfortran/generated/maxloc1_16_r8.c
15732 ===================================================================
15733 --- libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
15734 +++ libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
15736 retarray->offset = 0;
15737 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15739 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15740 - * extent[rank-1];
15741 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15743 - retarray->base_addr = xmalloc (alloc_size);
15744 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15745 if (alloc_size == 0)
15747 /* Make sure we have a zero-sized array. */
15748 @@ -294,8 +293,7 @@
15752 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15753 - * extent[rank-1];
15754 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15756 retarray->offset = 0;
15757 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15758 @@ -307,7 +305,7 @@
15762 - retarray->base_addr = xmalloc (alloc_size);
15763 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15767 @@ -485,8 +483,7 @@
15768 retarray->offset = 0;
15769 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15771 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15772 - * extent[rank-1];
15773 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15775 if (alloc_size == 0)
15777 @@ -495,7 +492,7 @@
15781 - retarray->base_addr = xmalloc (alloc_size);
15782 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15786 Index: libgfortran/generated/transpose_r4.c
15787 ===================================================================
15788 --- libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15789 +++ libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
15791 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15792 GFC_DESCRIPTOR_EXTENT(source, 1));
15794 - ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
15795 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15796 + sizeof (GFC_REAL_4));
15798 } else if (unlikely (compile_options.bounds_check))
15800 Index: libgfortran/generated/cshift1_4.c
15801 ===================================================================
15802 --- libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15803 +++ libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch) (revision 217117)
15808 - ret->base_addr = xmalloc (size * arraysize);
15809 + ret->base_addr = xmallocarray (arraysize, size);
15811 ret->dtype = array->dtype;
15812 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
15813 Index: libgfortran/generated/maxloc0_8_i2.c
15814 ===================================================================
15815 --- libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
15816 +++ libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
15818 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15819 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15820 retarray->offset = 0;
15821 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15822 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15826 @@ -199,7 +199,7 @@
15827 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15828 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15829 retarray->offset = 0;
15830 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15831 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15835 @@ -367,7 +367,7 @@
15836 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15837 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15838 retarray->offset = 0;
15839 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15840 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15842 else if (unlikely (compile_options.bounds_check))
15844 Index: libgfortran/generated/count_8_l.c
15845 ===================================================================
15846 --- libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
15847 +++ libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch) (revision 217117)
15848 @@ -101,8 +101,7 @@
15849 retarray->offset = 0;
15850 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15852 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15853 - * extent[rank-1];
15854 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15856 if (alloc_size == 0)
15858 @@ -111,7 +110,7 @@
15862 - retarray->base_addr = xmalloc (alloc_size);
15863 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15867 Index: libgfortran/generated/in_pack_i4.c
15868 ===================================================================
15869 --- libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
15870 +++ libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
15872 return source->base_addr;
15874 /* Allocate storage for the destination. */
15875 - destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
15876 + destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
15878 src = source->base_addr;
15879 stride0 = stride[0];
15880 Index: libgfortran/generated/minloc0_16_i2.c
15881 ===================================================================
15882 --- libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
15883 +++ libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
15885 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15886 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15887 retarray->offset = 0;
15888 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15889 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15893 @@ -199,7 +199,7 @@
15894 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15895 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15896 retarray->offset = 0;
15897 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15898 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15902 @@ -367,7 +367,7 @@
15903 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15904 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15905 retarray->offset = 0;
15906 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15907 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15909 else if (unlikely (compile_options.bounds_check))
15911 Index: libgfortran/generated/minloc1_8_r8.c
15912 ===================================================================
15913 --- libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
15914 +++ libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
15916 retarray->offset = 0;
15917 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15919 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15920 - * extent[rank-1];
15921 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15923 - retarray->base_addr = xmalloc (alloc_size);
15924 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15925 if (alloc_size == 0)
15927 /* Make sure we have a zero-sized array. */
15928 @@ -294,8 +293,7 @@
15932 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15933 - * extent[rank-1];
15934 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15936 retarray->offset = 0;
15937 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15938 @@ -307,7 +305,7 @@
15942 - retarray->base_addr = xmalloc (alloc_size);
15943 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15947 @@ -485,8 +483,7 @@
15948 retarray->offset = 0;
15949 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15951 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15952 - * extent[rank-1];
15953 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15955 if (alloc_size == 0)
15957 @@ -495,7 +492,7 @@
15961 - retarray->base_addr = xmalloc (alloc_size);
15962 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15966 Index: libgfortran/generated/matmul_c16.c
15967 ===================================================================
15968 --- libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
15969 +++ libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
15970 @@ -124,7 +124,7 @@
15973 retarray->base_addr
15974 - = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
15975 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
15976 retarray->offset = 0;
15978 else if (unlikely (compile_options.bounds_check))
15979 Index: libgfortran/generated/minval_i1.c
15980 ===================================================================
15981 --- libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
15982 +++ libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
15984 retarray->offset = 0;
15985 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15987 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15988 - * extent[rank-1];
15989 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15991 - retarray->base_addr = xmalloc (alloc_size);
15992 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15993 if (alloc_size == 0)
15995 /* Make sure we have a zero-sized array. */
15996 @@ -286,8 +285,7 @@
16000 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16001 - * extent[rank-1];
16002 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16004 retarray->offset = 0;
16005 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16006 @@ -299,7 +297,7 @@
16010 - retarray->base_addr = xmalloc (alloc_size);
16011 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16015 @@ -472,8 +470,7 @@
16016 retarray->offset = 0;
16017 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16019 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16020 - * extent[rank-1];
16021 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16023 if (alloc_size == 0)
16025 @@ -482,7 +479,7 @@
16029 - retarray->base_addr = xmalloc (alloc_size);
16030 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16034 Index: libgfortran/generated/shape_i16.c
16035 ===================================================================
16036 --- libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16037 +++ libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
16040 GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
16042 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16043 + ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16046 stride = GFC_DESCRIPTOR_STRIDE(ret,0);
16047 Index: libgfortran/generated/iany_i4.c
16048 ===================================================================
16049 --- libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16050 +++ libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
16052 retarray->offset = 0;
16053 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16055 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16056 - * extent[rank-1];
16057 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16059 - retarray->base_addr = xmalloc (alloc_size);
16060 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16061 if (alloc_size == 0)
16063 /* Make sure we have a zero-sized array. */
16064 @@ -272,8 +271,7 @@
16068 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16069 - * extent[rank-1];
16070 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16072 retarray->offset = 0;
16073 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16074 @@ -285,7 +283,7 @@
16078 - retarray->base_addr = xmalloc (alloc_size);
16079 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16083 @@ -430,8 +428,7 @@
16084 retarray->offset = 0;
16085 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16087 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16088 - * extent[rank-1];
16089 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16091 if (alloc_size == 0)
16093 @@ -440,7 +437,7 @@
16097 - retarray->base_addr = xmalloc (alloc_size);
16098 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16102 Index: libgfortran/generated/minloc0_16_r16.c
16103 ===================================================================
16104 --- libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16105 +++ libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
16107 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16108 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16109 retarray->offset = 0;
16110 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16111 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16115 @@ -199,7 +199,7 @@
16116 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16117 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16118 retarray->offset = 0;
16119 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16120 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16124 @@ -367,7 +367,7 @@
16125 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16126 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16127 retarray->offset = 0;
16128 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16129 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16131 else if (unlikely (compile_options.bounds_check))
16133 Index: libgfortran/generated/product_i16.c
16134 ===================================================================
16135 --- libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16136 +++ libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
16138 retarray->offset = 0;
16139 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16141 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16142 - * extent[rank-1];
16143 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16145 - retarray->base_addr = xmalloc (alloc_size);
16146 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16147 if (alloc_size == 0)
16149 /* Make sure we have a zero-sized array. */
16150 @@ -272,8 +271,7 @@
16154 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16155 - * extent[rank-1];
16156 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16158 retarray->offset = 0;
16159 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16160 @@ -285,7 +283,7 @@
16164 - retarray->base_addr = xmalloc (alloc_size);
16165 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16169 @@ -430,8 +428,7 @@
16170 retarray->offset = 0;
16171 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16173 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16174 - * extent[rank-1];
16175 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16177 if (alloc_size == 0)
16179 @@ -440,7 +437,7 @@
16183 - retarray->base_addr = xmalloc (alloc_size);
16184 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16188 Index: libgfortran/generated/unpack_i1.c
16189 ===================================================================
16190 --- libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
16191 +++ libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
16196 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
16197 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
16201 @@ -244,7 +244,7 @@
16205 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
16206 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
16210 Index: libgfortran/generated/minloc0_4_i4.c
16211 ===================================================================
16212 --- libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16213 +++ libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
16215 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16216 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16217 retarray->offset = 0;
16218 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16219 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16223 @@ -199,7 +199,7 @@
16224 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16225 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16226 retarray->offset = 0;
16227 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16228 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16232 @@ -367,7 +367,7 @@
16233 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16234 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16235 retarray->offset = 0;
16236 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16237 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16239 else if (unlikely (compile_options.bounds_check))
16241 Index: libgfortran/generated/matmul_i1.c
16242 ===================================================================
16243 --- libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
16244 +++ libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
16245 @@ -124,7 +124,7 @@
16248 retarray->base_addr
16249 - = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
16250 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
16251 retarray->offset = 0;
16253 else if (unlikely (compile_options.bounds_check))
16254 Index: libgfortran/generated/minval_r4.c
16255 ===================================================================
16256 --- libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16257 +++ libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
16259 retarray->offset = 0;
16260 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16262 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16263 - * extent[rank-1];
16264 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16266 - retarray->base_addr = xmalloc (alloc_size);
16267 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16268 if (alloc_size == 0)
16270 /* Make sure we have a zero-sized array. */
16271 @@ -286,8 +285,7 @@
16275 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16276 - * extent[rank-1];
16277 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16279 retarray->offset = 0;
16280 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16281 @@ -299,7 +297,7 @@
16285 - retarray->base_addr = xmalloc (alloc_size);
16286 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16290 @@ -472,8 +470,7 @@
16291 retarray->offset = 0;
16292 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16294 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16295 - * extent[rank-1];
16296 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16298 if (alloc_size == 0)
16300 @@ -482,7 +479,7 @@
16304 - retarray->base_addr = xmalloc (alloc_size);
16305 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16309 Index: libgfortran/generated/spread_i16.c
16310 ===================================================================
16311 --- libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16312 +++ libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
16313 @@ -101,8 +101,8 @@
16317 - /* xmalloc allocates a single byte for zero size. */
16318 - ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
16319 + /* xmallocarray allocates a single byte for zero size. */
16320 + ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
16324 @@ -244,7 +244,7 @@
16326 if (ret->base_addr == NULL)
16328 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
16329 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
16331 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16333 Index: libgfortran/generated/sum_i4.c
16334 ===================================================================
16335 --- libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16336 +++ libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
16338 retarray->offset = 0;
16339 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16341 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16342 - * extent[rank-1];
16343 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16345 - retarray->base_addr = xmalloc (alloc_size);
16346 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16347 if (alloc_size == 0)
16349 /* Make sure we have a zero-sized array. */
16350 @@ -272,8 +271,7 @@
16354 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16355 - * extent[rank-1];
16356 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16358 retarray->offset = 0;
16359 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16360 @@ -285,7 +283,7 @@
16364 - retarray->base_addr = xmalloc (alloc_size);
16365 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16369 @@ -430,8 +428,7 @@
16370 retarray->offset = 0;
16371 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16373 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16374 - * extent[rank-1];
16375 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16377 if (alloc_size == 0)
16379 @@ -440,7 +437,7 @@
16383 - retarray->base_addr = xmalloc (alloc_size);
16384 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16388 Index: libgfortran/generated/unpack_r10.c
16389 ===================================================================
16390 --- libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
16391 +++ libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
16396 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
16397 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
16401 @@ -244,7 +244,7 @@
16405 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
16406 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
16410 Index: libgfortran/generated/bessel_r16.c
16411 ===================================================================
16412 --- libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16413 +++ libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
16416 size_t size = n2 < n1 ? 0 : n2-n1+1;
16417 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16418 - ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
16419 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
16423 @@ -126,7 +126,7 @@
16425 size_t size = n2 < n1 ? 0 : n2-n1+1;
16426 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16427 - ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
16428 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
16432 @@ -166,7 +166,7 @@
16434 x2rev = GFC_REAL_16_LITERAL(2.)/x;
16436 - for (i = 2; i <= n1+n2; i++)
16437 + for (i = 2; i <= n2 - n1; i++)
16439 #if defined(GFC_REAL_16_INFINITY)
16440 if (unlikely (last2 == -GFC_REAL_16_INFINITY))
16441 Index: libgfortran/generated/norm2_r8.c
16442 ===================================================================
16443 --- libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16444 +++ libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
16445 @@ -101,10 +101,9 @@
16446 retarray->offset = 0;
16447 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16449 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16450 - * extent[rank-1];
16451 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16453 - retarray->base_addr = xmalloc (alloc_size);
16454 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
16455 if (alloc_size == 0)
16457 /* Make sure we have a zero-sized array. */
16458 Index: libgfortran/generated/spread_i4.c
16459 ===================================================================
16460 --- libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16461 +++ libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
16462 @@ -101,8 +101,8 @@
16466 - /* xmalloc allocates a single byte for zero size. */
16467 - ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
16468 + /* xmallocarray allocates a single byte for zero size. */
16469 + ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
16473 @@ -244,7 +244,7 @@
16475 if (ret->base_addr == NULL)
16477 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
16478 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
16480 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16482 Index: libgfortran/generated/eoshift3_8.c
16483 ===================================================================
16484 --- libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16485 +++ libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch) (revision 217117)
16490 - ret->base_addr = xmalloc (size * arraysize);
16491 + ret->base_addr = xmallocarray (arraysize, size);
16493 ret->dtype = array->dtype;
16494 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16495 @@ -107,8 +107,8 @@
16496 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16499 - /* xmalloc allocates a single byte for zero size. */
16500 - ret->base_addr = xmalloc (size * arraysize);
16501 + /* xmallocarray allocates a single byte for zero size. */
16502 + ret->base_addr = xmallocarray (arraysize, size);
16505 else if (unlikely (compile_options.bounds_check))
16506 Index: libgfortran/generated/minloc1_4_i1.c
16507 ===================================================================
16508 --- libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
16509 +++ libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
16511 retarray->offset = 0;
16512 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16514 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16515 - * extent[rank-1];
16516 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16518 - retarray->base_addr = xmalloc (alloc_size);
16519 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16520 if (alloc_size == 0)
16522 /* Make sure we have a zero-sized array. */
16523 @@ -294,8 +293,7 @@
16527 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16528 - * extent[rank-1];
16529 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16531 retarray->offset = 0;
16532 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16533 @@ -307,7 +305,7 @@
16537 - retarray->base_addr = xmalloc (alloc_size);
16538 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16542 @@ -485,8 +483,7 @@
16543 retarray->offset = 0;
16544 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16546 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16547 - * extent[rank-1];
16548 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16550 if (alloc_size == 0)
16552 @@ -495,7 +492,7 @@
16556 - retarray->base_addr = xmalloc (alloc_size);
16557 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16561 Index: libgfortran/generated/minval_i2.c
16562 ===================================================================
16563 --- libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
16564 +++ libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
16566 retarray->offset = 0;
16567 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16569 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16570 - * extent[rank-1];
16571 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16573 - retarray->base_addr = xmalloc (alloc_size);
16574 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16575 if (alloc_size == 0)
16577 /* Make sure we have a zero-sized array. */
16578 @@ -286,8 +285,7 @@
16582 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16583 - * extent[rank-1];
16584 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16586 retarray->offset = 0;
16587 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16588 @@ -299,7 +297,7 @@
16592 - retarray->base_addr = xmalloc (alloc_size);
16593 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16597 @@ -472,8 +470,7 @@
16598 retarray->offset = 0;
16599 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16601 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16602 - * extent[rank-1];
16603 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16605 if (alloc_size == 0)
16607 @@ -482,7 +479,7 @@
16611 - retarray->base_addr = xmalloc (alloc_size);
16612 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16616 Index: libgfortran/generated/bessel_r8.c
16617 ===================================================================
16618 --- libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16619 +++ libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
16622 size_t size = n2 < n1 ? 0 : n2-n1+1;
16623 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16624 - ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
16625 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
16629 @@ -122,7 +122,7 @@
16631 size_t size = n2 < n1 ? 0 : n2-n1+1;
16632 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16633 - ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
16634 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
16638 @@ -162,7 +162,7 @@
16640 x2rev = GFC_REAL_8_LITERAL(2.)/x;
16642 - for (i = 2; i <= n1+n2; i++)
16643 + for (i = 2; i <= n2 - n1; i++)
16645 #if defined(GFC_REAL_8_INFINITY)
16646 if (unlikely (last2 == -GFC_REAL_8_INFINITY))
16647 Index: libgfortran/generated/unpack_r4.c
16648 ===================================================================
16649 --- libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16650 +++ libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
16655 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
16656 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
16660 @@ -244,7 +244,7 @@
16664 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
16665 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
16669 Index: libgfortran/generated/product_r8.c
16670 ===================================================================
16671 --- libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16672 +++ libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
16674 retarray->offset = 0;
16675 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16677 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16678 - * extent[rank-1];
16679 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16681 - retarray->base_addr = xmalloc (alloc_size);
16682 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
16683 if (alloc_size == 0)
16685 /* Make sure we have a zero-sized array. */
16686 @@ -272,8 +271,7 @@
16690 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16691 - * extent[rank-1];
16692 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16694 retarray->offset = 0;
16695 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16696 @@ -285,7 +283,7 @@
16700 - retarray->base_addr = xmalloc (alloc_size);
16701 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
16705 @@ -430,8 +428,7 @@
16706 retarray->offset = 0;
16707 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16709 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16710 - * extent[rank-1];
16711 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16713 if (alloc_size == 0)
16715 @@ -440,7 +437,7 @@
16719 - retarray->base_addr = xmalloc (alloc_size);
16720 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
16724 Index: libgfortran/generated/matmul_r4.c
16725 ===================================================================
16726 --- libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16727 +++ libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
16728 @@ -124,7 +124,7 @@
16731 retarray->base_addr
16732 - = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
16733 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
16734 retarray->offset = 0;
16736 else if (unlikely (compile_options.bounds_check))
16737 Index: libgfortran/generated/unpack_i2.c
16738 ===================================================================
16739 --- libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
16740 +++ libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
16745 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
16746 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
16750 @@ -244,7 +244,7 @@
16754 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
16755 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
16759 Index: libgfortran/generated/in_pack_r8.c
16760 ===================================================================
16761 --- libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16762 +++ libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
16764 return source->base_addr;
16766 /* Allocate storage for the destination. */
16767 - destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
16768 + destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
16770 src = source->base_addr;
16771 stride0 = stride[0];
16772 Index: libgfortran/generated/maxloc1_4_r16.c
16773 ===================================================================
16774 --- libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16775 +++ libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
16777 retarray->offset = 0;
16778 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16780 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16781 - * extent[rank-1];
16782 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16784 - retarray->base_addr = xmalloc (alloc_size);
16785 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16786 if (alloc_size == 0)
16788 /* Make sure we have a zero-sized array. */
16789 @@ -294,8 +293,7 @@
16793 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16794 - * extent[rank-1];
16795 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16797 retarray->offset = 0;
16798 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16799 @@ -307,7 +305,7 @@
16803 - retarray->base_addr = xmalloc (alloc_size);
16804 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16808 @@ -485,8 +483,7 @@
16809 retarray->offset = 0;
16810 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16812 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16813 - * extent[rank-1];
16814 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16816 if (alloc_size == 0)
16818 @@ -495,7 +492,7 @@
16822 - retarray->base_addr = xmalloc (alloc_size);
16823 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16827 Index: libgfortran/generated/minloc0_8_r16.c
16828 ===================================================================
16829 --- libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
16830 +++ libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
16832 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16833 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16834 retarray->offset = 0;
16835 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16836 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16840 @@ -199,7 +199,7 @@
16841 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16842 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16843 retarray->offset = 0;
16844 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16845 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16849 @@ -367,7 +367,7 @@
16850 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16851 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16852 retarray->offset = 0;
16853 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16854 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16856 else if (unlikely (compile_options.bounds_check))
16858 Index: libgfortran/generated/reshape_c8.c
16859 ===================================================================
16860 --- libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16861 +++ libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
16862 @@ -111,11 +111,11 @@
16865 if (unlikely (rs < 1))
16869 - alloc_size = rs * sizeof (GFC_COMPLEX_8);
16872 - ret->base_addr = xmalloc (alloc_size);
16873 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
16874 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16877 Index: libgfortran/generated/iparity_i8.c
16878 ===================================================================
16879 --- libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
16880 +++ libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
16882 retarray->offset = 0;
16883 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16885 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16886 - * extent[rank-1];
16887 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16889 - retarray->base_addr = xmalloc (alloc_size);
16890 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16891 if (alloc_size == 0)
16893 /* Make sure we have a zero-sized array. */
16894 @@ -272,8 +271,7 @@
16898 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16899 - * extent[rank-1];
16900 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16902 retarray->offset = 0;
16903 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16904 @@ -285,7 +283,7 @@
16908 - retarray->base_addr = xmalloc (alloc_size);
16909 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16913 @@ -430,8 +428,7 @@
16914 retarray->offset = 0;
16915 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16917 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16918 - * extent[rank-1];
16919 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16921 if (alloc_size == 0)
16923 @@ -440,7 +437,7 @@
16927 - retarray->base_addr = xmalloc (alloc_size);
16928 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16932 Index: libgfortran/generated/count_1_l.c
16933 ===================================================================
16934 --- libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
16935 +++ libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch) (revision 217117)
16936 @@ -101,8 +101,7 @@
16937 retarray->offset = 0;
16938 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16940 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16941 - * extent[rank-1];
16942 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16944 if (alloc_size == 0)
16946 @@ -111,7 +110,7 @@
16950 - retarray->base_addr = xmalloc (alloc_size);
16951 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16955 Index: libgfortran/generated/maxloc0_8_i4.c
16956 ===================================================================
16957 --- libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
16958 +++ libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
16960 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16961 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16962 retarray->offset = 0;
16963 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16964 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16968 @@ -199,7 +199,7 @@
16969 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16970 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16971 retarray->offset = 0;
16972 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16973 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16977 @@ -367,7 +367,7 @@
16978 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16979 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16980 retarray->offset = 0;
16981 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16982 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16984 else if (unlikely (compile_options.bounds_check))
16986 Index: libgfortran/generated/matmul_i2.c
16987 ===================================================================
16988 --- libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
16989 +++ libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
16990 @@ -124,7 +124,7 @@
16993 retarray->base_addr
16994 - = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
16995 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
16996 retarray->offset = 0;
16998 else if (unlikely (compile_options.bounds_check))
16999 Index: libgfortran/generated/minloc1_4_r4.c
17000 ===================================================================
17001 --- libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
17002 +++ libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
17004 retarray->offset = 0;
17005 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17007 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17008 - * extent[rank-1];
17009 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17011 - retarray->base_addr = xmalloc (alloc_size);
17012 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17013 if (alloc_size == 0)
17015 /* Make sure we have a zero-sized array. */
17016 @@ -294,8 +293,7 @@
17020 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17021 - * extent[rank-1];
17022 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17024 retarray->offset = 0;
17025 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17026 @@ -307,7 +305,7 @@
17030 - retarray->base_addr = xmalloc (alloc_size);
17031 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17035 @@ -485,8 +483,7 @@
17036 retarray->offset = 0;
17037 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17039 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17040 - * extent[rank-1];
17041 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17043 if (alloc_size == 0)
17045 @@ -495,7 +492,7 @@
17049 - retarray->base_addr = xmalloc (alloc_size);
17050 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17054 Index: libgfortran/generated/transpose_i16.c
17055 ===================================================================
17056 --- libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17057 +++ libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
17059 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17060 GFC_DESCRIPTOR_EXTENT(source, 1));
17062 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
17063 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17064 + sizeof (GFC_INTEGER_16));
17066 } else if (unlikely (compile_options.bounds_check))
17068 Index: libgfortran/generated/minloc0_16_i4.c
17069 ===================================================================
17070 --- libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
17071 +++ libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
17073 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17074 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17075 retarray->offset = 0;
17076 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17077 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17081 @@ -199,7 +199,7 @@
17082 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17083 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17084 retarray->offset = 0;
17085 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17086 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17090 @@ -367,7 +367,7 @@
17091 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17092 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17093 retarray->offset = 0;
17094 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17095 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17097 else if (unlikely (compile_options.bounds_check))
17099 Index: libgfortran/generated/transpose_i4.c
17100 ===================================================================
17101 --- libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
17102 +++ libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
17104 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17105 GFC_DESCRIPTOR_EXTENT(source, 1));
17107 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
17108 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17109 + sizeof (GFC_INTEGER_4));
17111 } else if (unlikely (compile_options.bounds_check))
17113 Index: libgfortran/generated/maxloc1_16_i8.c
17114 ===================================================================
17115 --- libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17116 +++ libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
17118 retarray->offset = 0;
17119 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17121 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17122 - * extent[rank-1];
17123 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17125 - retarray->base_addr = xmalloc (alloc_size);
17126 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17127 if (alloc_size == 0)
17129 /* Make sure we have a zero-sized array. */
17130 @@ -294,8 +293,7 @@
17134 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17135 - * extent[rank-1];
17136 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17138 retarray->offset = 0;
17139 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17140 @@ -307,7 +305,7 @@
17144 - retarray->base_addr = xmalloc (alloc_size);
17145 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17149 @@ -485,8 +483,7 @@
17150 retarray->offset = 0;
17151 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17153 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17154 - * extent[rank-1];
17155 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17157 if (alloc_size == 0)
17159 @@ -495,7 +492,7 @@
17163 - retarray->base_addr = xmalloc (alloc_size);
17164 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17168 Index: libgfortran/generated/minloc1_4_i2.c
17169 ===================================================================
17170 --- libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
17171 +++ libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
17173 retarray->offset = 0;
17174 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17176 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17177 - * extent[rank-1];
17178 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17180 - retarray->base_addr = xmalloc (alloc_size);
17181 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17182 if (alloc_size == 0)
17184 /* Make sure we have a zero-sized array. */
17185 @@ -294,8 +293,7 @@
17189 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17190 - * extent[rank-1];
17191 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17193 retarray->offset = 0;
17194 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17195 @@ -307,7 +305,7 @@
17199 - retarray->base_addr = xmalloc (alloc_size);
17200 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17204 @@ -485,8 +483,7 @@
17205 retarray->offset = 0;
17206 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17208 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17209 - * extent[rank-1];
17210 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17212 if (alloc_size == 0)
17214 @@ -495,7 +492,7 @@
17218 - retarray->base_addr = xmalloc (alloc_size);
17219 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17223 Index: libgfortran/generated/matmul_l16.c
17224 ===================================================================
17225 --- libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17226 +++ libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
17230 retarray->base_addr
17231 - = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
17232 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
17233 retarray->offset = 0;
17235 else if (unlikely (compile_options.bounds_check))
17236 Index: libgfortran/generated/maxloc1_8_i1.c
17237 ===================================================================
17238 --- libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
17239 +++ libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
17241 retarray->offset = 0;
17242 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17244 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17245 - * extent[rank-1];
17246 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17248 - retarray->base_addr = xmalloc (alloc_size);
17249 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17250 if (alloc_size == 0)
17252 /* Make sure we have a zero-sized array. */
17253 @@ -294,8 +293,7 @@
17257 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17258 - * extent[rank-1];
17259 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17261 retarray->offset = 0;
17262 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17263 @@ -307,7 +305,7 @@
17267 - retarray->base_addr = xmalloc (alloc_size);
17268 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17272 @@ -485,8 +483,7 @@
17273 retarray->offset = 0;
17274 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17276 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17277 - * extent[rank-1];
17278 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17280 if (alloc_size == 0)
17282 @@ -495,7 +492,7 @@
17286 - retarray->base_addr = xmalloc (alloc_size);
17287 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17291 Index: libgfortran/generated/minloc1_8_i8.c
17292 ===================================================================
17293 --- libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17294 +++ libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
17296 retarray->offset = 0;
17297 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17299 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17300 - * extent[rank-1];
17301 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17303 - retarray->base_addr = xmalloc (alloc_size);
17304 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17305 if (alloc_size == 0)
17307 /* Make sure we have a zero-sized array. */
17308 @@ -294,8 +293,7 @@
17312 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17313 - * extent[rank-1];
17314 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17316 retarray->offset = 0;
17317 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17318 @@ -307,7 +305,7 @@
17322 - retarray->base_addr = xmalloc (alloc_size);
17323 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17327 @@ -485,8 +483,7 @@
17328 retarray->offset = 0;
17329 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17331 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17332 - * extent[rank-1];
17333 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17335 if (alloc_size == 0)
17337 @@ -495,7 +492,7 @@
17341 - retarray->base_addr = xmalloc (alloc_size);
17342 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17346 Index: libgfortran/generated/minloc0_4_r8.c
17347 ===================================================================
17348 --- libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17349 +++ libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
17351 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17352 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17353 retarray->offset = 0;
17354 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17355 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17359 @@ -199,7 +199,7 @@
17360 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17361 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17362 retarray->offset = 0;
17363 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17364 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17368 @@ -367,7 +367,7 @@
17369 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17370 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17371 retarray->offset = 0;
17372 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17373 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17375 else if (unlikely (compile_options.bounds_check))
17377 Index: libgfortran/generated/product_r16.c
17378 ===================================================================
17379 --- libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17380 +++ libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
17382 retarray->offset = 0;
17383 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17385 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17386 - * extent[rank-1];
17387 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17389 - retarray->base_addr = xmalloc (alloc_size);
17390 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17391 if (alloc_size == 0)
17393 /* Make sure we have a zero-sized array. */
17394 @@ -272,8 +271,7 @@
17398 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17399 - * extent[rank-1];
17400 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17402 retarray->offset = 0;
17403 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17404 @@ -285,7 +283,7 @@
17408 - retarray->base_addr = xmalloc (alloc_size);
17409 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17413 @@ -430,8 +428,7 @@
17414 retarray->offset = 0;
17415 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17417 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17418 - * extent[rank-1];
17419 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17421 if (alloc_size == 0)
17423 @@ -440,7 +437,7 @@
17427 - retarray->base_addr = xmalloc (alloc_size);
17428 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17432 Index: libgfortran/generated/sum_r8.c
17433 ===================================================================
17434 --- libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17435 +++ libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
17437 retarray->offset = 0;
17438 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17440 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17441 - * extent[rank-1];
17442 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17444 - retarray->base_addr = xmalloc (alloc_size);
17445 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17446 if (alloc_size == 0)
17448 /* Make sure we have a zero-sized array. */
17449 @@ -272,8 +271,7 @@
17453 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17454 - * extent[rank-1];
17455 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17457 retarray->offset = 0;
17458 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17459 @@ -285,7 +283,7 @@
17463 - retarray->base_addr = xmalloc (alloc_size);
17464 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17468 @@ -430,8 +428,7 @@
17469 retarray->offset = 0;
17470 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17472 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17473 - * extent[rank-1];
17474 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17476 if (alloc_size == 0)
17478 @@ -440,7 +437,7 @@
17482 - retarray->base_addr = xmalloc (alloc_size);
17483 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17487 Index: libgfortran/generated/norm2_r10.c
17488 ===================================================================
17489 --- libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
17490 +++ libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
17491 @@ -101,10 +101,9 @@
17492 retarray->offset = 0;
17493 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17495 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17496 - * extent[rank-1];
17497 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17499 - retarray->base_addr = xmalloc (alloc_size);
17500 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
17501 if (alloc_size == 0)
17503 /* Make sure we have a zero-sized array. */
17504 Index: libgfortran/generated/unpack_c10.c
17505 ===================================================================
17506 --- libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
17507 +++ libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
17512 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
17513 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
17517 @@ -244,7 +244,7 @@
17521 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
17522 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
17526 Index: libgfortran/generated/spread_r8.c
17527 ===================================================================
17528 --- libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17529 +++ libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
17530 @@ -101,8 +101,8 @@
17534 - /* xmalloc allocates a single byte for zero size. */
17535 - ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
17536 + /* xmallocarray allocates a single byte for zero size. */
17537 + ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
17541 @@ -244,7 +244,7 @@
17543 if (ret->base_addr == NULL)
17545 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
17546 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
17548 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17550 Index: libgfortran/generated/minloc1_16_i16.c
17551 ===================================================================
17552 --- libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17553 +++ libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
17555 retarray->offset = 0;
17556 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17558 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17559 - * extent[rank-1];
17560 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17562 - retarray->base_addr = xmalloc (alloc_size);
17563 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17564 if (alloc_size == 0)
17566 /* Make sure we have a zero-sized array. */
17567 @@ -294,8 +293,7 @@
17571 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17572 - * extent[rank-1];
17573 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17575 retarray->offset = 0;
17576 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17577 @@ -307,7 +305,7 @@
17581 - retarray->base_addr = xmalloc (alloc_size);
17582 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17586 @@ -485,8 +483,7 @@
17587 retarray->offset = 0;
17588 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17590 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17591 - * extent[rank-1];
17592 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17594 if (alloc_size == 0)
17596 @@ -495,7 +492,7 @@
17600 - retarray->base_addr = xmalloc (alloc_size);
17601 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17605 Index: libgfortran/generated/maxloc1_8_r4.c
17606 ===================================================================
17607 --- libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
17608 +++ libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
17610 retarray->offset = 0;
17611 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17613 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17614 - * extent[rank-1];
17615 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17617 - retarray->base_addr = xmalloc (alloc_size);
17618 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17619 if (alloc_size == 0)
17621 /* Make sure we have a zero-sized array. */
17622 @@ -294,8 +293,7 @@
17626 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17627 - * extent[rank-1];
17628 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17630 retarray->offset = 0;
17631 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17632 @@ -307,7 +305,7 @@
17636 - retarray->base_addr = xmalloc (alloc_size);
17637 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17641 @@ -485,8 +483,7 @@
17642 retarray->offset = 0;
17643 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17645 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17646 - * extent[rank-1];
17647 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17649 if (alloc_size == 0)
17651 @@ -495,7 +492,7 @@
17655 - retarray->base_addr = xmalloc (alloc_size);
17656 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17660 Index: libgfortran/generated/minloc1_16_i1.c
17661 ===================================================================
17662 --- libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
17663 +++ libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
17665 retarray->offset = 0;
17666 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17668 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17669 - * extent[rank-1];
17670 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17672 - retarray->base_addr = xmalloc (alloc_size);
17673 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17674 if (alloc_size == 0)
17676 /* Make sure we have a zero-sized array. */
17677 @@ -294,8 +293,7 @@
17681 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17682 - * extent[rank-1];
17683 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17685 retarray->offset = 0;
17686 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17687 @@ -307,7 +305,7 @@
17691 - retarray->base_addr = xmalloc (alloc_size);
17692 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17696 @@ -485,8 +483,7 @@
17697 retarray->offset = 0;
17698 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17700 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17701 - * extent[rank-1];
17702 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17704 if (alloc_size == 0)
17706 @@ -495,7 +492,7 @@
17710 - retarray->base_addr = xmalloc (alloc_size);
17711 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17715 Index: libgfortran/generated/spread_r16.c
17716 ===================================================================
17717 --- libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17718 +++ libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
17719 @@ -101,8 +101,8 @@
17723 - /* xmalloc allocates a single byte for zero size. */
17724 - ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
17725 + /* xmallocarray allocates a single byte for zero size. */
17726 + ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
17730 @@ -244,7 +244,7 @@
17732 if (ret->base_addr == NULL)
17734 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
17735 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
17737 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17739 Index: libgfortran/generated/pack_c8.c
17740 ===================================================================
17741 --- libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17742 +++ libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
17743 @@ -167,8 +167,8 @@
17747 - /* xmalloc allocates a single byte for zero size. */
17748 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
17749 + /* xmallocarray allocates a single byte for zero size. */
17750 + ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
17754 Index: libgfortran/generated/minval_r10.c
17755 ===================================================================
17756 --- libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
17757 +++ libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
17759 retarray->offset = 0;
17760 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17762 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17763 - * extent[rank-1];
17764 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17766 - retarray->base_addr = xmalloc (alloc_size);
17767 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
17768 if (alloc_size == 0)
17770 /* Make sure we have a zero-sized array. */
17771 @@ -286,8 +285,7 @@
17775 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17776 - * extent[rank-1];
17777 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17779 retarray->offset = 0;
17780 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17781 @@ -299,7 +297,7 @@
17785 - retarray->base_addr = xmalloc (alloc_size);
17786 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
17790 @@ -472,8 +470,7 @@
17791 retarray->offset = 0;
17792 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17794 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17795 - * extent[rank-1];
17796 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17798 if (alloc_size == 0)
17800 @@ -482,7 +479,7 @@
17804 - retarray->base_addr = xmalloc (alloc_size);
17805 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
17809 Index: libgfortran/generated/parity_l8.c
17810 ===================================================================
17811 --- libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17812 +++ libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
17814 retarray->offset = 0;
17815 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17817 - alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17818 - * extent[rank-1];
17819 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17821 - retarray->base_addr = xmalloc (alloc_size);
17822 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
17823 if (alloc_size == 0)
17825 /* Make sure we have a zero-sized array. */
17826 Index: libgfortran/generated/minval_i4.c
17827 ===================================================================
17828 --- libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
17829 +++ libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
17831 retarray->offset = 0;
17832 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17834 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17835 - * extent[rank-1];
17836 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17838 - retarray->base_addr = xmalloc (alloc_size);
17839 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17840 if (alloc_size == 0)
17842 /* Make sure we have a zero-sized array. */
17843 @@ -286,8 +285,7 @@
17847 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17848 - * extent[rank-1];
17849 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17851 retarray->offset = 0;
17852 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17853 @@ -299,7 +297,7 @@
17857 - retarray->base_addr = xmalloc (alloc_size);
17858 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17862 @@ -472,8 +470,7 @@
17863 retarray->offset = 0;
17864 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17866 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17867 - * extent[rank-1];
17868 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17870 if (alloc_size == 0)
17872 @@ -482,7 +479,7 @@
17876 - retarray->base_addr = xmalloc (alloc_size);
17877 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17881 Index: libgfortran/generated/maxloc1_8_i2.c
17882 ===================================================================
17883 --- libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
17884 +++ libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
17886 retarray->offset = 0;
17887 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17889 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17890 - * extent[rank-1];
17891 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17893 - retarray->base_addr = xmalloc (alloc_size);
17894 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17895 if (alloc_size == 0)
17897 /* Make sure we have a zero-sized array. */
17898 @@ -294,8 +293,7 @@
17902 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17903 - * extent[rank-1];
17904 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17906 retarray->offset = 0;
17907 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17908 @@ -307,7 +305,7 @@
17912 - retarray->base_addr = xmalloc (alloc_size);
17913 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17917 @@ -485,8 +483,7 @@
17918 retarray->offset = 0;
17919 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17921 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17922 - * extent[rank-1];
17923 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17925 if (alloc_size == 0)
17927 @@ -495,7 +492,7 @@
17931 - retarray->base_addr = xmalloc (alloc_size);
17932 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17936 Index: libgfortran/generated/any_l8.c
17937 ===================================================================
17938 --- libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
17939 +++ libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
17940 @@ -101,8 +101,7 @@
17941 retarray->offset = 0;
17942 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17944 - alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17945 - * extent[rank-1];
17946 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17948 if (alloc_size == 0)
17950 @@ -111,7 +110,7 @@
17954 - retarray->base_addr = xmalloc (alloc_size);
17955 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
17959 Index: libgfortran/generated/maxloc0_16_r10.c
17960 ===================================================================
17961 --- libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
17962 +++ libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
17964 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17965 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17966 retarray->offset = 0;
17967 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17968 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17972 @@ -199,7 +199,7 @@
17973 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17974 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17975 retarray->offset = 0;
17976 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17977 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17981 @@ -367,7 +367,7 @@
17982 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17983 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17984 retarray->offset = 0;
17985 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17986 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17988 else if (unlikely (compile_options.bounds_check))
17990 Index: libgfortran/generated/minloc0_4_i16.c
17991 ===================================================================
17992 --- libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
17993 +++ libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
17995 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17996 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17997 retarray->offset = 0;
17998 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17999 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18003 @@ -199,7 +199,7 @@
18004 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18005 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18006 retarray->offset = 0;
18007 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18008 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18012 @@ -367,7 +367,7 @@
18013 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18014 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18015 retarray->offset = 0;
18016 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18017 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18019 else if (unlikely (compile_options.bounds_check))
18021 Index: libgfortran/generated/maxloc0_8_r8.c
18022 ===================================================================
18023 --- libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18024 +++ libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
18026 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18027 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18028 retarray->offset = 0;
18029 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18030 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18034 @@ -199,7 +199,7 @@
18035 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18036 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18037 retarray->offset = 0;
18038 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18039 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18043 @@ -367,7 +367,7 @@
18044 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18045 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18046 retarray->offset = 0;
18047 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18048 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18050 else if (unlikely (compile_options.bounds_check))
18052 Index: libgfortran/generated/minloc1_4_r10.c
18053 ===================================================================
18054 --- libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
18055 +++ libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
18057 retarray->offset = 0;
18058 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18060 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18061 - * extent[rank-1];
18062 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18064 - retarray->base_addr = xmalloc (alloc_size);
18065 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18066 if (alloc_size == 0)
18068 /* Make sure we have a zero-sized array. */
18069 @@ -294,8 +293,7 @@
18073 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18074 - * extent[rank-1];
18075 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18077 retarray->offset = 0;
18078 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18079 @@ -307,7 +305,7 @@
18083 - retarray->base_addr = xmalloc (alloc_size);
18084 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18088 @@ -485,8 +483,7 @@
18089 retarray->offset = 0;
18090 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18092 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18093 - * extent[rank-1];
18094 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18096 if (alloc_size == 0)
18098 @@ -495,7 +492,7 @@
18102 - retarray->base_addr = xmalloc (alloc_size);
18103 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18107 Index: libgfortran/generated/minloc1_8_i16.c
18108 ===================================================================
18109 --- libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18110 +++ libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
18112 retarray->offset = 0;
18113 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18115 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18116 - * extent[rank-1];
18117 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18119 - retarray->base_addr = xmalloc (alloc_size);
18120 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18121 if (alloc_size == 0)
18123 /* Make sure we have a zero-sized array. */
18124 @@ -294,8 +293,7 @@
18128 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18129 - * extent[rank-1];
18130 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18132 retarray->offset = 0;
18133 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18134 @@ -307,7 +305,7 @@
18138 - retarray->base_addr = xmalloc (alloc_size);
18139 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18143 @@ -485,8 +483,7 @@
18144 retarray->offset = 0;
18145 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18147 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18148 - * extent[rank-1];
18149 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18151 if (alloc_size == 0)
18153 @@ -495,7 +492,7 @@
18157 - retarray->base_addr = xmalloc (alloc_size);
18158 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18162 Index: libgfortran/generated/maxloc0_8_r10.c
18163 ===================================================================
18164 --- libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
18165 +++ libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
18167 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18168 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18169 retarray->offset = 0;
18170 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18171 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18175 @@ -199,7 +199,7 @@
18176 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18177 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18178 retarray->offset = 0;
18179 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18180 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18184 @@ -367,7 +367,7 @@
18185 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18186 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18187 retarray->offset = 0;
18188 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18189 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18191 else if (unlikely (compile_options.bounds_check))
18193 Index: libgfortran/generated/unpack_i4.c
18194 ===================================================================
18195 --- libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18196 +++ libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
18201 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
18202 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
18206 @@ -244,7 +244,7 @@
18210 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
18211 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
18215 Index: libgfortran/generated/minloc1_16_r4.c
18216 ===================================================================
18217 --- libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18218 +++ libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
18220 retarray->offset = 0;
18221 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18223 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18224 - * extent[rank-1];
18225 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18227 - retarray->base_addr = xmalloc (alloc_size);
18228 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18229 if (alloc_size == 0)
18231 /* Make sure we have a zero-sized array. */
18232 @@ -294,8 +293,7 @@
18236 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18237 - * extent[rank-1];
18238 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18240 retarray->offset = 0;
18241 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18242 @@ -307,7 +305,7 @@
18246 - retarray->base_addr = xmalloc (alloc_size);
18247 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18251 @@ -485,8 +483,7 @@
18252 retarray->offset = 0;
18253 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18255 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18256 - * extent[rank-1];
18257 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18259 if (alloc_size == 0)
18261 @@ -495,7 +492,7 @@
18265 - retarray->base_addr = xmalloc (alloc_size);
18266 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18270 Index: libgfortran/generated/product_i8.c
18271 ===================================================================
18272 --- libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18273 +++ libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
18275 retarray->offset = 0;
18276 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18278 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18279 - * extent[rank-1];
18280 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18282 - retarray->base_addr = xmalloc (alloc_size);
18283 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18284 if (alloc_size == 0)
18286 /* Make sure we have a zero-sized array. */
18287 @@ -272,8 +271,7 @@
18291 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18292 - * extent[rank-1];
18293 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18295 retarray->offset = 0;
18296 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18297 @@ -285,7 +283,7 @@
18301 - retarray->base_addr = xmalloc (alloc_size);
18302 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18306 @@ -430,8 +428,7 @@
18307 retarray->offset = 0;
18308 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18310 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18311 - * extent[rank-1];
18312 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18314 if (alloc_size == 0)
18316 @@ -440,7 +437,7 @@
18320 - retarray->base_addr = xmalloc (alloc_size);
18321 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18325 Index: libgfortran/generated/minloc0_16_r8.c
18326 ===================================================================
18327 --- libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18328 +++ libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
18330 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18331 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18332 retarray->offset = 0;
18333 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18334 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18338 @@ -199,7 +199,7 @@
18339 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18340 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18341 retarray->offset = 0;
18342 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18343 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18347 @@ -367,7 +367,7 @@
18348 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18349 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18350 retarray->offset = 0;
18351 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18352 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18354 else if (unlikely (compile_options.bounds_check))
18356 Index: libgfortran/generated/count_2_l.c
18357 ===================================================================
18358 --- libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
18359 +++ libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch) (revision 217117)
18360 @@ -101,8 +101,7 @@
18361 retarray->offset = 0;
18362 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18364 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18365 - * extent[rank-1];
18366 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18368 if (alloc_size == 0)
18370 @@ -111,7 +110,7 @@
18374 - retarray->base_addr = xmalloc (alloc_size);
18375 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18379 Index: libgfortran/generated/transpose_r8.c
18380 ===================================================================
18381 --- libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18382 +++ libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
18384 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18385 GFC_DESCRIPTOR_EXTENT(source, 1));
18387 - ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
18388 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18389 + sizeof (GFC_REAL_8));
18391 } else if (unlikely (compile_options.bounds_check))
18393 Index: libgfortran/generated/cshift1_8.c
18394 ===================================================================
18395 --- libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18396 +++ libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch) (revision 217117)
18401 - ret->base_addr = xmalloc (size * arraysize);
18402 + ret->base_addr = xmallocarray (arraysize, size);
18404 ret->dtype = array->dtype;
18405 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
18406 Index: libgfortran/generated/matmul_i4.c
18407 ===================================================================
18408 --- libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18409 +++ libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
18410 @@ -124,7 +124,7 @@
18413 retarray->base_addr
18414 - = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
18415 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
18416 retarray->offset = 0;
18418 else if (unlikely (compile_options.bounds_check))
18419 Index: libgfortran/generated/pack_r10.c
18420 ===================================================================
18421 --- libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
18422 +++ libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
18423 @@ -167,8 +167,8 @@
18427 - /* xmalloc allocates a single byte for zero size. */
18428 - ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
18429 + /* xmallocarray allocates a single byte for zero size. */
18430 + ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
18434 Index: libgfortran/generated/minloc1_16_i2.c
18435 ===================================================================
18436 --- libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
18437 +++ libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
18439 retarray->offset = 0;
18440 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18442 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18443 - * extent[rank-1];
18444 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18446 - retarray->base_addr = xmalloc (alloc_size);
18447 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18448 if (alloc_size == 0)
18450 /* Make sure we have a zero-sized array. */
18451 @@ -294,8 +293,7 @@
18455 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18456 - * extent[rank-1];
18457 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18459 retarray->offset = 0;
18460 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18461 @@ -307,7 +305,7 @@
18465 - retarray->base_addr = xmalloc (alloc_size);
18466 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18470 @@ -485,8 +483,7 @@
18471 retarray->offset = 0;
18472 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18474 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18475 - * extent[rank-1];
18476 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18478 if (alloc_size == 0)
18480 @@ -495,7 +492,7 @@
18484 - retarray->base_addr = xmalloc (alloc_size);
18485 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18489 Index: libgfortran/generated/in_pack_i8.c
18490 ===================================================================
18491 --- libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18492 +++ libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
18494 return source->base_addr;
18496 /* Allocate storage for the destination. */
18497 - destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
18498 + destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
18500 src = source->base_addr;
18501 stride0 = stride[0];
18502 Index: libgfortran/generated/transpose_r16.c
18503 ===================================================================
18504 --- libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18505 +++ libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
18507 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18508 GFC_DESCRIPTOR_EXTENT(source, 1));
18510 - ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
18511 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18512 + sizeof (GFC_REAL_16));
18514 } else if (unlikely (compile_options.bounds_check))
18516 Index: libgfortran/generated/minloc1_4_i4.c
18517 ===================================================================
18518 --- libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18519 +++ libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
18521 retarray->offset = 0;
18522 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18524 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18525 - * extent[rank-1];
18526 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18528 - retarray->base_addr = xmalloc (alloc_size);
18529 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18530 if (alloc_size == 0)
18532 /* Make sure we have a zero-sized array. */
18533 @@ -294,8 +293,7 @@
18537 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18538 - * extent[rank-1];
18539 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18541 retarray->offset = 0;
18542 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18543 @@ -307,7 +305,7 @@
18547 - retarray->base_addr = xmalloc (alloc_size);
18548 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18552 @@ -485,8 +483,7 @@
18553 retarray->offset = 0;
18554 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18556 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18557 - * extent[rank-1];
18558 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18560 if (alloc_size == 0)
18562 @@ -495,7 +492,7 @@
18566 - retarray->base_addr = xmalloc (alloc_size);
18567 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18571 Index: libgfortran/generated/maxval_i1.c
18572 ===================================================================
18573 --- libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
18574 +++ libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
18576 retarray->offset = 0;
18577 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18579 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18580 - * extent[rank-1];
18581 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18583 - retarray->base_addr = xmalloc (alloc_size);
18584 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18585 if (alloc_size == 0)
18587 /* Make sure we have a zero-sized array. */
18588 @@ -286,8 +285,7 @@
18592 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18593 - * extent[rank-1];
18594 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18596 retarray->offset = 0;
18597 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18598 @@ -299,7 +297,7 @@
18602 - retarray->base_addr = xmalloc (alloc_size);
18603 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18607 @@ -472,8 +470,7 @@
18608 retarray->offset = 0;
18609 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18611 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18612 - * extent[rank-1];
18613 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18615 if (alloc_size == 0)
18617 @@ -482,7 +479,7 @@
18621 - retarray->base_addr = xmalloc (alloc_size);
18622 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18626 Index: libgfortran/generated/product_c16.c
18627 ===================================================================
18628 --- libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18629 +++ libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
18631 retarray->offset = 0;
18632 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18634 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18635 - * extent[rank-1];
18636 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18638 - retarray->base_addr = xmalloc (alloc_size);
18639 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18640 if (alloc_size == 0)
18642 /* Make sure we have a zero-sized array. */
18643 @@ -272,8 +271,7 @@
18647 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18648 - * extent[rank-1];
18649 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18651 retarray->offset = 0;
18652 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18653 @@ -285,7 +283,7 @@
18657 - retarray->base_addr = xmalloc (alloc_size);
18658 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18662 @@ -430,8 +428,7 @@
18663 retarray->offset = 0;
18664 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18666 - alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18667 - * extent[rank-1];
18668 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18670 if (alloc_size == 0)
18672 @@ -440,7 +437,7 @@
18676 - retarray->base_addr = xmalloc (alloc_size);
18677 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18681 Index: libgfortran/generated/reshape_r4.c
18682 ===================================================================
18683 --- libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18684 +++ libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
18685 @@ -111,11 +111,11 @@
18688 if (unlikely (rs < 1))
18692 - alloc_size = rs * sizeof (GFC_REAL_4);
18695 - ret->base_addr = xmalloc (alloc_size);
18696 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18697 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18700 Index: libgfortran/generated/iany_i8.c
18701 ===================================================================
18702 --- libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18703 +++ libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
18705 retarray->offset = 0;
18706 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18708 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18709 - * extent[rank-1];
18710 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18712 - retarray->base_addr = xmalloc (alloc_size);
18713 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18714 if (alloc_size == 0)
18716 /* Make sure we have a zero-sized array. */
18717 @@ -272,8 +271,7 @@
18721 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18722 - * extent[rank-1];
18723 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18725 retarray->offset = 0;
18726 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18727 @@ -285,7 +283,7 @@
18731 - retarray->base_addr = xmalloc (alloc_size);
18732 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18736 @@ -430,8 +428,7 @@
18737 retarray->offset = 0;
18738 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18740 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18741 - * extent[rank-1];
18742 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18744 if (alloc_size == 0)
18746 @@ -440,7 +437,7 @@
18750 - retarray->base_addr = xmalloc (alloc_size);
18751 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18755 Index: libgfortran/generated/cshift1_16.c
18756 ===================================================================
18757 --- libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18758 +++ libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch) (revision 217117)
18763 - ret->base_addr = xmalloc (size * arraysize);
18764 + ret->base_addr = xmallocarray (arraysize, size);
18766 ret->dtype = array->dtype;
18767 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
18768 Index: libgfortran/generated/maxloc0_4_i1.c
18769 ===================================================================
18770 --- libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
18771 +++ libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
18773 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18774 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18775 retarray->offset = 0;
18776 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18777 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18781 @@ -199,7 +199,7 @@
18782 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18783 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18784 retarray->offset = 0;
18785 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18786 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18790 @@ -367,7 +367,7 @@
18791 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18792 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18793 retarray->offset = 0;
18794 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18795 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18797 else if (unlikely (compile_options.bounds_check))
18799 Index: libgfortran/generated/minloc0_4_i8.c
18800 ===================================================================
18801 --- libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18802 +++ libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
18804 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18805 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18806 retarray->offset = 0;
18807 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18808 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18812 @@ -199,7 +199,7 @@
18813 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18814 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18815 retarray->offset = 0;
18816 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18817 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18821 @@ -367,7 +367,7 @@
18822 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18823 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18824 retarray->offset = 0;
18825 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18826 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18828 else if (unlikely (compile_options.bounds_check))
18830 Index: libgfortran/generated/spread_c16.c
18831 ===================================================================
18832 --- libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18833 +++ libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
18834 @@ -101,8 +101,8 @@
18838 - /* xmalloc allocates a single byte for zero size. */
18839 - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
18840 + /* xmallocarray allocates a single byte for zero size. */
18841 + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
18845 @@ -244,7 +244,7 @@
18847 if (ret->base_addr == NULL)
18849 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
18850 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
18852 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18854 Index: libgfortran/generated/maxval_r4.c
18855 ===================================================================
18856 --- libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
18857 +++ libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
18859 retarray->offset = 0;
18860 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18862 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18863 - * extent[rank-1];
18864 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18866 - retarray->base_addr = xmalloc (alloc_size);
18867 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18868 if (alloc_size == 0)
18870 /* Make sure we have a zero-sized array. */
18871 @@ -286,8 +285,7 @@
18875 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18876 - * extent[rank-1];
18877 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18879 retarray->offset = 0;
18880 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18881 @@ -299,7 +297,7 @@
18885 - retarray->base_addr = xmalloc (alloc_size);
18886 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18890 @@ -472,8 +470,7 @@
18891 retarray->offset = 0;
18892 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18894 - alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18895 - * extent[rank-1];
18896 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18898 if (alloc_size == 0)
18900 @@ -482,7 +479,7 @@
18904 - retarray->base_addr = xmalloc (alloc_size);
18905 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18909 Index: libgfortran/generated/minval_r8.c
18910 ===================================================================
18911 --- libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
18912 +++ libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
18914 retarray->offset = 0;
18915 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18917 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18918 - * extent[rank-1];
18919 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18921 - retarray->base_addr = xmalloc (alloc_size);
18922 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18923 if (alloc_size == 0)
18925 /* Make sure we have a zero-sized array. */
18926 @@ -286,8 +285,7 @@
18930 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18931 - * extent[rank-1];
18932 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18934 retarray->offset = 0;
18935 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18936 @@ -299,7 +297,7 @@
18940 - retarray->base_addr = xmalloc (alloc_size);
18941 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18945 @@ -472,8 +470,7 @@
18946 retarray->offset = 0;
18947 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18949 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18950 - * extent[rank-1];
18951 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18953 if (alloc_size == 0)
18955 @@ -482,7 +479,7 @@
18959 - retarray->base_addr = xmalloc (alloc_size);
18960 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18964 Index: libgfortran/generated/minloc1_16_r16.c
18965 ===================================================================
18966 --- libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
18967 +++ libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
18969 retarray->offset = 0;
18970 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18972 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18973 - * extent[rank-1];
18974 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18976 - retarray->base_addr = xmalloc (alloc_size);
18977 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18978 if (alloc_size == 0)
18980 /* Make sure we have a zero-sized array. */
18981 @@ -294,8 +293,7 @@
18985 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18986 - * extent[rank-1];
18987 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18989 retarray->offset = 0;
18990 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18991 @@ -307,7 +305,7 @@
18995 - retarray->base_addr = xmalloc (alloc_size);
18996 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19000 @@ -485,8 +483,7 @@
19001 retarray->offset = 0;
19002 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19004 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19005 - * extent[rank-1];
19006 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19008 if (alloc_size == 0)
19010 @@ -495,7 +492,7 @@
19014 - retarray->base_addr = xmalloc (alloc_size);
19015 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19019 Index: libgfortran/generated/unpack_i16.c
19020 ===================================================================
19021 --- libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19022 +++ libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
19027 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
19028 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
19032 @@ -244,7 +244,7 @@
19036 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
19037 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
19041 Index: libgfortran/generated/sum_i8.c
19042 ===================================================================
19043 --- libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19044 +++ libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
19046 retarray->offset = 0;
19047 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19049 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19050 - * extent[rank-1];
19051 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19053 - retarray->base_addr = xmalloc (alloc_size);
19054 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19055 if (alloc_size == 0)
19057 /* Make sure we have a zero-sized array. */
19058 @@ -272,8 +271,7 @@
19062 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19063 - * extent[rank-1];
19064 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19066 retarray->offset = 0;
19067 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19068 @@ -285,7 +283,7 @@
19072 - retarray->base_addr = xmalloc (alloc_size);
19073 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19077 @@ -430,8 +428,7 @@
19078 retarray->offset = 0;
19079 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19081 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19082 - * extent[rank-1];
19083 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19085 if (alloc_size == 0)
19087 @@ -440,7 +437,7 @@
19091 - retarray->base_addr = xmalloc (alloc_size);
19092 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19096 Index: libgfortran/generated/pack_i1.c
19097 ===================================================================
19098 --- libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
19099 +++ libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
19100 @@ -167,8 +167,8 @@
19104 - /* xmalloc allocates a single byte for zero size. */
19105 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
19106 + /* xmallocarray allocates a single byte for zero size. */
19107 + ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
19111 Index: libgfortran/generated/any_l16.c
19112 ===================================================================
19113 --- libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19114 +++ libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
19115 @@ -101,8 +101,7 @@
19116 retarray->offset = 0;
19117 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19119 - alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19120 - * extent[rank-1];
19121 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19123 if (alloc_size == 0)
19125 @@ -111,7 +110,7 @@
19129 - retarray->base_addr = xmalloc (alloc_size);
19130 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
19134 Index: libgfortran/generated/spread_i8.c
19135 ===================================================================
19136 --- libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19137 +++ libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
19138 @@ -101,8 +101,8 @@
19142 - /* xmalloc allocates a single byte for zero size. */
19143 - ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
19144 + /* xmallocarray allocates a single byte for zero size. */
19145 + ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
19149 @@ -244,7 +244,7 @@
19151 if (ret->base_addr == NULL)
19153 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
19154 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
19156 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19158 Index: libgfortran/generated/maxval_i2.c
19159 ===================================================================
19160 --- libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
19161 +++ libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
19163 retarray->offset = 0;
19164 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19166 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19167 - * extent[rank-1];
19168 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19170 - retarray->base_addr = xmalloc (alloc_size);
19171 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19172 if (alloc_size == 0)
19174 /* Make sure we have a zero-sized array. */
19175 @@ -286,8 +285,7 @@
19179 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19180 - * extent[rank-1];
19181 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19183 retarray->offset = 0;
19184 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19185 @@ -299,7 +297,7 @@
19189 - retarray->base_addr = xmalloc (alloc_size);
19190 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19194 @@ -472,8 +470,7 @@
19195 retarray->offset = 0;
19196 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19198 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19199 - * extent[rank-1];
19200 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19202 if (alloc_size == 0)
19204 @@ -482,7 +479,7 @@
19208 - retarray->base_addr = xmalloc (alloc_size);
19209 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19213 Index: libgfortran/generated/maxloc1_8_i4.c
19214 ===================================================================
19215 --- libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19216 +++ libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
19218 retarray->offset = 0;
19219 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19221 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19222 - * extent[rank-1];
19223 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19225 - retarray->base_addr = xmalloc (alloc_size);
19226 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19227 if (alloc_size == 0)
19229 /* Make sure we have a zero-sized array. */
19230 @@ -294,8 +293,7 @@
19234 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19235 - * extent[rank-1];
19236 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19238 retarray->offset = 0;
19239 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19240 @@ -307,7 +305,7 @@
19244 - retarray->base_addr = xmalloc (alloc_size);
19245 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19249 @@ -485,8 +483,7 @@
19250 retarray->offset = 0;
19251 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19253 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19254 - * extent[rank-1];
19255 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19257 if (alloc_size == 0)
19259 @@ -495,7 +492,7 @@
19263 - retarray->base_addr = xmalloc (alloc_size);
19264 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19268 Index: libgfortran/generated/unpack_r8.c
19269 ===================================================================
19270 --- libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19271 +++ libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
19276 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
19277 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
19281 @@ -244,7 +244,7 @@
19285 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
19286 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
19290 Index: libgfortran/generated/maxloc0_4_r4.c
19291 ===================================================================
19292 --- libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19293 +++ libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
19295 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19296 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19297 retarray->offset = 0;
19298 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19299 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19303 @@ -199,7 +199,7 @@
19304 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19305 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19306 retarray->offset = 0;
19307 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19308 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19312 @@ -367,7 +367,7 @@
19313 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19314 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19315 retarray->offset = 0;
19316 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19317 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19319 else if (unlikely (compile_options.bounds_check))
19321 Index: libgfortran/generated/all_l1.c
19322 ===================================================================
19323 --- libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
19324 +++ libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
19325 @@ -101,8 +101,7 @@
19326 retarray->offset = 0;
19327 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19329 - alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19330 - * extent[rank-1];
19331 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19333 if (alloc_size == 0)
19335 @@ -111,7 +110,7 @@
19339 - retarray->base_addr = xmalloc (alloc_size);
19340 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
19344 Index: libgfortran/generated/matmul_r8.c
19345 ===================================================================
19346 --- libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19347 +++ libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
19348 @@ -124,7 +124,7 @@
19351 retarray->base_addr
19352 - = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
19353 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
19354 retarray->offset = 0;
19356 else if (unlikely (compile_options.bounds_check))
19357 Index: libgfortran/generated/minloc0_4_r16.c
19358 ===================================================================
19359 --- libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19360 +++ libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
19362 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19363 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19364 retarray->offset = 0;
19365 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19366 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19370 @@ -199,7 +199,7 @@
19371 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19372 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19373 retarray->offset = 0;
19374 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19375 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19379 @@ -367,7 +367,7 @@
19380 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19381 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19382 retarray->offset = 0;
19383 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19384 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19386 else if (unlikely (compile_options.bounds_check))
19388 Index: libgfortran/generated/maxloc0_4_i2.c
19389 ===================================================================
19390 --- libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
19391 +++ libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
19393 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19394 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19395 retarray->offset = 0;
19396 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19397 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19401 @@ -199,7 +199,7 @@
19402 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19403 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19404 retarray->offset = 0;
19405 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19406 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19410 @@ -367,7 +367,7 @@
19411 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19412 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19413 retarray->offset = 0;
19414 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19415 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19417 else if (unlikely (compile_options.bounds_check))
19419 Index: libgfortran/generated/minloc1_8_r16.c
19420 ===================================================================
19421 --- libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19422 +++ libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
19424 retarray->offset = 0;
19425 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19427 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19428 - * extent[rank-1];
19429 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19431 - retarray->base_addr = xmalloc (alloc_size);
19432 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19433 if (alloc_size == 0)
19435 /* Make sure we have a zero-sized array. */
19436 @@ -294,8 +293,7 @@
19440 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19441 - * extent[rank-1];
19442 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19444 retarray->offset = 0;
19445 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19446 @@ -307,7 +305,7 @@
19450 - retarray->base_addr = xmalloc (alloc_size);
19451 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19455 @@ -485,8 +483,7 @@
19456 retarray->offset = 0;
19457 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19459 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19460 - * extent[rank-1];
19461 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19463 if (alloc_size == 0)
19465 @@ -495,7 +492,7 @@
19469 - retarray->base_addr = xmalloc (alloc_size);
19470 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19474 Index: libgfortran/generated/pack_c10.c
19475 ===================================================================
19476 --- libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
19477 +++ libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
19478 @@ -167,8 +167,8 @@
19482 - /* xmalloc allocates a single byte for zero size. */
19483 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
19484 + /* xmallocarray allocates a single byte for zero size. */
19485 + ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
19489 Index: libgfortran/generated/pack_r4.c
19490 ===================================================================
19491 --- libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19492 +++ libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
19493 @@ -167,8 +167,8 @@
19497 - /* xmalloc allocates a single byte for zero size. */
19498 - ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
19499 + /* xmallocarray allocates a single byte for zero size. */
19500 + ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
19504 Index: libgfortran/generated/transpose_c16.c
19505 ===================================================================
19506 --- libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19507 +++ libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
19509 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19510 GFC_DESCRIPTOR_EXTENT(source, 1));
19512 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
19513 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19514 + sizeof (GFC_COMPLEX_16));
19516 } else if (unlikely (compile_options.bounds_check))
19518 Index: libgfortran/generated/maxloc0_8_i8.c
19519 ===================================================================
19520 --- libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19521 +++ libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
19523 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19524 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19525 retarray->offset = 0;
19526 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19527 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19531 @@ -199,7 +199,7 @@
19532 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19533 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19534 retarray->offset = 0;
19535 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19536 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19540 @@ -367,7 +367,7 @@
19541 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19542 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19543 retarray->offset = 0;
19544 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19545 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19547 else if (unlikely (compile_options.bounds_check))
19549 Index: libgfortran/generated/minloc1_4_r8.c
19550 ===================================================================
19551 --- libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19552 +++ libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
19554 retarray->offset = 0;
19555 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19557 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19558 - * extent[rank-1];
19559 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19561 - retarray->base_addr = xmalloc (alloc_size);
19562 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19563 if (alloc_size == 0)
19565 /* Make sure we have a zero-sized array. */
19566 @@ -294,8 +293,7 @@
19570 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19571 - * extent[rank-1];
19572 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19574 retarray->offset = 0;
19575 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19576 @@ -307,7 +305,7 @@
19580 - retarray->base_addr = xmalloc (alloc_size);
19581 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19585 @@ -485,8 +483,7 @@
19586 retarray->offset = 0;
19587 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19589 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19590 - * extent[rank-1];
19591 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19593 if (alloc_size == 0)
19595 @@ -495,7 +492,7 @@
19599 - retarray->base_addr = xmalloc (alloc_size);
19600 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19604 Index: libgfortran/generated/minloc1_16_i4.c
19605 ===================================================================
19606 --- libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19607 +++ libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
19609 retarray->offset = 0;
19610 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19612 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19613 - * extent[rank-1];
19614 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19616 - retarray->base_addr = xmalloc (alloc_size);
19617 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19618 if (alloc_size == 0)
19620 /* Make sure we have a zero-sized array. */
19621 @@ -294,8 +293,7 @@
19625 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19626 - * extent[rank-1];
19627 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19629 retarray->offset = 0;
19630 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19631 @@ -307,7 +305,7 @@
19635 - retarray->base_addr = xmalloc (alloc_size);
19636 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19640 @@ -485,8 +483,7 @@
19641 retarray->offset = 0;
19642 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19644 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19645 - * extent[rank-1];
19646 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19648 if (alloc_size == 0)
19650 @@ -495,7 +492,7 @@
19654 - retarray->base_addr = xmalloc (alloc_size);
19655 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19659 Index: libgfortran/generated/minloc0_16_i8.c
19660 ===================================================================
19661 --- libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19662 +++ libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
19664 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19665 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19666 retarray->offset = 0;
19667 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19668 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19672 @@ -199,7 +199,7 @@
19673 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19674 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19675 retarray->offset = 0;
19676 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19677 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19681 @@ -367,7 +367,7 @@
19682 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19683 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19684 retarray->offset = 0;
19685 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19686 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19688 else if (unlikely (compile_options.bounds_check))
19690 Index: libgfortran/generated/pack_i2.c
19691 ===================================================================
19692 --- libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
19693 +++ libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
19694 @@ -167,8 +167,8 @@
19698 - /* xmalloc allocates a single byte for zero size. */
19699 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
19700 + /* xmallocarray allocates a single byte for zero size. */
19701 + ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
19705 Index: libgfortran/generated/transpose_i8.c
19706 ===================================================================
19707 --- libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19708 +++ libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
19710 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19711 GFC_DESCRIPTOR_EXTENT(source, 1));
19713 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
19714 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19715 + sizeof (GFC_INTEGER_8));
19717 } else if (unlikely (compile_options.bounds_check))
19719 Index: libgfortran/generated/eoshift1_16.c
19720 ===================================================================
19721 --- libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19722 +++ libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch) (revision 217117)
19723 @@ -105,8 +105,8 @@
19724 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
19727 - /* xmalloc allocates a single byte for zero size. */
19728 - ret->base_addr = xmalloc (size * arraysize);
19729 + /* xmallocarray allocates a single byte for zero size. */
19730 + ret->base_addr = xmallocarray (arraysize, size);
19733 else if (unlikely (compile_options.bounds_check))
19734 Index: libgfortran/generated/all_l2.c
19735 ===================================================================
19736 --- libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release) (revision 217117)
19737 +++ libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch) (revision 217117)
19738 @@ -101,8 +101,7 @@
19739 retarray->offset = 0;
19740 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19742 - alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19743 - * extent[rank-1];
19744 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19746 if (alloc_size == 0)
19748 @@ -111,7 +110,7 @@
19752 - retarray->base_addr = xmalloc (alloc_size);
19753 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
19757 Index: libgfortran/generated/product_c4.c
19758 ===================================================================
19759 --- libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19760 +++ libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
19762 retarray->offset = 0;
19763 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19765 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19766 - * extent[rank-1];
19767 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19769 - retarray->base_addr = xmalloc (alloc_size);
19770 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19771 if (alloc_size == 0)
19773 /* Make sure we have a zero-sized array. */
19774 @@ -272,8 +271,7 @@
19778 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19779 - * extent[rank-1];
19780 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19782 retarray->offset = 0;
19783 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19784 @@ -285,7 +283,7 @@
19788 - retarray->base_addr = xmalloc (alloc_size);
19789 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19793 @@ -430,8 +428,7 @@
19794 retarray->offset = 0;
19795 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19797 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19798 - * extent[rank-1];
19799 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19801 if (alloc_size == 0)
19803 @@ -440,7 +437,7 @@
19807 - retarray->base_addr = xmalloc (alloc_size);
19808 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19812 Index: libgfortran/generated/iall_i1.c
19813 ===================================================================
19814 --- libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
19815 +++ libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
19817 retarray->offset = 0;
19818 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19820 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19821 - * extent[rank-1];
19822 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19824 - retarray->base_addr = xmalloc (alloc_size);
19825 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19826 if (alloc_size == 0)
19828 /* Make sure we have a zero-sized array. */
19829 @@ -272,8 +271,7 @@
19833 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19834 - * extent[rank-1];
19835 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19837 retarray->offset = 0;
19838 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19839 @@ -285,7 +283,7 @@
19843 - retarray->base_addr = xmalloc (alloc_size);
19844 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19848 @@ -430,8 +428,7 @@
19849 retarray->offset = 0;
19850 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19852 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19853 - * extent[rank-1];
19854 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19856 if (alloc_size == 0)
19858 @@ -440,7 +437,7 @@
19862 - retarray->base_addr = xmalloc (alloc_size);
19863 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19867 Index: libgfortran/generated/reshape_i4.c
19868 ===================================================================
19869 --- libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19870 +++ libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
19871 @@ -111,11 +111,11 @@
19874 if (unlikely (rs < 1))
19878 - alloc_size = rs * sizeof (GFC_INTEGER_4);
19881 - ret->base_addr = xmalloc (alloc_size);
19882 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19883 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
19886 Index: libgfortran/generated/in_pack_r10.c
19887 ===================================================================
19888 --- libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
19889 +++ libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
19891 return source->base_addr;
19893 /* Allocate storage for the destination. */
19894 - destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
19895 + destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
19897 src = source->base_addr;
19898 stride0 = stride[0];
19899 Index: libgfortran/generated/in_pack_c4.c
19900 ===================================================================
19901 --- libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
19902 +++ libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
19904 return source->base_addr;
19906 /* Allocate storage for the destination. */
19907 - destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
19908 + destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
19910 src = source->base_addr;
19911 stride0 = stride[0];
19912 Index: libgfortran/generated/all_l16.c
19913 ===================================================================
19914 --- libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release) (revision 217117)
19915 +++ libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch) (revision 217117)
19916 @@ -101,8 +101,7 @@
19917 retarray->offset = 0;
19918 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19920 - alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19921 - * extent[rank-1];
19922 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19924 if (alloc_size == 0)
19926 @@ -111,7 +110,7 @@
19930 - retarray->base_addr = xmalloc (alloc_size);
19931 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
19935 Index: libgfortran/generated/maxloc0_16_i1.c
19936 ===================================================================
19937 --- libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
19938 +++ libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
19940 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19941 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19942 retarray->offset = 0;
19943 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19944 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19948 @@ -199,7 +199,7 @@
19949 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19950 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19951 retarray->offset = 0;
19952 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19953 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19957 @@ -367,7 +367,7 @@
19958 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19959 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19960 retarray->offset = 0;
19961 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19962 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19964 else if (unlikely (compile_options.bounds_check))
19966 Index: libgfortran/generated/maxloc1_8_r8.c
19967 ===================================================================
19968 --- libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
19969 +++ libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
19971 retarray->offset = 0;
19972 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19974 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19975 - * extent[rank-1];
19976 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19978 - retarray->base_addr = xmalloc (alloc_size);
19979 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19980 if (alloc_size == 0)
19982 /* Make sure we have a zero-sized array. */
19983 @@ -294,8 +293,7 @@
19987 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19988 - * extent[rank-1];
19989 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19991 retarray->offset = 0;
19992 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19993 @@ -307,7 +305,7 @@
19997 - retarray->base_addr = xmalloc (alloc_size);
19998 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20002 @@ -485,8 +483,7 @@
20003 retarray->offset = 0;
20004 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20006 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20007 - * extent[rank-1];
20008 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20010 if (alloc_size == 0)
20012 @@ -495,7 +492,7 @@
20016 - retarray->base_addr = xmalloc (alloc_size);
20017 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20021 Index: libgfortran/generated/minval_i16.c
20022 ===================================================================
20023 --- libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20024 +++ libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
20026 retarray->offset = 0;
20027 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20029 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20030 - * extent[rank-1];
20031 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20033 - retarray->base_addr = xmalloc (alloc_size);
20034 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20035 if (alloc_size == 0)
20037 /* Make sure we have a zero-sized array. */
20038 @@ -286,8 +285,7 @@
20042 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20043 - * extent[rank-1];
20044 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20046 retarray->offset = 0;
20047 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20048 @@ -299,7 +297,7 @@
20052 - retarray->base_addr = xmalloc (alloc_size);
20053 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20057 @@ -472,8 +470,7 @@
20058 retarray->offset = 0;
20059 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20061 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20062 - * extent[rank-1];
20063 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20065 if (alloc_size == 0)
20067 @@ -482,7 +479,7 @@
20071 - retarray->base_addr = xmalloc (alloc_size);
20072 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20076 Index: libgfortran/generated/reshape_r10.c
20077 ===================================================================
20078 --- libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20079 +++ libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20080 @@ -111,11 +111,11 @@
20083 if (unlikely (rs < 1))
20087 - alloc_size = rs * sizeof (GFC_REAL_10);
20090 - ret->base_addr = xmalloc (alloc_size);
20091 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20092 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20095 Index: libgfortran/generated/unpack_r16.c
20096 ===================================================================
20097 --- libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20098 +++ libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
20103 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
20104 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
20108 @@ -244,7 +244,7 @@
20112 - ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
20113 + ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
20117 Index: libgfortran/generated/maxval_i4.c
20118 ===================================================================
20119 --- libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20120 +++ libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
20122 retarray->offset = 0;
20123 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20125 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20126 - * extent[rank-1];
20127 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20129 - retarray->base_addr = xmalloc (alloc_size);
20130 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20131 if (alloc_size == 0)
20133 /* Make sure we have a zero-sized array. */
20134 @@ -286,8 +285,7 @@
20138 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20139 - * extent[rank-1];
20140 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20142 retarray->offset = 0;
20143 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20144 @@ -299,7 +297,7 @@
20148 - retarray->base_addr = xmalloc (alloc_size);
20149 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20153 @@ -472,8 +470,7 @@
20154 retarray->offset = 0;
20155 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20157 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20158 - * extent[rank-1];
20159 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20161 if (alloc_size == 0)
20163 @@ -482,7 +479,7 @@
20167 - retarray->base_addr = xmalloc (alloc_size);
20168 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20172 Index: libgfortran/generated/minval_i8.c
20173 ===================================================================
20174 --- libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
20175 +++ libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
20177 retarray->offset = 0;
20178 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20180 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20181 - * extent[rank-1];
20182 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20184 - retarray->base_addr = xmalloc (alloc_size);
20185 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20186 if (alloc_size == 0)
20188 /* Make sure we have a zero-sized array. */
20189 @@ -286,8 +285,7 @@
20193 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20194 - * extent[rank-1];
20195 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20197 retarray->offset = 0;
20198 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20199 @@ -299,7 +297,7 @@
20203 - retarray->base_addr = xmalloc (alloc_size);
20204 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20208 @@ -472,8 +470,7 @@
20209 retarray->offset = 0;
20210 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20212 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20213 - * extent[rank-1];
20214 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20216 if (alloc_size == 0)
20218 @@ -482,7 +479,7 @@
20222 - retarray->base_addr = xmalloc (alloc_size);
20223 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20227 Index: libgfortran/generated/maxloc0_16_i16.c
20228 ===================================================================
20229 --- libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20230 +++ libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
20232 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20233 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20234 retarray->offset = 0;
20235 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20236 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20240 @@ -199,7 +199,7 @@
20241 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20242 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20243 retarray->offset = 0;
20244 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20245 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20249 @@ -367,7 +367,7 @@
20250 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20251 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20252 retarray->offset = 0;
20253 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20254 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20256 else if (unlikely (compile_options.bounds_check))
20258 Index: libgfortran/generated/shape_i4.c
20259 ===================================================================
20260 --- libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20261 +++ libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
20264 GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
20266 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20267 + ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20270 stride = GFC_DESCRIPTOR_STRIDE(ret,0);
20271 Index: libgfortran/generated/minloc1_4_i16.c
20272 ===================================================================
20273 --- libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20274 +++ libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
20276 retarray->offset = 0;
20277 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20279 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20280 - * extent[rank-1];
20281 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20283 - retarray->base_addr = xmalloc (alloc_size);
20284 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20285 if (alloc_size == 0)
20287 /* Make sure we have a zero-sized array. */
20288 @@ -294,8 +293,7 @@
20292 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20293 - * extent[rank-1];
20294 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20296 retarray->offset = 0;
20297 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20298 @@ -307,7 +305,7 @@
20302 - retarray->base_addr = xmalloc (alloc_size);
20303 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20307 @@ -485,8 +483,7 @@
20308 retarray->offset = 0;
20309 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20311 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20312 - * extent[rank-1];
20313 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20315 if (alloc_size == 0)
20317 @@ -495,7 +492,7 @@
20321 - retarray->base_addr = xmalloc (alloc_size);
20322 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20326 Index: libgfortran/generated/maxloc0_4_r10.c
20327 ===================================================================
20328 --- libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20329 +++ libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20331 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20332 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20333 retarray->offset = 0;
20334 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20335 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20339 @@ -199,7 +199,7 @@
20340 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20341 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20342 retarray->offset = 0;
20343 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20344 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20348 @@ -367,7 +367,7 @@
20349 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20350 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20351 retarray->offset = 0;
20352 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20353 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20355 else if (unlikely (compile_options.bounds_check))
20357 Index: libgfortran/generated/maxloc0_8_i16.c
20358 ===================================================================
20359 --- libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20360 +++ libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
20362 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20363 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20364 retarray->offset = 0;
20365 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20366 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20370 @@ -199,7 +199,7 @@
20371 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20372 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20373 retarray->offset = 0;
20374 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20375 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20379 @@ -367,7 +367,7 @@
20380 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20381 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20382 retarray->offset = 0;
20383 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20384 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20386 else if (unlikely (compile_options.bounds_check))
20388 Index: libgfortran/generated/iall_i2.c
20389 ===================================================================
20390 --- libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
20391 +++ libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
20393 retarray->offset = 0;
20394 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20396 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20397 - * extent[rank-1];
20398 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20400 - retarray->base_addr = xmalloc (alloc_size);
20401 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20402 if (alloc_size == 0)
20404 /* Make sure we have a zero-sized array. */
20405 @@ -272,8 +271,7 @@
20409 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20410 - * extent[rank-1];
20411 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20413 retarray->offset = 0;
20414 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20415 @@ -285,7 +283,7 @@
20419 - retarray->base_addr = xmalloc (alloc_size);
20420 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20424 @@ -430,8 +428,7 @@
20425 retarray->offset = 0;
20426 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20428 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20429 - * extent[rank-1];
20430 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20432 if (alloc_size == 0)
20434 @@ -440,7 +437,7 @@
20438 - retarray->base_addr = xmalloc (alloc_size);
20439 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20443 Index: libgfortran/generated/maxloc1_8_r10.c
20444 ===================================================================
20445 --- libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20446 +++ libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20448 retarray->offset = 0;
20449 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20451 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20452 - * extent[rank-1];
20453 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20455 - retarray->base_addr = xmalloc (alloc_size);
20456 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20457 if (alloc_size == 0)
20459 /* Make sure we have a zero-sized array. */
20460 @@ -294,8 +293,7 @@
20464 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20465 - * extent[rank-1];
20466 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20468 retarray->offset = 0;
20469 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20470 @@ -307,7 +305,7 @@
20474 - retarray->base_addr = xmalloc (alloc_size);
20475 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20479 @@ -485,8 +483,7 @@
20480 retarray->offset = 0;
20481 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20483 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20484 - * extent[rank-1];
20485 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20487 if (alloc_size == 0)
20489 @@ -495,7 +492,7 @@
20493 - retarray->base_addr = xmalloc (alloc_size);
20494 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20498 Index: libgfortran/generated/maxloc0_16_r4.c
20499 ===================================================================
20500 --- libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20501 +++ libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
20503 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20504 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20505 retarray->offset = 0;
20506 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20507 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20511 @@ -199,7 +199,7 @@
20512 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20513 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20514 retarray->offset = 0;
20515 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20516 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20520 @@ -367,7 +367,7 @@
20521 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20522 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20523 retarray->offset = 0;
20524 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20525 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20527 else if (unlikely (compile_options.bounds_check))
20529 Index: libgfortran/generated/minloc0_8_i1.c
20530 ===================================================================
20531 --- libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
20532 +++ libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
20534 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20535 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20536 retarray->offset = 0;
20537 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20538 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20542 @@ -199,7 +199,7 @@
20543 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20544 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20545 retarray->offset = 0;
20546 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20547 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20551 @@ -367,7 +367,7 @@
20552 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20553 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20554 retarray->offset = 0;
20555 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20556 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20558 else if (unlikely (compile_options.bounds_check))
20560 Index: libgfortran/generated/minloc1_16_r8.c
20561 ===================================================================
20562 --- libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
20563 +++ libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
20565 retarray->offset = 0;
20566 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20568 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20569 - * extent[rank-1];
20570 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20572 - retarray->base_addr = xmalloc (alloc_size);
20573 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20574 if (alloc_size == 0)
20576 /* Make sure we have a zero-sized array. */
20577 @@ -294,8 +293,7 @@
20581 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20582 - * extent[rank-1];
20583 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20585 retarray->offset = 0;
20586 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20587 @@ -307,7 +305,7 @@
20591 - retarray->base_addr = xmalloc (alloc_size);
20592 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20596 @@ -485,8 +483,7 @@
20597 retarray->offset = 0;
20598 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20600 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20601 - * extent[rank-1];
20602 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20604 if (alloc_size == 0)
20606 @@ -495,7 +492,7 @@
20610 - retarray->base_addr = xmalloc (alloc_size);
20611 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20615 Index: libgfortran/generated/unpack_i8.c
20616 ===================================================================
20617 --- libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
20618 +++ libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
20623 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
20624 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
20628 @@ -244,7 +244,7 @@
20632 - ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
20633 + ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
20637 Index: libgfortran/generated/maxloc0_4_i4.c
20638 ===================================================================
20639 --- libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20640 +++ libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
20642 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20643 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20644 retarray->offset = 0;
20645 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20646 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20650 @@ -199,7 +199,7 @@
20651 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20652 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20653 retarray->offset = 0;
20654 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20655 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20659 @@ -367,7 +367,7 @@
20660 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20661 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20662 retarray->offset = 0;
20663 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20664 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20666 else if (unlikely (compile_options.bounds_check))
20668 Index: libgfortran/generated/count_4_l.c
20669 ===================================================================
20670 --- libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
20671 +++ libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch) (revision 217117)
20672 @@ -101,8 +101,7 @@
20673 retarray->offset = 0;
20674 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20676 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20677 - * extent[rank-1];
20678 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20680 if (alloc_size == 0)
20682 @@ -111,7 +110,7 @@
20686 - retarray->base_addr = xmalloc (alloc_size);
20687 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20691 Index: libgfortran/generated/sum_r10.c
20692 ===================================================================
20693 --- libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20694 +++ libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20696 retarray->offset = 0;
20697 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20699 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20700 - * extent[rank-1];
20701 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20703 - retarray->base_addr = xmalloc (alloc_size);
20704 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20705 if (alloc_size == 0)
20707 /* Make sure we have a zero-sized array. */
20708 @@ -272,8 +271,7 @@
20712 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20713 - * extent[rank-1];
20714 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20716 retarray->offset = 0;
20717 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20718 @@ -285,7 +283,7 @@
20722 - retarray->base_addr = xmalloc (alloc_size);
20723 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20727 @@ -430,8 +428,7 @@
20728 retarray->offset = 0;
20729 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20731 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20732 - * extent[rank-1];
20733 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20735 if (alloc_size == 0)
20737 @@ -440,7 +437,7 @@
20741 - retarray->base_addr = xmalloc (alloc_size);
20742 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20746 Index: libgfortran/generated/sum_c4.c
20747 ===================================================================
20748 --- libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20749 +++ libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
20751 retarray->offset = 0;
20752 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20754 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20755 - * extent[rank-1];
20756 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20758 - retarray->base_addr = xmalloc (alloc_size);
20759 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20760 if (alloc_size == 0)
20762 /* Make sure we have a zero-sized array. */
20763 @@ -272,8 +271,7 @@
20767 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20768 - * extent[rank-1];
20769 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20771 retarray->offset = 0;
20772 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20773 @@ -285,7 +283,7 @@
20777 - retarray->base_addr = xmalloc (alloc_size);
20778 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20782 @@ -430,8 +428,7 @@
20783 retarray->offset = 0;
20784 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20786 - alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20787 - * extent[rank-1];
20788 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20790 if (alloc_size == 0)
20792 @@ -440,7 +437,7 @@
20796 - retarray->base_addr = xmalloc (alloc_size);
20797 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20801 Index: libgfortran/generated/maxloc1_16_r10.c
20802 ===================================================================
20803 --- libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20804 +++ libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20806 retarray->offset = 0;
20807 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20809 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20810 - * extent[rank-1];
20811 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20813 - retarray->base_addr = xmalloc (alloc_size);
20814 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20815 if (alloc_size == 0)
20817 /* Make sure we have a zero-sized array. */
20818 @@ -294,8 +293,7 @@
20822 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20823 - * extent[rank-1];
20824 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20826 retarray->offset = 0;
20827 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20828 @@ -307,7 +305,7 @@
20832 - retarray->base_addr = xmalloc (alloc_size);
20833 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20837 @@ -485,8 +483,7 @@
20838 retarray->offset = 0;
20839 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20841 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20842 - * extent[rank-1];
20843 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20845 if (alloc_size == 0)
20847 @@ -495,7 +492,7 @@
20851 - retarray->base_addr = xmalloc (alloc_size);
20852 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20856 Index: libgfortran/generated/pack_i16.c
20857 ===================================================================
20858 --- libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
20859 +++ libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
20860 @@ -167,8 +167,8 @@
20864 - /* xmalloc allocates a single byte for zero size. */
20865 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
20866 + /* xmallocarray allocates a single byte for zero size. */
20867 + ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
20871 Index: libgfortran/generated/matmul_i8.c
20872 ===================================================================
20873 --- libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
20874 +++ libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
20875 @@ -124,7 +124,7 @@
20878 retarray->base_addr
20879 - = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
20880 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
20881 retarray->offset = 0;
20883 else if (unlikely (compile_options.bounds_check))
20884 Index: libgfortran/generated/maxloc0_16_i2.c
20885 ===================================================================
20886 --- libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
20887 +++ libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
20889 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20890 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20891 retarray->offset = 0;
20892 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20893 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20897 @@ -199,7 +199,7 @@
20898 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20899 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20900 retarray->offset = 0;
20901 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20902 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20906 @@ -367,7 +367,7 @@
20907 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20908 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20909 retarray->offset = 0;
20910 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20911 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20913 else if (unlikely (compile_options.bounds_check))
20915 Index: libgfortran/generated/spread_c4.c
20916 ===================================================================
20917 --- libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20918 +++ libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
20919 @@ -101,8 +101,8 @@
20923 - /* xmalloc allocates a single byte for zero size. */
20924 - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
20925 + /* xmallocarray allocates a single byte for zero size. */
20926 + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
20930 @@ -244,7 +244,7 @@
20932 if (ret->base_addr == NULL)
20934 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
20935 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
20937 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
20939 Index: libgfortran/generated/maxval_r10.c
20940 ===================================================================
20941 --- libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
20942 +++ libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
20944 retarray->offset = 0;
20945 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20947 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20948 - * extent[rank-1];
20949 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20951 - retarray->base_addr = xmalloc (alloc_size);
20952 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20953 if (alloc_size == 0)
20955 /* Make sure we have a zero-sized array. */
20956 @@ -286,8 +285,7 @@
20960 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20961 - * extent[rank-1];
20962 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20964 retarray->offset = 0;
20965 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20966 @@ -299,7 +297,7 @@
20970 - retarray->base_addr = xmalloc (alloc_size);
20971 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20975 @@ -472,8 +470,7 @@
20976 retarray->offset = 0;
20977 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20979 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20980 - * extent[rank-1];
20981 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20983 if (alloc_size == 0)
20985 @@ -482,7 +479,7 @@
20989 - retarray->base_addr = xmalloc (alloc_size);
20990 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20994 Index: libgfortran/generated/pack_i4.c
20995 ===================================================================
20996 --- libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
20997 +++ libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
20998 @@ -167,8 +167,8 @@
21002 - /* xmalloc allocates a single byte for zero size. */
21003 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
21004 + /* xmallocarray allocates a single byte for zero size. */
21005 + ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
21009 Index: libgfortran/generated/maxloc1_4_i1.c
21010 ===================================================================
21011 --- libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
21012 +++ libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
21014 retarray->offset = 0;
21015 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21017 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21018 - * extent[rank-1];
21019 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21021 - retarray->base_addr = xmalloc (alloc_size);
21022 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21023 if (alloc_size == 0)
21025 /* Make sure we have a zero-sized array. */
21026 @@ -294,8 +293,7 @@
21030 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21031 - * extent[rank-1];
21032 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21034 retarray->offset = 0;
21035 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21036 @@ -307,7 +305,7 @@
21040 - retarray->base_addr = xmalloc (alloc_size);
21041 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21045 @@ -485,8 +483,7 @@
21046 retarray->offset = 0;
21047 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21049 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21050 - * extent[rank-1];
21051 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21053 if (alloc_size == 0)
21055 @@ -495,7 +492,7 @@
21059 - retarray->base_addr = xmalloc (alloc_size);
21060 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21064 Index: libgfortran/generated/matmul_r10.c
21065 ===================================================================
21066 --- libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
21067 +++ libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
21068 @@ -124,7 +124,7 @@
21071 retarray->base_addr
21072 - = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
21073 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
21074 retarray->offset = 0;
21076 else if (unlikely (compile_options.bounds_check))
21077 Index: libgfortran/generated/minloc1_4_i8.c
21078 ===================================================================
21079 --- libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21080 +++ libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
21082 retarray->offset = 0;
21083 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21085 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21086 - * extent[rank-1];
21087 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21089 - retarray->base_addr = xmalloc (alloc_size);
21090 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21091 if (alloc_size == 0)
21093 /* Make sure we have a zero-sized array. */
21094 @@ -294,8 +293,7 @@
21098 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21099 - * extent[rank-1];
21100 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21102 retarray->offset = 0;
21103 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21104 @@ -307,7 +305,7 @@
21108 - retarray->base_addr = xmalloc (alloc_size);
21109 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21113 @@ -485,8 +483,7 @@
21114 retarray->offset = 0;
21115 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21117 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21118 - * extent[rank-1];
21119 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21121 if (alloc_size == 0)
21123 @@ -495,7 +492,7 @@
21127 - retarray->base_addr = xmalloc (alloc_size);
21128 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21132 Index: libgfortran/generated/minloc0_8_r4.c
21133 ===================================================================
21134 --- libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21135 +++ libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
21137 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21138 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21139 retarray->offset = 0;
21140 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21141 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21145 @@ -199,7 +199,7 @@
21146 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21147 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21148 retarray->offset = 0;
21149 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21150 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21154 @@ -367,7 +367,7 @@
21155 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21156 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21157 retarray->offset = 0;
21158 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21159 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21161 else if (unlikely (compile_options.bounds_check))
21163 Index: libgfortran/generated/matmul_l4.c
21164 ===================================================================
21165 --- libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21166 +++ libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
21170 retarray->base_addr
21171 - = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
21172 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
21173 retarray->offset = 0;
21175 else if (unlikely (compile_options.bounds_check))
21176 Index: libgfortran/generated/reshape_r8.c
21177 ===================================================================
21178 --- libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21179 +++ libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
21180 @@ -111,11 +111,11 @@
21183 if (unlikely (rs < 1))
21187 - alloc_size = rs * sizeof (GFC_REAL_8);
21190 - ret->base_addr = xmalloc (alloc_size);
21191 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21192 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21195 Index: libgfortran/generated/in_pack_c10.c
21196 ===================================================================
21197 --- libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
21198 +++ libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
21200 return source->base_addr;
21202 /* Allocate storage for the destination. */
21203 - destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
21204 + destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
21206 src = source->base_addr;
21207 stride0 = stride[0];
21208 Index: libgfortran/generated/all_l4.c
21209 ===================================================================
21210 --- libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21211 +++ libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch) (revision 217117)
21212 @@ -101,8 +101,7 @@
21213 retarray->offset = 0;
21214 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21216 - alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21217 - * extent[rank-1];
21218 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21220 if (alloc_size == 0)
21222 @@ -111,7 +110,7 @@
21226 - retarray->base_addr = xmalloc (alloc_size);
21227 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
21231 Index: libgfortran/generated/minloc0_8_i2.c
21232 ===================================================================
21233 --- libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
21234 +++ libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
21236 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21237 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21238 retarray->offset = 0;
21239 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21240 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21244 @@ -199,7 +199,7 @@
21245 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21246 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21247 retarray->offset = 0;
21248 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21249 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21253 @@ -367,7 +367,7 @@
21254 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21255 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21256 retarray->offset = 0;
21257 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21258 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21260 else if (unlikely (compile_options.bounds_check))
21262 Index: libgfortran/generated/norm2_r16.c
21263 ===================================================================
21264 --- libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21265 +++ libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
21266 @@ -105,10 +105,9 @@
21267 retarray->offset = 0;
21268 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21270 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21271 - * extent[rank-1];
21272 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21274 - retarray->base_addr = xmalloc (alloc_size);
21275 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
21276 if (alloc_size == 0)
21278 /* Make sure we have a zero-sized array. */
21279 Index: libgfortran/generated/reshape_c10.c
21280 ===================================================================
21281 --- libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
21282 +++ libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
21283 @@ -111,11 +111,11 @@
21286 if (unlikely (rs < 1))
21290 - alloc_size = rs * sizeof (GFC_COMPLEX_10);
21293 - ret->base_addr = xmalloc (alloc_size);
21294 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
21295 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21298 Index: libgfortran/generated/unpack_c16.c
21299 ===================================================================
21300 --- libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21301 +++ libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
21306 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
21307 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
21311 @@ -244,7 +244,7 @@
21315 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
21316 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
21320 Index: libgfortran/generated/maxloc1_4_r4.c
21321 ===================================================================
21322 --- libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21323 +++ libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
21325 retarray->offset = 0;
21326 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21328 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21329 - * extent[rank-1];
21330 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21332 - retarray->base_addr = xmalloc (alloc_size);
21333 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21334 if (alloc_size == 0)
21336 /* Make sure we have a zero-sized array. */
21337 @@ -294,8 +293,7 @@
21341 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21342 - * extent[rank-1];
21343 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21345 retarray->offset = 0;
21346 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21347 @@ -307,7 +305,7 @@
21351 - retarray->base_addr = xmalloc (alloc_size);
21352 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21356 @@ -485,8 +483,7 @@
21357 retarray->offset = 0;
21358 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21360 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21361 - * extent[rank-1];
21362 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21364 if (alloc_size == 0)
21366 @@ -495,7 +492,7 @@
21370 - retarray->base_addr = xmalloc (alloc_size);
21371 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21375 Index: libgfortran/generated/maxval_r8.c
21376 ===================================================================
21377 --- libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21378 +++ libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
21380 retarray->offset = 0;
21381 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21383 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21384 - * extent[rank-1];
21385 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21387 - retarray->base_addr = xmalloc (alloc_size);
21388 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21389 if (alloc_size == 0)
21391 /* Make sure we have a zero-sized array. */
21392 @@ -286,8 +285,7 @@
21396 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21397 - * extent[rank-1];
21398 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21400 retarray->offset = 0;
21401 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21402 @@ -299,7 +297,7 @@
21406 - retarray->base_addr = xmalloc (alloc_size);
21407 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21411 @@ -472,8 +470,7 @@
21412 retarray->offset = 0;
21413 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21415 - alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21416 - * extent[rank-1];
21417 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21419 if (alloc_size == 0)
21421 @@ -482,7 +479,7 @@
21425 - retarray->base_addr = xmalloc (alloc_size);
21426 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21430 Index: libgfortran/generated/transpose_c4.c
21431 ===================================================================
21432 --- libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21433 +++ libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
21435 GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
21436 GFC_DESCRIPTOR_EXTENT(source, 1));
21438 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
21439 + ret->base_addr = xmallocarray (size0 ((array_t *) ret),
21440 + sizeof (GFC_COMPLEX_4));
21442 } else if (unlikely (compile_options.bounds_check))
21444 Index: libgfortran/generated/eoshift1_4.c
21445 ===================================================================
21446 --- libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21447 +++ libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch) (revision 217117)
21448 @@ -105,8 +105,8 @@
21449 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
21452 - /* xmalloc allocates a single byte for zero size. */
21453 - ret->base_addr = xmalloc (size * arraysize);
21454 + /* xmallocarray allocates a single byte for zero size. */
21455 + ret->base_addr = xmallocarray (arraysize, size);
21458 else if (unlikely (compile_options.bounds_check))
21459 Index: libgfortran/generated/minval_r16.c
21460 ===================================================================
21461 --- libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21462 +++ libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
21464 retarray->offset = 0;
21465 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21467 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21468 - * extent[rank-1];
21469 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21471 - retarray->base_addr = xmalloc (alloc_size);
21472 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
21473 if (alloc_size == 0)
21475 /* Make sure we have a zero-sized array. */
21476 @@ -286,8 +285,7 @@
21480 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21481 - * extent[rank-1];
21482 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21484 retarray->offset = 0;
21485 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21486 @@ -299,7 +297,7 @@
21490 - retarray->base_addr = xmalloc (alloc_size);
21491 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
21495 @@ -472,8 +470,7 @@
21496 retarray->offset = 0;
21497 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21499 - alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21500 - * extent[rank-1];
21501 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21503 if (alloc_size == 0)
21505 @@ -482,7 +479,7 @@
21509 - retarray->base_addr = xmalloc (alloc_size);
21510 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
21514 Index: libgfortran/generated/iany_i16.c
21515 ===================================================================
21516 --- libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21517 +++ libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
21519 retarray->offset = 0;
21520 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21522 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21523 - * extent[rank-1];
21524 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21526 - retarray->base_addr = xmalloc (alloc_size);
21527 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21528 if (alloc_size == 0)
21530 /* Make sure we have a zero-sized array. */
21531 @@ -272,8 +271,7 @@
21535 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21536 - * extent[rank-1];
21537 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21539 retarray->offset = 0;
21540 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21541 @@ -285,7 +283,7 @@
21545 - retarray->base_addr = xmalloc (alloc_size);
21546 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21550 @@ -430,8 +428,7 @@
21551 retarray->offset = 0;
21552 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21554 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21555 - * extent[rank-1];
21556 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21558 if (alloc_size == 0)
21560 @@ -440,7 +437,7 @@
21564 - retarray->base_addr = xmalloc (alloc_size);
21565 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21569 Index: libgfortran/generated/maxloc1_4_i2.c
21570 ===================================================================
21571 --- libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
21572 +++ libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
21574 retarray->offset = 0;
21575 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21577 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21578 - * extent[rank-1];
21579 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21581 - retarray->base_addr = xmalloc (alloc_size);
21582 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21583 if (alloc_size == 0)
21585 /* Make sure we have a zero-sized array. */
21586 @@ -294,8 +293,7 @@
21590 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21591 - * extent[rank-1];
21592 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21594 retarray->offset = 0;
21595 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21596 @@ -307,7 +305,7 @@
21600 - retarray->base_addr = xmalloc (alloc_size);
21601 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21605 @@ -485,8 +483,7 @@
21606 retarray->offset = 0;
21607 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21609 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21610 - * extent[rank-1];
21611 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21613 if (alloc_size == 0)
21615 @@ -495,7 +492,7 @@
21619 - retarray->base_addr = xmalloc (alloc_size);
21620 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21624 Index: libgfortran/generated/maxloc1_8_i8.c
21625 ===================================================================
21626 --- libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21627 +++ libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
21629 retarray->offset = 0;
21630 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21632 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21633 - * extent[rank-1];
21634 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21636 - retarray->base_addr = xmalloc (alloc_size);
21637 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21638 if (alloc_size == 0)
21640 /* Make sure we have a zero-sized array. */
21641 @@ -294,8 +293,7 @@
21645 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21646 - * extent[rank-1];
21647 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21649 retarray->offset = 0;
21650 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21651 @@ -307,7 +305,7 @@
21655 - retarray->base_addr = xmalloc (alloc_size);
21656 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21660 @@ -485,8 +483,7 @@
21661 retarray->offset = 0;
21662 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21664 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21665 - * extent[rank-1];
21666 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21668 if (alloc_size == 0)
21670 @@ -495,7 +492,7 @@
21674 - retarray->base_addr = xmalloc (alloc_size);
21675 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21679 Index: libgfortran/generated/maxloc0_4_r8.c
21680 ===================================================================
21681 --- libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21682 +++ libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
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_4) * rank);
21688 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21692 @@ -199,7 +199,7 @@
21693 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21694 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21695 retarray->offset = 0;
21696 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21697 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21701 @@ -367,7 +367,7 @@
21702 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21703 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21704 retarray->offset = 0;
21705 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21706 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21708 else if (unlikely (compile_options.bounds_check))
21710 Index: libgfortran/generated/maxloc0_16_r16.c
21711 ===================================================================
21712 --- libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21713 +++ libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
21715 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21716 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21717 retarray->offset = 0;
21718 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21719 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21723 @@ -199,7 +199,7 @@
21724 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21725 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21726 retarray->offset = 0;
21727 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21728 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21732 @@ -367,7 +367,7 @@
21733 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21734 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21735 retarray->offset = 0;
21736 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21737 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21739 else if (unlikely (compile_options.bounds_check))
21741 Index: libgfortran/generated/sum_c10.c
21742 ===================================================================
21743 --- libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
21744 +++ libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
21746 retarray->offset = 0;
21747 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21749 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21750 - * extent[rank-1];
21751 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21753 - retarray->base_addr = xmalloc (alloc_size);
21754 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
21755 if (alloc_size == 0)
21757 /* Make sure we have a zero-sized array. */
21758 @@ -272,8 +271,7 @@
21762 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21763 - * extent[rank-1];
21764 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21766 retarray->offset = 0;
21767 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21768 @@ -285,7 +283,7 @@
21772 - retarray->base_addr = xmalloc (alloc_size);
21773 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
21777 @@ -430,8 +428,7 @@
21778 retarray->offset = 0;
21779 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21781 - alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21782 - * extent[rank-1];
21783 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21785 if (alloc_size == 0)
21787 @@ -440,7 +437,7 @@
21791 - retarray->base_addr = xmalloc (alloc_size);
21792 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
21796 Index: libgfortran/generated/iall_i4.c
21797 ===================================================================
21798 --- libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21799 +++ libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
21801 retarray->offset = 0;
21802 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21804 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21805 - * extent[rank-1];
21806 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21808 - retarray->base_addr = xmalloc (alloc_size);
21809 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21810 if (alloc_size == 0)
21812 /* Make sure we have a zero-sized array. */
21813 @@ -272,8 +271,7 @@
21817 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21818 - * extent[rank-1];
21819 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21821 retarray->offset = 0;
21822 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21823 @@ -285,7 +283,7 @@
21827 - retarray->base_addr = xmalloc (alloc_size);
21828 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21832 @@ -430,8 +428,7 @@
21833 retarray->offset = 0;
21834 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21836 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21837 - * extent[rank-1];
21838 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21840 if (alloc_size == 0)
21842 @@ -440,7 +437,7 @@
21846 - retarray->base_addr = xmalloc (alloc_size);
21847 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21851 Index: libgfortran/generated/minloc1_4_r16.c
21852 ===================================================================
21853 --- libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21854 +++ libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
21856 retarray->offset = 0;
21857 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21859 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21860 - * extent[rank-1];
21861 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21863 - retarray->base_addr = xmalloc (alloc_size);
21864 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21865 if (alloc_size == 0)
21867 /* Make sure we have a zero-sized array. */
21868 @@ -294,8 +293,7 @@
21872 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21873 - * extent[rank-1];
21874 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21876 retarray->offset = 0;
21877 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21878 @@ -307,7 +305,7 @@
21882 - retarray->base_addr = xmalloc (alloc_size);
21883 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21887 @@ -485,8 +483,7 @@
21888 retarray->offset = 0;
21889 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21891 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21892 - * extent[rank-1];
21893 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21895 if (alloc_size == 0)
21897 @@ -495,7 +492,7 @@
21901 - retarray->base_addr = xmalloc (alloc_size);
21902 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21906 Index: libgfortran/generated/maxloc0_8_r16.c
21907 ===================================================================
21908 --- libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21909 +++ libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
21911 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21912 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21913 retarray->offset = 0;
21914 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21915 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21919 @@ -199,7 +199,7 @@
21920 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21921 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21922 retarray->offset = 0;
21923 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21924 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21928 @@ -367,7 +367,7 @@
21929 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21930 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21931 retarray->offset = 0;
21932 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21933 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21935 else if (unlikely (compile_options.bounds_check))
21937 Index: libgfortran/generated/pack_r8.c
21938 ===================================================================
21939 --- libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
21940 +++ libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
21941 @@ -167,8 +167,8 @@
21945 - /* xmalloc allocates a single byte for zero size. */
21946 - ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
21947 + /* xmallocarray allocates a single byte for zero size. */
21948 + ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
21952 Index: libgfortran/generated/matmul_c10.c
21953 ===================================================================
21954 --- libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release) (revision 217117)
21955 +++ libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch) (revision 217117)
21956 @@ -124,7 +124,7 @@
21959 retarray->base_addr
21960 - = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
21961 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
21962 retarray->offset = 0;
21964 else if (unlikely (compile_options.bounds_check))
21965 Index: libgfortran/generated/maxloc0_16_i4.c
21966 ===================================================================
21967 --- libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
21968 +++ libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
21970 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21971 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21972 retarray->offset = 0;
21973 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21974 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21978 @@ -199,7 +199,7 @@
21979 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21980 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21981 retarray->offset = 0;
21982 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21983 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21987 @@ -367,7 +367,7 @@
21988 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21989 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21990 retarray->offset = 0;
21991 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21992 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21994 else if (unlikely (compile_options.bounds_check))
21996 Index: libgfortran/generated/pack_r16.c
21997 ===================================================================
21998 --- libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
21999 +++ libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
22000 @@ -167,8 +167,8 @@
22004 - /* xmalloc allocates a single byte for zero size. */
22005 - ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
22006 + /* xmallocarray allocates a single byte for zero size. */
22007 + ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
22011 Index: libgfortran/generated/minloc1_16_i8.c
22012 ===================================================================
22013 --- libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22014 +++ libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
22016 retarray->offset = 0;
22017 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22019 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22020 - * extent[rank-1];
22021 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22023 - retarray->base_addr = xmalloc (alloc_size);
22024 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22025 if (alloc_size == 0)
22027 /* Make sure we have a zero-sized array. */
22028 @@ -294,8 +293,7 @@
22032 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22033 - * extent[rank-1];
22034 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22036 retarray->offset = 0;
22037 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22038 @@ -307,7 +305,7 @@
22042 - retarray->base_addr = xmalloc (alloc_size);
22043 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22047 @@ -485,8 +483,7 @@
22048 retarray->offset = 0;
22049 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22051 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22052 - * extent[rank-1];
22053 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22055 if (alloc_size == 0)
22057 @@ -495,7 +492,7 @@
22061 - retarray->base_addr = xmalloc (alloc_size);
22062 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22066 Index: libgfortran/generated/minloc0_16_r10.c
22067 ===================================================================
22068 --- libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
22069 +++ libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
22071 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22072 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22073 retarray->offset = 0;
22074 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22075 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22079 @@ -199,7 +199,7 @@
22080 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22081 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22082 retarray->offset = 0;
22083 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22084 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22088 @@ -367,7 +367,7 @@
22089 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22090 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22091 retarray->offset = 0;
22092 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22093 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22095 else if (unlikely (compile_options.bounds_check))
22097 Index: libgfortran/generated/unpack_c4.c
22098 ===================================================================
22099 --- libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
22100 +++ libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
22105 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
22106 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
22110 @@ -244,7 +244,7 @@
22114 - ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
22115 + ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
22119 Index: libgfortran/generated/iparity_i1.c
22120 ===================================================================
22121 --- libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
22122 +++ libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
22124 retarray->offset = 0;
22125 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22127 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22128 - * extent[rank-1];
22129 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22131 - retarray->base_addr = xmalloc (alloc_size);
22132 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22133 if (alloc_size == 0)
22135 /* Make sure we have a zero-sized array. */
22136 @@ -272,8 +271,7 @@
22140 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22141 - * extent[rank-1];
22142 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22144 retarray->offset = 0;
22145 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22146 @@ -285,7 +283,7 @@
22150 - retarray->base_addr = xmalloc (alloc_size);
22151 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22155 @@ -430,8 +428,7 @@
22156 retarray->offset = 0;
22157 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22159 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22160 - * extent[rank-1];
22161 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22163 if (alloc_size == 0)
22165 @@ -440,7 +437,7 @@
22169 - retarray->base_addr = xmalloc (alloc_size);
22170 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22174 Index: libgfortran/generated/product_c8.c
22175 ===================================================================
22176 --- libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22177 +++ libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
22179 retarray->offset = 0;
22180 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22182 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22183 - * extent[rank-1];
22184 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22186 - retarray->base_addr = xmalloc (alloc_size);
22187 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
22188 if (alloc_size == 0)
22190 /* Make sure we have a zero-sized array. */
22191 @@ -272,8 +271,7 @@
22195 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22196 - * extent[rank-1];
22197 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22199 retarray->offset = 0;
22200 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22201 @@ -285,7 +283,7 @@
22205 - retarray->base_addr = xmalloc (alloc_size);
22206 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
22210 @@ -430,8 +428,7 @@
22211 retarray->offset = 0;
22212 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22214 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22215 - * extent[rank-1];
22216 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22218 if (alloc_size == 0)
22220 @@ -440,7 +437,7 @@
22224 - retarray->base_addr = xmalloc (alloc_size);
22225 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
22229 Index: libgfortran/generated/in_pack_i16.c
22230 ===================================================================
22231 --- libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22232 +++ libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
22234 return source->base_addr;
22236 /* Allocate storage for the destination. */
22237 - destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
22238 + destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
22240 src = source->base_addr;
22241 stride0 = stride[0];
22242 Index: libgfortran/generated/minloc0_8_i4.c
22243 ===================================================================
22244 --- libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
22245 +++ libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
22247 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22248 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22249 retarray->offset = 0;
22250 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22251 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22255 @@ -199,7 +199,7 @@
22256 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22257 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22258 retarray->offset = 0;
22259 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22260 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22264 @@ -367,7 +367,7 @@
22265 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22266 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22267 retarray->offset = 0;
22268 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22269 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22271 else if (unlikely (compile_options.bounds_check))
22273 Index: libgfortran/generated/matmul_c4.c
22274 ===================================================================
22275 --- libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release) (revision 217117)
22276 +++ libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch) (revision 217117)
22277 @@ -124,7 +124,7 @@
22280 retarray->base_addr
22281 - = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
22282 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
22283 retarray->offset = 0;
22285 else if (unlikely (compile_options.bounds_check))
22286 Index: libgfortran/generated/reshape_i8.c
22287 ===================================================================
22288 --- libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22289 +++ libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
22290 @@ -111,11 +111,11 @@
22293 if (unlikely (rs < 1))
22297 - alloc_size = rs * sizeof (GFC_INTEGER_8);
22300 - ret->base_addr = xmalloc (alloc_size);
22301 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22302 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22305 Index: libgfortran/generated/in_pack_c8.c
22306 ===================================================================
22307 --- libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22308 +++ libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
22310 return source->base_addr;
22312 /* Allocate storage for the destination. */
22313 - destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
22314 + destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
22316 src = source->base_addr;
22317 stride0 = stride[0];
22318 Index: libgfortran/generated/bessel_r10.c
22319 ===================================================================
22320 --- libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
22321 +++ libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
22324 size_t size = n2 < n1 ? 0 : n2-n1+1;
22325 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
22326 - ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
22327 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
22331 @@ -122,7 +122,7 @@
22333 size_t size = n2 < n1 ? 0 : n2-n1+1;
22334 GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
22335 - ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
22336 + ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
22340 @@ -162,7 +162,7 @@
22342 x2rev = GFC_REAL_10_LITERAL(2.)/x;
22344 - for (i = 2; i <= n1+n2; i++)
22345 + for (i = 2; i <= n2 - n1; i++)
22347 #if defined(GFC_REAL_10_INFINITY)
22348 if (unlikely (last2 == -GFC_REAL_10_INFINITY))
22349 Index: libgfortran/generated/iall_i16.c
22350 ===================================================================
22351 --- libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22352 +++ libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
22354 retarray->offset = 0;
22355 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22357 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22358 - * extent[rank-1];
22359 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22361 - retarray->base_addr = xmalloc (alloc_size);
22362 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22363 if (alloc_size == 0)
22365 /* Make sure we have a zero-sized array. */
22366 @@ -272,8 +271,7 @@
22370 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22371 - * extent[rank-1];
22372 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22374 retarray->offset = 0;
22375 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22376 @@ -285,7 +283,7 @@
22380 - retarray->base_addr = xmalloc (alloc_size);
22381 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22385 @@ -430,8 +428,7 @@
22386 retarray->offset = 0;
22387 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22389 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22390 - * extent[rank-1];
22391 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22393 if (alloc_size == 0)
22395 @@ -440,7 +437,7 @@
22399 - retarray->base_addr = xmalloc (alloc_size);
22400 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22404 Index: libgfortran/generated/maxloc1_16_i1.c
22405 ===================================================================
22406 --- libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
22407 +++ libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
22409 retarray->offset = 0;
22410 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22412 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22413 - * extent[rank-1];
22414 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22416 - retarray->base_addr = xmalloc (alloc_size);
22417 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22418 if (alloc_size == 0)
22420 /* Make sure we have a zero-sized array. */
22421 @@ -294,8 +293,7 @@
22425 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22426 - * extent[rank-1];
22427 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22429 retarray->offset = 0;
22430 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22431 @@ -307,7 +305,7 @@
22435 - retarray->base_addr = xmalloc (alloc_size);
22436 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22440 @@ -485,8 +483,7 @@
22441 retarray->offset = 0;
22442 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22444 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22445 - * extent[rank-1];
22446 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22448 if (alloc_size == 0)
22450 @@ -495,7 +492,7 @@
22454 - retarray->base_addr = xmalloc (alloc_size);
22455 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22459 Index: libgfortran/generated/reshape_i16.c
22460 ===================================================================
22461 --- libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22462 +++ libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
22463 @@ -111,11 +111,11 @@
22466 if (unlikely (rs < 1))
22470 - alloc_size = rs * sizeof (GFC_INTEGER_16);
22473 - ret->base_addr = xmalloc (alloc_size);
22474 + ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22475 ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22478 Index: libgfortran/generated/count_16_l.c
22479 ===================================================================
22480 --- libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release) (revision 217117)
22481 +++ libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch) (revision 217117)
22482 @@ -101,8 +101,7 @@
22483 retarray->offset = 0;
22484 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22486 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22487 - * extent[rank-1];
22488 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22490 if (alloc_size == 0)
22492 @@ -111,7 +110,7 @@
22496 - retarray->base_addr = xmalloc (alloc_size);
22497 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22501 Index: libgfortran/generated/minloc1_8_i1.c
22502 ===================================================================
22503 --- libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
22504 +++ libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
22506 retarray->offset = 0;
22507 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22509 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22510 - * extent[rank-1];
22511 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22513 - retarray->base_addr = xmalloc (alloc_size);
22514 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22515 if (alloc_size == 0)
22517 /* Make sure we have a zero-sized array. */
22518 @@ -294,8 +293,7 @@
22522 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22523 - * extent[rank-1];
22524 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22526 retarray->offset = 0;
22527 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22528 @@ -307,7 +305,7 @@
22532 - retarray->base_addr = xmalloc (alloc_size);
22533 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22537 @@ -485,8 +483,7 @@
22538 retarray->offset = 0;
22539 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22541 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22542 - * extent[rank-1];
22543 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22545 if (alloc_size == 0)
22547 @@ -495,7 +492,7 @@
22551 - retarray->base_addr = xmalloc (alloc_size);
22552 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22556 Index: libgfortran/generated/maxloc1_4_i4.c
22557 ===================================================================
22558 --- libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release) (revision 217117)
22559 +++ libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch) (revision 217117)
22561 retarray->offset = 0;
22562 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22564 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22565 - * extent[rank-1];
22566 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22568 - retarray->base_addr = xmalloc (alloc_size);
22569 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22570 if (alloc_size == 0)
22572 /* Make sure we have a zero-sized array. */
22573 @@ -294,8 +293,7 @@
22577 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22578 - * extent[rank-1];
22579 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22581 retarray->offset = 0;
22582 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22583 @@ -307,7 +305,7 @@
22587 - retarray->base_addr = xmalloc (alloc_size);
22588 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22592 @@ -485,8 +483,7 @@
22593 retarray->offset = 0;
22594 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22596 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22597 - * extent[rank-1];
22598 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22600 if (alloc_size == 0)
22602 @@ -495,7 +492,7 @@
22606 - retarray->base_addr = xmalloc (alloc_size);
22607 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22611 Index: libgfortran/generated/maxval_i8.c
22612 ===================================================================
22613 --- libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22614 +++ libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
22616 retarray->offset = 0;
22617 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22619 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22620 - * extent[rank-1];
22621 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22623 - retarray->base_addr = xmalloc (alloc_size);
22624 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22625 if (alloc_size == 0)
22627 /* Make sure we have a zero-sized array. */
22628 @@ -286,8 +285,7 @@
22632 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22633 - * extent[rank-1];
22634 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22636 retarray->offset = 0;
22637 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22638 @@ -299,7 +297,7 @@
22642 - retarray->base_addr = xmalloc (alloc_size);
22643 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22647 @@ -472,8 +470,7 @@
22648 retarray->offset = 0;
22649 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22651 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22652 - * extent[rank-1];
22653 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22655 if (alloc_size == 0)
22657 @@ -482,7 +479,7 @@
22661 - retarray->base_addr = xmalloc (alloc_size);
22662 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22666 Index: libgfortran/generated/eoshift3_16.c
22667 ===================================================================
22668 --- libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22669 +++ libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch) (revision 217117)
22674 - ret->base_addr = xmalloc (size * arraysize);
22675 + ret->base_addr = xmallocarray (arraysize, size);
22677 ret->dtype = array->dtype;
22678 for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
22679 @@ -107,8 +107,8 @@
22680 GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
22683 - /* xmalloc allocates a single byte for zero size. */
22684 - ret->base_addr = xmalloc (size * arraysize);
22685 + /* xmallocarray allocates a single byte for zero size. */
22686 + ret->base_addr = xmallocarray (arraysize, size);
22689 else if (unlikely (compile_options.bounds_check))
22690 Index: libgfortran/generated/shape_i8.c
22691 ===================================================================
22692 --- libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22693 +++ libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
22696 GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
22698 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22699 + ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22702 stride = GFC_DESCRIPTOR_STRIDE(ret,0);
22703 Index: libgfortran/generated/maxloc0_4_i16.c
22704 ===================================================================
22705 --- libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22706 +++ libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
22708 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22709 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22710 retarray->offset = 0;
22711 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22712 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22716 @@ -199,7 +199,7 @@
22717 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22718 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22719 retarray->offset = 0;
22720 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22721 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22725 @@ -367,7 +367,7 @@
22726 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22727 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22728 retarray->offset = 0;
22729 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22730 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22732 else if (unlikely (compile_options.bounds_check))
22734 Index: libgfortran/generated/maxloc1_4_r10.c
22735 ===================================================================
22736 --- libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
22737 +++ libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
22739 retarray->offset = 0;
22740 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22742 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22743 - * extent[rank-1];
22744 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22746 - retarray->base_addr = xmalloc (alloc_size);
22747 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22748 if (alloc_size == 0)
22750 /* Make sure we have a zero-sized array. */
22751 @@ -294,8 +293,7 @@
22755 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22756 - * extent[rank-1];
22757 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22759 retarray->offset = 0;
22760 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22761 @@ -307,7 +305,7 @@
22765 - retarray->base_addr = xmalloc (alloc_size);
22766 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22770 @@ -485,8 +483,7 @@
22771 retarray->offset = 0;
22772 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22774 - alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22775 - * extent[rank-1];
22776 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22778 if (alloc_size == 0)
22780 @@ -495,7 +492,7 @@
22784 - retarray->base_addr = xmalloc (alloc_size);
22785 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22789 Index: libgfortran/generated/maxloc1_8_i16.c
22790 ===================================================================
22791 --- libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
22792 +++ libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
22794 retarray->offset = 0;
22795 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22797 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22798 - * extent[rank-1];
22799 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22801 - retarray->base_addr = xmalloc (alloc_size);
22802 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22803 if (alloc_size == 0)
22805 /* Make sure we have a zero-sized array. */
22806 @@ -294,8 +293,7 @@
22810 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22811 - * extent[rank-1];
22812 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22814 retarray->offset = 0;
22815 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22816 @@ -307,7 +305,7 @@
22820 - retarray->base_addr = xmalloc (alloc_size);
22821 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22825 @@ -485,8 +483,7 @@
22826 retarray->offset = 0;
22827 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22829 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22830 - * extent[rank-1];
22831 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22833 if (alloc_size == 0)
22835 @@ -495,7 +492,7 @@
22839 - retarray->base_addr = xmalloc (alloc_size);
22840 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22844 Index: libgfortran/generated/minloc0_8_r10.c
22845 ===================================================================
22846 --- libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
22847 +++ libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
22849 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22850 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22851 retarray->offset = 0;
22852 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22853 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22857 @@ -199,7 +199,7 @@
22858 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22859 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22860 retarray->offset = 0;
22861 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22862 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22866 @@ -367,7 +367,7 @@
22867 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22868 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22869 retarray->offset = 0;
22870 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22871 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22873 else if (unlikely (compile_options.bounds_check))
22875 Index: libgfortran/generated/iparity_i2.c
22876 ===================================================================
22877 --- libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
22878 +++ libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
22880 retarray->offset = 0;
22881 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22883 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22884 - * extent[rank-1];
22885 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22887 - retarray->base_addr = xmalloc (alloc_size);
22888 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22889 if (alloc_size == 0)
22891 /* Make sure we have a zero-sized array. */
22892 @@ -272,8 +271,7 @@
22896 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22897 - * extent[rank-1];
22898 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22900 retarray->offset = 0;
22901 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22902 @@ -285,7 +283,7 @@
22906 - retarray->base_addr = xmalloc (alloc_size);
22907 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22911 @@ -430,8 +428,7 @@
22912 retarray->offset = 0;
22913 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22915 - alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22916 - * extent[rank-1];
22917 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22919 if (alloc_size == 0)
22921 @@ -440,7 +437,7 @@
22925 - retarray->base_addr = xmalloc (alloc_size);
22926 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22930 Index: libgfortran/generated/maxloc1_16_r4.c
22931 ===================================================================
22932 --- libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
22933 +++ libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
22935 retarray->offset = 0;
22936 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22938 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22939 - * extent[rank-1];
22940 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22942 - retarray->base_addr = xmalloc (alloc_size);
22943 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22944 if (alloc_size == 0)
22946 /* Make sure we have a zero-sized array. */
22947 @@ -294,8 +293,7 @@
22951 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22952 - * extent[rank-1];
22953 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22955 retarray->offset = 0;
22956 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22957 @@ -307,7 +305,7 @@
22961 - retarray->base_addr = xmalloc (alloc_size);
22962 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22966 @@ -485,8 +483,7 @@
22967 retarray->offset = 0;
22968 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22970 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22971 - * extent[rank-1];
22972 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22974 if (alloc_size == 0)
22976 @@ -495,7 +492,7 @@
22980 - retarray->base_addr = xmalloc (alloc_size);
22981 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22985 Index: libgfortran/generated/maxloc0_16_r8.c
22986 ===================================================================
22987 --- libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
22988 +++ libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
22990 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22991 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22992 retarray->offset = 0;
22993 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22994 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22998 @@ -199,7 +199,7 @@
22999 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23000 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23001 retarray->offset = 0;
23002 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23003 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23007 @@ -367,7 +367,7 @@
23008 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23009 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23010 retarray->offset = 0;
23011 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23012 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23014 else if (unlikely (compile_options.bounds_check))
23016 Index: libgfortran/generated/sum_i16.c
23017 ===================================================================
23018 --- libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23019 +++ libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
23021 retarray->offset = 0;
23022 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23024 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23025 - * extent[rank-1];
23026 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23028 - retarray->base_addr = xmalloc (alloc_size);
23029 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23030 if (alloc_size == 0)
23032 /* Make sure we have a zero-sized array. */
23033 @@ -272,8 +271,7 @@
23037 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23038 - * extent[rank-1];
23039 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23041 retarray->offset = 0;
23042 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23043 @@ -285,7 +283,7 @@
23047 - retarray->base_addr = xmalloc (alloc_size);
23048 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23052 @@ -430,8 +428,7 @@
23053 retarray->offset = 0;
23054 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23056 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23057 - * extent[rank-1];
23058 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23060 if (alloc_size == 0)
23062 @@ -440,7 +437,7 @@
23066 - retarray->base_addr = xmalloc (alloc_size);
23067 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23071 Index: libgfortran/generated/maxloc0_4_i8.c
23072 ===================================================================
23073 --- libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23074 +++ libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
23076 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23077 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23078 retarray->offset = 0;
23079 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23080 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23084 @@ -199,7 +199,7 @@
23085 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23086 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23087 retarray->offset = 0;
23088 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23089 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23093 @@ -367,7 +367,7 @@
23094 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23095 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23096 retarray->offset = 0;
23097 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23098 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23100 else if (unlikely (compile_options.bounds_check))
23102 Index: libgfortran/generated/pack_c16.c
23103 ===================================================================
23104 --- libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23105 +++ libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch) (revision 217117)
23106 @@ -167,8 +167,8 @@
23110 - /* xmalloc allocates a single byte for zero size. */
23111 - ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
23112 + /* xmallocarray allocates a single byte for zero size. */
23113 + ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
23117 Index: libgfortran/generated/maxloc1_16_i16.c
23118 ===================================================================
23119 --- libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23120 +++ libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
23122 retarray->offset = 0;
23123 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23125 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23126 - * extent[rank-1];
23127 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23129 - retarray->base_addr = xmalloc (alloc_size);
23130 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23131 if (alloc_size == 0)
23133 /* Make sure we have a zero-sized array. */
23134 @@ -294,8 +293,7 @@
23138 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23139 - * extent[rank-1];
23140 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23142 retarray->offset = 0;
23143 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23144 @@ -307,7 +305,7 @@
23148 - retarray->base_addr = xmalloc (alloc_size);
23149 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23153 @@ -485,8 +483,7 @@
23154 retarray->offset = 0;
23155 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23157 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23158 - * extent[rank-1];
23159 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23161 if (alloc_size == 0)
23163 @@ -495,7 +492,7 @@
23167 - retarray->base_addr = xmalloc (alloc_size);
23168 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23172 Index: libgfortran/generated/minloc1_8_r4.c
23173 ===================================================================
23174 --- libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release) (revision 217117)
23175 +++ libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch) (revision 217117)
23177 retarray->offset = 0;
23178 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23180 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23181 - * extent[rank-1];
23182 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23184 - retarray->base_addr = xmalloc (alloc_size);
23185 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23186 if (alloc_size == 0)
23188 /* Make sure we have a zero-sized array. */
23189 @@ -294,8 +293,7 @@
23193 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23194 - * extent[rank-1];
23195 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23197 retarray->offset = 0;
23198 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23199 @@ -307,7 +305,7 @@
23203 - retarray->base_addr = xmalloc (alloc_size);
23204 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23208 @@ -485,8 +483,7 @@
23209 retarray->offset = 0;
23210 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23212 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23213 - * extent[rank-1];
23214 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23216 if (alloc_size == 0)
23218 @@ -495,7 +492,7 @@
23222 - retarray->base_addr = xmalloc (alloc_size);
23223 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23227 Index: libgfortran/generated/sum_c8.c
23228 ===================================================================
23229 --- libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23230 +++ libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
23232 retarray->offset = 0;
23233 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23235 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23236 - * extent[rank-1];
23237 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23239 - retarray->base_addr = xmalloc (alloc_size);
23240 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23241 if (alloc_size == 0)
23243 /* Make sure we have a zero-sized array. */
23244 @@ -272,8 +271,7 @@
23248 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23249 - * extent[rank-1];
23250 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23252 retarray->offset = 0;
23253 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23254 @@ -285,7 +283,7 @@
23258 - retarray->base_addr = xmalloc (alloc_size);
23259 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23263 @@ -430,8 +428,7 @@
23264 retarray->offset = 0;
23265 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23267 - alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23268 - * extent[rank-1];
23269 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23271 if (alloc_size == 0)
23273 @@ -440,7 +437,7 @@
23277 - retarray->base_addr = xmalloc (alloc_size);
23278 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23282 Index: libgfortran/generated/maxloc1_16_i2.c
23283 ===================================================================
23284 --- libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
23285 +++ libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
23287 retarray->offset = 0;
23288 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23290 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23291 - * extent[rank-1];
23292 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23294 - retarray->base_addr = xmalloc (alloc_size);
23295 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23296 if (alloc_size == 0)
23298 /* Make sure we have a zero-sized array. */
23299 @@ -294,8 +293,7 @@
23303 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23304 - * extent[rank-1];
23305 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23307 retarray->offset = 0;
23308 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23309 @@ -307,7 +305,7 @@
23313 - retarray->base_addr = xmalloc (alloc_size);
23314 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23318 @@ -485,8 +483,7 @@
23319 retarray->offset = 0;
23320 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23322 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23323 - * extent[rank-1];
23324 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23326 if (alloc_size == 0)
23328 @@ -495,7 +492,7 @@
23332 - retarray->base_addr = xmalloc (alloc_size);
23333 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23337 Index: libgfortran/generated/parity_l1.c
23338 ===================================================================
23339 --- libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
23340 +++ libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
23342 retarray->offset = 0;
23343 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23345 - alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23346 - * extent[rank-1];
23347 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23349 - retarray->base_addr = xmalloc (alloc_size);
23350 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
23351 if (alloc_size == 0)
23353 /* Make sure we have a zero-sized array. */
23354 Index: libgfortran/generated/maxval_i16.c
23355 ===================================================================
23356 --- libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23357 +++ libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
23359 retarray->offset = 0;
23360 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23362 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23363 - * extent[rank-1];
23364 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23366 - retarray->base_addr = xmalloc (alloc_size);
23367 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23368 if (alloc_size == 0)
23370 /* Make sure we have a zero-sized array. */
23371 @@ -286,8 +285,7 @@
23375 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23376 - * extent[rank-1];
23377 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23379 retarray->offset = 0;
23380 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23381 @@ -299,7 +297,7 @@
23385 - retarray->base_addr = xmalloc (alloc_size);
23386 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23390 @@ -472,8 +470,7 @@
23391 retarray->offset = 0;
23392 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23394 - alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23395 - * extent[rank-1];
23396 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23398 if (alloc_size == 0)
23400 @@ -482,7 +479,7 @@
23404 - retarray->base_addr = xmalloc (alloc_size);
23405 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23409 Index: libgfortran/generated/spread_c8.c
23410 ===================================================================
23411 --- libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23412 +++ libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch) (revision 217117)
23413 @@ -101,8 +101,8 @@
23417 - /* xmalloc allocates a single byte for zero size. */
23418 - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
23419 + /* xmallocarray allocates a single byte for zero size. */
23420 + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
23424 @@ -244,7 +244,7 @@
23426 if (ret->base_addr == NULL)
23428 - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
23429 + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
23431 GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
23433 Index: libgfortran/generated/matmul_i16.c
23434 ===================================================================
23435 --- libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23436 +++ libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch) (revision 217117)
23437 @@ -124,7 +124,7 @@
23440 retarray->base_addr
23441 - = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
23442 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
23443 retarray->offset = 0;
23445 else if (unlikely (compile_options.bounds_check))
23446 Index: libgfortran/generated/pack_i8.c
23447 ===================================================================
23448 --- libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23449 +++ libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch) (revision 217117)
23450 @@ -167,8 +167,8 @@
23454 - /* xmalloc allocates a single byte for zero size. */
23455 - ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
23456 + /* xmallocarray allocates a single byte for zero size. */
23457 + ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
23461 Index: libgfortran/generated/any_l1.c
23462 ===================================================================
23463 --- libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release) (revision 217117)
23464 +++ libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch) (revision 217117)
23465 @@ -101,8 +101,7 @@
23466 retarray->offset = 0;
23467 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23469 - alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23470 - * extent[rank-1];
23471 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23473 if (alloc_size == 0)
23475 @@ -111,7 +110,7 @@
23479 - retarray->base_addr = xmalloc (alloc_size);
23480 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
23484 Index: libgfortran/generated/minloc1_8_i2.c
23485 ===================================================================
23486 --- libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release) (revision 217117)
23487 +++ libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch) (revision 217117)
23489 retarray->offset = 0;
23490 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23492 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23493 - * extent[rank-1];
23494 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23496 - retarray->base_addr = xmalloc (alloc_size);
23497 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23498 if (alloc_size == 0)
23500 /* Make sure we have a zero-sized array. */
23501 @@ -294,8 +293,7 @@
23505 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23506 - * extent[rank-1];
23507 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23509 retarray->offset = 0;
23510 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23511 @@ -307,7 +305,7 @@
23515 - retarray->base_addr = xmalloc (alloc_size);
23516 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23520 @@ -485,8 +483,7 @@
23521 retarray->offset = 0;
23522 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23524 - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23525 - * extent[rank-1];
23526 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23528 if (alloc_size == 0)
23530 @@ -495,7 +492,7 @@
23534 - retarray->base_addr = xmalloc (alloc_size);
23535 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23539 Index: libgfortran/generated/minloc0_8_r8.c
23540 ===================================================================
23541 --- libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23542 +++ libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch) (revision 217117)
23544 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23545 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23546 retarray->offset = 0;
23547 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23548 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23552 @@ -199,7 +199,7 @@
23553 GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23554 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23555 retarray->offset = 0;
23556 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23557 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23561 @@ -367,7 +367,7 @@
23562 GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23563 retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23564 retarray->offset = 0;
23565 - retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23566 + retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23568 else if (unlikely (compile_options.bounds_check))
23570 Index: libgfortran/generated/matmul_l8.c
23571 ===================================================================
23572 --- libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23573 +++ libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
23577 retarray->base_addr
23578 - = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
23579 + = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
23580 retarray->offset = 0;
23582 else if (unlikely (compile_options.bounds_check))
23583 Index: libgfortran/generated/product_r10.c
23584 ===================================================================
23585 --- libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release) (revision 217117)
23586 +++ libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch) (revision 217117)
23588 retarray->offset = 0;
23589 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23591 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23592 - * extent[rank-1];
23593 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23595 - retarray->base_addr = xmalloc (alloc_size);
23596 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23597 if (alloc_size == 0)
23599 /* Make sure we have a zero-sized array. */
23600 @@ -272,8 +271,7 @@
23604 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23605 - * extent[rank-1];
23606 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23608 retarray->offset = 0;
23609 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23610 @@ -285,7 +283,7 @@
23614 - retarray->base_addr = xmalloc (alloc_size);
23615 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23619 @@ -430,8 +428,7 @@
23620 retarray->offset = 0;
23621 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23623 - alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23624 - * extent[rank-1];
23625 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23627 if (alloc_size == 0)
23629 @@ -440,7 +437,7 @@
23633 - retarray->base_addr = xmalloc (alloc_size);
23634 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23638 Index: libgfortran/generated/product_i1.c
23639 ===================================================================
23640 --- libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
23641 +++ libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
23643 retarray->offset = 0;
23644 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23646 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23647 - * extent[rank-1];
23648 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23650 - retarray->base_addr = xmalloc (alloc_size);
23651 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23652 if (alloc_size == 0)
23654 /* Make sure we have a zero-sized array. */
23655 @@ -272,8 +271,7 @@
23659 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23660 - * extent[rank-1];
23661 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23663 retarray->offset = 0;
23664 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23665 @@ -285,7 +283,7 @@
23669 - retarray->base_addr = xmalloc (alloc_size);
23670 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23674 @@ -430,8 +428,7 @@
23675 retarray->offset = 0;
23676 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23678 - alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23679 - * extent[rank-1];
23680 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23682 if (alloc_size == 0)
23684 @@ -440,7 +437,7 @@
23688 - retarray->base_addr = xmalloc (alloc_size);
23689 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23693 Index: libgfortran/generated/all_l8.c
23694 ===================================================================
23695 --- libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release) (revision 217117)
23696 +++ libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch) (revision 217117)
23697 @@ -101,8 +101,7 @@
23698 retarray->offset = 0;
23699 retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23701 - alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23702 - * extent[rank-1];
23703 + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23705 if (alloc_size == 0)
23707 @@ -111,7 +110,7 @@
23711 - retarray->base_addr = xmalloc (alloc_size);
23712 + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
23716 Index: libgfortran/generated/in_pack_r16.c
23717 ===================================================================
23718 --- libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release) (revision 217117)
23719 +++ libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch) (revision 217117)
23721 return source->base_addr;
23723 /* Allocate storage for the destination. */
23724 - destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
23725 + destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
23727 src = source->base_addr;
23728 stride0 = stride[0];
23729 Index: libgfortran/generated/in_pack_i1.c
23730 ===================================================================
23731 --- libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release) (revision 217117)
23732 +++ libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch) (revision 217117)
23734 return source->base_addr;
23736 /* Allocate storage for the destination. */
23737 - destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
23738 + destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
23740 src = source->base_addr;
23741 stride0 = stride[0];
23742 Index: libgfortran/libgfortran.h
23743 ===================================================================
23744 --- libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release) (revision 217117)
23745 +++ libgfortran/libgfortran.h (.../branches/gcc-4_8-branch) (revision 217117)
23746 @@ -751,6 +751,9 @@
23747 extern void *xmalloc (size_t) __attribute__ ((malloc));
23748 internal_proto(xmalloc);
23750 +extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
23751 +internal_proto(xmallocarray);
23753 extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
23754 internal_proto(xcalloc);
23756 Index: libgfortran/config.h.in
23757 ===================================================================
23758 --- libgfortran/config.h.in (.../tags/gcc_4_8_3_release) (revision 217117)
23759 +++ libgfortran/config.h.in (.../branches/gcc-4_8-branch) (revision 217117)
23760 @@ -711,6 +711,9 @@
23761 /* Define to 1 if you have the `strtof' function. */
23764 +/* Define to 1 if you have the `strtok_r' function. */
23765 +#undef HAVE_STRTOK_R
23767 /* Define to 1 if you have the `strtold' function. */
23768 #undef HAVE_STRTOLD
23770 Index: libgfortran/io/list_read.c
23771 ===================================================================
23772 --- libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release) (revision 217117)
23773 +++ libgfortran/io/list_read.c (.../branches/gcc-4_8-branch) (revision 217117)
23774 @@ -2354,7 +2354,7 @@
23776 index_type len = strlen (nl->var_name) + 1;
23778 - char * ext_name = (char*)xmalloc (len + 1);
23779 + char * ext_name = xmalloc (len + 1);
23780 memcpy (ext_name, nl->var_name, len-1);
23781 memcpy (ext_name + len - 1, "%", 2);
23782 for (nl = nl->next; nl; nl = nl->next)
23783 Index: libgfortran/io/unit.c
23784 ===================================================================
23785 --- libgfortran/io/unit.c (.../tags/gcc_4_8_3_release) (revision 217117)
23786 +++ libgfortran/io/unit.c (.../branches/gcc-4_8-branch) (revision 217117)
23787 @@ -455,7 +455,7 @@
23789 iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
23790 iunit->ls = (array_loop_spec *)
23791 - xmalloc (iunit->rank * sizeof (array_loop_spec));
23792 + xmallocarray (iunit->rank, sizeof (array_loop_spec));
23793 dtp->internal_unit_len *=
23794 init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
23796 Index: libgfortran/io/unix.c
23797 ===================================================================
23798 --- libgfortran/io/unix.c (.../tags/gcc_4_8_3_release) (revision 217117)
23799 +++ libgfortran/io/unix.c (.../branches/gcc-4_8-branch) (revision 217117)
23800 @@ -407,7 +407,9 @@
23804 - if (s->fd != STDOUT_FILENO
23807 + else if (s->fd != STDOUT_FILENO
23808 && s->fd != STDERR_FILENO
23809 && s->fd != STDIN_FILENO)
23810 retval = close (s->fd);
23811 @@ -983,7 +985,15 @@
23813 /* Get the current length of the file. */
23815 - fstat (fd, &statbuf);
23816 + if (fstat (fd, &statbuf) == -1)
23818 + s->st_dev = s->st_ino = -1;
23819 + s->file_length = 0;
23820 + if (errno == EBADF)
23823 + return (stream *) s;
23826 s->st_dev = statbuf.st_dev;
23827 s->st_ino = statbuf.st_ino;
23828 Index: libgfortran/io/transfer.c
23829 ===================================================================
23830 --- libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release) (revision 217117)
23831 +++ libgfortran/io/transfer.c (.../branches/gcc-4_8-branch) (revision 217117)
23832 @@ -3776,9 +3776,9 @@
23833 if (nml->var_rank > 0)
23835 nml->dim = (descriptor_dimension*)
23836 - xmalloc (nml->var_rank * sizeof (descriptor_dimension));
23837 + xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
23838 nml->ls = (array_loop_spec*)
23839 - xmalloc (nml->var_rank * sizeof (array_loop_spec));
23840 + xmallocarray (nml->var_rank, sizeof (array_loop_spec));
23844 Index: libgfortran/io/write.c
23845 ===================================================================
23846 --- libgfortran/io/write.c (.../tags/gcc_4_8_3_release) (revision 217117)
23847 +++ libgfortran/io/write.c (.../branches/gcc-4_8-branch) (revision 217117)
23848 @@ -1863,7 +1863,7 @@
23849 base_var_name_len = base ? strlen (base->var_name) : 0;
23850 ext_name_len = base_name_len + base_var_name_len
23851 + strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
23852 - ext_name = (char*)xmalloc (ext_name_len);
23853 + ext_name = xmalloc (ext_name_len);
23855 memcpy (ext_name, base_name, base_name_len);
23856 clen = strlen (obj->var_name + base_var_name_len);
23857 @@ -1892,7 +1892,7 @@
23858 /* Now obj_name. */
23860 obj_name_len = strlen (obj->var_name) + 1;
23861 - obj_name = xmalloc (obj_name_len+1);
23862 + obj_name = xmalloc (obj_name_len + 1);
23863 memcpy (obj_name, obj->var_name, obj_name_len-1);
23864 memcpy (obj_name + obj_name_len-1, "%", 2);
23866 Index: libada/Makefile.in
23867 ===================================================================
23868 --- libada/Makefile.in (.../tags/gcc_4_8_3_release) (revision 217117)
23869 +++ libada/Makefile.in (.../branches/gcc-4_8-branch) (revision 217117)
23871 PICFLAG = @PICFLAG@
23872 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
23874 -GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
23875 +GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
23876 -fexceptions -DIN_RTS @have_getipinfo@
23878 host_subdir = @host_subdir@
23879 Index: libada/ChangeLog
23880 ===================================================================
23881 --- libada/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
23882 +++ libada/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
23884 +2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
23886 + * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
23888 2014-05-22 Release Manager
23890 * GCC 4.8.3 released.
23891 Index: libffi/src/powerpc/linux64_closure.S
23892 ===================================================================
23893 --- libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release) (revision 217117)
23894 +++ libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch) (revision 217117)
23895 @@ -381,7 +381,8 @@
23899 -# if defined __ELF__ && defined __linux__
23902 +#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
23903 .section .note.GNU-stack,"",@progbits
23906 Index: libffi/src/powerpc/linux64.S
23907 ===================================================================
23908 --- libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release) (revision 217117)
23909 +++ libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch) (revision 217117)
23910 @@ -254,7 +254,8 @@
23914 -# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
23917 +#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
23918 .section .note.GNU-stack,"",@progbits
23921 Index: libffi/ChangeLog
23922 ===================================================================
23923 --- libffi/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
23924 +++ libffi/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
23926 +2014-09-11 Jakub Jelinek <jakub@redhat.com>
23928 + * src/powerpc/linux64.S: Emit .note.GNU-stack even when
23929 + POWERPC64 is not defined.
23930 + * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
23932 2014-05-22 Release Manager
23934 * GCC 4.8.3 released.
23935 Index: libcpp/ChangeLog
23936 ===================================================================
23937 --- libcpp/ChangeLog (.../tags/gcc_4_8_3_release) (revision 217117)
23938 +++ libcpp/ChangeLog (.../branches/gcc-4_8-branch) (revision 217117)
23940 +2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23942 + Backport from mainline r215873
23943 + 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23945 + * lex.c (search_line_fast): Add new version to be used for Power8
23946 + and later targets when Altivec is enabled. Restrict the existing
23947 + Altivec version to big-endian systems so that lvsr is not used on
23948 + little endian, where it is deprecated. Remove LE-specific code
23949 + from the now-BE-only version.
23951 2014-05-22 Release Manager
23953 * GCC 4.8.3 released.
23954 Index: libcpp/lex.c
23955 ===================================================================
23956 --- libcpp/lex.c (.../tags/gcc_4_8_3_release) (revision 217117)
23957 +++ libcpp/lex.c (.../branches/gcc-4_8-branch) (revision 217117)
23958 @@ -515,9 +515,111 @@
23959 search_line_fast = impl;
23962 -#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
23963 +#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
23965 -/* A vection of the fast scanner using AltiVec vectorized byte compares. */
23966 +/* A vection of the fast scanner using AltiVec vectorized byte compares
23967 + and VSX unaligned loads (when VSX is available). This is otherwise
23968 + the same as the pre-GCC 5 version. */
23970 +static const uchar *
23971 +search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
23973 + typedef __attribute__((altivec(vector))) unsigned char vc;
23975 + const vc repl_nl = {
23976 + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
23977 + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
23979 + const vc repl_cr = {
23980 + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
23981 + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
23983 + const vc repl_bs = {
23984 + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
23985 + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
23987 + const vc repl_qm = {
23988 + '?', '?', '?', '?', '?', '?', '?', '?',
23989 + '?', '?', '?', '?', '?', '?', '?', '?',
23991 + const vc zero = { 0 };
23995 + /* Main loop processing 16 bytes at a time. */
23998 + vc m_nl, m_cr, m_bs, m_qm;
24000 + data = *((const vc *)s);
24003 + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
24004 + m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
24005 + m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
24006 + m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
24007 + t = (m_nl | m_cr) | (m_bs | m_qm);
24009 + /* T now contains 0xff in bytes for which we matched one of the relevant
24010 + characters. We want to exit the loop if any byte in T is non-zero.
24011 + Below is the expansion of vec_any_ne(t, zero). */
24013 + while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
24015 + /* Restore s to to point to the 16 bytes we just processed. */
24019 +#define N (sizeof(vc) / sizeof(long))
24023 + /* Statically assert that N is 2 or 4. */
24024 + unsigned long l[(N == 2 || N == 4) ? N : -1];
24026 + unsigned long l, i = 0;
24030 + /* Find the first word of T that is non-zero. */
24037 + s += sizeof(unsigned long);
24041 + s += sizeof(unsigned long);
24046 + s += sizeof(unsigned long);
24050 + /* L now contains 0xff in bytes for which we matched one of the
24051 + relevant characters. We can find the byte index by finding
24052 + its bit index and dividing by 8. */
24053 +#ifdef __BIG_ENDIAN__
24054 + l = __builtin_clzl(l) >> 3;
24056 + l = __builtin_ctzl(l) >> 3;
24064 +#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
24066 +/* A vection of the fast scanner using AltiVec vectorized byte compares.
24067 + This cannot be used for little endian because vec_lvsl/lvsr are
24068 + deprecated for little endian and the code won't work properly. */
24069 /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
24070 so we can't compile this function without -maltivec on the command line
24071 (or implied by some other switch). */
24072 @@ -559,13 +661,8 @@
24073 beginning with all ones and shifting in zeros according to the
24074 mis-alignment. The LVSR instruction pulls the exact shift we
24075 want from the address. */
24076 -#ifdef __BIG_ENDIAN__
24077 mask = __builtin_vec_lvsr(0, s);
24078 mask = __builtin_vec_perm(zero, ones, mask);
24080 - mask = __builtin_vec_lvsl(0, s);
24081 - mask = __builtin_vec_perm(ones, zero, mask);
24085 /* While altivec loads mask addresses, we still need to align S so
24086 @@ -629,11 +726,7 @@
24087 /* L now contains 0xff in bytes for which we matched one of the
24088 relevant characters. We can find the byte index by finding
24089 its bit index and dividing by 8. */
24090 -#ifdef __BIG_ENDIAN__
24091 l = __builtin_clzl(l) >> 3;
24093 - l = __builtin_ctzl(l) >> 3;
24099 ===================================================================
24100 --- . (.../tags/gcc_4_8_3_release) (revision 217117)
24101 +++ . (.../branches/gcc-4_8-branch) (revision 217117)
24103 Property changes on: .
24104 ___________________________________________________________________
24105 Modified: svn:mergeinfo
24106 Merged /trunk:r211733,215049