1
# DP: updates from the 4.8 branch upto 20141014 (r216202).
5
cat > ${dir}LAST_UPDATED <<EOF
6
Tue Oct 14 16:18:10 CEST 2014
7
Tue Oct 14 14:18:10 UTC 2014 (revision 216202)
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: libstdc++-v3/python/libstdcxx/v6/printers.py
16
===================================================================
17
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_8_3_release)
18
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_8-branch)
20
-# Pretty-printers for libstc++.
21
+# Pretty-printers for libstdc++.
23
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
31
+### Python 2 + Python 3 compatibility code
33
+# Resources about compatibility:
35
+# * <http://pythonhosted.org/six/>: Documentation of the "six" module
37
+# FIXME: The handling of e.g. std::basic_string (at least on char)
38
+# probably needs updating to work with Python 3's new string rules.
40
+# In particular, Python 3 has a separate type (called byte) for
41
+# bytestrings, and a special b"" syntax for the byte literals; the old
42
+# str() type has been redefined to always store Unicode text.
44
+# We probably can't do much about this until this GDB PR is addressed:
45
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
47
+if sys.version_info[0] > 2:
50
+ # Python 3 folds these into the normal functions.
53
+ # Also, int subsumes long
58
+ """Compatibility mixin for iterators
60
+ Instead of writing next() methods for iterators, write
61
+ __next__() methods and use this mixin to make them work in
62
+ Python 2 as well as Python 3.
64
+ Idea stolen from the "six" documentation:
65
+ <http://pythonhosted.org/six/#six.Iterator>
69
+ return self.__next__()
71
+ # In Python 2, we still need these from itertools
72
+ from itertools import imap, izip
74
# Try to use the new-style pretty-printing if available.
78
# anything fancier here.
79
field = typ.fields()[0]
80
if not field.is_base_class:
81
- raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
82
+ raise ValueError("Cannot find type %s::%s" % (str(orig), name))
85
class SharedPointerPrinter:
91
+ class _iterator(Iterator):
92
def __init__(self, nodetype, head):
93
self.nodetype = nodetype
94
self.base = head['_M_next']
100
+ def __next__(self):
101
if self.base == self.head:
103
elt = self.base.cast(self.nodetype).dereference()
105
class StdSlistPrinter:
106
"Print a __gnu_cxx::slist"
109
+ class _iterator(Iterator):
110
def __init__(self, nodetype, head):
111
self.nodetype = nodetype
112
self.base = head['_M_head']['_M_next']
118
+ def __next__(self):
121
elt = self.base.cast(self.nodetype).dereference()
123
class StdVectorPrinter:
124
"Print a std::vector"
127
+ class _iterator(Iterator):
128
def __init__ (self, start, finish, bitvec):
136
+ def __next__(self):
138
self.count = self.count + 1
141
class StdTuplePrinter:
145
+ class _iterator(Iterator):
146
def __init__ (self, head):
149
@@ -276,13 +320,13 @@
150
# Set the actual head to the first pair.
151
self.head = self.head.cast (nodes[0].type)
152
elif len (nodes) != 0:
153
- raise ValueError, "Top of tuple tree does not consist of a single node."
154
+ raise ValueError("Top of tuple tree does not consist of a single node.")
161
+ def __next__ (self):
162
nodes = self.head.type.fields ()
163
# Check for further recursions in the inheritance tree.
167
# Check that this iteration has an expected structure.
169
- raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
170
+ raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
172
# - Left node is the next recursion parent.
173
# - Right node is the actual class contained in the tuple.
175
return self.visualizer.display_hint ()
178
-class RbtreeIterator:
179
+class RbtreeIterator(Iterator):
180
def __init__(self, rbtree):
181
self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
182
self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
185
return int (self.size)
188
+ def __next__(self):
189
if self.count == self.size:
193
"Print a std::map or std::multimap"
195
# Turn an RbtreeIterator into a pretty-print iterator.
197
+ class _iter(Iterator):
198
def __init__(self, rbiter, type):
206
+ def __next__(self):
207
if self.count % 2 == 0:
208
- n = self.rbiter.next()
209
+ n = next(self.rbiter)
210
n = n.cast(self.type).dereference()['_M_value_field']
214
"Print a std::set or std::multiset"
216
# Turn an RbtreeIterator into a pretty-print iterator.
218
+ class _iter(Iterator):
219
def __init__(self, rbiter, type):
227
- item = self.rbiter.next()
228
+ def __next__(self):
229
+ item = next(self.rbiter)
230
item = item.cast(self.type).dereference()['_M_value_field']
231
# FIXME: this is weird ... what to do?
232
# Maybe a 'set' display hint?
234
class StdDequePrinter:
238
+ class _iter(Iterator):
239
def __init__(self, node, start, end, last, buffer_size):
247
+ def __next__(self):
248
if self.p == self.last:
252
def display_hint (self):
255
-class Tr1HashtableIterator:
256
+class Tr1HashtableIterator(Iterator):
257
def __init__ (self, hash):
258
self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
259
self.node_type = find_type(hash.type, '__node_type').pointer()
265
+ def __next__ (self):
268
node = self.node.cast(self.node_type)
273
- counter = itertools.imap (self.format_count, itertools.count())
274
- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
275
+ counter = imap (self.format_count, itertools.count())
276
+ return izip (counter, Tr1HashtableIterator (self.hashtable()))
278
class Tr1UnorderedMapPrinter:
279
"Print a tr1::unordered_map"
280
@@ -688,11 +732,11 @@
284
- counter = itertools.imap (self.format_count, itertools.count())
285
+ counter = imap (self.format_count, itertools.count())
286
# Map over the hash table and flatten the result.
287
- data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
288
+ data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
289
# Zip the two iterators together.
290
- return itertools.izip (counter, data)
291
+ return izip (counter, data)
293
def display_hint (self):
296
class StdForwardListPrinter:
297
"Print a std::forward_list"
300
+ class _iterator(Iterator):
301
def __init__(self, nodetype, head):
302
self.nodetype = nodetype
303
self.base = head['_M_next']
309
+ def __next__(self):
312
elt = self.base.cast(self.nodetype).dereference()
314
# A small sanity check.
316
if not self.compiled_rx.match(name + '<>'):
317
- raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
318
+ raise ValueError('libstdc++ programming error: "%s" does not match' % name)
319
printer = RxPrinter(name, function)
320
self.subprinters.append(printer)
321
self.lookup[name] = printer
322
Index: libstdc++-v3/scripts/run_doxygen
323
===================================================================
324
--- a/src/libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release)
325
+++ b/src/libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch)
330
- # Also drop in the header file and style sheet
331
- doxygen -w latex header.tex doxygen.sty
332
+ # Grrr, Doxygen 1.8.x changed the -w latex options.
333
+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
335
+ # Also drop in the header file (maybe footer file) and style sheet
336
+ if $need_footer; then
337
+ doxygen -w latex header.tex footer.tex doxygen.sty
339
+ doxygen -w latex header.tex doxygen.sty
343
echo :: LaTeX pages begin with
344
Index: libstdc++-v3/doc/xml/manual/containers.xml
345
===================================================================
346
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release)
347
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch)
349
<section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
352
- Yes it is, and that's okay. This is a decision that we preserved
353
- when we imported SGI's STL implementation. The following is
354
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
355
+ In future GCC will change it to O(1) but O(N) was a decision that we
356
+ preserved when we imported SGI's STL implementation. The following is
357
quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
364
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
365
-<?dbhtml filename="vector.html"?>
369
- <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
372
- In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
373
- message to the list</link>, Daniel Kostecky announced work on an
374
- alternate form of <code>std::vector</code> that would support
375
- hints on the number of elements to be over-allocated. The design
376
- was also described, along with possible implementation choices.
379
- The first two alpha releases were announced <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</link>
380
- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
383
- </section></section>
386
<!-- Sect1 02 : Associative -->
387
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
388
===================================================================
389
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release)
390
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch)
391
@@ -226,10 +226,12 @@
395
+ <?dbhtml bgcolor="#B0B0B0" ?>
396
<entry>18.8.6</entry>
397
<entry><code>nested_exception</code></entry>
400
+ <entry>Partial</entry>
401
+ <entry>Follows an earlier C++0x draft, not the final specification.
406
@@ -612,10 +614,11 @@
410
+ <?dbhtml bgcolor="#B0B0B0" ?>
411
<entry>20.6.12.4</entry>
412
<entry><code>uninitialized_fill_n</code></entry>
415
+ <entry>Partial</entry>
416
+ <entry>Returns <code>void</code>.</entry>
419
<entry>20.6.13</entry>
420
@@ -1119,10 +1122,13 @@
424
+ <?dbhtml bgcolor="#B0B0B0" ?>
426
<entry>Class template <code>basic_string</code></entry>
429
+ <entry>Partial</entry>
430
+ <entry>Non-conforming Copy-On-Write implementation.
431
+ Missing <code>getline</code> overloads for rvalue streams.
436
@@ -1190,10 +1196,11 @@
440
+ <?dbhtml bgcolor="#B0B0B0" ?>
441
<entry>22.3.3.1</entry>
442
<entry>Character classification</entry>
445
+ <entry>Partial</entry>
446
+ <entry>Missing <code>isblank</code>.</entry>
449
<entry>22.3.3.2</entry>
450
@@ -1272,16 +1279,18 @@
454
+ <?dbhtml bgcolor="#B0B0B0" ?>
455
<entry>22.4.5.1</entry>
456
<entry>Class template <code>time_get</code></entry>
459
+ <entry>Partial</entry>
460
+ <entry>Missing <code>get</code> and <code>do_get</code></entry>
463
+ <?dbhtml bgcolor="#B0B0B0" ?>
464
<entry>22.4.5.2</entry>
465
<entry>Class template <code>time_get_byname</code></entry>
468
+ <entry>Partial</entry>
469
+ <entry>Likewise</entry>
472
<entry>22.4.5.3</entry>
473
@@ -1434,8 +1443,10 @@
474
<entry>23.3.5</entry>
475
<entry>Class template <code>list</code></entry>
476
<entry>Partial</entry>
477
- <entry><code>insert</code> and <code>erase</code> members do not
478
- take <code>const_iterator</code> arguments (N2350).</entry>
480
+ <code>insert</code> and <code>erase</code> members do not
481
+ take <code>const_iterator</code> arguments (N2350).
485
<?dbhtml bgcolor="#B0B0B0" ?>
486
@@ -1650,10 +1661,11 @@
490
+ <?dbhtml bgcolor="#B0B0B0" ?>
492
<entry>Mutating sequence operations</entry>
495
+ <entry>Partial</entry>
496
+ <entry><code>rotate</code> returns <code>void</code>.</entry>
500
@@ -2060,10 +2072,13 @@
504
+ <?dbhtml bgcolor="#B0B0B0" ?>
506
<entry>C Library</entry>
509
+ <entry>Partial</entry>
510
+ <entry><code><ctgmath></code> doesn't include
511
+ <code><ccomplex></code>
516
@@ -2143,6 +2158,7 @@
517
Missing move and swap operations on <code>basic_ios</code>.
518
Missing <code>io_errc</code> and <code>iostream_category</code>.
519
<code>ios_base::failure</code> is not derived from <code>system_error</code>.
520
+ Missing <code>ios_base::hexfloat</code>.
524
Index: libstdc++-v3/doc/html/index.html
525
===================================================================
526
--- a/src/libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release)
527
+++ b/src/libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch)
529
</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9.
532
-</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="manual/containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
533
+</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
536
</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/algorithms.html">11.
539
</a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
540
<acronym class="acronym">GNU</acronym> General Public License version 3
541
- </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
542
\ No newline at end of file
543
+ </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
544
Index: libstdc++-v3/doc/html/manual/status.html
545
===================================================================
546
--- a/src/libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release)
547
+++ b/src/libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch)
549
<code class="code">set_new_handler</code> is not thread-safe.
550
</td></tr><tr><td align="left">18.7</td><td align="left">Type identification</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.7.1</td><td align="left">Class type_info</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.2</td><td align="left">Class bad_cast</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.3</td><td align="left">Class bad_typeid</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8</td><td align="left">Exception handling</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.8.1</td><td align="left">Class exception</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.2</td><td align="left">Class bad_exception</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.3</td><td align="left">Abnormal termination</td><td align="left">Partial</td><td align="left">Missing <code class="code">get_terminate</code>.
551
<code class="code">set_terminate</code> is not thread-safe.
552
- </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
553
+ </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Partial</td><td align="left">Follows an earlier C++0x draft, not the final specification.
554
+ </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
555
<span class="emphasis"><em>19</em></span>
556
</td><td colspan="3" align="left">
557
<span class="emphasis"><em>Diagnostics</em></span>
559
<span class="emphasis"><em>20</em></span>
560
</td><td colspan="3" align="left">
561
<span class="emphasis"><em>General utilities</em></span>
562
- </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><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">
563
+ </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><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">
566
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
567
@@ -187,14 +188,16 @@
568
<span class="emphasis"><em>21</em></span>
569
</td><td colspan="3" align="left">
570
<span class="emphasis"><em>Strings</em></span>
571
- </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<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.
572
+ </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<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.
573
+ Missing <code class="code">getline</code> overloads for rvalue streams.
574
+ </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
575
Missing <code class="filename"><cuchar></code>
576
</td></tr><tr><td align="left">
577
<span class="emphasis"><em>22</em></span>
578
</td><td colspan="3" align="left">
579
<span class="emphasis"><em>Localization</em></span>
580
- </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><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
581
- <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">
582
+ </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><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
583
+ <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">
584
<span class="emphasis"><em>23</em></span>
585
</td><td colspan="3" align="left">
586
<span class="emphasis"><em>Containers</em></span>
588
</td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Container requirements</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.2.1</td><td align="left">General container requirements</td><td align="left">Partial</td><td align="left">Only <code class="code">vector</code> and <code class="code">forward_list</code>
589
meet the requirements
590
relating to allocator use and propagation.</td></tr><tr><td align="left">23.2.2</td><td align="left">Container data races</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.3</td><td align="left">Sequence containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.4</td><td align="left">Associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.5</td><td align="left">Unordered associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3</td><td align="left">Sequence containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.3.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.3</td><td align="left">Class template <code class="code">deque</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
591
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
592
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
593
+ take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left">O(N) size.
594
+ <code class="code">insert</code> and <code class="code">erase</code> members do not
595
+ take <code class="code">const_iterator</code> arguments (N2350).
596
+ </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
597
take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.7</td><td align="left">Class <code class="code">vector<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
598
take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.4</td><td align="left">Associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.5</td><td align="left">Class template <code class="code">multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.6</td><td align="left">Class template <code class="code">set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.7</td><td align="left">Class template <code class="code">multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Unordered associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.5.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.5</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.6</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.7</td><td align="left">Class template <code class="code">unordered_multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left">Container adaptors</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.6.1</td><td align="left">Class template <code class="code">queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.2</td><td align="left">Class template <code class="code">priority_queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.3</td><td align="left">Class template <code class="code">stack</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
599
<span class="emphasis"><em>24</em></span>
600
@@ -212,11 +217,13 @@
601
<span class="emphasis"><em>25</em></span>
602
</td><td colspan="3" align="left">
603
<span class="emphasis"><em>Algorithms</em></span>
604
- </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
605
+ </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Partial</td><td align="left"><code class="code">rotate</code> returns <code class="code">void</code>.</td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
606
<span class="emphasis"><em>26</em></span>
607
</td><td colspan="3" align="left">
608
<span class="emphasis"><em>Numerics</em></span>
609
- </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><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">
610
+ </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><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
611
+ <code class="code"><ccomplex></code>
612
+ </td></tr><tr><td align="left">
613
<span class="emphasis"><em>27</em></span>
614
</td><td colspan="3" align="left">
615
<span class="emphasis"><em>Input/output library</em></span>
617
Missing move and swap operations on <code class="code">basic_ios</code>.
618
Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
619
<code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
620
+ Missing <code class="code">ios_base::hexfloat</code>.
621
</td></tr><tr><td align="left">27.6</td><td align="left">Stream buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">27.7</td><td align="left">Formatting and manipulators</td><td align="left">Partial</td><td align="left">
622
Missing move and swap operations
623
Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
624
Index: libstdc++-v3/doc/html/manual/abi.html
625
===================================================================
626
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
627
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
629
definitions, where the version definition is the maximum for a
630
particular release. Labels are cumulative. If a particular release
631
is not listed, it has the same version labels as the preceding
632
- release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li></ul></div></li><li class="listitem"><p>
633
+ release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li><li class="listitem"><p>GCC 4.8.0: GCC_4.8.0</p></li></ul></div></li><li class="listitem"><p>
634
Release versioning on the libstdc++.so binary, implemented in
635
the same way as the libgcc_s.so binary above. Listed is the
636
filename: <code class="constant">DT_SONAME</code> can be deduced from
638
has the same filename and <code class="constant">DT_SONAME</code> as the
640
</p><p>It is versioned as follows:
641
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li></ul></div><p>
642
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li><li class="listitem"><p>GCC 4.8.3: libstdc++.so.6.0.19</p></li></ul></div><p>
643
Note 1: Error should be libstdc++.so.3.0.3.
645
Note 2: Not strictly required.
647
GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
648
release.) If a particular release is not listed, it has the same
649
version labels as the preceding release.
650
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
651
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li><li class="listitem"><p>GCC 4.8.3: GLIBCXX_3.4.19, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
652
__GXX_ABI_VERSION. This macro is defined as the version of the
653
compiler v3 ABI, with g++ 3.0 being version 100. This macro will
654
be automatically defined whenever g++ is used (the curious can
655
Index: libstdc++-v3/doc/html/manual/std_contents.html
656
===================================================================
657
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release)
658
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch)
660
</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
663
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
664
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
667
</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
669
</a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4.
672
-</td></tr></table></div></body></html>
673
\ No newline at end of file
674
+</td></tr></table></div></body></html>
675
Index: libstdc++-v3/doc/html/manual/containers.html
676
===================================================================
677
--- a/src/libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release)
678
+++ b/src/libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch)
680
</th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"></a>Chapter 9.
682
<a id="idm269999493408" class="indexterm"></a>
683
-</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
684
- Yes it is, and that's okay. This is a decision that we preserved
685
- when we imported SGI's STL implementation. The following is
686
+</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
687
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
688
+ In future GCC will change it to O(1) but O(N) was a decision that we
689
+ preserved when we imported SGI's STL implementation. The following is
690
quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
691
</p><div class="blockquote"><blockquote class="blockquote"><p>
692
The size() member function, for list and slist, takes time
694
</p><pre class="programlisting">
697
- </pre></blockquote></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.vector"></a>vector</h3></div></div></div><p>
698
- </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p>
699
- In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
700
- message to the list</a>, Daniel Kostecky announced work on an
701
- alternate form of <code class="code">std::vector</code> that would support
702
- hints on the number of elements to be over-allocated. The design
703
- was also described, along with possible implementation choices.
705
- The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
706
- and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
707
- </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
708
\ No newline at end of file
709
+ </pre></blockquote></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
710
Index: libstdc++-v3/doc/html/manual/index.html
711
===================================================================
712
--- a/src/libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release)
713
+++ b/src/libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch)
715
</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
718
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
719
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
722
</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
724
</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part I.
727
-</td></tr></table></div></body></html>
728
\ No newline at end of file
729
+</td></tr></table></div></body></html>
730
Index: libstdc++-v3/include/std/future
731
===================================================================
732
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
733
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
734
@@ -351,12 +351,14 @@
736
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
738
- bool __set = __ignore_failure;
739
+ bool __set = false;
740
// all calls to this function are serialized,
741
// side-effects of invoking __res only happen once
742
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
746
+ _M_cond.notify_all();
747
+ else if (!__ignore_failure)
748
__throw_future_error(int(future_errc::promise_already_satisfied));
752
lock_guard<mutex> __lock(_M_mutex);
753
_M_result.swap(__res);
755
- _M_cond.notify_all();
759
@@ -983,22 +984,25 @@
761
set_value(const _Res& __r)
763
+ auto __future = _M_future;
764
auto __setter = _State::__setter(this, __r);
765
- _M_future->_M_set_result(std::move(__setter));
766
+ __future->_M_set_result(std::move(__setter));
770
set_value(_Res&& __r)
772
+ auto __future = _M_future;
773
auto __setter = _State::__setter(this, std::move(__r));
774
- _M_future->_M_set_result(std::move(__setter));
775
+ __future->_M_set_result(std::move(__setter));
779
set_exception(exception_ptr __p)
781
+ auto __future = _M_future;
782
auto __setter = _State::__setter(__p, this);
783
- _M_future->_M_set_result(std::move(__setter));
784
+ __future->_M_set_result(std::move(__setter));
788
@@ -1081,15 +1085,17 @@
792
+ auto __future = _M_future;
793
auto __setter = _State::__setter(this, __r);
794
- _M_future->_M_set_result(std::move(__setter));
795
+ __future->_M_set_result(std::move(__setter));
799
set_exception(exception_ptr __p)
801
+ auto __future = _M_future;
802
auto __setter = _State::__setter(__p, this);
803
- _M_future->_M_set_result(std::move(__setter));
804
+ __future->_M_set_result(std::move(__setter));
808
@@ -1166,8 +1172,9 @@
810
set_exception(exception_ptr __p)
812
+ auto __future = _M_future;
813
auto __setter = _State::__setter(__p, this);
814
- _M_future->_M_set_result(std::move(__setter));
815
+ __future->_M_set_result(std::move(__setter));
819
@@ -1193,8 +1200,9 @@
821
promise<void>::set_value()
823
+ auto __future = _M_future;
824
auto __setter = _State::__setter(this);
825
- _M_future->_M_set_result(std::move(__setter));
826
+ __future->_M_set_result(std::move(__setter));
830
Index: libstdc++-v3/include/ext/rope
831
===================================================================
832
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
833
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
834
@@ -1544,7 +1544,7 @@
835
typedef typename _Base::allocator_type allocator_type;
836
using _Base::_M_tree_ptr;
837
using _Base::get_allocator;
838
- using _Base::_M_get_allocator;
839
+ using _Base::_M_get_allocator;
840
typedef __GC_CONST _CharT* _Cstrptr;
842
static _CharT _S_empty_c_str[1];
843
@@ -1876,8 +1876,9 @@
844
const allocator_type& __a = allocator_type())
847
- this->_M_tree_ptr = (0 == __len) ?
848
- 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
849
+ this->_M_tree_ptr = (0 == __len)
851
+ : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
854
rope(const rope& __x, const allocator_type& __a = allocator_type())
855
Index: libstdc++-v3/include/bits/stl_tree.h
856
===================================================================
857
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
858
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
859
@@ -510,11 +510,11 @@
863
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
864
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
868
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
869
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
871
static const_reference
872
_S_value(_Const_Link_type __x)
873
Index: libstdc++-v3/include/tr2/bool_set
874
===================================================================
875
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
876
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
880
* See N2136, Bool_set: multi-valued logic
881
- * by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
882
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
884
* The implicit conversion to bool is slippery! I may use the new
885
* explicit conversion. This has been specialized in the language
886
Index: libstdc++-v3/ChangeLog
887
===================================================================
888
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
889
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
891
+2014-10-03 Jonathan Wakely <jwakely@redhat.com>
894
+ * doc/xml/manual/containers.xml: Remove outdated section. Update
896
+ * doc/html/*: Regenerate.
898
+2014-10-01 Jonathan Wakely <jwakely@redhat.com>
900
+ * doc/xml/manual/status_cxx2011.xml: Corrections.
901
+ * doc/html/manual/status.html: Regenerate.
903
+2014-08-28 Samuel Bronson <naesten@gmail.com>
905
+ Backport r212453 from trunk
906
+ 2014-07-11 Samuel Bronson <naesten@gmail.com>
907
+ Matthias Klose <doko@ubuntu.com>
910
+ * python/libstdcxx/v6/printers.py: Port to Python 2+3
911
+ (imap): New compat function.
913
+ (Iterator): New mixin to allow writing iterators in Python 3 style
914
+ regardless of which version we're running on.
915
+ [Python3] (long) New compat alias for "int".
916
+ * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
918
+ Backport r210625 from trunk
919
+ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
921
+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
923
+2014-08-26 John David Anglin <danglin@gcc.gnu.org>
925
+ * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
927
+2014-08-26 Jonathan Wakely <jwakely@redhat.com>
929
+ * doc/xml/manual/status_cxx2011.xml: Correct status table.
930
+ * doc/html/manual/*: Regenerate.
932
+2014-08-04 Jonathan Wakely <jwakely@redhat.com>
934
+ Backported from mainline
935
+ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
938
+ * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
939
+ const allocator_type&)): Pass non-const allocator to
940
+ _S_new_RopeFunction.
941
+ * testsuite/ext/rope/61946.cc: New.
943
+2014-08-04 Zifei Tong <zifeitong@gmail.com>
945
+ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
946
+ _GLIBCXX_ prefix to macro.
948
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
950
+ Backport from mainline
951
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
954
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
956
+ Backport from mainline
957
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
960
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
961
+ Signal condition variable after call_once returns.
962
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
963
+ (promise::set_value, promise::set_exception): Increment the reference
964
+ count on the shared state until the function returns.
965
+ * testsuite/30_threads/promise/60966.cc: New.
967
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
969
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
970
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
972
2014-05-22 Release Manager
974
* GCC 4.8.3 released.
975
Index: libstdc++-v3/libsupc++/atexit_thread.cc
976
===================================================================
977
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release)
978
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch)
981
#include "bits/gthr.h"
983
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
984
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
986
extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
989
return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
992
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
993
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
996
// One element in a singly-linked stack of cleanups.
1001
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1002
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1003
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1004
===================================================================
1005
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
1006
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
1008
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1009
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1010
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1011
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1012
+// { dg-require-cstdint "" }
1013
+// { dg-require-gthreads "" }
1014
+// { dg-require-atomic-builtins "" }
1016
+// Copyright (C) 2014 Free Software Foundation, Inc.
1018
+// This file is part of the GNU ISO C++ Library. This library is free
1019
+// software; you can redistribute it and/or modify it under the
1020
+// terms of the GNU General Public License as published by the
1021
+// Free Software Foundation; either version 3, or (at your option)
1022
+// any later version.
1024
+// This library is distributed in the hope that it will be useful,
1025
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1026
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1027
+// GNU General Public License for more details.
1029
+// You should have received a copy of the GNU General Public License along
1030
+// with this library; see the file COPYING3. If not see
1031
+// <http://www.gnu.org/licenses/>.
1034
+// This test hangs if std::promise::~promise() destroys the
1035
+// shared state before std::promise::set_value() finishes using it.
1041
+const int THREADS = 10;
1043
+void run_task(std::promise<void>* pr)
1045
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
1051
+ std::vector<std::promise<void>*> tasks(THREADS);
1052
+ std::vector<std::thread> threads(THREADS);
1053
+ std::vector<std::future<void>> futures(THREADS);
1055
+ for (int i = 0; i < THREADS; ++i)
1057
+ std::promise<void>* task = new std::promise<void>;
1059
+ futures[i] = task->get_future();
1060
+ threads[i] = std::thread(run_task, task);
1063
+ for (int i = 0; i < THREADS; ++i)
1065
+ // the temporary future releases the state as soon as wait() returns
1066
+ std::future<void>(std::move(futures[i])).wait();
1067
+ // state is ready, should now be safe to delete promise, so it
1068
+ // releases the shared state too
1072
+ for (auto& t : threads)
1075
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1076
===================================================================
1077
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release)
1078
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch)
1080
+// Copyright (C) 2014 Free Software Foundation, Inc.
1082
+// This file is part of the GNU ISO C++ Library. This library is free
1083
+// software; you can redistribute it and/or modify it under the
1084
+// terms of the GNU General Public License as published by the
1085
+// Free Software Foundation; either version 3, or (at your option)
1086
+// any later version.
1088
+// This library is distributed in the hope that it will be useful,
1089
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1090
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1091
+// GNU General Public License for more details.
1093
+// You should have received a copy of the GNU General Public License along
1094
+// with this library; see the file COPYING3. If not see
1095
+// <http://www.gnu.org/licenses/>.
1097
+// { dg-do compile }
1099
+#include <ext/rope>
1101
+struct empty_char_prod : __gnu_cxx::char_producer<char>
1103
+ virtual void operator()(size_t, size_t, char*) {}
1108
+ empty_char_prod* ecp = new empty_char_prod;
1109
+ __gnu_cxx::crope excrope( ecp, 10L, true );
1111
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1112
===================================================================
1113
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release)
1114
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch)
1119
- set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1120
+ set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1122
if {!$do_whatis_tests} {
1123
send_log "skipping 'whatis' tests - gdb too old"
1125
# but not earlier versions.
1126
# Return 1 if the version is ok, 0 otherwise.
1127
proc gdb_version_check {} {
1128
- return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1129
+ return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1130
"<built-in function lookup_global_symbol>"]
1132
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1133
===================================================================
1134
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release)
1135
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch)
1137
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1138
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1139
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1140
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1141
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1142
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1143
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1145
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1146
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1147
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1148
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1149
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1150
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1151
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1152
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1153
@@ -1204,6 +1207,7 @@
1154
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1155
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1156
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1157
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1158
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1159
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1160
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1161
@@ -1471,6 +1475,11 @@
1162
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1163
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1164
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1165
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1166
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1167
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1168
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1169
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1170
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1171
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1172
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1173
@@ -1900,6 +1909,8 @@
1174
FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1175
FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1176
FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1177
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1178
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1179
FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1180
FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1181
FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1182
@@ -2436,6 +2447,7 @@
1183
FUNC:__cxa_guard_release@@CXXABI_1.3
1184
FUNC:__cxa_pure_virtual@@CXXABI_1.3
1185
FUNC:__cxa_rethrow@@CXXABI_1.3
1186
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1187
FUNC:__cxa_throw@@CXXABI_1.3
1188
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1189
FUNC:__cxa_vec_cctor@@CXXABI_1.3
1190
@@ -2482,6 +2494,7 @@
1191
OBJECT:0:CXXABI_1.3.4
1192
OBJECT:0:CXXABI_1.3.5
1193
OBJECT:0:CXXABI_1.3.6
1194
+OBJECT:0:CXXABI_1.3.7
1195
OBJECT:0:CXXABI_TM_1
1196
OBJECT:0:GLIBCXX_3.4
1197
OBJECT:0:GLIBCXX_3.4.1
1198
@@ -2493,6 +2506,8 @@
1199
OBJECT:0:GLIBCXX_3.4.15
1200
OBJECT:0:GLIBCXX_3.4.16
1201
OBJECT:0:GLIBCXX_3.4.17
1202
+OBJECT:0:GLIBCXX_3.4.18
1203
+OBJECT:0:GLIBCXX_3.4.19
1204
OBJECT:0:GLIBCXX_3.4.2
1205
OBJECT:0:GLIBCXX_3.4.3
1206
OBJECT:0:GLIBCXX_3.4.4
1207
@@ -2992,6 +3007,8 @@
1208
OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1209
OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1210
OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1211
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1212
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1213
OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1214
OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1215
OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1217
===================================================================
1218
--- a/src/configure.ac (.../tags/gcc_4_8_3_release)
1219
+++ b/src/configure.ac (.../branches/gcc-4_8-branch)
1220
@@ -1154,6 +1154,9 @@
1222
host_makefile_frag="config/mh-mingw"
1225
+ host_makefile_frag="config/mh-alpha-linux"
1228
host_makefile_frag="config/mh-pa-hpux10"
1231
===================================================================
1232
--- a/src/ChangeLog (.../tags/gcc_4_8_3_release)
1233
+++ b/src/ChangeLog (.../branches/gcc-4_8-branch)
1235
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1238
+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1239
+ * configure: Regenerate.
1241
2014-05-22 Release Manager
1243
* GCC 4.8.3 released.
1244
Index: contrib/ChangeLog
1245
===================================================================
1246
--- a/src/contrib/ChangeLog (.../tags/gcc_4_8_3_release)
1247
+++ b/src/contrib/ChangeLog (.../branches/gcc-4_8-branch)
1249
+2014-07-07 Richard Biener <rguenther@suse.de>
1251
+ * gennews: Use gcc-3.0/index.html.
1253
2014-05-22 Release Manager
1255
* GCC 4.8.3 released.
1256
Index: contrib/gennews
1257
===================================================================
1258
--- a/src/contrib/gennews (.../tags/gcc_4_8_3_release)
1259
+++ b/src/contrib/gennews (.../branches/gcc-4_8-branch)
1261
gcc-3.3/index.html gcc-3.3/changes.html
1262
gcc-3.2/index.html gcc-3.2/changes.html
1263
gcc-3.1/index.html gcc-3.1/changes.html
1264
- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1265
+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1266
gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
1267
egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
1268
egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
1269
Index: config/mh-alpha-linux
1270
===================================================================
1271
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
1272
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
1274
+# Prevent GPREL16 relocation truncation
1275
+LDFLAGS += -Wl,--no-relax
1276
+BOOT_LDFLAGS += -Wl,--no-relax
1277
Index: config/ChangeLog
1278
===================================================================
1279
--- a/src/config/ChangeLog (.../tags/gcc_4_8_3_release)
1280
+++ b/src/config/ChangeLog (.../branches/gcc-4_8-branch)
1282
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1285
+ * mh-alpha-linux: New file.
1287
2014-05-22 Release Manager
1289
* GCC 4.8.3 released.
1290
Index: libjava/classpath
1291
===================================================================
1292
--- a/src/libjava/classpath (.../tags/gcc_4_8_3_release)
1293
+++ b/src/libjava/classpath (.../branches/gcc-4_8-branch)
1295
Property changes on: libjava/classpath
1296
___________________________________________________________________
1297
Modified: svn:mergeinfo
1298
Merged /trunk/libjava/classpath:r211733,215049
1300
===================================================================
1301
--- a/src/configure (.../tags/gcc_4_8_3_release)
1302
+++ b/src/configure (.../branches/gcc-4_8-branch)
1303
@@ -3834,6 +3834,9 @@
1305
host_makefile_frag="config/mh-mingw"
1308
+ host_makefile_frag="config/mh-alpha-linux"
1311
host_makefile_frag="config/mh-pa-hpux10"
1313
Index: libgcc/ChangeLog
1314
===================================================================
1315
--- a/src/libgcc/ChangeLog (.../tags/gcc_4_8_3_release)
1316
+++ b/src/libgcc/ChangeLog (.../branches/gcc-4_8-branch)
1318
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
1320
+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
1321
+ bits not set bits as indicating trapping exceptions.
1323
2014-05-22 Release Manager
1325
* GCC 4.8.3 released.
1326
Index: libgcc/config/i386/sfp-machine.h
1327
===================================================================
1328
--- a/src/libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release)
1329
+++ b/src/libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch)
1331
__sfp_handle_exceptions (_fex); \
1334
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1335
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1337
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
1339
Index: gcc/tree-ssa-tail-merge.c
1340
===================================================================
1341
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release)
1342
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
1343
@@ -1060,6 +1060,24 @@
1347
+/* Return true if gimple operands T1 and T2 have the same value. */
1350
+gimple_operand_equal_value_p (tree t1, tree t2)
1355
+ if (t1 == NULL_TREE
1356
+ || t2 == NULL_TREE)
1359
+ if (operand_equal_p (t1, t2, 0))
1362
+ return gvn_uses_equal (t1, t2);
1365
/* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
1366
gimple_bb (s2) are members of SAME_SUCC. */
1368
@@ -1122,8 +1140,9 @@
1369
lhs2 = gimple_get_lhs (s2);
1370
if (TREE_CODE (lhs1) != SSA_NAME
1371
&& TREE_CODE (lhs2) != SSA_NAME)
1372
- return (vn_valueize (gimple_vdef (s1))
1373
- == vn_valueize (gimple_vdef (s2)));
1374
+ return (operand_equal_p (lhs1, lhs2, 0)
1375
+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
1376
+ gimple_assign_rhs1 (s2)));
1377
else if (TREE_CODE (lhs1) == SSA_NAME
1378
&& TREE_CODE (lhs2) == SSA_NAME)
1379
return vn_valueize (lhs1) == vn_valueize (lhs2);
1380
Index: gcc/DATESTAMP
1381
===================================================================
1382
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
1383
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
1388
===================================================================
1389
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
1390
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
1392
else if (!opt_for_fn (node->symbol.decl, optimize)
1393
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
1394
reason = "non-optimized function";
1395
+ else if (node->tm_clone)
1396
+ reason = "transactional memory clone";
1398
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
1399
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
1400
@@ -2902,6 +2904,11 @@
1401
intersect_with_agg_replacements (cs->caller, src_idx,
1412
@@ -2917,6 +2924,11 @@
1414
intersect_with_plats (src_plats, &inter, 0);
1423
else if (jfunc->type == IPA_JF_ANCESTOR
1424
@@ -3000,7 +3012,8 @@
1425
vec<cgraph_edge_p> callers)
1427
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
1428
- struct ipa_agg_replacement_value *res = NULL;
1429
+ struct ipa_agg_replacement_value *res;
1430
+ struct ipa_agg_replacement_value **tail = &res;
1431
struct cgraph_edge *cs;
1432
int i, j, count = ipa_get_param_count (dest_info);
1434
@@ -3044,8 +3057,8 @@
1435
v->offset = item->offset;
1436
v->value = item->value;
1437
v->by_ref = plats->aggs_by_ref;
1445
@@ -3052,6 +3065,7 @@
1446
if (inter.exists ())
1453
@@ -3060,7 +3074,8 @@
1454
static struct ipa_agg_replacement_value *
1455
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
1457
- struct ipa_agg_replacement_value *res = NULL;
1458
+ struct ipa_agg_replacement_value *res;
1459
+ struct ipa_agg_replacement_value **tail = &res;
1460
struct ipa_agg_jump_function *aggjf;
1461
struct ipa_agg_jf_item *item;
1463
@@ -3074,9 +3089,10 @@
1464
v->offset = item->offset;
1465
v->value = item->value;
1466
v->by_ref = aggjf->by_ref;
1476
Index: gcc/fold-const.c
1477
===================================================================
1478
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_3_release)
1479
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
1480
@@ -9213,7 +9213,7 @@
1481
/* Transform comparisons of the form X +- C1 CMP Y +- C2 to
1482
X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
1483
the resulting offset is smaller in absolute value than the
1485
+ original one and has the same sign. */
1486
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
1487
&& (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
1488
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
1489
@@ -9232,19 +9232,20 @@
1492
/* Put the constant on the side where it doesn't overflow and is
1493
- of lower absolute value than before. */
1494
+ of lower absolute value and of same sign than before. */
1495
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1496
? MINUS_EXPR : PLUS_EXPR,
1498
if (!TREE_OVERFLOW (cst)
1499
- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
1500
+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
1501
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
1503
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1504
return fold_build2_loc (loc, code, type,
1506
- fold_build2_loc (loc,
1507
- TREE_CODE (arg1), TREE_TYPE (arg1),
1510
+ fold_build2_loc (loc, TREE_CODE (arg1),
1515
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1516
@@ -9251,13 +9252,15 @@
1517
? MINUS_EXPR : PLUS_EXPR,
1519
if (!TREE_OVERFLOW (cst)
1520
- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
1521
+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
1522
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
1524
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1525
return fold_build2_loc (loc, code, type,
1526
- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
1529
+ fold_build2_loc (loc, TREE_CODE (arg0),
1536
@@ -11218,7 +11221,6 @@
1538
double_int c1, c2, c3, msk;
1539
int width = TYPE_PRECISION (type), w;
1540
- bool try_simplify = true;
1542
c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
1543
c2 = tree_to_double_int (arg1);
1544
@@ -11255,20 +11257,7 @@
1548
- /* If X is a tree of the form (Y * K1) & K2, this might conflict
1549
- with that optimization from the BIT_AND_EXPR optimizations.
1550
- This could end up in an infinite recursion. */
1551
- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
1552
- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
1555
- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
1556
- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
1558
- try_simplify = (masked != c1);
1561
- if (try_simplify && c3 != c1)
1563
return fold_build2_loc (loc, BIT_IOR_EXPR, type,
1564
fold_build2_loc (loc, BIT_AND_EXPR, type,
1565
TREE_OPERAND (arg0, 0),
1566
@@ -11658,16 +11647,25 @@
1567
&& TREE_CODE (arg0) == MULT_EXPR
1568
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
1570
+ double_int darg1 = tree_to_double_int (arg1);
1572
- = mask_with_tz (type, tree_to_double_int (arg1),
1573
+ = mask_with_tz (type, darg1,
1574
tree_to_double_int (TREE_OPERAND (arg0, 1)));
1576
if (masked.is_zero ())
1577
return omit_two_operands_loc (loc, type, build_zero_cst (type),
1579
- else if (masked != tree_to_double_int (arg1))
1580
- return fold_build2_loc (loc, code, type, op0,
1581
- double_int_to_tree (type, masked));
1582
+ else if (masked != darg1)
1584
+ /* Avoid the transform if arg1 is a mask of some
1585
+ mode which allows further optimizations. */
1586
+ int pop = darg1.popcount ();
1587
+ if (!(pop >= BITS_PER_UNIT
1588
+ && exact_log2 (pop) != -1
1589
+ && double_int::mask (pop) == darg1))
1590
+ return fold_build2_loc (loc, code, type, op0,
1591
+ double_int_to_tree (type, masked));
1595
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
1596
Index: gcc/omp-low.c
1597
===================================================================
1598
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
1599
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
1600
@@ -1586,7 +1586,6 @@
1601
TREE_STATIC (decl) = 1;
1602
TREE_USED (decl) = 1;
1603
DECL_ARTIFICIAL (decl) = 1;
1604
- DECL_NAMELESS (decl) = 1;
1605
DECL_IGNORED_P (decl) = 0;
1606
TREE_PUBLIC (decl) = 0;
1607
DECL_UNINLINABLE (decl) = 1;
1609
===================================================================
1610
--- a/src/gcc/toplev.c (.../tags/gcc_4_8_3_release)
1611
+++ b/src/gcc/toplev.c (.../branches/gcc-4_8-branch)
1612
@@ -1036,16 +1036,19 @@
1614
if (warn_stack_usage >= 0)
1616
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
1618
if (stack_usage_kind == DYNAMIC)
1619
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
1620
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
1621
else if (stack_usage > warn_stack_usage)
1623
if (stack_usage_kind == DYNAMIC_BOUNDED)
1624
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
1627
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
1630
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
1632
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
1637
Index: gcc/tree-ssa-sccvn.c
1638
===================================================================
1639
--- a/src/gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release)
1640
+++ b/src/gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch)
1641
@@ -3015,33 +3015,12 @@
1642
/* If all value numbered to the same value, the phi node has that
1646
- if (is_gimple_min_invariant (sameval))
1648
- VN_INFO (PHI_RESULT (phi))->has_constants = true;
1649
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
1653
- VN_INFO (PHI_RESULT (phi))->has_constants = false;
1654
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
1656
+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
1658
- if (TREE_CODE (sameval) == SSA_NAME)
1659
- return visit_copy (PHI_RESULT (phi), sameval);
1661
- return set_ssa_val_to (PHI_RESULT (phi), sameval);
1664
/* Otherwise, see if it is equivalent to a phi node in this block. */
1665
result = vn_phi_lookup (phi);
1668
- if (TREE_CODE (result) == SSA_NAME)
1669
- changed = visit_copy (PHI_RESULT (phi), result);
1671
- changed = set_ssa_val_to (PHI_RESULT (phi), result);
1673
+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
1676
vn_phi_insert (phi, PHI_RESULT (phi));
1677
@@ -3142,24 +3121,18 @@
1678
catch those with constants. The goal here is to simultaneously
1679
combine constants between expressions, but avoid infinite
1680
expansion of expressions during simplification. */
1681
- if (TREE_CODE (op0) == SSA_NAME)
1683
- if (VN_INFO (op0)->has_constants
1684
+ op0 = vn_valueize (op0);
1685
+ if (TREE_CODE (op0) == SSA_NAME
1686
+ && (VN_INFO (op0)->has_constants
1687
|| TREE_CODE_CLASS (code) == tcc_comparison
1688
- || code == COMPLEX_EXPR)
1689
- op0 = valueize_expr (vn_get_expr_for (op0));
1691
- op0 = vn_valueize (op0);
1693
+ || code == COMPLEX_EXPR))
1694
+ op0 = valueize_expr (vn_get_expr_for (op0));
1696
- if (TREE_CODE (op1) == SSA_NAME)
1698
- if (VN_INFO (op1)->has_constants
1699
- || code == COMPLEX_EXPR)
1700
- op1 = valueize_expr (vn_get_expr_for (op1));
1702
- op1 = vn_valueize (op1);
1704
+ op1 = vn_valueize (op1);
1705
+ if (TREE_CODE (op1) == SSA_NAME
1706
+ && (VN_INFO (op1)->has_constants
1707
+ || code == COMPLEX_EXPR))
1708
+ op1 = valueize_expr (vn_get_expr_for (op1));
1710
/* Pointer plus constant can be represented as invariant address.
1711
Do so to allow further propatation, see also tree forwprop. */
1712
@@ -3217,27 +3190,31 @@
1716
- if (VN_INFO (op0)->has_constants)
1717
- op0 = valueize_expr (vn_get_expr_for (op0));
1718
- else if (CONVERT_EXPR_CODE_P (code)
1719
- || code == REALPART_EXPR
1720
- || code == IMAGPART_EXPR
1721
- || code == VIEW_CONVERT_EXPR
1722
- || code == BIT_FIELD_REF)
1723
+ op0 = vn_valueize (op0);
1724
+ if (TREE_CODE (op0) == SSA_NAME)
1726
- /* We want to do tree-combining on conversion-like expressions.
1727
- Make sure we feed only SSA_NAMEs or constants to fold though. */
1728
- tree tem = valueize_expr (vn_get_expr_for (op0));
1729
- if (UNARY_CLASS_P (tem)
1730
- || BINARY_CLASS_P (tem)
1731
- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
1732
- || TREE_CODE (tem) == SSA_NAME
1733
- || TREE_CODE (tem) == CONSTRUCTOR
1734
- || is_gimple_min_invariant (tem))
1736
+ if (VN_INFO (op0)->has_constants)
1737
+ op0 = valueize_expr (vn_get_expr_for (op0));
1738
+ else if (CONVERT_EXPR_CODE_P (code)
1739
+ || code == REALPART_EXPR
1740
+ || code == IMAGPART_EXPR
1741
+ || code == VIEW_CONVERT_EXPR
1742
+ || code == BIT_FIELD_REF)
1744
+ /* We want to do tree-combining on conversion-like expressions.
1745
+ Make sure we feed only SSA_NAMEs or constants to fold though. */
1746
+ tree tem = valueize_expr (vn_get_expr_for (op0));
1747
+ if (UNARY_CLASS_P (tem)
1748
+ || BINARY_CLASS_P (tem)
1749
+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
1750
+ || TREE_CODE (tem) == SSA_NAME
1751
+ || TREE_CODE (tem) == CONSTRUCTOR
1752
+ || is_gimple_min_invariant (tem))
1757
- /* Avoid folding if nothing changed, but remember the expression. */
1758
+ /* Avoid folding if nothing changed. */
1759
if (op0 == orig_op0)
1762
Index: gcc/cgraphunit.c
1763
===================================================================
1764
--- a/src/gcc/cgraphunit.c (.../tags/gcc_4_8_3_release)
1765
+++ b/src/gcc/cgraphunit.c (.../branches/gcc-4_8-branch)
1766
@@ -1097,7 +1097,7 @@
1767
/* We use local aliases for C++ thunks to force the tailcall
1768
to bind locally. This is a hack - to keep it working do
1769
the following (which is not strictly correct). */
1770
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
1771
+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
1772
|| ! DECL_VIRTUAL_P (target_node->symbol.decl))
1773
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
1775
Index: gcc/ChangeLog
1776
===================================================================
1777
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
1778
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
1780
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1782
+ Backport from mainline r215880
1783
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1785
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
1786
+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
1787
+ little endian target.
1789
+ Backport from mainline r215882
1790
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1792
+ * altivec.md (altivec_lvsl): New define_expand.
1793
+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
1794
+ (altivec_lvsr): New define_expand.
1795
+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
1796
+ * rs6000.c (rs6000_expand_builtin): Change to use
1797
+ altivec_lvs[lr]_direct; remove commented-out code.
1799
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
1801
+ Backport from mainline
1802
+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
1804
+ PR rtl-optimization/57003
1805
+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
1806
+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
1807
+ killing regs_invalidated_by_call.
1809
+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
1811
+ Backport from mainline
1812
+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
1815
+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
1816
+ atomic_fetch_<fetchop_name>si_hard,
1817
+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
1818
+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
1819
+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
1820
+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
1822
+2014-10-02 Martin Jambor <mjambor@suse.cz>
1824
+ PR tree-optimization/63375
1825
+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
1828
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
1831
+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
1835
+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
1836
+ argument to avx2_permv2ti.
1838
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
1840
+ Backport from mainline
1841
+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
1843
+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
1844
+ (fmod<mode>3): Ditto.
1845
+ (fpremxf4_i387): Ditto.
1846
+ (reminderxf3): Ditto.
1847
+ (reminder<mode>3): Ditto.
1848
+ (fprem1xf4_i387): Ditto.
1850
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
1852
+ PR inline-asm/63282
1853
+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
1854
+ or invert_jump_1 if jump isn't any_condjump_p.
1856
+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
1858
+ Backport from mainline r212303
1860
+ * config/arm/arm-protos.h (arm_legitimate_address_p,
1861
+ arm_is_constant_pool_ref): Add prototypes.
1862
+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
1863
+ (arm_is_constant_pool_ref) New function.
1864
+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
1865
+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
1866
+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
1867
+ operand and remove pool_range and neg_pool_range attributes.
1868
+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
1869
+ pool_range and neg_pool_range attributes.
1870
+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
1871
+ constant pool references.
1873
+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
1875
+ * config/pa/pa.c (pa_output_function_epilogue): Only update
1876
+ last_address when a nonnote insn is found.
1878
+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
1880
+ Backport from mainline
1881
+ 2014-09-25 Nick Clifton <nickc@redhat.com>
1882
+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
1885
+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
1886
+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
1888
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1890
+ Backport from mainline r215559
1891
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1894
+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
1895
+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
1897
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
1899
+ PR tree-optimization/63341
1900
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
1901
+ vect_create_addr_base_for_vector_ref): Add another tree argument
1902
+ defaulting to NULL_TREE.
1903
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
1904
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
1905
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
1906
+ add that to base_offset too if non-NULL.
1907
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
1908
+ for dr_explicit_realign_optimized set it to vector byte size
1909
+ - 1 instead of setting offset, pass byte_offset down to
1910
+ vect_create_data_ref_ptr.
1912
+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
1914
+ Back port from trunk:
1915
+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
1917
+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
1918
+ refine the constraints used on 32/64-bit floating point moves.
1919
+ (f32_av): Likewise.
1920
+ (f64_vsx): Likewise.
1921
+ (f64_dm): Likewise.
1922
+ (f64_av): Likewise.
1923
+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
1924
+ (BOOL_REGS_OP1): Likewise.
1925
+ (BOOL_REGS_OP2): Likewise.
1926
+ (BOOL_REGS_UNARY): Likewise.
1927
+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
1928
+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
1929
+ for moves involving VSX registers. Do not use constraints that
1930
+ target VSX registers for decimal types.
1931
+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
1932
+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
1934
+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
1936
+ Back port from trunk:
1937
+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
1939
+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
1940
+ for base_reg_operand to be common between LO_SUM and PLUS.
1941
+ (fusion_gpr_mem_combo): New predicate to match a fused address
1942
+ that combines the addis and memory offset address.
1944
+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
1945
+ calling signature.
1946
+ (emit_fusion_gpr_load): Likewise.
1948
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
1949
+ signature to pass each argument separately, rather than
1950
+ using an operands array. Rewrite the insns found by peephole2 to
1951
+ be a single insn, rather than hoping the insns will still be
1952
+ together when the peephole pass is done. Drop being called via a
1954
+ (emit_fusion_gpr_load): Change calling signature to be called from
1955
+ the fusion_gpr_load_<mode> insns with a combined memory address
1956
+ instead of the peephole pass passing the addis and offset
1959
+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
1961
+ (power8 fusion peephole): Drop support for doing power8 via a
1962
+ normal peephole that was created by the peephole2 pass.
1963
+ (power8 fusion peephole2): Create a new insn with the fused
1964
+ address, so that the fused operation is kept together after
1965
+ register allocation is done.
1966
+ (fusion_gpr_load_<mode>): Likewise.
1968
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
1971
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
1972
+ if there are only debug stmts after the noreturn call, instead
1973
+ remove the debug stmts.
1975
+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
1977
+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
1978
+ V2DF, V4SF, DF, and DI modes.
1979
+ (vsx_fmav2df2): Likewise.
1980
+ (vsx_float_fix_<mode>2): Likewise.
1981
+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
1983
+2014-09-10 Alan Modra <amodra@gmail.com>
1986
+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
1989
+2014-09-09 Richard Biener <rguenther@suse.de>
1991
+ Backport from mainline
1992
+ 2014-06-11 Richard Biener <rguenther@suse.de>
1994
+ PR tree-optimization/61452
1995
+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
1996
+ expr and has_constants in case we found a leader.
1997
+ (simplify_binary_expression): Always valueize operands first.
1998
+ (simplify_unary_expression): Likewise.
2000
+2014-09-09 Richard Biener <rguenther@suse.de>
2002
+ Backport from mainline
2003
+ 2014-05-05 Richard Biener <rguenther@suse.de>
2005
+ PR middle-end/61010
2006
+ * fold-const.c (fold_binary_loc): Consistently avoid
2007
+ canonicalizing X & CST away from a CST that is the mask
2010
+ 2014-05-28 Richard Biener <rguenther@suse.de>
2012
+ PR middle-end/61045
2013
+ * fold-const.c (fold_comparison): When folding
2014
+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
2015
+ the sign of the remaining constant operand stays the same.
2017
+ 2014-08-11 Richard Biener <rguenther@suse.de>
2019
+ PR tree-optimization/62075
2020
+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
2021
+ handle uses in patterns.
2023
+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2025
+ Backport from mainline.
2026
+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2028
+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
2029
+ (-mtune): Likewise.
2030
+ (-mcpu): Likewise.
2032
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2034
+ PR tree-optimization/60196
2035
+ PR tree-optimization/63189
2036
+ Backported from mainline
2037
+ 2013-09-17 Cong Hou <congh@google.com>
2039
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
2040
+ when checking the dot production pattern. The type of rhs operand
2041
+ of multiply is now checked correctly.
2043
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2045
+ Backported from mainline
2046
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
2049
+ * haifa-sched.c (advance_one_cycle): Fix dump.
2050
+ (schedule_block): Don't advance cycle if we are already at the
2051
+ beginning of the cycle.
2053
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2056
+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
2057
+ pass-trough jump functions correctly.
2059
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2062
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
2063
+ created replacements in ascending order of offsets.
2064
+ (known_aggs_to_agg_replacement_list): Likewise.
2066
+2014-09-01 Marek Polacek <polacek@redhat.com>
2068
+ Backport from mainline
2069
+ 2014-08-21 Marek Polacek <polacek@redhat.com>
2072
+ * expr.c (is_aligning_offset): Remove logical not.
2074
+2014-09-01 Marek Polacek <polacek@redhat.com>
2076
+ Backport from mainline
2077
+ 2014-08-19 Marek Polacek <polacek@redhat.com>
2080
+ * cgraphunit.c (handle_alias_pairs): Fix condition.
2082
+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
2084
+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
2085
+ prefix to function labels when generating fast indirect calls.
2087
+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
2089
+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
2091
+2014-08-26 Marek Polacek <polacek@redhat.com>
2093
+ Backport from mainline
2094
+ 2014-08-26 Marek Polacek <polacek@redhat.com>
2097
+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
2098
+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
2100
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2102
+ Backport from mainline
2103
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2106
+ * config/sh/sh.opt (musermode): Allow negative form.
2107
+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
2108
+ targets that don't support it.
2109
+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
2110
+ Document -mno-usermode option.
2112
+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
2115
+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
2116
+ last_address when the current function is a thunk.
2117
+ (pa_asm_output_mi_thunk): When we don't have named sections or they
2118
+ are not being used, check that thunk can reach the stub table with a
2121
+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2123
+ Backport fro mainline
2124
+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2127
+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
2128
+ documentation to state it is only for VSX operations.
2130
+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
2131
+ constraint only active if VSX.
2133
+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
2134
+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
2135
+ (lfiwzx): Likewise.
2137
+2014-08-15 Tom de Vries <tom@codesourcery.com>
2139
+ Backport from mainline:
2140
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
2142
+ PR rtl-optimization/62004
2143
+ PR rtl-optimization/62030
2144
+ * ifcvt.c (rtx_interchangeable_p): New function.
2145
+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
2147
+ 2014-08-05 Richard Biener <rguenther@suse.de>
2149
+ * emit-rtl.h (mem_attrs_eq_p): Declare.
2150
+ * emit-rtl.c (mem_attrs_eq_p): Export.
2152
+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
2154
+ Backport from trunk:
2155
+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
2158
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
2159
+ size accounting for thunks.
2160
+ (pa_asm_output_mi_thunk): Use final_start_function() and
2161
+ final_end_function() to output function start and end directives.
2163
+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2165
+ Backport from mainline:
2166
+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2168
+ * doc/invoke.texi (SH options): Document missing processor variant
2169
+ options. Remove references to Hitachi. Undocument deprecated mspace
2172
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
2174
+ PR tree-optimization/62073
2175
+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
2178
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2180
+ Backport from mainline
2181
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
2183
+ PR middle-end/62103
2184
+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
2185
+ bitfields, that is when size doesn't match the size of type or the
2186
+ size of the constructor.
2188
+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
2190
+ Backport patch from mainline
2191
+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2193
+ * config/rs6000/constraints.md (wh constraint): New constraint,
2194
+ for FP registers if direct move is available.
2195
+ (wi constraint): New constraint, for VSX/FP registers that can
2196
+ handle 64-bit integers.
2197
+ (wj constraint): New constraint for VSX/FP registers that can
2198
+ handle 64-bit integers for direct moves.
2199
+ (wk constraint): New constraint for VSX/FP registers that can
2200
+ handle 64-bit doubles for direct moves.
2201
+ (wy constraint): Make documentation match implementation.
2203
+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
2204
+ scalar_in_vmx_p field to simplify tests of whether SFmode or
2205
+ DFmode can go in the Altivec registers.
2206
+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
2207
+ (rs6000_setup_reg_addr_masks): Likewise.
2208
+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
2209
+ field, and wh/wi/wj/wk constraints.
2210
+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
2211
+ the wh/wi/wj/wk constraints.
2212
+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
2213
+ upper registers, prefer VSX registers unless the operation is a
2214
+ memory operation with REG+OFFSET addressing.
2216
+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
2217
+ DImode. Change SFmode to use ww constraint instead of d to allow
2218
+ SF registers in the upper registers.
2221
+ (VSr5): Fix thinko in comment.
2222
+ (VSa): New mode attribute that is an alternative to wa, that
2223
+ returns the VSX register class that a mode can go in, but may not
2224
+ be the preferred register class.
2225
+ (VS_64dm): New mode attribute for appropriate register classes for
2226
+ referencing 64-bit elements of vectors for direct moves and normal
2228
+ (VS_64reg): Likewise.
2229
+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
2230
+ register allocator to only registers the data type can handle.
2231
+ (vsx_le_perm_load_<mode>): Likewise.
2232
+ (vsx_le_perm_store_<mode>): Likewise.
2233
+ (vsx_xxpermdi2_le_<mode>): Likewise.
2234
+ (vsx_xxpermdi4_le_<mode>): Likewise.
2235
+ (vsx_lxvd2x2_le_<mode>): Likewise.
2236
+ (vsx_lxvd2x4_le_<mode>): Likewise.
2237
+ (vsx_stxvd2x2_le_<mode>): Likewise.
2238
+ (vsx_add<mode>3): Likewise.
2239
+ (vsx_sub<mode>3): Likewise.
2240
+ (vsx_mul<mode>3): Likewise.
2241
+ (vsx_div<mode>3): Likewise.
2242
+ (vsx_tdiv<mode>3_internal): Likewise.
2243
+ (vsx_fre<mode>2): Likewise.
2244
+ (vsx_neg<mode>2): Likewise.
2245
+ (vsx_abs<mode>2): Likewise.
2246
+ (vsx_nabs<mode>2): Likewise.
2247
+ (vsx_smax<mode>3): Likewise.
2248
+ (vsx_smin<mode>3): Likewise.
2249
+ (vsx_sqrt<mode>2): Likewise.
2250
+ (vsx_rsqrte<mode>2): Likewise.
2251
+ (vsx_tsqrt<mode>2_internal): Likewise.
2252
+ (vsx_fms<mode>4): Likewise.
2253
+ (vsx_nfma<mode>4): Likewise.
2254
+ (vsx_eq<mode>): Likewise.
2255
+ (vsx_gt<mode>): Likewise.
2256
+ (vsx_ge<mode>): Likewise.
2257
+ (vsx_eq<mode>_p): Likewise.
2258
+ (vsx_gt<mode>_p): Likewise.
2259
+ (vsx_ge<mode>_p): Likewise.
2260
+ (vsx_xxsel<mode>): Likewise.
2261
+ (vsx_xxsel<mode>_uns): Likewise.
2262
+ (vsx_copysign<mode>3): Likewise.
2263
+ (vsx_float<VSi><mode>2): Likewise.
2264
+ (vsx_floatuns<VSi><mode>2): Likewise.
2265
+ (vsx_fix_trunc<mode><VSi>2): Likewise.
2266
+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
2267
+ (vsx_x<VSv>r<VSs>i): Likewise.
2268
+ (vsx_x<VSv>r<VSs>ic): Likewise.
2269
+ (vsx_btrunc<mode>2): Likewise.
2270
+ (vsx_b2trunc<mode>2): Likewise.
2271
+ (vsx_floor<mode>2): Likewise.
2272
+ (vsx_ceil<mode>2): Likewise.
2273
+ (vsx_<VS_spdp_insn>): Likewise.
2274
+ (vsx_xscvspdp): Likewise.
2275
+ (vsx_xvcvspuxds): Likewise.
2276
+ (vsx_float_fix_<mode>2): Likewise.
2277
+ (vsx_set_<mode>): Likewise.
2278
+ (vsx_extract_<mode>_internal1): Likewise.
2279
+ (vsx_extract_<mode>_internal2): Likewise.
2280
+ (vsx_extract_<mode>_load): Likewise.
2281
+ (vsx_extract_<mode>_store): Likewise.
2282
+ (vsx_splat_<mode>): Likewise.
2283
+ (vsx_xxspltw_<mode>): Likewise.
2284
+ (vsx_xxspltw_<mode>_direct): Likewise.
2285
+ (vsx_xxmrghw_<mode>): Likewise.
2286
+ (vsx_xxmrglw_<mode>): Likewise.
2287
+ (vsx_xxsldwi_<mode>): Likewise.
2288
+ (vsx_xscvdpspn): Tighten constraints to only use register classes
2290
+ (vsx_xscvspdpn): Likewise.
2291
+ (vsx_xscvdpspn_scalar): Likewise.
2293
+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
2294
+ wj, and wk constraints.
2295
+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
2296
+ general purpose registers.
2298
+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
2300
+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
2301
+ DImode instead of wm. Use wk constraint for direct move of DFmode
2303
+ (extendsidi2_lfiwax): Likewise.
2304
+ (lfiwax): Likewise.
2305
+ (lfiwzx): Likewise.
2306
+ (movdi_internal64): Likewise.
2308
+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
2309
+ wk constraints. Make the wy constraint documentation match them
2312
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
2314
+ Backport from mainline
2315
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2317
+ PR tree-optimization/61375
2318
+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
2319
+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
2320
+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
2322
+2014-08-01 Richard Biener <rguenther@suse.de>
2324
+ PR tree-optimization/61964
2325
+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
2326
+ function merged from trunk.
2327
+ (gimple_equal_p): Handle non-SSA LHS solely by structural
2330
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
2332
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
2334
+2014-07-24 Kyle McMartin <kyle@redhat.com>
2336
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
2338
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2340
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
2342
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
2343
+ function. Issue -Wpsabi warning if future GCC releases will use
2344
+ different field alignment rules for this type.
2345
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
2346
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
2347
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
2349
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2351
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
2352
+ -Wpsabi note when encountering a type where future GCC releases
2353
+ will apply different alignment requirements.
2355
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2357
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
2358
+ does not fit fully into floating-point registers, and there is still
2359
+ space in the register parameter area, issue -Wpsabi note that the ABI
2360
+ will change in a future GCC release.
2362
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
2364
+ * config/arm/t-rtems-eabi: Add
2365
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
2366
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
2367
+ mbig-endian/mthumb/march=armv7-r, and
2368
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
2371
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
2373
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
2374
+ (LIBTSAN_EARLY_SPEC): Likewise.
2375
+ (STATIC_LIBASAN_LIBS): Likewise.
2376
+ (STATIC_LIBTSAN_LIBS): Likewise.
2378
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
2380
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
2382
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
2384
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
2385
+ (*membar_storeload): Disable for LEON3.
2387
+2014-07-17 Richard Biener <rguenther@suse.de>
2389
+ PR rtl-optimization/61801
2390
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
2391
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
2394
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
2396
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
2397
+ on the FUNCTION_DECL.
2399
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
2401
+ * doc/install.texi: Remove links to defunct package providers for
2404
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
2406
+ PR middle-end/53590
2407
+ * function.c (allocate_struct_function): Revert r188667 change.
2409
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
2411
+ PR tree-optimization/61684
2412
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
2413
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
2415
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
2417
+ Backport from Mainline
2418
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
2419
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
2421
+ PR tree-optimization/61306
2422
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
2423
+ expression instead of its size.
2424
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
2425
+ false to prevent optimization when the result is unpredictable due to
2426
+ arithmetic right shift of signed type with highest byte is set.
2427
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
2428
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
2429
+ result is unpredictable due to sign extension.
2430
+ (find_bswap): Adapt to change in struct symbolic_number.
2432
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
2434
+ Backport from mainline
2435
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
2438
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
2440
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2443
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
2444
+ extraction other than index 3.
2446
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
2449
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
2450
+ model family 6 CPU with has_longmode never use a CPU without
2453
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2455
+ Backport from mainline
2457
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
2458
+ Chung-Lin Tang <cltang@codesourcery.com>
2460
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
2461
+ TARGET_THUMB1_ONLY. Add comments.
2463
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
2465
+ Backport from mainline
2466
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
2469
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
2470
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
2471
+ and corresponding splitters. Zero extend general register
2472
+ or memory input operand to XMM temporary. Enable for
2473
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
2474
+ (floatunssi<mode>2): Update expander predicate.
2476
+2014-06-18 Richard Henderson <rth@redhat.com>
2479
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
2481
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
2483
+ Revert on gcc-4_8-branch.
2484
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
2485
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
2487
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
2489
+ Backport from mainline
2492
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
2493
+ variable 'size'; calculate 'size' right in the front; use
2494
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
2495
+ pcum->aapcs_stack_words.
2497
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
2499
+ Backport from mainline
2501
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
2503
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
2504
+ (BU_MISC_2): Rename to ...
2505
+ (BU_LDBL128_2): ... this.
2506
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
2507
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
2508
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
2509
+ RS6000_BTM_LDBL128.
2510
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
2511
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
2512
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
2513
+ (unpacktf_1): Likewise.
2514
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
2515
+ (__builtin_longdouble_dw1): Likewise.
2516
+ * doc/sourcebuild.texi (longdouble128): Document.
2518
+2014-06-13 Jason Merrill <jason@redhat.com>
2521
+ * common.opt (-fno-gnu-unique): Add.
2522
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
2524
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
2526
+ Backport from 2014-05-09 trunk r210272
2528
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
2529
+ unsigned int initializers for regno_in, regno_out.
2531
+ Backport from 2014-05-14 trunk r210418
2532
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
2533
+ shifted values to avoid build warning.
2535
+ Backport from 2014-06-12 trunk r211491
2538
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
2539
+ loading from address spaces.
2541
+2014-06-12 Alan Modra <amodra@gmail.com>
2544
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
2545
+ * doc/tm.texi: Regenerate.
2546
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
2547
+ Use throughout in place of REG_PARM_STACK_SPACE.
2548
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
2549
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
2550
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
2551
+ prototype_p when incoming. Use function decl when incoming
2552
+ to handle K&R style functions.
2553
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
2554
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
2556
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
2558
+ Back port from trunk
2559
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
2562
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
2563
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
2564
+ handles swapping the two 64-bit double words on little endian
2565
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
2566
+ these types are properly swapped. Change all of the insns and
2567
+ splits that do the 64-bit swaps to use VSX_LE.
2568
+ (vsx_le_perm_load_<mode>): Likewise.
2569
+ (vsx_le_perm_store_<mode>): Likewise.
2570
+ (splitters for little endian memory operations): Likewise.
2571
+ (vsx_xxpermdi2_le_<mode>): Likewise.
2572
+ (vsx_lxvd2x2_le_<mode>): Likewise.
2573
+ (vsx_stxvd2x2_le_<mode>): Likewise.
2575
+2014-06-05 Martin Jambor <mjambor@suse.cz>
2578
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
2581
+2014-06-04 Richard Biener <rguenther@suse.de>
2583
+ PR tree-optimization/61383
2584
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
2587
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
2589
+ Backport from mainline
2590
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
2592
+ PR rtl-optimization/60866
2593
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
2594
+ Default it to -1. Pass it down to init_simplejump_data.
2595
+ (init_simplejump_data): New parameter old_seqno. Pass it down
2596
+ to get_seqno_for_a_jump.
2597
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
2598
+ initializing new jump seqno as a last resort. Add comment.
2599
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
2600
+ jump and pass it down to sel_init_new_insn.
2601
+ (sel_redirect_edge_and_branch_force): Likewise.
2603
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
2605
+ Backport from mainline
2606
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
2608
+ PR rtl-optimization/60901
2609
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
2610
+ bb predecessor belongs to the same scheduling region. Adjust comment.
2612
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
2614
+ Backport from mainline
2615
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
2618
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
2619
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
2621
+2014-05-28 Guozhi Wei <carrot@google.com>
2624
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
2626
+ (vqdmulhq_n_s16): Likewise.
2628
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
2630
+ Backport from mainline
2631
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
2633
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
2634
+ predicate to detect a negative quotient.
2636
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
2639
+ * doc/extend.texi (Local Labels): Note that label differences are
2640
+ not supported for AVR.
2642
+2014-05-26 Michael Tautschnig <mt@debian.org>
2645
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
2646
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
2648
+2014-05-23 Alan Modra <amodra@gmail.com>
2651
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
2652
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
2653
+ Use "Y" constraint rather than "m".
2655
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
2657
+ Backport from mainline
2658
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
2660
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
2662
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
2665
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
2667
2014-05-22 Release Manager
2669
* GCC 4.8.3 released.
2670
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
2671
===================================================================
2672
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
2673
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch)
2675
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
2677
+/* { dg-do compile { target { powerpc64le-*-* } } } */
2678
+/* { dg-options "-O0 -Wdeprecated" } */
2680
+#include <altivec.h>
2686
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
2687
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
2689
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
2690
===================================================================
2691
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release)
2692
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch)
2694
+/* { dg-do run { target { powerpc64*-*-* } } } */
2695
+/* { dg-require-effective-target powerpc_vsx_ok } */
2696
+/* { dg-options "-mvsx" } */
2698
+#include <altivec.h>
2702
+vector double vec = (vector double) {99.0, 99.0};
2706
+ int actual = vec_all_nge(vec, vec);
2710
+ actual = vec_all_nle(vec, vec);
2714
+ actual = vec_any_nge(vec, vec);
2718
+ actual = vec_any_nle(vec, vec);
2724
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
2725
===================================================================
2726
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release)
2727
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch)
2729
/* { dg-do compile { target { powerpc*-*-* } } } */
2730
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2731
/* { dg-require-effective-target powerpc_vsx_ok } */
2732
-/* { dg-options "-O3 -mcpu=power7" } */
2733
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
2735
/* Test the various load/store varients. */
2737
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
2738
===================================================================
2739
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
2740
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
2742
/* { dg-do assemble } */
2743
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
2744
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
2745
+/* { dg-require-effective-target longdouble128 } */
2746
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
2748
typedef float TFmode __attribute__ ((mode (TF)));
2749
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
2750
===================================================================
2751
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
2752
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
2754
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2755
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
2756
/* { dg-require-effective-target powerpc_fprs } */
2757
+/* { dg-require-effective-target longdouble128 } */
2758
/* { dg-options "-O2 -mhard-float" } */
2761
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
2762
===================================================================
2763
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release)
2764
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch)
2766
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2767
+/* { dg-options "-mabi=elfv2" } */
2774
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
2778
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
2779
===================================================================
2780
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
2781
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
2783
+/* { dg-do compile { target { powerpc*-*-* } } } */
2784
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2785
+/* { dg-require-effective-target powerpc_htm_ok } */
2786
+/* { dg-options "-O2 -mhtm" } */
2788
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
2789
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
2791
+#include <htmintrin.h>
2795
+ return _HTM_STATE(__builtin_ttest());
2797
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
2798
===================================================================
2799
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
2800
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch)
2802
+/* Test expected code generation for lvsl and lvsr on little endian.
2803
+ Note that lvsl and lvsr are each produced once, but the filename
2804
+ causes them to appear twice in the file. */
2806
+/* { dg-do compile { target { powerpc64le-*-* } } } */
2807
+/* { dg-options "-O0 -Wno-deprecated" } */
2808
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
2809
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
2810
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
2811
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
2814
+#include <altivec.h>
2820
+ vector unsigned char a = vec_lvsl (4, f);
2821
+ vector unsigned char b = vec_lvsr (8, f);
2823
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
2824
===================================================================
2825
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release)
2826
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch)
2828
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2829
+/* { dg-options "-mno-compat-align-parm" } */
2833
+ long a __attribute__((aligned (16)));
2836
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
2840
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
2841
===================================================================
2842
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release)
2843
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch)
2845
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2846
+/* { dg-require-effective-target powerpc_altivec_ok } */
2847
+/* { dg-options "-maltivec" } */
2851
+ int a __attribute__((vector_size (8)));
2852
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
2854
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
2855
===================================================================
2856
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release)
2857
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch)
2859
/* { dg-do compile { target powerpc*-*-* } } */
2860
/* { dg-require-effective-target powerpc_altivec_ok } */
2861
-/* { dg-options "-maltivec -O0 -Wall" } */
2862
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
2864
#include <altivec.h>
2866
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
2867
===================================================================
2868
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release)
2869
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch)
2871
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
2872
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
2873
/* { dg-require-effective-target powerpc_altivec_ok } */
2874
-/* { dg-options "-maltivec -O2" } */
2875
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
2877
#include <altivec.h>
2879
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
2880
===================================================================
2881
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
2882
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
2884
/* { dg-do compile { target powerpc_altivec_ok } } */
2885
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
2886
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
2888
#include <altivec.h>
2890
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
2891
===================================================================
2892
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
2893
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
2895
+/* { dg-do compile } */
2896
+/* { dg-options "-O2 -mieee" } */
2898
+void foo (int *dimensions, double **params, int hh)
2902
+ else if (dimensions[hh] > 0)
2903
+ params[hh][0] = 1.0f;
2905
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
2906
===================================================================
2907
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
2908
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
2910
+/* Test AAPCS64 layout and __builtin_va_start.
2912
+ Pass named HFA/HVA argument on stack. */
2914
+/* { dg-do run { target aarch64*-*-* } } */
2916
+#ifndef IN_FRAMEWORK
2917
+#define AAPCS64_TEST_STDARG
2918
+#define TESTFILE "va_arg-14.c"
2919
+#include "type-def.h"
2921
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
2922
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
2923
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
2924
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
2926
+#include "abitest.h"
2928
+ ARG (float, 1.0f, S0, 0)
2929
+ ARG (float, 2.0f, S1, 1)
2930
+ ARG (float, 3.0f, S2, 2)
2931
+ ARG (float, 4.0f, S3, 3)
2932
+ ARG (float, 5.0f, S4, 4)
2933
+ ARG (float, 6.0f, S5, 5)
2934
+ ARG (float, 7.0f, S6, 6)
2935
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
2936
+ /* Previous argument size has been rounded up to the nearest multiple of
2938
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
2939
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
2940
+ ARG (vf4_t, float32x4, STACK + 32, 9)
2941
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
2943
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
2945
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
2946
===================================================================
2947
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
2948
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
2963
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
2964
===================================================================
2965
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
2966
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
2968
+/* Test AAPCS64 layout and __builtin_va_start.
2970
+ Pass named HFA/HVA argument on stack. */
2972
+/* { dg-do run { target aarch64*-*-* } } */
2974
+#ifndef IN_FRAMEWORK
2975
+#define AAPCS64_TEST_STDARG
2976
+#define TESTFILE "va_arg-13.c"
2978
+struct float_float_t
2990
+#define HAS_DATA_INIT_FUNC
2994
+ float_float.a = 1.2f;
2995
+ float_float.b = 2.2f;
2997
+ float_int.b8 = 4983.80f;
3000
+#include "abitest.h"
3002
+ ARG (float, 1.0f, S0, 0)
3003
+ ARG (float, 2.0f, S1, 1)
3004
+ ARG (float, 3.0f, S2, 2)
3005
+ ARG (float, 4.0f, S3, 3)
3006
+ ARG (float, 5.0f, S4, 4)
3007
+ ARG (float, 6.0f, S5, 5)
3008
+ ARG (float, 7.0f, S6, 6)
3009
+ ARG (struct float_float_t, float_float, STACK, 7)
3010
+ ARG (int, 9, W0, 8)
3011
+ ARG (int, 10, W1, 9)
3012
+ ARG (int, 11, W2, 10)
3013
+ ARG (int, 12, W3, 11)
3014
+ ARG (int, 13, W4, 12)
3015
+ ARG (int, 14, W5, 13)
3016
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
3018
+ /* Note on the reason of using 'X7' instead of 'W7' here:
3019
+ Using 'X7' makes sure the test works in the big-endian mode.
3020
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
3021
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
3022
+ the memory, with the content of the other 4 bytes unspecified. The
3023
+ test framework will only compare the 4 relavent bytes. */
3024
+ ANON (union float_int_t, float_int, X7, 15)
3025
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
3027
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
3028
===================================================================
3029
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
3030
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
3032
+/* Test AAPCS64 layout and __builtin_va_start.
3034
+ Pass named __128int argument on stack. */
3036
+/* { dg-do run { target aarch64*-*-* } } */
3038
+#ifndef IN_FRAMEWORK
3039
+#define AAPCS64_TEST_STDARG
3040
+#define TESTFILE "va_arg-15.c"
3041
+#include "type-def.h"
3043
+union int128_t qword;
3045
+#define HAS_DATA_INIT_FUNC
3049
+ /* Init signed quad-word integer. */
3050
+ qword.l64 = 0xfdb9753102468aceLL;
3051
+ qword.h64 = 0xeca8642013579bdfLL;
3054
+#include "abitest.h"
3056
+ ARG (int, 1, W0, 0)
3057
+ ARG (int, 2, W1, 1)
3058
+ ARG (int, 3, W2, 2)
3059
+ ARG (int, 4, W3, 3)
3060
+ ARG (int, 5, W4, 4)
3061
+ ARG (int, 6, W5, 5)
3062
+ ARG (int, 7, W6, 6)
3063
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
3065
+#ifndef __AAPCS64_BIG_ENDIAN__
3066
+ LAST_ANON (int, 8, STACK + 16, 8)
3068
+ LAST_ANON (int, 8, STACK + 20, 8)
3071
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
3072
===================================================================
3073
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
3074
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
3076
+/* { dg-do run } */
3077
+/* { dg-options "-std=gnu99" } */
3079
+#include <stdlib.h>
3080
+#include <stdarg.h>
3082
+#define NC __attribute__((noinline,noclone))
3084
+void NC vfun (char n, ...)
3095
+ if (11 != va_arg (ap, int))
3099
+ if (2222 != va_arg (ap, int))
3103
+ if (333333 != va_arg (ap, __int24))
3107
+ if (44444444 != va_arg (ap, long))
3111
+ if (8888888888888888 != va_arg (ap, long long))
3120
+void NC boo_qi (const __flash char *p)
3125
+void NC boox_qi (const __memx char *p)
3130
+void NC boo_hi (const __flash int *p)
3135
+void NC boox_hi (const __memx int *p)
3140
+void NC boo_psi (const __flash __int24 *p)
3145
+void NC boox_psi (const __memx __int24 *p)
3150
+void NC boo_si (const __flash long *p)
3155
+void NC boox_si (const __memx long *p)
3160
+void NC boo_di (const __flash long long *p)
3165
+void NC boox_di (const __memx long long *p)
3170
+const __flash char f_qi = 11;
3171
+const __flash int f_hi = 2222;
3172
+const __flash __int24 f_psi = 333333;
3173
+const __flash long f_si = 44444444;
3174
+const __flash long long f_di = 8888888888888888;
3176
+const __memx char x_qi = 11;
3177
+const __memx int x_hi = 2222;
3178
+const __memx __int24 x_psi = 333333;
3179
+const __memx long x_si = 44444444;
3180
+const __memx long long x_di = 8888888888888888;
3184
+__int24 r_psi = 333333;
3185
+long r_si = 44444444;
3186
+long long r_di = 8888888888888888;
3198
+ boox_psi (&x_psi);
3204
+ boox_psi (&r_psi);
3210
Index: gcc/testsuite/gcc.target/i386/pr61923.c
3211
===================================================================
3212
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release)
3213
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch)
3215
+/* PR debug/61923 */
3216
+/* { dg-do compile } */
3217
+/* { dg-options "-O2 -fcompare-debug" } */
3229
+struct ext4_map_blocks
3235
+int ext4_da_map_blocks_ei_0;
3236
+void fn1 (int p1, struct ext4_map_blocks *p2)
3241
+ ext4_da_map_blocks_ei_0++;
3242
+ arch_spinlock_t *lock;
3243
+ switch (sizeof *&lock->tickets.head)
3245
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
3249
+ fn2 (p2->m_lblk, p2->m_len);
3251
Index: gcc/testsuite/gcc.target/i386/pr61423.c
3252
===================================================================
3253
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
3254
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
3256
+/* PR target/61423 */
3257
+/* { dg-do run { target ia32 } } */
3258
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
3261
+static unsigned int A[N];
3264
+__attribute__((noinline))
3267
+ unsigned int sum = 0;
3271
+ for (i = 0; i < N; i++)
3284
+ for(i = 0; i < N; i++)
3290
+ __builtin_abort ();
3294
Index: gcc/testsuite/gcc.target/i386/pr60901.c
3295
===================================================================
3296
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
3297
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
3299
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
3302
+extern void bar (void);
3303
+extern int baz (int);
3309
+ for (j = 0; j < n; j++)
3311
+ for (i = 1; i < j; i++)
3316
Index: gcc/testsuite/gcc.target/i386/pr61801.c
3317
===================================================================
3318
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release)
3319
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch)
3321
+/* PR rtl-optimization/61801 */
3322
+/* { dg-do compile } */
3323
+/* { dg-options "-Os -fcompare-debug" } */
3337
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
3342
Index: gcc/testsuite/gcc.target/i386/pr61446.c
3343
===================================================================
3344
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
3345
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
3347
+/* PR rtl-optimization/61446 */
3349
+/* { dg-do compile { target { ia32 } } } */
3350
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
3355
+ const double dfa = a;
3356
+ const unsigned int hi = dfa / 0x1p32f;
3357
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
3359
+ return ((unsigned long long) hi << (4 * (8))) | lo;
3361
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
3362
===================================================================
3363
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release)
3364
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch)
3366
+/* { dg-do run } */
3367
+/* { dg-options "-march=octeon" } */
3369
+extern void abort (void);
3373
+ struct node *next;
3374
+ struct node *prev;
3381
+ struct node *first;
3384
+struct head heads[5];
3388
+struct head *head = &heads[2];
3390
+static int __attribute__((noinline))
3393
+ node.prev = (void *)head;
3394
+ head->first = &node;
3396
+ struct node *n = head->first;
3397
+ struct head *h = &heads[k];
3398
+ struct node *next = n->next;
3400
+ if (n->prev == (void *)h)
3403
+ n->prev->next = next;
3405
+ n->next = h->first;
3406
+ return n->next == &node;
3416
Index: gcc/testsuite/gcc.target/sh/pr61996.c
3417
===================================================================
3418
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
3419
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
3421
+/* Check that the option -musermode has no effect on targets that do not
3422
+ support user/privileged mode and that it does not interfere with option
3423
+ -matomic-model=soft-imask. */
3424
+/* { dg-do compile } */
3425
+/* { dg-options "-matomic-model=soft-imask" } */
3426
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
3433
Index: gcc/testsuite/lib/target-supports.exp
3434
===================================================================
3435
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
3436
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
3437
@@ -1790,6 +1790,15 @@
3441
+# Return 1 if the target supports long double of 128 bits,
3444
+proc check_effective_target_longdouble128 { } {
3445
+ return [check_no_compiler_messages longdouble128 object {
3446
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
3450
# Return 1 if the target supports double of 64 bits,
3453
@@ -5329,3 +5338,40 @@
3458
+# Return 1 if <fenv.h> is available with all the standard IEEE
3459
+# exceptions and floating-point exceptions are raised by arithmetic
3460
+# operations. (If the target requires special options for "inexact"
3461
+# exceptions, those need to be specified in the testcases.)
3463
+proc check_effective_target_fenv_exceptions {} {
3464
+ return [check_runtime fenv_exceptions {
3466
+ #include <stdlib.h>
3467
+ #ifndef FE_DIVBYZERO
3468
+ # error Missing FE_DIVBYZERO
3470
+ #ifndef FE_INEXACT
3471
+ # error Missing FE_INEXACT
3473
+ #ifndef FE_INVALID
3474
+ # error Missing FE_INVALID
3476
+ #ifndef FE_OVERFLOW
3477
+ # error Missing FE_OVERFLOW
3479
+ #ifndef FE_UNDERFLOW
3480
+ # error Missing FE_UNDERFLOW
3482
+ volatile float a = 0.0f, r;
3487
+ if (fetestexcept (FE_INVALID))
3494
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
3495
===================================================================
3496
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
3497
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
3499
! { dg-require-effective-target fortran_large_real }
3500
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
3501
-! Test XFAILed on these platforms because the system's printf() lacks
3502
+! { dg-do run { xfail powerpc*-apple-darwin* } }
3503
+! Test XFAILed on this platform because the system's printf() lacks
3504
! proper support for denormalized long doubles. See PR24685
3506
! This tests that the default formats for formatted I/O of reals are
3507
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
3508
===================================================================
3509
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release)
3510
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch)
3512
+! { dg-do compile }
3513
+! { dg-options "-fdump-tree-original" }
3514
+! PR 61999 - this used to ICE.
3515
+! Original test case by A. Kasahara
3517
+ use, intrinsic:: iso_fortran_env, only: output_unit
3521
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
3525
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
3526
+! { dg-final { cleanup-tree-dump "original" } }
3527
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
3528
===================================================================
3529
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release)
3530
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch)
3533
+! { dg-do compile }
3534
+! { dg-options "-fopenmp" }
3537
+ integer, parameter :: p(2) = (/ 11, 12 /)
3540
+ !$omp parallel do default(none)
3545
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
3546
===================================================================
3547
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release)
3548
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch)
3551
+! { dg-do compile }
3552
+! { dg-options "-fopenmp" }
3556
+ integer :: s1, s2, s3
3559
+ type(t), parameter :: u = t(1, 2, 3)
3561
+ !$omp parallel do default(none)
3566
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
3567
===================================================================
3568
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
3569
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
3572
+! { dg-options "-fcray-pointer" }
3587
+ if (z /= 42) call abort
3589
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
3590
===================================================================
3591
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release)
3592
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch)
3595
+! Tests fix for PR61780 in which the loop reversal mechanism was
3596
+! not accounting for the first index being an element so that no
3597
+! loop in this dimension is created.
3599
+! Contributed by Manfred Tietze on clf.
3603
+ integer, parameter :: n = 10, k = 3
3605
+ integer, dimension(n,n) :: y
3606
+ integer :: res1(n), res2(n)
3619
+ y(k,4:n) = y(k,3:n-1)
3623
+ y(k,n:4:-1) = y(k,n-1:3:-1)
3628
+ if (any(res1 /= res2)) call abort ()
3630
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
3631
===================================================================
3632
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
3633
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
3635
+C { dg-do compile }
3637
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
3640
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
3643
Index: gcc/testsuite/gfortran.dg/nint_2.f90
3644
===================================================================
3645
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
3646
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
3648
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
3651
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
3652
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
3653
+! Note that this doesn't fail on powerpc64le-*-linux*.
3655
integer(kind=8) :: i1, i2
3657
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
3658
===================================================================
3659
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release)
3660
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch)
3664
call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
3665
- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
3666
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
3667
call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
3668
call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
3670
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
3671
===================================================================
3672
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release)
3673
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch)
3676
+! { dg-options "-ffrontend-optimize" }
3677
+! PR 62214 - this used to give the wrong result.
3678
+! Original test case by Oliver Fuhrer
3681
+ CHARACTER(LEN=20) :: fullNames(2)
3682
+ CHARACTER(LEN=255) :: pathName
3683
+ CHARACTER(LEN=5) :: fileNames(2)
3685
+ pathName = "/dir1/dir2/"
3686
+ fileNames = (/ "file1", "file2" /)
3687
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
3688
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
3689
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
3691
Index: gcc/testsuite/gfortran.dg/pr45636.f90
3692
===================================================================
3693
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
3694
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
3699
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
3700
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
3701
! { dg-final { cleanup-tree-dump "forwprop2" } }
3702
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
3703
===================================================================
3704
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
3705
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
3708
+! Test the fix for PR61459.
3710
+! Contributed by John Wingate <johnww@tds.net>
3716
+ public :: f_segfault, f_segfault_plus, f_workaround
3717
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
3721
+ function f_segfault(x)
3722
+ real, dimension(:), allocatable :: f_segfault
3723
+ real, dimension(:), intent(in) :: x
3724
+ allocate(f_segfault(2))
3725
+ f_segfault = matmul(b,x)
3726
+ end function f_segfault
3728
+! Sefaulted without the ALLOCATE as well.
3729
+ function f_segfault_plus(x)
3730
+ real, dimension(:), allocatable :: f_segfault_plus
3731
+ real, dimension(:), intent(in) :: x
3732
+ f_segfault_plus = matmul(b,x)
3733
+ end function f_segfault_plus
3735
+ function f_workaround(x)
3736
+ real, dimension(:), allocatable :: f_workaround
3737
+ real, dimension(:), intent(in) :: x
3738
+ real, dimension(:), allocatable :: tmp
3739
+ allocate(f_workaround(2),tmp(2))
3741
+ f_workaround = tmp
3742
+ end function f_workaround
3749
+ real, dimension(2) :: x = 1.0, y
3750
+ y = f_workaround (x)
3751
+ if (any (f_segfault (x) .ne. y)) call abort
3752
+ if (any (f_segfault_plus (x) .ne. y)) call abort
3754
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
3755
===================================================================
3756
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release)
3757
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch)
3760
real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78]
3761
real,parameter :: myeps(size(values)) = epsilon(0.0) &
3762
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
3763
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
3764
! The following is sufficient for me - the values above are a bit
3766
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
3767
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
3768
===================================================================
3769
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
3770
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
3772
+#ifdef __INT32_TYPE__
3773
+typedef __INT32_TYPE__ int32_t;
3775
+typedef int int32_t;
3778
+#ifdef __UINT32_TYPE__
3779
+typedef __UINT32_TYPE__ uint32_t;
3781
+typedef unsigned uint32_t;
3784
+#define __fake_const_swab32(x) ((uint32_t)( \
3785
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
3786
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
3787
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
3788
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
3790
+/* Previous version of bswap optimization failed to consider sign extension
3791
+ and as a result would replace an expression *not* doing a bswap by a
3794
+__attribute__ ((noinline, noclone)) uint32_t
3795
+fake_bswap32 (uint32_t in)
3797
+ return __fake_const_swab32 (in);
3803
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
3805
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
3807
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
3808
+ __builtin_abort ();
3811
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
3812
===================================================================
3813
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
3814
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
3816
+set additional_flags "-Wno-psabi"
3818
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
3819
===================================================================
3820
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release)
3821
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch)
3829
+static union U u = { 0x12345678 };
3831
+/* Constant folding used to fail to account for endianness when folding a
3837
+#ifdef __BYTE_ORDER__
3838
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
3839
+ return u.b - 0x45678;
3841
+ return u.b - 0x12345;
3846
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
3847
===================================================================
3848
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
3849
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
3861
+ __builtin_abort ();
3864
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
3865
===================================================================
3866
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release)
3867
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch)
3869
set additional_flags "-mno-mmx"
3872
+set additional_flags "-Wno-psabi"
3874
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
3875
===================================================================
3876
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
3877
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
3879
+#ifdef __INT16_TYPE__
3880
+typedef __INT16_TYPE__ int16_t;
3882
+typedef short int16_t;
3885
+#ifdef __UINT32_TYPE__
3886
+typedef __UINT32_TYPE__ uint32_t;
3888
+typedef unsigned uint32_t;
3891
+#define __fake_const_swab32(x) ((uint32_t)( \
3892
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
3893
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
3894
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
3895
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
3898
+/* Previous version of bswap optimization failed to consider sign extension
3899
+ and as a result would replace an expression *not* doing a bswap by a
3902
+__attribute__ ((noinline, noclone)) uint32_t
3903
+fake_bswap32 (uint32_t in)
3905
+ return __fake_const_swab32 (in);
3911
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
3913
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
3915
+ if (fake_bswap32 (0x81828384) != 0xff838281)
3916
+ __builtin_abort ();
3919
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
3920
===================================================================
3921
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
3922
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
3924
+#ifdef __UINT64_TYPE__
3925
+typedef __UINT64_TYPE__ uint64_t;
3927
+typedef unsigned long long uint64_t;
3930
+#ifndef __SIZEOF_INT128__
3931
+#define __int128 long long
3934
+/* Some version of bswap optimization would ICE when analyzing a mask constant
3935
+ too big for an HOST_WIDE_INT (PR61375). */
3937
+__attribute__ ((noinline, noclone)) uint64_t
3938
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
3940
+ __int128 mask = (__int128)0xffff << 56;
3941
+ return ((in1 & mask) >> 56) | in2;
3948
+#ifdef __SIZEOF_INT128__
3951
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
3953
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
3955
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
3956
+ __builtin_abort ();
3959
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
3960
===================================================================
3961
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release)
3962
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch)
3967
+set additional_flags "-Wno-psabi"
3969
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
3970
===================================================================
3971
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release)
3972
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch)
3974
+set additional_flags "-Wno-psabi"
3976
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
3977
===================================================================
3978
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
3979
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
3981
+/* PR tree-optimization/61684 */
3986
+static short **e = 0;
3991
+ for (; c < 1; c++)
3994
+ a = d && (c && 1) & *b;
3996
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
3997
===================================================================
3998
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
3999
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
4001
+/* PR inline-asm/63282 */
4008
+ asm volatile goto ("" : : : : a, b);
4014
Index: gcc/testsuite/gnat.dg/opt39.adb
4015
===================================================================
4016
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
4017
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
4019
+-- { dg-do compile }
4020
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
4022
+procedure Opt39 (I : Integer) is
4024
+ type Rec is record
4032
+ procedure Set (A : access Rec; I : Integer) is
4033
+ Tmp : Rec := A.all;
4042
+ Set (R'Access, I);
4044
+ raise Program_Error;
4048
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
4049
+-- { dg-final { cleanup-tree-dump "optimized" } }
4050
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
4051
===================================================================
4052
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
4053
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
4056
+-- { dg-options "-gnato -O" }
4058
+procedure Overflow_Fixed is
4060
+ type Unsigned_8_Bit is mod 2**8;
4062
+ procedure Fixed_To_Eight (Value : Duration) is
4063
+ Item : Unsigned_8_Bit;
4065
+ Item := Unsigned_8_Bit(Value);
4066
+ raise Program_Error;
4068
+ when Constraint_Error => null; -- expected case
4072
+ Fixed_To_Eight (-0.5);
4074
Index: gcc/testsuite/gnat.dg/aliasing1.adb
4075
===================================================================
4076
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
4077
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
4082
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
4083
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
4084
-- { dg-final { cleanup-tree-dump "optimized" } }
4085
Index: gcc/testsuite/gcc.dg/pr60866.c
4086
===================================================================
4087
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
4088
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
4090
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
4091
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
4096
+foo (int w, int **dnroot, int **dn)
4099
+ int *xchild = xchild;
4100
+ for (; w < n; w++)
4104
+ for (child = *dn; child; child = xchild)
4108
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
4109
===================================================================
4110
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release)
4111
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch)
4113
/* { dg-do compile } */
4114
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4115
#include <altivec.h>
4116
typedef const volatile unsigned int _1;
4117
typedef const unsigned int _2;
4118
Index: gcc/testsuite/gcc.dg/vmx/ops.c
4119
===================================================================
4120
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release)
4121
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch)
4123
/* { dg-do compile } */
4124
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4125
#include <altivec.h>
4127
extern char * *var_char_ptr;
4128
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
4129
===================================================================
4130
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
4131
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
4133
/* { dg-do compile } */
4134
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4136
/* Checks from the original ops.c that pass pointers to long or
4137
unsigned long for operations that support that in released versions
4138
Index: gcc/testsuite/gcc.dg/pr63342.c
4139
===================================================================
4140
--- a/src/gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release)
4141
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch)
4143
+/* PR debug/63342 */
4144
+/* { dg-do compile } */
4145
+/* { dg-options "-g -O2" } */
4146
+/* { dg-additional-options "-fpic" { target fpic } } */
4148
+static __thread double u[9], v[9];
4151
+foo (double **p, double **q)
4162
+ for (i = 0; i < 9; i++)
4164
+ double a = x + v[i];
4165
+ s += u[i] * a * a;
4169
Index: gcc/testsuite/gcc.dg/pr63284.c
4170
===================================================================
4171
--- a/src/gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release)
4172
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch)
4174
+/* PR debug/63284 */
4175
+/* { dg-do compile } */
4176
+/* { dg-options "-O2 -fcompare-debug" } */
4178
+int a[10], *b, *d, c, f;
4216
Index: gcc/testsuite/gcc.dg/pr61045.c
4217
===================================================================
4218
--- a/src/gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release)
4219
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch)
4221
+/* { dg-do run } */
4222
+/* { dg-options "-fstrict-overflow" } */
4227
+ int b = __INT_MAX__;
4228
+ int t = (a - 2) > (b - 1);
4230
+ __builtin_abort();
4233
Index: gcc/testsuite/gcc.dg/pr62004.c
4234
===================================================================
4235
--- a/src/gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release)
4236
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch)
4238
+/* { dg-do run } */
4239
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
4243
+ struct node *next;
4244
+ struct node *prev;
4251
+ struct node *first;
4254
+struct head heads[5];
4258
+struct head *head = &heads[2];
4265
+ node.next = (void*)0;
4267
+ node.prev = (void *)head;
4269
+ head->first = &node;
4271
+ struct node *n = head->first;
4273
+ struct head *h = &heads[k];
4275
+ heads[2].first = n->next;
4277
+ if ((void*)n->prev == (void *)h)
4280
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
4281
+ p = n->prev->next;
4283
+ return !(p == (void*)0);
4285
Index: gcc/testsuite/gcc.dg/pr51879-18.c
4286
===================================================================
4287
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release)
4288
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch)
4293
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
4294
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
4295
/* { dg-final { cleanup-tree-dump "pre" } } */
4296
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
4297
===================================================================
4298
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release)
4299
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch)
4301
+/* { dg-do run } */
4303
+extern void abort (void);
4305
+struct node { struct node *next, *prev; } node;
4306
+struct head { struct node *first; } heads[5];
4308
+struct head *head = &heads[2];
4310
+static int __attribute__((noinline))
4313
+ node.prev = (void *)head;
4314
+ head->first = &node;
4316
+ struct node *n = head->first;
4317
+ struct head *h = &heads[k];
4319
+ if (n->prev == (void *)h)
4320
+ h->first = n->next;
4322
+ n->prev->next = n->next;
4324
+ n->next = h->first;
4325
+ return n->next == &node;
4334
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
4335
===================================================================
4336
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release)
4337
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch)
4339
+/* { dg-do compile } */
4344
+ unsigned b = (a * 64 & 192) | 63U;
4347
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
4348
===================================================================
4349
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release)
4350
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch)
4352
+/* { dg-do run } */
4359
+fn1 (int p1, char p2)
4361
+ return p1 || p2 ? 0 : p2;
4372
+ b = fn1 (g = d = e, g);
4383
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
4384
===================================================================
4385
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
4386
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
4388
+/* { dg-do run } */
4390
+int a, b = 1, c, d, e, f, g;
4399
+ g = g ? 0 : 1 % g;
4401
+ for (; d < 1; d = e)
4423
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
4424
===================================================================
4425
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release)
4426
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch)
4428
+/* Test that exact underflow in __float128 signals the underflow
4429
+ exception if trapping is enabled, but does not raise the flag
4432
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
4433
+/* { dg-options "-D_GNU_SOURCE" } */
4434
+/* { dg-require-effective-target fenv_exceptions } */
4437
+#include <setjmp.h>
4438
+#include <signal.h>
4439
+#include <stdlib.h>
4441
+volatile sig_atomic_t caught_sigfpe;
4445
+handle_sigfpe (int sig)
4447
+ caught_sigfpe = 1;
4448
+ siglongjmp (buf, 1);
4454
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
4455
+ volatile __float128 r;
4457
+ if (fetestexcept (FE_UNDERFLOW))
4459
+ if (r != 0x1p-16384q)
4461
+ feenableexcept (FE_UNDERFLOW);
4462
+ signal (SIGFPE, handle_sigfpe);
4463
+ if (sigsetjmp (buf, 1) == 0)
4465
+ if (!caught_sigfpe)
4469
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
4470
===================================================================
4471
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release)
4472
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch)
4474
T (20, 0, 4, 1, 5) \
4475
T (21, 2, 6, 3, 7) \
4476
T (22, 1, 2, 3, 0) \
4478
+T (23, 2, 1, 0, 3) \
4481
T (116, 1, 2, 4, 3) \
4482
T (117, 7, 3, 3, 0) \
4484
T (119, 0, 3, 5, 6) \
4485
T (120, 0, 0, 1, 5) \
4486
T (121, 4, 6, 2, 1) \
4487
-T (122, 2, 5, 6, 3) \
4488
T (123, 4, 6, 3, 2) \
4489
T (124, 4, 7, 5, 6) \
4490
T (125, 0, 4, 2, 4) \
4491
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
4492
===================================================================
4493
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release)
4494
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch)
4496
/* { dg-do compile } */
4497
/* { dg-options "-Wstack-usage=512" } */
4500
+int foo1 (void) /* { dg-bogus "stack usage" } */
4505
-} /* { dg-bogus "stack usage" } */
4509
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
4514
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
4518
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
4520
char arr[1024] __attribute__((aligned (512)));
4523
/* Force dynamic realignment of argument pointer. */
4524
__builtin_apply ((void (*)()) foo2, 0, 0);
4528
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
4531
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
4536
-} /* { dg-warning "stack usage might be unbounded" } */
4538
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
4539
===================================================================
4540
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release)
4541
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch)
4543
+/* { dg-do compile } */
4544
+/* { dg-options "-O3" } */
4554
+static int fn2 (struct S);
4555
+void fn3 (struct S);
4560
+ struct S h = { 0, 0 };
4568
+ struct S j = { 0, 0 };
4587
+ struct S f = { 0, 0 };
4591
Index: gcc/testsuite/gcc.dg/pr62030.c
4592
===================================================================
4593
--- a/src/gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release)
4594
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch)
4596
+/* { dg-do run } */
4597
+/* { dg-options "-O2" } */
4599
+extern void abort (void);
4603
+ struct node *next;
4604
+ struct node *prev;
4611
+ struct node *first;
4614
+struct head heads[5];
4618
+struct head *head = &heads[2];
4620
+static int __attribute__((noinline))
4623
+ node.prev = (void *)head;
4624
+ head->first = &node;
4626
+ struct node *n = head->first;
4627
+ struct head *h = &heads[k];
4628
+ struct node *next = n->next;
4630
+ if (n->prev == (void *)h)
4633
+ n->prev->next = next;
4635
+ n->next = h->first;
4636
+ return n->next == &node;
4646
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
4647
===================================================================
4648
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
4649
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
4651
+/* PR tree-optimization/63341 */
4652
+/* { dg-do run } */
4654
+#include "tree-vect.h"
4656
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
4657
+struct S { char e __attribute__((aligned (64))); U s[32]; };
4658
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
4659
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
4660
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
4661
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
4662
+unsigned short d[32] = { 1 };
4664
+__attribute__((noinline, noclone)) void
4668
+ for (i = 0; i < 32; i++)
4669
+ d[i] = t.s[i].s + 4;
4670
+ for (i = 0; i < 32; i++)
4671
+ if (d[i] != t.s[i].s + 4)
4674
+ asm volatile ("" : : : "memory");
4685
+/* { dg-final { cleanup-tree-dump "vect" } } */
4686
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
4687
===================================================================
4688
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release)
4689
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch)
4691
+/* PR tree-optimization/63189 */
4692
+/* { dg-do run } */
4694
+#include "tree-vect.h"
4696
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
4698
+__attribute__((noinline, noclone)) void
4702
+ for (j = 0; j < 8; j++)
4716
+/* { dg-final { cleanup-tree-dump "vect" } } */
4717
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
4718
===================================================================
4719
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release)
4720
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch)
4722
+/* { dg-require-effective-target vect_int } */
4724
+#include <stdarg.h>
4725
+#include "tree-vect.h"
4730
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
4731
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
4733
+/* (short, int)->int->int dot product.
4734
+ Not detected as a dot-product pattern. */
4736
+__attribute__ ((noinline)) int
4742
+ for (i = 0; i < len; i++)
4744
+ result += (X[i] * Y[i]);
4750
+/* (int, short)->int->int dot product.
4751
+ Not detected as a dot-product pattern. */
4753
+__attribute__ ((noinline)) int
4759
+ for (i = 0; i < len; i++)
4761
+ result += (Y[i] * X[i]);
4774
+ for (i = 0; i < N; i++)
4778
+ __asm__ volatile ("");
4792
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
4793
+/* { dg-final { cleanup-tree-dump "vect" } } */
4795
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
4796
===================================================================
4797
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release)
4798
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch)
4800
+/* { dg-do compile } */
4801
+/* { dg-additional-options "-O1" } */
4811
+int foo (long long p_56, int * p_57)
4818
+ int **l_78 = &l_77;
4823
+ for (g_76 = 1; g_76 >= 0; g_76--)
4826
+ for (l_101 = 4; l_101 >= 0; l_101--)
4831
+ int **l_113 = &l_77;
4839
+/* { dg-final { cleanup-tree-dump "vect" } } */
4840
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
4841
===================================================================
4842
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
4843
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
4845
+/* PR tree-optimization/63189 */
4846
+/* { dg-additional-options "-fwrapv" } */
4847
+/* { dg-do run } */
4849
+#include "tree-vect.h"
4851
+__attribute__((noinline, noclone)) static int
4852
+bar (const short *a, int len)
4857
+ for (x = 0; x < len; x++)
4862
+__attribute__((noinline, noclone)) void
4865
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
4866
+ if (bar (stuff, 9) != 36)
4878
+/* { dg-final { cleanup-tree-dump "vect" } } */
4879
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
4880
===================================================================
4881
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release)
4882
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch)
4884
+/* { dg-do compile } */
4897
+ for (i = 0; i < 16; ++i)
4899
+ x->b[i][0] = a[i][0];
4900
+ x->c[i][0] = 0 != a[i][0];
4901
+ x->b[i][1] = a[i][1];
4905
+/* { dg-final { cleanup-tree-dump "vect" } } */
4906
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
4907
===================================================================
4908
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
4909
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
4911
+/* PR tree-optimization/63189 */
4912
+/* { dg-do run } */
4914
+#include "tree-vect.h"
4916
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
4917
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
4919
+__attribute__((noinline, noclone)) static int
4923
+ for (i = 0; i < 8; ++i)
4924
+ sum += a[i] * b[i];
4928
+__attribute__((noinline, noclone)) void
4943
+/* { dg-final { cleanup-tree-dump "vect" } } */
4944
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
4945
===================================================================
4946
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
4947
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
4949
+/* PR tree-optimization/63341 */
4950
+/* { dg-do run } */
4952
+#include "tree-vect.h"
4954
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
4955
+struct S { char e __attribute__((aligned (64))); U s[32]; };
4956
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
4957
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
4958
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
4959
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
4960
+unsigned short d[32] = { 1 };
4962
+__attribute__((noinline, noclone)) void
4966
+ for (i = 0; i < 32; i++)
4968
+ if (__builtin_memcmp (d, t.s, sizeof d))
4980
+/* { dg-final { cleanup-tree-dump "vect" } } */
4981
Index: gcc/testsuite/ChangeLog
4982
===================================================================
4983
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
4984
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
4986
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4988
+ Backport from mainline r215880
4989
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4991
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
4992
+ failing with the new warning message.
4993
+ * gcc.dg/vmx/3c-01a.c: Likewise.
4994
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
4995
+ * gcc.dg/vmx/ops.c: Likewise.
4996
+ * gcc.target/powerpc/altivec-20.c: Likewise.
4997
+ * gcc.target/powerpc/altivec-6.c: Likewise.
4998
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
4999
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
5000
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
5002
+ Backport from mainline r215882
5003
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5005
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
5007
+ Backport from mainline r216017
5008
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
5010
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
5011
+ * gcc.dg/vmx/ops.c: Likewise.
5012
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
5014
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
5017
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
5018
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
5020
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
5023
+ * gcc.dg/pr63342.c: New test.
5026
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
5027
+ to test 24 in TESTS.
5029
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
5031
+ Backport from mainline
5032
+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5034
+ * lib/target-supports.exp
5035
+ (check_effective_target_fenv_exceptions): New function.
5037
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
5039
+ PR inline-asm/63282
5040
+ * gcc.c-torture/compile/pr63282.c: New test.
5042
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
5044
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
5045
+ to default options.
5047
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5049
+ Backport from mainline r215559
5050
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5053
+ * gcc.target/powerpc/pr63335.c: New test.
5055
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
5057
+ PR tree-optimization/63341
5058
+ * gcc.dg/vect/pr63341-1.c: New test.
5059
+ * gcc.dg/vect/pr63341-2.c: New test.
5061
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
5063
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
5065
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
5068
+ * gcc.dg/pr63284.c: New test.
5070
+2014-09-09 Richard Biener <rguenther@suse.de>
5072
+ Backport from mainline
5073
+ 2014-06-11 Richard Biener <rguenther@suse.de>
5075
+ PR tree-optimization/61452
5076
+ * gcc.dg/torture/pr61452.c: New testcase.
5078
+2014-09-09 Richard Biener <rguenther@suse.de>
5080
+ Backport from mainline
5081
+ 2014-05-05 Richard Biener <rguenther@suse.de>
5083
+ PR middle-end/61010
5084
+ * gcc.dg/torture/pr61010.c: New testcase.
5086
+ 2014-05-28 Richard Biener <rguenther@suse.de>
5088
+ PR middle-end/61045
5089
+ * gcc.dg/pr61045.c: New testcase.
5091
+ 2014-08-11 Richard Biener <rguenther@suse.de>
5093
+ PR tree-optimization/62075
5094
+ * gcc.dg/vect/pr62075.c: New testcase.
5096
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
5098
+ PR tree-optimization/60196
5099
+ PR tree-optimization/63189
5100
+ * gcc.dg/vect/pr63189.c: New test.
5101
+ * gcc.dg/vect/pr60196-1.c: New test.
5102
+ * gcc.dg/vect/pr60196-2.c: New test.
5104
+ Backported from mainline
5105
+ 2013-09-17 Cong Hou <congh@google.com>
5107
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
5108
+ on two arrays with short and int types. This should not be recognized
5109
+ as a dot product pattern.
5111
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
5113
+ Backported from mainline
5114
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
5117
+ * gcc.target/i386/pr61923.c: New test.
5119
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
5121
+ PR testsuite/56194
5122
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
5124
+2014-09-03 Marek Polacek <polacek@redhat.com>
5126
+ Backport from mainline
5127
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
5130
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
5132
+2014-09-03 Martin Jambor <mjambor@suse.cz>
5135
+ * g++.dg/ipa/pr62015.C: New test.
5137
+2014-09-03 Martin Jambor <mjambor@suse.cz>
5140
+ * gcc.dg/ipa/pr61986.c: New test.
5142
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
5144
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
5145
+ failure on s390*-*-linux-gnu.
5147
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
5149
+ Backport from mainline
5150
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
5153
+ * gcc.target/sh/pr61996.c: New.
5155
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
5157
+ Backport from trunk
5159
+ * gfortran.dg/array_assignment_5.f90: New test.
5161
+2014-08-15 Tom de Vries <tom@codesourcery.com>
5163
+ Backport from mainline:
5164
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
5166
+ PR rtl-optimization/62004
5167
+ PR rtl-optimization/62030
5168
+ * gcc.dg/pr62004.c: New test.
5169
+ * gcc.dg/pr62030.c: Same.
5170
+ * gcc.target/mips/pr62030-octeon.c: Same.
5172
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
5174
+ PR tree-optimization/62073
5175
+ * gcc.dg/vect/pr62073.c: New test.
5177
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5179
+ Backport from mainline
5180
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
5182
+ PR middle-end/62103
5183
+ * gcc.c-torture/execute/bitfld-6.c: New test.
5185
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
5187
+ Backport from trunk
5189
+ * gfortran.dg/dot_product_3.f90: New test case.
5191
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
5193
+ PR tree-optimization/60707
5194
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
5196
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
5198
+ PR rtl-optimization/61801
5199
+ * gcc.target/i386/pr61801.c: Rewritten.
5201
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
5203
+ Backport from mainline
5204
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5206
+ PR tree-optimization/61375
5207
+ * gcc.c-torture/execute/pr61375-1.c: New test.
5209
+2014-08-01 Richard Biener <rguenther@suse.de>
5211
+ PR tree-optimization/61964
5212
+ * gcc.dg/torture/pr61964.c: New testcase.
5213
+ * gcc.dg/pr51879-18.c: XFAIL.
5215
+2014-07-28 Richard Biener <rguenther@suse.de>
5217
+ PR rtl-optimization/61801
5218
+ * gcc.target/i386/pr61801.c: Fix testcase.
5220
+2014-07-28 Richard Biener <rguenther@suse.de>
5222
+ PR rtl-optimization/61801
5223
+ * gcc.target/i386/pr61801.c: New testcase.
5225
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5227
+ Backport from mainline:
5228
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5230
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
5232
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
5233
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
5234
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
5235
+ * gcc.c-torture/execute/pr23135.x: Likewise.
5237
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5239
+ Backport from mainline:
5240
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5242
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
5244
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5246
+ Backport from mainline:
5247
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5249
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
5251
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5253
+ Backport from mainline:
5254
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5256
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
5258
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
5260
+ * gcc.dg/stack-usage-2.c: Adjust.
5262
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
5264
+ Backport from trunk.
5266
+ * gfortran.dg/dependency_44.f90 : New test
5268
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
5270
+ * gnat.dg/opt39.adb: New test.
5272
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
5276
+ * gfortran.dg/allocatable_function_8.f90 : New test
5278
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
5280
+ PR tree-optimization/61684
5281
+ * gcc.c-torture/compile/pr61684.c: New test.
5283
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
5284
+ Fritz Reese <Reese-Fritz@zai.com>
5286
+ * gfortran.dg/oldstyle_5.f: New test.
5288
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
5290
+ Backport from mainline
5291
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5293
+ PR tree-optimization/61306
5294
+ * gcc.c-torture/execute/pr61306-1.c: New test.
5295
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
5296
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
5298
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5300
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
5302
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
5304
+ Backport from mainline
5305
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
5308
+ * gcc.target/alpha/pr61586.c: New test.
5310
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5312
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
5313
+ powerpc*-*-linux*.
5315
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
5317
+ Backport from mainline
5318
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
5320
+ PR rtl-optimization/61094
5321
+ PR rtl-optimization/61446
5322
+ * gcc.target/i386/pr61446.c : New.
5324
+ Backport from mainline
5325
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
5328
+ * gcc.target/i386/pr61423.c: New test.
5330
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
5332
+ Backport from mainline
5335
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
5336
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
5337
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
5338
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
5340
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5342
+ Backport from trunk.
5344
+ * gfortran.dg/cray_pointers_10.f90: New file.
5346
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
5348
+ Backport from mainline
5350
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
5352
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
5353
+ * gcc.target/powerpc/pack02.c: Use it.
5354
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
5356
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
5358
+ Backport from 2014-06-12 trunk r211491
5361
+ * gcc.target/avr/torture/pr61443.c: New test.
5363
+2014-06-04 Richard Biener <rguenther@suse.de>
5365
+ PR tree-optimization/61383
5366
+ * gcc.dg/torture/pr61383-1.c: New testcase.
5368
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
5370
+ Backport from mainline
5371
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
5373
+ PR rtl-optimization/60866
5374
+ * gcc.dg/pr60866.c: New test.
5376
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
5378
+ Backport from mainline
5379
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
5381
+ PR rtl-optimization/60901
5382
+ * gcc.target/i386/pr60901.c: New test.
5384
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
5386
+ Backport from mainline
5387
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
5389
+ * gnat.dg/overflow_fixed.adb: New test.
5391
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
5393
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
5395
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
5397
+ Backport from mainline
5398
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
5400
+ * gcc.target/powerpc/htm-ttest.c: New test.
5402
2014-05-22 Release Manager
5404
* GCC 4.8.3 released.
5405
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
5406
===================================================================
5407
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release)
5408
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch)
5410
/* { dg-do compile { target powerpc*-*-* } } */
5411
/* { dg-require-effective-target powerpc_altivec_ok } */
5412
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
5413
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
5415
/* This test checks if AltiVec builtins accept const-qualified
5417
Index: gcc/testsuite/g++.dg/expr/cond12.C
5418
===================================================================
5419
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release)
5420
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch)
5426
+ X& operator=(const X&){}
5427
+ X& operator=(X&){__builtin_abort();}
5430
+int main(int argv,char**) {
5432
+ ((argv > 2) ? a : b) = X();
5434
Index: gcc/testsuite/g++.dg/init/const9.C
5435
===================================================================
5436
--- a/src/gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release)
5437
+++ b/src/gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch)
5440
-// { dg-final { scan-assembler-not "rodata" } }
5441
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
5445
Index: gcc/testsuite/g++.dg/parse/typename7.C
5446
===================================================================
5447
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release)
5448
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch)
5453
- template<typename> void foo(int); // { dg-message "note" }
5454
- template<typename T> void bar(T t) { // { dg-message "note" }
5455
+ template<typename> void foo(int);
5456
+ template<typename T> void bar(T t) {
5457
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
5458
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
5459
template<typename T> void bad(T t) {
5460
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
5465
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
5466
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
5468
B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
5470
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
5471
===================================================================
5472
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release)
5473
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch)
5475
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
5476
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
5477
// { dg-prune-output "array bound" }
5478
Index: gcc/testsuite/g++.dg/parse/ambig7.C
5479
===================================================================
5480
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release)
5481
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch)
5487
+ Helper(int a, void (*pfunc)());
5490
+template <int I> void function();
5495
+Helper testOk(A, function<A>);
5496
+Helper testOk2(int(A), function<B>);
5497
+Helper testOk3((int(A)), function<A>);
5498
+Helper testFail(int(A), function<A>);
5499
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
5500
===================================================================
5501
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release)
5502
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch)
5504
# This must be done after the compat-use-*-compiler definitions.
5507
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
5508
+load_lib g++-dg.exp
5512
# Save variables for the C++ compiler under test, which each test will
5513
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
5514
===================================================================
5515
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release)
5516
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch)
5518
/* Structure layout test generator.
5519
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
5520
+ Copyright (C) 2004-2014
5521
Free Software Foundation, Inc.
5522
Contributed by Jakub Jelinek <jakub@redhat.com>.
5527
const char *dg_options[] = {
5528
-"/* { dg-options \"%s-I%s\" } */\n",
5529
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
5530
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
5531
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
5532
"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
5533
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
5534
===================================================================
5535
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
5536
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
5539
+// { dg-do compile { target c++11 } }
5541
+template <class Coord> struct BasePoint
5544
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
5546
+template <class T> struct BaseCoord
5549
+ constexpr BaseCoord (T) : value (1) {}
5551
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
5553
+ typedef BaseCoord Super;
5554
+ constexpr IntCoordTyped (int) : Super (0) {}
5556
+template <class units>
5557
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
5559
+ typedef BasePoint<IntCoordTyped<units> > Super;
5560
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
5565
+IntPointTyped<A> a (0, 0);
5566
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
5567
===================================================================
5568
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
5569
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
5572
+// { dg-do compile { target c++11 } }
5576
+template <typename>
5578
+ typedef const char* name;
5581
+template <typename VT, typename... Fields>
5582
+void New(const char* name,
5583
+ typename Fixed<Fields>::name... field_names);
5585
+template <typename VT, typename... Fields>
5586
+void CreateMetric(const char* name,
5587
+ typename Fixed<Fields>::name... field_names,
5593
+ CreateMetric<int, const char*>("abcd", "def", Base());
5595
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
5596
===================================================================
5597
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
5598
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
5601
+// { dg-do compile { target c++11 } }
5603
+template <typename _CharT> class A;
5604
+template <typename> class B;
5605
+template <class charT> class C;
5606
+template <> class C<char>
5608
+ virtual void xparse (int &, const B<A<char> > &) const;
5610
+template <class T, class charT = char> class G : C<charT>
5614
+ void default_value (const T &);
5615
+ void xparse (int &, const B<A<charT> > &) const;
5617
+template <class T, class charT>
5618
+void validate (int &, const B<A<charT> > &, T *, int);
5619
+template <class T, class charT>
5620
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
5622
+ validate (p1, p2, (T *)0, 0);
5624
+template <class T> G<T> *value (T *) { return new G<T>(0); }
5627
+template <typename T> struct D;
5628
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
5629
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
5631
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
5633
+ typedef _Scalar Scalar;
5635
+template <typename, int, int, int, int, int _MaxCols> class F
5638
+ typedef typename Eigen::D<F>::Scalar Scalar;
5639
+ F (const Scalar &, const Scalar &, const Scalar &);
5641
+template <class... T>
5642
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
5644
+int main (int, char *[])
5646
+ Eigen::F<double, 3, 1> a (0, 0, 0);
5647
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
5649
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
5650
===================================================================
5651
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
5652
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
5655
+// { dg-do compile { target c++11 } }
5658
+ X& operator=(const X&) = delete;
5659
+ X& operator=(X&& ) = default;
5664
+ *(t ? &a : &b) = X();
5665
+ (t ? a : b) = X();
5667
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
5668
===================================================================
5669
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release)
5670
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch)
5673
+// { dg-options "-std=c++11" }
5677
+void f(X&&); // { dg-message "void f" }
5681
+ operator const X&() const;
5687
+ f(w); // { dg-error "lvalue" }
5689
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
5690
===================================================================
5691
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release)
5692
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch)
5694
+/* { dg-do run } */
5695
+/* { dg-options "-O3 -std=c++11" } */
5698
+extern "C" int printf(const char *fmt, ...);
5699
+extern "C" void abort(void);
5702
+ enum _Value { Left, Right, Invalid };
5704
+ constexpr Side() : _value(Invalid) {}
5705
+ constexpr Side(_Value value) : _value(value) {}
5706
+ operator _Value() const { return (_Value)_value; }
5714
+ void adjust(Side side, bool final);
5715
+ void move(Side side);
5720
+ adjust(Side::Invalid, false);
5723
+static void __attribute__((noinline))
5724
+check (int v, int final)
5731
+__attribute__((noinline))
5732
+void A::adjust(Side side, bool final)
5734
+ check ((int)side, final);
5737
+void A::move(Side side)
5739
+ adjust(side, false);
5740
+ adjust(side, true);
5746
+ t.move(Side::Left);
5749
Index: gcc/testsuite/g++.dg/template/local-fn1.C
5750
===================================================================
5751
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
5752
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
5756
+template <typename T = int>
5762
Index: gcc/testsuite/g++.dg/template/conv14.C
5763
===================================================================
5764
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
5765
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
5771
+template<typename Container, typename Key>
5774
+template<typename Container, typename Key, typename KeyStore = Key>
5780
+ Variant(Container st, const Key& i) : index(i), state(st) {}
5782
+ template<typename T>
5783
+ operator T() const {
5784
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
5788
+class AutoCleanVariant : public Variant<XX*, int> {
5790
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
5792
+ template<typename T>
5793
+ operator T() const {
5794
+ return Variant<XX*, int>::operator T();
5797
Index: gcc/testsuite/g++.dg/template/friend55.C
5798
===================================================================
5799
--- a/src/gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release)
5800
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch)
5804
+template <int I> struct A;
5805
+template <int I> class B {
5807
+ template <int A_S> friend void A<A_S>::impl();
5811
+template<int I>struct A { void impl(); };
5814
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
5820
Index: gcc/testsuite/g++.dg/template/memclass5.C
5821
===================================================================
5822
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release)
5823
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch)
5827
+template <typename T>
5830
+ template <typename U>
5833
+ typedef T result2;
5836
+ typedef y<int> zy;
5843
+ typedef double result2;
5848
+ x<int>::zy::result2 xxx;
5849
+ x<int>::y<int>::result2 xxx2;
5851
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
5852
===================================================================
5853
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
5854
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
5862
+ int foo(int X::* ptr);
5864
+ template <int X::* ptr>
5868
+int X::foo(int X::* ptr) {
5869
+ int* p = &(this->*ptr); // OK.
5873
+template <int X::* ptr>
5875
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
5878
Index: gcc/cp/tree.c
5879
===================================================================
5880
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
5881
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
5884
return lvalue_kind (TREE_OPERAND (ref, 0));
5887
+ case DOTSTAR_EXPR:
5888
+ if (TREE_CODE (ref) == MEMBER_REF)
5889
+ op1_lvalue_kind = clk_ordinary;
5891
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
5892
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
5893
+ op1_lvalue_kind = clk_none;
5894
+ return op1_lvalue_kind;
5897
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
5898
/* Look at the member designator. */
5899
@@ -3738,6 +3748,10 @@
5901
init_expr = get_target_expr (exp);
5902
exp = TARGET_EXPR_SLOT (init_expr);
5903
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
5906
+ exp = rvalue (exp);
5910
Index: gcc/cp/ChangeLog
5911
===================================================================
5912
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
5913
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
5915
+2014-08-07 Jason Merrill <jason@redhat.com>
5918
+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
5921
+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
5923
+2014-01-27 Jason Merrill <jason@redhat.com>
5927
+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
5928
+ list-initialization. A conversion to rvalue ref that involves
5929
+ an lvalue-rvalue conversion is bad.
5930
+ (convert_like_real): Give helpful error message.
5932
+2014-01-29 Jason Merrill <jason@redhat.com>
5935
+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
5936
+ have a friend template in a class template.
5937
+ * pt.c (tsubst_friend_function): Look through it.
5938
+ (push_template_decl_real): A friend member template is
5941
+2014-02-21 Jason Merrill <jason@redhat.com>
5944
+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
5945
+ of the partial instantiation, not the most general template.
5946
+ (maybe_process_partial_specialization): Reassign everything on
5949
+2014-03-05 Jason Merrill <jason@redhat.com>
5952
+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
5953
+ if re-parsing might succeed.
5954
+ * semantics.c (finish_id_expression): Use of a parameter outside
5955
+ the function body is a parse error.
5957
+2014-06-30 Jason Merrill <jason@redhat.com>
5960
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
5963
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
5964
+ deduction failure.
5967
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
5969
+2014-06-17 Jason Merrill <jason@redhat.com>
5972
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
5974
+2014-06-02 Jason Merrill <jason@redhat.com>
5977
+ * pt.c (pack_deducible_p): Handle canonicalization.
5979
2014-05-22 Release Manager
5981
* GCC 4.8.3 released.
5983
===================================================================
5984
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
5985
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
5986
@@ -907,11 +907,13 @@
5987
t; t = TREE_CHAIN (t))
5989
tree inst = TREE_VALUE (t);
5990
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
5991
+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
5992
+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
5994
/* We already have a full specialization of this partial
5995
- instantiation. Reassign it to the new member
5996
- specialization template. */
5997
+ instantiation, or a full specialization has been
5998
+ looked up but not instantiated. Reassign it to the
5999
+ new member specialization template. */
6007
- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
6009
/* But if we've had an implicit instantiation, that's a
6010
problem ([temp.expl.spec]/6). */
6011
error ("specialization %qT after instantiation %qT",
6012
@@ -4308,7 +4310,8 @@
6013
in the template-parameter-list of the definition of a member of a
6016
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
6017
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
6018
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
6019
/* You can't have a function template declaration in a local
6020
scope, nor you can you define a member of a class template in a
6022
@@ -4572,7 +4575,8 @@
6023
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
6025
/* See if this is a primary template. */
6026
- if (is_friend && ctx)
6027
+ if (is_friend && ctx
6028
+ && uses_template_parms_level (ctx, processing_template_decl))
6029
/* A friend template that specifies a class context, i.e.
6030
template <typename T> friend void A<T>::f();
6032
@@ -7454,7 +7458,7 @@
6035
/* Let's consider the explicit specialization of a member
6036
- of a class template specialization that is implicitely instantiated,
6037
+ of a class template specialization that is implicitly instantiated,
6041
@@ -7552,9 +7556,9 @@
6043
/* Note this use of the partial instantiation so we can check it
6044
later in maybe_process_partial_specialization. */
6045
- DECL_TEMPLATE_INSTANTIATIONS (templ)
6046
+ DECL_TEMPLATE_INSTANTIATIONS (found)
6047
= tree_cons (arglist, t,
6048
- DECL_TEMPLATE_INSTANTIATIONS (templ));
6049
+ DECL_TEMPLATE_INSTANTIATIONS (found));
6051
if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
6052
/* Now that the type has been registered on the instantiations
6053
@@ -8289,10 +8293,17 @@
6055
if (COMPLETE_TYPE_P (context))
6057
+ tree fn = new_friend;
6058
+ /* do_friend adds the TEMPLATE_DECL for any member friend
6059
+ template even if it isn't a member template, i.e.
6060
+ template <class T> friend A<T>::f();
6061
+ Look through it in that case. */
6062
+ if (TREE_CODE (fn) == TEMPLATE_DECL
6063
+ && !PRIMARY_TEMPLATE_P (fn))
6064
+ fn = DECL_TEMPLATE_RESULT (fn);
6065
/* Check to see that the declaration is really present, and,
6066
possibly obtain an improved declaration. */
6067
- tree fn = check_classfn (context,
6068
- new_friend, NULL_TREE);
6069
+ fn = check_classfn (context, fn, NULL_TREE);
6073
@@ -14934,7 +14945,7 @@
6075
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
6076
packs; packs = TREE_CHAIN (packs))
6077
- if (TREE_VALUE (packs) == parm)
6078
+ if (template_args_equal (TREE_VALUE (packs), parm))
6080
/* The template parameter pack is used in a function parameter
6081
pack. If this is the end of the parameter list, the
6082
@@ -15502,8 +15513,9 @@
6083
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
6086
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
6087
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
6088
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
6089
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
6090
+ return unify_template_argument_mismatch (explain_p, parm, arg);
6092
/* For deduction from an init-list we need the actual list. */
6093
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
6094
@@ -20009,7 +20021,12 @@
6097
if (BASELINK_P (expression))
6098
- expression = BASELINK_FUNCTIONS (expression);
6100
+ if (BASELINK_OPTYPE (expression)
6101
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
6103
+ expression = BASELINK_FUNCTIONS (expression);
6106
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
6108
Index: gcc/cp/semantics.c
6109
===================================================================
6110
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_3_release)
6111
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
6112
@@ -3108,7 +3108,7 @@
6113
&& DECL_CONTEXT (decl) == NULL_TREE
6114
&& !cp_unevaluated_operand)
6116
- error ("use of parameter %qD outside function body", decl);
6117
+ *error_msg = "use of parameter outside function body";
6118
return error_mark_node;
6121
@@ -7296,7 +7296,9 @@
6122
constructor_elt *inner = base_field_constructor_elt (n, ce->index);
6125
- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
6126
+ else if (ce->index
6127
+ && (TREE_CODE (ce->index) == NOP_EXPR
6128
+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
6130
/* This is an initializer for an empty base; now that we've
6131
checked that it's constant, we can ignore it. */
6132
Index: gcc/cp/parser.c
6133
===================================================================
6134
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_3_release)
6135
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
6136
@@ -12831,7 +12831,12 @@
6137
the effort required to do the parse, nor will we issue duplicate
6138
error messages about problems during instantiation of the
6142
+ /* Don't do this if we had a parse error in a declarator; re-parsing
6143
+ might succeed if a name changes meaning (60361). */
6144
+ && !(cp_parser_error_occurred (parser)
6145
+ && cp_parser_parsing_tentatively (parser)
6146
+ && parser->in_declarator_p))
6148
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
6150
Index: gcc/cp/call.c
6151
===================================================================
6152
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
6153
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
6154
@@ -1464,7 +1464,7 @@
6156
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
6157
conv = implicit_conversion (to, from, expr, c_cast_p,
6159
+ flags|LOOKUP_NO_TEMP_BIND, complain);
6160
if (!CLASS_TYPE_P (to)
6161
&& CONSTRUCTOR_NELTS (expr) == 1)
6163
@@ -1624,9 +1624,9 @@
6167
- Otherwise, the reference shall be to a non-volatile const type.
6169
- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
6170
+ Otherwise, the reference shall be an lvalue reference to a
6171
+ non-volatile const type, or the reference shall be an rvalue
6173
if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
6176
@@ -1664,7 +1664,16 @@
6177
/* This reference binding, unlike those above, requires the
6178
creation of a temporary. */
6179
conv->need_temporary_p = true;
6180
- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
6181
+ if (TYPE_REF_IS_RVALUE (rto))
6183
+ conv->rvaluedness_matches_p = 1;
6184
+ /* In the second case, if the reference is an rvalue reference and
6185
+ the second standard conversion sequence of the user-defined
6186
+ conversion sequence includes an lvalue-to-rvalue conversion, the
6187
+ program is ill-formed. */
6188
+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
6194
@@ -5811,7 +5820,7 @@
6195
&& convs->kind != ck_list
6196
&& convs->kind != ck_ambig
6197
&& (convs->kind != ck_ref_bind
6198
- || convs->user_conv_p)
6199
+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
6200
&& (convs->kind != ck_rvalue
6201
|| SCALAR_TYPE_P (totype))
6202
&& convs->kind != ck_base)
6203
@@ -6110,7 +6119,8 @@
6204
if (convs->bad_p && !next_conversion (convs)->bad_p)
6206
gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
6207
- && real_lvalue_p (expr));
6208
+ && (real_lvalue_p (expr)
6209
+ || next_conversion(convs)->kind == ck_rvalue));
6211
error_at (loc, "cannot bind %qT lvalue to %qT",
6212
TREE_TYPE (expr), totype);
6213
Index: gcc/cp/friend.c
6214
===================================================================
6215
--- a/src/gcc/cp/friend.c (.../tags/gcc_4_8_3_release)
6216
+++ b/src/gcc/cp/friend.c (.../branches/gcc-4_8-branch)
6217
@@ -502,7 +502,13 @@
6218
? current_template_parms
6221
- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
6222
+ if ((template_member_p
6223
+ /* Always pull out the TEMPLATE_DECL if we have a friend
6224
+ template in a class template so that it gets tsubsted
6225
+ properly later on (59956). tsubst_friend_function knows
6226
+ how to tell this apart from a member template. */
6227
+ || (class_template_depth && friend_depth))
6228
+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
6229
decl = DECL_TI_TEMPLATE (decl);
6232
Index: gcc/haifa-sched.c
6233
===================================================================
6234
--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_8_3_release)
6235
+++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_8-branch)
6236
@@ -2931,7 +2931,7 @@
6238
advance_state (curr_state);
6239
if (sched_verbose >= 6)
6240
- fprintf (sched_dump, ";;\tAdvanced a state.\n");
6241
+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
6244
/* Update register pressure after scheduling INSN. */
6245
@@ -5964,6 +5964,7 @@
6246
modulo_insns_scheduled = 0;
6248
ls.modulo_epilogue = false;
6249
+ ls.first_cycle_insn_p = true;
6251
/* Loop until all the insns in BB are scheduled. */
6252
while ((*current_sched_info->schedule_more_p) ())
6253
@@ -6034,7 +6035,6 @@
6257
- ls.first_cycle_insn_p = true;
6258
ls.shadows_only_p = false;
6259
cycle_issued_insns = 0;
6260
ls.can_issue_more = issue_rate;
6261
@@ -6321,11 +6321,13 @@
6265
+ ls.first_cycle_insn_p = true;
6267
if (ls.modulo_epilogue)
6270
- advance_one_cycle ();
6271
+ if (!ls.first_cycle_insn_p)
6272
+ advance_one_cycle ();
6273
perform_replacements_new_cycle ();
6276
Index: gcc/double-int.c
6277
===================================================================
6278
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
6279
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
6281
== (unsigned HOST_WIDE_INT) htwice)
6282
&& (labs_den <= ltwice)))
6286
/* quo = quo - 1; */
6287
add_double (*lquo, *hquo,
6288
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
6289
Index: gcc/tree-ssa-math-opts.c
6290
===================================================================
6291
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
6292
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
6293
@@ -1537,7 +1537,7 @@
6295
struct symbolic_number {
6296
unsigned HOST_WIDEST_INT n;
6301
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
6302
@@ -1549,13 +1549,15 @@
6303
struct symbolic_number *n,
6306
+ int bitsize = TYPE_PRECISION (n->type);
6311
/* Zero out the extra bits of N in order to avoid them being shifted
6312
into the significant bits. */
6313
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
6314
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
6315
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
6316
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
6320
@@ -1563,20 +1565,24 @@
6324
+ /* Arithmetic shift of signed type: result is dependent on the value. */
6325
+ if (!TYPE_UNSIGNED (n->type)
6326
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
6331
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
6332
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
6335
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
6336
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
6341
/* Zero unused bits for size. */
6342
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
6343
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
6344
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
6345
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
6349
@@ -1593,7 +1599,7 @@
6350
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
6353
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
6354
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
6358
@@ -1650,20 +1656,25 @@
6359
to initialize the symbolic number. */
6364
/* Set up the symbolic number N by setting each byte to a
6365
value between 1 and the byte size of rhs1. The highest
6366
order byte is set to n->size and the lowest order
6368
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
6369
- if (n->size % BITS_PER_UNIT != 0)
6370
+ n->type = TREE_TYPE (rhs1);
6371
+ size = TYPE_PRECISION (n->type);
6372
+ if (size % BITS_PER_UNIT != 0)
6374
- n->size /= BITS_PER_UNIT;
6375
+ if (size > HOST_BITS_PER_WIDEST_INT)
6377
+ size /= BITS_PER_UNIT;
6378
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
6379
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
6381
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
6382
+ if (size < (int)sizeof (HOST_WIDEST_INT))
6383
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
6384
- (n->size * BITS_PER_UNIT)) - 1;
6385
+ (size * BITS_PER_UNIT)) - 1;
6387
source_expr1 = rhs1;
6389
@@ -1672,12 +1683,12 @@
6394
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
6395
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
6396
unsigned HOST_WIDEST_INT tmp = val;
6398
/* Only constants masking full bytes are allowed. */
6399
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
6400
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
6401
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
6404
@@ -1693,12 +1704,24 @@
6409
+ int type_size, old_type_size;
6412
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
6413
+ type = gimple_expr_type (stmt);
6414
+ type_size = TYPE_PRECISION (type);
6415
if (type_size % BITS_PER_UNIT != 0)
6417
+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
6420
+ /* Sign extension: result is dependent on the value. */
6421
+ old_type_size = TYPE_PRECISION (n->type);
6422
+ if (!TYPE_UNSIGNED (n->type)
6423
+ && type_size > old_type_size
6425
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
6428
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
6430
/* If STMT casts to a smaller type mask out the bits not
6431
@@ -1705,7 +1728,7 @@
6432
belonging to the target type. */
6433
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
6435
- n->size = type_size / BITS_PER_UNIT;
6440
@@ -1718,7 +1741,7 @@
6442
if (rhs_class == GIMPLE_BINARY_RHS)
6446
struct symbolic_number n1, n2;
6447
unsigned HOST_WIDEST_INT mask;
6449
@@ -1742,11 +1765,12 @@
6450
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
6452
if (source_expr1 != source_expr2
6453
- || n1.size != n2.size)
6454
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
6457
- n->size = n1.size;
6458
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
6459
+ n->type = n1.type;
6460
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
6461
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
6463
unsigned HOST_WIDEST_INT masked1, masked2;
6465
@@ -1785,7 +1809,7 @@
6467
struct symbolic_number n;
6470
+ int limit, bitsize;
6472
/* The last parameter determines the depth search limit. It usually
6473
correlates directly to the number of bytes to be touched. We
6474
@@ -1800,13 +1824,14 @@
6477
/* Zero out the extra bits of N and CMP. */
6478
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
6479
+ bitsize = TYPE_PRECISION (n.type);
6480
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
6482
unsigned HOST_WIDEST_INT mask =
6483
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
6484
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
6487
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
6488
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
6491
/* A complete byte swap should make the symbolic number to start
6492
@@ -1828,7 +1853,7 @@
6493
bool changed = false;
6494
tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
6496
- if (BITS_PER_UNIT != 8)
6497
+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
6500
if (sizeof (HOST_WIDEST_INT) < 8)
6502
===================================================================
6503
--- a/src/gcc/ifcvt.c (.../tags/gcc_4_8_3_release)
6504
+++ b/src/gcc/ifcvt.c (.../branches/gcc-4_8-branch)
6505
@@ -294,6 +294,28 @@
6507
return (e) ? e->dest : NULL_BLOCK;
6510
+/* Return true if RTXs A and B can be safely interchanged. */
6513
+rtx_interchangeable_p (const_rtx a, const_rtx b)
6515
+ if (!rtx_equal_p (a, b))
6518
+ if (GET_CODE (a) != MEM)
6521
+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
6522
+ reference is not. Interchanging a dead type-unsafe memory reference with
6523
+ a live type-safe one creates a live type-unsafe memory reference, in other
6524
+ words, it makes the program illegal.
6525
+ We check here conservatively whether the two memory references have equal
6526
+ memory attributes. */
6528
+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
6532
/* Go through a bunch of insns, converting them to conditional
6533
execution format if possible. Return TRUE if all of the non-note
6534
@@ -1014,6 +1036,9 @@
6535
|| (rtx_equal_p (if_info->a, XEXP (cond, 1))
6536
&& rtx_equal_p (if_info->b, XEXP (cond, 0))))
6538
+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
6541
y = (code == EQ) ? if_info->a : if_info->b;
6543
/* Avoid generating the move if the source is the destination. */
6544
@@ -2483,7 +2508,7 @@
6546
|| insn_b != last_active_insn (else_bb, FALSE)
6547
|| (set_b = single_set (insn_b)) == NULL_RTX
6548
- || ! rtx_equal_p (x, SET_DEST (set_b)))
6549
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
6553
@@ -2496,7 +2521,7 @@
6554
|| BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
6555
|| !NONJUMP_INSN_P (insn_b)
6556
|| (set_b = single_set (insn_b)) == NULL_RTX
6557
- || ! rtx_equal_p (x, SET_DEST (set_b))
6558
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
6559
|| ! noce_operand_ok (SET_SRC (set_b))
6560
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
6561
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
6562
@@ -2562,7 +2587,7 @@
6564
/* Look and see if A and B are really the same. Avoid creating silly
6565
cmove constructs that no one will fix up later. */
6566
- if (rtx_equal_p (a, b))
6567
+ if (rtx_interchangeable_p (a, b))
6569
/* If we have an INSN_B, we don't have to create any new rtl. Just
6570
move the instruction that we already have. If we don't have an
6571
@@ -4246,6 +4271,9 @@
6572
old_dest = JUMP_LABEL (jump);
6573
if (other_bb != new_dest)
6575
+ if (!any_condjump_p (jump))
6578
if (JUMP_P (BB_END (dest_edge->src)))
6579
new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
6580
else if (new_dest == EXIT_BLOCK_PTR)
6581
Index: gcc/dwarf2out.c
6582
===================================================================
6583
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_3_release)
6584
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
6585
@@ -12234,7 +12234,7 @@
6586
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
6587
VAR_INIT_STATUS_INITIALIZED);
6591
add_loc_descr (&mem_loc_result, op1);
6592
add_loc_descr (&mem_loc_result,
6593
new_loc_descr (DW_OP_plus, 0, 0));
6594
@@ -13882,6 +13882,10 @@
6598
+ case TARGET_MEM_REF:
6603
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
6606
===================================================================
6607
--- a/src/gcc/expr.c (.../tags/gcc_4_8_3_release)
6608
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
6609
@@ -10603,7 +10603,7 @@
6610
|| !host_integerp (TREE_OPERAND (offset, 1), 1)
6611
|| compare_tree_int (TREE_OPERAND (offset, 1),
6612
BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
6613
- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
6614
+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
6617
/* Look at the first operand of BIT_AND_EXPR and strip any conversion.
6618
Index: gcc/ada/socket.c
6619
===================================================================
6620
--- a/src/gcc/ada/socket.c (.../tags/gcc_4_8_3_release)
6621
+++ b/src/gcc/ada/socket.c (.../branches/gcc-4_8-branch)
6626
-#if defined(__linux__) || defined(__GLIBC__)
6627
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
6628
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
6630
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
6631
Index: gcc/ada/uintp.adb
6632
===================================================================
6633
--- a/src/gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release)
6634
+++ b/src/gcc/ada/uintp.adb (.../branches/gcc-4_8-branch)
6635
@@ -171,22 +171,6 @@
6636
-- If Discard_Quotient is True, Quotient is set to No_Uint
6637
-- If Discard_Remainder is True, Remainder is set to No_Uint
6639
- function Vector_To_Uint
6640
- (In_Vec : UI_Vector;
6641
- Negative : Boolean) return Uint;
6642
- -- Functions that calculate values in UI_Vectors, call this function to
6643
- -- create and return the Uint value. In_Vec contains the multiple precision
6644
- -- (Base) representation of a non-negative value. Leading zeroes are
6645
- -- permitted. Negative is set if the desired result is the negative of the
6646
- -- given value. The result will be either the appropriate directly
6647
- -- represented value, or a table entry in the proper canonical format is
6648
- -- created and returned.
6650
- -- Note that Init_Operand puts a signed value in the result vector, but
6651
- -- Vector_To_Uint is always presented with a non-negative value. The
6652
- -- processing of signs is something that is done by the caller before
6653
- -- calling Vector_To_Uint.
6658
Index: gcc/ada/uintp.ads
6659
===================================================================
6660
--- a/src/gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release)
6661
+++ b/src/gcc/ada/uintp.ads (.../branches/gcc-4_8-branch)
6663
Uint_Minus_80 : constant Uint;
6664
Uint_Minus_128 : constant Uint;
6666
+ type UI_Vector is array (Pos range <>) of Int;
6667
+ -- Vector containing the integer values of a Uint value
6669
+ -- Note: An earlier version of this package used pointers of arrays of Ints
6670
+ -- (dynamically allocated) for the Uint type. The change leads to a few
6671
+ -- less natural idioms used throughout this code, but eliminates all uses
6672
+ -- of the heap except for the table package itself. For example, Uint
6673
+ -- parameters are often converted to UI_Vectors for internal manipulation.
6674
+ -- This is done by creating the local UI_Vector using the function N_Digits
6675
+ -- on the Uint to find the size needed for the vector, and then calling
6676
+ -- Init_Operand to copy the values out of the table into the vector.
6681
@@ -252,6 +264,22 @@
6682
-- function is used for capacity checks, and it can be one bit off
6683
-- without affecting its usage.
6685
+ function Vector_To_Uint
6686
+ (In_Vec : UI_Vector;
6687
+ Negative : Boolean) return Uint;
6688
+ -- Functions that calculate values in UI_Vectors, call this function to
6689
+ -- create and return the Uint value. In_Vec contains the multiple precision
6690
+ -- (Base) representation of a non-negative value. Leading zeroes are
6691
+ -- permitted. Negative is set if the desired result is the negative of the
6692
+ -- given value. The result will be either the appropriate directly
6693
+ -- represented value, or a table entry in the proper canonical format is
6694
+ -- created and returned.
6696
+ -- Note that Init_Operand puts a signed value in the result vector, but
6697
+ -- Vector_To_Uint is always presented with a non-negative value. The
6698
+ -- processing of signs is something that is done by the caller before
6699
+ -- calling Vector_To_Uint.
6701
---------------------
6702
-- Output Routines --
6703
---------------------
6704
@@ -494,18 +522,6 @@
6705
-- UI_Vector is defined for this purpose and some internal subprograms
6706
-- used for converting from one to the other are defined.
6708
- type UI_Vector is array (Pos range <>) of Int;
6709
- -- Vector containing the integer values of a Uint value
6711
- -- Note: An earlier version of this package used pointers of arrays of Ints
6712
- -- (dynamically allocated) for the Uint type. The change leads to a few
6713
- -- less natural idioms used throughout this code, but eliminates all uses
6714
- -- of the heap except for the table package itself. For example, Uint
6715
- -- parameters are often converted to UI_Vectors for internal manipulation.
6716
- -- This is done by creating the local UI_Vector using the function N_Digits
6717
- -- on the Uint to find the size needed for the vector, and then calling
6718
- -- Init_Operand to copy the values out of the table into the vector.
6720
type Uint_Entry is record
6722
-- Length of entry in Udigits table in digits (i.e. in words)
6723
Index: gcc/ada/ChangeLog
6724
===================================================================
6725
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release)
6726
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
6728
+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
6729
+ Alan Modra <amodra@gmail.com>
6732
+ * uintp.adb (Vector_To_Uint): Move from here to...
6733
+ * uintp.ads (UI_Vector): Make public.
6734
+ (Vector_To_Uint): ...here.
6736
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
6738
+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
6739
+ * gsocket.h Add include of <unistd.h> on RTEMS.
6741
+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
6743
+ * s-osinte-rtems.adb: Correct formatting of line in license block.
6745
2014-05-22 Release Manager
6747
* GCC 4.8.3 released.
6748
Index: gcc/ada/s-osinte-rtems.adb
6749
===================================================================
6750
--- a/src/gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release)
6751
+++ b/src/gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch)
6753
-- You should have received a copy of the GNU General Public License and --
6754
-- a copy of the GCC Runtime Library Exception along with this program; --
6755
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
6756
--- <http://www.gnu.org/licenses/>.
6757
+-- <http://www.gnu.org/licenses/>. --
6759
-- GNARL was developed by the GNARL team at Florida State University. It is --
6760
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
6761
Index: gcc/ada/gsocket.h
6762
===================================================================
6763
--- a/src/gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release)
6764
+++ b/src/gcc/ada/gsocket.h (.../branches/gcc-4_8-branch)
6765
@@ -183,6 +183,11 @@
6766
#include <sys/time.h>
6769
+#if defined(__rtems__)
6770
+#include <unistd.h>
6771
+/* Required, for read(), write(), and close() */
6775
* RTEMS has these .h files but not until you have built and installed RTEMS.
6776
* When building a C/C++ toolset, you also build the newlib C library, so the
6777
Index: gcc/tree-ssa-ifcombine.c
6778
===================================================================
6779
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
6780
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
6781
@@ -105,7 +105,11 @@
6783
gimple stmt = gsi_stmt (gsi);
6785
+ if (is_gimple_debug (stmt))
6788
if (gimple_has_side_effects (stmt)
6789
+ || gimple_could_trap_p (stmt)
6790
|| gimple_vuse (stmt))
6794
while (is_gimple_assign (stmt)
6795
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
6796
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
6797
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
6798
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
6799
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
6800
|| gimple_assign_ssa_name_copy_p (stmt)))
6801
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
6803
Index: gcc/sel-sched-ir.c
6804
===================================================================
6805
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
6806
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
6808
static void free_av_set (basic_block);
6809
static void invalidate_av_set (basic_block);
6810
static void extend_insn_data (void);
6811
-static void sel_init_new_insn (insn_t, int);
6812
+static void sel_init_new_insn (insn_t, int, int = -1);
6813
static void finish_insns (void);
6815
/* Various list functions. */
6816
@@ -4011,9 +4011,10 @@
6820
-/* Compute seqno for INSN by its preds or succs. */
6821
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
6822
+ seqno in corner cases. */
6824
-get_seqno_for_a_jump (insn_t insn)
6825
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
6829
@@ -4069,8 +4070,16 @@
6831
seqno = get_seqno_by_succs (insn);
6835
+ /* The only case where this could be here legally is that the only
6836
+ unscheduled insn was a conditional jump that got removed and turned
6837
+ into this unconditional one. Initialize from the old seqno
6838
+ of that jump passed down to here. */
6839
+ seqno = old_seqno;
6842
gcc_assert (seqno >= 0);
6847
@@ -4250,22 +4259,24 @@
6850
/* This is used to initialize spurious jumps generated by
6851
- sel_redirect_edge (). */
6852
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
6853
+ in corner cases within get_seqno_for_a_jump. */
6855
-init_simplejump_data (insn_t insn)
6856
+init_simplejump_data (insn_t insn, int old_seqno)
6858
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
6859
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
6860
vNULL, true, false, false,
6862
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
6863
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
6864
init_first_time_insn_data (insn);
6867
/* Perform deferred initialization of insns. This is used to process
6868
- a new jump that may be created by redirect_edge. */
6870
-sel_init_new_insn (insn_t insn, int flags)
6871
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
6872
+ for initializing simplejumps in init_simplejump_data. */
6874
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
6876
/* We create data structures for bb when the first insn is emitted in it. */
6878
@@ -4292,7 +4303,7 @@
6879
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
6881
extend_insn_data ();
6882
- init_simplejump_data (insn);
6883
+ init_simplejump_data (insn, old_seqno);
6886
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
6887
@@ -5578,8 +5589,7 @@
6890
/* A wrapper for redirect_edge_and_branch_force, which also initializes
6891
- data structures for possibly created bb and insns. Returns the newly
6892
- added bb or NULL, when a bb was not needed. */
6893
+ data structures for possibly created bb and insns. */
6895
sel_redirect_edge_and_branch_force (edge e, basic_block to)
6897
@@ -5586,6 +5596,7 @@
6898
basic_block jump_bb, src, orig_dest = e->dest;
6901
+ int old_seqno = -1;
6903
/* This function is now used only for bookkeeping code creation, where
6904
we'll never get the single pred of orig_dest block and thus will not
6905
@@ -5594,8 +5605,13 @@
6906
&& !single_pred_p (orig_dest));
6908
prev_max_uid = get_max_uid ();
6909
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
6910
+ when the conditional jump being redirected may become unconditional. */
6911
+ if (any_condjump_p (BB_END (src))
6912
+ && INSN_SEQNO (BB_END (src)) >= 0)
6913
+ old_seqno = INSN_SEQNO (BB_END (src));
6915
jump_bb = redirect_edge_and_branch_force (e, to);
6917
if (jump_bb != NULL)
6918
sel_add_bb (jump_bb);
6920
@@ -5607,7 +5623,8 @@
6922
jump = find_new_jump (src, jump_bb, prev_max_uid);
6924
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
6925
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
6927
set_immediate_dominator (CDI_DOMINATORS, to,
6928
recompute_dominator (CDI_DOMINATORS, to));
6929
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
6930
@@ -5626,6 +5643,7 @@
6932
bool recompute_toporder_p = false;
6933
bool maybe_unreachable = single_pred_p (orig_dest);
6934
+ int old_seqno = -1;
6936
latch_edge_p = (pipelining_p
6937
&& current_loop_nest
6938
@@ -5634,6 +5652,12 @@
6940
prev_max_uid = get_max_uid ();
6942
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
6943
+ when the conditional jump being redirected may become unconditional. */
6944
+ if (any_condjump_p (BB_END (src))
6945
+ && INSN_SEQNO (BB_END (src)) >= 0)
6946
+ old_seqno = INSN_SEQNO (BB_END (src));
6948
redirected = redirect_edge_and_branch (e, to);
6950
gcc_assert (redirected && !last_added_blocks.exists ());
6951
@@ -5654,7 +5678,7 @@
6953
jump = find_new_jump (src, NULL, prev_max_uid);
6955
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
6956
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
6958
/* Only update dominator info when we don't have unreachable blocks.
6959
Otherwise we'll update in maybe_tidy_empty_bb. */
6960
Index: gcc/fortran/interface.c
6961
===================================================================
6962
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_3_release)
6963
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
6964
@@ -1923,7 +1923,7 @@
6965
/* F2008, 12.5.2.5; IR F08/0073. */
6966
if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
6967
&& ((CLASS_DATA (formal)->attr.class_pointer
6968
- && !formal->attr.intent == INTENT_IN)
6969
+ && formal->attr.intent != INTENT_IN)
6970
|| CLASS_DATA (formal)->attr.allocatable))
6972
if (actual->ts.type != BT_CLASS)
6973
Index: gcc/fortran/trans-expr.c
6974
===================================================================
6975
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
6976
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
6977
@@ -7096,7 +7096,7 @@
6979
res_desc = gfc_evaluate_now (desc, &se->pre);
6980
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
6981
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
6982
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
6984
/* Free the lhs after the function call and copy the result data to
6985
the lhs descriptor. */
6986
Index: gcc/fortran/decl.c
6987
===================================================================
6988
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
6989
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
6990
@@ -1996,6 +1996,13 @@
6991
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
6992
"initialization at %C") == FAILURE)
6994
+ else if (gfc_current_state () == COMP_DERIVED)
6996
+ gfc_error ("Invalid old style initialization for derived type "
6997
+ "component at %C");
7002
return match_old_style_init (name);
7004
Index: gcc/fortran/trans-openmp.c
7005
===================================================================
7006
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release)
7007
+++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch)
7008
@@ -115,6 +115,16 @@
7009
if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
7010
return OMP_CLAUSE_DEFAULT_SHARED;
7012
+ /* These are either array or derived parameters, or vtables.
7013
+ In the former cases, the OpenMP standard doesn't consider them to be
7014
+ variables at all (they can't be redefined), but they can nevertheless appear
7015
+ in parallel/task regions and for default(none) purposes treat them as shared.
7016
+ For vtables likely the same handling is desirable. */
7017
+ if (TREE_CODE (decl) == VAR_DECL
7018
+ && TREE_READONLY (decl)
7019
+ && TREE_STATIC (decl))
7020
+ return OMP_CLAUSE_DEFAULT_SHARED;
7022
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
7025
Index: gcc/fortran/ChangeLog
7026
===================================================================
7027
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
7028
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
7030
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
7033
+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
7034
+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
7036
+2014-09-03 Marek Polacek <polacek@redhat.com>
7038
+ Backport from trunk
7040
+ * interface.c (compare_parameter): Fix condition.
7042
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
7044
+ Backport from trunk
7046
+ * gfortran.dg/array_assignment_5.f90: New test.
7048
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
7050
+ Backport from trunk
7052
+ * simplify.c (gfc_simplify_dot_product): Convert types of
7053
+ vectors before calculating the result.
7055
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
7057
+ Backport from trunk.
7059
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
7060
+ that elements are skipped. This then correctly aligns 'reverse'
7061
+ with the scalarizer loops.
7063
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
7067
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
7068
+ for the address expression of 'res_desc'.
7070
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
7071
+ Fritz Reese <Reese-Fritz@zai.com>
7073
+ * decl.c (variable_decl): Reject old style initialization
7074
+ for derived type components.
7076
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7078
+ Backport from trunk.
7080
+ * trans-decl.c (gfc_create_module_variable): Don't create
7081
+ Cray-pointee decls twice.
7083
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
7085
+ Backport from mainline
7086
+ PR libfortran/61310
7087
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
7090
2014-05-22 Release Manager
7092
* GCC 4.8.3 released.
7093
Index: gcc/fortran/frontend-passes.c
7094
===================================================================
7095
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
7096
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
7097
@@ -874,6 +874,10 @@
7101
+ case INTRINSIC_CONCAT:
7102
+ /* Do not do string concatenations. */
7106
/* Binary operators. */
7107
if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
7108
Index: gcc/fortran/trans-decl.c
7109
===================================================================
7110
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
7111
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
7112
@@ -4084,8 +4084,8 @@
7115
/* Don't generate variables from other modules. Variables from
7116
- COMMONs will already have been generated. */
7117
- if (sym->attr.use_assoc || sym->attr.in_common)
7118
+ COMMONs and Cray pointees will already have been generated. */
7119
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
7122
/* Equivalenced variables arrive here after creation. */
7123
Index: gcc/fortran/dependency.c
7124
===================================================================
7125
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release)
7126
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
7127
@@ -1779,6 +1779,7 @@
7128
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
7132
gfc_dependency fin_dep;
7133
gfc_dependency this_dep;
7135
@@ -1828,6 +1829,8 @@
7139
+ /* Index for the reverse array. */
7141
for (n=0; n < lref->u.ar.dimen; n++)
7143
/* Assume dependency when either of array reference is vector
7144
@@ -1862,31 +1865,37 @@
7145
The ability to reverse or not is set by previous conditions
7146
in this dimension. If reversal is not activated, the
7147
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
7149
+ /* Get the indexing right for the scalarizing loop. If this
7150
+ is an element, there is no corresponding loop. */
7151
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
7154
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
7155
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
7157
/* Set reverse if backward dependence and not inhibited. */
7158
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
7159
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
7160
- GFC_REVERSE_SET : reverse[n];
7161
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
7162
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
7163
+ GFC_REVERSE_SET : reverse[m];
7165
/* Set forward if forward dependence and not inhibited. */
7166
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
7167
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
7168
- GFC_FORWARD_SET : reverse[n];
7169
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
7170
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
7171
+ GFC_FORWARD_SET : reverse[m];
7173
/* Flag up overlap if dependence not compatible with
7174
the overall state of the expression. */
7175
- if (reverse && reverse[n] == GFC_REVERSE_SET
7176
+ if (reverse && reverse[m] == GFC_REVERSE_SET
7177
&& this_dep == GFC_DEP_FORWARD)
7179
- reverse[n] = GFC_INHIBIT_REVERSE;
7180
+ reverse[m] = GFC_INHIBIT_REVERSE;
7181
this_dep = GFC_DEP_OVERLAP;
7183
- else if (reverse && reverse[n] == GFC_FORWARD_SET
7184
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
7185
&& this_dep == GFC_DEP_BACKWARD)
7187
- reverse[n] = GFC_INHIBIT_REVERSE;
7188
+ reverse[m] = GFC_INHIBIT_REVERSE;
7189
this_dep = GFC_DEP_OVERLAP;
7192
@@ -1893,7 +1902,7 @@
7193
/* If no intention of reversing or reversing is explicitly
7194
inhibited, convert backward dependence to overlap. */
7195
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
7196
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
7197
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
7198
this_dep = GFC_DEP_OVERLAP;
7201
Index: gcc/fortran/simplify.c
7202
===================================================================
7203
--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release)
7204
+++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_8-branch)
7205
@@ -1877,6 +1877,9 @@
7207
gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
7212
if (!is_constant_array_expr (vector_a)
7213
|| !is_constant_array_expr (vector_b))
7215
@@ -1883,8 +1886,14 @@
7217
gcc_assert (vector_a->rank == 1);
7218
gcc_assert (vector_b->rank == 1);
7219
- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
7221
+ temp.expr_type = EXPR_OP;
7222
+ gfc_clear_ts (&temp.ts);
7223
+ temp.value.op.op = INTRINSIC_NONE;
7224
+ temp.value.op.op1 = vector_a;
7225
+ temp.value.op.op2 = vector_b;
7226
+ gfc_type_convert_binary (&temp, 1);
7228
return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
7231
Index: gcc/function.c
7232
===================================================================
7233
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
7234
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
7235
@@ -1354,9 +1354,13 @@
7236
#define STACK_POINTER_OFFSET 0
7239
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
7240
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
7243
/* If not defined, pick an appropriate default for the offset of dynamically
7244
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
7245
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
7246
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
7248
#ifndef STACK_DYNAMIC_OFFSET
7250
@@ -1368,12 +1372,12 @@
7251
`crtl->outgoing_args_size'. Nevertheless, we must allow
7252
for it when allocating stack dynamic objects. */
7254
-#if defined(REG_PARM_STACK_SPACE)
7255
+#ifdef INCOMING_REG_PARM_STACK_SPACE
7256
#define STACK_DYNAMIC_OFFSET(FNDECL) \
7257
((ACCUMULATE_OUTGOING_ARGS \
7258
? (crtl->outgoing_args_size \
7259
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
7260
- : REG_PARM_STACK_SPACE (FNDECL))) \
7261
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
7262
: 0) + (STACK_POINTER_OFFSET))
7264
#define STACK_DYNAMIC_OFFSET(FNDECL) \
7265
@@ -2211,8 +2215,9 @@
7267
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
7269
-#ifdef REG_PARM_STACK_SPACE
7270
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
7271
+#ifdef INCOMING_REG_PARM_STACK_SPACE
7272
+ all->reg_parm_stack_space
7273
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
7277
@@ -4518,6 +4523,7 @@
7278
/* ??? This could be set on a per-function basis by the front-end
7279
but is this worth the hassle? */
7280
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
7281
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
7285
Index: gcc/tree-vectorizer.h
7286
===================================================================
7287
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
7288
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
7290
#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
7292
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
7293
-(L)->may_misalign_stmts.length () > 0
7294
+((L)->may_misalign_stmts.length () > 0)
7295
#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
7296
-(L)->may_alias_ddrs.length () > 0
7297
+((L)->may_alias_ddrs.length () > 0)
7299
#define NITERS_KNOWN_P(n) \
7300
(host_integerp ((n),0) \
7302
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
7303
extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
7304
tree *, gimple_stmt_iterator *,
7305
- gimple *, bool, bool *);
7306
+ gimple *, bool, bool *,
7307
+ tree = NULL_TREE);
7308
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
7309
extern tree vect_create_destination_var (tree, tree);
7310
extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
7312
extern int vect_get_place_in_interleaving_chain (gimple, gimple);
7313
extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
7314
extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
7315
- tree, struct loop *);
7316
+ tree, struct loop *,
7317
+ tree = NULL_TREE);
7319
/* In tree-vect-loop.c. */
7320
/* FORNOW: Used in tree-parloops.c. */
7321
Index: gcc/tree-vect-loop.c
7322
===================================================================
7323
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release)
7324
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
7325
@@ -2205,7 +2205,8 @@
7328
def1 = SSA_NAME_DEF_STMT (op1);
7329
- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
7330
+ if (gimple_bb (def1)
7331
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
7333
&& flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
7334
&& is_gimple_assign (def1))
7335
Index: gcc/tree-vect-data-refs.c
7336
===================================================================
7337
--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release)
7338
+++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
7339
@@ -3553,6 +3553,9 @@
7341
if LOOP=i_loop: &in (relative to i_loop)
7342
if LOOP=j_loop: &in+i*2B (relative to j_loop)
7343
+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
7344
+ initial address. Unlike OFFSET, which is number of elements to
7345
+ be added, BYTE_OFFSET is measured in bytes.
7348
1. Return an SSA_NAME whose value is the address of the memory location of
7349
@@ -3566,7 +3569,8 @@
7350
vect_create_addr_base_for_vector_ref (gimple stmt,
7351
gimple_seq *new_stmt_list,
7353
- struct loop *loop)
7354
+ struct loop *loop,
7357
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
7358
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
7359
@@ -3628,7 +3632,17 @@
7360
base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
7361
gimple_seq_add_seq (new_stmt_list, seq);
7365
+ tree tmp = create_tmp_var (sizetype, "offset");
7367
+ byte_offset = fold_convert (sizetype, byte_offset);
7368
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
7369
+ base_offset, byte_offset);
7370
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
7371
+ gimple_seq_add_seq (new_stmt_list, seq);
7374
/* base + base_offset */
7376
addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
7377
@@ -3692,6 +3706,10 @@
7378
5. BSI: location where the new stmts are to be placed if there is no loop
7379
6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
7380
pointing to the initial address.
7381
+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
7382
+ to the initial address accessed by the data-ref in STMT. This is
7383
+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
7387
1. Declare a new ptr to vector_type, and have it point to the base of the
7388
@@ -3705,6 +3723,8 @@
7389
initial_address = &a[init];
7390
if OFFSET is supplied:
7391
initial_address = &a[init + OFFSET];
7392
+ if BYTE_OFFSET is supplied:
7393
+ initial_address = &a[init] + BYTE_OFFSET;
7395
Return the initial_address in INITIAL_ADDRESS.
7397
@@ -3722,7 +3742,7 @@
7398
vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
7399
tree offset, tree *initial_address,
7400
gimple_stmt_iterator *gsi, gimple *ptr_incr,
7401
- bool only_init, bool *inv_p)
7402
+ bool only_init, bool *inv_p, tree byte_offset)
7404
const char *base_name;
7405
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
7406
@@ -3881,10 +3901,10 @@
7407
/* (2) Calculate the initial address of the aggregate-pointer, and set
7408
the aggregate-pointer to point to it before the loop. */
7410
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
7411
+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
7413
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
7415
+ offset, loop, byte_offset);
7419
Index: gcc/emit-rtl.c
7420
===================================================================
7421
--- a/src/gcc/emit-rtl.c (.../tags/gcc_4_8_3_release)
7422
+++ b/src/gcc/emit-rtl.c (.../branches/gcc-4_8-branch)
7425
/* Return true if the given memory attributes are equal. */
7429
mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
7431
return (p->alias == q->alias
7432
Index: gcc/gimple-fold.c
7433
===================================================================
7434
--- a/src/gcc/gimple-fold.c (.../tags/gcc_4_8_3_release)
7435
+++ b/src/gcc/gimple-fold.c (.../branches/gcc-4_8-branch)
7436
@@ -2955,8 +2955,8 @@
7438
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
7439
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
7440
- && operand_equal_p (TYPE_SIZE (type),
7441
- TYPE_SIZE (TREE_TYPE (ctor)), 0))
7442
+ && !compare_tree_int (TYPE_SIZE (type), size)
7443
+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
7445
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
7446
ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
7447
Index: gcc/emit-rtl.h
7448
===================================================================
7449
--- a/src/gcc/emit-rtl.h (.../tags/gcc_4_8_3_release)
7450
+++ b/src/gcc/emit-rtl.h (.../branches/gcc-4_8-branch)
7452
#ifndef GCC_EMIT_RTL_H
7453
#define GCC_EMIT_RTL_H
7455
+/* Return whether two MEM_ATTRs are equal. */
7456
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
7458
/* Set the alias set of MEM to SET. */
7459
extern void set_mem_alias_set (rtx, alias_set_type);
7461
Index: gcc/tree-cfgcleanup.c
7462
===================================================================
7463
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
7464
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
7465
@@ -498,7 +498,20 @@
7467
/* First split basic block if stmt is not last. */
7468
if (stmt != gsi_stmt (gsi_last_bb (bb)))
7469
- split_block (bb, stmt);
7471
+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
7473
+ /* Don't split if there are only debug stmts
7474
+ after stmt, that can result in -fcompare-debug
7475
+ failures. Remove the debug stmts instead,
7476
+ they should be all unreachable anyway. */
7477
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
7478
+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
7479
+ gsi_remove (&gsi, true);
7482
+ split_block (bb, stmt);
7485
changed |= remove_fallthru_edge (bb->succs);
7487
Index: gcc/tree-sra.c
7488
===================================================================
7489
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_3_release)
7490
+++ b/src/gcc/tree-sra.c (.../branches/gcc-4_8-branch)
7491
@@ -1030,6 +1030,11 @@
7495
+ if (TREE_THIS_VOLATILE (expr))
7497
+ disqualify_base_of_expr (expr, "part of a volatile reference.");
7501
switch (TREE_CODE (expr))
7503
Index: gcc/common.opt
7504
===================================================================
7505
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
7506
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
7507
@@ -1226,6 +1226,10 @@
7508
Common Report Var(flag_tm)
7509
Enable support for GNU transactional memory
7512
+Common Report Var(flag_gnu_unique) Init(1)
7513
+Use STB_GNU_UNIQUE if supported by the assembler
7517
Does nothing. Preserved for backward compatibility.
7518
Index: gcc/tree-vect-patterns.c
7519
===================================================================
7520
--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release)
7521
+++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch)
7525
oprnd00 = gimple_assign_rhs1 (def_stmt);
7526
- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
7527
+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
7531
Index: gcc/sched-deps.c
7532
===================================================================
7533
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
7534
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
7535
@@ -2744,7 +2744,8 @@
7536
Consider for instance a volatile asm that changes the fpu rounding
7537
mode. An insn should not be moved across this even if it only uses
7538
pseudo-regs because it might give an incorrectly rounded result. */
7539
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
7540
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
7541
+ && !DEBUG_INSN_P (insn))
7542
reg_pending_barrier = TRUE_BARRIER;
7544
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
7545
Index: gcc/tree-vect-stmts.c
7546
===================================================================
7547
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
7548
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
7549
@@ -4319,6 +4319,7 @@
7550
int i, j, group_size;
7551
tree msq = NULL_TREE, lsq;
7552
tree offset = NULL_TREE;
7553
+ tree byte_offset = NULL_TREE;
7554
tree realignment_token = NULL_TREE;
7556
vec<tree> dr_chain = vNULL;
7557
@@ -4934,7 +4935,8 @@
7558
if (alignment_support_scheme == dr_explicit_realign_optimized)
7560
phi = SSA_NAME_DEF_STMT (msq);
7561
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
7562
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
7567
@@ -4955,7 +4957,8 @@
7569
dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
7570
offset, &dummy, gsi,
7571
- &ptr_incr, false, &inv_p);
7572
+ &ptr_incr, false, &inv_p,
7575
dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
7576
TYPE_SIZE_UNIT (aggr_type));
7577
Index: gcc/config/alpha/elf.h
7578
===================================================================
7579
--- a/src/gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release)
7580
+++ b/src/gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch)
7581
@@ -126,6 +126,10 @@
7582
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
7583
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
7585
+/* This variable should be set to 'true' if the target ABI requires
7586
+ unwinding tables even when exceptions are not used. */
7587
+#define TARGET_UNWIND_TABLES_DEFAULT true
7589
/* Select a format to encode pointers in exception handling data. CODE
7590
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
7591
true if the symbol may be affected by dynamic relocations.
7592
Index: gcc/config/alpha/alpha.c
7593
===================================================================
7594
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
7595
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
7596
@@ -8658,6 +8658,11 @@
7601
+ /* __builtin_unreachable can expand to no code at all,
7602
+ leaving (barrier) RTXes in the instruction stream. */
7603
+ goto close_shadow_notrapb;
7608
@@ -8673,6 +8678,7 @@
7609
n = emit_insn_before (gen_trapb (), i);
7610
PUT_MODE (n, TImode);
7611
PUT_MODE (i, TImode);
7612
+ close_shadow_notrapb:
7616
Index: gcc/config/elfos.h
7617
===================================================================
7618
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
7619
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
7621
/* Write the extra assembler code needed to declare an object properly. */
7623
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
7624
-#define USE_GNU_UNIQUE_OBJECT 1
7625
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
7627
#define USE_GNU_UNIQUE_OBJECT 0
7629
Index: gcc/config/sparc/sync.md
7630
===================================================================
7631
--- a/src/gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release)
7632
+++ b/src/gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch)
7635
[(set_attr "type" "multi")])
7637
+;; For LEON3, STB has the effect of membar #StoreLoad.
7638
+(define_insn "*membar_storeload_leon3"
7639
+ [(set (match_operand:BLK 0 "" "")
7640
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
7642
+ "stb\t%%g0, [%%sp-1]"
7643
+ [(set_attr "type" "store")])
7645
;; For V8, LDSTUB has the effect of membar #StoreLoad.
7646
(define_insn "*membar_storeload"
7647
[(set (match_operand:BLK 0 "" "")
7648
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
7650
+ "TARGET_V8 && !TARGET_LEON3"
7651
"ldstub\t[%%sp-1], %%g0"
7652
[(set_attr "type" "multi")])
7654
Index: gcc/config/i386/i386.md
7655
===================================================================
7656
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
7657
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
7658
@@ -5339,66 +5339,37 @@
7660
;; Avoid store forwarding (partial memory) stall penalty by extending
7661
;; SImode value to DImode through XMM register instead of pushing two
7662
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
7663
-;; targets benefit from this optimization. Also note that fild
7664
-;; loads from memory only.
7665
+;; SImode values to stack. Also note that fild loads from memory only.
7667
-(define_insn "*floatunssi<mode>2_1"
7668
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
7669
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
7670
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
7671
(unsigned_float:X87MODEF
7672
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
7673
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
7674
- (clobber (match_scratch:SI 3 "=X,x"))]
7675
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
7676
+ (clobber (match_scratch:DI 3 "=x"))
7677
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
7679
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
7681
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
7683
+ "&& reload_completed"
7684
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
7685
+ (set (match_dup 2) (match_dup 3))
7686
+ (set (match_dup 0)
7687
+ (float:X87MODEF (match_dup 2)))]
7689
[(set_attr "type" "multi")
7690
(set_attr "mode" "<MODE>")])
7693
- [(set (match_operand:X87MODEF 0 "register_operand")
7694
- (unsigned_float:X87MODEF
7695
- (match_operand:SI 1 "register_operand")))
7696
- (clobber (match_operand:DI 2 "memory_operand"))
7697
- (clobber (match_scratch:SI 3))]
7699
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
7701
- && reload_completed"
7702
- [(set (match_dup 2) (match_dup 1))
7703
- (set (match_dup 0)
7704
- (float:X87MODEF (match_dup 2)))]
7705
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
7708
- [(set (match_operand:X87MODEF 0 "register_operand")
7709
- (unsigned_float:X87MODEF
7710
- (match_operand:SI 1 "memory_operand")))
7711
- (clobber (match_operand:DI 2 "memory_operand"))
7712
- (clobber (match_scratch:SI 3))]
7714
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
7716
- && reload_completed"
7717
- [(set (match_dup 2) (match_dup 3))
7718
- (set (match_dup 0)
7719
- (float:X87MODEF (match_dup 2)))]
7721
- emit_move_insn (operands[3], operands[1]);
7722
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
7725
(define_expand "floatunssi<mode>2"
7727
[(set (match_operand:X87MODEF 0 "register_operand")
7728
(unsigned_float:X87MODEF
7729
(match_operand:SI 1 "nonimmediate_operand")))
7730
- (clobber (match_dup 2))
7731
- (clobber (match_scratch:SI 3))])]
7732
+ (clobber (match_scratch:DI 3))
7733
+ (clobber (match_dup 2))])]
7735
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
7737
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
7738
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
7740
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
7741
@@ -13545,7 +13516,8 @@
7742
(set (reg:CCFP FPSR_REG)
7743
(unspec:CCFP [(match_dup 2) (match_dup 3)]
7745
- "TARGET_USE_FANCY_MATH_387"
7746
+ "TARGET_USE_FANCY_MATH_387
7747
+ && flag_finite_math_only"
7749
[(set_attr "type" "fpspc")
7750
(set_attr "mode" "XF")])
7751
@@ -13554,7 +13526,8 @@
7752
[(use (match_operand:XF 0 "register_operand"))
7753
(use (match_operand:XF 1 "general_operand"))
7754
(use (match_operand:XF 2 "general_operand"))]
7755
- "TARGET_USE_FANCY_MATH_387"
7756
+ "TARGET_USE_FANCY_MATH_387
7757
+ && flag_finite_math_only"
7759
rtx label = gen_label_rtx ();
7761
@@ -13577,7 +13550,8 @@
7762
[(use (match_operand:MODEF 0 "register_operand"))
7763
(use (match_operand:MODEF 1 "general_operand"))
7764
(use (match_operand:MODEF 2 "general_operand"))]
7765
- "TARGET_USE_FANCY_MATH_387"
7766
+ "TARGET_USE_FANCY_MATH_387
7767
+ && flag_finite_math_only"
7769
rtx (*gen_truncxf) (rtx, rtx);
7771
@@ -13616,7 +13590,8 @@
7772
(set (reg:CCFP FPSR_REG)
7773
(unspec:CCFP [(match_dup 2) (match_dup 3)]
7775
- "TARGET_USE_FANCY_MATH_387"
7776
+ "TARGET_USE_FANCY_MATH_387
7777
+ && flag_finite_math_only"
7779
[(set_attr "type" "fpspc")
7780
(set_attr "mode" "XF")])
7781
@@ -13625,7 +13600,8 @@
7782
[(use (match_operand:XF 0 "register_operand"))
7783
(use (match_operand:XF 1 "general_operand"))
7784
(use (match_operand:XF 2 "general_operand"))]
7785
- "TARGET_USE_FANCY_MATH_387"
7786
+ "TARGET_USE_FANCY_MATH_387
7787
+ && flag_finite_math_only"
7789
rtx label = gen_label_rtx ();
7791
@@ -13648,7 +13624,8 @@
7792
[(use (match_operand:MODEF 0 "register_operand"))
7793
(use (match_operand:MODEF 1 "general_operand"))
7794
(use (match_operand:MODEF 2 "general_operand"))]
7795
- "TARGET_USE_FANCY_MATH_387"
7796
+ "TARGET_USE_FANCY_MATH_387
7797
+ && flag_finite_math_only"
7799
rtx (*gen_truncxf) (rtx, rtx);
7801
Index: gcc/config/i386/driver-i386.c
7802
===================================================================
7803
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
7804
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
7805
@@ -713,6 +713,11 @@
7806
/* Assume Core 2. */
7809
+ else if (has_longmode)
7810
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
7811
+ -march=native would be unusable for 64-bit compilations,
7812
+ as all the CPUs below are 32-bit only. */
7815
/* It is Core Duo. */
7817
Index: gcc/config/i386/i386.c
7818
===================================================================
7819
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
7820
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
7821
@@ -20505,7 +20505,7 @@
7822
t1 = gen_reg_rtx (V32QImode);
7823
t2 = gen_reg_rtx (V32QImode);
7824
t3 = gen_reg_rtx (V32QImode);
7825
- vt2 = GEN_INT (128);
7826
+ vt2 = GEN_INT (-128);
7827
for (i = 0; i < 32; i++)
7829
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
7830
@@ -24640,13 +24640,17 @@
7834
- /* Assume that region is SCC, i.e. all immediate predecessors
7835
- of non-head block are in the same region. */
7837
+ /* Regions are SCCs with the exception of selective
7838
+ scheduling with pipelining of outer blocks enabled.
7839
+ So also check that immediate predecessors of a non-head
7840
+ block are in the same region. */
7841
FOR_EACH_EDGE (e, ei, bb->preds)
7843
/* Avoid creating of loop-carried dependencies through
7844
- using topological odering in region. */
7845
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
7846
+ using topological ordering in the region. */
7847
+ if (rgn == CONTAINING_RGN (e->src->index)
7848
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
7849
add_dependee_for_func_arg (first_arg, e->src);
7852
@@ -38807,8 +38811,8 @@
7853
op0 = gen_lowpart (V4DImode, d->op0);
7854
op1 = gen_lowpart (V4DImode, d->op1);
7856
- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
7857
- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
7858
+ = GEN_INT ((d->perm[0] / (nelt / 2))
7859
+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
7860
emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
7863
Index: gcc/config/sh/sh.c
7864
===================================================================
7865
--- a/src/gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release)
7866
+++ b/src/gcc/config/sh/sh.c (.../branches/gcc-4_8-branch)
7867
@@ -808,6 +808,12 @@
7868
targetm.asm_out.aligned_op.di = NULL;
7869
targetm.asm_out.unaligned_op.di = NULL;
7872
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
7873
+ Disable it for everything else. */
7874
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
7875
+ TARGET_USERMODE = false;
7879
if (! strcmp (sh_div_str, "call-div1"))
7880
Index: gcc/config/sh/sync.md
7881
===================================================================
7882
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
7883
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
7885
(set (mem:SI (match_dup 1))
7887
[(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
7888
+ (set (reg:SI T_REG) (const_int 1))
7889
(clobber (reg:SI R0_REG))]
7890
"TARGET_ATOMIC_HARD_LLCS
7891
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
7893
(set (mem:QIHI (match_dup 1))
7895
[(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
7896
+ (set (reg:SI T_REG) (const_int 1))
7897
(clobber (reg:SI R0_REG))
7898
(clobber (match_scratch:SI 3 "=&r"))
7899
(clobber (match_scratch:SI 4 "=1"))]
7901
[(FETCHOP:SI (mem:SI (match_dup 1))
7902
(match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
7904
+ (set (reg:SI T_REG) (const_int 1))
7905
(clobber (reg:SI R0_REG))]
7906
"TARGET_ATOMIC_HARD_LLCS
7907
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
7909
[(FETCHOP:QIHI (mem:QIHI (match_dup 1))
7910
(match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
7912
+ (set (reg:SI T_REG) (const_int 1))
7913
(clobber (reg:SI R0_REG))
7914
(clobber (match_scratch:SI 3 "=&r"))
7915
(clobber (match_scratch:SI 4 "=1"))]
7917
[(not:SI (and:SI (mem:SI (match_dup 1))
7918
(match_operand:SI 2 "logical_operand" "rK08")))]
7920
+ (set (reg:SI T_REG) (const_int 1))
7921
(clobber (reg:SI R0_REG))]
7922
"TARGET_ATOMIC_HARD_LLCS
7923
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
7925
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
7926
(match_operand:QIHI 2 "logical_operand" "rK08")))]
7928
+ (set (reg:SI T_REG) (const_int 1))
7929
(clobber (reg:SI R0_REG))
7930
(clobber (match_scratch:SI 3 "=&r"))
7931
(clobber (match_scratch:SI 4 "=1"))]
7935
" mov.<bwl> %3,@%1" "\n"
7939
[(set_attr "length" "20")])
7942
(set (mem:SI (match_dup 1))
7944
[(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
7947
+ (set (reg:SI T_REG) (const_int 1))]
7948
"TARGET_ATOMIC_HARD_LLCS
7949
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
7953
[(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
7955
+ (set (reg:SI T_REG) (const_int 1))
7956
(clobber (reg:SI R0_REG))
7957
(clobber (match_scratch:SI 3 "=&r"))
7958
(clobber (match_scratch:SI 4 "=1"))]
7959
@@ -1124,7 +1132,8 @@
7960
(set (mem:SI (match_dup 1))
7962
[(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
7965
+ (set (reg:SI T_REG) (const_int 1))]
7966
"TARGET_ATOMIC_HARD_LLCS
7967
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
7969
@@ -1145,6 +1154,7 @@
7971
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
7973
+ (set (reg:SI T_REG) (const_int 1))
7974
(clobber (reg:SI R0_REG))
7975
(clobber (match_scratch:SI 3 "=&r"))
7976
(clobber (match_scratch:SI 4 "=1"))]
7977
@@ -1353,7 +1363,7 @@
7979
" mov.b @%0,r0" "\n"
7980
" mov.b %1,@%0" "\n"
7985
[(set_attr "length" "16")])
7986
Index: gcc/config/sh/sh.opt
7987
===================================================================
7988
--- a/src/gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release)
7989
+++ b/src/gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch)
7991
Cost to assume for a multiply insn
7994
-Target Report RejectNegative Var(TARGET_USERMODE)
7995
+Target Var(TARGET_USERMODE)
7996
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
7998
;; We might want to enable this by default for TARGET_HARD_SH4, because
7999
Index: gcc/config/microblaze/predicates.md
8000
===================================================================
8001
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
8002
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
8004
(ior (match_operand 0 "const_0_operand")
8005
(match_operand 0 "register_operand")))
8007
-(define_predicate "reg_or_mem_operand"
8008
- (ior (match_operand 0 "memory_operand")
8009
- (match_operand 0 "register_operand")))
8011
;; Return if the operand is either the PC or a label_ref.
8012
(define_special_predicate "pc_or_label_operand"
8013
(ior (match_code "pc,label_ref")
8014
Index: gcc/config/microblaze/microblaze.md
8015
===================================================================
8016
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
8017
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
8018
@@ -1119,18 +1119,6 @@
8022
-;;Load and store reverse
8023
-(define_insn "movsi4_rev"
8024
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
8025
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
8030
- [(set_attr "type" "load,store")
8031
- (set_attr "mode" "SI")
8032
- (set_attr "length" "4,4")])
8034
;; 32-bit floating point moves
8036
(define_expand "movsf"
8037
Index: gcc/config/avr/avr-fixed.md
8038
===================================================================
8039
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
8040
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
8044
// Input and output of the libgcc function
8045
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
8046
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
8047
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
8048
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
8050
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
8051
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
8052
Index: gcc/config/avr/avr.md
8053
===================================================================
8054
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
8055
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
8056
@@ -367,6 +367,15 @@
8061
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
8062
+ // of the poor addressing capabilities of these spaces it's better to
8063
+ // load them in one chunk. And it avoids PR61443.
8065
+ if (MEM_P (operands[0])
8066
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
8067
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
8069
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
8071
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
8072
Index: gcc/config/avr/avr.h
8073
===================================================================
8074
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
8075
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
8076
@@ -250,18 +250,18 @@
8077
#define REG_CLASS_CONTENTS { \
8078
{0x00000000,0x00000000}, /* NO_REGS */ \
8079
{0x00000001,0x00000000}, /* R0_REG */ \
8080
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
8081
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
8082
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
8083
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
8084
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
8085
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
8086
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
8087
- {(3 << REG_Y) | (3 << REG_Z), \
8088
+ {(3u << REG_Y) | (3u << REG_Z), \
8089
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
8090
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
8091
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
8092
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
8093
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
8094
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
8095
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
8096
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
8097
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
8098
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
8099
0x00000000}, /* LD_REGS, r16 - r31 */ \
8100
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
8101
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
8102
Index: gcc/config/aarch64/arm_neon.h
8103
===================================================================
8104
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
8105
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
8106
@@ -13815,7 +13815,7 @@
8108
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
8112
: /* No clobbers */);
8115
@@ -13837,7 +13837,7 @@
8117
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
8121
: /* No clobbers */);
8124
Index: gcc/config/aarch64/aarch64.md
8125
===================================================================
8126
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
8127
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
8128
@@ -3292,6 +3292,7 @@
8129
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
8131
(clobber (reg:DI LR_REGNUM))
8132
+ (clobber (reg:CC CC_REGNUM))
8133
(clobber (match_scratch:DI 1 "=r"))]
8135
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
8136
Index: gcc/config/aarch64/aarch64.c
8137
===================================================================
8138
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
8139
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
8140
@@ -1201,6 +1201,7 @@
8141
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
8142
int ncrn, nvrn, nregs;
8143
bool allocate_ncrn, allocate_nvrn;
8144
+ HOST_WIDE_INT size;
8146
/* We need to do this once per argument. */
8147
if (pcum->aapcs_arg_processed)
8148
@@ -1208,6 +1209,11 @@
8150
pcum->aapcs_arg_processed = true;
8152
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
8154
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
8157
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
8158
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
8160
@@ -1258,10 +1264,8 @@
8163
ncrn = pcum->aapcs_ncrn;
8164
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
8165
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
8166
+ nregs = size / UNITS_PER_WORD;
8169
/* C6 - C9. though the sign and zero extension semantics are
8170
handled elsewhere. This is the case where the argument fits
8171
entirely general registers. */
8172
@@ -1309,13 +1313,12 @@
8173
pcum->aapcs_nextncrn = NUM_ARG_REGS;
8175
/* The argument is passed on stack; record the needed number of words for
8176
- this argument (we can re-use NREGS) and align the total size if
8178
+ this argument and align the total size if necessary. */
8180
- pcum->aapcs_stack_words = nregs;
8181
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
8182
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
8183
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
8184
- 16 / UNITS_PER_WORD) + 1;
8185
+ 16 / UNITS_PER_WORD);
8189
Index: gcc/config/aarch64/aarch64-linux.h
8190
===================================================================
8191
--- a/src/gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release)
8192
+++ b/src/gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch)
8197
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
8199
#endif /* GCC_AARCH64_LINUX_H */
8200
Index: gcc/config/rs6000/constraints.md
8201
===================================================================
8202
--- a/src/gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release)
8203
+++ b/src/gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch)
8205
(define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
8206
"If -mmfpgpr was used, a floating point register or NO_REGS.")
8208
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
8209
+ "Floating point register if direct moves are available, or NO_REGS.")
8211
+;; At present, DImode is not allowed in the Altivec registers. If in the
8212
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
8213
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
8214
+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
8216
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
8217
+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
8219
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
8220
+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
8222
(define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
8223
"Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
8226
"Floating point register if the STFIWX instruction is enabled or NO_REGS.")
8228
(define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
8229
- "VSX vector register to hold scalar float values or NO_REGS.")
8230
+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
8232
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
8233
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
8234
Index: gcc/config/rs6000/predicates.md
8235
===================================================================
8236
--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release)
8237
+++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch)
8238
@@ -1795,7 +1795,7 @@
8239
(define_predicate "fusion_gpr_mem_load"
8240
(match_code "mem,sign_extend,zero_extend")
8243
+ rtx addr, base, offset;
8245
/* Handle sign/zero extend. */
8246
if (GET_CODE (op) == ZERO_EXTEND
8247
@@ -1825,24 +1825,79 @@
8250
addr = XEXP (op, 0);
8251
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
8254
+ base = XEXP (addr, 0);
8255
+ if (!base_reg_operand (base, GET_MODE (base)))
8258
+ offset = XEXP (addr, 1);
8260
if (GET_CODE (addr) == PLUS)
8261
+ return satisfies_constraint_I (offset);
8263
+ else if (GET_CODE (addr) == LO_SUM)
8265
- rtx base = XEXP (addr, 0);
8266
- rtx offset = XEXP (addr, 1);
8267
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
8268
+ return small_toc_ref (offset, GET_MODE (offset));
8270
- return (base_reg_operand (base, GET_MODE (base))
8271
- && satisfies_constraint_I (offset));
8272
+ else if (TARGET_ELF && !TARGET_POWERPC64)
8273
+ return CONSTANT_P (offset);
8276
- else if (GET_CODE (addr) == LO_SUM)
8280
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
8281
+;; memory field with both the addis and the memory offset. Sign extension
8282
+;; is not handled here, since lha and lwa are not fused.
8283
+(define_predicate "fusion_gpr_mem_combo"
8284
+ (match_code "mem,zero_extend")
8286
+ rtx addr, base, offset;
8288
+ /* Handle zero extend. */
8289
+ if (GET_CODE (op) == ZERO_EXTEND)
8291
- rtx base = XEXP (addr, 0);
8292
- rtx offset = XEXP (addr, 1);
8293
+ op = XEXP (op, 0);
8294
+ mode = GET_MODE (op);
8297
- if (!base_reg_operand (base, GET_MODE (base)))
8309
+ if (!TARGET_POWERPC64)
8313
- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
8318
+ addr = XEXP (op, 0);
8319
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
8322
+ base = XEXP (addr, 0);
8323
+ if (!fusion_gpr_addis (base, GET_MODE (base)))
8326
+ offset = XEXP (addr, 1);
8327
+ if (GET_CODE (addr) == PLUS)
8328
+ return satisfies_constraint_I (offset);
8330
+ else if (GET_CODE (addr) == LO_SUM)
8332
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
8333
return small_toc_ref (offset, GET_MODE (offset));
8335
else if (TARGET_ELF && !TARGET_POWERPC64)
8336
Index: gcc/config/rs6000/htm.md
8337
===================================================================
8338
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
8339
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
8342
UNSPECV_HTM_TABORTWCI))
8343
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
8344
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
8345
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
8346
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
8347
(and:SI (match_dup 3) (const_int 15)))
8348
(clobber (scratch:CC))])]
8349
Index: gcc/config/rs6000/freebsd64.h
8350
===================================================================
8351
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
8352
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
8354
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
8355
#undef ADJUST_FIELD_ALIGN
8356
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
8357
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
8358
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
8361
&& TARGET_ALIGN_NATURAL == 0 \
8362
Index: gcc/config/rs6000/rs6000-protos.h
8363
===================================================================
8364
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
8365
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
8367
extern bool gpr_or_gpr_p (rtx, rtx);
8368
extern bool direct_move_p (rtx, rtx);
8369
extern bool quad_load_store_p (rtx, rtx);
8370
-extern bool fusion_gpr_load_p (rtx *, bool);
8371
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
8372
extern void expand_fusion_gpr_load (rtx *);
8373
-extern const char *emit_fusion_gpr_load (rtx *);
8374
+extern const char *emit_fusion_gpr_load (rtx, rtx);
8375
extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
8377
extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
8381
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
8382
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
8383
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
8385
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
8387
extern rtx rs6000_libcall_value (enum machine_mode);
8388
extern rtx rs6000_va_arg (tree, tree);
8389
extern int function_ok_for_sibcall (tree);
8390
-extern int rs6000_reg_parm_stack_space (tree);
8391
+extern int rs6000_reg_parm_stack_space (tree, bool);
8392
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
8393
extern bool rs6000_elf_in_small_data_p (const_tree);
8394
#ifdef ARGS_SIZE_RTX
8395
Index: gcc/config/rs6000/rs6000-builtin.def
8396
===================================================================
8397
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
8398
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
8399
@@ -622,20 +622,13 @@
8400
| RS6000_BTC_TERNARY), \
8401
CODE_FOR_ ## ICODE) /* ICODE */
8403
-/* Miscellaneous builtins. */
8404
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
8405
+/* 128-bit long double floating point builtins. */
8406
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
8407
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
8408
"__builtin_" NAME, /* NAME */ \
8409
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
8410
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
8411
+ | RS6000_BTM_LDBL128), \
8412
(RS6000_BTC_ ## ATTR /* ATTR */ \
8413
- | RS6000_BTC_UNARY), \
8414
- CODE_FOR_ ## ICODE) /* ICODE */
8416
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
8417
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
8418
- "__builtin_" NAME, /* NAME */ \
8419
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
8420
- (RS6000_BTC_ ## ATTR /* ATTR */ \
8421
| RS6000_BTC_BINARY), \
8422
CODE_FOR_ ## ICODE) /* ICODE */
8424
@@ -1593,10 +1586,8 @@
8425
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
8426
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
8428
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
8429
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
8430
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
8431
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
8432
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
8433
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
8435
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
8436
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
8437
Index: gcc/config/rs6000/rs6000-c.c
8438
===================================================================
8439
--- a/src/gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release)
8440
+++ b/src/gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch)
8441
@@ -4126,7 +4126,8 @@
8442
argument) is reversed. Patch the arguments here before building
8443
the resolved CALL_EXPR. */
8444
if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
8445
- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
8446
+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
8447
+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
8450
t = args[2], args[2] = args[1], args[1] = t;
8451
@@ -4184,6 +4185,14 @@
8452
if (TARGET_DEBUG_BUILTIN)
8453
fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
8454
(int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
8456
+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
8457
+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
8458
+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
8459
+assignment for unaligned loads and stores");
8460
+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
8461
+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
8462
+assignment for unaligned loads and stores");
8464
/* For now treat vec_splats and vec_promote as the same. */
8465
if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
8466
Index: gcc/config/rs6000/linux64.h
8467
===================================================================
8468
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release)
8469
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
8471
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
8472
#undef ADJUST_FIELD_ALIGN
8473
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
8474
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
8475
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
8478
&& TARGET_ALIGN_NATURAL == 0 \
8479
Index: gcc/config/rs6000/rs6000.c
8480
===================================================================
8481
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
8482
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
8484
enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
8485
enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
8486
addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
8487
+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
8490
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
8491
@@ -1704,8 +1705,7 @@
8493
if (TARGET_VSX && VSX_REGNO_P (regno)
8494
&& (VECTOR_MEM_VSX_P (mode)
8495
- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
8496
- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
8497
+ || reg_addr[mode].scalar_in_vmx_p
8498
|| (TARGET_VSX_TIMODE && mode == TImode)
8499
|| (TARGET_VADDUQM && mode == V1TImode)))
8501
@@ -1714,12 +1714,9 @@
8503
if (ALTIVEC_REGNO_P (regno))
8505
- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
8506
+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
8509
- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
8512
return ALTIVEC_REGNO_P (last_regno);
8515
@@ -1897,14 +1894,16 @@
8516
if (rs6000_vector_unit[m] != VECTOR_NONE
8517
|| rs6000_vector_mem[m] != VECTOR_NONE
8518
|| (reg_addr[m].reload_store != CODE_FOR_nothing)
8519
- || (reg_addr[m].reload_load != CODE_FOR_nothing))
8520
+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
8521
+ || reg_addr[m].scalar_in_vmx_p)
8524
- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
8525
+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
8526
rs6000_debug_vector_unit (rs6000_vector_unit[m]),
8527
rs6000_debug_vector_unit (rs6000_vector_mem[m]),
8528
(reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
8529
- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
8530
+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
8531
+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
8534
fputs ("\n", stderr);
8535
@@ -2021,6 +2020,10 @@
8536
"wd reg_class = %s\n"
8537
"wf reg_class = %s\n"
8538
"wg reg_class = %s\n"
8539
+ "wh reg_class = %s\n"
8540
+ "wi reg_class = %s\n"
8541
+ "wj reg_class = %s\n"
8542
+ "wk reg_class = %s\n"
8543
"wl reg_class = %s\n"
8544
"wm reg_class = %s\n"
8545
"wr reg_class = %s\n"
8546
@@ -2040,6 +2043,10 @@
8547
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
8548
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
8549
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
8550
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
8551
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
8552
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
8553
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
8554
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
8555
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
8556
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
8557
@@ -2324,6 +2331,8 @@
8559
for (m = 0; m < NUM_MACHINE_MODES; ++m)
8561
+ enum machine_mode m2 = (enum machine_mode)m;
8563
/* SDmode is special in that we want to access it only via REG+REG
8564
addressing on power7 and above, since we want to use the LFIWZX and
8565
STFIWZX instructions to load it. */
8566
@@ -2358,13 +2367,12 @@
8569
&& (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
8570
- && GET_MODE_SIZE (m) <= 8
8571
- && !VECTOR_MODE_P (m)
8572
- && !COMPLEX_MODE_P (m)
8573
+ && GET_MODE_SIZE (m2) <= 8
8574
+ && !VECTOR_MODE_P (m2)
8575
+ && !COMPLEX_MODE_P (m2)
8577
- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
8578
- && !(m == DFmode && TARGET_UPPER_REGS_DF)
8579
- && !(m == SFmode && TARGET_UPPER_REGS_SF))
8580
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
8581
+ && !reg_addr[m2].scalar_in_vmx_p)
8583
addr_mask |= RELOAD_REG_PRE_INCDEC;
8585
@@ -2595,16 +2603,22 @@
8586
f - Register class to use with traditional SFmode instructions.
8587
v - Altivec register.
8588
wa - Any VSX register.
8589
+ wc - Reserved to represent individual CR bits (used in LLVM).
8590
wd - Preferred register class for V2DFmode.
8591
wf - Preferred register class for V4SFmode.
8592
wg - Float register for power6x move insns.
8593
+ wh - FP register for direct move instructions.
8594
+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
8595
+ wj - FP or VSX register to hold 64-bit integers for direct moves.
8596
+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
8597
wl - Float register if we can do 32-bit signed int loads.
8598
wm - VSX register for ISA 2.07 direct move operations.
8599
+ wn - always NO_REGS.
8600
wr - GPR if 64-bit mode is permitted.
8601
ws - Register class to do ISA 2.06 DF operations.
8602
+ wt - VSX register for TImode in VSX registers.
8603
wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
8604
wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
8605
- wt - VSX register for TImode in VSX registers.
8606
ww - Register class to do SF conversions in with VSX operations.
8607
wx - Float register if we can do 32-bit int stores.
8608
wy - Register class to do ISA 2.07 SF operations.
8609
@@ -2611,21 +2625,22 @@
8610
wz - Float register if we can do 32-bit unsigned int loads. */
8612
if (TARGET_HARD_FLOAT && TARGET_FPRS)
8613
- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
8614
+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
8616
if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
8617
- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
8618
+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
8622
rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
8623
- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
8624
- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
8625
+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
8626
+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
8627
+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
8629
if (TARGET_VSX_TIMODE)
8630
- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
8631
+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
8633
- if (TARGET_UPPER_REGS_DF)
8634
+ if (TARGET_UPPER_REGS_DF) /* DFmode */
8636
rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
8637
rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
8638
@@ -2639,19 +2654,26 @@
8640
rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
8642
- if (TARGET_MFPGPR)
8643
+ if (TARGET_MFPGPR) /* DFmode */
8644
rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
8647
- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
8648
+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
8650
if (TARGET_DIRECT_MOVE)
8651
- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
8653
+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
8654
+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
8655
+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
8656
+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
8657
+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
8658
+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
8661
if (TARGET_POWERPC64)
8662
rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
8664
- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
8665
+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
8667
rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
8668
rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
8669
@@ -2666,10 +2688,10 @@
8670
rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
8673
- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
8674
+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
8677
- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
8678
+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
8680
/* Set up the reload helper and direct move functions. */
8681
if (TARGET_VSX || TARGET_ALTIVEC)
8682
@@ -2692,10 +2714,11 @@
8683
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
8684
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
8686
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
8687
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
8688
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
8689
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
8690
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
8691
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
8692
+ reg_addr[DFmode].scalar_in_vmx_p = true;
8693
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
8694
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
8696
if (TARGET_P8_VECTOR)
8698
@@ -2703,6 +2726,8 @@
8699
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
8700
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
8701
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
8702
+ if (TARGET_UPPER_REGS_SF)
8703
+ reg_addr[SFmode].scalar_in_vmx_p = true;
8705
if (TARGET_VSX_TIMODE)
8707
@@ -2759,10 +2784,11 @@
8708
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
8709
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
8711
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
8712
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
8713
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
8714
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
8715
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
8716
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
8717
+ reg_addr[DFmode].scalar_in_vmx_p = true;
8718
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
8719
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
8721
if (TARGET_P8_VECTOR)
8723
@@ -2770,6 +2796,8 @@
8724
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
8725
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
8726
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
8727
+ if (TARGET_UPPER_REGS_SF)
8728
+ reg_addr[SFmode].scalar_in_vmx_p = true;
8730
if (TARGET_VSX_TIMODE)
8732
@@ -2810,6 +2838,7 @@
8734
for (m = 0; m < NUM_MACHINE_MODES; ++m)
8736
+ enum machine_mode m2 = (enum machine_mode)m;
8737
int reg_size2 = reg_size;
8739
/* TFmode/TDmode always takes 2 registers, even in VSX. */
8740
@@ -2818,7 +2847,7 @@
8741
reg_size2 = UNITS_PER_FP_WORD;
8743
rs6000_class_max_nregs[m][c]
8744
- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
8745
+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
8749
@@ -3014,7 +3043,8 @@
8750
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
8751
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
8752
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
8753
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
8754
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
8755
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
8758
/* Override command line options. Mostly we process the processor type and
8759
@@ -5861,6 +5891,34 @@
8763
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
8766
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
8768
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
8770
+ if (computed != 128)
8772
+ static bool warned;
8773
+ if (!warned && warn_psabi)
8776
+ inform (input_location,
8777
+ "the layout of aggregates containing vectors with"
8778
+ " %d-byte alignment will change in a future GCC release",
8779
+ computed / BITS_PER_UNIT);
8782
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
8783
+ keep the special treatment of vector types, but warn if there will
8784
+ be differences in future GCC releases. */
8791
/* AIX increases natural record alignment to doubleword if the first
8792
field is an FP double while the FP fields remain word aligned. */
8794
@@ -6109,7 +6167,8 @@
8797
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
8798
- gcc_assert (extra >= 0);
8802
if (GET_CODE (addr) == LO_SUM)
8803
/* For lo_sum addresses, we must allow any offset except one that
8804
@@ -9198,14 +9257,51 @@
8805
|| (type && TREE_CODE (type) == VECTOR_TYPE
8806
&& int_size_in_bytes (type) >= 16))
8808
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
8809
- || DEFAULT_ABI == ABI_ELFv2
8810
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
8811
- && mode == BLKmode
8812
- && type && TYPE_ALIGN (type) > 64)
8814
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
8815
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
8816
+ -mcompat-align-parm is used. */
8817
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
8818
+ || DEFAULT_ABI == ABI_ELFv2)
8819
+ && type && TYPE_ALIGN (type) > 64)
8821
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
8822
+ or homogeneous float/vector aggregates here. We already handled
8823
+ vector aggregates above, but still need to check for float here. */
8824
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
8825
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
8827
+ /* We used to check for BLKmode instead of the above aggregate type
8828
+ check. Warn when this results in any difference to the ABI. */
8829
+ if (aggregate_p != (mode == BLKmode))
8831
+ static bool warned;
8832
+ if (!warned && warn_psabi)
8835
+ inform (input_location,
8836
+ "the ABI of passing aggregates with %d-byte alignment"
8837
+ " will change in a future GCC release",
8838
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
8842
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
8843
+ keep using the BLKmode check, but warn if there will be differences
8844
+ in future GCC releases. */
8845
+ if (mode == BLKmode)
8849
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
8850
+ implement the "aggregate type" check as a BLKmode check here; this
8851
+ means certain aggregate types are in fact not aligned. */
8852
+ if (TARGET_MACHO && rs6000_darwin64_abi
8853
+ && mode == BLKmode
8854
+ && type && TYPE_ALIGN (type) > 64)
8857
- return PARM_BOUNDARY;
8859
+ return PARM_BOUNDARY;
8862
/* The offset in words to the start of the parameter save area. */
8863
@@ -10243,6 +10339,7 @@
8866
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
8869
/* Do we also need to pass this argument in the parameter
8871
@@ -10271,6 +10368,37 @@
8872
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
8875
+ /* If there were not enough FPRs to hold the argument, the rest
8876
+ usually goes into memory. However, if the current position
8877
+ is still within the register parameter area, a portion may
8878
+ actually have to go into GPRs.
8880
+ Note that it may happen that the portion of the argument
8881
+ passed in the first "half" of the first GPR was already
8882
+ passed in the last FPR as well.
8884
+ For unnamed arguments, we already set up GPRs to cover the
8885
+ whole argument in rs6000_psave_function_arg, so there is
8886
+ nothing further to do at this point.
8888
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
8889
+ GCC releases. To avoid any ABI change on the release branch,
8890
+ we retain that original implementation here, but warn if we
8891
+ encounter a case where the ABI will change in the future. */
8892
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
8893
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
8894
+ && cum->nargs_prototype > 0)
8896
+ static bool warned;
8897
+ if (!warned && warn_psabi)
8900
+ inform (input_location,
8901
+ "the ABI of passing homogeneous float aggregates"
8902
+ " will change in a future GCC release");
8906
return rs6000_finish_function_arg (mode, rvec, k);
8908
else if (align_words < GP_ARG_NUM_REG)
8909
@@ -10497,10 +10625,9 @@
8910
list, or passes any parameter in memory. */
8913
-rs6000_function_parms_need_stack (tree fun)
8914
+rs6000_function_parms_need_stack (tree fun, bool incoming)
8916
- function_args_iterator args_iter;
8918
+ tree fntype, result;
8919
CUMULATIVE_ARGS args_so_far_v;
8920
cumulative_args_t args_so_far;
8922
@@ -10507,26 +10634,57 @@
8924
/* Must be a libcall, all of which only use reg parms. */
8929
- fun = TREE_TYPE (fun);
8930
+ fntype = TREE_TYPE (fun);
8932
/* Varargs functions need the parameter save area. */
8933
- if (!prototype_p (fun) || stdarg_p (fun))
8934
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
8937
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
8938
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
8939
args_so_far = pack_cumulative_args (&args_so_far_v);
8941
- if (aggregate_value_p (TREE_TYPE (fun), fun))
8942
+ /* When incoming, we will have been passed the function decl.
8943
+ It is necessary to use the decl to handle K&R style functions,
8944
+ where TYPE_ARG_TYPES may not be available. */
8947
- tree type = build_pointer_type (TREE_TYPE (fun));
8948
- rs6000_parm_needs_stack (args_so_far, type);
8949
+ gcc_assert (DECL_P (fun));
8950
+ result = DECL_RESULT (fun);
8953
+ result = TREE_TYPE (fntype);
8955
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
8956
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
8958
+ if (result && aggregate_value_p (result, fntype))
8960
+ if (!TYPE_P (result))
8961
+ result = TREE_TYPE (result);
8962
+ result = build_pointer_type (result);
8963
+ rs6000_parm_needs_stack (args_so_far, result);
8970
+ for (parm = DECL_ARGUMENTS (fun);
8971
+ parm && parm != void_list_node;
8972
+ parm = TREE_CHAIN (parm))
8973
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
8978
+ function_args_iterator args_iter;
8981
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
8982
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
8989
@@ -10537,7 +10695,7 @@
8990
all parameters in registers. */
8993
-rs6000_reg_parm_stack_space (tree fun)
8994
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
8996
int reg_parm_stack_space;
8998
@@ -10555,7 +10713,7 @@
9000
/* ??? Recomputing this every time is a bit expensive. Is there
9001
a place to cache this information? */
9002
- if (rs6000_function_parms_need_stack (fun))
9003
+ if (rs6000_function_parms_need_stack (fun, incoming))
9004
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
9006
reg_parm_stack_space = 0;
9007
@@ -13544,11 +13702,15 @@
9008
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
9009
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
9010
error ("Builtin function %s requires the -mhard-dfp and"
9011
- "-mpower8-vector options", name);
9012
+ " -mpower8-vector options", name);
9013
else if ((fnmask & RS6000_BTM_DFP) != 0)
9014
error ("Builtin function %s requires the -mhard-dfp option", name);
9015
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
9016
error ("Builtin function %s requires the -mpower8-vector option", name);
9017
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
9018
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
9019
+ error ("Builtin function %s requires the -mhard-float and"
9020
+ " -mlong-double-128 options", name);
9021
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
9022
error ("Builtin function %s requires the -mhard-float option", name);
9024
@@ -13649,8 +13811,8 @@
9025
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
9026
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
9028
- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
9029
- : (int) CODE_FOR_altivec_lvsl);
9030
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
9031
+ : (int) CODE_FOR_altivec_lvsl_direct);
9032
enum machine_mode tmode = insn_data[icode].operand[0].mode;
9033
enum machine_mode mode = insn_data[icode].operand[1].mode;
9035
@@ -13678,7 +13840,6 @@
9036
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
9037
target = gen_reg_rtx (tmode);
9039
- /*pat = gen_altivec_lvsr (target, op);*/
9040
pat = GEN_FCN (icode) (target, op);
9043
@@ -17099,7 +17260,14 @@
9044
prefer Altivec loads.. */
9045
if (rclass == VSX_REGS)
9047
- if (GET_MODE_SIZE (mode) <= 8)
9048
+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
9050
+ rtx addr = XEXP (x, 0);
9051
+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
9052
+ || legitimate_lo_sum_address_p (mode, addr, false))
9053
+ return FLOAT_REGS;
9055
+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
9058
if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
9059
@@ -31413,6 +31581,7 @@
9060
{ "htm", RS6000_BTM_HTM, false, false },
9061
{ "hard-dfp", RS6000_BTM_DFP, false, false },
9062
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
9063
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
9066
/* Option variables that we want to support inside attribute((target)) and
9067
@@ -32663,25 +32832,14 @@
9069
/* Return true if the peephole2 can combine a load involving a combination of
9070
an addis instruction and a load with an offset that can be fused together on
9075
- operands[0] register set with addis
9076
- operands[1] value set via addis
9077
- operands[2] target register being loaded
9078
- operands[3] D-form memory reference using operands[0].
9080
- In addition, we are passed a boolean that is true if this is a peephole2,
9081
- and we can use see if the addis_reg is dead after the insn and can be
9082
- replaced by the target register. */
9085
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
9086
+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
9087
+ rtx addis_value, /* addis value. */
9088
+ rtx target, /* target register that is loaded. */
9089
+ rtx mem) /* bottom part of the memory addr. */
9091
- rtx addis_reg = operands[0];
9092
- rtx addis_value = operands[1];
9093
- rtx target = operands[2];
9094
- rtx mem = operands[3];
9098
@@ -32695,9 +32853,6 @@
9099
if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
9102
- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
9105
/* Allow sign/zero extension. */
9106
if (GET_CODE (mem) == ZERO_EXTEND
9107
|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
9108
@@ -32706,22 +32861,22 @@
9112
+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
9115
addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
9116
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
9119
/* Validate that the register used to load the high value is either the
9120
- register being loaded, or we can safely replace its use in a peephole2.
9121
+ register being loaded, or we can safely replace its use.
9123
- If this is a peephole2, we assume that there are 2 instructions in the
9124
- peephole (addis and load), so we want to check if the target register was
9125
- not used in the memory address and the register to hold the addis result
9126
- is dead after the peephole. */
9127
+ This function is only called from the peephole2 pass and we assume that
9128
+ there are 2 instructions in the peephole (addis and load), so we want to
9129
+ check if the target register was not used in the memory address and the
9130
+ register to hold the addis result is dead after the peephole. */
9131
if (REGNO (addis_reg) != REGNO (target))
9136
if (reg_mentioned_p (target, mem))
9139
@@ -32762,9 +32917,6 @@
9140
enum machine_mode extend_mode = target_mode;
9141
enum machine_mode ptr_mode = Pmode;
9142
enum rtx_code extend = UNKNOWN;
9143
- rtx addis_reg = ((ptr_mode == target_mode)
9145
- : simplify_subreg (ptr_mode, target, target_mode, 0));
9147
if (GET_CODE (orig_mem) == ZERO_EXTEND
9148
|| (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
9149
@@ -32781,13 +32933,14 @@
9150
gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
9152
offset = XEXP (orig_addr, 1);
9153
- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
9154
- new_mem = change_address (orig_mem, target_mode, new_addr);
9155
+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
9156
+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
9158
if (extend != UNKNOWN)
9159
new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
9161
- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
9162
+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
9163
+ UNSPEC_FUSION_GPR);
9164
emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
9166
if (extend == SIGN_EXTEND)
9167
@@ -32806,55 +32959,40 @@
9170
/* Return a string to fuse an addis instruction with a gpr load to the same
9171
- register that we loaded up the addis instruction. The code is complicated,
9172
- so we call output_asm_insn directly, and just return "".
9173
+ register that we loaded up the addis instruction. The address that is used
9174
+ is the logical address that was formed during peephole2:
9175
+ (lo_sum (high) (low-part))
9178
- operands[0] register set with addis (must be same reg as target).
9179
- operands[1] value set via addis
9180
- operands[2] target register being loaded
9181
- operands[3] D-form memory reference using operands[0]. */
9182
+ The code is complicated, so we call output_asm_insn directly, and just
9186
-emit_fusion_gpr_load (rtx *operands)
9187
+emit_fusion_gpr_load (rtx target, rtx mem)
9189
- rtx addis_reg = operands[0];
9190
- rtx addis_value = operands[1];
9191
- rtx target = operands[2];
9192
- rtx mem = operands[3];
9197
const char *addis_str = NULL;
9198
const char *load_str = NULL;
9199
- const char *extend_insn = NULL;
9200
const char *mode_name = NULL;
9201
char insn_template[80];
9202
enum machine_mode mode;
9203
const char *comment_str = ASM_COMMENT_START;
9204
- bool sign_p = false;
9206
- gcc_assert (REG_P (addis_reg) && REG_P (target));
9207
- gcc_assert (REGNO (addis_reg) == REGNO (target));
9208
+ if (GET_CODE (mem) == ZERO_EXTEND)
9209
+ mem = XEXP (mem, 0);
9211
+ gcc_assert (REG_P (target) && MEM_P (mem));
9213
if (*comment_str == ' ')
9216
- /* Allow sign/zero extension. */
9217
- if (GET_CODE (mem) == ZERO_EXTEND)
9218
- mem = XEXP (mem, 0);
9220
- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
9223
- mem = XEXP (mem, 0);
9226
- gcc_assert (MEM_P (mem));
9227
addr = XEXP (mem, 0);
9228
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
9231
+ addis_value = XEXP (addr, 0);
9232
load_offset = XEXP (addr, 1);
9234
/* Now emit the load instruction to the same register. */
9235
@@ -32864,29 +33002,22 @@
9239
- extend_insn = "extsb %0,%0";
9243
mode_name = "short";
9245
- extend_insn = "extsh %0,%0";
9251
- extend_insn = "extsw %0,%0";
9255
- if (TARGET_POWERPC64)
9257
- mode_name = "long";
9261
- gcc_unreachable ();
9262
+ gcc_assert (TARGET_POWERPC64);
9263
+ mode_name = "long";
9268
@@ -33030,14 +33161,6 @@
9270
fatal_insn ("Unable to generate load offset for fusion", load_offset);
9272
- /* Handle sign extension. The peephole2 pass generates this as a separate
9273
- insn, but we handle it just in case it got reattached. */
9276
- gcc_assert (extend_insn != NULL);
9277
- output_asm_insn (extend_insn, fuse_ops);
9283
Index: gcc/config/rs6000/vsx.md
9284
===================================================================
9285
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
9286
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
9288
;; Iterator for the 2 64-bit vector types
9289
(define_mode_iterator VSX_D [V2DF V2DI])
9291
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
9292
+;; lxvd2x to properly handle swapping words on little endian
9293
+(define_mode_iterator VSX_LE [V2DF
9296
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
9298
;; Iterator for the 2 32-bit vector types
9299
(define_mode_iterator VSX_W [V4SF V4SI])
9312
-;; Map the register class used for float<->int conversions
9313
+;; Map the register class used for float<->int conversions (floating point side)
9314
+;; VSr2 is the preferred register class, VSr3 is any register class that will
9316
(define_mode_attr VSr2 [(V2DF "wd")
9323
(define_mode_attr VSr3 [(V2DF "wa")
9330
;; Map the register class for sp<->dp float conversions, destination
9331
(define_mode_attr VSr4 [(SF "ws")
9332
@@ -99,12 +113,27 @@
9336
-;; Map the register class for sp<->dp float conversions, destination
9337
+;; Map the register class for sp<->dp float conversions, source
9338
(define_mode_attr VSr5 [(SF "ws")
9343
+;; The VSX register class that a type can occupy, even if it is not the
9344
+;; preferred register class (VSr is the preferred register class that will get
9345
+;; allocated first).
9346
+(define_mode_attr VSa [(V16QI "wa")
9358
;; Same size integer type for floating point data
9359
(define_mode_attr VSi [(V4SF "v4si")
9361
@@ -200,6 +229,16 @@
9365
+;; Map register class for 64-bit element in 128-bit vector for direct moves
9367
+(define_mode_attr VS_64dm [(V2DF "wk")
9370
+;; Map register class for 64-bit element in 128-bit vector for normal register
9371
+;; to register moves
9372
+(define_mode_attr VS_64reg [(V2DF "ws")
9375
;; Constants for creating unspecs
9376
(define_c_enum "unspec"
9379
;; The patterns for LE permuted loads and stores come before the general
9380
;; VSX moves so they match first.
9381
(define_insn_and_split "*vsx_le_perm_load_<mode>"
9382
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
9383
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
9384
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
9385
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
9386
"!BYTES_BIG_ENDIAN && TARGET_VSX"
9388
"!BYTES_BIG_ENDIAN && TARGET_VSX"
9390
(set_attr "length" "8")])
9392
(define_insn_and_split "*vsx_le_perm_load_<mode>"
9393
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
9394
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
9395
(match_operand:VSX_W 1 "memory_operand" "Z"))]
9396
"!BYTES_BIG_ENDIAN && TARGET_VSX"
9399
(set_attr "length" "8")])
9401
(define_insn "*vsx_le_perm_store_<mode>"
9402
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
9403
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
9404
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
9405
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
9406
"!BYTES_BIG_ENDIAN && TARGET_VSX"
9408
[(set_attr "type" "vecstore")
9410
(set_attr "length" "12")])
9413
- [(set (match_operand:VSX_D 0 "memory_operand" "")
9414
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
9415
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
9416
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
9417
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
9421
;; The post-reload split requires that we re-permute the source
9422
;; register in case it is still live.
9424
- [(set (match_operand:VSX_D 0 "memory_operand" "")
9425
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
9426
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
9427
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
9428
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
9433
(define_insn "*vsx_le_perm_store_<mode>"
9434
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
9435
- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
9436
+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
9437
"!BYTES_BIG_ENDIAN && TARGET_VSX"
9439
[(set_attr "type" "vecstore")
9443
(define_insn "*vsx_mov<mode>"
9444
- [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?wa,?wa,wQ,?&r,??Y,??r,??r,<VSr>,?wa,*r,v,wZ, v")
9445
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
9446
+ [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ, v")
9447
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
9448
"VECTOR_MEM_VSX_P (<MODE>mode)
9449
&& (register_operand (operands[0], <MODE>mode)
9450
|| register_operand (operands[1], <MODE>mode))"
9452
;; instructions are now combined with the insn for the traditional floating
9454
(define_insn "*vsx_add<mode>3"
9455
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9456
- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9457
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9458
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9459
+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9460
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9461
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9462
"xvadd<VSs> %x0,%x1,%x2"
9463
[(set_attr "type" "<VStype_simple>")
9465
(set_attr "fp_type" "<VSfptype_simple>")])
9467
(define_insn "*vsx_sub<mode>3"
9468
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9469
- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9470
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9471
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9472
+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9473
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9474
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9475
"xvsub<VSs> %x0,%x1,%x2"
9476
[(set_attr "type" "<VStype_simple>")
9478
(set_attr "fp_type" "<VSfptype_simple>")])
9480
(define_insn "*vsx_mul<mode>3"
9481
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9482
- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9483
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9484
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9485
+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9486
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9487
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9488
"xvmul<VSs> %x0,%x1,%x2"
9489
[(set_attr "type" "<VStype_simple>")
9491
(set_attr "fp_type" "<VSfptype_mul>")])
9493
(define_insn "*vsx_div<mode>3"
9494
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9495
- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9496
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9497
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9498
+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9499
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9500
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9501
"xvdiv<VSs> %x0,%x1,%x2"
9502
[(set_attr "type" "<VStype_div>")
9505
(define_insn "*vsx_tdiv<mode>3_internal"
9506
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
9507
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
9508
- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
9509
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
9510
+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
9512
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9513
"x<VSv>tdiv<VSs> %0,%x1,%x2"
9515
(set_attr "fp_type" "<VSfptype_simple>")])
9517
(define_insn "vsx_fre<mode>2"
9518
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9519
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
9520
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9521
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
9523
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9526
(set_attr "fp_type" "<VSfptype_simple>")])
9528
(define_insn "*vsx_neg<mode>2"
9529
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9530
- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
9531
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9532
+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
9533
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9534
"xvneg<VSs> %x0,%x1"
9535
[(set_attr "type" "<VStype_simple>")
9537
(set_attr "fp_type" "<VSfptype_simple>")])
9539
(define_insn "*vsx_abs<mode>2"
9540
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9541
- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
9542
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9543
+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
9544
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9545
"xvabs<VSs> %x0,%x1"
9546
[(set_attr "type" "<VStype_simple>")
9547
@@ -780,10 +819,10 @@
9548
(set_attr "fp_type" "<VSfptype_simple>")])
9550
(define_insn "vsx_nabs<mode>2"
9551
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9552
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9555
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
9556
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
9557
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9558
"xvnabs<VSs> %x0,%x1"
9559
[(set_attr "type" "<VStype_simple>")
9561
(set_attr "fp_type" "<VSfptype_simple>")])
9563
(define_insn "vsx_smax<mode>3"
9564
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9565
- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9566
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9567
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9568
+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9569
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9570
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9571
"xvmax<VSs> %x0,%x1,%x2"
9572
[(set_attr "type" "<VStype_simple>")
9574
(set_attr "fp_type" "<VSfptype_simple>")])
9576
(define_insn "*vsx_smin<mode>3"
9577
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9578
- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9579
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9580
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9581
+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9582
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9583
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9584
"xvmin<VSs> %x0,%x1,%x2"
9585
[(set_attr "type" "<VStype_simple>")
9587
(set_attr "fp_type" "<VSfptype_simple>")])
9589
(define_insn "*vsx_sqrt<mode>2"
9590
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9591
- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
9592
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9593
+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
9594
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9595
"xvsqrt<VSs> %x0,%x1"
9596
[(set_attr "type" "<VStype_sqrt>")
9598
(set_attr "fp_type" "<VSfptype_sqrt>")])
9600
(define_insn "*vsx_rsqrte<mode>2"
9601
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9602
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
9603
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9604
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
9606
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9607
"xvrsqrte<VSs> %x0,%x1"
9610
(define_insn "*vsx_tsqrt<mode>2_internal"
9611
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
9612
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
9613
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
9615
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9616
"x<VSv>tsqrt<VSs> %0,%x1"
9617
@@ -865,11 +904,11 @@
9620
(define_insn "*vsx_fmav4sf4"
9621
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
9622
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
9624
- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
9625
- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
9626
- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
9627
+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
9628
+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
9629
+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
9630
"VECTOR_UNIT_VSX_P (V4SFmode)"
9632
xvmaddasp %x0,%x1,%x2
9633
@@ -880,11 +919,11 @@
9634
[(set_attr "type" "vecfloat")])
9636
(define_insn "*vsx_fmav2df4"
9637
- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
9638
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
9640
- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
9641
- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
9642
- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
9643
+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
9644
+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
9645
+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
9646
"VECTOR_UNIT_VSX_P (V2DFmode)"
9648
xvmaddadp %x0,%x1,%x2
9649
@@ -894,12 +933,12 @@
9650
[(set_attr "type" "vecdouble")])
9652
(define_insn "*vsx_fms<mode>4"
9653
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
9654
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
9656
- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
9657
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
9658
+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
9659
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
9661
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
9662
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
9663
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9665
xvmsuba<VSs> %x0,%x1,%x2
9666
@@ -909,12 +948,12 @@
9667
[(set_attr "type" "<VStype_mul>")])
9669
(define_insn "*vsx_nfma<mode>4"
9670
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
9671
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
9674
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
9675
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
9676
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
9677
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
9678
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
9679
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
9680
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9682
xvnmadda<VSs> %x0,%x1,%x2
9685
;; Vector conditional expressions (no scalar version for these instructions)
9686
(define_insn "vsx_eq<mode>"
9687
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9688
- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9689
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9690
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9691
+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9692
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9693
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9694
"xvcmpeq<VSs> %x0,%x1,%x2"
9695
[(set_attr "type" "<VStype_simple>")
9696
@@ -968,9 +1007,9 @@
9697
(set_attr "fp_type" "<VSfptype_simple>")])
9699
(define_insn "vsx_gt<mode>"
9700
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9701
- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9702
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9703
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9704
+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9705
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9706
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9707
"xvcmpgt<VSs> %x0,%x1,%x2"
9708
[(set_attr "type" "<VStype_simple>")
9709
@@ -977,9 +1016,9 @@
9710
(set_attr "fp_type" "<VSfptype_simple>")])
9712
(define_insn "*vsx_ge<mode>"
9713
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9714
- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9715
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
9716
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9717
+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9718
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
9719
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9720
"xvcmpge<VSs> %x0,%x1,%x2"
9721
[(set_attr "type" "<VStype_simple>")
9722
@@ -990,10 +1029,10 @@
9723
(define_insn "*vsx_eq_<mode>_p"
9726
- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
9727
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
9728
+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
9729
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
9731
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9732
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9733
(eq:VSX_F (match_dup 1)
9735
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9736
@@ -1003,10 +1042,10 @@
9737
(define_insn "*vsx_gt_<mode>_p"
9740
- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
9741
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
9742
+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
9743
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
9745
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9746
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9747
(gt:VSX_F (match_dup 1)
9749
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9750
@@ -1016,10 +1055,10 @@
9751
(define_insn "*vsx_ge_<mode>_p"
9754
- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
9755
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
9756
+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
9757
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
9759
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9760
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9761
(ge:VSX_F (match_dup 1)
9763
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9764
@@ -1028,23 +1067,23 @@
9767
(define_insn "*vsx_xxsel<mode>"
9768
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
9769
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9771
- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
9772
+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
9773
(match_operand:VSX_L 4 "zero_constant" ""))
9774
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
9775
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
9776
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
9777
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
9778
"VECTOR_MEM_VSX_P (<MODE>mode)"
9779
"xxsel %x0,%x3,%x2,%x1"
9780
[(set_attr "type" "vecperm")])
9782
(define_insn "*vsx_xxsel<mode>_uns"
9783
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
9784
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9786
- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
9787
+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
9788
(match_operand:VSX_L 4 "zero_constant" ""))
9789
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
9790
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
9791
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
9792
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
9793
"VECTOR_MEM_VSX_P (<MODE>mode)"
9794
"xxsel %x0,%x3,%x2,%x1"
9795
[(set_attr "type" "vecperm")])
9796
@@ -1051,10 +1090,10 @@
9799
(define_insn "vsx_copysign<mode>3"
9800
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9801
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9803
- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
9804
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
9805
+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
9806
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
9808
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9809
"xvcpsgn<VSs> %x0,%x2,%x1"
9810
@@ -1067,7 +1106,7 @@
9811
;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
9812
;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
9813
(define_insn "vsx_float<VSi><mode>2"
9814
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
9815
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
9816
(float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
9817
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9818
"x<VSv>cvsx<VSc><VSs> %x0,%x1"
9819
@@ -1075,7 +1114,7 @@
9820
(set_attr "fp_type" "<VSfptype_simple>")])
9822
(define_insn "vsx_floatuns<VSi><mode>2"
9823
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
9824
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
9825
(unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
9826
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9827
"x<VSv>cvux<VSc><VSs> %x0,%x1"
9828
@@ -1084,7 +1123,7 @@
9830
(define_insn "vsx_fix_trunc<mode><VSi>2"
9831
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
9832
- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
9833
+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
9834
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9835
"x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
9836
[(set_attr "type" "<VStype_simple>")
9837
@@ -1092,7 +1131,7 @@
9839
(define_insn "vsx_fixuns_trunc<mode><VSi>2"
9840
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
9841
- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
9842
+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
9843
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9844
"x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
9845
[(set_attr "type" "<VStype_simple>")
9846
@@ -1100,8 +1139,8 @@
9848
;; Math rounding functions
9849
(define_insn "vsx_x<VSv>r<VSs>i"
9850
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
9851
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
9852
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9853
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
9854
UNSPEC_VSX_ROUND_I))]
9855
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9856
"x<VSv>r<VSs>i %x0,%x1"
9857
@@ -1109,8 +1148,8 @@
9858
(set_attr "fp_type" "<VSfptype_simple>")])
9860
(define_insn "vsx_x<VSv>r<VSs>ic"
9861
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
9862
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
9863
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9864
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
9865
UNSPEC_VSX_ROUND_IC))]
9866
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9867
"x<VSv>r<VSs>ic %x0,%x1"
9868
@@ -1118,8 +1157,8 @@
9869
(set_attr "fp_type" "<VSfptype_simple>")])
9871
(define_insn "vsx_btrunc<mode>2"
9872
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9873
- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
9874
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9875
+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
9876
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9877
"xvr<VSs>iz %x0,%x1"
9878
[(set_attr "type" "<VStype_simple>")
9879
@@ -1126,8 +1165,8 @@
9880
(set_attr "fp_type" "<VSfptype_simple>")])
9882
(define_insn "*vsx_b2trunc<mode>2"
9883
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
9884
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
9885
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9886
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
9888
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9889
"x<VSv>r<VSs>iz %x0,%x1"
9890
@@ -1135,8 +1174,8 @@
9891
(set_attr "fp_type" "<VSfptype_simple>")])
9893
(define_insn "vsx_floor<mode>2"
9894
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9895
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
9896
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9897
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
9899
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9900
"xvr<VSs>im %x0,%x1"
9901
@@ -1144,8 +1183,8 @@
9902
(set_attr "fp_type" "<VSfptype_simple>")])
9904
(define_insn "vsx_ceil<mode>2"
9905
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
9906
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
9907
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9908
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
9910
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9911
"xvr<VSs>ip %x0,%x1"
9912
@@ -1160,8 +1199,8 @@
9913
;; scalar single precision instructions internally use the double format.
9914
;; Prefer the altivec registers, since we likely will need to do a vperm
9915
(define_insn "vsx_<VS_spdp_insn>"
9916
- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
9917
- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
9918
+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
9919
+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
9920
UNSPEC_VSX_CVSPDP))]
9921
"VECTOR_UNIT_VSX_P (<MODE>mode)"
9922
"<VS_spdp_insn> %x0,%x1"
9923
@@ -1169,8 +1208,8 @@
9925
;; xscvspdp, represent the scalar SF type as V4SF
9926
(define_insn "vsx_xscvspdp"
9927
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
9928
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
9929
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
9930
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
9931
UNSPEC_VSX_CVSPDP))]
9932
"VECTOR_UNIT_VSX_P (V4SFmode)"
9934
@@ -1197,7 +1236,7 @@
9936
;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
9937
(define_insn "vsx_xscvdpspn"
9938
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
9939
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
9940
(unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
9941
UNSPEC_VSX_CVDPSPN))]
9943
@@ -1205,8 +1244,8 @@
9944
[(set_attr "type" "fp")])
9946
(define_insn "vsx_xscvspdpn"
9947
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
9948
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
9949
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
9950
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
9951
UNSPEC_VSX_CVSPDPN))]
9954
@@ -1213,8 +1252,8 @@
9955
[(set_attr "type" "fp")])
9957
(define_insn "vsx_xscvdpspn_scalar"
9958
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
9959
- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
9960
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
9961
+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
9962
UNSPEC_VSX_CVDPSPN))]
9965
@@ -1302,10 +1341,10 @@
9966
;; since the xsrdpiz instruction does not truncate the value if the floating
9967
;; point value is < LONG_MIN or > LONG_MAX.
9968
(define_insn "*vsx_float_fix_<mode>2"
9969
- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
9970
+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9973
- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
9974
+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
9975
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
9976
&& VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
9977
&& !flag_trapping_math && TARGET_FRIZ"
9978
@@ -1318,10 +1357,10 @@
9980
;; Build a V2DF/V2DI vector from two scalars
9981
(define_insn "vsx_concat_<mode>"
9982
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
9983
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
9985
- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
9986
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
9987
+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
9988
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
9989
"VECTOR_MEM_VSX_P (<MODE>mode)"
9991
if (BYTES_BIG_ENDIAN)
9992
@@ -1352,9 +1391,9 @@
9993
;; xxpermdi for little endian loads and stores. We need several of
9994
;; these since the form of the PARALLEL differs by mode.
9995
(define_insn "*vsx_xxpermdi2_le_<mode>"
9996
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
9998
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
9999
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
10000
+ (vec_select:VSX_LE
10001
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
10002
(parallel [(const_int 1) (const_int 0)])))]
10003
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
10004
"xxpermdi %x0,%x1,%x1,2"
10005
@@ -1361,9 +1400,9 @@
10006
[(set_attr "type" "vecperm")])
10008
(define_insn "*vsx_xxpermdi4_le_<mode>"
10009
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
10010
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
10012
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
10013
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
10014
(parallel [(const_int 2) (const_int 3)
10015
(const_int 0) (const_int 1)])))]
10016
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
10017
@@ -1401,9 +1440,9 @@
10018
;; lxvd2x for little endian loads. We need several of
10019
;; these since the form of the PARALLEL differs by mode.
10020
(define_insn "*vsx_lxvd2x2_le_<mode>"
10021
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
10022
- (vec_select:VSX_D
10023
- (match_operand:VSX_D 1 "memory_operand" "Z")
10024
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
10025
+ (vec_select:VSX_LE
10026
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
10027
(parallel [(const_int 1) (const_int 0)])))]
10028
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
10030
@@ -1410,7 +1449,7 @@
10031
[(set_attr "type" "vecload")])
10033
(define_insn "*vsx_lxvd2x4_le_<mode>"
10034
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
10035
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
10037
(match_operand:VSX_W 1 "memory_operand" "Z")
10038
(parallel [(const_int 2) (const_int 3)
10039
@@ -1450,9 +1489,9 @@
10040
;; stxvd2x for little endian stores. We need several of
10041
;; these since the form of the PARALLEL differs by mode.
10042
(define_insn "*vsx_stxvd2x2_le_<mode>"
10043
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
10044
- (vec_select:VSX_D
10045
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
10046
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
10047
+ (vec_select:VSX_LE
10048
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
10049
(parallel [(const_int 1) (const_int 0)])))]
10050
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
10052
@@ -1461,7 +1500,7 @@
10053
(define_insn "*vsx_stxvd2x4_le_<mode>"
10054
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
10056
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
10057
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
10058
(parallel [(const_int 2) (const_int 3)
10059
(const_int 0) (const_int 1)])))]
10060
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
10061
@@ -1513,11 +1552,12 @@
10063
;; Set the element of a V2DI/VD2F mode
10064
(define_insn "vsx_set_<mode>"
10065
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
10066
- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
10067
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
10068
- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
10069
- UNSPEC_VSX_SET))]
10070
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
10072
+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
10073
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
10074
+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
10075
+ UNSPEC_VSX_SET))]
10076
"VECTOR_MEM_VSX_P (<MODE>mode)"
10078
int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
10079
@@ -1582,7 +1622,7 @@
10080
(define_insn_and_split "vsx_extract_v4sf"
10081
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
10083
- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
10084
+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
10085
(parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
10086
(clobber (match_scratch:V4SF 3 "=X,0"))]
10087
"VECTOR_UNIT_VSX_P (V4SFmode)"
10088
@@ -1606,7 +1646,7 @@
10090
if (GET_CODE (op3) == SCRATCH)
10091
op3 = gen_reg_rtx (V4SFmode);
10092
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
10093
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
10096
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
10097
@@ -1765,9 +1805,9 @@
10100
(define_insn "vsx_splat_<mode>"
10101
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
10102
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
10103
(vec_duplicate:VSX_D
10104
- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
10105
+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
10106
"VECTOR_MEM_VSX_P (<MODE>mode)"
10108
xxpermdi %x0,%x1,%x1,0
10109
@@ -1780,10 +1820,10 @@
10112
(define_insn "vsx_xxspltw_<mode>"
10113
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
10114
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
10115
(vec_duplicate:VSX_W
10116
(vec_select:<VS_scalar>
10117
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
10118
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
10120
[(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
10121
"VECTOR_MEM_VSX_P (<MODE>mode)"
10122
@@ -1796,8 +1836,8 @@
10123
[(set_attr "type" "vecperm")])
10125
(define_insn "vsx_xxspltw_<mode>_direct"
10126
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
10127
- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
10128
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
10129
+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
10130
(match_operand:QI 2 "u5bit_cint_operand" "i,i")]
10131
UNSPEC_VSX_XXSPLTW))]
10132
"VECTOR_MEM_VSX_P (<MODE>mode)"
10133
@@ -1806,11 +1846,11 @@
10135
;; V4SF/V4SI interleave
10136
(define_insn "vsx_xxmrghw_<mode>"
10137
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
10138
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
10140
(vec_concat:<VS_double>
10141
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
10142
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
10143
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
10144
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
10145
(parallel [(const_int 0) (const_int 4)
10146
(const_int 1) (const_int 5)])))]
10147
"VECTOR_MEM_VSX_P (<MODE>mode)"
10148
@@ -1823,11 +1863,11 @@
10149
[(set_attr "type" "vecperm")])
10151
(define_insn "vsx_xxmrglw_<mode>"
10152
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
10153
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
10155
(vec_concat:<VS_double>
10156
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
10157
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
10158
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
10159
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
10160
(parallel [(const_int 2) (const_int 6)
10161
(const_int 3) (const_int 7)])))]
10162
"VECTOR_MEM_VSX_P (<MODE>mode)"
10163
@@ -1841,9 +1881,9 @@
10165
;; Shift left double by word immediate
10166
(define_insn "vsx_xxsldwi_<mode>"
10167
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
10168
- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
10169
- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
10170
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
10171
+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
10172
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
10173
(match_operand:QI 3 "u5bit_cint_operand" "i")]
10174
UNSPEC_VSX_SLDWI))]
10175
"VECTOR_MEM_VSX_P (<MODE>mode)"
10176
@@ -1924,7 +1964,7 @@
10177
;; to the top element of the V2DF array without doing an extract.
10179
(define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
10180
- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
10181
+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
10185
Index: gcc/config/rs6000/rs6000.h
10186
===================================================================
10187
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
10188
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
10189
@@ -1438,6 +1438,10 @@
10190
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
10191
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
10192
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
10193
+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
10194
+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
10195
+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
10196
+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
10197
RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
10198
RS6000_CONSTRAINT_wm, /* VSX register for direct move */
10199
RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
10200
@@ -1462,6 +1466,9 @@
10201
#define VSX_REG_CLASS_P(CLASS) \
10202
((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
10204
+/* Return whether a given register class targets general purpose registers. */
10205
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
10207
/* Given an rtx X being reloaded into a reg required to be
10208
in class CLASS, return the class of reg to actually use.
10209
In general this is just CLASS; but on some machines
10210
@@ -1593,8 +1600,15 @@
10211
/* Define this if stack space is still allocated for a parameter passed
10212
in a register. The value is the number of bytes allocated to this
10214
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
10215
+#define REG_PARM_STACK_SPACE(FNDECL) \
10216
+ rs6000_reg_parm_stack_space ((FNDECL), false)
10218
+/* Define this macro if space guaranteed when compiling a function body
10219
+ is different to space required when making a call, a situation that
10220
+ can arise with K&R style function definitions. */
10221
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
10222
+ rs6000_reg_parm_stack_space ((FNDECL), true)
10224
/* Define this if the above stack space is to be considered part of the
10225
space allocated by the caller. */
10226
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
10227
@@ -2483,8 +2497,8 @@
10228
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
10230
/* Builtin targets. For now, we reuse the masks for those options that are in
10231
- target flags, and pick two random bits for SPE and paired which aren't in
10233
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
10234
+ aren't in target_flags. */
10235
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
10236
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
10237
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
10238
@@ -2501,6 +2515,7 @@
10239
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
10240
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
10241
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
10242
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
10244
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
10246
@@ -2514,7 +2529,8 @@
10247
| RS6000_BTM_POPCNTD \
10248
| RS6000_BTM_CELL \
10250
- | RS6000_BTM_HARD_FLOAT)
10251
+ | RS6000_BTM_HARD_FLOAT \
10252
+ | RS6000_BTM_LDBL128)
10254
/* Define builtin enum index. */
10256
Index: gcc/config/rs6000/altivec.md
10257
===================================================================
10258
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release)
10259
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
10260
@@ -2297,7 +2297,31 @@
10262
[(set_attr "type" "vecsimple")])
10264
-(define_insn "altivec_lvsl"
10265
+(define_expand "altivec_lvsl"
10266
+ [(use (match_operand:V16QI 0 "register_operand" ""))
10267
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
10270
+ if (VECTOR_ELT_ORDER_BIG)
10271
+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
10275
+ rtx mask, perm[16], constv, vperm;
10276
+ mask = gen_reg_rtx (V16QImode);
10277
+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
10278
+ for (i = 0; i < 16; ++i)
10279
+ perm[i] = GEN_INT (i);
10280
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
10281
+ constv = force_reg (V16QImode, constv);
10282
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
10284
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
10289
+(define_insn "altivec_lvsl_direct"
10290
[(set (match_operand:V16QI 0 "register_operand" "=v")
10291
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
10293
@@ -2305,7 +2329,31 @@
10295
[(set_attr "type" "vecload")])
10297
-(define_insn "altivec_lvsr"
10298
+(define_expand "altivec_lvsr"
10299
+ [(use (match_operand:V16QI 0 "register_operand" ""))
10300
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
10303
+ if (VECTOR_ELT_ORDER_BIG)
10304
+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
10308
+ rtx mask, perm[16], constv, vperm;
10309
+ mask = gen_reg_rtx (V16QImode);
10310
+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
10311
+ for (i = 0; i < 16; ++i)
10312
+ perm[i] = GEN_INT (i);
10313
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
10314
+ constv = force_reg (V16QImode, constv);
10315
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
10317
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
10322
+(define_insn "altivec_lvsr_direct"
10323
[(set (match_operand:V16QI 0 "register_operand" "=v")
10324
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
10326
Index: gcc/config/rs6000/rs6000.md
10327
===================================================================
10328
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
10329
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
10330
@@ -134,6 +134,7 @@
10331
UNSPEC_UNPACK_128BIT
10334
+ UNSPEC_FUSION_GPR
10338
@@ -317,8 +318,25 @@
10339
(define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
10341
; Definitions for 32-bit fpr direct move
10342
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
10343
+; At present, the decimal modes are not allowed in the traditional altivec
10344
+; registers, so restrict the constraints to just the traditional FPRs.
10345
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
10347
+; Definitions for 32-bit VSX
10348
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
10350
+; Definitions for 32-bit use of altivec registers
10351
+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
10353
+; Definitions for 64-bit VSX
10354
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
10356
+; Definitions for 64-bit direct move
10357
+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
10359
+; Definitions for 64-bit use of altivec registers
10360
+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
10362
; These modes do not fit in integer registers in 32-bit mode.
10363
; but on e500v2, the gpr are 64 bit registers
10364
(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
10365
@@ -424,7 +442,7 @@
10368
;; Mode attribute for boolean operation register constraints for output
10369
-(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
10370
+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
10372
(V16QI "wa,v,&?r,?r,?r")
10373
(V8HI "wa,v,&?r,?r,?r")
10374
@@ -435,7 +453,7 @@
10375
(V1TI "wa,v,&?r,?r,?r")])
10377
;; Mode attribute for boolean operation register constraints for operand1
10378
-(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
10379
+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
10381
(V16QI "wa,v,r,0,r")
10382
(V8HI "wa,v,r,0,r")
10383
@@ -446,7 +464,7 @@
10384
(V1TI "wa,v,r,0,r")])
10386
;; Mode attribute for boolean operation register constraints for operand2
10387
-(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
10388
+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
10390
(V16QI "wa,v,r,r,0")
10391
(V8HI "wa,v,r,r,0")
10392
@@ -459,7 +477,7 @@
10393
;; Mode attribute for boolean operation register constraints for operand1
10394
;; for one_cmpl. To simplify things, we repeat the constraint where 0
10395
;; is used for operand1 or operand2
10396
-(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
10397
+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
10399
(V16QI "wa,v,r,0,0")
10400
(V8HI "wa,v,r,0,0")
10401
@@ -566,7 +584,7 @@
10404
(define_insn "*zero_extendsidi2_lfiwzx"
10405
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
10406
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
10407
(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
10408
"TARGET_POWERPC64 && TARGET_LFIWZX"
10410
@@ -736,8 +754,8 @@
10413
(define_insn "*extendsidi2_lfiwax"
10414
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
10415
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
10416
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
10417
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
10418
"TARGET_POWERPC64 && TARGET_LFIWAX"
10421
@@ -760,7 +778,7 @@
10423
(define_insn "*extendsidi2_nocell"
10424
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
10425
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
10426
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
10427
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
10430
@@ -5614,7 +5632,7 @@
10431
; We don't define lfiwax/lfiwzx with the normal definition, because we
10432
; don't want to support putting SImode in FPR registers.
10433
(define_insn "lfiwax"
10434
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
10435
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
10436
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
10438
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
10439
@@ -5694,7 +5712,7 @@
10440
(set_attr "type" "fpload")])
10442
(define_insn "lfiwzx"
10443
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
10444
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
10445
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
10447
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
10448
@@ -9210,8 +9228,8 @@
10451
(define_insn "mov<mode>_hardfloat"
10452
- [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,wa,wa,<f32_lr>,<f32_sm>,wu,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
10453
- (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,wa,j,<f32_lm>,<f32_sr>,Z,wu,r,<f32_dm>,r,h,0,G,Fn"))]
10454
+ [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,<f32_vsx>,<f32_vsx>,<f32_lr>,<f32_sm>,<f32_av>,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
10455
+ (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,<f32_vsx>,j,<f32_lm>,<f32_sr>,Z,<f32_av>,r,<f32_dm>,r, h, 0, G,Fn"))]
10456
"(gpc_reg_operand (operands[0], <MODE>mode)
10457
|| gpc_reg_operand (operands[1], <MODE>mode))
10458
&& (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
10459
@@ -9422,8 +9440,8 @@
10462
(define_insn "*mov<mode>_hardfloat32"
10463
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
10464
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
10465
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
10466
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
10467
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
10468
&& (gpc_reg_operand (operands[0], <MODE>mode)
10469
|| gpc_reg_operand (operands[1], <MODE>mode))"
10470
@@ -9491,8 +9509,8 @@
10471
; ld/std require word-aligned displacements -> 'Y' constraint.
10472
; List Y->r and r->Y before r->r for reload.
10473
(define_insn "*mov<mode>_hardfloat64"
10474
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,wm")
10475
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,r,h,0,G,H,F,wg,r,wm,r"))]
10476
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,<f64_dm>")
10477
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,r,h,0,G,H,F,wg,r,<f64_dm>,r"))]
10478
"TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
10479
&& (gpc_reg_operand (operands[0], <MODE>mode)
10480
|| gpc_reg_operand (operands[1], <MODE>mode))"
10481
@@ -10272,8 +10290,8 @@
10482
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
10484
(define_insn "*movdi_internal64"
10485
- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
10486
- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
10487
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
10488
+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
10490
&& (gpc_reg_operand (operands[0], DImode)
10491
|| gpc_reg_operand (operands[1], DImode))"
10492
@@ -10293,7 +10311,8 @@
10498
+ xxlxor %x0,%x0,%x0"
10499
[(set_attr_alternative "type"
10501
(match_test "update_indexed_address_mem (operands[0], VOIDmode)")
10502
@@ -10334,8 +10353,9 @@
10503
(const_string "mftgpr")
10504
(const_string "mffgpr")
10505
(const_string "mftgpr")
10506
- (const_string "mffgpr")])
10507
- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
10508
+ (const_string "mffgpr")
10509
+ (const_string "vecsimple")])
10510
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
10512
;; immediate value valid for a single instruction hiding in a const_double
10514
@@ -15751,23 +15771,10 @@
10515
;; a GPR. The addis instruction must be adjacent to the load, and use the same
10516
;; register that is being loaded. The fused ops must be physically adjacent.
10518
-;; We use define_peephole for the actual addis/load, and the register used to
10519
-;; hold the addis value must be the same as the register being loaded. We use
10520
-;; define_peephole2 to change the register used for addis to be the register
10521
-;; being loaded, since we can look at whether it is dead after the load insn.
10522
+;; Find cases where the addis that feeds into a load instruction is either used
10523
+;; once or is the same as the target register, and replace it with the fusion
10527
- [(set (match_operand:P 0 "base_reg_operand" "")
10528
- (match_operand:P 1 "fusion_gpr_addis" ""))
10529
- (set (match_operand:INT1 2 "base_reg_operand" "")
10530
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
10531
- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
10533
- return emit_fusion_gpr_load (operands);
10535
- [(set_attr "type" "load")
10536
- (set_attr "length" "8")])
10539
[(set (match_operand:P 0 "base_reg_operand" "")
10540
(match_operand:P 1 "fusion_gpr_addis" ""))
10541
@@ -15774,9 +15781,8 @@
10542
(set (match_operand:INT1 2 "base_reg_operand" "")
10543
(match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
10545
- && (REGNO (operands[0]) != REGNO (operands[2])
10546
- || GET_CODE (operands[3]) == SIGN_EXTEND)
10547
- && fusion_gpr_load_p (operands, true)"
10548
+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
10552
expand_fusion_gpr_load (operands);
10553
@@ -15783,6 +15789,20 @@
10557
+;; Fusion insn, created by the define_peephole2 above (and eventually by
10560
+(define_insn "fusion_gpr_load_<mode>"
10561
+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
10562
+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
10563
+ UNSPEC_FUSION_GPR))]
10564
+ "TARGET_P8_FUSION"
10566
+ return emit_fusion_gpr_load (operands[0], operands[1]);
10568
+ [(set_attr "type" "load")
10569
+ (set_attr "length" "8")])
10572
;; Miscellaneous ISA 2.06 (power7) instructions
10573
(define_insn "addg6s"
10574
@@ -15847,26 +15867,6 @@
10578
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
10579
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
10582
-(define_expand "unpacktf_0"
10583
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
10584
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
10586
- UNSPEC_UNPACK_128BIT))]
10590
-(define_expand "unpacktf_1"
10591
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
10592
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
10594
- UNSPEC_UNPACK_128BIT))]
10598
(define_insn_and_split "unpack<mode>_dm"
10599
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
10601
Index: gcc/config/rs6000/sysv4.h
10602
===================================================================
10603
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release)
10604
+++ b/src/gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch)
10605
@@ -292,7 +292,7 @@
10606
/* An expression for the alignment of a structure field FIELD if the
10607
alignment computed in the usual way is COMPUTED. */
10608
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
10609
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
10610
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
10613
#undef BIGGEST_FIELD_ALIGNMENT
10614
@@ -949,3 +949,27 @@
10615
#define TARGET_USES_SYSV4_OPT 1
10617
#undef DBX_REGISTER_NUMBER
10619
+/* Link -lasan early on the command line. For -static-libasan, don't link
10620
+ it for -shared link, the executable should be compiled with -static-libasan
10621
+ in that case, and for executable link link with --{,no-}whole-archive around
10622
+ it to force everything into the executable. And similarly for -ltsan. */
10623
+#if defined(HAVE_LD_STATIC_DYNAMIC)
10624
+#undef LIBASAN_EARLY_SPEC
10625
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
10626
+ "%{static-libasan:%{!shared:" \
10627
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
10628
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
10629
+#undef LIBTSAN_EARLY_SPEC
10630
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
10631
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
10632
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
10635
+/* Additional libraries needed by -static-libasan. */
10636
+#undef STATIC_LIBASAN_LIBS
10637
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
10639
+/* Additional libraries needed by -static-libtsan. */
10640
+#undef STATIC_LIBTSAN_LIBS
10641
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
10642
Index: gcc/config/arm/arm.c
10643
===================================================================
10644
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
10645
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
10647
static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
10648
static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
10649
inline static int thumb1_index_register_rtx_p (rtx, int);
10650
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
10651
static int thumb_far_jump_used_p (void);
10652
static bool thumb_force_lr_save (void);
10653
static unsigned arm_size_return_regs (void);
10654
@@ -24476,9 +24475,13 @@
10655
fputs (":\n", file);
10658
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
10659
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
10660
rtx tem = XEXP (DECL_RTL (function), 0);
10661
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
10662
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
10663
+ pipeline offset is four rather than eight. Adjust the offset
10665
+ tem = plus_constant (GET_MODE (tem), tem,
10666
+ TARGET_THUMB1_ONLY ? -3 : -7);
10667
tem = gen_rtx_MINUS (GET_MODE (tem),
10669
gen_rtx_SYMBOL_REF (Pmode,
10670
@@ -27462,4 +27465,13 @@
10674
+/* return TRUE if x is a reference to a value in a constant pool */
10676
+arm_is_constant_pool_ref (rtx x)
10678
+ return (MEM_P (x)
10679
+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
10680
+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
10683
#include "gt-arm.h"
10684
Index: gcc/config/arm/arm-protos.h
10685
===================================================================
10686
--- a/src/gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release)
10687
+++ b/src/gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch)
10689
extern int legitimate_pic_operand_p (rtx);
10690
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
10691
extern rtx legitimize_tls_address (rtx, rtx);
10692
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
10693
extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
10694
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
10695
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
10696
@@ -286,4 +287,6 @@
10698
extern void arm_emit_eabi_attribute (const char *, int, int);
10700
+extern bool arm_is_constant_pool_ref (rtx);
10702
#endif /* ! GCC_ARM_PROTOS_H */
10703
Index: gcc/config/arm/constraints.md
10704
===================================================================
10705
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
10706
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
10708
;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
10710
;; The following memory constraints have been used:
10711
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
10712
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
10713
;; in ARM state: Uq
10714
;; in Thumb state: Uu, Uw
10716
@@ -310,6 +310,12 @@
10717
An address valid for loading/storing register exclusive"
10718
(match_operand 0 "mem_noofs_operand"))
10720
+(define_memory_constraint "Uh"
10722
+ An address suitable for byte and half-word loads which does not point inside a constant pool"
10723
+ (and (match_code "mem")
10724
+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
10726
(define_memory_constraint "Ut"
10728
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
10729
@@ -356,7 +362,8 @@
10730
(and (match_code "mem")
10731
(match_test "TARGET_ARM
10732
&& arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
10733
- SIGN_EXTEND, 0)")))
10735
+ && !arm_is_constant_pool_ref (op)")))
10737
(define_memory_constraint "Q"
10739
Index: gcc/config/arm/arm.md
10740
===================================================================
10741
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
10742
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
10743
@@ -4047,7 +4047,7 @@
10744
(define_insn "unaligned_loadhis"
10745
[(set (match_operand:SI 0 "s_register_operand" "=l,r")
10747
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
10748
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
10749
UNSPEC_UNALIGNED_LOAD)))]
10750
"unaligned_access && TARGET_32BIT"
10751
"ldr%(sh%)\t%0, %1\t@ unaligned"
10752
@@ -4655,7 +4655,7 @@
10754
(define_insn "*arm_zero_extendhisi2_v6"
10755
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
10756
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
10757
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
10758
"TARGET_ARM && arm_arch6"
10761
@@ -4748,7 +4748,7 @@
10763
(define_insn "*arm_zero_extendqisi2_v6"
10764
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
10765
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
10766
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
10767
"TARGET_ARM && arm_arch6"
10770
@@ -4980,7 +4980,7 @@
10772
(define_insn "*arm_extendhisi2"
10773
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
10774
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
10775
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
10776
"TARGET_ARM && arm_arch4 && !arm_arch6"
10779
@@ -4987,23 +4987,19 @@
10780
ldr%(sh%)\\t%0, %1"
10781
[(set_attr "length" "8,4")
10782
(set_attr "type" "alu_shift,load_byte")
10783
- (set_attr "predicable" "yes")
10784
- (set_attr "pool_range" "*,256")
10785
- (set_attr "neg_pool_range" "*,244")]
10786
+ (set_attr "predicable" "yes")]
10789
;; ??? Check Thumb-2 pool range
10790
(define_insn "*arm_extendhisi2_v6"
10791
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
10792
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
10793
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
10794
"TARGET_32BIT && arm_arch6"
10797
ldr%(sh%)\\t%0, %1"
10798
[(set_attr "type" "simple_alu_shift,load_byte")
10799
- (set_attr "predicable" "yes")
10800
- (set_attr "pool_range" "*,256")
10801
- (set_attr "neg_pool_range" "*,244")]
10802
+ (set_attr "predicable" "yes")]
10805
(define_insn "*arm_extendhisi2addsi"
10806
@@ -5045,9 +5041,7 @@
10807
"TARGET_ARM && arm_arch4"
10808
"ldr%(sb%)\\t%0, %1"
10809
[(set_attr "type" "load_byte")
10810
- (set_attr "predicable" "yes")
10811
- (set_attr "pool_range" "256")
10812
- (set_attr "neg_pool_range" "244")]
10813
+ (set_attr "predicable" "yes")]
10816
(define_expand "extendqisi2"
10817
@@ -5087,9 +5081,7 @@
10818
ldr%(sb%)\\t%0, %1"
10819
[(set_attr "length" "8,4")
10820
(set_attr "type" "alu_shift,load_byte")
10821
- (set_attr "predicable" "yes")
10822
- (set_attr "pool_range" "*,256")
10823
- (set_attr "neg_pool_range" "*,244")]
10824
+ (set_attr "predicable" "yes")]
10827
(define_insn "*arm_extendqisi_v6"
10828
@@ -5101,9 +5093,7 @@
10830
ldr%(sb%)\\t%0, %1"
10831
[(set_attr "type" "simple_alu_shift,load_byte")
10832
- (set_attr "predicable" "yes")
10833
- (set_attr "pool_range" "*,256")
10834
- (set_attr "neg_pool_range" "*,244")]
10835
+ (set_attr "predicable" "yes")]
10838
(define_insn "*arm_extendqisi2addsi"
10839
@@ -7630,12 +7620,13 @@
10841
(define_insn "*arm_cmpdi_unsigned"
10842
[(set (reg:CC_CZ CC_REGNUM)
10843
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
10844
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
10845
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
10846
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
10848
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
10849
[(set_attr "conds" "set")
10850
- (set_attr "length" "8")]
10851
+ (set_attr "arch" "a,t2")
10852
+ (set_attr "length" "8,10")]
10855
(define_insn "*arm_cmpdi_zero"
10856
Index: gcc/config/arm/t-rtems-eabi
10857
===================================================================
10858
--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release)
10859
+++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch)
10861
# Custom RTEMS EABI multilibs
10863
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
10864
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
10865
+MULTILIB_OPTIONS = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
10866
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
10868
# Enumeration of multilibs
10870
MULTILIB_EXCEPTIONS =
10871
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
10872
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
10873
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
10874
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
10875
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10876
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
10877
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
10878
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
10879
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
10880
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
10881
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
10882
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
10883
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
10884
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
10885
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
10886
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
10887
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
10888
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
10889
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
10890
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
10891
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
10892
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
10893
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
10894
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
10895
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
10896
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
10897
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
10898
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
10899
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10900
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
10901
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
10902
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
10903
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
10904
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
10905
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
10906
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
10907
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
10908
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
10909
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
10910
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
10911
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
10912
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
10913
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
10914
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
10915
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10916
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
10917
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
10918
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
10919
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
10920
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
10921
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
10922
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
10923
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
10924
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
10925
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
10926
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
10927
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
10928
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
10929
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
10930
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
10931
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
10932
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
10933
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
10934
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
10935
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
10936
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
10937
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
10938
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
10939
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10940
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
10941
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
10942
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
10943
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
10944
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
10945
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
10946
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
10947
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
10948
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
10949
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
10950
+MULTILIB_EXCEPTIONS += mbig-endian
10951
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
10952
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
10953
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
10954
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
10955
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10956
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
10957
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
10958
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
10959
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
10960
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
10961
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
10962
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
10963
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
10964
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
10965
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
10966
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
10967
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
10968
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
10969
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
10970
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
10971
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
10972
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
10973
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
10974
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
10975
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
10976
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
10977
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
10978
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
10979
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10980
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
10981
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
10982
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
10983
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
10984
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
10985
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
10986
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
10987
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
10988
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
10989
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
10990
# MULTILIB_EXCEPTIONS += mthumb
10991
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
10992
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
10993
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
10994
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
10995
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
10996
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
10997
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
10998
MULTILIB_EXCEPTIONS += march=armv6-m
10999
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
11000
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
11001
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
11002
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
11003
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
11004
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
11005
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
11006
MULTILIB_EXCEPTIONS += march=armv7-a
11007
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
11008
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
11009
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
11010
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
11011
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
11012
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
11013
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
11014
MULTILIB_EXCEPTIONS += march=armv7-r
11015
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
11016
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
11017
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
11018
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
11019
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
11020
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
11021
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
11022
MULTILIB_EXCEPTIONS += march=armv7-m
11023
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
11024
MULTILIB_EXCEPTIONS += mfpu=neon
11025
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
11026
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
11027
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
11028
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
11029
MULTILIB_EXCEPTIONS += mfloat-abi=hard
11030
Index: gcc/config/pa/pa.c
11031
===================================================================
11032
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release)
11033
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
11034
@@ -3237,7 +3237,12 @@
11036
&& function_label_operand (x, VOIDmode))
11038
- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
11039
+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
11041
+ /* We don't want an OPD when generating fast indirect calls. */
11042
+ if (!TARGET_FAST_INDIRECT_CALLS)
11043
+ fputs ("P%", asm_out_file);
11045
output_addr_const (asm_out_file, x);
11046
fputc ('\n', asm_out_file);
11048
@@ -4160,9 +4165,8 @@
11049
pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
11051
rtx insn = get_last_insn ();
11054
- last_address = 0;
11056
/* pa_expand_epilogue does the dirty work now. We just need
11057
to output the assembler directives which denote the end
11059
@@ -4185,14 +4189,16 @@
11060
if (insn && GET_CODE (insn) == CALL_INSN)
11062
fputs ("\tnop\n", file);
11063
- last_address += 4;
11064
+ extra_nop = true;
11067
+ extra_nop = false;
11069
fputs ("\t.EXIT\n\t.PROCEND\n", file);
11071
if (TARGET_SOM && TARGET_GAS)
11073
- /* We done with this subspace except possibly for some additional
11074
+ /* We are done with this subspace except possibly for some additional
11075
debug information. Forget that we are in this subspace to ensure
11076
that the next function is output in its own subspace. */
11078
@@ -4199,12 +4205,20 @@
11079
cfun->machine->in_nsubspa = 2;
11082
+ /* Thunks do their own insn accounting. */
11083
+ if (cfun->is_thunk)
11086
if (INSN_ADDRESSES_SET_P ())
11088
+ last_address = extra_nop ? 4 : 0;
11089
insn = get_last_nonnote_insn ();
11090
- last_address += INSN_ADDRESSES (INSN_UID (insn));
11091
- if (INSN_P (insn))
11092
- last_address += insn_default_length (insn);
11095
+ last_address += INSN_ADDRESSES (INSN_UID (insn));
11096
+ if (INSN_P (insn))
11097
+ last_address += insn_default_length (insn);
11099
last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
11100
& ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
11102
@@ -8270,8 +8284,7 @@
11103
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
11104
xoperands[2] = GEN_INT (delta);
11106
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
11107
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
11108
+ final_start_function (emit_barrier (), file, 1);
11110
/* Output the thunk. We know that the function is in the same
11111
translation unit (i.e., the same space) as the thunk, and that
11112
@@ -8301,12 +8314,16 @@
11113
|| ((DECL_SECTION_NAME (thunk_fndecl)
11114
== DECL_SECTION_NAME (function))
11115
&& last_address < 262132)))
11116
+ /* In this case, we need to be able to reach the start of
11117
+ the stub table even though the function is likely closer
11118
+ and can be jumped to directly. */
11119
|| (targetm_common.have_named_sections
11120
&& DECL_SECTION_NAME (thunk_fndecl) == NULL
11121
&& DECL_SECTION_NAME (function) == NULL
11122
- && last_address < 262132)
11123
+ && total_code_bytes < MAX_PCREL17F_OFFSET)
11125
|| (!targetm_common.have_named_sections
11126
- && last_address < 262132))))
11127
+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
11130
output_asm_insn ("addil L'%2,%%r26", xoperands);
11131
@@ -8477,17 +8494,8 @@
11135
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
11136
+ final_end_function ();
11138
- if (TARGET_SOM && TARGET_GAS)
11140
- /* We done with this subspace except possibly for some additional
11141
- debug information. Forget that we are in this subspace to ensure
11142
- that the next function is output in its own subspace. */
11143
- in_section = NULL;
11144
- cfun->machine->in_nsubspa = 2;
11147
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
11149
switch_to_section (data_section);
11150
Index: gcc/tree-vect-slp.c
11151
===================================================================
11152
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release)
11153
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
11154
@@ -1837,7 +1837,10 @@
11155
&& (stmt_vinfo = vinfo_for_stmt (use_stmt))
11156
&& !STMT_SLP_TYPE (stmt_vinfo)
11157
&& (STMT_VINFO_RELEVANT (stmt_vinfo)
11158
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
11159
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
11160
+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
11161
+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
11162
+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
11163
&& !(gimple_code (use_stmt) == GIMPLE_PHI
11164
&& STMT_VINFO_DEF_TYPE (stmt_vinfo)
11165
== vect_reduction_def))
11166
Index: gcc/regcprop.c
11167
===================================================================
11168
--- a/src/gcc/regcprop.c (.../tags/gcc_4_8_3_release)
11169
+++ b/src/gcc/regcprop.c (.../branches/gcc-4_8-branch)
11170
@@ -1039,7 +1039,17 @@
11171
but instead among CLOBBERs on the CALL_INSN, we could wrongly
11172
assume the value in it is still live. */
11173
if (ksvd.ignore_set_reg)
11174
- note_stores (PATTERN (insn), kill_clobbered_value, vd);
11176
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
11177
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
11179
+ exp = XEXP (exp, 1))
11181
+ rtx x = XEXP (exp, 0);
11182
+ if (GET_CODE (x) == CLOBBER)
11183
+ kill_value (SET_DEST (x), vd);
11188
/* Notice stores. */
11189
Index: libobjc/encoding.c
11190
===================================================================
11191
--- a/src/libobjc/encoding.c (.../tags/gcc_4_8_3_release)
11192
+++ b/src/libobjc/encoding.c (.../branches/gcc-4_8-branch)
11193
@@ -192,6 +192,8 @@
11194
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
11195
: MAX (COMPUTED, SPECIFIED));})
11197
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
11198
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
11200
/* Skip a variable name, enclosed in quotes ("). */
11202
Index: libobjc/ChangeLog
11203
===================================================================
11204
--- a/src/libobjc/ChangeLog (.../tags/gcc_4_8_3_release)
11205
+++ b/src/libobjc/ChangeLog (.../branches/gcc-4_8-branch)
11207
+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
11210
+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
11211
+ that matches the 4.8 branch ABI.
11213
+2014-07-27 Alan Modra <amodra@gmail.com>
11214
+ Matthias Klose <doko@ubuntu.com>
11218
+ * encoding.c: Define rs6000_special_adjust_field_align_p.
11220
2014-05-22 Release Manager
11222
* GCC 4.8.3 released.
11223
Index: libgfortran/m4/in_pack.m4
11224
===================================================================
11225
--- a/src/libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release)
11226
+++ b/src/libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch)
11228
return source->base_addr;
11230
/* Allocate storage for the destination. */
11231
- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
11232
+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
11234
src = source->base_addr;
11235
stride0 = stride[0];
11236
Index: libgfortran/m4/pack.m4
11237
===================================================================
11238
--- a/src/libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release)
11239
+++ b/src/libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch)
11240
@@ -168,8 +168,8 @@
11244
- /* xmalloc allocates a single byte for zero size. */
11245
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
11246
+ /* xmallocarray allocates a single byte for zero size. */
11247
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
11251
Index: libgfortran/m4/spread.m4
11252
===================================================================
11253
--- a/src/libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release)
11254
+++ b/src/libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch)
11255
@@ -102,8 +102,8 @@
11259
- /* xmalloc allocates a single byte for zero size. */
11260
- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
11261
+ /* xmallocarray allocates a single byte for zero size. */
11262
+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
11266
@@ -245,7 +245,7 @@
11268
if (ret->base_addr == NULL)
11270
- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
11271
+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
11273
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
11275
Index: libgfortran/m4/transpose.m4
11276
===================================================================
11277
--- a/src/libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release)
11278
+++ b/src/libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch)
11280
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
11281
GFC_DESCRIPTOR_EXTENT(source, 1));
11283
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
11284
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
11285
+ sizeof ('rtype_name`));
11287
} else if (unlikely (compile_options.bounds_check))
11289
Index: libgfortran/m4/iforeach.m4
11290
===================================================================
11291
--- a/src/libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release)
11292
+++ b/src/libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch)
11294
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
11295
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
11296
retarray->offset = 0;
11297
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
11298
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
11302
@@ -133,7 +133,7 @@
11303
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
11304
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
11305
retarray->offset = 0;
11306
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
11307
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
11311
@@ -264,7 +264,7 @@
11312
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
11313
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
11314
retarray->offset = 0;
11315
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
11316
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
11318
else if (unlikely (compile_options.bounds_check))
11320
Index: libgfortran/m4/eoshift1.m4
11321
===================================================================
11322
--- a/src/libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release)
11323
+++ b/src/libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch)
11324
@@ -106,8 +106,8 @@
11325
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
11328
- /* xmalloc allocates a single byte for zero size. */
11329
- ret->base_addr = xmalloc (size * arraysize);
11330
+ /* xmallocarray allocates a single byte for zero size. */
11331
+ ret->base_addr = xmallocarray (arraysize, size);
11334
else if (unlikely (compile_options.bounds_check))
11335
Index: libgfortran/m4/eoshift3.m4
11336
===================================================================
11337
--- a/src/libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release)
11338
+++ b/src/libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch)
11343
- ret->base_addr = xmalloc (size * arraysize);
11344
+ ret->base_addr = xmallocarray (arraysize, size);
11346
ret->dtype = array->dtype;
11347
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
11348
@@ -108,8 +108,8 @@
11349
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
11352
- /* xmalloc allocates a single byte for zero size. */
11353
- ret->base_addr = xmalloc (size * arraysize);
11354
+ /* xmallocarray allocates a single byte for zero size. */
11355
+ ret->base_addr = xmallocarray (arraysize, size);
11358
else if (unlikely (compile_options.bounds_check))
11359
Index: libgfortran/m4/shape.m4
11360
===================================================================
11361
--- a/src/libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release)
11362
+++ b/src/libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch)
11365
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
11367
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
11368
+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
11371
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
11372
Index: libgfortran/m4/cshift1.m4
11373
===================================================================
11374
--- a/src/libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release)
11375
+++ b/src/libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch)
11380
- ret->base_addr = xmalloc (size * arraysize);
11381
+ ret->base_addr = xmallocarray (arraysize, size);
11383
ret->dtype = array->dtype;
11384
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
11385
Index: libgfortran/m4/matmull.m4
11386
===================================================================
11387
--- a/src/libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release)
11388
+++ b/src/libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch)
11392
retarray->base_addr
11393
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
11394
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
11395
retarray->offset = 0;
11397
else if (unlikely (compile_options.bounds_check))
11398
Index: libgfortran/m4/bessel.m4
11399
===================================================================
11400
--- a/src/libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release)
11401
+++ b/src/libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch)
11404
size_t size = n2 < n1 ? 0 : n2-n1+1;
11405
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
11406
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
11407
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
11411
@@ -123,7 +123,7 @@
11413
size_t size = n2 < n1 ? 0 : n2-n1+1;
11414
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
11415
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
11416
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
11420
@@ -163,7 +163,7 @@
11422
x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
11424
- for (i = 2; i <= n1+n2; i++)
11425
+ for (i = 2; i <= n2 - n1; i++)
11427
#if defined('rtype_name`_INFINITY)
11428
if (unlikely (last2 == -'rtype_name`_INFINITY))
11429
Index: libgfortran/m4/unpack.m4
11430
===================================================================
11431
--- a/src/libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release)
11432
+++ b/src/libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch)
11433
@@ -100,7 +100,7 @@
11437
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
11438
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
11442
@@ -245,7 +245,7 @@
11446
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
11447
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
11451
Index: libgfortran/m4/reshape.m4
11452
===================================================================
11453
--- a/src/libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release)
11454
+++ b/src/libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch)
11455
@@ -115,11 +115,11 @@
11458
if (unlikely (rs < 1))
11462
- alloc_size = rs * sizeof ('rtype_name`);
11465
- ret->base_addr = xmalloc (alloc_size);
11466
+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
11467
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
11470
Index: libgfortran/m4/ifunction_logical.m4
11471
===================================================================
11472
--- a/src/libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release)
11473
+++ b/src/libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch)
11475
retarray->offset = 0;
11476
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
11478
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
11479
- * extent[rank-1];
11480
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
11482
if (alloc_size == 0)
11488
- retarray->base_addr = xmalloc (alloc_size);
11489
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
11493
Index: libgfortran/m4/ifunction.m4
11494
===================================================================
11495
--- a/src/libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release)
11496
+++ b/src/libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch)
11498
retarray->offset = 0;
11499
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
11501
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
11502
- * extent[rank-1];
11503
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
11505
- retarray->base_addr = xmalloc (alloc_size);
11506
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
11507
if (alloc_size == 0)
11509
/* Make sure we have a zero-sized array. */
11510
@@ -260,8 +259,7 @@
11514
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
11515
- * extent[rank-1];
11516
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
11518
retarray->offset = 0;
11519
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
11520
@@ -273,7 +271,7 @@
11524
- retarray->base_addr = xmalloc (alloc_size);
11525
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
11529
@@ -417,8 +415,7 @@
11530
retarray->offset = 0;
11531
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
11533
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
11534
- * extent[rank-1];
11535
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
11537
if (alloc_size == 0)
11539
@@ -427,7 +424,7 @@
11543
- retarray->base_addr = xmalloc (alloc_size);
11544
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
11548
Index: libgfortran/m4/matmul.m4
11549
===================================================================
11550
--- a/src/libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release)
11551
+++ b/src/libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch)
11552
@@ -125,7 +125,7 @@
11555
retarray->base_addr
11556
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
11557
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
11558
retarray->offset = 0;
11560
else if (unlikely (compile_options.bounds_check))
11561
Index: libgfortran/runtime/in_pack_generic.c
11562
===================================================================
11563
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
11564
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
11565
@@ -180,7 +180,7 @@
11566
return source->base_addr;
11568
/* Allocate storage for the destination. */
11569
- destptr = xmalloc (ssize * size);
11570
+ destptr = xmallocarray (ssize, size);
11571
dest = (char *)destptr;
11572
src = source->base_addr;
11573
stride0 = stride[0] * size;
11574
Index: libgfortran/runtime/memory.c
11575
===================================================================
11576
--- a/src/libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release)
11577
+++ b/src/libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch)
11580
#include "libgfortran.h"
11581
#include <stdlib.h>
11582
+#include <errno.h>
11585
+#define SIZE_MAX ((size_t)-1)
11592
@@ -44,12 +49,34 @@
11597
+xmallocarray (size_t nmemb, size_t size)
11601
+ if (!nmemb || !size)
11602
+ size = nmemb = 1;
11603
+ else if (nmemb > SIZE_MAX / size)
11606
+ os_error ("Integer overflow in xmallocarray");
11609
+ p = malloc (nmemb * size);
11612
+ os_error ("Memory allocation failed in xmallocarray");
11618
/* calloc wrapper that aborts on error. */
11621
xcalloc (size_t nmemb, size_t size)
11623
- if (nmemb * size == 0)
11624
+ if (!nmemb || !size)
11627
void *p = calloc (nmemb, size);
11628
Index: libgfortran/runtime/convert_char.c
11629
===================================================================
11630
--- a/src/libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release)
11631
+++ b/src/libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch)
11633
gfc_charlen_type i, l;
11635
l = len > 0 ? len : 0;
11636
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
11637
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
11639
for (i = 0; i < l; i++)
11640
(*dst)[i] = src[i];
11642
gfc_charlen_type i, l;
11644
l = len > 0 ? len : 0;
11645
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
11646
+ *dst = xmalloc (l + 1);
11648
for (i = 0; i < l; i++)
11649
(*dst)[i] = src[i];
11650
Index: libgfortran/runtime/environ.c
11651
===================================================================
11652
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
11653
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
11654
@@ -833,7 +833,7 @@
11658
- elist = xmalloc (unit_count * sizeof (exception_t));
11659
+ elist = xmallocarray (unit_count, sizeof (exception_t));
11663
Index: libgfortran/intrinsics/string_intrinsics_inc.c
11664
===================================================================
11665
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release)
11666
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch)
11667
@@ -164,7 +164,7 @@
11670
/* Allocate space for result string. */
11671
- *dest = xmalloc (*len * sizeof (CHARTYPE));
11672
+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
11674
/* Copy string if necessary. */
11675
memcpy (*dest, src, *len * sizeof (CHARTYPE));
11676
@@ -442,7 +442,7 @@
11677
*dest = &zero_length_string;
11680
- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
11681
+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
11682
memcpy (tmp, res, reslen * sizeof (CHARTYPE));
11683
MEMSET (&tmp[reslen], ' ', *rlen - reslen);
11685
Index: libgfortran/intrinsics/pack_generic.c
11686
===================================================================
11687
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
11688
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
11689
@@ -152,8 +152,8 @@
11690
GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
11693
- /* xmalloc allocates a single byte for zero size. */
11694
- ret->base_addr = xmalloc (size * total);
11695
+ /* xmallocarray allocates a single byte for zero size. */
11696
+ ret->base_addr = xmallocarray (total, size);
11699
return; /* In this case, nothing remains to be done. */
11700
@@ -519,7 +519,7 @@
11704
- ret->base_addr = xmalloc (size * total);
11705
+ ret->base_addr = xmallocarray (total, size);
11709
Index: libgfortran/intrinsics/transpose_generic.c
11710
===================================================================
11711
--- a/src/libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release)
11712
+++ b/src/libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch)
11714
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
11715
GFC_DESCRIPTOR_EXTENT(source, 1));
11717
- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
11718
+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
11721
else if (unlikely (compile_options.bounds_check))
11722
Index: libgfortran/intrinsics/cshift0.c
11723
===================================================================
11724
--- a/src/libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release)
11725
+++ b/src/libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch)
11727
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
11730
- /* xmalloc allocates a single byte for zero size. */
11731
- ret->base_addr = xmalloc (size * arraysize);
11732
+ /* xmallocarray allocates a single byte for zero size. */
11733
+ ret->base_addr = xmallocarray (arraysize, size);
11735
else if (unlikely (compile_options.bounds_check))
11737
Index: libgfortran/intrinsics/ctime.c
11738
===================================================================
11739
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
11740
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
11741
@@ -31,31 +31,53 @@
11742
#include <string.h>
11745
-/* strftime-like function that fills a C string with %c format which
11746
- is identical to ctime in the default locale. As ctime and ctime_r
11747
- are poorly specified and their usage not recommended, the
11748
- implementation instead uses strftime. */
11749
+/* Maximum space a ctime-like string might need. A "normal" ctime
11750
+ string is 26 bytes, and in our case 24 bytes as we don't include
11751
+ the trailing newline and null. However, the longest possible year
11752
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
11753
+ 32-bit signed integer) so an extra 7 bytes are needed. */
11754
+#define CTIME_BUFSZ 31
11757
-strctime (char *s, size_t max, const time_t *timep)
11759
+/* Thread-safe ctime-like function that fills a Fortran
11760
+ string. ctime_r is a portability headache and marked as obsolescent
11761
+ in POSIX 2008, which recommends strftime in its place. However,
11762
+ strftime(..., "%c",...) doesn't produce ctime-like output on
11763
+ MinGW, so do it manually with snprintf. */
11766
+gf_ctime (char *s, size_t max, const time_t timev)
11770
+ char buf[CTIME_BUFSZ + 1];
11771
/* Some targets provide a localtime_r based on a draft of the POSIX
11772
standard where the return type is int rather than the
11773
standardized struct tm*. */
11774
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
11775
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
11777
- failed = localtime_r (timep, <m) == NULL,
11778
- failed = localtime_r (timep, <m) != 0);
11779
+ failed = localtime_r (&timev, <m) == NULL,
11780
+ failed = localtime_r (&timev, <m) != 0);
11783
- return strftime (s, max, "%c", <m);
11785
+ int n = snprintf (buf, sizeof (buf),
11786
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
11787
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
11788
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
11789
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
11790
+ 1900 + ltm.tm_year);
11793
+ if ((size_t) n <= max)
11795
+ cf_strcpy (s, max, buf);
11799
+ memset (s, ' ', max);
11803
-/* In the default locale, the date and time representation fits in 26
11804
- bytes. However, other locales might need more space. */
11807
extern void fdate (char **, gfc_charlen_type *);
11808
export_proto(fdate);
11810
fdate (char ** date, gfc_charlen_type * date_len)
11812
time_t now = time(NULL);
11813
- *date = xmalloc (CSZ);
11814
- *date_len = strctime (*date, CSZ, &now);
11815
+ *date = xmalloc (CTIME_BUFSZ);
11816
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
11821
fdate_sub (char * date, gfc_charlen_type date_len)
11823
time_t now = time(NULL);
11824
- char *s = xmalloc (date_len + 1);
11825
- size_t n = strctime (s, date_len + 1, &now);
11826
- fstrcpy (date, date_len, s, n);
11828
+ gf_ctime (date, date_len, now);
11833
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
11836
- *date = xmalloc (CSZ);
11837
- *date_len = strctime (*date, CSZ, &now);
11838
+ *date = xmalloc (CTIME_BUFSZ);
11839
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
11843
@@ -103,8 +122,5 @@
11844
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
11847
- char *s = xmalloc (date_len + 1);
11848
- size_t n = strctime (s, date_len + 1, &now);
11849
- fstrcpy (date, date_len, s, n);
11851
+ gf_ctime (date, date_len, now);
11853
Index: libgfortran/intrinsics/spread_generic.c
11854
===================================================================
11855
--- a/src/libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release)
11856
+++ b/src/libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch)
11857
@@ -100,7 +100,7 @@
11858
GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
11861
- ret->base_addr = xmalloc (rs * size);
11862
+ ret->base_addr = xmallocarray (rs, size);
11866
@@ -245,7 +245,7 @@
11868
if (ret->base_addr == NULL)
11870
- ret->base_addr = xmalloc (ncopies * size);
11871
+ ret->base_addr = xmallocarray (ncopies, size);
11873
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
11875
Index: libgfortran/intrinsics/unpack_generic.c
11876
===================================================================
11877
--- a/src/libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release)
11878
+++ b/src/libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch)
11879
@@ -125,7 +125,7 @@
11883
- ret->base_addr = xmalloc (rs * size);
11884
+ ret->base_addr = xmallocarray (rs, size);
11888
Index: libgfortran/intrinsics/eoshift0.c
11889
===================================================================
11890
--- a/src/libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release)
11891
+++ b/src/libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch)
11896
- /* xmalloc allocates a single byte for zero size. */
11897
- ret->base_addr = xmalloc (size * arraysize);
11898
+ /* xmallocarray allocates a single byte for zero size. */
11899
+ ret->base_addr = xmallocarray (arraysize, size);
11901
else if (unlikely (compile_options.bounds_check))
11903
Index: libgfortran/intrinsics/eoshift2.c
11904
===================================================================
11905
--- a/src/libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release)
11906
+++ b/src/libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch)
11909
ret->dtype = array->dtype;
11911
- /* xmalloc allocates a single byte for zero size. */
11912
- ret->base_addr = xmalloc (size * arraysize);
11913
+ /* xmallocarray allocates a single byte for zero size. */
11914
+ ret->base_addr = xmallocarray (arraysize, size);
11916
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
11918
Index: libgfortran/intrinsics/reshape_generic.c
11919
===================================================================
11920
--- a/src/libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release)
11921
+++ b/src/libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch)
11922
@@ -99,11 +99,11 @@
11925
if (unlikely (rs < 1))
11927
+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
11929
- alloc_size = rs * size;
11932
- ret->base_addr = xmalloc (alloc_size);
11933
+ ret->base_addr = xmallocarray (alloc_size, size);
11935
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
11937
Index: libgfortran/ChangeLog
11938
===================================================================
11939
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
11940
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
11942
+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
11944
+ PR libgfortran/62188
11945
+ * m4/bessel.m4: Avoid indexing off the end of an array.
11946
+ * generated/bessel_r10.c: Regenerated.
11947
+ * generated/bessel_r16.c: Ditto.
11948
+ * generated/bessel_r4.c: Ditto.
11949
+ * generated/bessel_r8.c: Ditto.
11951
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
11953
+ Backport from mainline
11955
+ * libgfortran.h (xmallocarray): New prototype.
11956
+ * runtime/memory.c (xmallocarray): New function.
11957
+ (xcalloc): Check for nonzero separately instead of multiplying.
11958
+ * generated/*.c: Regenerated.
11959
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
11961
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
11962
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
11963
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
11964
+ (pack_s_internal): Likewise.
11965
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
11966
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
11967
+ (spread_internal_scalar): Likewise.
11968
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
11969
+ (string_minmax): Likewise.
11970
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
11971
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
11972
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
11973
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
11975
+ * io/unit.c (get_internal_unit): Likewise.
11976
+ (filename_from_unit): Don't cast xmalloc return value.
11977
+ * io/write.c (nml_write_obj): Likewise, formatting.
11978
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
11979
+ instead of xmalloc.
11980
+ (besse_yn_r'rtype_kind`): Likewise.
11981
+ * m4/cshift1.m4 (cshift1): Likewise.
11982
+ * m4/eoshift1.m4 (eoshift1): Likewise.
11983
+ * m4/eoshift3.m4 (eoshift3): Likewise.
11984
+ * m4/iforeach.m4: Likewise.
11985
+ * m4/ifunction.m4: Likewise.
11986
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
11988
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
11989
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
11990
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
11991
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
11992
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
11993
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
11994
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
11995
+ (spread_scalar_'rtype_code`): Likewise.
11996
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
11997
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
11998
+ (unpack1_'rtype_code`): Likewise.
11999
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
12000
+ (convert_char4_to_char1): Simplify.
12001
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
12003
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
12005
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
12007
+ Backport from mainline
12008
+ PR libfortran/61310
12009
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
12010
+ instead of strftime.
12011
+ (fdate): Use gf_ctime.
12012
+ (fdate_sub): Likewise.
12013
+ (ctime): Likewise.
12014
+ (ctime_sub): Likewise.
12016
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
12018
+ Backport from trunk.
12019
+ PR libfortran/61187
12020
+ * io/unix.c (raw_close): Check if s->fd is -1.
12021
+ (fd_to_stream): Check return value of fstat(), handle error.
12023
2014-05-22 Release Manager
12025
* GCC 4.8.3 released.
12026
Index: libgfortran/generated/spread_r10.c
12027
===================================================================
12028
--- a/src/libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release)
12029
+++ b/src/libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch)
12030
@@ -101,8 +101,8 @@
12034
- /* xmalloc allocates a single byte for zero size. */
12035
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
12036
+ /* xmallocarray allocates a single byte for zero size. */
12037
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
12041
@@ -244,7 +244,7 @@
12043
if (ret->base_addr == NULL)
12045
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
12046
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
12048
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
12050
Index: libgfortran/generated/maxloc1_4_r8.c
12051
===================================================================
12052
--- a/src/libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release)
12053
+++ b/src/libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch)
12055
retarray->offset = 0;
12056
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12058
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12059
- * extent[rank-1];
12060
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12062
- retarray->base_addr = xmalloc (alloc_size);
12063
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12064
if (alloc_size == 0)
12066
/* Make sure we have a zero-sized array. */
12067
@@ -294,8 +293,7 @@
12071
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12072
- * extent[rank-1];
12073
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12075
retarray->offset = 0;
12076
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12077
@@ -307,7 +305,7 @@
12081
- retarray->base_addr = xmalloc (alloc_size);
12082
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12086
@@ -485,8 +483,7 @@
12087
retarray->offset = 0;
12088
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12090
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12091
- * extent[rank-1];
12092
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12094
if (alloc_size == 0)
12096
@@ -495,7 +492,7 @@
12100
- retarray->base_addr = xmalloc (alloc_size);
12101
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12105
Index: libgfortran/generated/norm2_r4.c
12106
===================================================================
12107
--- a/src/libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release)
12108
+++ b/src/libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch)
12109
@@ -101,10 +101,9 @@
12110
retarray->offset = 0;
12111
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12113
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12114
- * extent[rank-1];
12115
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12117
- retarray->base_addr = xmalloc (alloc_size);
12118
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
12119
if (alloc_size == 0)
12121
/* Make sure we have a zero-sized array. */
12122
Index: libgfortran/generated/parity_l2.c
12123
===================================================================
12124
--- a/src/libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release)
12125
+++ b/src/libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch)
12127
retarray->offset = 0;
12128
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12130
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12131
- * extent[rank-1];
12132
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12134
- retarray->base_addr = xmalloc (alloc_size);
12135
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
12136
if (alloc_size == 0)
12138
/* Make sure we have a zero-sized array. */
12139
Index: libgfortran/generated/eoshift3_4.c
12140
===================================================================
12141
--- a/src/libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release)
12142
+++ b/src/libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch)
12147
- ret->base_addr = xmalloc (size * arraysize);
12148
+ ret->base_addr = xmallocarray (arraysize, size);
12150
ret->dtype = array->dtype;
12151
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
12152
@@ -107,8 +107,8 @@
12153
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
12156
- /* xmalloc allocates a single byte for zero size. */
12157
- ret->base_addr = xmalloc (size * arraysize);
12158
+ /* xmallocarray allocates a single byte for zero size. */
12159
+ ret->base_addr = xmallocarray (arraysize, size);
12162
else if (unlikely (compile_options.bounds_check))
12163
Index: libgfortran/generated/transpose_c8.c
12164
===================================================================
12165
--- a/src/libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release)
12166
+++ b/src/libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch)
12168
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
12169
GFC_DESCRIPTOR_EXTENT(source, 1));
12171
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
12172
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
12173
+ sizeof (GFC_COMPLEX_8));
12175
} else if (unlikely (compile_options.bounds_check))
12177
Index: libgfortran/generated/eoshift1_8.c
12178
===================================================================
12179
--- a/src/libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release)
12180
+++ b/src/libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch)
12181
@@ -105,8 +105,8 @@
12182
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
12185
- /* xmalloc allocates a single byte for zero size. */
12186
- ret->base_addr = xmalloc (size * arraysize);
12187
+ /* xmallocarray allocates a single byte for zero size. */
12188
+ ret->base_addr = xmallocarray (arraysize, size);
12191
else if (unlikely (compile_options.bounds_check))
12192
Index: libgfortran/generated/reshape_r16.c
12193
===================================================================
12194
--- a/src/libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release)
12195
+++ b/src/libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch)
12196
@@ -111,11 +111,11 @@
12199
if (unlikely (rs < 1))
12203
- alloc_size = rs * sizeof (GFC_REAL_16);
12206
- ret->base_addr = xmalloc (alloc_size);
12207
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
12208
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
12211
Index: libgfortran/generated/bessel_r4.c
12212
===================================================================
12213
--- a/src/libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release)
12214
+++ b/src/libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch)
12217
size_t size = n2 < n1 ? 0 : n2-n1+1;
12218
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
12219
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
12220
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
12224
@@ -122,7 +122,7 @@
12226
size_t size = n2 < n1 ? 0 : n2-n1+1;
12227
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
12228
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
12229
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
12233
@@ -162,7 +162,7 @@
12235
x2rev = GFC_REAL_4_LITERAL(2.)/x;
12237
- for (i = 2; i <= n1+n2; i++)
12238
+ for (i = 2; i <= n2 - n1; i++)
12240
#if defined(GFC_REAL_4_INFINITY)
12241
if (unlikely (last2 == -GFC_REAL_4_INFINITY))
12242
Index: libgfortran/generated/any_l2.c
12243
===================================================================
12244
--- a/src/libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release)
12245
+++ b/src/libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch)
12246
@@ -101,8 +101,7 @@
12247
retarray->offset = 0;
12248
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12250
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12251
- * extent[rank-1];
12252
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12254
if (alloc_size == 0)
12256
@@ -111,7 +110,7 @@
12260
- retarray->base_addr = xmalloc (alloc_size);
12261
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
12265
Index: libgfortran/generated/product_r4.c
12266
===================================================================
12267
--- a/src/libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release)
12268
+++ b/src/libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch)
12270
retarray->offset = 0;
12271
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12273
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12274
- * extent[rank-1];
12275
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12277
- retarray->base_addr = xmalloc (alloc_size);
12278
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
12279
if (alloc_size == 0)
12281
/* Make sure we have a zero-sized array. */
12282
@@ -272,8 +271,7 @@
12286
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12287
- * extent[rank-1];
12288
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12290
retarray->offset = 0;
12291
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12292
@@ -285,7 +283,7 @@
12296
- retarray->base_addr = xmalloc (alloc_size);
12297
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
12301
@@ -430,8 +428,7 @@
12302
retarray->offset = 0;
12303
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12305
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12306
- * extent[rank-1];
12307
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12309
if (alloc_size == 0)
12311
@@ -440,7 +437,7 @@
12315
- retarray->base_addr = xmalloc (alloc_size);
12316
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
12320
Index: libgfortran/generated/iany_i1.c
12321
===================================================================
12322
--- a/src/libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release)
12323
+++ b/src/libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch)
12325
retarray->offset = 0;
12326
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12328
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12329
- * extent[rank-1];
12330
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12332
- retarray->base_addr = xmalloc (alloc_size);
12333
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12334
if (alloc_size == 0)
12336
/* Make sure we have a zero-sized array. */
12337
@@ -272,8 +271,7 @@
12341
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12342
- * extent[rank-1];
12343
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12345
retarray->offset = 0;
12346
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12347
@@ -285,7 +283,7 @@
12351
- retarray->base_addr = xmalloc (alloc_size);
12352
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12356
@@ -430,8 +428,7 @@
12357
retarray->offset = 0;
12358
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12360
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12361
- * extent[rank-1];
12362
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12364
if (alloc_size == 0)
12366
@@ -440,7 +437,7 @@
12370
- retarray->base_addr = xmalloc (alloc_size);
12371
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12375
Index: libgfortran/generated/parity_l16.c
12376
===================================================================
12377
--- a/src/libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release)
12378
+++ b/src/libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch)
12380
retarray->offset = 0;
12381
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12383
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12384
- * extent[rank-1];
12385
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12387
- retarray->base_addr = xmalloc (alloc_size);
12388
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
12389
if (alloc_size == 0)
12391
/* Make sure we have a zero-sized array. */
12392
Index: libgfortran/generated/in_pack_r4.c
12393
===================================================================
12394
--- a/src/libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release)
12395
+++ b/src/libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch)
12397
return source->base_addr;
12399
/* Allocate storage for the destination. */
12400
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
12401
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
12403
src = source->base_addr;
12404
stride0 = stride[0];
12405
Index: libgfortran/generated/product_i2.c
12406
===================================================================
12407
--- a/src/libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release)
12408
+++ b/src/libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch)
12410
retarray->offset = 0;
12411
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12413
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12414
- * extent[rank-1];
12415
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12417
- retarray->base_addr = xmalloc (alloc_size);
12418
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
12419
if (alloc_size == 0)
12421
/* Make sure we have a zero-sized array. */
12422
@@ -272,8 +271,7 @@
12426
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12427
- * extent[rank-1];
12428
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12430
retarray->offset = 0;
12431
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12432
@@ -285,7 +283,7 @@
12436
- retarray->base_addr = xmalloc (alloc_size);
12437
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
12441
@@ -430,8 +428,7 @@
12442
retarray->offset = 0;
12443
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12445
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12446
- * extent[rank-1];
12447
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12449
if (alloc_size == 0)
12451
@@ -440,7 +437,7 @@
12455
- retarray->base_addr = xmalloc (alloc_size);
12456
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
12460
Index: libgfortran/generated/iparity_i4.c
12461
===================================================================
12462
--- a/src/libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release)
12463
+++ b/src/libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch)
12465
retarray->offset = 0;
12466
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12468
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12469
- * extent[rank-1];
12470
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12472
- retarray->base_addr = xmalloc (alloc_size);
12473
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12474
if (alloc_size == 0)
12476
/* Make sure we have a zero-sized array. */
12477
@@ -272,8 +271,7 @@
12481
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12482
- * extent[rank-1];
12483
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12485
retarray->offset = 0;
12486
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12487
@@ -285,7 +283,7 @@
12491
- retarray->base_addr = xmalloc (alloc_size);
12492
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12496
@@ -430,8 +428,7 @@
12497
retarray->offset = 0;
12498
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12500
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12501
- * extent[rank-1];
12502
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12504
if (alloc_size == 0)
12506
@@ -440,7 +437,7 @@
12510
- retarray->base_addr = xmalloc (alloc_size);
12511
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
12515
Index: libgfortran/generated/minloc0_4_i1.c
12516
===================================================================
12517
--- a/src/libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release)
12518
+++ b/src/libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch)
12520
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12521
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12522
retarray->offset = 0;
12523
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12524
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12528
@@ -199,7 +199,7 @@
12529
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
12530
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12531
retarray->offset = 0;
12532
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12533
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12537
@@ -367,7 +367,7 @@
12538
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12539
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12540
retarray->offset = 0;
12541
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12542
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12544
else if (unlikely (compile_options.bounds_check))
12546
Index: libgfortran/generated/reshape_c4.c
12547
===================================================================
12548
--- a/src/libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release)
12549
+++ b/src/libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch)
12550
@@ -111,11 +111,11 @@
12553
if (unlikely (rs < 1))
12557
- alloc_size = rs * sizeof (GFC_COMPLEX_4);
12560
- ret->base_addr = xmalloc (alloc_size);
12561
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
12562
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
12565
Index: libgfortran/generated/maxloc0_4_r16.c
12566
===================================================================
12567
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
12568
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
12570
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12571
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12572
retarray->offset = 0;
12573
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12574
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12578
@@ -199,7 +199,7 @@
12579
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
12580
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12581
retarray->offset = 0;
12582
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12583
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12587
@@ -367,7 +367,7 @@
12588
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12589
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12590
retarray->offset = 0;
12591
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
12592
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
12594
else if (unlikely (compile_options.bounds_check))
12596
Index: libgfortran/generated/iall_i8.c
12597
===================================================================
12598
--- a/src/libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release)
12599
+++ b/src/libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch)
12601
retarray->offset = 0;
12602
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12604
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12605
- * extent[rank-1];
12606
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12608
- retarray->base_addr = xmalloc (alloc_size);
12609
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12610
if (alloc_size == 0)
12612
/* Make sure we have a zero-sized array. */
12613
@@ -272,8 +271,7 @@
12617
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12618
- * extent[rank-1];
12619
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12621
retarray->offset = 0;
12622
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12623
@@ -285,7 +283,7 @@
12627
- retarray->base_addr = xmalloc (alloc_size);
12628
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12632
@@ -430,8 +428,7 @@
12633
retarray->offset = 0;
12634
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12636
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12637
- * extent[rank-1];
12638
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12640
if (alloc_size == 0)
12642
@@ -440,7 +437,7 @@
12646
- retarray->base_addr = xmalloc (alloc_size);
12647
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12651
Index: libgfortran/generated/maxloc1_8_r16.c
12652
===================================================================
12653
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
12654
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
12656
retarray->offset = 0;
12657
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12659
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12660
- * extent[rank-1];
12661
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12663
- retarray->base_addr = xmalloc (alloc_size);
12664
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12665
if (alloc_size == 0)
12667
/* Make sure we have a zero-sized array. */
12668
@@ -294,8 +293,7 @@
12672
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12673
- * extent[rank-1];
12674
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12676
retarray->offset = 0;
12677
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12678
@@ -307,7 +305,7 @@
12682
- retarray->base_addr = xmalloc (alloc_size);
12683
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12687
@@ -485,8 +483,7 @@
12688
retarray->offset = 0;
12689
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12691
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12692
- * extent[rank-1];
12693
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12695
if (alloc_size == 0)
12697
@@ -495,7 +492,7 @@
12701
- retarray->base_addr = xmalloc (alloc_size);
12702
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
12706
Index: libgfortran/generated/sum_r16.c
12707
===================================================================
12708
--- a/src/libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release)
12709
+++ b/src/libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch)
12711
retarray->offset = 0;
12712
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12714
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12715
- * extent[rank-1];
12716
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12718
- retarray->base_addr = xmalloc (alloc_size);
12719
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
12720
if (alloc_size == 0)
12722
/* Make sure we have a zero-sized array. */
12723
@@ -272,8 +271,7 @@
12727
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12728
- * extent[rank-1];
12729
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12731
retarray->offset = 0;
12732
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12733
@@ -285,7 +283,7 @@
12737
- retarray->base_addr = xmalloc (alloc_size);
12738
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
12742
@@ -430,8 +428,7 @@
12743
retarray->offset = 0;
12744
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12746
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12747
- * extent[rank-1];
12748
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12750
if (alloc_size == 0)
12752
@@ -440,7 +437,7 @@
12756
- retarray->base_addr = xmalloc (alloc_size);
12757
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
12761
Index: libgfortran/generated/sum_i1.c
12762
===================================================================
12763
--- a/src/libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release)
12764
+++ b/src/libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch)
12766
retarray->offset = 0;
12767
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12769
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12770
- * extent[rank-1];
12771
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12773
- retarray->base_addr = xmalloc (alloc_size);
12774
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12775
if (alloc_size == 0)
12777
/* Make sure we have a zero-sized array. */
12778
@@ -272,8 +271,7 @@
12782
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12783
- * extent[rank-1];
12784
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12786
retarray->offset = 0;
12787
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12788
@@ -285,7 +283,7 @@
12792
- retarray->base_addr = xmalloc (alloc_size);
12793
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12797
@@ -430,8 +428,7 @@
12798
retarray->offset = 0;
12799
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12801
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12802
- * extent[rank-1];
12803
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12805
if (alloc_size == 0)
12807
@@ -440,7 +437,7 @@
12811
- retarray->base_addr = xmalloc (alloc_size);
12812
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
12816
Index: libgfortran/generated/in_pack_i2.c
12817
===================================================================
12818
--- a/src/libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release)
12819
+++ b/src/libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch)
12821
return source->base_addr;
12823
/* Allocate storage for the destination. */
12824
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
12825
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
12827
src = source->base_addr;
12828
stride0 = stride[0];
12829
Index: libgfortran/generated/transpose_r10.c
12830
===================================================================
12831
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
12832
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
12834
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
12835
GFC_DESCRIPTOR_EXTENT(source, 1));
12837
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
12838
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
12839
+ sizeof (GFC_REAL_10));
12841
} else if (unlikely (compile_options.bounds_check))
12843
Index: libgfortran/generated/maxloc1_16_r16.c
12844
===================================================================
12845
--- a/src/libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release)
12846
+++ b/src/libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch)
12848
retarray->offset = 0;
12849
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12851
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12852
- * extent[rank-1];
12853
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12855
- retarray->base_addr = xmalloc (alloc_size);
12856
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12857
if (alloc_size == 0)
12859
/* Make sure we have a zero-sized array. */
12860
@@ -294,8 +293,7 @@
12864
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12865
- * extent[rank-1];
12866
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12868
retarray->offset = 0;
12869
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12870
@@ -307,7 +305,7 @@
12874
- retarray->base_addr = xmalloc (alloc_size);
12875
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12879
@@ -485,8 +483,7 @@
12880
retarray->offset = 0;
12881
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12883
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12884
- * extent[rank-1];
12885
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12887
if (alloc_size == 0)
12889
@@ -495,7 +492,7 @@
12893
- retarray->base_addr = xmalloc (alloc_size);
12894
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12898
Index: libgfortran/generated/maxloc1_16_i4.c
12899
===================================================================
12900
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
12901
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
12903
retarray->offset = 0;
12904
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12906
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12907
- * extent[rank-1];
12908
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12910
- retarray->base_addr = xmalloc (alloc_size);
12911
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12912
if (alloc_size == 0)
12914
/* Make sure we have a zero-sized array. */
12915
@@ -294,8 +293,7 @@
12919
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12920
- * extent[rank-1];
12921
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12923
retarray->offset = 0;
12924
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12925
@@ -307,7 +305,7 @@
12929
- retarray->base_addr = xmalloc (alloc_size);
12930
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12934
@@ -485,8 +483,7 @@
12935
retarray->offset = 0;
12936
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
12938
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
12939
- * extent[rank-1];
12940
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
12942
if (alloc_size == 0)
12944
@@ -495,7 +492,7 @@
12948
- retarray->base_addr = xmalloc (alloc_size);
12949
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
12953
Index: libgfortran/generated/spread_i1.c
12954
===================================================================
12955
--- a/src/libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release)
12956
+++ b/src/libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch)
12957
@@ -101,8 +101,8 @@
12961
- /* xmalloc allocates a single byte for zero size. */
12962
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
12963
+ /* xmallocarray allocates a single byte for zero size. */
12964
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
12968
@@ -244,7 +244,7 @@
12970
if (ret->base_addr == NULL)
12972
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
12973
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
12975
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
12977
Index: libgfortran/generated/maxloc0_16_i8.c
12978
===================================================================
12979
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
12980
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
12982
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
12983
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12984
retarray->offset = 0;
12985
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
12986
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
12990
@@ -199,7 +199,7 @@
12991
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
12992
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
12993
retarray->offset = 0;
12994
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
12995
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
12999
@@ -367,7 +367,7 @@
13000
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13001
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13002
retarray->offset = 0;
13003
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13004
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13006
else if (unlikely (compile_options.bounds_check))
13008
Index: libgfortran/generated/maxval_r16.c
13009
===================================================================
13010
--- a/src/libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release)
13011
+++ b/src/libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch)
13013
retarray->offset = 0;
13014
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13016
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13017
- * extent[rank-1];
13018
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13020
- retarray->base_addr = xmalloc (alloc_size);
13021
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
13022
if (alloc_size == 0)
13024
/* Make sure we have a zero-sized array. */
13025
@@ -286,8 +285,7 @@
13029
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13030
- * extent[rank-1];
13031
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13033
retarray->offset = 0;
13034
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13035
@@ -299,7 +297,7 @@
13039
- retarray->base_addr = xmalloc (alloc_size);
13040
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
13044
@@ -472,8 +470,7 @@
13045
retarray->offset = 0;
13046
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13048
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13049
- * extent[rank-1];
13050
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13052
if (alloc_size == 0)
13054
@@ -482,7 +479,7 @@
13058
- retarray->base_addr = xmalloc (alloc_size);
13059
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
13063
Index: libgfortran/generated/product_c10.c
13064
===================================================================
13065
--- a/src/libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release)
13066
+++ b/src/libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch)
13068
retarray->offset = 0;
13069
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13071
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13072
- * extent[rank-1];
13073
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13075
- retarray->base_addr = xmalloc (alloc_size);
13076
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
13077
if (alloc_size == 0)
13079
/* Make sure we have a zero-sized array. */
13080
@@ -272,8 +271,7 @@
13084
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13085
- * extent[rank-1];
13086
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13088
retarray->offset = 0;
13089
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13090
@@ -285,7 +283,7 @@
13094
- retarray->base_addr = xmalloc (alloc_size);
13095
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
13099
@@ -430,8 +428,7 @@
13100
retarray->offset = 0;
13101
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13103
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13104
- * extent[rank-1];
13105
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13107
if (alloc_size == 0)
13109
@@ -440,7 +437,7 @@
13113
- retarray->base_addr = xmalloc (alloc_size);
13114
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
13118
Index: libgfortran/generated/minloc1_8_i4.c
13119
===================================================================
13120
--- a/src/libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release)
13121
+++ b/src/libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch)
13123
retarray->offset = 0;
13124
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13126
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13127
- * extent[rank-1];
13128
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13130
- retarray->base_addr = xmalloc (alloc_size);
13131
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
13132
if (alloc_size == 0)
13134
/* Make sure we have a zero-sized array. */
13135
@@ -294,8 +293,7 @@
13139
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13140
- * extent[rank-1];
13141
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13143
retarray->offset = 0;
13144
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13145
@@ -307,7 +305,7 @@
13149
- retarray->base_addr = xmalloc (alloc_size);
13150
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
13154
@@ -485,8 +483,7 @@
13155
retarray->offset = 0;
13156
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13158
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13159
- * extent[rank-1];
13160
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13162
if (alloc_size == 0)
13164
@@ -495,7 +492,7 @@
13168
- retarray->base_addr = xmalloc (alloc_size);
13169
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
13173
Index: libgfortran/generated/minloc0_16_i16.c
13174
===================================================================
13175
--- a/src/libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release)
13176
+++ b/src/libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch)
13178
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13179
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13180
retarray->offset = 0;
13181
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13182
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13186
@@ -199,7 +199,7 @@
13187
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13188
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13189
retarray->offset = 0;
13190
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13191
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13195
@@ -367,7 +367,7 @@
13196
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13197
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13198
retarray->offset = 0;
13199
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13200
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13202
else if (unlikely (compile_options.bounds_check))
13204
Index: libgfortran/generated/matmul_r16.c
13205
===================================================================
13206
--- a/src/libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release)
13207
+++ b/src/libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch)
13208
@@ -124,7 +124,7 @@
13211
retarray->base_addr
13212
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
13213
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
13214
retarray->offset = 0;
13216
else if (unlikely (compile_options.bounds_check))
13217
Index: libgfortran/generated/minloc0_4_r4.c
13218
===================================================================
13219
--- a/src/libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release)
13220
+++ b/src/libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch)
13222
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13223
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13224
retarray->offset = 0;
13225
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13226
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13230
@@ -199,7 +199,7 @@
13231
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13232
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13233
retarray->offset = 0;
13234
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13235
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13239
@@ -367,7 +367,7 @@
13240
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13241
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13242
retarray->offset = 0;
13243
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13244
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13246
else if (unlikely (compile_options.bounds_check))
13248
Index: libgfortran/generated/iany_i2.c
13249
===================================================================
13250
--- a/src/libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release)
13251
+++ b/src/libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch)
13253
retarray->offset = 0;
13254
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13256
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13257
- * extent[rank-1];
13258
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13260
- retarray->base_addr = xmalloc (alloc_size);
13261
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13262
if (alloc_size == 0)
13264
/* Make sure we have a zero-sized array. */
13265
@@ -272,8 +271,7 @@
13269
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13270
- * extent[rank-1];
13271
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13273
retarray->offset = 0;
13274
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13275
@@ -285,7 +283,7 @@
13279
- retarray->base_addr = xmalloc (alloc_size);
13280
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13284
@@ -430,8 +428,7 @@
13285
retarray->offset = 0;
13286
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13288
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13289
- * extent[rank-1];
13290
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13292
if (alloc_size == 0)
13294
@@ -440,7 +437,7 @@
13298
- retarray->base_addr = xmalloc (alloc_size);
13299
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13303
Index: libgfortran/generated/sum_r4.c
13304
===================================================================
13305
--- a/src/libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release)
13306
+++ b/src/libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch)
13308
retarray->offset = 0;
13309
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13311
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13312
- * extent[rank-1];
13313
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13315
- retarray->base_addr = xmalloc (alloc_size);
13316
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13317
if (alloc_size == 0)
13319
/* Make sure we have a zero-sized array. */
13320
@@ -272,8 +271,7 @@
13324
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13325
- * extent[rank-1];
13326
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13328
retarray->offset = 0;
13329
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13330
@@ -285,7 +283,7 @@
13334
- retarray->base_addr = xmalloc (alloc_size);
13335
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13339
@@ -430,8 +428,7 @@
13340
retarray->offset = 0;
13341
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13343
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13344
- * extent[rank-1];
13345
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13347
if (alloc_size == 0)
13349
@@ -440,7 +437,7 @@
13353
- retarray->base_addr = xmalloc (alloc_size);
13354
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
13358
Index: libgfortran/generated/unpack_c8.c
13359
===================================================================
13360
--- a/src/libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release)
13361
+++ b/src/libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch)
13366
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
13367
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
13371
@@ -244,7 +244,7 @@
13375
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
13376
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
13380
Index: libgfortran/generated/in_pack_c16.c
13381
===================================================================
13382
--- a/src/libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release)
13383
+++ b/src/libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch)
13385
return source->base_addr;
13387
/* Allocate storage for the destination. */
13388
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
13389
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
13391
src = source->base_addr;
13392
stride0 = stride[0];
13393
Index: libgfortran/generated/minloc0_4_i2.c
13394
===================================================================
13395
--- a/src/libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release)
13396
+++ b/src/libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch)
13398
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13399
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13400
retarray->offset = 0;
13401
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13402
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13406
@@ -199,7 +199,7 @@
13407
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13408
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13409
retarray->offset = 0;
13410
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13411
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13415
@@ -367,7 +367,7 @@
13416
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13417
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13418
retarray->offset = 0;
13419
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13420
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13422
else if (unlikely (compile_options.bounds_check))
13424
Index: libgfortran/generated/spread_c10.c
13425
===================================================================
13426
--- a/src/libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release)
13427
+++ b/src/libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch)
13428
@@ -101,8 +101,8 @@
13432
- /* xmalloc allocates a single byte for zero size. */
13433
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
13434
+ /* xmallocarray allocates a single byte for zero size. */
13435
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
13439
@@ -244,7 +244,7 @@
13441
if (ret->base_addr == NULL)
13443
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
13444
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
13446
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13448
Index: libgfortran/generated/maxloc0_8_i1.c
13449
===================================================================
13450
--- a/src/libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release)
13451
+++ b/src/libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch)
13453
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13454
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13455
retarray->offset = 0;
13456
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13457
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13461
@@ -199,7 +199,7 @@
13462
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13463
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13464
retarray->offset = 0;
13465
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13466
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13470
@@ -367,7 +367,7 @@
13471
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13472
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13473
retarray->offset = 0;
13474
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13475
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13477
else if (unlikely (compile_options.bounds_check))
13479
Index: libgfortran/generated/spread_r4.c
13480
===================================================================
13481
--- a/src/libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release)
13482
+++ b/src/libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch)
13483
@@ -101,8 +101,8 @@
13487
- /* xmalloc allocates a single byte for zero size. */
13488
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
13489
+ /* xmallocarray allocates a single byte for zero size. */
13490
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
13494
@@ -244,7 +244,7 @@
13496
if (ret->base_addr == NULL)
13498
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
13499
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
13501
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13503
Index: libgfortran/generated/minloc0_8_i8.c
13504
===================================================================
13505
--- a/src/libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release)
13506
+++ b/src/libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch)
13508
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13509
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13510
retarray->offset = 0;
13511
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13512
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13516
@@ -199,7 +199,7 @@
13517
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13518
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13519
retarray->offset = 0;
13520
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13521
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13525
@@ -367,7 +367,7 @@
13526
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13527
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13528
retarray->offset = 0;
13529
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13530
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13532
else if (unlikely (compile_options.bounds_check))
13534
Index: libgfortran/generated/matmul_c8.c
13535
===================================================================
13536
--- a/src/libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release)
13537
+++ b/src/libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch)
13538
@@ -124,7 +124,7 @@
13541
retarray->base_addr
13542
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
13543
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
13544
retarray->offset = 0;
13546
else if (unlikely (compile_options.bounds_check))
13547
Index: libgfortran/generated/minloc1_16_r10.c
13548
===================================================================
13549
--- a/src/libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release)
13550
+++ b/src/libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch)
13552
retarray->offset = 0;
13553
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13555
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13556
- * extent[rank-1];
13557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13559
- retarray->base_addr = xmalloc (alloc_size);
13560
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13561
if (alloc_size == 0)
13563
/* Make sure we have a zero-sized array. */
13564
@@ -294,8 +293,7 @@
13568
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13569
- * extent[rank-1];
13570
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13572
retarray->offset = 0;
13573
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13574
@@ -307,7 +305,7 @@
13578
- retarray->base_addr = xmalloc (alloc_size);
13579
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13583
@@ -485,8 +483,7 @@
13584
retarray->offset = 0;
13585
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13587
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13588
- * extent[rank-1];
13589
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13591
if (alloc_size == 0)
13593
@@ -495,7 +492,7 @@
13597
- retarray->base_addr = xmalloc (alloc_size);
13598
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13602
Index: libgfortran/generated/sum_i2.c
13603
===================================================================
13604
--- a/src/libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release)
13605
+++ b/src/libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch)
13607
retarray->offset = 0;
13608
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13610
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13611
- * extent[rank-1];
13612
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13614
- retarray->base_addr = xmalloc (alloc_size);
13615
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13616
if (alloc_size == 0)
13618
/* Make sure we have a zero-sized array. */
13619
@@ -272,8 +271,7 @@
13623
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13624
- * extent[rank-1];
13625
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13627
retarray->offset = 0;
13628
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13629
@@ -285,7 +283,7 @@
13633
- retarray->base_addr = xmalloc (alloc_size);
13634
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13638
@@ -430,8 +428,7 @@
13639
retarray->offset = 0;
13640
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13642
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13643
- * extent[rank-1];
13644
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13646
if (alloc_size == 0)
13648
@@ -440,7 +437,7 @@
13652
- retarray->base_addr = xmalloc (alloc_size);
13653
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
13657
Index: libgfortran/generated/iparity_i16.c
13658
===================================================================
13659
--- a/src/libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release)
13660
+++ b/src/libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch)
13662
retarray->offset = 0;
13663
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13665
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13666
- * extent[rank-1];
13667
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13669
- retarray->base_addr = xmalloc (alloc_size);
13670
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13671
if (alloc_size == 0)
13673
/* Make sure we have a zero-sized array. */
13674
@@ -272,8 +271,7 @@
13678
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13679
- * extent[rank-1];
13680
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13682
retarray->offset = 0;
13683
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13684
@@ -285,7 +283,7 @@
13688
- retarray->base_addr = xmalloc (alloc_size);
13689
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13693
@@ -430,8 +428,7 @@
13694
retarray->offset = 0;
13695
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13697
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13698
- * extent[rank-1];
13699
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13701
if (alloc_size == 0)
13703
@@ -440,7 +437,7 @@
13707
- retarray->base_addr = xmalloc (alloc_size);
13708
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
13712
Index: libgfortran/generated/minloc0_16_i1.c
13713
===================================================================
13714
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
13715
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
13717
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13718
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13719
retarray->offset = 0;
13720
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13721
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13725
@@ -199,7 +199,7 @@
13726
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13727
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13728
retarray->offset = 0;
13729
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13730
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13734
@@ -367,7 +367,7 @@
13735
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13736
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13737
retarray->offset = 0;
13738
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
13739
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
13741
else if (unlikely (compile_options.bounds_check))
13743
Index: libgfortran/generated/reshape_c16.c
13744
===================================================================
13745
--- a/src/libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release)
13746
+++ b/src/libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch)
13747
@@ -111,11 +111,11 @@
13750
if (unlikely (rs < 1))
13754
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
13757
- ret->base_addr = xmalloc (alloc_size);
13758
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
13759
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
13762
Index: libgfortran/generated/pack_c4.c
13763
===================================================================
13764
--- a/src/libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release)
13765
+++ b/src/libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch)
13766
@@ -167,8 +167,8 @@
13770
- /* xmalloc allocates a single byte for zero size. */
13771
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
13772
+ /* xmallocarray allocates a single byte for zero size. */
13773
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
13777
Index: libgfortran/generated/parity_l4.c
13778
===================================================================
13779
--- a/src/libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release)
13780
+++ b/src/libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch)
13782
retarray->offset = 0;
13783
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13785
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13786
- * extent[rank-1];
13787
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13789
- retarray->base_addr = xmalloc (alloc_size);
13790
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
13791
if (alloc_size == 0)
13793
/* Make sure we have a zero-sized array. */
13794
Index: libgfortran/generated/spread_i2.c
13795
===================================================================
13796
--- a/src/libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release)
13797
+++ b/src/libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch)
13798
@@ -101,8 +101,8 @@
13802
- /* xmalloc allocates a single byte for zero size. */
13803
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
13804
+ /* xmallocarray allocates a single byte for zero size. */
13805
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
13809
@@ -244,7 +244,7 @@
13811
if (ret->base_addr == NULL)
13813
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
13814
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
13816
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13818
Index: libgfortran/generated/any_l4.c
13819
===================================================================
13820
--- a/src/libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release)
13821
+++ b/src/libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch)
13822
@@ -101,8 +101,7 @@
13823
retarray->offset = 0;
13824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13826
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13827
- * extent[rank-1];
13828
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13830
if (alloc_size == 0)
13832
@@ -111,7 +110,7 @@
13836
- retarray->base_addr = xmalloc (alloc_size);
13837
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
13841
Index: libgfortran/generated/maxloc1_4_i8.c
13842
===================================================================
13843
--- a/src/libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release)
13844
+++ b/src/libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch)
13846
retarray->offset = 0;
13847
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13849
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13850
- * extent[rank-1];
13851
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13853
- retarray->base_addr = xmalloc (alloc_size);
13854
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13855
if (alloc_size == 0)
13857
/* Make sure we have a zero-sized array. */
13858
@@ -294,8 +293,7 @@
13862
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13863
- * extent[rank-1];
13864
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13866
retarray->offset = 0;
13867
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13868
@@ -307,7 +305,7 @@
13872
- retarray->base_addr = xmalloc (alloc_size);
13873
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13877
@@ -485,8 +483,7 @@
13878
retarray->offset = 0;
13879
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13881
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13882
- * extent[rank-1];
13883
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13885
if (alloc_size == 0)
13887
@@ -495,7 +492,7 @@
13891
- retarray->base_addr = xmalloc (alloc_size);
13892
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13896
Index: libgfortran/generated/maxloc0_8_r4.c
13897
===================================================================
13898
--- a/src/libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release)
13899
+++ b/src/libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch)
13901
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13902
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13903
retarray->offset = 0;
13904
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13905
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13909
@@ -199,7 +199,7 @@
13910
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13911
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13912
retarray->offset = 0;
13913
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13914
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13918
@@ -367,7 +367,7 @@
13919
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13920
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13921
retarray->offset = 0;
13922
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
13923
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
13925
else if (unlikely (compile_options.bounds_check))
13927
Index: libgfortran/generated/maxloc1_4_i16.c
13928
===================================================================
13929
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
13930
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
13932
retarray->offset = 0;
13933
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13935
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13936
- * extent[rank-1];
13937
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13939
- retarray->base_addr = xmalloc (alloc_size);
13940
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13941
if (alloc_size == 0)
13943
/* Make sure we have a zero-sized array. */
13944
@@ -294,8 +293,7 @@
13948
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13949
- * extent[rank-1];
13950
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13952
retarray->offset = 0;
13953
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13954
@@ -307,7 +305,7 @@
13958
- retarray->base_addr = xmalloc (alloc_size);
13959
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13963
@@ -485,8 +483,7 @@
13964
retarray->offset = 0;
13965
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13967
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13968
- * extent[rank-1];
13969
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13971
if (alloc_size == 0)
13973
@@ -495,7 +492,7 @@
13977
- retarray->base_addr = xmalloc (alloc_size);
13978
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
13982
Index: libgfortran/generated/minloc0_4_r10.c
13983
===================================================================
13984
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
13985
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
13987
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13988
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13989
retarray->offset = 0;
13990
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
13991
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
13995
@@ -199,7 +199,7 @@
13996
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13997
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13998
retarray->offset = 0;
13999
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14000
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14004
@@ -367,7 +367,7 @@
14005
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14006
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14007
retarray->offset = 0;
14008
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14009
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14011
else if (unlikely (compile_options.bounds_check))
14013
Index: libgfortran/generated/minloc0_8_i16.c
14014
===================================================================
14015
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
14016
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
14018
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14019
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14020
retarray->offset = 0;
14021
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14022
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14026
@@ -199,7 +199,7 @@
14027
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14028
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14029
retarray->offset = 0;
14030
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14031
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14035
@@ -367,7 +367,7 @@
14036
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14037
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14038
retarray->offset = 0;
14039
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14040
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14042
else if (unlikely (compile_options.bounds_check))
14044
Index: libgfortran/generated/minloc1_8_r10.c
14045
===================================================================
14046
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
14047
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
14049
retarray->offset = 0;
14050
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14052
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14053
- * extent[rank-1];
14054
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14056
- retarray->base_addr = xmalloc (alloc_size);
14057
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14058
if (alloc_size == 0)
14060
/* Make sure we have a zero-sized array. */
14061
@@ -294,8 +293,7 @@
14065
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14066
- * extent[rank-1];
14067
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14069
retarray->offset = 0;
14070
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14071
@@ -307,7 +305,7 @@
14075
- retarray->base_addr = xmalloc (alloc_size);
14076
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14080
@@ -485,8 +483,7 @@
14081
retarray->offset = 0;
14082
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14084
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14085
- * extent[rank-1];
14086
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14088
if (alloc_size == 0)
14090
@@ -495,7 +492,7 @@
14094
- retarray->base_addr = xmalloc (alloc_size);
14095
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14099
Index: libgfortran/generated/minloc0_16_r4.c
14100
===================================================================
14101
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
14102
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
14104
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14105
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14106
retarray->offset = 0;
14107
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14108
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14112
@@ -199,7 +199,7 @@
14113
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14114
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14115
retarray->offset = 0;
14116
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14117
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14121
@@ -367,7 +367,7 @@
14122
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14123
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14124
retarray->offset = 0;
14125
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14126
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14128
else if (unlikely (compile_options.bounds_check))
14130
Index: libgfortran/generated/product_i4.c
14131
===================================================================
14132
--- a/src/libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release)
14133
+++ b/src/libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch)
14135
retarray->offset = 0;
14136
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14138
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14139
- * extent[rank-1];
14140
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14142
- retarray->base_addr = xmalloc (alloc_size);
14143
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14144
if (alloc_size == 0)
14146
/* Make sure we have a zero-sized array. */
14147
@@ -272,8 +271,7 @@
14151
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14152
- * extent[rank-1];
14153
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14155
retarray->offset = 0;
14156
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14157
@@ -285,7 +283,7 @@
14161
- retarray->base_addr = xmalloc (alloc_size);
14162
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14166
@@ -430,8 +428,7 @@
14167
retarray->offset = 0;
14168
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14170
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14171
- * extent[rank-1];
14172
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14174
if (alloc_size == 0)
14176
@@ -440,7 +437,7 @@
14180
- retarray->base_addr = xmalloc (alloc_size);
14181
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14185
Index: libgfortran/generated/sum_c16.c
14186
===================================================================
14187
--- a/src/libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release)
14188
+++ b/src/libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch)
14190
retarray->offset = 0;
14191
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14193
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14194
- * extent[rank-1];
14195
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14197
- retarray->base_addr = xmalloc (alloc_size);
14198
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
14199
if (alloc_size == 0)
14201
/* Make sure we have a zero-sized array. */
14202
@@ -272,8 +271,7 @@
14206
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14207
- * extent[rank-1];
14208
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14210
retarray->offset = 0;
14211
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14212
@@ -285,7 +283,7 @@
14216
- retarray->base_addr = xmalloc (alloc_size);
14217
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
14221
@@ -430,8 +428,7 @@
14222
retarray->offset = 0;
14223
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14225
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14226
- * extent[rank-1];
14227
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14229
if (alloc_size == 0)
14231
@@ -440,7 +437,7 @@
14235
- retarray->base_addr = xmalloc (alloc_size);
14236
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
14240
Index: libgfortran/generated/transpose_c10.c
14241
===================================================================
14242
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
14243
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
14245
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14246
GFC_DESCRIPTOR_EXTENT(source, 1));
14248
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
14249
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
14250
+ sizeof (GFC_COMPLEX_10));
14252
} else if (unlikely (compile_options.bounds_check))
14254
Index: libgfortran/generated/maxloc1_16_r8.c
14255
===================================================================
14256
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
14257
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
14259
retarray->offset = 0;
14260
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14262
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14263
- * extent[rank-1];
14264
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14266
- retarray->base_addr = xmalloc (alloc_size);
14267
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14268
if (alloc_size == 0)
14270
/* Make sure we have a zero-sized array. */
14271
@@ -294,8 +293,7 @@
14275
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14276
- * extent[rank-1];
14277
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14279
retarray->offset = 0;
14280
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14281
@@ -307,7 +305,7 @@
14285
- retarray->base_addr = xmalloc (alloc_size);
14286
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14290
@@ -485,8 +483,7 @@
14291
retarray->offset = 0;
14292
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14294
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14295
- * extent[rank-1];
14296
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14298
if (alloc_size == 0)
14300
@@ -495,7 +492,7 @@
14304
- retarray->base_addr = xmalloc (alloc_size);
14305
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14309
Index: libgfortran/generated/transpose_r4.c
14310
===================================================================
14311
--- a/src/libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release)
14312
+++ b/src/libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch)
14314
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14315
GFC_DESCRIPTOR_EXTENT(source, 1));
14317
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
14318
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
14319
+ sizeof (GFC_REAL_4));
14321
} else if (unlikely (compile_options.bounds_check))
14323
Index: libgfortran/generated/cshift1_4.c
14324
===================================================================
14325
--- a/src/libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release)
14326
+++ b/src/libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch)
14331
- ret->base_addr = xmalloc (size * arraysize);
14332
+ ret->base_addr = xmallocarray (arraysize, size);
14334
ret->dtype = array->dtype;
14335
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14336
Index: libgfortran/generated/maxloc0_8_i2.c
14337
===================================================================
14338
--- a/src/libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release)
14339
+++ b/src/libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch)
14341
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14342
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14343
retarray->offset = 0;
14344
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14345
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14349
@@ -199,7 +199,7 @@
14350
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14351
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14352
retarray->offset = 0;
14353
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14354
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14358
@@ -367,7 +367,7 @@
14359
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14360
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14361
retarray->offset = 0;
14362
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
14363
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
14365
else if (unlikely (compile_options.bounds_check))
14367
Index: libgfortran/generated/count_8_l.c
14368
===================================================================
14369
--- a/src/libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release)
14370
+++ b/src/libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch)
14371
@@ -101,8 +101,7 @@
14372
retarray->offset = 0;
14373
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14375
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14376
- * extent[rank-1];
14377
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14379
if (alloc_size == 0)
14381
@@ -111,7 +110,7 @@
14385
- retarray->base_addr = xmalloc (alloc_size);
14386
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14390
Index: libgfortran/generated/in_pack_i4.c
14391
===================================================================
14392
--- a/src/libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release)
14393
+++ b/src/libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch)
14395
return source->base_addr;
14397
/* Allocate storage for the destination. */
14398
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
14399
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
14401
src = source->base_addr;
14402
stride0 = stride[0];
14403
Index: libgfortran/generated/minloc0_16_i2.c
14404
===================================================================
14405
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
14406
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
14408
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14409
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14410
retarray->offset = 0;
14411
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14412
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14416
@@ -199,7 +199,7 @@
14417
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14418
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14419
retarray->offset = 0;
14420
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14421
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14425
@@ -367,7 +367,7 @@
14426
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14427
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14428
retarray->offset = 0;
14429
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14430
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14432
else if (unlikely (compile_options.bounds_check))
14434
Index: libgfortran/generated/minloc1_8_r8.c
14435
===================================================================
14436
--- a/src/libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release)
14437
+++ b/src/libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch)
14439
retarray->offset = 0;
14440
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14442
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14443
- * extent[rank-1];
14444
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14446
- retarray->base_addr = xmalloc (alloc_size);
14447
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14448
if (alloc_size == 0)
14450
/* Make sure we have a zero-sized array. */
14451
@@ -294,8 +293,7 @@
14455
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14456
- * extent[rank-1];
14457
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14459
retarray->offset = 0;
14460
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14461
@@ -307,7 +305,7 @@
14465
- retarray->base_addr = xmalloc (alloc_size);
14466
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14470
@@ -485,8 +483,7 @@
14471
retarray->offset = 0;
14472
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14474
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14475
- * extent[rank-1];
14476
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14478
if (alloc_size == 0)
14480
@@ -495,7 +492,7 @@
14484
- retarray->base_addr = xmalloc (alloc_size);
14485
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14489
Index: libgfortran/generated/matmul_c16.c
14490
===================================================================
14491
--- a/src/libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release)
14492
+++ b/src/libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch)
14493
@@ -124,7 +124,7 @@
14496
retarray->base_addr
14497
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
14498
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
14499
retarray->offset = 0;
14501
else if (unlikely (compile_options.bounds_check))
14502
Index: libgfortran/generated/minval_i1.c
14503
===================================================================
14504
--- a/src/libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release)
14505
+++ b/src/libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch)
14507
retarray->offset = 0;
14508
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14510
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14511
- * extent[rank-1];
14512
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14514
- retarray->base_addr = xmalloc (alloc_size);
14515
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14516
if (alloc_size == 0)
14518
/* Make sure we have a zero-sized array. */
14519
@@ -286,8 +285,7 @@
14523
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14524
- * extent[rank-1];
14525
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14527
retarray->offset = 0;
14528
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14529
@@ -299,7 +297,7 @@
14533
- retarray->base_addr = xmalloc (alloc_size);
14534
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14538
@@ -472,8 +470,7 @@
14539
retarray->offset = 0;
14540
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14542
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14543
- * extent[rank-1];
14544
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14546
if (alloc_size == 0)
14548
@@ -482,7 +479,7 @@
14552
- retarray->base_addr = xmalloc (alloc_size);
14553
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14557
Index: libgfortran/generated/shape_i16.c
14558
===================================================================
14559
--- a/src/libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release)
14560
+++ b/src/libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch)
14563
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
14565
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14566
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14569
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
14570
Index: libgfortran/generated/iany_i4.c
14571
===================================================================
14572
--- a/src/libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release)
14573
+++ b/src/libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch)
14575
retarray->offset = 0;
14576
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14578
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14579
- * extent[rank-1];
14580
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14582
- retarray->base_addr = xmalloc (alloc_size);
14583
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14584
if (alloc_size == 0)
14586
/* Make sure we have a zero-sized array. */
14587
@@ -272,8 +271,7 @@
14591
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14592
- * extent[rank-1];
14593
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14595
retarray->offset = 0;
14596
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14597
@@ -285,7 +283,7 @@
14601
- retarray->base_addr = xmalloc (alloc_size);
14602
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14606
@@ -430,8 +428,7 @@
14607
retarray->offset = 0;
14608
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14610
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14611
- * extent[rank-1];
14612
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14614
if (alloc_size == 0)
14616
@@ -440,7 +437,7 @@
14620
- retarray->base_addr = xmalloc (alloc_size);
14621
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14625
Index: libgfortran/generated/minloc0_16_r16.c
14626
===================================================================
14627
--- a/src/libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release)
14628
+++ b/src/libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch)
14630
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14631
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14632
retarray->offset = 0;
14633
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14634
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14638
@@ -199,7 +199,7 @@
14639
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14640
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14641
retarray->offset = 0;
14642
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14643
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14647
@@ -367,7 +367,7 @@
14648
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14649
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14650
retarray->offset = 0;
14651
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
14652
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
14654
else if (unlikely (compile_options.bounds_check))
14656
Index: libgfortran/generated/product_i16.c
14657
===================================================================
14658
--- a/src/libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release)
14659
+++ b/src/libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch)
14661
retarray->offset = 0;
14662
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14664
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14665
- * extent[rank-1];
14666
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14668
- retarray->base_addr = xmalloc (alloc_size);
14669
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14670
if (alloc_size == 0)
14672
/* Make sure we have a zero-sized array. */
14673
@@ -272,8 +271,7 @@
14677
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14678
- * extent[rank-1];
14679
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14681
retarray->offset = 0;
14682
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14683
@@ -285,7 +283,7 @@
14687
- retarray->base_addr = xmalloc (alloc_size);
14688
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14692
@@ -430,8 +428,7 @@
14693
retarray->offset = 0;
14694
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14696
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14697
- * extent[rank-1];
14698
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14700
if (alloc_size == 0)
14702
@@ -440,7 +437,7 @@
14706
- retarray->base_addr = xmalloc (alloc_size);
14707
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
14711
Index: libgfortran/generated/unpack_i1.c
14712
===================================================================
14713
--- a/src/libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release)
14714
+++ b/src/libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch)
14719
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
14720
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
14724
@@ -244,7 +244,7 @@
14728
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
14729
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
14733
Index: libgfortran/generated/minloc0_4_i4.c
14734
===================================================================
14735
--- a/src/libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release)
14736
+++ b/src/libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch)
14738
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14739
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14740
retarray->offset = 0;
14741
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14742
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14746
@@ -199,7 +199,7 @@
14747
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14748
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14749
retarray->offset = 0;
14750
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14751
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14755
@@ -367,7 +367,7 @@
14756
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14757
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14758
retarray->offset = 0;
14759
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14760
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14762
else if (unlikely (compile_options.bounds_check))
14764
Index: libgfortran/generated/matmul_i1.c
14765
===================================================================
14766
--- a/src/libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release)
14767
+++ b/src/libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch)
14768
@@ -124,7 +124,7 @@
14771
retarray->base_addr
14772
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
14773
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
14774
retarray->offset = 0;
14776
else if (unlikely (compile_options.bounds_check))
14777
Index: libgfortran/generated/minval_r4.c
14778
===================================================================
14779
--- a/src/libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release)
14780
+++ b/src/libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch)
14782
retarray->offset = 0;
14783
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14785
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14786
- * extent[rank-1];
14787
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14789
- retarray->base_addr = xmalloc (alloc_size);
14790
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14791
if (alloc_size == 0)
14793
/* Make sure we have a zero-sized array. */
14794
@@ -286,8 +285,7 @@
14798
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14799
- * extent[rank-1];
14800
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14802
retarray->offset = 0;
14803
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14804
@@ -299,7 +297,7 @@
14808
- retarray->base_addr = xmalloc (alloc_size);
14809
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14813
@@ -472,8 +470,7 @@
14814
retarray->offset = 0;
14815
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14817
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14818
- * extent[rank-1];
14819
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14821
if (alloc_size == 0)
14823
@@ -482,7 +479,7 @@
14827
- retarray->base_addr = xmalloc (alloc_size);
14828
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14832
Index: libgfortran/generated/spread_i16.c
14833
===================================================================
14834
--- a/src/libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release)
14835
+++ b/src/libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch)
14836
@@ -101,8 +101,8 @@
14840
- /* xmalloc allocates a single byte for zero size. */
14841
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
14842
+ /* xmallocarray allocates a single byte for zero size. */
14843
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
14847
@@ -244,7 +244,7 @@
14849
if (ret->base_addr == NULL)
14851
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
14852
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
14854
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14856
Index: libgfortran/generated/sum_i4.c
14857
===================================================================
14858
--- a/src/libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release)
14859
+++ b/src/libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch)
14861
retarray->offset = 0;
14862
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14864
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14865
- * extent[rank-1];
14866
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14868
- retarray->base_addr = xmalloc (alloc_size);
14869
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14870
if (alloc_size == 0)
14872
/* Make sure we have a zero-sized array. */
14873
@@ -272,8 +271,7 @@
14877
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14878
- * extent[rank-1];
14879
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14881
retarray->offset = 0;
14882
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14883
@@ -285,7 +283,7 @@
14887
- retarray->base_addr = xmalloc (alloc_size);
14888
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14892
@@ -430,8 +428,7 @@
14893
retarray->offset = 0;
14894
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14896
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14897
- * extent[rank-1];
14898
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14900
if (alloc_size == 0)
14902
@@ -440,7 +437,7 @@
14906
- retarray->base_addr = xmalloc (alloc_size);
14907
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14911
Index: libgfortran/generated/unpack_r10.c
14912
===================================================================
14913
--- a/src/libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release)
14914
+++ b/src/libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch)
14919
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
14920
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
14924
@@ -244,7 +244,7 @@
14928
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
14929
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
14933
Index: libgfortran/generated/bessel_r16.c
14934
===================================================================
14935
--- a/src/libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release)
14936
+++ b/src/libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch)
14939
size_t size = n2 < n1 ? 0 : n2-n1+1;
14940
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14941
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
14942
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
14946
@@ -126,7 +126,7 @@
14948
size_t size = n2 < n1 ? 0 : n2-n1+1;
14949
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14950
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
14951
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
14955
@@ -166,7 +166,7 @@
14957
x2rev = GFC_REAL_16_LITERAL(2.)/x;
14959
- for (i = 2; i <= n1+n2; i++)
14960
+ for (i = 2; i <= n2 - n1; i++)
14962
#if defined(GFC_REAL_16_INFINITY)
14963
if (unlikely (last2 == -GFC_REAL_16_INFINITY))
14964
Index: libgfortran/generated/norm2_r8.c
14965
===================================================================
14966
--- a/src/libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release)
14967
+++ b/src/libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch)
14968
@@ -101,10 +101,9 @@
14969
retarray->offset = 0;
14970
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14972
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14973
- * extent[rank-1];
14974
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14976
- retarray->base_addr = xmalloc (alloc_size);
14977
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
14978
if (alloc_size == 0)
14980
/* Make sure we have a zero-sized array. */
14981
Index: libgfortran/generated/spread_i4.c
14982
===================================================================
14983
--- a/src/libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release)
14984
+++ b/src/libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch)
14985
@@ -101,8 +101,8 @@
14989
- /* xmalloc allocates a single byte for zero size. */
14990
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
14991
+ /* xmallocarray allocates a single byte for zero size. */
14992
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
14996
@@ -244,7 +244,7 @@
14998
if (ret->base_addr == NULL)
15000
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
15001
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
15003
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15005
Index: libgfortran/generated/eoshift3_8.c
15006
===================================================================
15007
--- a/src/libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release)
15008
+++ b/src/libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch)
15013
- ret->base_addr = xmalloc (size * arraysize);
15014
+ ret->base_addr = xmallocarray (arraysize, size);
15016
ret->dtype = array->dtype;
15017
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
15018
@@ -107,8 +107,8 @@
15019
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
15022
- /* xmalloc allocates a single byte for zero size. */
15023
- ret->base_addr = xmalloc (size * arraysize);
15024
+ /* xmallocarray allocates a single byte for zero size. */
15025
+ ret->base_addr = xmallocarray (arraysize, size);
15028
else if (unlikely (compile_options.bounds_check))
15029
Index: libgfortran/generated/minloc1_4_i1.c
15030
===================================================================
15031
--- a/src/libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release)
15032
+++ b/src/libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch)
15034
retarray->offset = 0;
15035
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15037
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15038
- * extent[rank-1];
15039
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15041
- retarray->base_addr = xmalloc (alloc_size);
15042
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15043
if (alloc_size == 0)
15045
/* Make sure we have a zero-sized array. */
15046
@@ -294,8 +293,7 @@
15050
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15051
- * extent[rank-1];
15052
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15054
retarray->offset = 0;
15055
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15056
@@ -307,7 +305,7 @@
15060
- retarray->base_addr = xmalloc (alloc_size);
15061
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15065
@@ -485,8 +483,7 @@
15066
retarray->offset = 0;
15067
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15069
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15070
- * extent[rank-1];
15071
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15073
if (alloc_size == 0)
15075
@@ -495,7 +492,7 @@
15079
- retarray->base_addr = xmalloc (alloc_size);
15080
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15084
Index: libgfortran/generated/minval_i2.c
15085
===================================================================
15086
--- a/src/libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release)
15087
+++ b/src/libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch)
15089
retarray->offset = 0;
15090
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15092
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15093
- * extent[rank-1];
15094
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15096
- retarray->base_addr = xmalloc (alloc_size);
15097
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15098
if (alloc_size == 0)
15100
/* Make sure we have a zero-sized array. */
15101
@@ -286,8 +285,7 @@
15105
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15106
- * extent[rank-1];
15107
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15109
retarray->offset = 0;
15110
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15111
@@ -299,7 +297,7 @@
15115
- retarray->base_addr = xmalloc (alloc_size);
15116
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15120
@@ -472,8 +470,7 @@
15121
retarray->offset = 0;
15122
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15124
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15125
- * extent[rank-1];
15126
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15128
if (alloc_size == 0)
15130
@@ -482,7 +479,7 @@
15134
- retarray->base_addr = xmalloc (alloc_size);
15135
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15139
Index: libgfortran/generated/bessel_r8.c
15140
===================================================================
15141
--- a/src/libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release)
15142
+++ b/src/libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch)
15145
size_t size = n2 < n1 ? 0 : n2-n1+1;
15146
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15147
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
15148
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
15152
@@ -122,7 +122,7 @@
15154
size_t size = n2 < n1 ? 0 : n2-n1+1;
15155
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15156
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
15157
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
15161
@@ -162,7 +162,7 @@
15163
x2rev = GFC_REAL_8_LITERAL(2.)/x;
15165
- for (i = 2; i <= n1+n2; i++)
15166
+ for (i = 2; i <= n2 - n1; i++)
15168
#if defined(GFC_REAL_8_INFINITY)
15169
if (unlikely (last2 == -GFC_REAL_8_INFINITY))
15170
Index: libgfortran/generated/unpack_r4.c
15171
===================================================================
15172
--- a/src/libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release)
15173
+++ b/src/libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch)
15178
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
15179
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
15183
@@ -244,7 +244,7 @@
15187
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
15188
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
15192
Index: libgfortran/generated/product_r8.c
15193
===================================================================
15194
--- a/src/libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release)
15195
+++ b/src/libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch)
15197
retarray->offset = 0;
15198
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15200
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15201
- * extent[rank-1];
15202
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15204
- retarray->base_addr = xmalloc (alloc_size);
15205
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
15206
if (alloc_size == 0)
15208
/* Make sure we have a zero-sized array. */
15209
@@ -272,8 +271,7 @@
15213
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15214
- * extent[rank-1];
15215
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15217
retarray->offset = 0;
15218
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15219
@@ -285,7 +283,7 @@
15223
- retarray->base_addr = xmalloc (alloc_size);
15224
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
15228
@@ -430,8 +428,7 @@
15229
retarray->offset = 0;
15230
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15232
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15233
- * extent[rank-1];
15234
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15236
if (alloc_size == 0)
15238
@@ -440,7 +437,7 @@
15242
- retarray->base_addr = xmalloc (alloc_size);
15243
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
15247
Index: libgfortran/generated/matmul_r4.c
15248
===================================================================
15249
--- a/src/libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release)
15250
+++ b/src/libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch)
15251
@@ -124,7 +124,7 @@
15254
retarray->base_addr
15255
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
15256
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
15257
retarray->offset = 0;
15259
else if (unlikely (compile_options.bounds_check))
15260
Index: libgfortran/generated/unpack_i2.c
15261
===================================================================
15262
--- a/src/libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release)
15263
+++ b/src/libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch)
15268
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
15269
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
15273
@@ -244,7 +244,7 @@
15277
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
15278
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
15282
Index: libgfortran/generated/in_pack_r8.c
15283
===================================================================
15284
--- a/src/libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release)
15285
+++ b/src/libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch)
15287
return source->base_addr;
15289
/* Allocate storage for the destination. */
15290
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
15291
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
15293
src = source->base_addr;
15294
stride0 = stride[0];
15295
Index: libgfortran/generated/maxloc1_4_r16.c
15296
===================================================================
15297
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
15298
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
15300
retarray->offset = 0;
15301
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15303
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15304
- * extent[rank-1];
15305
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15307
- retarray->base_addr = xmalloc (alloc_size);
15308
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15309
if (alloc_size == 0)
15311
/* Make sure we have a zero-sized array. */
15312
@@ -294,8 +293,7 @@
15316
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15317
- * extent[rank-1];
15318
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15320
retarray->offset = 0;
15321
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15322
@@ -307,7 +305,7 @@
15326
- retarray->base_addr = xmalloc (alloc_size);
15327
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15331
@@ -485,8 +483,7 @@
15332
retarray->offset = 0;
15333
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15335
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15336
- * extent[rank-1];
15337
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15339
if (alloc_size == 0)
15341
@@ -495,7 +492,7 @@
15345
- retarray->base_addr = xmalloc (alloc_size);
15346
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15350
Index: libgfortran/generated/minloc0_8_r16.c
15351
===================================================================
15352
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
15353
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
15355
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15356
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15357
retarray->offset = 0;
15358
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15359
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15363
@@ -199,7 +199,7 @@
15364
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15365
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15366
retarray->offset = 0;
15367
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15368
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15372
@@ -367,7 +367,7 @@
15373
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15374
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15375
retarray->offset = 0;
15376
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15377
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15379
else if (unlikely (compile_options.bounds_check))
15381
Index: libgfortran/generated/reshape_c8.c
15382
===================================================================
15383
--- a/src/libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release)
15384
+++ b/src/libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch)
15385
@@ -111,11 +111,11 @@
15388
if (unlikely (rs < 1))
15392
- alloc_size = rs * sizeof (GFC_COMPLEX_8);
15395
- ret->base_addr = xmalloc (alloc_size);
15396
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
15397
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15400
Index: libgfortran/generated/iparity_i8.c
15401
===================================================================
15402
--- a/src/libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release)
15403
+++ b/src/libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch)
15405
retarray->offset = 0;
15406
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15408
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15409
- * extent[rank-1];
15410
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15412
- retarray->base_addr = xmalloc (alloc_size);
15413
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15414
if (alloc_size == 0)
15416
/* Make sure we have a zero-sized array. */
15417
@@ -272,8 +271,7 @@
15421
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15422
- * extent[rank-1];
15423
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15425
retarray->offset = 0;
15426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15427
@@ -285,7 +283,7 @@
15431
- retarray->base_addr = xmalloc (alloc_size);
15432
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15436
@@ -430,8 +428,7 @@
15437
retarray->offset = 0;
15438
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15440
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15441
- * extent[rank-1];
15442
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15444
if (alloc_size == 0)
15446
@@ -440,7 +437,7 @@
15450
- retarray->base_addr = xmalloc (alloc_size);
15451
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15455
Index: libgfortran/generated/count_1_l.c
15456
===================================================================
15457
--- a/src/libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release)
15458
+++ b/src/libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch)
15459
@@ -101,8 +101,7 @@
15460
retarray->offset = 0;
15461
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15463
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15464
- * extent[rank-1];
15465
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15467
if (alloc_size == 0)
15469
@@ -111,7 +110,7 @@
15473
- retarray->base_addr = xmalloc (alloc_size);
15474
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15478
Index: libgfortran/generated/maxloc0_8_i4.c
15479
===================================================================
15480
--- a/src/libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release)
15481
+++ b/src/libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch)
15483
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15484
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15485
retarray->offset = 0;
15486
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15487
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15491
@@ -199,7 +199,7 @@
15492
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15493
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15494
retarray->offset = 0;
15495
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15496
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15500
@@ -367,7 +367,7 @@
15501
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15502
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15503
retarray->offset = 0;
15504
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15505
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15507
else if (unlikely (compile_options.bounds_check))
15509
Index: libgfortran/generated/matmul_i2.c
15510
===================================================================
15511
--- a/src/libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release)
15512
+++ b/src/libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch)
15513
@@ -124,7 +124,7 @@
15516
retarray->base_addr
15517
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
15518
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
15519
retarray->offset = 0;
15521
else if (unlikely (compile_options.bounds_check))
15522
Index: libgfortran/generated/minloc1_4_r4.c
15523
===================================================================
15524
--- a/src/libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release)
15525
+++ b/src/libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch)
15527
retarray->offset = 0;
15528
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15530
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15531
- * extent[rank-1];
15532
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15534
- retarray->base_addr = xmalloc (alloc_size);
15535
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15536
if (alloc_size == 0)
15538
/* Make sure we have a zero-sized array. */
15539
@@ -294,8 +293,7 @@
15543
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15544
- * extent[rank-1];
15545
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15547
retarray->offset = 0;
15548
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15549
@@ -307,7 +305,7 @@
15553
- retarray->base_addr = xmalloc (alloc_size);
15554
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15558
@@ -485,8 +483,7 @@
15559
retarray->offset = 0;
15560
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15562
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15563
- * extent[rank-1];
15564
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15566
if (alloc_size == 0)
15568
@@ -495,7 +492,7 @@
15572
- retarray->base_addr = xmalloc (alloc_size);
15573
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15577
Index: libgfortran/generated/transpose_i16.c
15578
===================================================================
15579
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
15580
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
15582
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15583
GFC_DESCRIPTOR_EXTENT(source, 1));
15585
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
15586
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15587
+ sizeof (GFC_INTEGER_16));
15589
} else if (unlikely (compile_options.bounds_check))
15591
Index: libgfortran/generated/minloc0_16_i4.c
15592
===================================================================
15593
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
15594
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
15596
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15597
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15598
retarray->offset = 0;
15599
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15600
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15604
@@ -199,7 +199,7 @@
15605
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15606
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15607
retarray->offset = 0;
15608
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15609
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15613
@@ -367,7 +367,7 @@
15614
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15615
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15616
retarray->offset = 0;
15617
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15618
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15620
else if (unlikely (compile_options.bounds_check))
15622
Index: libgfortran/generated/transpose_i4.c
15623
===================================================================
15624
--- a/src/libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release)
15625
+++ b/src/libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch)
15627
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15628
GFC_DESCRIPTOR_EXTENT(source, 1));
15630
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
15631
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15632
+ sizeof (GFC_INTEGER_4));
15634
} else if (unlikely (compile_options.bounds_check))
15636
Index: libgfortran/generated/maxloc1_16_i8.c
15637
===================================================================
15638
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
15639
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
15641
retarray->offset = 0;
15642
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15644
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15645
- * extent[rank-1];
15646
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15648
- retarray->base_addr = xmalloc (alloc_size);
15649
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15650
if (alloc_size == 0)
15652
/* Make sure we have a zero-sized array. */
15653
@@ -294,8 +293,7 @@
15657
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15658
- * extent[rank-1];
15659
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15661
retarray->offset = 0;
15662
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15663
@@ -307,7 +305,7 @@
15667
- retarray->base_addr = xmalloc (alloc_size);
15668
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15672
@@ -485,8 +483,7 @@
15673
retarray->offset = 0;
15674
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15676
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15677
- * extent[rank-1];
15678
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15680
if (alloc_size == 0)
15682
@@ -495,7 +492,7 @@
15686
- retarray->base_addr = xmalloc (alloc_size);
15687
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15691
Index: libgfortran/generated/minloc1_4_i2.c
15692
===================================================================
15693
--- a/src/libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release)
15694
+++ b/src/libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch)
15696
retarray->offset = 0;
15697
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15699
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15700
- * extent[rank-1];
15701
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15703
- retarray->base_addr = xmalloc (alloc_size);
15704
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15705
if (alloc_size == 0)
15707
/* Make sure we have a zero-sized array. */
15708
@@ -294,8 +293,7 @@
15712
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15713
- * extent[rank-1];
15714
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15716
retarray->offset = 0;
15717
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15718
@@ -307,7 +305,7 @@
15722
- retarray->base_addr = xmalloc (alloc_size);
15723
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15727
@@ -485,8 +483,7 @@
15728
retarray->offset = 0;
15729
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15731
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15732
- * extent[rank-1];
15733
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15735
if (alloc_size == 0)
15737
@@ -495,7 +492,7 @@
15741
- retarray->base_addr = xmalloc (alloc_size);
15742
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15746
Index: libgfortran/generated/matmul_l16.c
15747
===================================================================
15748
--- a/src/libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release)
15749
+++ b/src/libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch)
15753
retarray->base_addr
15754
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
15755
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
15756
retarray->offset = 0;
15758
else if (unlikely (compile_options.bounds_check))
15759
Index: libgfortran/generated/maxloc1_8_i1.c
15760
===================================================================
15761
--- a/src/libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release)
15762
+++ b/src/libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch)
15764
retarray->offset = 0;
15765
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15767
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15768
- * extent[rank-1];
15769
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15771
- retarray->base_addr = xmalloc (alloc_size);
15772
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15773
if (alloc_size == 0)
15775
/* Make sure we have a zero-sized array. */
15776
@@ -294,8 +293,7 @@
15780
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15781
- * extent[rank-1];
15782
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15784
retarray->offset = 0;
15785
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15786
@@ -307,7 +305,7 @@
15790
- retarray->base_addr = xmalloc (alloc_size);
15791
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15795
@@ -485,8 +483,7 @@
15796
retarray->offset = 0;
15797
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15799
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15800
- * extent[rank-1];
15801
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15803
if (alloc_size == 0)
15805
@@ -495,7 +492,7 @@
15809
- retarray->base_addr = xmalloc (alloc_size);
15810
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15814
Index: libgfortran/generated/minloc1_8_i8.c
15815
===================================================================
15816
--- a/src/libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release)
15817
+++ b/src/libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch)
15819
retarray->offset = 0;
15820
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15822
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15823
- * extent[rank-1];
15824
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15826
- retarray->base_addr = xmalloc (alloc_size);
15827
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15828
if (alloc_size == 0)
15830
/* Make sure we have a zero-sized array. */
15831
@@ -294,8 +293,7 @@
15835
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15836
- * extent[rank-1];
15837
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15839
retarray->offset = 0;
15840
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15841
@@ -307,7 +305,7 @@
15845
- retarray->base_addr = xmalloc (alloc_size);
15846
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15850
@@ -485,8 +483,7 @@
15851
retarray->offset = 0;
15852
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15854
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15855
- * extent[rank-1];
15856
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15858
if (alloc_size == 0)
15860
@@ -495,7 +492,7 @@
15864
- retarray->base_addr = xmalloc (alloc_size);
15865
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15869
Index: libgfortran/generated/minloc0_4_r8.c
15870
===================================================================
15871
--- a/src/libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release)
15872
+++ b/src/libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch)
15874
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15875
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15876
retarray->offset = 0;
15877
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15878
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15882
@@ -199,7 +199,7 @@
15883
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15884
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15885
retarray->offset = 0;
15886
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15887
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15891
@@ -367,7 +367,7 @@
15892
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15893
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15894
retarray->offset = 0;
15895
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15896
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15898
else if (unlikely (compile_options.bounds_check))
15900
Index: libgfortran/generated/product_r16.c
15901
===================================================================
15902
--- a/src/libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release)
15903
+++ b/src/libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch)
15905
retarray->offset = 0;
15906
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15908
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15909
- * extent[rank-1];
15910
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15912
- retarray->base_addr = xmalloc (alloc_size);
15913
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15914
if (alloc_size == 0)
15916
/* Make sure we have a zero-sized array. */
15917
@@ -272,8 +271,7 @@
15921
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15922
- * extent[rank-1];
15923
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15925
retarray->offset = 0;
15926
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15927
@@ -285,7 +283,7 @@
15931
- retarray->base_addr = xmalloc (alloc_size);
15932
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15936
@@ -430,8 +428,7 @@
15937
retarray->offset = 0;
15938
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15940
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15941
- * extent[rank-1];
15942
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15944
if (alloc_size == 0)
15946
@@ -440,7 +437,7 @@
15950
- retarray->base_addr = xmalloc (alloc_size);
15951
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15955
Index: libgfortran/generated/sum_r8.c
15956
===================================================================
15957
--- a/src/libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release)
15958
+++ b/src/libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch)
15960
retarray->offset = 0;
15961
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15963
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15964
- * extent[rank-1];
15965
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15967
- retarray->base_addr = xmalloc (alloc_size);
15968
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
15969
if (alloc_size == 0)
15971
/* Make sure we have a zero-sized array. */
15972
@@ -272,8 +271,7 @@
15976
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15977
- * extent[rank-1];
15978
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15980
retarray->offset = 0;
15981
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15982
@@ -285,7 +283,7 @@
15986
- retarray->base_addr = xmalloc (alloc_size);
15987
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
15991
@@ -430,8 +428,7 @@
15992
retarray->offset = 0;
15993
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15995
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15996
- * extent[rank-1];
15997
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15999
if (alloc_size == 0)
16001
@@ -440,7 +437,7 @@
16005
- retarray->base_addr = xmalloc (alloc_size);
16006
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
16010
Index: libgfortran/generated/norm2_r10.c
16011
===================================================================
16012
--- a/src/libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release)
16013
+++ b/src/libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch)
16014
@@ -101,10 +101,9 @@
16015
retarray->offset = 0;
16016
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16018
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16019
- * extent[rank-1];
16020
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16022
- retarray->base_addr = xmalloc (alloc_size);
16023
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
16024
if (alloc_size == 0)
16026
/* Make sure we have a zero-sized array. */
16027
Index: libgfortran/generated/unpack_c10.c
16028
===================================================================
16029
--- a/src/libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release)
16030
+++ b/src/libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch)
16035
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
16036
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
16040
@@ -244,7 +244,7 @@
16044
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
16045
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
16049
Index: libgfortran/generated/spread_r8.c
16050
===================================================================
16051
--- a/src/libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release)
16052
+++ b/src/libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch)
16053
@@ -101,8 +101,8 @@
16057
- /* xmalloc allocates a single byte for zero size. */
16058
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
16059
+ /* xmallocarray allocates a single byte for zero size. */
16060
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
16064
@@ -244,7 +244,7 @@
16066
if (ret->base_addr == NULL)
16068
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
16069
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
16071
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16073
Index: libgfortran/generated/minloc1_16_i16.c
16074
===================================================================
16075
--- a/src/libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release)
16076
+++ b/src/libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch)
16078
retarray->offset = 0;
16079
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16081
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16082
- * extent[rank-1];
16083
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16085
- retarray->base_addr = xmalloc (alloc_size);
16086
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16087
if (alloc_size == 0)
16089
/* Make sure we have a zero-sized array. */
16090
@@ -294,8 +293,7 @@
16094
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16095
- * extent[rank-1];
16096
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16098
retarray->offset = 0;
16099
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16100
@@ -307,7 +305,7 @@
16104
- retarray->base_addr = xmalloc (alloc_size);
16105
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16109
@@ -485,8 +483,7 @@
16110
retarray->offset = 0;
16111
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16113
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16114
- * extent[rank-1];
16115
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16117
if (alloc_size == 0)
16119
@@ -495,7 +492,7 @@
16123
- retarray->base_addr = xmalloc (alloc_size);
16124
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16128
Index: libgfortran/generated/maxloc1_8_r4.c
16129
===================================================================
16130
--- a/src/libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release)
16131
+++ b/src/libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch)
16133
retarray->offset = 0;
16134
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16136
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16137
- * extent[rank-1];
16138
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16140
- retarray->base_addr = xmalloc (alloc_size);
16141
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16142
if (alloc_size == 0)
16144
/* Make sure we have a zero-sized array. */
16145
@@ -294,8 +293,7 @@
16149
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16150
- * extent[rank-1];
16151
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16153
retarray->offset = 0;
16154
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16155
@@ -307,7 +305,7 @@
16159
- retarray->base_addr = xmalloc (alloc_size);
16160
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16164
@@ -485,8 +483,7 @@
16165
retarray->offset = 0;
16166
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16168
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16169
- * extent[rank-1];
16170
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16172
if (alloc_size == 0)
16174
@@ -495,7 +492,7 @@
16178
- retarray->base_addr = xmalloc (alloc_size);
16179
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16183
Index: libgfortran/generated/minloc1_16_i1.c
16184
===================================================================
16185
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
16186
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
16188
retarray->offset = 0;
16189
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16191
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16192
- * extent[rank-1];
16193
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16195
- retarray->base_addr = xmalloc (alloc_size);
16196
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16197
if (alloc_size == 0)
16199
/* Make sure we have a zero-sized array. */
16200
@@ -294,8 +293,7 @@
16204
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16205
- * extent[rank-1];
16206
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16208
retarray->offset = 0;
16209
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16210
@@ -307,7 +305,7 @@
16214
- retarray->base_addr = xmalloc (alloc_size);
16215
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16219
@@ -485,8 +483,7 @@
16220
retarray->offset = 0;
16221
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16223
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16224
- * extent[rank-1];
16225
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16227
if (alloc_size == 0)
16229
@@ -495,7 +492,7 @@
16233
- retarray->base_addr = xmalloc (alloc_size);
16234
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16238
Index: libgfortran/generated/spread_r16.c
16239
===================================================================
16240
--- a/src/libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release)
16241
+++ b/src/libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch)
16242
@@ -101,8 +101,8 @@
16246
- /* xmalloc allocates a single byte for zero size. */
16247
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
16248
+ /* xmallocarray allocates a single byte for zero size. */
16249
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
16253
@@ -244,7 +244,7 @@
16255
if (ret->base_addr == NULL)
16257
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
16258
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
16260
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16262
Index: libgfortran/generated/pack_c8.c
16263
===================================================================
16264
--- a/src/libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release)
16265
+++ b/src/libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch)
16266
@@ -167,8 +167,8 @@
16270
- /* xmalloc allocates a single byte for zero size. */
16271
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
16272
+ /* xmallocarray allocates a single byte for zero size. */
16273
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
16277
Index: libgfortran/generated/minval_r10.c
16278
===================================================================
16279
--- a/src/libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release)
16280
+++ b/src/libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch)
16282
retarray->offset = 0;
16283
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16285
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16286
- * extent[rank-1];
16287
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16289
- retarray->base_addr = xmalloc (alloc_size);
16290
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
16291
if (alloc_size == 0)
16293
/* Make sure we have a zero-sized array. */
16294
@@ -286,8 +285,7 @@
16298
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16299
- * extent[rank-1];
16300
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16302
retarray->offset = 0;
16303
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16304
@@ -299,7 +297,7 @@
16308
- retarray->base_addr = xmalloc (alloc_size);
16309
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
16313
@@ -472,8 +470,7 @@
16314
retarray->offset = 0;
16315
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16317
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16318
- * extent[rank-1];
16319
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16321
if (alloc_size == 0)
16323
@@ -482,7 +479,7 @@
16327
- retarray->base_addr = xmalloc (alloc_size);
16328
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
16332
Index: libgfortran/generated/parity_l8.c
16333
===================================================================
16334
--- a/src/libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release)
16335
+++ b/src/libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch)
16337
retarray->offset = 0;
16338
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16340
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16341
- * extent[rank-1];
16342
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16344
- retarray->base_addr = xmalloc (alloc_size);
16345
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
16346
if (alloc_size == 0)
16348
/* Make sure we have a zero-sized array. */
16349
Index: libgfortran/generated/minval_i4.c
16350
===================================================================
16351
--- a/src/libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release)
16352
+++ b/src/libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch)
16354
retarray->offset = 0;
16355
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16357
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16358
- * extent[rank-1];
16359
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16361
- retarray->base_addr = xmalloc (alloc_size);
16362
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16363
if (alloc_size == 0)
16365
/* Make sure we have a zero-sized array. */
16366
@@ -286,8 +285,7 @@
16370
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16371
- * extent[rank-1];
16372
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16374
retarray->offset = 0;
16375
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16376
@@ -299,7 +297,7 @@
16380
- retarray->base_addr = xmalloc (alloc_size);
16381
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16385
@@ -472,8 +470,7 @@
16386
retarray->offset = 0;
16387
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16389
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16390
- * extent[rank-1];
16391
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16393
if (alloc_size == 0)
16395
@@ -482,7 +479,7 @@
16399
- retarray->base_addr = xmalloc (alloc_size);
16400
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16404
Index: libgfortran/generated/maxloc1_8_i2.c
16405
===================================================================
16406
--- a/src/libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release)
16407
+++ b/src/libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch)
16409
retarray->offset = 0;
16410
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16412
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16413
- * extent[rank-1];
16414
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16416
- retarray->base_addr = xmalloc (alloc_size);
16417
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16418
if (alloc_size == 0)
16420
/* Make sure we have a zero-sized array. */
16421
@@ -294,8 +293,7 @@
16425
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16426
- * extent[rank-1];
16427
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16429
retarray->offset = 0;
16430
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16431
@@ -307,7 +305,7 @@
16435
- retarray->base_addr = xmalloc (alloc_size);
16436
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16440
@@ -485,8 +483,7 @@
16441
retarray->offset = 0;
16442
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16444
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16445
- * extent[rank-1];
16446
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16448
if (alloc_size == 0)
16450
@@ -495,7 +492,7 @@
16454
- retarray->base_addr = xmalloc (alloc_size);
16455
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16459
Index: libgfortran/generated/any_l8.c
16460
===================================================================
16461
--- a/src/libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release)
16462
+++ b/src/libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch)
16463
@@ -101,8 +101,7 @@
16464
retarray->offset = 0;
16465
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16467
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16468
- * extent[rank-1];
16469
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16471
if (alloc_size == 0)
16473
@@ -111,7 +110,7 @@
16477
- retarray->base_addr = xmalloc (alloc_size);
16478
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
16482
Index: libgfortran/generated/maxloc0_16_r10.c
16483
===================================================================
16484
--- a/src/libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release)
16485
+++ b/src/libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch)
16487
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16488
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16489
retarray->offset = 0;
16490
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16491
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16495
@@ -199,7 +199,7 @@
16496
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16497
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16498
retarray->offset = 0;
16499
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16500
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16504
@@ -367,7 +367,7 @@
16505
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16506
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16507
retarray->offset = 0;
16508
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16509
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16511
else if (unlikely (compile_options.bounds_check))
16513
Index: libgfortran/generated/minloc0_4_i16.c
16514
===================================================================
16515
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
16516
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
16518
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16519
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16520
retarray->offset = 0;
16521
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16522
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16526
@@ -199,7 +199,7 @@
16527
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16528
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16529
retarray->offset = 0;
16530
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16531
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16535
@@ -367,7 +367,7 @@
16536
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16537
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16538
retarray->offset = 0;
16539
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16540
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16542
else if (unlikely (compile_options.bounds_check))
16544
Index: libgfortran/generated/maxloc0_8_r8.c
16545
===================================================================
16546
--- a/src/libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release)
16547
+++ b/src/libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch)
16549
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16550
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16551
retarray->offset = 0;
16552
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16553
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16557
@@ -199,7 +199,7 @@
16558
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16559
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16560
retarray->offset = 0;
16561
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16562
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16566
@@ -367,7 +367,7 @@
16567
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16568
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16569
retarray->offset = 0;
16570
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16571
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16573
else if (unlikely (compile_options.bounds_check))
16575
Index: libgfortran/generated/minloc1_4_r10.c
16576
===================================================================
16577
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
16578
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
16580
retarray->offset = 0;
16581
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16583
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16584
- * extent[rank-1];
16585
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16587
- retarray->base_addr = xmalloc (alloc_size);
16588
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16589
if (alloc_size == 0)
16591
/* Make sure we have a zero-sized array. */
16592
@@ -294,8 +293,7 @@
16596
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16597
- * extent[rank-1];
16598
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16600
retarray->offset = 0;
16601
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16602
@@ -307,7 +305,7 @@
16606
- retarray->base_addr = xmalloc (alloc_size);
16607
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16611
@@ -485,8 +483,7 @@
16612
retarray->offset = 0;
16613
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16615
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16616
- * extent[rank-1];
16617
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16619
if (alloc_size == 0)
16621
@@ -495,7 +492,7 @@
16625
- retarray->base_addr = xmalloc (alloc_size);
16626
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16630
Index: libgfortran/generated/minloc1_8_i16.c
16631
===================================================================
16632
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
16633
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
16635
retarray->offset = 0;
16636
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16638
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16639
- * extent[rank-1];
16640
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16642
- retarray->base_addr = xmalloc (alloc_size);
16643
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16644
if (alloc_size == 0)
16646
/* Make sure we have a zero-sized array. */
16647
@@ -294,8 +293,7 @@
16651
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16652
- * extent[rank-1];
16653
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16655
retarray->offset = 0;
16656
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16657
@@ -307,7 +305,7 @@
16661
- retarray->base_addr = xmalloc (alloc_size);
16662
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16666
@@ -485,8 +483,7 @@
16667
retarray->offset = 0;
16668
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16670
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16671
- * extent[rank-1];
16672
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16674
if (alloc_size == 0)
16676
@@ -495,7 +492,7 @@
16680
- retarray->base_addr = xmalloc (alloc_size);
16681
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16685
Index: libgfortran/generated/maxloc0_8_r10.c
16686
===================================================================
16687
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
16688
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
16690
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16691
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16692
retarray->offset = 0;
16693
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16694
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16698
@@ -199,7 +199,7 @@
16699
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16700
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16701
retarray->offset = 0;
16702
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16703
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16707
@@ -367,7 +367,7 @@
16708
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16709
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16710
retarray->offset = 0;
16711
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16712
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16714
else if (unlikely (compile_options.bounds_check))
16716
Index: libgfortran/generated/unpack_i4.c
16717
===================================================================
16718
--- a/src/libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release)
16719
+++ b/src/libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch)
16724
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
16725
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
16729
@@ -244,7 +244,7 @@
16733
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
16734
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
16738
Index: libgfortran/generated/minloc1_16_r4.c
16739
===================================================================
16740
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
16741
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
16743
retarray->offset = 0;
16744
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16746
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16747
- * extent[rank-1];
16748
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16750
- retarray->base_addr = xmalloc (alloc_size);
16751
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16752
if (alloc_size == 0)
16754
/* Make sure we have a zero-sized array. */
16755
@@ -294,8 +293,7 @@
16759
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16760
- * extent[rank-1];
16761
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16763
retarray->offset = 0;
16764
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16765
@@ -307,7 +305,7 @@
16769
- retarray->base_addr = xmalloc (alloc_size);
16770
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16774
@@ -485,8 +483,7 @@
16775
retarray->offset = 0;
16776
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16778
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16779
- * extent[rank-1];
16780
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16782
if (alloc_size == 0)
16784
@@ -495,7 +492,7 @@
16788
- retarray->base_addr = xmalloc (alloc_size);
16789
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16793
Index: libgfortran/generated/product_i8.c
16794
===================================================================
16795
--- a/src/libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release)
16796
+++ b/src/libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch)
16798
retarray->offset = 0;
16799
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16801
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16802
- * extent[rank-1];
16803
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16805
- retarray->base_addr = xmalloc (alloc_size);
16806
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16807
if (alloc_size == 0)
16809
/* Make sure we have a zero-sized array. */
16810
@@ -272,8 +271,7 @@
16814
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16815
- * extent[rank-1];
16816
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16818
retarray->offset = 0;
16819
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16820
@@ -285,7 +283,7 @@
16824
- retarray->base_addr = xmalloc (alloc_size);
16825
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16829
@@ -430,8 +428,7 @@
16830
retarray->offset = 0;
16831
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16833
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16834
- * extent[rank-1];
16835
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16837
if (alloc_size == 0)
16839
@@ -440,7 +437,7 @@
16843
- retarray->base_addr = xmalloc (alloc_size);
16844
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16848
Index: libgfortran/generated/minloc0_16_r8.c
16849
===================================================================
16850
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
16851
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
16853
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16854
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16855
retarray->offset = 0;
16856
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16857
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16861
@@ -199,7 +199,7 @@
16862
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16863
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16864
retarray->offset = 0;
16865
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16866
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16870
@@ -367,7 +367,7 @@
16871
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16872
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16873
retarray->offset = 0;
16874
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16875
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16877
else if (unlikely (compile_options.bounds_check))
16879
Index: libgfortran/generated/count_2_l.c
16880
===================================================================
16881
--- a/src/libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release)
16882
+++ b/src/libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch)
16883
@@ -101,8 +101,7 @@
16884
retarray->offset = 0;
16885
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16887
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16888
- * extent[rank-1];
16889
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16891
if (alloc_size == 0)
16893
@@ -111,7 +110,7 @@
16897
- retarray->base_addr = xmalloc (alloc_size);
16898
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16902
Index: libgfortran/generated/transpose_r8.c
16903
===================================================================
16904
--- a/src/libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release)
16905
+++ b/src/libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch)
16907
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16908
GFC_DESCRIPTOR_EXTENT(source, 1));
16910
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
16911
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16912
+ sizeof (GFC_REAL_8));
16914
} else if (unlikely (compile_options.bounds_check))
16916
Index: libgfortran/generated/cshift1_8.c
16917
===================================================================
16918
--- a/src/libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release)
16919
+++ b/src/libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch)
16924
- ret->base_addr = xmalloc (size * arraysize);
16925
+ ret->base_addr = xmallocarray (arraysize, size);
16927
ret->dtype = array->dtype;
16928
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16929
Index: libgfortran/generated/matmul_i4.c
16930
===================================================================
16931
--- a/src/libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release)
16932
+++ b/src/libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch)
16933
@@ -124,7 +124,7 @@
16936
retarray->base_addr
16937
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
16938
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
16939
retarray->offset = 0;
16941
else if (unlikely (compile_options.bounds_check))
16942
Index: libgfortran/generated/pack_r10.c
16943
===================================================================
16944
--- a/src/libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release)
16945
+++ b/src/libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch)
16946
@@ -167,8 +167,8 @@
16950
- /* xmalloc allocates a single byte for zero size. */
16951
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
16952
+ /* xmallocarray allocates a single byte for zero size. */
16953
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
16957
Index: libgfortran/generated/minloc1_16_i2.c
16958
===================================================================
16959
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
16960
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
16962
retarray->offset = 0;
16963
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16965
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16966
- * extent[rank-1];
16967
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16969
- retarray->base_addr = xmalloc (alloc_size);
16970
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16971
if (alloc_size == 0)
16973
/* Make sure we have a zero-sized array. */
16974
@@ -294,8 +293,7 @@
16978
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16979
- * extent[rank-1];
16980
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16982
retarray->offset = 0;
16983
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16984
@@ -307,7 +305,7 @@
16988
- retarray->base_addr = xmalloc (alloc_size);
16989
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16993
@@ -485,8 +483,7 @@
16994
retarray->offset = 0;
16995
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16997
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16998
- * extent[rank-1];
16999
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17001
if (alloc_size == 0)
17003
@@ -495,7 +492,7 @@
17007
- retarray->base_addr = xmalloc (alloc_size);
17008
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17012
Index: libgfortran/generated/in_pack_i8.c
17013
===================================================================
17014
--- a/src/libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release)
17015
+++ b/src/libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch)
17017
return source->base_addr;
17019
/* Allocate storage for the destination. */
17020
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
17021
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
17023
src = source->base_addr;
17024
stride0 = stride[0];
17025
Index: libgfortran/generated/transpose_r16.c
17026
===================================================================
17027
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
17028
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
17030
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17031
GFC_DESCRIPTOR_EXTENT(source, 1));
17033
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
17034
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17035
+ sizeof (GFC_REAL_16));
17037
} else if (unlikely (compile_options.bounds_check))
17039
Index: libgfortran/generated/minloc1_4_i4.c
17040
===================================================================
17041
--- a/src/libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release)
17042
+++ b/src/libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch)
17044
retarray->offset = 0;
17045
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17047
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17048
- * extent[rank-1];
17049
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17051
- retarray->base_addr = xmalloc (alloc_size);
17052
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17053
if (alloc_size == 0)
17055
/* Make sure we have a zero-sized array. */
17056
@@ -294,8 +293,7 @@
17060
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17061
- * extent[rank-1];
17062
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17064
retarray->offset = 0;
17065
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17066
@@ -307,7 +305,7 @@
17070
- retarray->base_addr = xmalloc (alloc_size);
17071
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17075
@@ -485,8 +483,7 @@
17076
retarray->offset = 0;
17077
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17079
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17080
- * extent[rank-1];
17081
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17083
if (alloc_size == 0)
17085
@@ -495,7 +492,7 @@
17089
- retarray->base_addr = xmalloc (alloc_size);
17090
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17094
Index: libgfortran/generated/maxval_i1.c
17095
===================================================================
17096
--- a/src/libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release)
17097
+++ b/src/libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch)
17099
retarray->offset = 0;
17100
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17102
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17103
- * extent[rank-1];
17104
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17106
- retarray->base_addr = xmalloc (alloc_size);
17107
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17108
if (alloc_size == 0)
17110
/* Make sure we have a zero-sized array. */
17111
@@ -286,8 +285,7 @@
17115
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17116
- * extent[rank-1];
17117
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17119
retarray->offset = 0;
17120
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17121
@@ -299,7 +297,7 @@
17125
- retarray->base_addr = xmalloc (alloc_size);
17126
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17130
@@ -472,8 +470,7 @@
17131
retarray->offset = 0;
17132
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17134
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17135
- * extent[rank-1];
17136
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17138
if (alloc_size == 0)
17140
@@ -482,7 +479,7 @@
17144
- retarray->base_addr = xmalloc (alloc_size);
17145
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17149
Index: libgfortran/generated/product_c16.c
17150
===================================================================
17151
--- a/src/libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release)
17152
+++ b/src/libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch)
17154
retarray->offset = 0;
17155
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17157
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17158
- * extent[rank-1];
17159
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17161
- retarray->base_addr = xmalloc (alloc_size);
17162
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17163
if (alloc_size == 0)
17165
/* Make sure we have a zero-sized array. */
17166
@@ -272,8 +271,7 @@
17170
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17171
- * extent[rank-1];
17172
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17174
retarray->offset = 0;
17175
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17176
@@ -285,7 +283,7 @@
17180
- retarray->base_addr = xmalloc (alloc_size);
17181
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17185
@@ -430,8 +428,7 @@
17186
retarray->offset = 0;
17187
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17189
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17190
- * extent[rank-1];
17191
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17193
if (alloc_size == 0)
17195
@@ -440,7 +437,7 @@
17199
- retarray->base_addr = xmalloc (alloc_size);
17200
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17204
Index: libgfortran/generated/reshape_r4.c
17205
===================================================================
17206
--- a/src/libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release)
17207
+++ b/src/libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch)
17208
@@ -111,11 +111,11 @@
17211
if (unlikely (rs < 1))
17215
- alloc_size = rs * sizeof (GFC_REAL_4);
17218
- ret->base_addr = xmalloc (alloc_size);
17219
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17220
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17223
Index: libgfortran/generated/iany_i8.c
17224
===================================================================
17225
--- a/src/libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release)
17226
+++ b/src/libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch)
17228
retarray->offset = 0;
17229
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17231
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17232
- * extent[rank-1];
17233
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17235
- retarray->base_addr = xmalloc (alloc_size);
17236
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17237
if (alloc_size == 0)
17239
/* Make sure we have a zero-sized array. */
17240
@@ -272,8 +271,7 @@
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->offset = 0;
17249
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17250
@@ -285,7 +283,7 @@
17254
- retarray->base_addr = xmalloc (alloc_size);
17255
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17259
@@ -430,8 +428,7 @@
17260
retarray->offset = 0;
17261
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17263
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17264
- * extent[rank-1];
17265
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17267
if (alloc_size == 0)
17269
@@ -440,7 +437,7 @@
17273
- retarray->base_addr = xmalloc (alloc_size);
17274
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17278
Index: libgfortran/generated/cshift1_16.c
17279
===================================================================
17280
--- a/src/libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release)
17281
+++ b/src/libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch)
17286
- ret->base_addr = xmalloc (size * arraysize);
17287
+ ret->base_addr = xmallocarray (arraysize, size);
17289
ret->dtype = array->dtype;
17290
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17291
Index: libgfortran/generated/maxloc0_4_i1.c
17292
===================================================================
17293
--- a/src/libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release)
17294
+++ b/src/libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch)
17296
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17297
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17298
retarray->offset = 0;
17299
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17300
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17304
@@ -199,7 +199,7 @@
17305
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17306
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17307
retarray->offset = 0;
17308
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17309
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17313
@@ -367,7 +367,7 @@
17314
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17315
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17316
retarray->offset = 0;
17317
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17318
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17320
else if (unlikely (compile_options.bounds_check))
17322
Index: libgfortran/generated/minloc0_4_i8.c
17323
===================================================================
17324
--- a/src/libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release)
17325
+++ b/src/libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch)
17327
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17328
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17329
retarray->offset = 0;
17330
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17331
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17335
@@ -199,7 +199,7 @@
17336
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17337
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17338
retarray->offset = 0;
17339
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17340
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17344
@@ -367,7 +367,7 @@
17345
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17346
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17347
retarray->offset = 0;
17348
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17349
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17351
else if (unlikely (compile_options.bounds_check))
17353
Index: libgfortran/generated/spread_c16.c
17354
===================================================================
17355
--- a/src/libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release)
17356
+++ b/src/libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch)
17357
@@ -101,8 +101,8 @@
17361
- /* xmalloc allocates a single byte for zero size. */
17362
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
17363
+ /* xmallocarray allocates a single byte for zero size. */
17364
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
17368
@@ -244,7 +244,7 @@
17370
if (ret->base_addr == NULL)
17372
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
17373
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
17375
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17377
Index: libgfortran/generated/maxval_r4.c
17378
===================================================================
17379
--- a/src/libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release)
17380
+++ b/src/libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch)
17382
retarray->offset = 0;
17383
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17385
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17386
- * extent[rank-1];
17387
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17389
- retarray->base_addr = xmalloc (alloc_size);
17390
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17391
if (alloc_size == 0)
17393
/* Make sure we have a zero-sized array. */
17394
@@ -286,8 +285,7 @@
17398
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17399
- * extent[rank-1];
17400
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17402
retarray->offset = 0;
17403
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17404
@@ -299,7 +297,7 @@
17408
- retarray->base_addr = xmalloc (alloc_size);
17409
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17413
@@ -472,8 +470,7 @@
17414
retarray->offset = 0;
17415
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17417
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17418
- * extent[rank-1];
17419
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17421
if (alloc_size == 0)
17423
@@ -482,7 +479,7 @@
17427
- retarray->base_addr = xmalloc (alloc_size);
17428
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17432
Index: libgfortran/generated/minval_r8.c
17433
===================================================================
17434
--- a/src/libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release)
17435
+++ b/src/libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch)
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
@@ -286,8 +285,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
@@ -299,7 +297,7 @@
17463
- retarray->base_addr = xmalloc (alloc_size);
17464
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17468
@@ -472,8 +470,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
@@ -482,7 +479,7 @@
17482
- retarray->base_addr = xmalloc (alloc_size);
17483
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17487
Index: libgfortran/generated/minloc1_16_r16.c
17488
===================================================================
17489
--- a/src/libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release)
17490
+++ b/src/libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch)
17492
retarray->offset = 0;
17493
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17495
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17496
- * extent[rank-1];
17497
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17499
- retarray->base_addr = xmalloc (alloc_size);
17500
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17501
if (alloc_size == 0)
17503
/* Make sure we have a zero-sized array. */
17504
@@ -294,8 +293,7 @@
17508
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17509
- * extent[rank-1];
17510
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17512
retarray->offset = 0;
17513
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17514
@@ -307,7 +305,7 @@
17518
- retarray->base_addr = xmalloc (alloc_size);
17519
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17523
@@ -485,8 +483,7 @@
17524
retarray->offset = 0;
17525
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17527
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17528
- * extent[rank-1];
17529
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17531
if (alloc_size == 0)
17533
@@ -495,7 +492,7 @@
17537
- retarray->base_addr = xmalloc (alloc_size);
17538
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17542
Index: libgfortran/generated/unpack_i16.c
17543
===================================================================
17544
--- a/src/libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release)
17545
+++ b/src/libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch)
17550
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
17551
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
17555
@@ -244,7 +244,7 @@
17559
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
17560
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
17564
Index: libgfortran/generated/sum_i8.c
17565
===================================================================
17566
--- a/src/libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release)
17567
+++ b/src/libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch)
17569
retarray->offset = 0;
17570
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17572
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17573
- * extent[rank-1];
17574
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17576
- retarray->base_addr = xmalloc (alloc_size);
17577
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17578
if (alloc_size == 0)
17580
/* Make sure we have a zero-sized array. */
17581
@@ -272,8 +271,7 @@
17585
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17586
- * extent[rank-1];
17587
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17589
retarray->offset = 0;
17590
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17591
@@ -285,7 +283,7 @@
17595
- retarray->base_addr = xmalloc (alloc_size);
17596
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17600
@@ -430,8 +428,7 @@
17601
retarray->offset = 0;
17602
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17604
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17605
- * extent[rank-1];
17606
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17608
if (alloc_size == 0)
17610
@@ -440,7 +437,7 @@
17614
- retarray->base_addr = xmalloc (alloc_size);
17615
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17619
Index: libgfortran/generated/pack_i1.c
17620
===================================================================
17621
--- a/src/libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release)
17622
+++ b/src/libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch)
17623
@@ -167,8 +167,8 @@
17627
- /* xmalloc allocates a single byte for zero size. */
17628
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
17629
+ /* xmallocarray allocates a single byte for zero size. */
17630
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
17634
Index: libgfortran/generated/any_l16.c
17635
===================================================================
17636
--- a/src/libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release)
17637
+++ b/src/libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch)
17638
@@ -101,8 +101,7 @@
17639
retarray->offset = 0;
17640
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17642
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17643
- * extent[rank-1];
17644
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17646
if (alloc_size == 0)
17648
@@ -111,7 +110,7 @@
17652
- retarray->base_addr = xmalloc (alloc_size);
17653
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
17657
Index: libgfortran/generated/spread_i8.c
17658
===================================================================
17659
--- a/src/libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release)
17660
+++ b/src/libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch)
17661
@@ -101,8 +101,8 @@
17665
- /* xmalloc allocates a single byte for zero size. */
17666
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
17667
+ /* xmallocarray allocates a single byte for zero size. */
17668
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
17672
@@ -244,7 +244,7 @@
17674
if (ret->base_addr == NULL)
17676
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
17677
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
17679
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17681
Index: libgfortran/generated/maxval_i2.c
17682
===================================================================
17683
--- a/src/libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release)
17684
+++ b/src/libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch)
17686
retarray->offset = 0;
17687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17689
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17690
- * extent[rank-1];
17691
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17693
- retarray->base_addr = xmalloc (alloc_size);
17694
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17695
if (alloc_size == 0)
17697
/* Make sure we have a zero-sized array. */
17698
@@ -286,8 +285,7 @@
17702
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17703
- * extent[rank-1];
17704
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17706
retarray->offset = 0;
17707
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17708
@@ -299,7 +297,7 @@
17712
- retarray->base_addr = xmalloc (alloc_size);
17713
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17717
@@ -472,8 +470,7 @@
17718
retarray->offset = 0;
17719
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17721
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17722
- * extent[rank-1];
17723
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17725
if (alloc_size == 0)
17727
@@ -482,7 +479,7 @@
17731
- retarray->base_addr = xmalloc (alloc_size);
17732
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17736
Index: libgfortran/generated/maxloc1_8_i4.c
17737
===================================================================
17738
--- a/src/libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release)
17739
+++ b/src/libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch)
17741
retarray->offset = 0;
17742
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17744
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17745
- * extent[rank-1];
17746
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17748
- retarray->base_addr = xmalloc (alloc_size);
17749
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17750
if (alloc_size == 0)
17752
/* Make sure we have a zero-sized array. */
17753
@@ -294,8 +293,7 @@
17757
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17758
- * extent[rank-1];
17759
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17761
retarray->offset = 0;
17762
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17763
@@ -307,7 +305,7 @@
17767
- retarray->base_addr = xmalloc (alloc_size);
17768
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17772
@@ -485,8 +483,7 @@
17773
retarray->offset = 0;
17774
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17776
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17777
- * extent[rank-1];
17778
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17780
if (alloc_size == 0)
17782
@@ -495,7 +492,7 @@
17786
- retarray->base_addr = xmalloc (alloc_size);
17787
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17791
Index: libgfortran/generated/unpack_r8.c
17792
===================================================================
17793
--- a/src/libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release)
17794
+++ b/src/libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch)
17799
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
17800
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
17804
@@ -244,7 +244,7 @@
17808
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
17809
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
17813
Index: libgfortran/generated/maxloc0_4_r4.c
17814
===================================================================
17815
--- a/src/libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release)
17816
+++ b/src/libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch)
17818
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17819
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17820
retarray->offset = 0;
17821
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17822
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17826
@@ -199,7 +199,7 @@
17827
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17828
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17829
retarray->offset = 0;
17830
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17831
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17835
@@ -367,7 +367,7 @@
17836
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17837
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17838
retarray->offset = 0;
17839
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17840
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17842
else if (unlikely (compile_options.bounds_check))
17844
Index: libgfortran/generated/all_l1.c
17845
===================================================================
17846
--- a/src/libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release)
17847
+++ b/src/libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch)
17848
@@ -101,8 +101,7 @@
17849
retarray->offset = 0;
17850
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17852
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17853
- * extent[rank-1];
17854
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17856
if (alloc_size == 0)
17858
@@ -111,7 +110,7 @@
17862
- retarray->base_addr = xmalloc (alloc_size);
17863
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
17867
Index: libgfortran/generated/matmul_r8.c
17868
===================================================================
17869
--- a/src/libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release)
17870
+++ b/src/libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch)
17871
@@ -124,7 +124,7 @@
17874
retarray->base_addr
17875
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
17876
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
17877
retarray->offset = 0;
17879
else if (unlikely (compile_options.bounds_check))
17880
Index: libgfortran/generated/minloc0_4_r16.c
17881
===================================================================
17882
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
17883
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
17885
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17886
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17887
retarray->offset = 0;
17888
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17889
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17893
@@ -199,7 +199,7 @@
17894
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17895
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17896
retarray->offset = 0;
17897
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17898
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17902
@@ -367,7 +367,7 @@
17903
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17904
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17905
retarray->offset = 0;
17906
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17907
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17909
else if (unlikely (compile_options.bounds_check))
17911
Index: libgfortran/generated/maxloc0_4_i2.c
17912
===================================================================
17913
--- a/src/libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release)
17914
+++ b/src/libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch)
17916
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17917
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17918
retarray->offset = 0;
17919
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17920
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17924
@@ -199,7 +199,7 @@
17925
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17926
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17927
retarray->offset = 0;
17928
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17929
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17933
@@ -367,7 +367,7 @@
17934
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17935
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17936
retarray->offset = 0;
17937
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17938
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17940
else if (unlikely (compile_options.bounds_check))
17942
Index: libgfortran/generated/minloc1_8_r16.c
17943
===================================================================
17944
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
17945
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
17947
retarray->offset = 0;
17948
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17950
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17951
- * extent[rank-1];
17952
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17954
- retarray->base_addr = xmalloc (alloc_size);
17955
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17956
if (alloc_size == 0)
17958
/* Make sure we have a zero-sized array. */
17959
@@ -294,8 +293,7 @@
17963
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17964
- * extent[rank-1];
17965
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17967
retarray->offset = 0;
17968
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17969
@@ -307,7 +305,7 @@
17973
- retarray->base_addr = xmalloc (alloc_size);
17974
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17978
@@ -485,8 +483,7 @@
17979
retarray->offset = 0;
17980
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17982
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17983
- * extent[rank-1];
17984
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17986
if (alloc_size == 0)
17988
@@ -495,7 +492,7 @@
17992
- retarray->base_addr = xmalloc (alloc_size);
17993
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17997
Index: libgfortran/generated/pack_c10.c
17998
===================================================================
17999
--- a/src/libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release)
18000
+++ b/src/libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch)
18001
@@ -167,8 +167,8 @@
18005
- /* xmalloc allocates a single byte for zero size. */
18006
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
18007
+ /* xmallocarray allocates a single byte for zero size. */
18008
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
18012
Index: libgfortran/generated/pack_r4.c
18013
===================================================================
18014
--- a/src/libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release)
18015
+++ b/src/libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch)
18016
@@ -167,8 +167,8 @@
18020
- /* xmalloc allocates a single byte for zero size. */
18021
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
18022
+ /* xmallocarray allocates a single byte for zero size. */
18023
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
18027
Index: libgfortran/generated/transpose_c16.c
18028
===================================================================
18029
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
18030
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
18032
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18033
GFC_DESCRIPTOR_EXTENT(source, 1));
18035
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
18036
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18037
+ sizeof (GFC_COMPLEX_16));
18039
} else if (unlikely (compile_options.bounds_check))
18041
Index: libgfortran/generated/maxloc0_8_i8.c
18042
===================================================================
18043
--- a/src/libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release)
18044
+++ b/src/libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch)
18046
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18047
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18048
retarray->offset = 0;
18049
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18050
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18054
@@ -199,7 +199,7 @@
18055
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18056
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18057
retarray->offset = 0;
18058
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18059
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18063
@@ -367,7 +367,7 @@
18064
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18065
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18066
retarray->offset = 0;
18067
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18068
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18070
else if (unlikely (compile_options.bounds_check))
18072
Index: libgfortran/generated/minloc1_4_r8.c
18073
===================================================================
18074
--- a/src/libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release)
18075
+++ b/src/libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch)
18077
retarray->offset = 0;
18078
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18080
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18081
- * extent[rank-1];
18082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18084
- retarray->base_addr = xmalloc (alloc_size);
18085
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18086
if (alloc_size == 0)
18088
/* Make sure we have a zero-sized array. */
18089
@@ -294,8 +293,7 @@
18093
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18094
- * extent[rank-1];
18095
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18097
retarray->offset = 0;
18098
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18099
@@ -307,7 +305,7 @@
18103
- retarray->base_addr = xmalloc (alloc_size);
18104
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18108
@@ -485,8 +483,7 @@
18109
retarray->offset = 0;
18110
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18112
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18113
- * extent[rank-1];
18114
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18116
if (alloc_size == 0)
18118
@@ -495,7 +492,7 @@
18122
- retarray->base_addr = xmalloc (alloc_size);
18123
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18127
Index: libgfortran/generated/minloc1_16_i4.c
18128
===================================================================
18129
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
18130
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
18132
retarray->offset = 0;
18133
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18135
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18136
- * extent[rank-1];
18137
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18139
- retarray->base_addr = xmalloc (alloc_size);
18140
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18141
if (alloc_size == 0)
18143
/* Make sure we have a zero-sized array. */
18144
@@ -294,8 +293,7 @@
18148
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18149
- * extent[rank-1];
18150
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18152
retarray->offset = 0;
18153
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18154
@@ -307,7 +305,7 @@
18158
- retarray->base_addr = xmalloc (alloc_size);
18159
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18163
@@ -485,8 +483,7 @@
18164
retarray->offset = 0;
18165
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18167
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18168
- * extent[rank-1];
18169
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18171
if (alloc_size == 0)
18173
@@ -495,7 +492,7 @@
18177
- retarray->base_addr = xmalloc (alloc_size);
18178
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18182
Index: libgfortran/generated/minloc0_16_i8.c
18183
===================================================================
18184
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
18185
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
18187
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18188
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18189
retarray->offset = 0;
18190
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18191
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18195
@@ -199,7 +199,7 @@
18196
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18197
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18198
retarray->offset = 0;
18199
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18200
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18204
@@ -367,7 +367,7 @@
18205
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18206
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18207
retarray->offset = 0;
18208
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18209
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18211
else if (unlikely (compile_options.bounds_check))
18213
Index: libgfortran/generated/pack_i2.c
18214
===================================================================
18215
--- a/src/libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release)
18216
+++ b/src/libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch)
18217
@@ -167,8 +167,8 @@
18221
- /* xmalloc allocates a single byte for zero size. */
18222
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
18223
+ /* xmallocarray allocates a single byte for zero size. */
18224
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
18228
Index: libgfortran/generated/transpose_i8.c
18229
===================================================================
18230
--- a/src/libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release)
18231
+++ b/src/libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch)
18233
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18234
GFC_DESCRIPTOR_EXTENT(source, 1));
18236
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
18237
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18238
+ sizeof (GFC_INTEGER_8));
18240
} else if (unlikely (compile_options.bounds_check))
18242
Index: libgfortran/generated/eoshift1_16.c
18243
===================================================================
18244
--- a/src/libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release)
18245
+++ b/src/libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch)
18246
@@ -105,8 +105,8 @@
18247
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
18250
- /* xmalloc allocates a single byte for zero size. */
18251
- ret->base_addr = xmalloc (size * arraysize);
18252
+ /* xmallocarray allocates a single byte for zero size. */
18253
+ ret->base_addr = xmallocarray (arraysize, size);
18256
else if (unlikely (compile_options.bounds_check))
18257
Index: libgfortran/generated/all_l2.c
18258
===================================================================
18259
--- a/src/libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release)
18260
+++ b/src/libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch)
18261
@@ -101,8 +101,7 @@
18262
retarray->offset = 0;
18263
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18265
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18266
- * extent[rank-1];
18267
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18269
if (alloc_size == 0)
18271
@@ -111,7 +110,7 @@
18275
- retarray->base_addr = xmalloc (alloc_size);
18276
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
18280
Index: libgfortran/generated/product_c4.c
18281
===================================================================
18282
--- a/src/libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release)
18283
+++ b/src/libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch)
18285
retarray->offset = 0;
18286
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18288
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18289
- * extent[rank-1];
18290
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18292
- retarray->base_addr = xmalloc (alloc_size);
18293
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
18294
if (alloc_size == 0)
18296
/* Make sure we have a zero-sized array. */
18297
@@ -272,8 +271,7 @@
18301
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18302
- * extent[rank-1];
18303
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18305
retarray->offset = 0;
18306
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18307
@@ -285,7 +283,7 @@
18311
- retarray->base_addr = xmalloc (alloc_size);
18312
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
18316
@@ -430,8 +428,7 @@
18317
retarray->offset = 0;
18318
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18320
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18321
- * extent[rank-1];
18322
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18324
if (alloc_size == 0)
18326
@@ -440,7 +437,7 @@
18330
- retarray->base_addr = xmalloc (alloc_size);
18331
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
18335
Index: libgfortran/generated/iall_i1.c
18336
===================================================================
18337
--- a/src/libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release)
18338
+++ b/src/libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch)
18340
retarray->offset = 0;
18341
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18343
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18344
- * extent[rank-1];
18345
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18347
- retarray->base_addr = xmalloc (alloc_size);
18348
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18349
if (alloc_size == 0)
18351
/* Make sure we have a zero-sized array. */
18352
@@ -272,8 +271,7 @@
18356
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18357
- * extent[rank-1];
18358
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18360
retarray->offset = 0;
18361
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18362
@@ -285,7 +283,7 @@
18366
- retarray->base_addr = xmalloc (alloc_size);
18367
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18371
@@ -430,8 +428,7 @@
18372
retarray->offset = 0;
18373
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18375
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18376
- * extent[rank-1];
18377
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18379
if (alloc_size == 0)
18381
@@ -440,7 +437,7 @@
18385
- retarray->base_addr = xmalloc (alloc_size);
18386
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18390
Index: libgfortran/generated/reshape_i4.c
18391
===================================================================
18392
--- a/src/libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release)
18393
+++ b/src/libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch)
18394
@@ -111,11 +111,11 @@
18397
if (unlikely (rs < 1))
18401
- alloc_size = rs * sizeof (GFC_INTEGER_4);
18404
- ret->base_addr = xmalloc (alloc_size);
18405
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18406
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18409
Index: libgfortran/generated/in_pack_r10.c
18410
===================================================================
18411
--- a/src/libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release)
18412
+++ b/src/libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch)
18414
return source->base_addr;
18416
/* Allocate storage for the destination. */
18417
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
18418
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
18420
src = source->base_addr;
18421
stride0 = stride[0];
18422
Index: libgfortran/generated/in_pack_c4.c
18423
===================================================================
18424
--- a/src/libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release)
18425
+++ b/src/libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch)
18427
return source->base_addr;
18429
/* Allocate storage for the destination. */
18430
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
18431
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
18433
src = source->base_addr;
18434
stride0 = stride[0];
18435
Index: libgfortran/generated/all_l16.c
18436
===================================================================
18437
--- a/src/libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release)
18438
+++ b/src/libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch)
18439
@@ -101,8 +101,7 @@
18440
retarray->offset = 0;
18441
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18443
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18444
- * extent[rank-1];
18445
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18447
if (alloc_size == 0)
18449
@@ -111,7 +110,7 @@
18453
- retarray->base_addr = xmalloc (alloc_size);
18454
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
18458
Index: libgfortran/generated/maxloc0_16_i1.c
18459
===================================================================
18460
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
18461
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
18463
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18464
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18465
retarray->offset = 0;
18466
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18467
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18471
@@ -199,7 +199,7 @@
18472
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18473
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18474
retarray->offset = 0;
18475
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18476
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18480
@@ -367,7 +367,7 @@
18481
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18482
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18483
retarray->offset = 0;
18484
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18485
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18487
else if (unlikely (compile_options.bounds_check))
18489
Index: libgfortran/generated/maxloc1_8_r8.c
18490
===================================================================
18491
--- a/src/libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release)
18492
+++ b/src/libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch)
18494
retarray->offset = 0;
18495
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18497
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18498
- * extent[rank-1];
18499
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18501
- retarray->base_addr = xmalloc (alloc_size);
18502
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18503
if (alloc_size == 0)
18505
/* Make sure we have a zero-sized array. */
18506
@@ -294,8 +293,7 @@
18510
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18511
- * extent[rank-1];
18512
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18514
retarray->offset = 0;
18515
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18516
@@ -307,7 +305,7 @@
18520
- retarray->base_addr = xmalloc (alloc_size);
18521
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18525
@@ -485,8 +483,7 @@
18526
retarray->offset = 0;
18527
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18529
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18530
- * extent[rank-1];
18531
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18533
if (alloc_size == 0)
18535
@@ -495,7 +492,7 @@
18539
- retarray->base_addr = xmalloc (alloc_size);
18540
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18544
Index: libgfortran/generated/minval_i16.c
18545
===================================================================
18546
--- a/src/libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release)
18547
+++ b/src/libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch)
18549
retarray->offset = 0;
18550
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18552
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18553
- * extent[rank-1];
18554
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18556
- retarray->base_addr = xmalloc (alloc_size);
18557
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18558
if (alloc_size == 0)
18560
/* Make sure we have a zero-sized array. */
18561
@@ -286,8 +285,7 @@
18565
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18566
- * extent[rank-1];
18567
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18569
retarray->offset = 0;
18570
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18571
@@ -299,7 +297,7 @@
18575
- retarray->base_addr = xmalloc (alloc_size);
18576
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18580
@@ -472,8 +470,7 @@
18581
retarray->offset = 0;
18582
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18584
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18585
- * extent[rank-1];
18586
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18588
if (alloc_size == 0)
18590
@@ -482,7 +479,7 @@
18594
- retarray->base_addr = xmalloc (alloc_size);
18595
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18599
Index: libgfortran/generated/reshape_r10.c
18600
===================================================================
18601
--- a/src/libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release)
18602
+++ b/src/libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch)
18603
@@ -111,11 +111,11 @@
18606
if (unlikely (rs < 1))
18610
- alloc_size = rs * sizeof (GFC_REAL_10);
18613
- ret->base_addr = xmalloc (alloc_size);
18614
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18615
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18618
Index: libgfortran/generated/unpack_r16.c
18619
===================================================================
18620
--- a/src/libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release)
18621
+++ b/src/libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch)
18626
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
18627
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
18631
@@ -244,7 +244,7 @@
18635
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
18636
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
18640
Index: libgfortran/generated/maxval_i4.c
18641
===================================================================
18642
--- a/src/libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release)
18643
+++ b/src/libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch)
18645
retarray->offset = 0;
18646
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18648
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18649
- * extent[rank-1];
18650
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18652
- retarray->base_addr = xmalloc (alloc_size);
18653
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18654
if (alloc_size == 0)
18656
/* Make sure we have a zero-sized array. */
18657
@@ -286,8 +285,7 @@
18661
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18662
- * extent[rank-1];
18663
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18665
retarray->offset = 0;
18666
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18667
@@ -299,7 +297,7 @@
18671
- retarray->base_addr = xmalloc (alloc_size);
18672
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18676
@@ -472,8 +470,7 @@
18677
retarray->offset = 0;
18678
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18680
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18681
- * extent[rank-1];
18682
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18684
if (alloc_size == 0)
18686
@@ -482,7 +479,7 @@
18690
- retarray->base_addr = xmalloc (alloc_size);
18691
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18695
Index: libgfortran/generated/minval_i8.c
18696
===================================================================
18697
--- a/src/libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release)
18698
+++ b/src/libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch)
18700
retarray->offset = 0;
18701
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18703
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18704
- * extent[rank-1];
18705
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18707
- retarray->base_addr = xmalloc (alloc_size);
18708
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18709
if (alloc_size == 0)
18711
/* Make sure we have a zero-sized array. */
18712
@@ -286,8 +285,7 @@
18716
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18717
- * extent[rank-1];
18718
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18720
retarray->offset = 0;
18721
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18722
@@ -299,7 +297,7 @@
18726
- retarray->base_addr = xmalloc (alloc_size);
18727
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18731
@@ -472,8 +470,7 @@
18732
retarray->offset = 0;
18733
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18735
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18736
- * extent[rank-1];
18737
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18739
if (alloc_size == 0)
18741
@@ -482,7 +479,7 @@
18745
- retarray->base_addr = xmalloc (alloc_size);
18746
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18750
Index: libgfortran/generated/maxloc0_16_i16.c
18751
===================================================================
18752
--- a/src/libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release)
18753
+++ b/src/libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch)
18755
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18756
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18757
retarray->offset = 0;
18758
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18759
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18763
@@ -199,7 +199,7 @@
18764
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18765
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18766
retarray->offset = 0;
18767
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18768
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18772
@@ -367,7 +367,7 @@
18773
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18774
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18775
retarray->offset = 0;
18776
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18777
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18779
else if (unlikely (compile_options.bounds_check))
18781
Index: libgfortran/generated/shape_i4.c
18782
===================================================================
18783
--- a/src/libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release)
18784
+++ b/src/libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch)
18787
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
18789
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18790
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18793
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
18794
Index: libgfortran/generated/minloc1_4_i16.c
18795
===================================================================
18796
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
18797
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
18799
retarray->offset = 0;
18800
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18802
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18803
- * extent[rank-1];
18804
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18806
- retarray->base_addr = xmalloc (alloc_size);
18807
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18808
if (alloc_size == 0)
18810
/* Make sure we have a zero-sized array. */
18811
@@ -294,8 +293,7 @@
18815
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18816
- * extent[rank-1];
18817
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18819
retarray->offset = 0;
18820
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18821
@@ -307,7 +305,7 @@
18825
- retarray->base_addr = xmalloc (alloc_size);
18826
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18830
@@ -485,8 +483,7 @@
18831
retarray->offset = 0;
18832
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18834
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18835
- * extent[rank-1];
18836
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18838
if (alloc_size == 0)
18840
@@ -495,7 +492,7 @@
18844
- retarray->base_addr = xmalloc (alloc_size);
18845
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18849
Index: libgfortran/generated/maxloc0_4_r10.c
18850
===================================================================
18851
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
18852
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
18854
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18855
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18856
retarray->offset = 0;
18857
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18858
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18862
@@ -199,7 +199,7 @@
18863
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18864
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18865
retarray->offset = 0;
18866
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18867
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18871
@@ -367,7 +367,7 @@
18872
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18873
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18874
retarray->offset = 0;
18875
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18876
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18878
else if (unlikely (compile_options.bounds_check))
18880
Index: libgfortran/generated/maxloc0_8_i16.c
18881
===================================================================
18882
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
18883
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
18885
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18886
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18887
retarray->offset = 0;
18888
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18889
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18893
@@ -199,7 +199,7 @@
18894
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18895
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18896
retarray->offset = 0;
18897
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18898
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18902
@@ -367,7 +367,7 @@
18903
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18904
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18905
retarray->offset = 0;
18906
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18907
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18909
else if (unlikely (compile_options.bounds_check))
18911
Index: libgfortran/generated/iall_i2.c
18912
===================================================================
18913
--- a/src/libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release)
18914
+++ b/src/libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch)
18916
retarray->offset = 0;
18917
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18919
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18920
- * extent[rank-1];
18921
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18923
- retarray->base_addr = xmalloc (alloc_size);
18924
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18925
if (alloc_size == 0)
18927
/* Make sure we have a zero-sized array. */
18928
@@ -272,8 +271,7 @@
18932
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18933
- * extent[rank-1];
18934
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18936
retarray->offset = 0;
18937
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18938
@@ -285,7 +283,7 @@
18942
- retarray->base_addr = xmalloc (alloc_size);
18943
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18947
@@ -430,8 +428,7 @@
18948
retarray->offset = 0;
18949
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18951
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18952
- * extent[rank-1];
18953
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18955
if (alloc_size == 0)
18957
@@ -440,7 +437,7 @@
18961
- retarray->base_addr = xmalloc (alloc_size);
18962
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18966
Index: libgfortran/generated/maxloc1_8_r10.c
18967
===================================================================
18968
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
18969
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
18971
retarray->offset = 0;
18972
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18974
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18975
- * extent[rank-1];
18976
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18978
- retarray->base_addr = xmalloc (alloc_size);
18979
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18980
if (alloc_size == 0)
18982
/* Make sure we have a zero-sized array. */
18983
@@ -294,8 +293,7 @@
18987
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18988
- * extent[rank-1];
18989
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18991
retarray->offset = 0;
18992
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18993
@@ -307,7 +305,7 @@
18997
- retarray->base_addr = xmalloc (alloc_size);
18998
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19002
@@ -485,8 +483,7 @@
19003
retarray->offset = 0;
19004
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19006
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19007
- * extent[rank-1];
19008
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19010
if (alloc_size == 0)
19012
@@ -495,7 +492,7 @@
19016
- retarray->base_addr = xmalloc (alloc_size);
19017
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19021
Index: libgfortran/generated/maxloc0_16_r4.c
19022
===================================================================
19023
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
19024
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
19026
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19027
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19028
retarray->offset = 0;
19029
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19030
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19034
@@ -199,7 +199,7 @@
19035
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19036
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19037
retarray->offset = 0;
19038
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19039
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19043
@@ -367,7 +367,7 @@
19044
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19045
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19046
retarray->offset = 0;
19047
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19048
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19050
else if (unlikely (compile_options.bounds_check))
19052
Index: libgfortran/generated/minloc0_8_i1.c
19053
===================================================================
19054
--- a/src/libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release)
19055
+++ b/src/libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch)
19057
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19058
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19059
retarray->offset = 0;
19060
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19061
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19065
@@ -199,7 +199,7 @@
19066
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19067
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19068
retarray->offset = 0;
19069
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19070
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19074
@@ -367,7 +367,7 @@
19075
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19076
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19077
retarray->offset = 0;
19078
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19079
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19081
else if (unlikely (compile_options.bounds_check))
19083
Index: libgfortran/generated/minloc1_16_r8.c
19084
===================================================================
19085
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
19086
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
19088
retarray->offset = 0;
19089
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19091
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19092
- * extent[rank-1];
19093
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19095
- retarray->base_addr = xmalloc (alloc_size);
19096
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19097
if (alloc_size == 0)
19099
/* Make sure we have a zero-sized array. */
19100
@@ -294,8 +293,7 @@
19104
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19105
- * extent[rank-1];
19106
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19108
retarray->offset = 0;
19109
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19110
@@ -307,7 +305,7 @@
19114
- retarray->base_addr = xmalloc (alloc_size);
19115
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19119
@@ -485,8 +483,7 @@
19120
retarray->offset = 0;
19121
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19123
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19124
- * extent[rank-1];
19125
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19127
if (alloc_size == 0)
19129
@@ -495,7 +492,7 @@
19133
- retarray->base_addr = xmalloc (alloc_size);
19134
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19138
Index: libgfortran/generated/unpack_i8.c
19139
===================================================================
19140
--- a/src/libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release)
19141
+++ b/src/libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch)
19146
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
19147
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
19151
@@ -244,7 +244,7 @@
19155
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
19156
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
19160
Index: libgfortran/generated/maxloc0_4_i4.c
19161
===================================================================
19162
--- a/src/libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release)
19163
+++ b/src/libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch)
19165
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19166
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19167
retarray->offset = 0;
19168
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19169
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19173
@@ -199,7 +199,7 @@
19174
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19175
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19176
retarray->offset = 0;
19177
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19178
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19182
@@ -367,7 +367,7 @@
19183
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19184
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19185
retarray->offset = 0;
19186
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19187
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19189
else if (unlikely (compile_options.bounds_check))
19191
Index: libgfortran/generated/count_4_l.c
19192
===================================================================
19193
--- a/src/libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release)
19194
+++ b/src/libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch)
19195
@@ -101,8 +101,7 @@
19196
retarray->offset = 0;
19197
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19199
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19200
- * extent[rank-1];
19201
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19203
if (alloc_size == 0)
19205
@@ -111,7 +110,7 @@
19209
- retarray->base_addr = xmalloc (alloc_size);
19210
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19214
Index: libgfortran/generated/sum_r10.c
19215
===================================================================
19216
--- a/src/libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release)
19217
+++ b/src/libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch)
19219
retarray->offset = 0;
19220
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19222
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19223
- * extent[rank-1];
19224
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19226
- retarray->base_addr = xmalloc (alloc_size);
19227
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19228
if (alloc_size == 0)
19230
/* Make sure we have a zero-sized array. */
19231
@@ -272,8 +271,7 @@
19235
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19236
- * extent[rank-1];
19237
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19239
retarray->offset = 0;
19240
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19241
@@ -285,7 +283,7 @@
19245
- retarray->base_addr = xmalloc (alloc_size);
19246
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19250
@@ -430,8 +428,7 @@
19251
retarray->offset = 0;
19252
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19254
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19255
- * extent[rank-1];
19256
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19258
if (alloc_size == 0)
19260
@@ -440,7 +437,7 @@
19264
- retarray->base_addr = xmalloc (alloc_size);
19265
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19269
Index: libgfortran/generated/sum_c4.c
19270
===================================================================
19271
--- a/src/libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release)
19272
+++ b/src/libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch)
19274
retarray->offset = 0;
19275
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19277
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19278
- * extent[rank-1];
19279
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19281
- retarray->base_addr = xmalloc (alloc_size);
19282
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19283
if (alloc_size == 0)
19285
/* Make sure we have a zero-sized array. */
19286
@@ -272,8 +271,7 @@
19290
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19291
- * extent[rank-1];
19292
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19294
retarray->offset = 0;
19295
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19296
@@ -285,7 +283,7 @@
19300
- retarray->base_addr = xmalloc (alloc_size);
19301
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19305
@@ -430,8 +428,7 @@
19306
retarray->offset = 0;
19307
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19309
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19310
- * extent[rank-1];
19311
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19313
if (alloc_size == 0)
19315
@@ -440,7 +437,7 @@
19319
- retarray->base_addr = xmalloc (alloc_size);
19320
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
19324
Index: libgfortran/generated/maxloc1_16_r10.c
19325
===================================================================
19326
--- a/src/libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release)
19327
+++ b/src/libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch)
19329
retarray->offset = 0;
19330
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19332
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19333
- * extent[rank-1];
19334
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19336
- retarray->base_addr = xmalloc (alloc_size);
19337
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19338
if (alloc_size == 0)
19340
/* Make sure we have a zero-sized array. */
19341
@@ -294,8 +293,7 @@
19345
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19346
- * extent[rank-1];
19347
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19349
retarray->offset = 0;
19350
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19351
@@ -307,7 +305,7 @@
19355
- retarray->base_addr = xmalloc (alloc_size);
19356
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19360
@@ -485,8 +483,7 @@
19361
retarray->offset = 0;
19362
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19364
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19365
- * extent[rank-1];
19366
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19368
if (alloc_size == 0)
19370
@@ -495,7 +492,7 @@
19374
- retarray->base_addr = xmalloc (alloc_size);
19375
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19379
Index: libgfortran/generated/pack_i16.c
19380
===================================================================
19381
--- a/src/libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release)
19382
+++ b/src/libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch)
19383
@@ -167,8 +167,8 @@
19387
- /* xmalloc allocates a single byte for zero size. */
19388
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
19389
+ /* xmallocarray allocates a single byte for zero size. */
19390
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
19394
Index: libgfortran/generated/matmul_i8.c
19395
===================================================================
19396
--- a/src/libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release)
19397
+++ b/src/libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch)
19398
@@ -124,7 +124,7 @@
19401
retarray->base_addr
19402
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
19403
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
19404
retarray->offset = 0;
19406
else if (unlikely (compile_options.bounds_check))
19407
Index: libgfortran/generated/maxloc0_16_i2.c
19408
===================================================================
19409
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
19410
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
19412
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19413
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19414
retarray->offset = 0;
19415
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19416
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19420
@@ -199,7 +199,7 @@
19421
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19422
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19423
retarray->offset = 0;
19424
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19425
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19429
@@ -367,7 +367,7 @@
19430
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19431
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19432
retarray->offset = 0;
19433
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19434
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19436
else if (unlikely (compile_options.bounds_check))
19438
Index: libgfortran/generated/spread_c4.c
19439
===================================================================
19440
--- a/src/libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release)
19441
+++ b/src/libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch)
19442
@@ -101,8 +101,8 @@
19446
- /* xmalloc allocates a single byte for zero size. */
19447
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
19448
+ /* xmallocarray allocates a single byte for zero size. */
19449
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
19453
@@ -244,7 +244,7 @@
19455
if (ret->base_addr == NULL)
19457
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
19458
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
19460
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19462
Index: libgfortran/generated/maxval_r10.c
19463
===================================================================
19464
--- a/src/libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release)
19465
+++ b/src/libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch)
19467
retarray->offset = 0;
19468
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19470
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19471
- * extent[rank-1];
19472
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19474
- retarray->base_addr = xmalloc (alloc_size);
19475
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19476
if (alloc_size == 0)
19478
/* Make sure we have a zero-sized array. */
19479
@@ -286,8 +285,7 @@
19483
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19484
- * extent[rank-1];
19485
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19487
retarray->offset = 0;
19488
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19489
@@ -299,7 +297,7 @@
19493
- retarray->base_addr = xmalloc (alloc_size);
19494
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19498
@@ -472,8 +470,7 @@
19499
retarray->offset = 0;
19500
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19502
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19503
- * extent[rank-1];
19504
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19506
if (alloc_size == 0)
19508
@@ -482,7 +479,7 @@
19512
- retarray->base_addr = xmalloc (alloc_size);
19513
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19517
Index: libgfortran/generated/pack_i4.c
19518
===================================================================
19519
--- a/src/libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release)
19520
+++ b/src/libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch)
19521
@@ -167,8 +167,8 @@
19525
- /* xmalloc allocates a single byte for zero size. */
19526
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
19527
+ /* xmallocarray allocates a single byte for zero size. */
19528
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
19532
Index: libgfortran/generated/maxloc1_4_i1.c
19533
===================================================================
19534
--- a/src/libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release)
19535
+++ b/src/libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch)
19537
retarray->offset = 0;
19538
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19540
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19541
- * extent[rank-1];
19542
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19544
- retarray->base_addr = xmalloc (alloc_size);
19545
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19546
if (alloc_size == 0)
19548
/* Make sure we have a zero-sized array. */
19549
@@ -294,8 +293,7 @@
19553
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19554
- * extent[rank-1];
19555
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19557
retarray->offset = 0;
19558
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19559
@@ -307,7 +305,7 @@
19563
- retarray->base_addr = xmalloc (alloc_size);
19564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19568
@@ -485,8 +483,7 @@
19569
retarray->offset = 0;
19570
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19572
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19573
- * extent[rank-1];
19574
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19576
if (alloc_size == 0)
19578
@@ -495,7 +492,7 @@
19582
- retarray->base_addr = xmalloc (alloc_size);
19583
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19587
Index: libgfortran/generated/matmul_r10.c
19588
===================================================================
19589
--- a/src/libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release)
19590
+++ b/src/libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch)
19591
@@ -124,7 +124,7 @@
19594
retarray->base_addr
19595
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
19596
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
19597
retarray->offset = 0;
19599
else if (unlikely (compile_options.bounds_check))
19600
Index: libgfortran/generated/minloc1_4_i8.c
19601
===================================================================
19602
--- a/src/libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release)
19603
+++ b/src/libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch)
19605
retarray->offset = 0;
19606
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19608
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19609
- * extent[rank-1];
19610
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19612
- retarray->base_addr = xmalloc (alloc_size);
19613
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19614
if (alloc_size == 0)
19616
/* Make sure we have a zero-sized array. */
19617
@@ -294,8 +293,7 @@
19621
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19622
- * extent[rank-1];
19623
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19625
retarray->offset = 0;
19626
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19627
@@ -307,7 +305,7 @@
19631
- retarray->base_addr = xmalloc (alloc_size);
19632
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19636
@@ -485,8 +483,7 @@
19637
retarray->offset = 0;
19638
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19640
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19641
- * extent[rank-1];
19642
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19644
if (alloc_size == 0)
19646
@@ -495,7 +492,7 @@
19650
- retarray->base_addr = xmalloc (alloc_size);
19651
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19655
Index: libgfortran/generated/minloc0_8_r4.c
19656
===================================================================
19657
--- a/src/libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release)
19658
+++ b/src/libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch)
19660
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19661
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19662
retarray->offset = 0;
19663
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19664
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19668
@@ -199,7 +199,7 @@
19669
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19670
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19671
retarray->offset = 0;
19672
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19673
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19677
@@ -367,7 +367,7 @@
19678
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19679
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19680
retarray->offset = 0;
19681
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19682
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19684
else if (unlikely (compile_options.bounds_check))
19686
Index: libgfortran/generated/matmul_l4.c
19687
===================================================================
19688
--- a/src/libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release)
19689
+++ b/src/libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch)
19693
retarray->base_addr
19694
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
19695
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
19696
retarray->offset = 0;
19698
else if (unlikely (compile_options.bounds_check))
19699
Index: libgfortran/generated/reshape_r8.c
19700
===================================================================
19701
--- a/src/libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release)
19702
+++ b/src/libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch)
19703
@@ -111,11 +111,11 @@
19706
if (unlikely (rs < 1))
19710
- alloc_size = rs * sizeof (GFC_REAL_8);
19713
- ret->base_addr = xmalloc (alloc_size);
19714
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19715
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
19718
Index: libgfortran/generated/in_pack_c10.c
19719
===================================================================
19720
--- a/src/libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release)
19721
+++ b/src/libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch)
19723
return source->base_addr;
19725
/* Allocate storage for the destination. */
19726
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
19727
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
19729
src = source->base_addr;
19730
stride0 = stride[0];
19731
Index: libgfortran/generated/all_l4.c
19732
===================================================================
19733
--- a/src/libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release)
19734
+++ b/src/libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch)
19735
@@ -101,8 +101,7 @@
19736
retarray->offset = 0;
19737
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19739
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19740
- * extent[rank-1];
19741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19743
if (alloc_size == 0)
19745
@@ -111,7 +110,7 @@
19749
- retarray->base_addr = xmalloc (alloc_size);
19750
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
19754
Index: libgfortran/generated/minloc0_8_i2.c
19755
===================================================================
19756
--- a/src/libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release)
19757
+++ b/src/libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch)
19759
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19760
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19761
retarray->offset = 0;
19762
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19763
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19767
@@ -199,7 +199,7 @@
19768
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19769
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19770
retarray->offset = 0;
19771
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19772
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19776
@@ -367,7 +367,7 @@
19777
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19778
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19779
retarray->offset = 0;
19780
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19781
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19783
else if (unlikely (compile_options.bounds_check))
19785
Index: libgfortran/generated/norm2_r16.c
19786
===================================================================
19787
--- a/src/libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release)
19788
+++ b/src/libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch)
19789
@@ -105,10 +105,9 @@
19790
retarray->offset = 0;
19791
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19793
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19794
- * extent[rank-1];
19795
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19797
- retarray->base_addr = xmalloc (alloc_size);
19798
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
19799
if (alloc_size == 0)
19801
/* Make sure we have a zero-sized array. */
19802
Index: libgfortran/generated/reshape_c10.c
19803
===================================================================
19804
--- a/src/libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release)
19805
+++ b/src/libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch)
19806
@@ -111,11 +111,11 @@
19809
if (unlikely (rs < 1))
19813
- alloc_size = rs * sizeof (GFC_COMPLEX_10);
19816
- ret->base_addr = xmalloc (alloc_size);
19817
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
19818
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
19821
Index: libgfortran/generated/unpack_c16.c
19822
===================================================================
19823
--- a/src/libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release)
19824
+++ b/src/libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch)
19829
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
19830
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
19834
@@ -244,7 +244,7 @@
19838
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
19839
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
19843
Index: libgfortran/generated/maxloc1_4_r4.c
19844
===================================================================
19845
--- a/src/libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release)
19846
+++ b/src/libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch)
19848
retarray->offset = 0;
19849
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19851
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19852
- * extent[rank-1];
19853
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19855
- retarray->base_addr = xmalloc (alloc_size);
19856
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19857
if (alloc_size == 0)
19859
/* Make sure we have a zero-sized array. */
19860
@@ -294,8 +293,7 @@
19864
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19865
- * extent[rank-1];
19866
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19868
retarray->offset = 0;
19869
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19870
@@ -307,7 +305,7 @@
19874
- retarray->base_addr = xmalloc (alloc_size);
19875
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19879
@@ -485,8 +483,7 @@
19880
retarray->offset = 0;
19881
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19883
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19884
- * extent[rank-1];
19885
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19887
if (alloc_size == 0)
19889
@@ -495,7 +492,7 @@
19893
- retarray->base_addr = xmalloc (alloc_size);
19894
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19898
Index: libgfortran/generated/maxval_r8.c
19899
===================================================================
19900
--- a/src/libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release)
19901
+++ b/src/libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch)
19903
retarray->offset = 0;
19904
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19906
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19907
- * extent[rank-1];
19908
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19910
- retarray->base_addr = xmalloc (alloc_size);
19911
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19912
if (alloc_size == 0)
19914
/* Make sure we have a zero-sized array. */
19915
@@ -286,8 +285,7 @@
19919
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19920
- * extent[rank-1];
19921
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19923
retarray->offset = 0;
19924
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19925
@@ -299,7 +297,7 @@
19929
- retarray->base_addr = xmalloc (alloc_size);
19930
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19934
@@ -472,8 +470,7 @@
19935
retarray->offset = 0;
19936
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19938
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19939
- * extent[rank-1];
19940
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19942
if (alloc_size == 0)
19944
@@ -482,7 +479,7 @@
19948
- retarray->base_addr = xmalloc (alloc_size);
19949
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19953
Index: libgfortran/generated/transpose_c4.c
19954
===================================================================
19955
--- a/src/libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release)
19956
+++ b/src/libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch)
19958
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19959
GFC_DESCRIPTOR_EXTENT(source, 1));
19961
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
19962
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19963
+ sizeof (GFC_COMPLEX_4));
19965
} else if (unlikely (compile_options.bounds_check))
19967
Index: libgfortran/generated/eoshift1_4.c
19968
===================================================================
19969
--- a/src/libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release)
19970
+++ b/src/libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch)
19971
@@ -105,8 +105,8 @@
19972
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
19975
- /* xmalloc allocates a single byte for zero size. */
19976
- ret->base_addr = xmalloc (size * arraysize);
19977
+ /* xmallocarray allocates a single byte for zero size. */
19978
+ ret->base_addr = xmallocarray (arraysize, size);
19981
else if (unlikely (compile_options.bounds_check))
19982
Index: libgfortran/generated/minval_r16.c
19983
===================================================================
19984
--- a/src/libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release)
19985
+++ b/src/libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch)
19987
retarray->offset = 0;
19988
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19990
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19991
- * extent[rank-1];
19992
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19994
- retarray->base_addr = xmalloc (alloc_size);
19995
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
19996
if (alloc_size == 0)
19998
/* Make sure we have a zero-sized array. */
19999
@@ -286,8 +285,7 @@
20003
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20004
- * extent[rank-1];
20005
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20007
retarray->offset = 0;
20008
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20009
@@ -299,7 +297,7 @@
20013
- retarray->base_addr = xmalloc (alloc_size);
20014
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20018
@@ -472,8 +470,7 @@
20019
retarray->offset = 0;
20020
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20022
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20023
- * extent[rank-1];
20024
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20026
if (alloc_size == 0)
20028
@@ -482,7 +479,7 @@
20032
- retarray->base_addr = xmalloc (alloc_size);
20033
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20037
Index: libgfortran/generated/iany_i16.c
20038
===================================================================
20039
--- a/src/libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release)
20040
+++ b/src/libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch)
20042
retarray->offset = 0;
20043
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20045
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20046
- * extent[rank-1];
20047
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20049
- retarray->base_addr = xmalloc (alloc_size);
20050
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20051
if (alloc_size == 0)
20053
/* Make sure we have a zero-sized array. */
20054
@@ -272,8 +271,7 @@
20058
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20059
- * extent[rank-1];
20060
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20062
retarray->offset = 0;
20063
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20064
@@ -285,7 +283,7 @@
20068
- retarray->base_addr = xmalloc (alloc_size);
20069
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20073
@@ -430,8 +428,7 @@
20074
retarray->offset = 0;
20075
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20077
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20078
- * extent[rank-1];
20079
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20081
if (alloc_size == 0)
20083
@@ -440,7 +437,7 @@
20087
- retarray->base_addr = xmalloc (alloc_size);
20088
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20092
Index: libgfortran/generated/maxloc1_4_i2.c
20093
===================================================================
20094
--- a/src/libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release)
20095
+++ b/src/libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch)
20097
retarray->offset = 0;
20098
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20100
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20101
- * extent[rank-1];
20102
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20104
- retarray->base_addr = xmalloc (alloc_size);
20105
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20106
if (alloc_size == 0)
20108
/* Make sure we have a zero-sized array. */
20109
@@ -294,8 +293,7 @@
20113
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20114
- * extent[rank-1];
20115
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20117
retarray->offset = 0;
20118
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20119
@@ -307,7 +305,7 @@
20123
- retarray->base_addr = xmalloc (alloc_size);
20124
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20128
@@ -485,8 +483,7 @@
20129
retarray->offset = 0;
20130
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20132
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20133
- * extent[rank-1];
20134
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20136
if (alloc_size == 0)
20138
@@ -495,7 +492,7 @@
20142
- retarray->base_addr = xmalloc (alloc_size);
20143
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20147
Index: libgfortran/generated/maxloc1_8_i8.c
20148
===================================================================
20149
--- a/src/libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release)
20150
+++ b/src/libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch)
20152
retarray->offset = 0;
20153
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20155
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20156
- * extent[rank-1];
20157
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20159
- retarray->base_addr = xmalloc (alloc_size);
20160
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20161
if (alloc_size == 0)
20163
/* Make sure we have a zero-sized array. */
20164
@@ -294,8 +293,7 @@
20168
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20169
- * extent[rank-1];
20170
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20172
retarray->offset = 0;
20173
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20174
@@ -307,7 +305,7 @@
20178
- retarray->base_addr = xmalloc (alloc_size);
20179
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20183
@@ -485,8 +483,7 @@
20184
retarray->offset = 0;
20185
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20187
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20188
- * extent[rank-1];
20189
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20191
if (alloc_size == 0)
20193
@@ -495,7 +492,7 @@
20197
- retarray->base_addr = xmalloc (alloc_size);
20198
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20202
Index: libgfortran/generated/maxloc0_4_r8.c
20203
===================================================================
20204
--- a/src/libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release)
20205
+++ b/src/libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch)
20207
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20208
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20209
retarray->offset = 0;
20210
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20211
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20215
@@ -199,7 +199,7 @@
20216
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20217
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20218
retarray->offset = 0;
20219
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20220
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20224
@@ -367,7 +367,7 @@
20225
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20226
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20227
retarray->offset = 0;
20228
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20229
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20231
else if (unlikely (compile_options.bounds_check))
20233
Index: libgfortran/generated/maxloc0_16_r16.c
20234
===================================================================
20235
--- a/src/libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release)
20236
+++ b/src/libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch)
20238
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20239
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20240
retarray->offset = 0;
20241
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20242
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20246
@@ -199,7 +199,7 @@
20247
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20248
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20249
retarray->offset = 0;
20250
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20251
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20255
@@ -367,7 +367,7 @@
20256
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20257
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20258
retarray->offset = 0;
20259
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20260
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20262
else if (unlikely (compile_options.bounds_check))
20264
Index: libgfortran/generated/sum_c10.c
20265
===================================================================
20266
--- a/src/libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release)
20267
+++ b/src/libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch)
20269
retarray->offset = 0;
20270
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20272
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20273
- * extent[rank-1];
20274
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20276
- retarray->base_addr = xmalloc (alloc_size);
20277
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
20278
if (alloc_size == 0)
20280
/* Make sure we have a zero-sized array. */
20281
@@ -272,8 +271,7 @@
20285
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20286
- * extent[rank-1];
20287
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20289
retarray->offset = 0;
20290
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20291
@@ -285,7 +283,7 @@
20295
- retarray->base_addr = xmalloc (alloc_size);
20296
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
20300
@@ -430,8 +428,7 @@
20301
retarray->offset = 0;
20302
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20304
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20305
- * extent[rank-1];
20306
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20308
if (alloc_size == 0)
20310
@@ -440,7 +437,7 @@
20314
- retarray->base_addr = xmalloc (alloc_size);
20315
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
20319
Index: libgfortran/generated/iall_i4.c
20320
===================================================================
20321
--- a/src/libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release)
20322
+++ b/src/libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch)
20324
retarray->offset = 0;
20325
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20327
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20328
- * extent[rank-1];
20329
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20331
- retarray->base_addr = xmalloc (alloc_size);
20332
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20333
if (alloc_size == 0)
20335
/* Make sure we have a zero-sized array. */
20336
@@ -272,8 +271,7 @@
20340
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20341
- * extent[rank-1];
20342
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20344
retarray->offset = 0;
20345
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20346
@@ -285,7 +283,7 @@
20350
- retarray->base_addr = xmalloc (alloc_size);
20351
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20355
@@ -430,8 +428,7 @@
20356
retarray->offset = 0;
20357
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20359
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20360
- * extent[rank-1];
20361
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20363
if (alloc_size == 0)
20365
@@ -440,7 +437,7 @@
20369
- retarray->base_addr = xmalloc (alloc_size);
20370
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20374
Index: libgfortran/generated/minloc1_4_r16.c
20375
===================================================================
20376
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
20377
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
20379
retarray->offset = 0;
20380
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20382
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20383
- * extent[rank-1];
20384
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20386
- retarray->base_addr = xmalloc (alloc_size);
20387
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20388
if (alloc_size == 0)
20390
/* Make sure we have a zero-sized array. */
20391
@@ -294,8 +293,7 @@
20395
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20396
- * extent[rank-1];
20397
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20399
retarray->offset = 0;
20400
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20401
@@ -307,7 +305,7 @@
20405
- retarray->base_addr = xmalloc (alloc_size);
20406
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20410
@@ -485,8 +483,7 @@
20411
retarray->offset = 0;
20412
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20414
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20415
- * extent[rank-1];
20416
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20418
if (alloc_size == 0)
20420
@@ -495,7 +492,7 @@
20424
- retarray->base_addr = xmalloc (alloc_size);
20425
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20429
Index: libgfortran/generated/maxloc0_8_r16.c
20430
===================================================================
20431
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
20432
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
20434
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20435
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20436
retarray->offset = 0;
20437
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20438
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20442
@@ -199,7 +199,7 @@
20443
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20444
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20445
retarray->offset = 0;
20446
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20447
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20451
@@ -367,7 +367,7 @@
20452
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20453
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20454
retarray->offset = 0;
20455
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20456
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20458
else if (unlikely (compile_options.bounds_check))
20460
Index: libgfortran/generated/pack_r8.c
20461
===================================================================
20462
--- a/src/libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release)
20463
+++ b/src/libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch)
20464
@@ -167,8 +167,8 @@
20468
- /* xmalloc allocates a single byte for zero size. */
20469
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
20470
+ /* xmallocarray allocates a single byte for zero size. */
20471
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
20475
Index: libgfortran/generated/matmul_c10.c
20476
===================================================================
20477
--- a/src/libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release)
20478
+++ b/src/libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch)
20479
@@ -124,7 +124,7 @@
20482
retarray->base_addr
20483
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
20484
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
20485
retarray->offset = 0;
20487
else if (unlikely (compile_options.bounds_check))
20488
Index: libgfortran/generated/maxloc0_16_i4.c
20489
===================================================================
20490
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
20491
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
20493
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20494
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20495
retarray->offset = 0;
20496
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20497
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20501
@@ -199,7 +199,7 @@
20502
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20503
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20504
retarray->offset = 0;
20505
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20506
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20510
@@ -367,7 +367,7 @@
20511
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20512
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20513
retarray->offset = 0;
20514
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20515
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20517
else if (unlikely (compile_options.bounds_check))
20519
Index: libgfortran/generated/pack_r16.c
20520
===================================================================
20521
--- a/src/libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release)
20522
+++ b/src/libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch)
20523
@@ -167,8 +167,8 @@
20527
- /* xmalloc allocates a single byte for zero size. */
20528
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
20529
+ /* xmallocarray allocates a single byte for zero size. */
20530
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
20534
Index: libgfortran/generated/minloc1_16_i8.c
20535
===================================================================
20536
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
20537
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
20539
retarray->offset = 0;
20540
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20542
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20543
- * extent[rank-1];
20544
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20546
- retarray->base_addr = xmalloc (alloc_size);
20547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20548
if (alloc_size == 0)
20550
/* Make sure we have a zero-sized array. */
20551
@@ -294,8 +293,7 @@
20555
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20556
- * extent[rank-1];
20557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20559
retarray->offset = 0;
20560
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20561
@@ -307,7 +305,7 @@
20565
- retarray->base_addr = xmalloc (alloc_size);
20566
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20570
@@ -485,8 +483,7 @@
20571
retarray->offset = 0;
20572
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20574
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20575
- * extent[rank-1];
20576
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20578
if (alloc_size == 0)
20580
@@ -495,7 +492,7 @@
20584
- retarray->base_addr = xmalloc (alloc_size);
20585
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20589
Index: libgfortran/generated/minloc0_16_r10.c
20590
===================================================================
20591
--- a/src/libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release)
20592
+++ b/src/libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch)
20594
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20595
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20596
retarray->offset = 0;
20597
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20598
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20602
@@ -199,7 +199,7 @@
20603
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20604
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20605
retarray->offset = 0;
20606
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20607
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20611
@@ -367,7 +367,7 @@
20612
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20613
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20614
retarray->offset = 0;
20615
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20616
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20618
else if (unlikely (compile_options.bounds_check))
20620
Index: libgfortran/generated/unpack_c4.c
20621
===================================================================
20622
--- a/src/libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release)
20623
+++ b/src/libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch)
20628
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
20629
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
20633
@@ -244,7 +244,7 @@
20637
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
20638
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
20642
Index: libgfortran/generated/iparity_i1.c
20643
===================================================================
20644
--- a/src/libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release)
20645
+++ b/src/libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch)
20647
retarray->offset = 0;
20648
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20650
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20651
- * extent[rank-1];
20652
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20654
- retarray->base_addr = xmalloc (alloc_size);
20655
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20656
if (alloc_size == 0)
20658
/* Make sure we have a zero-sized array. */
20659
@@ -272,8 +271,7 @@
20663
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20664
- * extent[rank-1];
20665
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20667
retarray->offset = 0;
20668
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20669
@@ -285,7 +283,7 @@
20673
- retarray->base_addr = xmalloc (alloc_size);
20674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20678
@@ -430,8 +428,7 @@
20679
retarray->offset = 0;
20680
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20682
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20683
- * extent[rank-1];
20684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20686
if (alloc_size == 0)
20688
@@ -440,7 +437,7 @@
20692
- retarray->base_addr = xmalloc (alloc_size);
20693
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20697
Index: libgfortran/generated/product_c8.c
20698
===================================================================
20699
--- a/src/libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release)
20700
+++ b/src/libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch)
20702
retarray->offset = 0;
20703
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20705
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20706
- * extent[rank-1];
20707
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20709
- retarray->base_addr = xmalloc (alloc_size);
20710
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
20711
if (alloc_size == 0)
20713
/* Make sure we have a zero-sized array. */
20714
@@ -272,8 +271,7 @@
20718
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20719
- * extent[rank-1];
20720
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20722
retarray->offset = 0;
20723
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20724
@@ -285,7 +283,7 @@
20728
- retarray->base_addr = xmalloc (alloc_size);
20729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
20733
@@ -430,8 +428,7 @@
20734
retarray->offset = 0;
20735
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20737
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20738
- * extent[rank-1];
20739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20741
if (alloc_size == 0)
20743
@@ -440,7 +437,7 @@
20747
- retarray->base_addr = xmalloc (alloc_size);
20748
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
20752
Index: libgfortran/generated/in_pack_i16.c
20753
===================================================================
20754
--- a/src/libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release)
20755
+++ b/src/libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch)
20757
return source->base_addr;
20759
/* Allocate storage for the destination. */
20760
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
20761
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
20763
src = source->base_addr;
20764
stride0 = stride[0];
20765
Index: libgfortran/generated/minloc0_8_i4.c
20766
===================================================================
20767
--- a/src/libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release)
20768
+++ b/src/libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch)
20770
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20771
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20772
retarray->offset = 0;
20773
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20774
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20778
@@ -199,7 +199,7 @@
20779
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20780
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20781
retarray->offset = 0;
20782
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20783
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20787
@@ -367,7 +367,7 @@
20788
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20789
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20790
retarray->offset = 0;
20791
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20792
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20794
else if (unlikely (compile_options.bounds_check))
20796
Index: libgfortran/generated/matmul_c4.c
20797
===================================================================
20798
--- a/src/libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release)
20799
+++ b/src/libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch)
20800
@@ -124,7 +124,7 @@
20803
retarray->base_addr
20804
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
20805
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
20806
retarray->offset = 0;
20808
else if (unlikely (compile_options.bounds_check))
20809
Index: libgfortran/generated/reshape_i8.c
20810
===================================================================
20811
--- a/src/libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release)
20812
+++ b/src/libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch)
20813
@@ -111,11 +111,11 @@
20816
if (unlikely (rs < 1))
20820
- alloc_size = rs * sizeof (GFC_INTEGER_8);
20823
- ret->base_addr = xmalloc (alloc_size);
20824
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20825
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20828
Index: libgfortran/generated/in_pack_c8.c
20829
===================================================================
20830
--- a/src/libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release)
20831
+++ b/src/libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch)
20833
return source->base_addr;
20835
/* Allocate storage for the destination. */
20836
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
20837
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
20839
src = source->base_addr;
20840
stride0 = stride[0];
20841
Index: libgfortran/generated/bessel_r10.c
20842
===================================================================
20843
--- a/src/libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release)
20844
+++ b/src/libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch)
20847
size_t size = n2 < n1 ? 0 : n2-n1+1;
20848
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20849
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
20850
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
20854
@@ -122,7 +122,7 @@
20856
size_t size = n2 < n1 ? 0 : n2-n1+1;
20857
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20858
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
20859
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
20863
@@ -162,7 +162,7 @@
20865
x2rev = GFC_REAL_10_LITERAL(2.)/x;
20867
- for (i = 2; i <= n1+n2; i++)
20868
+ for (i = 2; i <= n2 - n1; i++)
20870
#if defined(GFC_REAL_10_INFINITY)
20871
if (unlikely (last2 == -GFC_REAL_10_INFINITY))
20872
Index: libgfortran/generated/iall_i16.c
20873
===================================================================
20874
--- a/src/libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release)
20875
+++ b/src/libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch)
20877
retarray->offset = 0;
20878
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20880
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20881
- * extent[rank-1];
20882
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20884
- retarray->base_addr = xmalloc (alloc_size);
20885
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20886
if (alloc_size == 0)
20888
/* Make sure we have a zero-sized array. */
20889
@@ -272,8 +271,7 @@
20893
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20894
- * extent[rank-1];
20895
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20897
retarray->offset = 0;
20898
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20899
@@ -285,7 +283,7 @@
20903
- retarray->base_addr = xmalloc (alloc_size);
20904
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20908
@@ -430,8 +428,7 @@
20909
retarray->offset = 0;
20910
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20912
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20913
- * extent[rank-1];
20914
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20916
if (alloc_size == 0)
20918
@@ -440,7 +437,7 @@
20922
- retarray->base_addr = xmalloc (alloc_size);
20923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20927
Index: libgfortran/generated/maxloc1_16_i1.c
20928
===================================================================
20929
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
20930
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
20932
retarray->offset = 0;
20933
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20935
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20936
- * extent[rank-1];
20937
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20939
- retarray->base_addr = xmalloc (alloc_size);
20940
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20941
if (alloc_size == 0)
20943
/* Make sure we have a zero-sized array. */
20944
@@ -294,8 +293,7 @@
20948
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20949
- * extent[rank-1];
20950
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20952
retarray->offset = 0;
20953
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20954
@@ -307,7 +305,7 @@
20958
- retarray->base_addr = xmalloc (alloc_size);
20959
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20963
@@ -485,8 +483,7 @@
20964
retarray->offset = 0;
20965
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20967
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20968
- * extent[rank-1];
20969
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20971
if (alloc_size == 0)
20973
@@ -495,7 +492,7 @@
20977
- retarray->base_addr = xmalloc (alloc_size);
20978
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20982
Index: libgfortran/generated/reshape_i16.c
20983
===================================================================
20984
--- a/src/libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release)
20985
+++ b/src/libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch)
20986
@@ -111,11 +111,11 @@
20989
if (unlikely (rs < 1))
20993
- alloc_size = rs * sizeof (GFC_INTEGER_16);
20996
- ret->base_addr = xmalloc (alloc_size);
20997
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20998
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21001
Index: libgfortran/generated/count_16_l.c
21002
===================================================================
21003
--- a/src/libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release)
21004
+++ b/src/libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch)
21005
@@ -101,8 +101,7 @@
21006
retarray->offset = 0;
21007
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21009
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21010
- * extent[rank-1];
21011
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21013
if (alloc_size == 0)
21015
@@ -111,7 +110,7 @@
21019
- retarray->base_addr = xmalloc (alloc_size);
21020
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21024
Index: libgfortran/generated/minloc1_8_i1.c
21025
===================================================================
21026
--- a/src/libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release)
21027
+++ b/src/libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch)
21029
retarray->offset = 0;
21030
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21032
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21033
- * extent[rank-1];
21034
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21036
- retarray->base_addr = xmalloc (alloc_size);
21037
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21038
if (alloc_size == 0)
21040
/* Make sure we have a zero-sized array. */
21041
@@ -294,8 +293,7 @@
21045
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21046
- * extent[rank-1];
21047
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21049
retarray->offset = 0;
21050
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21051
@@ -307,7 +305,7 @@
21055
- retarray->base_addr = xmalloc (alloc_size);
21056
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21060
@@ -485,8 +483,7 @@
21061
retarray->offset = 0;
21062
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21064
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21065
- * extent[rank-1];
21066
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21068
if (alloc_size == 0)
21070
@@ -495,7 +492,7 @@
21074
- retarray->base_addr = xmalloc (alloc_size);
21075
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21079
Index: libgfortran/generated/maxloc1_4_i4.c
21080
===================================================================
21081
--- a/src/libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release)
21082
+++ b/src/libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch)
21084
retarray->offset = 0;
21085
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21087
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21088
- * extent[rank-1];
21089
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21091
- retarray->base_addr = xmalloc (alloc_size);
21092
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21093
if (alloc_size == 0)
21095
/* Make sure we have a zero-sized array. */
21096
@@ -294,8 +293,7 @@
21100
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21101
- * extent[rank-1];
21102
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21104
retarray->offset = 0;
21105
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21106
@@ -307,7 +305,7 @@
21110
- retarray->base_addr = xmalloc (alloc_size);
21111
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21115
@@ -485,8 +483,7 @@
21116
retarray->offset = 0;
21117
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21119
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21120
- * extent[rank-1];
21121
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21123
if (alloc_size == 0)
21125
@@ -495,7 +492,7 @@
21129
- retarray->base_addr = xmalloc (alloc_size);
21130
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21134
Index: libgfortran/generated/maxval_i8.c
21135
===================================================================
21136
--- a/src/libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release)
21137
+++ b/src/libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch)
21139
retarray->offset = 0;
21140
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21142
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21143
- * extent[rank-1];
21144
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21146
- retarray->base_addr = xmalloc (alloc_size);
21147
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21148
if (alloc_size == 0)
21150
/* Make sure we have a zero-sized array. */
21151
@@ -286,8 +285,7 @@
21155
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21156
- * extent[rank-1];
21157
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21159
retarray->offset = 0;
21160
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21161
@@ -299,7 +297,7 @@
21165
- retarray->base_addr = xmalloc (alloc_size);
21166
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21170
@@ -472,8 +470,7 @@
21171
retarray->offset = 0;
21172
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21174
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21175
- * extent[rank-1];
21176
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21178
if (alloc_size == 0)
21180
@@ -482,7 +479,7 @@
21184
- retarray->base_addr = xmalloc (alloc_size);
21185
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21189
Index: libgfortran/generated/eoshift3_16.c
21190
===================================================================
21191
--- a/src/libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release)
21192
+++ b/src/libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch)
21197
- ret->base_addr = xmalloc (size * arraysize);
21198
+ ret->base_addr = xmallocarray (arraysize, size);
21200
ret->dtype = array->dtype;
21201
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
21202
@@ -107,8 +107,8 @@
21203
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
21206
- /* xmalloc allocates a single byte for zero size. */
21207
- ret->base_addr = xmalloc (size * arraysize);
21208
+ /* xmallocarray allocates a single byte for zero size. */
21209
+ ret->base_addr = xmallocarray (arraysize, size);
21212
else if (unlikely (compile_options.bounds_check))
21213
Index: libgfortran/generated/shape_i8.c
21214
===================================================================
21215
--- a/src/libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release)
21216
+++ b/src/libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch)
21219
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
21221
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21222
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21225
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
21226
Index: libgfortran/generated/maxloc0_4_i16.c
21227
===================================================================
21228
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
21229
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
21231
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21232
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21233
retarray->offset = 0;
21234
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21235
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21239
@@ -199,7 +199,7 @@
21240
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21241
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21242
retarray->offset = 0;
21243
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21244
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21248
@@ -367,7 +367,7 @@
21249
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21250
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21251
retarray->offset = 0;
21252
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21253
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21255
else if (unlikely (compile_options.bounds_check))
21257
Index: libgfortran/generated/maxloc1_4_r10.c
21258
===================================================================
21259
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
21260
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
21262
retarray->offset = 0;
21263
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21265
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21266
- * extent[rank-1];
21267
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21269
- retarray->base_addr = xmalloc (alloc_size);
21270
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21271
if (alloc_size == 0)
21273
/* Make sure we have a zero-sized array. */
21274
@@ -294,8 +293,7 @@
21278
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21279
- * extent[rank-1];
21280
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21282
retarray->offset = 0;
21283
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21284
@@ -307,7 +305,7 @@
21288
- retarray->base_addr = xmalloc (alloc_size);
21289
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21293
@@ -485,8 +483,7 @@
21294
retarray->offset = 0;
21295
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21297
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21298
- * extent[rank-1];
21299
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21301
if (alloc_size == 0)
21303
@@ -495,7 +492,7 @@
21307
- retarray->base_addr = xmalloc (alloc_size);
21308
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21312
Index: libgfortran/generated/maxloc1_8_i16.c
21313
===================================================================
21314
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
21315
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
21317
retarray->offset = 0;
21318
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21320
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21321
- * extent[rank-1];
21322
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21324
- retarray->base_addr = xmalloc (alloc_size);
21325
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21326
if (alloc_size == 0)
21328
/* Make sure we have a zero-sized array. */
21329
@@ -294,8 +293,7 @@
21333
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21334
- * extent[rank-1];
21335
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21337
retarray->offset = 0;
21338
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21339
@@ -307,7 +305,7 @@
21343
- retarray->base_addr = xmalloc (alloc_size);
21344
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21348
@@ -485,8 +483,7 @@
21349
retarray->offset = 0;
21350
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21352
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21353
- * extent[rank-1];
21354
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21356
if (alloc_size == 0)
21358
@@ -495,7 +492,7 @@
21362
- retarray->base_addr = xmalloc (alloc_size);
21363
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21367
Index: libgfortran/generated/minloc0_8_r10.c
21368
===================================================================
21369
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
21370
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
21372
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21373
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21374
retarray->offset = 0;
21375
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21376
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21380
@@ -199,7 +199,7 @@
21381
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21382
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21383
retarray->offset = 0;
21384
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21385
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21389
@@ -367,7 +367,7 @@
21390
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21391
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21392
retarray->offset = 0;
21393
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21394
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21396
else if (unlikely (compile_options.bounds_check))
21398
Index: libgfortran/generated/iparity_i2.c
21399
===================================================================
21400
--- a/src/libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release)
21401
+++ b/src/libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch)
21403
retarray->offset = 0;
21404
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21406
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21407
- * extent[rank-1];
21408
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21410
- retarray->base_addr = xmalloc (alloc_size);
21411
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21412
if (alloc_size == 0)
21414
/* Make sure we have a zero-sized array. */
21415
@@ -272,8 +271,7 @@
21419
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21420
- * extent[rank-1];
21421
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21423
retarray->offset = 0;
21424
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21425
@@ -285,7 +283,7 @@
21429
- retarray->base_addr = xmalloc (alloc_size);
21430
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21434
@@ -430,8 +428,7 @@
21435
retarray->offset = 0;
21436
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21438
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21439
- * extent[rank-1];
21440
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21442
if (alloc_size == 0)
21444
@@ -440,7 +437,7 @@
21448
- retarray->base_addr = xmalloc (alloc_size);
21449
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21453
Index: libgfortran/generated/maxloc1_16_r4.c
21454
===================================================================
21455
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
21456
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
21458
retarray->offset = 0;
21459
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21461
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21462
- * extent[rank-1];
21463
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21465
- retarray->base_addr = xmalloc (alloc_size);
21466
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21467
if (alloc_size == 0)
21469
/* Make sure we have a zero-sized array. */
21470
@@ -294,8 +293,7 @@
21474
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21475
- * extent[rank-1];
21476
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21478
retarray->offset = 0;
21479
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21480
@@ -307,7 +305,7 @@
21484
- retarray->base_addr = xmalloc (alloc_size);
21485
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21489
@@ -485,8 +483,7 @@
21490
retarray->offset = 0;
21491
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21493
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21494
- * extent[rank-1];
21495
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21497
if (alloc_size == 0)
21499
@@ -495,7 +492,7 @@
21503
- retarray->base_addr = xmalloc (alloc_size);
21504
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21508
Index: libgfortran/generated/maxloc0_16_r8.c
21509
===================================================================
21510
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
21511
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
21513
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21514
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21515
retarray->offset = 0;
21516
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21517
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21521
@@ -199,7 +199,7 @@
21522
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21523
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21524
retarray->offset = 0;
21525
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21526
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21530
@@ -367,7 +367,7 @@
21531
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21532
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21533
retarray->offset = 0;
21534
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21535
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21537
else if (unlikely (compile_options.bounds_check))
21539
Index: libgfortran/generated/sum_i16.c
21540
===================================================================
21541
--- a/src/libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release)
21542
+++ b/src/libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch)
21544
retarray->offset = 0;
21545
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21547
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21548
- * extent[rank-1];
21549
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21551
- retarray->base_addr = xmalloc (alloc_size);
21552
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21553
if (alloc_size == 0)
21555
/* Make sure we have a zero-sized array. */
21556
@@ -272,8 +271,7 @@
21560
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21561
- * extent[rank-1];
21562
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21564
retarray->offset = 0;
21565
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21566
@@ -285,7 +283,7 @@
21570
- retarray->base_addr = xmalloc (alloc_size);
21571
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21575
@@ -430,8 +428,7 @@
21576
retarray->offset = 0;
21577
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21579
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21580
- * extent[rank-1];
21581
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21583
if (alloc_size == 0)
21585
@@ -440,7 +437,7 @@
21589
- retarray->base_addr = xmalloc (alloc_size);
21590
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21594
Index: libgfortran/generated/maxloc0_4_i8.c
21595
===================================================================
21596
--- a/src/libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release)
21597
+++ b/src/libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch)
21599
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21600
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21601
retarray->offset = 0;
21602
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21603
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21607
@@ -199,7 +199,7 @@
21608
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21609
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21610
retarray->offset = 0;
21611
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21612
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21616
@@ -367,7 +367,7 @@
21617
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21618
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21619
retarray->offset = 0;
21620
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21621
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21623
else if (unlikely (compile_options.bounds_check))
21625
Index: libgfortran/generated/pack_c16.c
21626
===================================================================
21627
--- a/src/libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release)
21628
+++ b/src/libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch)
21629
@@ -167,8 +167,8 @@
21633
- /* xmalloc allocates a single byte for zero size. */
21634
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
21635
+ /* xmallocarray allocates a single byte for zero size. */
21636
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
21640
Index: libgfortran/generated/maxloc1_16_i16.c
21641
===================================================================
21642
--- a/src/libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release)
21643
+++ b/src/libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch)
21645
retarray->offset = 0;
21646
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21648
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21649
- * extent[rank-1];
21650
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21652
- retarray->base_addr = xmalloc (alloc_size);
21653
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21654
if (alloc_size == 0)
21656
/* Make sure we have a zero-sized array. */
21657
@@ -294,8 +293,7 @@
21661
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21662
- * extent[rank-1];
21663
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21665
retarray->offset = 0;
21666
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21667
@@ -307,7 +305,7 @@
21671
- retarray->base_addr = xmalloc (alloc_size);
21672
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21676
@@ -485,8 +483,7 @@
21677
retarray->offset = 0;
21678
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21680
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21681
- * extent[rank-1];
21682
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21684
if (alloc_size == 0)
21686
@@ -495,7 +492,7 @@
21690
- retarray->base_addr = xmalloc (alloc_size);
21691
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21695
Index: libgfortran/generated/minloc1_8_r4.c
21696
===================================================================
21697
--- a/src/libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release)
21698
+++ b/src/libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch)
21700
retarray->offset = 0;
21701
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21703
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21704
- * extent[rank-1];
21705
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21707
- retarray->base_addr = xmalloc (alloc_size);
21708
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21709
if (alloc_size == 0)
21711
/* Make sure we have a zero-sized array. */
21712
@@ -294,8 +293,7 @@
21716
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21717
- * extent[rank-1];
21718
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21720
retarray->offset = 0;
21721
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21722
@@ -307,7 +305,7 @@
21726
- retarray->base_addr = xmalloc (alloc_size);
21727
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21731
@@ -485,8 +483,7 @@
21732
retarray->offset = 0;
21733
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21735
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21736
- * extent[rank-1];
21737
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21739
if (alloc_size == 0)
21741
@@ -495,7 +492,7 @@
21745
- retarray->base_addr = xmalloc (alloc_size);
21746
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21750
Index: libgfortran/generated/sum_c8.c
21751
===================================================================
21752
--- a/src/libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release)
21753
+++ b/src/libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch)
21755
retarray->offset = 0;
21756
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21758
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21759
- * extent[rank-1];
21760
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21762
- retarray->base_addr = xmalloc (alloc_size);
21763
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
21764
if (alloc_size == 0)
21766
/* Make sure we have a zero-sized array. */
21767
@@ -272,8 +271,7 @@
21771
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21772
- * extent[rank-1];
21773
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21775
retarray->offset = 0;
21776
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21777
@@ -285,7 +283,7 @@
21781
- retarray->base_addr = xmalloc (alloc_size);
21782
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
21786
@@ -430,8 +428,7 @@
21787
retarray->offset = 0;
21788
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21790
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21791
- * extent[rank-1];
21792
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21794
if (alloc_size == 0)
21796
@@ -440,7 +437,7 @@
21800
- retarray->base_addr = xmalloc (alloc_size);
21801
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
21805
Index: libgfortran/generated/maxloc1_16_i2.c
21806
===================================================================
21807
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
21808
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
21810
retarray->offset = 0;
21811
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21813
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21814
- * extent[rank-1];
21815
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21817
- retarray->base_addr = xmalloc (alloc_size);
21818
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21819
if (alloc_size == 0)
21821
/* Make sure we have a zero-sized array. */
21822
@@ -294,8 +293,7 @@
21826
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21827
- * extent[rank-1];
21828
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21830
retarray->offset = 0;
21831
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21832
@@ -307,7 +305,7 @@
21836
- retarray->base_addr = xmalloc (alloc_size);
21837
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21841
@@ -485,8 +483,7 @@
21842
retarray->offset = 0;
21843
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21845
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21846
- * extent[rank-1];
21847
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21849
if (alloc_size == 0)
21851
@@ -495,7 +492,7 @@
21855
- retarray->base_addr = xmalloc (alloc_size);
21856
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21860
Index: libgfortran/generated/parity_l1.c
21861
===================================================================
21862
--- a/src/libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release)
21863
+++ b/src/libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch)
21865
retarray->offset = 0;
21866
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21868
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21869
- * extent[rank-1];
21870
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21872
- retarray->base_addr = xmalloc (alloc_size);
21873
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
21874
if (alloc_size == 0)
21876
/* Make sure we have a zero-sized array. */
21877
Index: libgfortran/generated/maxval_i16.c
21878
===================================================================
21879
--- a/src/libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release)
21880
+++ b/src/libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch)
21882
retarray->offset = 0;
21883
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21885
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21886
- * extent[rank-1];
21887
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21889
- retarray->base_addr = xmalloc (alloc_size);
21890
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21891
if (alloc_size == 0)
21893
/* Make sure we have a zero-sized array. */
21894
@@ -286,8 +285,7 @@
21898
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21899
- * extent[rank-1];
21900
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21902
retarray->offset = 0;
21903
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21904
@@ -299,7 +297,7 @@
21908
- retarray->base_addr = xmalloc (alloc_size);
21909
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21913
@@ -472,8 +470,7 @@
21914
retarray->offset = 0;
21915
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21917
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21918
- * extent[rank-1];
21919
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21921
if (alloc_size == 0)
21923
@@ -482,7 +479,7 @@
21927
- retarray->base_addr = xmalloc (alloc_size);
21928
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21932
Index: libgfortran/generated/spread_c8.c
21933
===================================================================
21934
--- a/src/libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release)
21935
+++ b/src/libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch)
21936
@@ -101,8 +101,8 @@
21940
- /* xmalloc allocates a single byte for zero size. */
21941
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
21942
+ /* xmallocarray allocates a single byte for zero size. */
21943
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
21947
@@ -244,7 +244,7 @@
21949
if (ret->base_addr == NULL)
21951
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
21952
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
21954
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21956
Index: libgfortran/generated/matmul_i16.c
21957
===================================================================
21958
--- a/src/libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release)
21959
+++ b/src/libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch)
21960
@@ -124,7 +124,7 @@
21963
retarray->base_addr
21964
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
21965
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
21966
retarray->offset = 0;
21968
else if (unlikely (compile_options.bounds_check))
21969
Index: libgfortran/generated/pack_i8.c
21970
===================================================================
21971
--- a/src/libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release)
21972
+++ b/src/libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch)
21973
@@ -167,8 +167,8 @@
21977
- /* xmalloc allocates a single byte for zero size. */
21978
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
21979
+ /* xmallocarray allocates a single byte for zero size. */
21980
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
21984
Index: libgfortran/generated/any_l1.c
21985
===================================================================
21986
--- a/src/libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release)
21987
+++ b/src/libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch)
21988
@@ -101,8 +101,7 @@
21989
retarray->offset = 0;
21990
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21992
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21993
- * extent[rank-1];
21994
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21996
if (alloc_size == 0)
21998
@@ -111,7 +110,7 @@
22002
- retarray->base_addr = xmalloc (alloc_size);
22003
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
22007
Index: libgfortran/generated/minloc1_8_i2.c
22008
===================================================================
22009
--- a/src/libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release)
22010
+++ b/src/libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch)
22012
retarray->offset = 0;
22013
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22015
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22016
- * extent[rank-1];
22017
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22019
- retarray->base_addr = xmalloc (alloc_size);
22020
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22021
if (alloc_size == 0)
22023
/* Make sure we have a zero-sized array. */
22024
@@ -294,8 +293,7 @@
22028
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22029
- * extent[rank-1];
22030
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22032
retarray->offset = 0;
22033
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22034
@@ -307,7 +305,7 @@
22038
- retarray->base_addr = xmalloc (alloc_size);
22039
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22043
@@ -485,8 +483,7 @@
22044
retarray->offset = 0;
22045
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22047
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22048
- * extent[rank-1];
22049
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22051
if (alloc_size == 0)
22053
@@ -495,7 +492,7 @@
22057
- retarray->base_addr = xmalloc (alloc_size);
22058
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22062
Index: libgfortran/generated/minloc0_8_r8.c
22063
===================================================================
22064
--- a/src/libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release)
22065
+++ b/src/libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch)
22067
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22068
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22069
retarray->offset = 0;
22070
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22071
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22075
@@ -199,7 +199,7 @@
22076
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22077
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22078
retarray->offset = 0;
22079
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22080
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22084
@@ -367,7 +367,7 @@
22085
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22086
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22087
retarray->offset = 0;
22088
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22089
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22091
else if (unlikely (compile_options.bounds_check))
22093
Index: libgfortran/generated/matmul_l8.c
22094
===================================================================
22095
--- a/src/libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release)
22096
+++ b/src/libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch)
22100
retarray->base_addr
22101
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
22102
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
22103
retarray->offset = 0;
22105
else if (unlikely (compile_options.bounds_check))
22106
Index: libgfortran/generated/product_r10.c
22107
===================================================================
22108
--- a/src/libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release)
22109
+++ b/src/libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch)
22111
retarray->offset = 0;
22112
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22114
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22115
- * extent[rank-1];
22116
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22118
- retarray->base_addr = xmalloc (alloc_size);
22119
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22120
if (alloc_size == 0)
22122
/* Make sure we have a zero-sized array. */
22123
@@ -272,8 +271,7 @@
22127
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22128
- * extent[rank-1];
22129
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22131
retarray->offset = 0;
22132
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22133
@@ -285,7 +283,7 @@
22137
- retarray->base_addr = xmalloc (alloc_size);
22138
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22142
@@ -430,8 +428,7 @@
22143
retarray->offset = 0;
22144
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22146
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22147
- * extent[rank-1];
22148
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22150
if (alloc_size == 0)
22152
@@ -440,7 +437,7 @@
22156
- retarray->base_addr = xmalloc (alloc_size);
22157
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22161
Index: libgfortran/generated/product_i1.c
22162
===================================================================
22163
--- a/src/libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release)
22164
+++ b/src/libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch)
22166
retarray->offset = 0;
22167
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22169
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22170
- * extent[rank-1];
22171
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22173
- retarray->base_addr = xmalloc (alloc_size);
22174
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22175
if (alloc_size == 0)
22177
/* Make sure we have a zero-sized array. */
22178
@@ -272,8 +271,7 @@
22182
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22183
- * extent[rank-1];
22184
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22186
retarray->offset = 0;
22187
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22188
@@ -285,7 +283,7 @@
22192
- retarray->base_addr = xmalloc (alloc_size);
22193
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22197
@@ -430,8 +428,7 @@
22198
retarray->offset = 0;
22199
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22201
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22202
- * extent[rank-1];
22203
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22205
if (alloc_size == 0)
22207
@@ -440,7 +437,7 @@
22211
- retarray->base_addr = xmalloc (alloc_size);
22212
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22216
Index: libgfortran/generated/all_l8.c
22217
===================================================================
22218
--- a/src/libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release)
22219
+++ b/src/libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch)
22220
@@ -101,8 +101,7 @@
22221
retarray->offset = 0;
22222
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22224
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22225
- * extent[rank-1];
22226
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22228
if (alloc_size == 0)
22230
@@ -111,7 +110,7 @@
22234
- retarray->base_addr = xmalloc (alloc_size);
22235
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
22239
Index: libgfortran/generated/in_pack_r16.c
22240
===================================================================
22241
--- a/src/libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release)
22242
+++ b/src/libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch)
22244
return source->base_addr;
22246
/* Allocate storage for the destination. */
22247
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
22248
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
22250
src = source->base_addr;
22251
stride0 = stride[0];
22252
Index: libgfortran/generated/in_pack_i1.c
22253
===================================================================
22254
--- a/src/libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release)
22255
+++ b/src/libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch)
22257
return source->base_addr;
22259
/* Allocate storage for the destination. */
22260
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
22261
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
22263
src = source->base_addr;
22264
stride0 = stride[0];
22265
Index: libgfortran/libgfortran.h
22266
===================================================================
22267
--- a/src/libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release)
22268
+++ b/src/libgfortran/libgfortran.h (.../branches/gcc-4_8-branch)
22269
@@ -751,6 +751,9 @@
22270
extern void *xmalloc (size_t) __attribute__ ((malloc));
22271
internal_proto(xmalloc);
22273
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
22274
+internal_proto(xmallocarray);
22276
extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
22277
internal_proto(xcalloc);
22279
Index: libgfortran/io/list_read.c
22280
===================================================================
22281
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release)
22282
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
22283
@@ -2354,7 +2354,7 @@
22285
index_type len = strlen (nl->var_name) + 1;
22287
- char * ext_name = (char*)xmalloc (len + 1);
22288
+ char * ext_name = xmalloc (len + 1);
22289
memcpy (ext_name, nl->var_name, len-1);
22290
memcpy (ext_name + len - 1, "%", 2);
22291
for (nl = nl->next; nl; nl = nl->next)
22292
Index: libgfortran/io/unit.c
22293
===================================================================
22294
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
22295
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
22296
@@ -455,7 +455,7 @@
22298
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
22299
iunit->ls = (array_loop_spec *)
22300
- xmalloc (iunit->rank * sizeof (array_loop_spec));
22301
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
22302
dtp->internal_unit_len *=
22303
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
22305
Index: libgfortran/io/unix.c
22306
===================================================================
22307
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
22308
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
22309
@@ -407,7 +407,9 @@
22313
- if (s->fd != STDOUT_FILENO
22316
+ else if (s->fd != STDOUT_FILENO
22317
&& s->fd != STDERR_FILENO
22318
&& s->fd != STDIN_FILENO)
22319
retval = close (s->fd);
22320
@@ -983,7 +985,15 @@
22322
/* Get the current length of the file. */
22324
- fstat (fd, &statbuf);
22325
+ if (fstat (fd, &statbuf) == -1)
22327
+ s->st_dev = s->st_ino = -1;
22328
+ s->file_length = 0;
22329
+ if (errno == EBADF)
22332
+ return (stream *) s;
22335
s->st_dev = statbuf.st_dev;
22336
s->st_ino = statbuf.st_ino;
22337
Index: libgfortran/io/transfer.c
22338
===================================================================
22339
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release)
22340
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
22341
@@ -3776,9 +3776,9 @@
22342
if (nml->var_rank > 0)
22344
nml->dim = (descriptor_dimension*)
22345
- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
22346
+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
22347
nml->ls = (array_loop_spec*)
22348
- xmalloc (nml->var_rank * sizeof (array_loop_spec));
22349
+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
22353
Index: libgfortran/io/write.c
22354
===================================================================
22355
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_3_release)
22356
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
22357
@@ -1863,7 +1863,7 @@
22358
base_var_name_len = base ? strlen (base->var_name) : 0;
22359
ext_name_len = base_name_len + base_var_name_len
22360
+ strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
22361
- ext_name = (char*)xmalloc (ext_name_len);
22362
+ ext_name = xmalloc (ext_name_len);
22364
memcpy (ext_name, base_name, base_name_len);
22365
clen = strlen (obj->var_name + base_var_name_len);
22366
@@ -1892,7 +1892,7 @@
22367
/* Now obj_name. */
22369
obj_name_len = strlen (obj->var_name) + 1;
22370
- obj_name = xmalloc (obj_name_len+1);
22371
+ obj_name = xmalloc (obj_name_len + 1);
22372
memcpy (obj_name, obj->var_name, obj_name_len-1);
22373
memcpy (obj_name + obj_name_len-1, "%", 2);
22375
Index: libada/Makefile.in
22376
===================================================================
22377
--- a/src/libada/Makefile.in (.../tags/gcc_4_8_3_release)
22378
+++ b/src/libada/Makefile.in (.../branches/gcc-4_8-branch)
22380
PICFLAG = @PICFLAG@
22381
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
22382
GNATLIBCFLAGS= -g -O2
22383
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
22384
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
22385
-fexceptions -DIN_RTS @have_getipinfo@
22387
host_subdir = @host_subdir@
22388
Index: libada/ChangeLog
22389
===================================================================
22390
--- a/src/libada/ChangeLog (.../tags/gcc_4_8_3_release)
22391
+++ b/src/libada/ChangeLog (.../branches/gcc-4_8-branch)
22393
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
22395
+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
22397
2014-05-22 Release Manager
22399
* GCC 4.8.3 released.
22400
Index: libffi/src/powerpc/linux64_closure.S
22401
===================================================================
22402
--- a/src/libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release)
22403
+++ b/src/libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch)
22404
@@ -381,7 +381,8 @@
22408
-# if defined __ELF__ && defined __linux__
22411
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
22412
.section .note.GNU-stack,"",@progbits
22415
Index: libffi/src/powerpc/linux64.S
22416
===================================================================
22417
--- a/src/libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release)
22418
+++ b/src/libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch)
22419
@@ -254,7 +254,8 @@
22423
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
22426
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
22427
.section .note.GNU-stack,"",@progbits
22430
Index: libffi/ChangeLog
22431
===================================================================
22432
--- a/src/libffi/ChangeLog (.../tags/gcc_4_8_3_release)
22433
+++ b/src/libffi/ChangeLog (.../branches/gcc-4_8-branch)
22435
+2014-09-11 Jakub Jelinek <jakub@redhat.com>
22437
+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
22438
+ POWERPC64 is not defined.
22439
+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
22441
2014-05-22 Release Manager
22443
* GCC 4.8.3 released.
22444
Index: libcpp/ChangeLog
22445
===================================================================
22446
--- a/src/libcpp/ChangeLog (.../tags/gcc_4_8_3_release)
22447
+++ b/src/libcpp/ChangeLog (.../branches/gcc-4_8-branch)
22449
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22451
+ Backport from mainline r215873
22452
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22454
+ * lex.c (search_line_fast): Add new version to be used for Power8
22455
+ and later targets when Altivec is enabled. Restrict the existing
22456
+ Altivec version to big-endian systems so that lvsr is not used on
22457
+ little endian, where it is deprecated. Remove LE-specific code
22458
+ from the now-BE-only version.
22460
2014-05-22 Release Manager
22462
* GCC 4.8.3 released.
22463
Index: libcpp/lex.c
22464
===================================================================
22465
--- a/src/libcpp/lex.c (.../tags/gcc_4_8_3_release)
22466
+++ b/src/libcpp/lex.c (.../branches/gcc-4_8-branch)
22467
@@ -515,9 +515,111 @@
22468
search_line_fast = impl;
22471
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
22472
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
22474
-/* A vection of the fast scanner using AltiVec vectorized byte compares. */
22475
+/* A vection of the fast scanner using AltiVec vectorized byte compares
22476
+ and VSX unaligned loads (when VSX is available). This is otherwise
22477
+ the same as the pre-GCC 5 version. */
22479
+static const uchar *
22480
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
22482
+ typedef __attribute__((altivec(vector))) unsigned char vc;
22484
+ const vc repl_nl = {
22485
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
22486
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
22488
+ const vc repl_cr = {
22489
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
22490
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
22492
+ const vc repl_bs = {
22493
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
22494
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
22496
+ const vc repl_qm = {
22497
+ '?', '?', '?', '?', '?', '?', '?', '?',
22498
+ '?', '?', '?', '?', '?', '?', '?', '?',
22500
+ const vc zero = { 0 };
22504
+ /* Main loop processing 16 bytes at a time. */
22507
+ vc m_nl, m_cr, m_bs, m_qm;
22509
+ data = *((const vc *)s);
22512
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
22513
+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
22514
+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
22515
+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
22516
+ t = (m_nl | m_cr) | (m_bs | m_qm);
22518
+ /* T now contains 0xff in bytes for which we matched one of the relevant
22519
+ characters. We want to exit the loop if any byte in T is non-zero.
22520
+ Below is the expansion of vec_any_ne(t, zero). */
22522
+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
22524
+ /* Restore s to to point to the 16 bytes we just processed. */
22528
+#define N (sizeof(vc) / sizeof(long))
22532
+ /* Statically assert that N is 2 or 4. */
22533
+ unsigned long l[(N == 2 || N == 4) ? N : -1];
22535
+ unsigned long l, i = 0;
22539
+ /* Find the first word of T that is non-zero. */
22546
+ s += sizeof(unsigned long);
22550
+ s += sizeof(unsigned long);
22555
+ s += sizeof(unsigned long);
22559
+ /* L now contains 0xff in bytes for which we matched one of the
22560
+ relevant characters. We can find the byte index by finding
22561
+ its bit index and dividing by 8. */
22562
+#ifdef __BIG_ENDIAN__
22563
+ l = __builtin_clzl(l) >> 3;
22565
+ l = __builtin_ctzl(l) >> 3;
22573
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
22575
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
22576
+ This cannot be used for little endian because vec_lvsl/lvsr are
22577
+ deprecated for little endian and the code won't work properly. */
22578
/* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
22579
so we can't compile this function without -maltivec on the command line
22580
(or implied by some other switch). */
22581
@@ -559,13 +661,8 @@
22582
beginning with all ones and shifting in zeros according to the
22583
mis-alignment. The LVSR instruction pulls the exact shift we
22584
want from the address. */
22585
-#ifdef __BIG_ENDIAN__
22586
mask = __builtin_vec_lvsr(0, s);
22587
mask = __builtin_vec_perm(zero, ones, mask);
22589
- mask = __builtin_vec_lvsl(0, s);
22590
- mask = __builtin_vec_perm(ones, zero, mask);
22594
/* While altivec loads mask addresses, we still need to align S so
22595
@@ -629,11 +726,7 @@
22596
/* L now contains 0xff in bytes for which we matched one of the
22597
relevant characters. We can find the byte index by finding
22598
its bit index and dividing by 8. */
22599
-#ifdef __BIG_ENDIAN__
22600
l = __builtin_clzl(l) >> 3;
22602
- l = __builtin_ctzl(l) >> 3;
22608
===================================================================
22609
--- a/src/. (.../tags/gcc_4_8_3_release)
22610
+++ b/src/. (.../branches/gcc-4_8-branch)
22612
Property changes on: .
22613
___________________________________________________________________
22614
Modified: svn:mergeinfo
22615
Merged /trunk:r211733,215049