1
# DP: updates from the 4.8 branch upto 20141128 (r218162).
5
cat > ${dir}LAST_UPDATED <<EOF
6
Fri Nov 28 16:58:49 CET 2014
7
Fri Nov 28 15:58:49 UTC 2014 (revision 218162)
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/configure.host
345
===================================================================
346
--- a/src/libstdc++-v3/configure.host (.../tags/gcc_4_8_3_release)
347
+++ b/src/libstdc++-v3/configure.host (.../branches/gcc-4_8-branch)
349
os_include_dir="os/aix"
350
atomicity_dir="os/aix"
351
atomic_word_dir="os/aix"
352
- OPT_LDFLAGS="-Wl,-G"
355
os_include_dir="os/generic"
356
Index: libstdc++-v3/doc/xml/manual/containers.xml
357
===================================================================
358
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release)
359
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch)
361
<section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
364
- Yes it is, and that's okay. This is a decision that we preserved
365
- when we imported SGI's STL implementation. The following is
366
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
367
+ In future GCC will change it to O(1) but O(N) was a decision that we
368
+ preserved when we imported SGI's STL implementation. The following is
369
quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
376
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
377
-<?dbhtml filename="vector.html"?>
381
- <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
384
- In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
385
- message to the list</link>, Daniel Kostecky announced work on an
386
- alternate form of <code>std::vector</code> that would support
387
- hints on the number of elements to be over-allocated. The design
388
- was also described, along with possible implementation choices.
391
- The first two alpha releases were announced <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</link>
392
- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
395
- </section></section>
398
<!-- Sect1 02 : Associative -->
399
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
400
===================================================================
401
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release)
402
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch)
403
@@ -226,10 +226,12 @@
407
+ <?dbhtml bgcolor="#B0B0B0" ?>
408
<entry>18.8.6</entry>
409
<entry><code>nested_exception</code></entry>
412
+ <entry>Partial</entry>
413
+ <entry>Follows an earlier C++0x draft, not the final specification.
418
@@ -612,10 +614,11 @@
422
+ <?dbhtml bgcolor="#B0B0B0" ?>
423
<entry>20.6.12.4</entry>
424
<entry><code>uninitialized_fill_n</code></entry>
427
+ <entry>Partial</entry>
428
+ <entry>Returns <code>void</code>.</entry>
431
<entry>20.6.13</entry>
432
@@ -1119,10 +1122,13 @@
436
+ <?dbhtml bgcolor="#B0B0B0" ?>
438
<entry>Class template <code>basic_string</code></entry>
441
+ <entry>Partial</entry>
442
+ <entry>Non-conforming Copy-On-Write implementation.
443
+ Missing <code>getline</code> overloads for rvalue streams.
448
@@ -1190,10 +1196,11 @@
452
+ <?dbhtml bgcolor="#B0B0B0" ?>
453
<entry>22.3.3.1</entry>
454
<entry>Character classification</entry>
457
+ <entry>Partial</entry>
458
+ <entry>Missing <code>isblank</code>.</entry>
461
<entry>22.3.3.2</entry>
462
@@ -1272,16 +1279,18 @@
466
+ <?dbhtml bgcolor="#B0B0B0" ?>
467
<entry>22.4.5.1</entry>
468
<entry>Class template <code>time_get</code></entry>
471
+ <entry>Partial</entry>
472
+ <entry>Missing <code>get</code> and <code>do_get</code></entry>
475
+ <?dbhtml bgcolor="#B0B0B0" ?>
476
<entry>22.4.5.2</entry>
477
<entry>Class template <code>time_get_byname</code></entry>
480
+ <entry>Partial</entry>
481
+ <entry>Likewise</entry>
484
<entry>22.4.5.3</entry>
485
@@ -1434,8 +1443,10 @@
486
<entry>23.3.5</entry>
487
<entry>Class template <code>list</code></entry>
488
<entry>Partial</entry>
489
- <entry><code>insert</code> and <code>erase</code> members do not
490
- take <code>const_iterator</code> arguments (N2350).</entry>
492
+ <code>insert</code> and <code>erase</code> members do not
493
+ take <code>const_iterator</code> arguments (N2350).
497
<?dbhtml bgcolor="#B0B0B0" ?>
498
@@ -1650,10 +1661,11 @@
502
+ <?dbhtml bgcolor="#B0B0B0" ?>
504
<entry>Mutating sequence operations</entry>
507
+ <entry>Partial</entry>
508
+ <entry><code>rotate</code> returns <code>void</code>.</entry>
512
@@ -2060,10 +2072,13 @@
516
+ <?dbhtml bgcolor="#B0B0B0" ?>
518
<entry>C Library</entry>
521
+ <entry>Partial</entry>
522
+ <entry><code><ctgmath></code> doesn't include
523
+ <code><ccomplex></code>
528
@@ -2143,6 +2158,7 @@
529
Missing move and swap operations on <code>basic_ios</code>.
530
Missing <code>io_errc</code> and <code>iostream_category</code>.
531
<code>ios_base::failure</code> is not derived from <code>system_error</code>.
532
+ Missing <code>ios_base::hexfloat</code>.
536
Index: libstdc++-v3/doc/html/index.html
537
===================================================================
538
--- a/src/libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release)
539
+++ b/src/libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch)
541
</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9.
544
-</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="manual/containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
545
+</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="manual/unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10.
548
</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="manual/iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/algorithms.html">11.
551
</a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
552
<acronym class="acronym">GNU</acronym> General Public License version 3
553
- </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
554
\ No newline at end of file
555
+ </a></span></dt><dt><span class="appendix"><a href="manual/appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library Manual</td></tr></table></div></body></html>
556
Index: libstdc++-v3/doc/html/manual/status.html
557
===================================================================
558
--- a/src/libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release)
559
+++ b/src/libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch)
561
<code class="code">set_new_handler</code> is not thread-safe.
562
</td></tr><tr><td align="left">18.7</td><td align="left">Type identification</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.7.1</td><td align="left">Class type_info</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.2</td><td align="left">Class bad_cast</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.3</td><td align="left">Class bad_typeid</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8</td><td align="left">Exception handling</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.8.1</td><td align="left">Class exception</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.2</td><td align="left">Class bad_exception</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.3</td><td align="left">Abnormal termination</td><td align="left">Partial</td><td align="left">Missing <code class="code">get_terminate</code>.
563
<code class="code">set_terminate</code> is not thread-safe.
564
- </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
565
+ </td></tr><tr><td align="left">18.8.4</td><td align="left"><code class="code">uncaught_exception</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.8.5</td><td align="left">Exception Propagation</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">18.8.6</td><td align="left"><code class="code">nested_exception</code></td><td align="left">Partial</td><td align="left">Follows an earlier C++0x draft, not the final specification.
566
+ </td></tr><tr><td align="left">18.9</td><td align="left">Initializer lists</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.9.1</td><td align="left">Initializer list constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.2</td><td align="left">Initializer list access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.9.3</td><td align="left">Initializer list range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.10</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
567
<span class="emphasis"><em>19</em></span>
568
</td><td colspan="3" align="left">
569
<span class="emphasis"><em>Diagnostics</em></span>
571
<span class="emphasis"><em>20</em></span>
572
</td><td colspan="3" align="left">
573
<span class="emphasis"><em>General utilities</em></span>
574
- </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><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">
575
+ </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code"><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">
578
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
579
@@ -187,14 +188,16 @@
580
<span class="emphasis"><em>21</em></span>
581
</td><td colspan="3" align="left">
582
<span class="emphasis"><em>Strings</em></span>
583
- </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<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.
584
+ </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2.1</td><td align="left">Character traits requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.2</td><td align="left">traits typedefs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.2.3</td><td align="left"><code class="code">char_traits</code> specializations</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.2.3.1</td><td align="left">struct <code class="code">char_traits<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.
585
+ Missing <code class="code">getline</code> overloads for rvalue streams.
586
+ </td></tr><tr><td align="left">21.5</td><td align="left">Numeric Conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.6</td><td align="left">Hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.7</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.
587
Missing <code class="filename"><cuchar></code>
588
</td></tr><tr><td align="left">
589
<span class="emphasis"><em>22</em></span>
590
</td><td colspan="3" align="left">
591
<span class="emphasis"><em>Localization</em></span>
592
- </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><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
593
- <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">
594
+ </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Header <code class="code"><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
595
+ <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">
596
<span class="emphasis"><em>23</em></span>
597
</td><td colspan="3" align="left">
598
<span class="emphasis"><em>Containers</em></span>
600
</td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Container requirements</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.2.1</td><td align="left">General container requirements</td><td align="left">Partial</td><td align="left">Only <code class="code">vector</code> and <code class="code">forward_list</code>
601
meet the requirements
602
relating to allocator use and propagation.</td></tr><tr><td align="left">23.2.2</td><td align="left">Container data races</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.3</td><td align="left">Sequence containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.4</td><td align="left">Associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.5</td><td align="left">Unordered associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3</td><td align="left">Sequence containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.3.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.3</td><td align="left">Class template <code class="code">deque</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
603
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
604
- take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
605
+ take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.3.4</td><td align="left">Class template <code class="code">forward_list</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.5</td><td align="left">Class template <code class="code">list</code></td><td align="left">Partial</td><td align="left">O(N) size.
606
+ <code class="code">insert</code> and <code class="code">erase</code> members do not
607
+ take <code class="code">const_iterator</code> arguments (N2350).
608
+ </td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.6</td><td align="left">Class template <code class="code">vector</code></td><td align="left">Partial</td><td align="left"><code class="code">insert</code> and <code class="code">erase</code> members do not
609
take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr bgcolor="#B0B0B0"><td align="left">23.3.7</td><td align="left">Class <code class="code">vector<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
610
take <code class="code">const_iterator</code> arguments (N2350).</td></tr><tr><td align="left">23.4</td><td align="left">Associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.5</td><td align="left">Class template <code class="code">multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.6</td><td align="left">Class template <code class="code">set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.7</td><td align="left">Class template <code class="code">multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Unordered associative containers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.5.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.5</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.6</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.7</td><td align="left">Class template <code class="code">unordered_multiset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left">Container adaptors</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.6.1</td><td align="left">Class template <code class="code">queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.2</td><td align="left">Class template <code class="code">priority_queue</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.3</td><td align="left">Class template <code class="code">stack</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
611
<span class="emphasis"><em>24</em></span>
612
@@ -212,11 +217,13 @@
613
<span class="emphasis"><em>25</em></span>
614
</td><td colspan="3" align="left">
615
<span class="emphasis"><em>Algorithms</em></span>
616
- </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
617
+ </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Non-modifying sequence operations</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">25.3</td><td align="left">Mutating sequence operations</td><td align="left">Partial</td><td align="left"><code class="code">rotate</code> returns <code class="code">void</code>.</td></tr><tr><td align="left">25.4</td><td align="left">Sorting and related operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
618
<span class="emphasis"><em>26</em></span>
619
</td><td colspan="3" align="left">
620
<span class="emphasis"><em>Numerics</em></span>
621
- </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><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">
622
+ </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Partial</td><td align="left">Missing constexpr</td></tr><tr><td align="left">26.5</td><td align="left">Random number generation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code"><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
623
+ <code class="code"><ccomplex></code>
624
+ </td></tr><tr><td align="left">
625
<span class="emphasis"><em>27</em></span>
626
</td><td colspan="3" align="left">
627
<span class="emphasis"><em>Input/output library</em></span>
629
Missing move and swap operations on <code class="code">basic_ios</code>.
630
Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
631
<code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
632
+ Missing <code class="code">ios_base::hexfloat</code>.
633
</td></tr><tr><td align="left">27.6</td><td align="left">Stream buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">27.7</td><td align="left">Formatting and manipulators</td><td align="left">Partial</td><td align="left">
634
Missing move and swap operations
635
Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
636
Index: libstdc++-v3/doc/html/manual/abi.html
637
===================================================================
638
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
639
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
641
definitions, where the version definition is the maximum for a
642
particular release. Labels are cumulative. If a particular release
643
is not listed, it has the same version labels as the preceding
644
- release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li></ul></div></li><li class="listitem"><p>
645
+ release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li><li class="listitem"><p>GCC 4.8.0: GCC_4.8.0</p></li></ul></div></li><li class="listitem"><p>
646
Release versioning on the libstdc++.so binary, implemented in
647
the same way as the libgcc_s.so binary above. Listed is the
648
filename: <code class="constant">DT_SONAME</code> can be deduced from
650
has the same filename and <code class="constant">DT_SONAME</code> as the
652
</p><p>It is versioned as follows:
653
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li></ul></div><p>
654
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li><li class="listitem"><p>GCC 4.7.0: libstdc++.so.6.0.17</p></li><li class="listitem"><p>GCC 4.8.0: libstdc++.so.6.0.18</p></li><li class="listitem"><p>GCC 4.8.3: libstdc++.so.6.0.19</p></li></ul></div><p>
655
Note 1: Error should be libstdc++.so.3.0.3.
657
Note 2: Not strictly required.
659
GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
660
release.) If a particular release is not listed, it has the same
661
version labels as the preceding release.
662
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
663
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6</p></li><li class="listitem"><p>GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7</p></li><li class="listitem"><p>GCC 4.8.3: GLIBCXX_3.4.19, CXXABI_1.3.7</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
664
__GXX_ABI_VERSION. This macro is defined as the version of the
665
compiler v3 ABI, with g++ 3.0 being version 100. This macro will
666
be automatically defined whenever g++ is used (the curious can
667
Index: libstdc++-v3/doc/html/manual/std_contents.html
668
===================================================================
669
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release)
670
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch)
672
</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
675
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
676
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
679
</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
681
</a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4.
684
-</td></tr></table></div></body></html>
685
\ No newline at end of file
686
+</td></tr></table></div></body></html>
687
Index: libstdc++-v3/doc/html/manual/containers.html
688
===================================================================
689
--- a/src/libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release)
690
+++ b/src/libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch)
692
</th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"></a>Chapter 9.
694
<a id="idm269999493408" class="indexterm"></a>
695
-</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
696
- Yes it is, and that's okay. This is a decision that we preserved
697
- when we imported SGI's STL implementation. The following is
698
+</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
699
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
700
+ In future GCC will change it to O(1) but O(N) was a decision that we
701
+ preserved when we imported SGI's STL implementation. The following is
702
quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
703
</p><div class="blockquote"><blockquote class="blockquote"><p>
704
The size() member function, for list and slist, takes time
706
</p><pre class="programlisting">
709
- </pre></blockquote></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.vector"></a>vector</h3></div></div></div><p>
710
- </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p>
711
- In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
712
- message to the list</a>, Daniel Kostecky announced work on an
713
- alternate form of <code class="code">std::vector</code> that would support
714
- hints on the number of elements to be over-allocated. The design
715
- was also described, along with possible implementation choices.
717
- The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
718
- and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
719
- </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
720
\ No newline at end of file
721
+ </pre></blockquote></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="std_contents.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>
722
Index: libstdc++-v3/doc/html/manual/index.html
723
===================================================================
724
--- a/src/libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release)
725
+++ b/src/libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch)
727
</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#idm269999753024">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
730
-</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
731
+</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="unordered_associative.html">Unordered Associative</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.hash">Hash Code</a></span></dt><dd><dl><dt><span class="section"><a href="unordered_associative.html#containers.unordered.cache">Hash Code Caching Policy</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
734
</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="algorithms.html">11.
736
</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part I.
739
-</td></tr></table></div></body></html>
740
\ No newline at end of file
741
+</td></tr></table></div></body></html>
742
Index: libstdc++-v3/include/std/future
743
===================================================================
744
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
745
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
746
@@ -351,12 +351,14 @@
748
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
750
- bool __set = __ignore_failure;
751
+ bool __set = false;
752
// all calls to this function are serialized,
753
// side-effects of invoking __res only happen once
754
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
758
+ _M_cond.notify_all();
759
+ else if (!__ignore_failure)
760
__throw_future_error(int(future_errc::promise_already_satisfied));
764
lock_guard<mutex> __lock(_M_mutex);
765
_M_result.swap(__res);
767
- _M_cond.notify_all();
771
@@ -983,22 +984,25 @@
773
set_value(const _Res& __r)
775
+ auto __future = _M_future;
776
auto __setter = _State::__setter(this, __r);
777
- _M_future->_M_set_result(std::move(__setter));
778
+ __future->_M_set_result(std::move(__setter));
782
set_value(_Res&& __r)
784
+ auto __future = _M_future;
785
auto __setter = _State::__setter(this, std::move(__r));
786
- _M_future->_M_set_result(std::move(__setter));
787
+ __future->_M_set_result(std::move(__setter));
791
set_exception(exception_ptr __p)
793
+ auto __future = _M_future;
794
auto __setter = _State::__setter(__p, this);
795
- _M_future->_M_set_result(std::move(__setter));
796
+ __future->_M_set_result(std::move(__setter));
800
@@ -1081,15 +1085,17 @@
804
+ auto __future = _M_future;
805
auto __setter = _State::__setter(this, __r);
806
- _M_future->_M_set_result(std::move(__setter));
807
+ __future->_M_set_result(std::move(__setter));
811
set_exception(exception_ptr __p)
813
+ auto __future = _M_future;
814
auto __setter = _State::__setter(__p, this);
815
- _M_future->_M_set_result(std::move(__setter));
816
+ __future->_M_set_result(std::move(__setter));
820
@@ -1166,8 +1172,9 @@
822
set_exception(exception_ptr __p)
824
+ auto __future = _M_future;
825
auto __setter = _State::__setter(__p, this);
826
- _M_future->_M_set_result(std::move(__setter));
827
+ __future->_M_set_result(std::move(__setter));
831
@@ -1193,8 +1200,9 @@
833
promise<void>::set_value()
835
+ auto __future = _M_future;
836
auto __setter = _State::__setter(this);
837
- _M_future->_M_set_result(std::move(__setter));
838
+ __future->_M_set_result(std::move(__setter));
842
Index: libstdc++-v3/include/ext/rope
843
===================================================================
844
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
845
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
846
@@ -1544,7 +1544,7 @@
847
typedef typename _Base::allocator_type allocator_type;
848
using _Base::_M_tree_ptr;
849
using _Base::get_allocator;
850
- using _Base::_M_get_allocator;
851
+ using _Base::_M_get_allocator;
852
typedef __GC_CONST _CharT* _Cstrptr;
854
static _CharT _S_empty_c_str[1];
855
@@ -1876,8 +1876,9 @@
856
const allocator_type& __a = allocator_type())
859
- this->_M_tree_ptr = (0 == __len) ?
860
- 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
861
+ this->_M_tree_ptr = (0 == __len)
863
+ : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
866
rope(const rope& __x, const allocator_type& __a = allocator_type())
867
Index: libstdc++-v3/include/bits/stl_tree.h
868
===================================================================
869
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
870
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
871
@@ -510,11 +510,11 @@
875
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
876
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
880
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
881
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
883
static const_reference
884
_S_value(_Const_Link_type __x)
885
Index: libstdc++-v3/include/tr2/bool_set
886
===================================================================
887
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
888
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
892
* See N2136, Bool_set: multi-valued logic
893
- * by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
894
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
896
* The implicit conversion to bool is slippery! I may use the new
897
* explicit conversion. This has been specialized in the language
898
Index: libstdc++-v3/ChangeLog
899
===================================================================
900
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
901
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
903
+2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
905
+ Backport from mainline
906
+ 2014-09-10 Tony Wang <tony.wang@arm.com>
909
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
910
+ Return with CONTINUE_UNWINDING when the state pattern
911
+ contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
913
+2014-11-05 David Edelsohn <dje.gcc@gmail.com>
915
+ Backported from mainline.
916
+ 2014-10-30 David Edelsohn <dje.gcc@gmail.com>
918
+ * configure.host (aix4.3+, 5+): Do not use -G in link command.
920
+2014-10-15 Jason Merrill <jason@redhat.com>
922
+ * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
923
+ dynamic_cast more gracefully.
925
+2014-10-14 Kai Tietz <ktietz@redhat.com>
928
+ * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
929
+ Define to avoid leak.
930
+ * config/os/mingw32-w64/os_defines.h: Likewise.
932
+2014-10-03 Jonathan Wakely <jwakely@redhat.com>
935
+ * doc/xml/manual/containers.xml: Remove outdated section. Update
937
+ * doc/html/*: Regenerate.
939
+2014-10-01 Jonathan Wakely <jwakely@redhat.com>
941
+ * doc/xml/manual/status_cxx2011.xml: Corrections.
942
+ * doc/html/manual/status.html: Regenerate.
944
+2014-08-28 Samuel Bronson <naesten@gmail.com>
946
+ Backport r212453 from trunk
947
+ 2014-07-11 Samuel Bronson <naesten@gmail.com>
948
+ Matthias Klose <doko@ubuntu.com>
951
+ * python/libstdcxx/v6/printers.py: Port to Python 2+3
952
+ (imap): New compat function.
954
+ (Iterator): New mixin to allow writing iterators in Python 3 style
955
+ regardless of which version we're running on.
956
+ [Python3] (long) New compat alias for "int".
957
+ * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
959
+ Backport r210625 from trunk
960
+ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
962
+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
964
+2014-08-26 John David Anglin <danglin@gcc.gnu.org>
966
+ * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
968
+2014-08-26 Jonathan Wakely <jwakely@redhat.com>
970
+ * doc/xml/manual/status_cxx2011.xml: Correct status table.
971
+ * doc/html/manual/*: Regenerate.
973
+2014-08-04 Jonathan Wakely <jwakely@redhat.com>
975
+ Backported from mainline
976
+ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
979
+ * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
980
+ const allocator_type&)): Pass non-const allocator to
981
+ _S_new_RopeFunction.
982
+ * testsuite/ext/rope/61946.cc: New.
984
+2014-08-04 Zifei Tong <zifeitong@gmail.com>
986
+ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
987
+ _GLIBCXX_ prefix to macro.
989
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
991
+ Backport from mainline
992
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
995
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
997
+ Backport from mainline
998
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
1000
+ PR libstdc++/60966
1001
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
1002
+ Signal condition variable after call_once returns.
1003
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
1004
+ (promise::set_value, promise::set_exception): Increment the reference
1005
+ count on the shared state until the function returns.
1006
+ * testsuite/30_threads/promise/60966.cc: New.
1008
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
1010
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
1011
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
1013
2014-05-22 Release Manager
1015
* GCC 4.8.3 released.
1016
Index: libstdc++-v3/libsupc++/atexit_thread.cc
1017
===================================================================
1018
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release)
1019
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch)
1022
#include "bits/gthr.h"
1024
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
1025
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
1027
extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
1028
void *arg, void *d);
1030
return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
1033
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1034
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1037
// One element in a singly-linked stack of cleanups.
1042
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1043
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1044
Index: libstdc++-v3/libsupc++/eh_personality.cc
1045
===================================================================
1046
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc (.../tags/gcc_4_8_3_release)
1047
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc (.../branches/gcc-4_8-branch)
1048
@@ -378,6 +378,12 @@
1049
switch (state & _US_ACTION_MASK)
1051
case _US_VIRTUAL_UNWIND_FRAME:
1052
+ // If the unwind state pattern is
1053
+ // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1054
+ // then we don't need to search for any handler as it is not a real
1055
+ // exception. Just unwind the stack.
1056
+ if (state & _US_FORCE_UNWIND)
1057
+ CONTINUE_UNWINDING;
1058
actions = _UA_SEARCH_PHASE;
1061
Index: libstdc++-v3/libsupc++/dyncast.cc
1062
===================================================================
1063
--- a/src/libstdc++-v3/libsupc++/dyncast.cc (.../tags/gcc_4_8_3_release)
1064
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc (.../branches/gcc-4_8-branch)
1066
adjust_pointer <void> (src_ptr, prefix->whole_object);
1067
const __class_type_info *whole_type = prefix->whole_type;
1068
__class_type_info::__dyncast_result result;
1070
+ // If the whole object vptr doesn't refer to the whole object type, we're
1071
+ // in the middle of constructing a primary base, and src is a separate
1072
+ // base. This has undefined behavior and we can't find anything outside
1073
+ // of the base we're actually constructing, so fail now rather than
1074
+ // segfault later trying to use a vbase offset that doesn't exist.
1075
+ const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
1076
+ const vtable_prefix *whole_prefix =
1077
+ adjust_pointer <vtable_prefix> (whole_vtable,
1078
+ -offsetof (vtable_prefix, origin));
1079
+ if (whole_prefix->whole_type != whole_type)
1082
whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
1083
dst_type, whole_ptr, src_type, src_ptr, result);
1084
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1085
===================================================================
1086
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
1087
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
1089
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1090
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1091
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1092
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1093
+// { dg-require-cstdint "" }
1094
+// { dg-require-gthreads "" }
1095
+// { dg-require-atomic-builtins "" }
1097
+// Copyright (C) 2014 Free Software Foundation, Inc.
1099
+// This file is part of the GNU ISO C++ Library. This library is free
1100
+// software; you can redistribute it and/or modify it under the
1101
+// terms of the GNU General Public License as published by the
1102
+// Free Software Foundation; either version 3, or (at your option)
1103
+// any later version.
1105
+// This library is distributed in the hope that it will be useful,
1106
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1107
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1108
+// GNU General Public License for more details.
1110
+// You should have received a copy of the GNU General Public License along
1111
+// with this library; see the file COPYING3. If not see
1112
+// <http://www.gnu.org/licenses/>.
1115
+// This test hangs if std::promise::~promise() destroys the
1116
+// shared state before std::promise::set_value() finishes using it.
1122
+const int THREADS = 10;
1124
+void run_task(std::promise<void>* pr)
1126
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
1132
+ std::vector<std::promise<void>*> tasks(THREADS);
1133
+ std::vector<std::thread> threads(THREADS);
1134
+ std::vector<std::future<void>> futures(THREADS);
1136
+ for (int i = 0; i < THREADS; ++i)
1138
+ std::promise<void>* task = new std::promise<void>;
1140
+ futures[i] = task->get_future();
1141
+ threads[i] = std::thread(run_task, task);
1144
+ for (int i = 0; i < THREADS; ++i)
1146
+ // the temporary future releases the state as soon as wait() returns
1147
+ std::future<void>(std::move(futures[i])).wait();
1148
+ // state is ready, should now be safe to delete promise, so it
1149
+ // releases the shared state too
1153
+ for (auto& t : threads)
1156
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1157
===================================================================
1158
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release)
1159
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch)
1161
+// Copyright (C) 2014 Free Software Foundation, Inc.
1163
+// This file is part of the GNU ISO C++ Library. This library is free
1164
+// software; you can redistribute it and/or modify it under the
1165
+// terms of the GNU General Public License as published by the
1166
+// Free Software Foundation; either version 3, or (at your option)
1167
+// any later version.
1169
+// This library is distributed in the hope that it will be useful,
1170
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1171
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1172
+// GNU General Public License for more details.
1174
+// You should have received a copy of the GNU General Public License along
1175
+// with this library; see the file COPYING3. If not see
1176
+// <http://www.gnu.org/licenses/>.
1178
+// { dg-do compile }
1180
+#include <ext/rope>
1182
+struct empty_char_prod : __gnu_cxx::char_producer<char>
1184
+ virtual void operator()(size_t, size_t, char*) {}
1189
+ empty_char_prod* ecp = new empty_char_prod;
1190
+ __gnu_cxx::crope excrope( ecp, 10L, true );
1192
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1193
===================================================================
1194
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release)
1195
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch)
1200
- set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1201
+ set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1203
if {!$do_whatis_tests} {
1204
send_log "skipping 'whatis' tests - gdb too old"
1206
# but not earlier versions.
1207
# Return 1 if the version is ok, 0 otherwise.
1208
proc gdb_version_check {} {
1209
- return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1210
+ return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1211
"<built-in function lookup_global_symbol>"]
1213
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
1214
===================================================================
1215
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../tags/gcc_4_8_3_release)
1216
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../branches/gcc-4_8-branch)
1218
#define _GLIBCXX_LLP64 1
1221
+// See libstdc++/59807
1222
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1225
Index: libstdc++-v3/config/os/mingw32/os_defines.h
1226
===================================================================
1227
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../tags/gcc_4_8_3_release)
1228
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../branches/gcc-4_8-branch)
1230
#define _GLIBCXX_LLP64 1
1233
+// See libstdc++/59807
1234
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1237
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1238
===================================================================
1239
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release)
1240
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch)
1242
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1243
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1244
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1245
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1246
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1247
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1248
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1250
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1251
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1252
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1253
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1254
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1255
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1256
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1257
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1258
@@ -1204,6 +1207,7 @@
1259
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1260
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1261
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1262
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1263
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1264
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1265
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1266
@@ -1471,6 +1475,11 @@
1267
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1268
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1269
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1270
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1271
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1272
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1273
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1274
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1275
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1276
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1277
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1278
@@ -1900,6 +1909,8 @@
1279
FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1280
FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1281
FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1282
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1283
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1284
FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1285
FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1286
FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1287
@@ -2436,6 +2447,7 @@
1288
FUNC:__cxa_guard_release@@CXXABI_1.3
1289
FUNC:__cxa_pure_virtual@@CXXABI_1.3
1290
FUNC:__cxa_rethrow@@CXXABI_1.3
1291
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1292
FUNC:__cxa_throw@@CXXABI_1.3
1293
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1294
FUNC:__cxa_vec_cctor@@CXXABI_1.3
1295
@@ -2482,6 +2494,7 @@
1296
OBJECT:0:CXXABI_1.3.4
1297
OBJECT:0:CXXABI_1.3.5
1298
OBJECT:0:CXXABI_1.3.6
1299
+OBJECT:0:CXXABI_1.3.7
1300
OBJECT:0:CXXABI_TM_1
1301
OBJECT:0:GLIBCXX_3.4
1302
OBJECT:0:GLIBCXX_3.4.1
1303
@@ -2493,6 +2506,8 @@
1304
OBJECT:0:GLIBCXX_3.4.15
1305
OBJECT:0:GLIBCXX_3.4.16
1306
OBJECT:0:GLIBCXX_3.4.17
1307
+OBJECT:0:GLIBCXX_3.4.18
1308
+OBJECT:0:GLIBCXX_3.4.19
1309
OBJECT:0:GLIBCXX_3.4.2
1310
OBJECT:0:GLIBCXX_3.4.3
1311
OBJECT:0:GLIBCXX_3.4.4
1312
@@ -2992,6 +3007,8 @@
1313
OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1314
OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1315
OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1316
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1317
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1318
OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1319
OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1320
OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1322
===================================================================
1323
--- a/src/configure.ac (.../tags/gcc_4_8_3_release)
1324
+++ b/src/configure.ac (.../branches/gcc-4_8-branch)
1325
@@ -1154,6 +1154,9 @@
1327
host_makefile_frag="config/mh-mingw"
1330
+ host_makefile_frag="config/mh-alpha-linux"
1333
host_makefile_frag="config/mh-pa-hpux10"
1336
===================================================================
1337
--- a/src/ChangeLog (.../tags/gcc_4_8_3_release)
1338
+++ b/src/ChangeLog (.../branches/gcc-4_8-branch)
1340
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1343
+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1344
+ * configure: Regenerate.
1346
2014-05-22 Release Manager
1348
* GCC 4.8.3 released.
1349
Index: contrib/ChangeLog
1350
===================================================================
1351
--- a/src/contrib/ChangeLog (.../tags/gcc_4_8_3_release)
1352
+++ b/src/contrib/ChangeLog (.../branches/gcc-4_8-branch)
1354
+2014-07-07 Richard Biener <rguenther@suse.de>
1356
+ * gennews: Use gcc-3.0/index.html.
1358
2014-05-22 Release Manager
1360
* GCC 4.8.3 released.
1361
Index: contrib/gennews
1362
===================================================================
1363
--- a/src/contrib/gennews (.../tags/gcc_4_8_3_release)
1364
+++ b/src/contrib/gennews (.../branches/gcc-4_8-branch)
1366
gcc-3.3/index.html gcc-3.3/changes.html
1367
gcc-3.2/index.html gcc-3.2/changes.html
1368
gcc-3.1/index.html gcc-3.1/changes.html
1369
- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1370
+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1371
gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
1372
egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
1373
egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
1374
Index: config/mh-alpha-linux
1375
===================================================================
1376
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
1377
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
1379
+# Prevent GPREL16 relocation truncation
1380
+LDFLAGS += -Wl,--no-relax
1381
+BOOT_LDFLAGS += -Wl,--no-relax
1382
Index: config/ChangeLog
1383
===================================================================
1384
--- a/src/config/ChangeLog (.../tags/gcc_4_8_3_release)
1385
+++ b/src/config/ChangeLog (.../branches/gcc-4_8-branch)
1387
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1390
+ * mh-alpha-linux: New file.
1392
2014-05-22 Release Manager
1394
* GCC 4.8.3 released.
1395
Index: libjava/classpath
1396
===================================================================
1397
--- a/src/libjava/classpath (.../tags/gcc_4_8_3_release)
1398
+++ b/src/libjava/classpath (.../branches/gcc-4_8-branch)
1400
Property changes on: libjava/classpath
1401
___________________________________________________________________
1402
Modified: svn:mergeinfo
1403
Merged /trunk/libjava/classpath:r211733,215049
1405
===================================================================
1406
--- a/src/configure (.../tags/gcc_4_8_3_release)
1407
+++ b/src/configure (.../branches/gcc-4_8-branch)
1408
@@ -3834,6 +3834,9 @@
1410
host_makefile_frag="config/mh-mingw"
1413
+ host_makefile_frag="config/mh-alpha-linux"
1416
host_makefile_frag="config/mh-pa-hpux10"
1418
Index: libgcc/ChangeLog
1419
===================================================================
1420
--- a/src/libgcc/ChangeLog (.../tags/gcc_4_8_3_release)
1421
+++ b/src/libgcc/ChangeLog (.../branches/gcc-4_8-branch)
1423
+2014-10-26 John David Anglin <danglin@gcc.gnu.org>
1425
+ * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
1426
+ (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
1427
+ memory read accesses are ok.
1429
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
1431
+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
1432
+ bits not set bits as indicating trapping exceptions.
1434
2014-05-22 Release Manager
1436
* GCC 4.8.3 released.
1437
Index: libgcc/config/i386/sfp-machine.h
1438
===================================================================
1439
--- a/src/libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release)
1440
+++ b/src/libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch)
1442
__sfp_handle_exceptions (_fex); \
1445
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1446
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1448
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
1450
Index: libgcc/config/pa/linux-unwind.h
1451
===================================================================
1452
--- a/src/libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release)
1453
+++ b/src/libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch)
1456
#include <sys/ucontext.h>
1458
+/* Return TRUE if read access to *P is allowed. */
1461
+pa32_read_access_ok (void *p)
1465
+ __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
1469
/* Unfortunately, because of various bugs and changes to the kernel,
1470
we have several cases to deal with.
1473
tell us how to locate the sigcontext structure.
1475
Note that with a 2.4 64-bit kernel, the signal context is not properly
1476
- passed back to userspace so the unwind will not work correctly. */
1477
+ passed back to userspace so the unwind will not work correctly.
1479
+ There is also a bug in various glibc versions. The (CONTEXT)->ra
1480
+ for the outermost frame is not marked as undefined, so we need to
1481
+ check whether read access is allowed for all the accesses used in
1482
+ searching for the signal trampoline. */
1484
#define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
1486
static _Unwind_Reason_Code
1488
e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
1491
- if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
1492
+ if (pa32_read_access_ok (pc)
1493
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1495
- else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
1496
+ else if (pa32_read_access_ok (&pc[4])
1497
+ && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
1502
- else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
1503
+ else if (pa32_read_access_ok (&pc[5])
1504
+ && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
1508
@@ -96,13 +115,16 @@
1509
word boundary and we can then determine the frame offset. */
1510
sp = (unsigned long)context->ra;
1511
pc = (unsigned int *)sp;
1512
- if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
1514
+ && pa32_read_access_ok (pc)
1515
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1518
return _URC_END_OF_STACK;
1521
- if (pc[1] != 0x3414015a
1522
+ if (!pa32_read_access_ok (&pc[3])
1523
+ || pc[1] != 0x3414015a
1524
|| pc[2] != 0xe4008200
1525
|| pc[3] != 0x08000240)
1526
return _URC_END_OF_STACK;
1527
Index: gcc/tree-ssa-tail-merge.c
1528
===================================================================
1529
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release)
1530
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
1532
def_operand_p def_p;
1534
if (gimple_has_side_effects (stmt)
1535
- || gimple_vdef (stmt) != NULL_TREE)
1536
+ || gimple_vdef (stmt) != NULL_TREE
1537
+ || gimple_vuse (stmt) != NULL_TREE)
1540
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
1541
@@ -1060,6 +1061,24 @@
1545
+/* Return true if gimple operands T1 and T2 have the same value. */
1548
+gimple_operand_equal_value_p (tree t1, tree t2)
1553
+ if (t1 == NULL_TREE
1554
+ || t2 == NULL_TREE)
1557
+ if (operand_equal_p (t1, t2, 0))
1560
+ return gvn_uses_equal (t1, t2);
1563
/* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
1564
gimple_bb (s2) are members of SAME_SUCC. */
1566
@@ -1122,11 +1141,13 @@
1567
lhs2 = gimple_get_lhs (s2);
1568
if (TREE_CODE (lhs1) != SSA_NAME
1569
&& TREE_CODE (lhs2) != SSA_NAME)
1570
- return (vn_valueize (gimple_vdef (s1))
1571
- == vn_valueize (gimple_vdef (s2)));
1572
+ return (operand_equal_p (lhs1, lhs2, 0)
1573
+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
1574
+ gimple_assign_rhs1 (s2)));
1575
else if (TREE_CODE (lhs1) == SSA_NAME
1576
&& TREE_CODE (lhs2) == SSA_NAME)
1577
- return vn_valueize (lhs1) == vn_valueize (lhs2);
1578
+ return operand_equal_p (gimple_assign_rhs1 (s1),
1579
+ gimple_assign_rhs1 (s2), 0);
1583
Index: gcc/DATESTAMP
1584
===================================================================
1585
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
1586
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
1590
Index: gcc/tree-ssa-strlen.c
1591
===================================================================
1592
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
1593
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
1594
@@ -1777,7 +1777,7 @@
1598
- else if (is_gimple_assign (stmt))
1599
+ else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
1601
tree lhs = gimple_assign_lhs (stmt);
1604
===================================================================
1605
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
1606
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
1608
else if (!opt_for_fn (node->symbol.decl, optimize)
1609
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
1610
reason = "non-optimized function";
1611
+ else if (node->tm_clone)
1612
+ reason = "transactional memory clone";
1614
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
1615
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
1616
@@ -2902,6 +2904,11 @@
1617
intersect_with_agg_replacements (cs->caller, src_idx,
1628
@@ -2917,6 +2924,11 @@
1630
intersect_with_plats (src_plats, &inter, 0);
1639
else if (jfunc->type == IPA_JF_ANCESTOR
1640
@@ -3000,7 +3012,8 @@
1641
vec<cgraph_edge_p> callers)
1643
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
1644
- struct ipa_agg_replacement_value *res = NULL;
1645
+ struct ipa_agg_replacement_value *res;
1646
+ struct ipa_agg_replacement_value **tail = &res;
1647
struct cgraph_edge *cs;
1648
int i, j, count = ipa_get_param_count (dest_info);
1650
@@ -3044,8 +3057,8 @@
1651
v->offset = item->offset;
1652
v->value = item->value;
1653
v->by_ref = plats->aggs_by_ref;
1661
@@ -3052,6 +3065,7 @@
1662
if (inter.exists ())
1669
@@ -3060,7 +3074,8 @@
1670
static struct ipa_agg_replacement_value *
1671
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
1673
- struct ipa_agg_replacement_value *res = NULL;
1674
+ struct ipa_agg_replacement_value *res;
1675
+ struct ipa_agg_replacement_value **tail = &res;
1676
struct ipa_agg_jump_function *aggjf;
1677
struct ipa_agg_jf_item *item;
1679
@@ -3074,9 +3089,10 @@
1680
v->offset = item->offset;
1681
v->value = item->value;
1682
v->by_ref = aggjf->by_ref;
1692
Index: gcc/configure
1693
===================================================================
1694
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
1695
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
1697
enable_gnu_indirect_function
1698
enable_initfini_array
1700
+enable_fix_cortex_a53_835769
1701
enable_gnu_unique_object
1702
enable_linker_build_id
1703
with_long_double_128
1704
@@ -1619,6 +1620,14 @@
1706
--enable-initfini-array use .init_array/.fini_array sections
1707
--enable-comdat enable COMDAT group support
1709
+ --enable-fix-cortex-a53-835769
1710
+ enable workaround for AArch64 Cortex-A53 erratum
1712
+ --disable-fix-cortex-a53-835769
1713
+ disable workaround for AArch64 Cortex-A53 erratum
1716
--enable-gnu-unique-object
1717
enable the use of the @gnu_unique_object ELF
1718
extension on glibc systems
1719
@@ -17838,7 +17847,7 @@
1720
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1721
lt_status=$lt_dlunknown
1722
cat > conftest.$ac_ext <<_LT_EOF
1723
-#line 17841 "configure"
1724
+#line 17850 "configure"
1725
#include "confdefs.h"
1728
@@ -17944,7 +17953,7 @@
1729
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1730
lt_status=$lt_dlunknown
1731
cat > conftest.$ac_ext <<_LT_EOF
1732
-#line 17947 "configure"
1733
+#line 17956 "configure"
1734
#include "confdefs.h"
1737
@@ -23796,6 +23805,28 @@
1738
$as_echo "$gcc_cv_lto_plugin" >&6; }
1743
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
1744
+ # Check whether --enable-fix-cortex-a53-835769 was given.
1745
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
1746
+ enableval=$enable_fix_cortex_a53_835769;
1747
+ case $enableval in
1749
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
1754
+ as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
1755
+ Valid choices are 'yes' and 'no'." "$LINENO" 5
1763
# All TARGET_ABI_OSF targets.
1764
alpha*-*-linux* | alpha*-*-*bsd*)
1765
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
1766
Index: gcc/fold-const.c
1767
===================================================================
1768
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_3_release)
1769
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
1770
@@ -8929,7 +8929,8 @@
1771
/* If the constant operation overflowed this can be
1772
simplified as a comparison against INT_MAX/INT_MIN. */
1773
if (TREE_CODE (lhs) == INTEGER_CST
1774
- && TREE_OVERFLOW (lhs))
1775
+ && TREE_OVERFLOW (lhs)
1776
+ && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
1778
int const1_sgn = tree_int_cst_sgn (const1);
1779
enum tree_code code2 = code;
1780
@@ -9213,7 +9214,7 @@
1781
/* Transform comparisons of the form X +- C1 CMP Y +- C2 to
1782
X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
1783
the resulting offset is smaller in absolute value than the
1785
+ original one and has the same sign. */
1786
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
1787
&& (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
1788
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
1789
@@ -9232,19 +9233,20 @@
1792
/* Put the constant on the side where it doesn't overflow and is
1793
- of lower absolute value than before. */
1794
+ of lower absolute value and of same sign than before. */
1795
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1796
? MINUS_EXPR : PLUS_EXPR,
1798
if (!TREE_OVERFLOW (cst)
1799
- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
1800
+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
1801
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
1803
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1804
return fold_build2_loc (loc, code, type,
1806
- fold_build2_loc (loc,
1807
- TREE_CODE (arg1), TREE_TYPE (arg1),
1810
+ fold_build2_loc (loc, TREE_CODE (arg1),
1815
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1816
@@ -9251,13 +9253,15 @@
1817
? MINUS_EXPR : PLUS_EXPR,
1819
if (!TREE_OVERFLOW (cst)
1820
- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
1821
+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
1822
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
1824
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1825
return fold_build2_loc (loc, code, type,
1826
- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
1829
+ fold_build2_loc (loc, TREE_CODE (arg0),
1836
@@ -11218,7 +11222,6 @@
1838
double_int c1, c2, c3, msk;
1839
int width = TYPE_PRECISION (type), w;
1840
- bool try_simplify = true;
1842
c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
1843
c2 = tree_to_double_int (arg1);
1844
@@ -11255,20 +11258,7 @@
1848
- /* If X is a tree of the form (Y * K1) & K2, this might conflict
1849
- with that optimization from the BIT_AND_EXPR optimizations.
1850
- This could end up in an infinite recursion. */
1851
- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
1852
- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
1855
- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
1856
- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
1858
- try_simplify = (masked != c1);
1861
- if (try_simplify && c3 != c1)
1863
return fold_build2_loc (loc, BIT_IOR_EXPR, type,
1864
fold_build2_loc (loc, BIT_AND_EXPR, type,
1865
TREE_OPERAND (arg0, 0),
1866
@@ -11658,16 +11648,25 @@
1867
&& TREE_CODE (arg0) == MULT_EXPR
1868
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
1870
+ double_int darg1 = tree_to_double_int (arg1);
1872
- = mask_with_tz (type, tree_to_double_int (arg1),
1873
+ = mask_with_tz (type, darg1,
1874
tree_to_double_int (TREE_OPERAND (arg0, 1)));
1876
if (masked.is_zero ())
1877
return omit_two_operands_loc (loc, type, build_zero_cst (type),
1879
- else if (masked != tree_to_double_int (arg1))
1880
- return fold_build2_loc (loc, code, type, op0,
1881
- double_int_to_tree (type, masked));
1882
+ else if (masked != darg1)
1884
+ /* Avoid the transform if arg1 is a mask of some
1885
+ mode which allows further optimizations. */
1886
+ int pop = darg1.popcount ();
1887
+ if (!(pop >= BITS_PER_UNIT
1888
+ && exact_log2 (pop) != -1
1889
+ && double_int::mask (pop) == darg1))
1890
+ return fold_build2_loc (loc, code, type, op0,
1891
+ double_int_to_tree (type, masked));
1895
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
1896
@@ -13083,6 +13082,8 @@
1897
tree arg01 = TREE_OPERAND (arg0, 1);
1898
tree itype = TREE_TYPE (arg00);
1899
if (TREE_INT_CST_HIGH (arg01) == 0
1900
+ && !(TREE_CODE (itype) == COMPLEX_TYPE
1901
+ || TREE_CODE (itype) == VECTOR_TYPE)
1902
&& TREE_INT_CST_LOW (arg01)
1903
== (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
1905
Index: gcc/omp-low.c
1906
===================================================================
1907
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
1908
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
1909
@@ -1586,7 +1586,6 @@
1910
TREE_STATIC (decl) = 1;
1911
TREE_USED (decl) = 1;
1912
DECL_ARTIFICIAL (decl) = 1;
1913
- DECL_NAMELESS (decl) = 1;
1914
DECL_IGNORED_P (decl) = 0;
1915
TREE_PUBLIC (decl) = 0;
1916
DECL_UNINLINABLE (decl) = 1;
1918
===================================================================
1919
--- a/src/gcc/toplev.c (.../tags/gcc_4_8_3_release)
1920
+++ b/src/gcc/toplev.c (.../branches/gcc-4_8-branch)
1921
@@ -1036,16 +1036,19 @@
1923
if (warn_stack_usage >= 0)
1925
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
1927
if (stack_usage_kind == DYNAMIC)
1928
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
1929
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
1930
else if (stack_usage > warn_stack_usage)
1932
if (stack_usage_kind == DYNAMIC_BOUNDED)
1933
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
1936
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
1939
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
1941
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
1946
Index: gcc/tree-ssa-sccvn.c
1947
===================================================================
1948
--- a/src/gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release)
1949
+++ b/src/gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch)
1950
@@ -3015,33 +3015,12 @@
1951
/* If all value numbered to the same value, the phi node has that
1955
- if (is_gimple_min_invariant (sameval))
1957
- VN_INFO (PHI_RESULT (phi))->has_constants = true;
1958
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
1962
- VN_INFO (PHI_RESULT (phi))->has_constants = false;
1963
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
1965
+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
1967
- if (TREE_CODE (sameval) == SSA_NAME)
1968
- return visit_copy (PHI_RESULT (phi), sameval);
1970
- return set_ssa_val_to (PHI_RESULT (phi), sameval);
1973
/* Otherwise, see if it is equivalent to a phi node in this block. */
1974
result = vn_phi_lookup (phi);
1977
- if (TREE_CODE (result) == SSA_NAME)
1978
- changed = visit_copy (PHI_RESULT (phi), result);
1980
- changed = set_ssa_val_to (PHI_RESULT (phi), result);
1982
+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
1985
vn_phi_insert (phi, PHI_RESULT (phi));
1986
@@ -3142,24 +3121,18 @@
1987
catch those with constants. The goal here is to simultaneously
1988
combine constants between expressions, but avoid infinite
1989
expansion of expressions during simplification. */
1990
- if (TREE_CODE (op0) == SSA_NAME)
1992
- if (VN_INFO (op0)->has_constants
1993
+ op0 = vn_valueize (op0);
1994
+ if (TREE_CODE (op0) == SSA_NAME
1995
+ && (VN_INFO (op0)->has_constants
1996
|| TREE_CODE_CLASS (code) == tcc_comparison
1997
- || code == COMPLEX_EXPR)
1998
- op0 = valueize_expr (vn_get_expr_for (op0));
2000
- op0 = vn_valueize (op0);
2002
+ || code == COMPLEX_EXPR))
2003
+ op0 = valueize_expr (vn_get_expr_for (op0));
2005
- if (TREE_CODE (op1) == SSA_NAME)
2007
- if (VN_INFO (op1)->has_constants
2008
- || code == COMPLEX_EXPR)
2009
- op1 = valueize_expr (vn_get_expr_for (op1));
2011
- op1 = vn_valueize (op1);
2013
+ op1 = vn_valueize (op1);
2014
+ if (TREE_CODE (op1) == SSA_NAME
2015
+ && (VN_INFO (op1)->has_constants
2016
+ || code == COMPLEX_EXPR))
2017
+ op1 = valueize_expr (vn_get_expr_for (op1));
2019
/* Pointer plus constant can be represented as invariant address.
2020
Do so to allow further propatation, see also tree forwprop. */
2021
@@ -3217,27 +3190,31 @@
2025
- if (VN_INFO (op0)->has_constants)
2026
- op0 = valueize_expr (vn_get_expr_for (op0));
2027
- else if (CONVERT_EXPR_CODE_P (code)
2028
- || code == REALPART_EXPR
2029
- || code == IMAGPART_EXPR
2030
- || code == VIEW_CONVERT_EXPR
2031
- || code == BIT_FIELD_REF)
2032
+ op0 = vn_valueize (op0);
2033
+ if (TREE_CODE (op0) == SSA_NAME)
2035
- /* We want to do tree-combining on conversion-like expressions.
2036
- Make sure we feed only SSA_NAMEs or constants to fold though. */
2037
- tree tem = valueize_expr (vn_get_expr_for (op0));
2038
- if (UNARY_CLASS_P (tem)
2039
- || BINARY_CLASS_P (tem)
2040
- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2041
- || TREE_CODE (tem) == SSA_NAME
2042
- || TREE_CODE (tem) == CONSTRUCTOR
2043
- || is_gimple_min_invariant (tem))
2045
+ if (VN_INFO (op0)->has_constants)
2046
+ op0 = valueize_expr (vn_get_expr_for (op0));
2047
+ else if (CONVERT_EXPR_CODE_P (code)
2048
+ || code == REALPART_EXPR
2049
+ || code == IMAGPART_EXPR
2050
+ || code == VIEW_CONVERT_EXPR
2051
+ || code == BIT_FIELD_REF)
2053
+ /* We want to do tree-combining on conversion-like expressions.
2054
+ Make sure we feed only SSA_NAMEs or constants to fold though. */
2055
+ tree tem = valueize_expr (vn_get_expr_for (op0));
2056
+ if (UNARY_CLASS_P (tem)
2057
+ || BINARY_CLASS_P (tem)
2058
+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2059
+ || TREE_CODE (tem) == SSA_NAME
2060
+ || TREE_CODE (tem) == CONSTRUCTOR
2061
+ || is_gimple_min_invariant (tem))
2066
- /* Avoid folding if nothing changed, but remember the expression. */
2067
+ /* Avoid folding if nothing changed. */
2068
if (op0 == orig_op0)
2071
Index: gcc/cgraphunit.c
2072
===================================================================
2073
--- a/src/gcc/cgraphunit.c (.../tags/gcc_4_8_3_release)
2074
+++ b/src/gcc/cgraphunit.c (.../branches/gcc-4_8-branch)
2075
@@ -1097,7 +1097,7 @@
2076
/* We use local aliases for C++ thunks to force the tailcall
2077
to bind locally. This is a hack - to keep it working do
2078
the following (which is not strictly correct). */
2079
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
2080
+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
2081
|| ! DECL_VIRTUAL_P (target_node->symbol.decl))
2082
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
2084
Index: gcc/ChangeLog
2085
===================================================================
2086
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
2087
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
2089
+2014-11-26 Richard Biener <rguenther@suse.de>
2091
+ Backport from mainline
2092
+ 2014-10-08 Richard Biener <rguenther@suse.de>
2094
+ PR tree-optimization/61969
2095
+ * tree-nrv.c (pass_nrv::execute): Properly test for automatic
2098
+ 2014-08-15 Richard Biener <rguenther@suse.de>
2100
+ PR tree-optimization/62031
2101
+ * tree-data-ref.c (dr_analyze_indices): Do not set
2102
+ DR_UNCONSTRAINED_BASE.
2103
+ (dr_may_alias_p): All indirect accesses have to go the
2104
+ formerly DR_UNCONSTRAINED_BASE path.
2105
+ * tree-data-ref.h (struct indices): Remove
2106
+ unconstrained_base member.
2107
+ (DR_UNCONSTRAINED_BASE): Remove.
2109
+ 2014-10-10 Richard Biener <rguenther@suse.de>
2111
+ PR tree-optimization/63379
2112
+ * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
2113
+ a neutral operand for min/max when it is not a reduction chain.
2115
+ 2014-11-07 Richard Biener <rguenther@suse.de>
2117
+ PR tree-optimization/63605
2118
+ * fold-const.c (fold_binary_loc): Properly use element_precision
2119
+ for types that may not be scalar.
2121
+ 2014-10-28 Richard Biener <rguenther@suse.de>
2123
+ PR middle-end/63665
2124
+ * fold-const.c (fold_comparison): Properly guard simplifying
2125
+ against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
2127
+2014-11-22 Oleg Endo <olegendo@gcc.gnu.org>
2129
+ Backport from mainline
2130
+ 2014-11-20 Segher Boessenkool <segher@kernel.crashing.org>
2133
+ * config/sh/sh.c: Use signed char for signed field.
2135
+2014-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2138
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
2139
+ the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
2142
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
2145
+ * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
2146
+ Output "b" and "nb" suffix for FP mode.
2148
+2014-11-19 Tom de Vries <tom@codesourcery.com>
2150
+ Backport from mainline
2151
+ PR tree-optimization/62167
2152
+ * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
2154
+ (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
2157
+2014-11-18 Teresa Johnson <tejohnson@google.com>
2159
+ Backport from mainline and gcc-4_9 branch.
2160
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
2162
+ PR tree-optimization/63841
2163
+ * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
2165
+2014-11-16 Eric Botcazou <ebotcazou@adacore.com>
2167
+ * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
2168
+ * doc/tm.texi: Regenerate.
2170
+ Backport from mainline
2171
+ 2013-09-16 Andreas Schwab <schwab@linux-m68k.org>
2173
+ * doc/tm.texi.in (Cond Exec Macros): Remove node.
2174
+ (Condition Code): Don't reference it.
2175
+ * doc/tm.texi: Regenerate.
2177
+2014-11-13 Christophe Lyon <christophe.lyon@linaro.org>
2179
+ Backport from mainline
2180
+ 2014-11-02 Michael Collison <michael.collison@linaro.org>
2182
+ * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
2183
+ to support vector modes.
2184
+ (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
2186
+2014-11-13 Eric Botcazou <ebotcazou@adacore.com>
2188
+ * doc/tm.texi.in (SELECT_CC_MODE): Update example.
2189
+ (REVERSIBLE_CC_MODE): Fix example.
2190
+ (REVERSE_CONDITION): Fix typo.
2191
+ * doc/tm.texi: Regenerate.
2193
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
2196
+ * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
2197
+ chain instead of node->indirect_calls.
2199
+2014-11-10 Daniel Hellstrom <daniel@gaisler.com>
2201
+ Backport from mainline
2202
+ * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
2203
+ * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
2205
+2014-11-07 Daniel Hellstrom <daniel@gaisler.com>
2207
+ * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
2208
+ * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
2209
+ * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
2211
+ * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
2212
+ * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
2213
+ * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
2214
+ * config/sparc/sparc.md (cpu): Add leon3v7.
2215
+ * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
2217
+2014-11-06 John David Anglin <danglin@gcc.gnu.org>
2219
+ * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
2220
+ Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
2223
+2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2225
+ * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
2226
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
2227
+ * config/aarch64/aarch64-linux.h
2228
+ (CA53_ERR_835769_SPEC): Define.
2229
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
2231
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2233
+ * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
2234
+ recog state after aarch64_prev_real_insn call.
2236
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2238
+ * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
2240
+ * configure.ac: Add --enable-fix-cortex-a53-835769 option.
2241
+ * configure: Regenerate.
2242
+ * config/aarch64/aarch64.c (aarch64_override_options): Handle
2243
+ TARGET_FIX_ERR_A53_835769_DEFAULT.
2244
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
2246
+ * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
2248
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2250
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
2251
+ * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
2252
+ (FINAL_PRESCAN_INSN): Likewise.
2253
+ * config/aarch64/aarch64.h (is_mem_p): New function.
2254
+ (has_memory_op): Likewise.
2255
+ (aarch64_prev_real_insn): Likewise.
2256
+ (is_madd_op): Likewise.
2257
+ (dep_between_memop_and_curr): Likewise.
2258
+ (aarch64_madd_needs_nop): Likewise.
2259
+ (aarch64_final_prescan_insn): Likewise.
2260
+ * doc/invoke.texi (Document new option).
2262
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
2264
+ * stor-layout.c (self_referential_size): Do not promote arguments.
2266
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2268
+ Backport from mainline r215880
2269
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2271
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2272
+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
2273
+ little endian target.
2275
+ Backport from mainline r215882
2276
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2278
+ * altivec.md (altivec_lvsl): New define_expand.
2279
+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
2280
+ (altivec_lvsr): New define_expand.
2281
+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
2282
+ * rs6000.c (rs6000_expand_builtin): Change to use
2283
+ altivec_lvs[lr]_direct; remove commented-out code.
2285
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2287
+ Backport from mainline
2288
+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2290
+ PR rtl-optimization/57003
2291
+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
2292
+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
2293
+ killing regs_invalidated_by_call.
2295
+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2297
+ Backport from mainline
2298
+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2301
+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
2302
+ atomic_fetch_<fetchop_name>si_hard,
2303
+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
2304
+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
2305
+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
2306
+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
2308
+2014-10-02 Martin Jambor <mjambor@suse.cz>
2310
+ PR tree-optimization/63375
2311
+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
2314
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
2317
+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
2321
+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
2322
+ argument to avx2_permv2ti.
2324
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
2326
+ Backport from mainline
2327
+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
2329
+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
2330
+ (fmod<mode>3): Ditto.
2331
+ (fpremxf4_i387): Ditto.
2332
+ (reminderxf3): Ditto.
2333
+ (reminder<mode>3): Ditto.
2334
+ (fprem1xf4_i387): Ditto.
2336
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
2338
+ PR inline-asm/63282
2339
+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
2340
+ or invert_jump_1 if jump isn't any_condjump_p.
2342
+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
2344
+ Backport from mainline r212303
2346
+ * config/arm/arm-protos.h (arm_legitimate_address_p,
2347
+ arm_is_constant_pool_ref): Add prototypes.
2348
+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
2349
+ (arm_is_constant_pool_ref) New function.
2350
+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
2351
+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
2352
+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
2353
+ operand and remove pool_range and neg_pool_range attributes.
2354
+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
2355
+ pool_range and neg_pool_range attributes.
2356
+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
2357
+ constant pool references.
2359
+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
2361
+ * config/pa/pa.c (pa_output_function_epilogue): Only update
2362
+ last_address when a nonnote insn is found.
2364
+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2366
+ Backport from mainline
2367
+ 2014-09-25 Nick Clifton <nickc@redhat.com>
2368
+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2371
+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
2372
+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
2374
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2376
+ Backport from mainline r215559
2377
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2380
+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
2381
+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
2383
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
2385
+ PR tree-optimization/63341
2386
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
2387
+ vect_create_addr_base_for_vector_ref): Add another tree argument
2388
+ defaulting to NULL_TREE.
2389
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
2390
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
2391
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
2392
+ add that to base_offset too if non-NULL.
2393
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
2394
+ for dr_explicit_realign_optimized set it to vector byte size
2395
+ - 1 instead of setting offset, pass byte_offset down to
2396
+ vect_create_data_ref_ptr.
2398
+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2400
+ Back port from trunk:
2401
+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2403
+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
2404
+ refine the constraints used on 32/64-bit floating point moves.
2405
+ (f32_av): Likewise.
2406
+ (f64_vsx): Likewise.
2407
+ (f64_dm): Likewise.
2408
+ (f64_av): Likewise.
2409
+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
2410
+ (BOOL_REGS_OP1): Likewise.
2411
+ (BOOL_REGS_OP2): Likewise.
2412
+ (BOOL_REGS_UNARY): Likewise.
2413
+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
2414
+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
2415
+ for moves involving VSX registers. Do not use constraints that
2416
+ target VSX registers for decimal types.
2417
+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
2418
+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
2420
+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2422
+ Back port from trunk:
2423
+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2425
+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
2426
+ for base_reg_operand to be common between LO_SUM and PLUS.
2427
+ (fusion_gpr_mem_combo): New predicate to match a fused address
2428
+ that combines the addis and memory offset address.
2430
+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
2431
+ calling signature.
2432
+ (emit_fusion_gpr_load): Likewise.
2434
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
2435
+ signature to pass each argument separately, rather than
2436
+ using an operands array. Rewrite the insns found by peephole2 to
2437
+ be a single insn, rather than hoping the insns will still be
2438
+ together when the peephole pass is done. Drop being called via a
2440
+ (emit_fusion_gpr_load): Change calling signature to be called from
2441
+ the fusion_gpr_load_<mode> insns with a combined memory address
2442
+ instead of the peephole pass passing the addis and offset
2445
+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
2447
+ (power8 fusion peephole): Drop support for doing power8 via a
2448
+ normal peephole that was created by the peephole2 pass.
2449
+ (power8 fusion peephole2): Create a new insn with the fused
2450
+ address, so that the fused operation is kept together after
2451
+ register allocation is done.
2452
+ (fusion_gpr_load_<mode>): Likewise.
2454
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
2457
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
2458
+ if there are only debug stmts after the noreturn call, instead
2459
+ remove the debug stmts.
2461
+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2463
+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
2464
+ V2DF, V4SF, DF, and DI modes.
2465
+ (vsx_fmav2df2): Likewise.
2466
+ (vsx_float_fix_<mode>2): Likewise.
2467
+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
2469
+2014-09-10 Alan Modra <amodra@gmail.com>
2472
+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
2475
+2014-09-09 Richard Biener <rguenther@suse.de>
2477
+ Backport from mainline
2478
+ 2014-06-11 Richard Biener <rguenther@suse.de>
2480
+ PR tree-optimization/61452
2481
+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
2482
+ expr and has_constants in case we found a leader.
2483
+ (simplify_binary_expression): Always valueize operands first.
2484
+ (simplify_unary_expression): Likewise.
2486
+2014-09-09 Richard Biener <rguenther@suse.de>
2488
+ Backport from mainline
2489
+ 2014-05-05 Richard Biener <rguenther@suse.de>
2491
+ PR middle-end/61010
2492
+ * fold-const.c (fold_binary_loc): Consistently avoid
2493
+ canonicalizing X & CST away from a CST that is the mask
2496
+ 2014-05-28 Richard Biener <rguenther@suse.de>
2498
+ PR middle-end/61045
2499
+ * fold-const.c (fold_comparison): When folding
2500
+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
2501
+ the sign of the remaining constant operand stays the same.
2503
+ 2014-08-11 Richard Biener <rguenther@suse.de>
2505
+ PR tree-optimization/62075
2506
+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
2507
+ handle uses in patterns.
2509
+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2511
+ Backport from mainline.
2512
+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2514
+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
2515
+ (-mtune): Likewise.
2516
+ (-mcpu): Likewise.
2518
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2520
+ PR tree-optimization/60196
2521
+ PR tree-optimization/63189
2522
+ Backported from mainline
2523
+ 2013-09-17 Cong Hou <congh@google.com>
2525
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
2526
+ when checking the dot production pattern. The type of rhs operand
2527
+ of multiply is now checked correctly.
2529
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2531
+ Backported from mainline
2532
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
2535
+ * haifa-sched.c (advance_one_cycle): Fix dump.
2536
+ (schedule_block): Don't advance cycle if we are already at the
2537
+ beginning of the cycle.
2539
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2542
+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
2543
+ pass-trough jump functions correctly.
2545
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2548
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
2549
+ created replacements in ascending order of offsets.
2550
+ (known_aggs_to_agg_replacement_list): Likewise.
2552
+2014-09-01 Marek Polacek <polacek@redhat.com>
2554
+ Backport from mainline
2555
+ 2014-08-21 Marek Polacek <polacek@redhat.com>
2558
+ * expr.c (is_aligning_offset): Remove logical not.
2560
+2014-09-01 Marek Polacek <polacek@redhat.com>
2562
+ Backport from mainline
2563
+ 2014-08-19 Marek Polacek <polacek@redhat.com>
2566
+ * cgraphunit.c (handle_alias_pairs): Fix condition.
2568
+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
2570
+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
2571
+ prefix to function labels when generating fast indirect calls.
2573
+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
2575
+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
2577
+2014-08-26 Marek Polacek <polacek@redhat.com>
2579
+ Backport from mainline
2580
+ 2014-08-26 Marek Polacek <polacek@redhat.com>
2583
+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
2584
+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
2586
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2588
+ Backport from mainline
2589
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2592
+ * config/sh/sh.opt (musermode): Allow negative form.
2593
+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
2594
+ targets that don't support it.
2595
+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
2596
+ Document -mno-usermode option.
2598
+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
2601
+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
2602
+ last_address when the current function is a thunk.
2603
+ (pa_asm_output_mi_thunk): When we don't have named sections or they
2604
+ are not being used, check that thunk can reach the stub table with a
2607
+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2609
+ Backport fro mainline
2610
+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2613
+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
2614
+ documentation to state it is only for VSX operations.
2616
+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
2617
+ constraint only active if VSX.
2619
+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
2620
+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
2621
+ (lfiwzx): Likewise.
2623
+2014-08-15 Tom de Vries <tom@codesourcery.com>
2625
+ Backport from mainline:
2626
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
2628
+ PR rtl-optimization/62004
2629
+ PR rtl-optimization/62030
2630
+ * ifcvt.c (rtx_interchangeable_p): New function.
2631
+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
2633
+ 2014-08-05 Richard Biener <rguenther@suse.de>
2635
+ * emit-rtl.h (mem_attrs_eq_p): Declare.
2636
+ * emit-rtl.c (mem_attrs_eq_p): Export.
2638
+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
2640
+ Backport from trunk:
2641
+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
2644
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
2645
+ size accounting for thunks.
2646
+ (pa_asm_output_mi_thunk): Use final_start_function() and
2647
+ final_end_function() to output function start and end directives.
2649
+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2651
+ Backport from mainline:
2652
+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2654
+ * doc/invoke.texi (SH options): Document missing processor variant
2655
+ options. Remove references to Hitachi. Undocument deprecated mspace
2658
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
2660
+ PR tree-optimization/62073
2661
+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
2664
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2666
+ Backport from mainline
2667
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
2669
+ PR middle-end/62103
2670
+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
2671
+ bitfields, that is when size doesn't match the size of type or the
2672
+ size of the constructor.
2674
+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
2676
+ Backport patch from mainline
2677
+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2679
+ * config/rs6000/constraints.md (wh constraint): New constraint,
2680
+ for FP registers if direct move is available.
2681
+ (wi constraint): New constraint, for VSX/FP registers that can
2682
+ handle 64-bit integers.
2683
+ (wj constraint): New constraint for VSX/FP registers that can
2684
+ handle 64-bit integers for direct moves.
2685
+ (wk constraint): New constraint for VSX/FP registers that can
2686
+ handle 64-bit doubles for direct moves.
2687
+ (wy constraint): Make documentation match implementation.
2689
+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
2690
+ scalar_in_vmx_p field to simplify tests of whether SFmode or
2691
+ DFmode can go in the Altivec registers.
2692
+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
2693
+ (rs6000_setup_reg_addr_masks): Likewise.
2694
+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
2695
+ field, and wh/wi/wj/wk constraints.
2696
+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
2697
+ the wh/wi/wj/wk constraints.
2698
+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
2699
+ upper registers, prefer VSX registers unless the operation is a
2700
+ memory operation with REG+OFFSET addressing.
2702
+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
2703
+ DImode. Change SFmode to use ww constraint instead of d to allow
2704
+ SF registers in the upper registers.
2707
+ (VSr5): Fix thinko in comment.
2708
+ (VSa): New mode attribute that is an alternative to wa, that
2709
+ returns the VSX register class that a mode can go in, but may not
2710
+ be the preferred register class.
2711
+ (VS_64dm): New mode attribute for appropriate register classes for
2712
+ referencing 64-bit elements of vectors for direct moves and normal
2714
+ (VS_64reg): Likewise.
2715
+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
2716
+ register allocator to only registers the data type can handle.
2717
+ (vsx_le_perm_load_<mode>): Likewise.
2718
+ (vsx_le_perm_store_<mode>): Likewise.
2719
+ (vsx_xxpermdi2_le_<mode>): Likewise.
2720
+ (vsx_xxpermdi4_le_<mode>): Likewise.
2721
+ (vsx_lxvd2x2_le_<mode>): Likewise.
2722
+ (vsx_lxvd2x4_le_<mode>): Likewise.
2723
+ (vsx_stxvd2x2_le_<mode>): Likewise.
2724
+ (vsx_add<mode>3): Likewise.
2725
+ (vsx_sub<mode>3): Likewise.
2726
+ (vsx_mul<mode>3): Likewise.
2727
+ (vsx_div<mode>3): Likewise.
2728
+ (vsx_tdiv<mode>3_internal): Likewise.
2729
+ (vsx_fre<mode>2): Likewise.
2730
+ (vsx_neg<mode>2): Likewise.
2731
+ (vsx_abs<mode>2): Likewise.
2732
+ (vsx_nabs<mode>2): Likewise.
2733
+ (vsx_smax<mode>3): Likewise.
2734
+ (vsx_smin<mode>3): Likewise.
2735
+ (vsx_sqrt<mode>2): Likewise.
2736
+ (vsx_rsqrte<mode>2): Likewise.
2737
+ (vsx_tsqrt<mode>2_internal): Likewise.
2738
+ (vsx_fms<mode>4): Likewise.
2739
+ (vsx_nfma<mode>4): Likewise.
2740
+ (vsx_eq<mode>): Likewise.
2741
+ (vsx_gt<mode>): Likewise.
2742
+ (vsx_ge<mode>): Likewise.
2743
+ (vsx_eq<mode>_p): Likewise.
2744
+ (vsx_gt<mode>_p): Likewise.
2745
+ (vsx_ge<mode>_p): Likewise.
2746
+ (vsx_xxsel<mode>): Likewise.
2747
+ (vsx_xxsel<mode>_uns): Likewise.
2748
+ (vsx_copysign<mode>3): Likewise.
2749
+ (vsx_float<VSi><mode>2): Likewise.
2750
+ (vsx_floatuns<VSi><mode>2): Likewise.
2751
+ (vsx_fix_trunc<mode><VSi>2): Likewise.
2752
+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
2753
+ (vsx_x<VSv>r<VSs>i): Likewise.
2754
+ (vsx_x<VSv>r<VSs>ic): Likewise.
2755
+ (vsx_btrunc<mode>2): Likewise.
2756
+ (vsx_b2trunc<mode>2): Likewise.
2757
+ (vsx_floor<mode>2): Likewise.
2758
+ (vsx_ceil<mode>2): Likewise.
2759
+ (vsx_<VS_spdp_insn>): Likewise.
2760
+ (vsx_xscvspdp): Likewise.
2761
+ (vsx_xvcvspuxds): Likewise.
2762
+ (vsx_float_fix_<mode>2): Likewise.
2763
+ (vsx_set_<mode>): Likewise.
2764
+ (vsx_extract_<mode>_internal1): Likewise.
2765
+ (vsx_extract_<mode>_internal2): Likewise.
2766
+ (vsx_extract_<mode>_load): Likewise.
2767
+ (vsx_extract_<mode>_store): Likewise.
2768
+ (vsx_splat_<mode>): Likewise.
2769
+ (vsx_xxspltw_<mode>): Likewise.
2770
+ (vsx_xxspltw_<mode>_direct): Likewise.
2771
+ (vsx_xxmrghw_<mode>): Likewise.
2772
+ (vsx_xxmrglw_<mode>): Likewise.
2773
+ (vsx_xxsldwi_<mode>): Likewise.
2774
+ (vsx_xscvdpspn): Tighten constraints to only use register classes
2776
+ (vsx_xscvspdpn): Likewise.
2777
+ (vsx_xscvdpspn_scalar): Likewise.
2779
+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
2780
+ wj, and wk constraints.
2781
+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
2782
+ general purpose registers.
2784
+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
2786
+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
2787
+ DImode instead of wm. Use wk constraint for direct move of DFmode
2789
+ (extendsidi2_lfiwax): Likewise.
2790
+ (lfiwax): Likewise.
2791
+ (lfiwzx): Likewise.
2792
+ (movdi_internal64): Likewise.
2794
+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
2795
+ wk constraints. Make the wy constraint documentation match them
2798
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
2800
+ Backport from mainline
2801
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2803
+ PR tree-optimization/61375
2804
+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
2805
+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
2806
+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
2808
+2014-08-01 Richard Biener <rguenther@suse.de>
2810
+ PR tree-optimization/61964
2811
+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
2812
+ function merged from trunk.
2813
+ (gimple_equal_p): Handle non-SSA LHS solely by structural
2816
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
2818
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
2820
+2014-07-24 Kyle McMartin <kyle@redhat.com>
2822
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
2824
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2826
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
2828
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
2829
+ function. Issue -Wpsabi warning if future GCC releases will use
2830
+ different field alignment rules for this type.
2831
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
2832
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
2833
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
2835
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2837
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
2838
+ -Wpsabi note when encountering a type where future GCC releases
2839
+ will apply different alignment requirements.
2841
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2843
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
2844
+ does not fit fully into floating-point registers, and there is still
2845
+ space in the register parameter area, issue -Wpsabi note that the ABI
2846
+ will change in a future GCC release.
2848
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
2850
+ * config/arm/t-rtems-eabi: Add
2851
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
2852
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
2853
+ mbig-endian/mthumb/march=armv7-r, and
2854
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
2857
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
2859
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
2860
+ (LIBTSAN_EARLY_SPEC): Likewise.
2861
+ (STATIC_LIBASAN_LIBS): Likewise.
2862
+ (STATIC_LIBTSAN_LIBS): Likewise.
2864
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
2866
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
2868
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
2870
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
2871
+ (*membar_storeload): Disable for LEON3.
2873
+2014-07-17 Richard Biener <rguenther@suse.de>
2875
+ PR rtl-optimization/61801
2876
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
2877
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
2880
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
2882
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
2883
+ on the FUNCTION_DECL.
2885
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
2887
+ * doc/install.texi: Remove links to defunct package providers for
2890
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
2892
+ PR middle-end/53590
2893
+ * function.c (allocate_struct_function): Revert r188667 change.
2895
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
2897
+ PR tree-optimization/61684
2898
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
2899
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
2901
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
2903
+ Backport from Mainline
2904
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
2905
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
2907
+ PR tree-optimization/61306
2908
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
2909
+ expression instead of its size.
2910
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
2911
+ false to prevent optimization when the result is unpredictable due to
2912
+ arithmetic right shift of signed type with highest byte is set.
2913
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
2914
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
2915
+ result is unpredictable due to sign extension.
2916
+ (find_bswap): Adapt to change in struct symbolic_number.
2918
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
2920
+ Backport from mainline
2921
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
2924
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
2926
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2929
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
2930
+ extraction other than index 3.
2932
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
2935
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
2936
+ model family 6 CPU with has_longmode never use a CPU without
2939
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2941
+ Backport from mainline
2943
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
2944
+ Chung-Lin Tang <cltang@codesourcery.com>
2946
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
2947
+ TARGET_THUMB1_ONLY. Add comments.
2949
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
2951
+ Backport from mainline
2952
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
2955
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
2956
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
2957
+ and corresponding splitters. Zero extend general register
2958
+ or memory input operand to XMM temporary. Enable for
2959
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
2960
+ (floatunssi<mode>2): Update expander predicate.
2962
+2014-06-18 Richard Henderson <rth@redhat.com>
2965
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
2967
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
2969
+ Revert on gcc-4_8-branch.
2970
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
2971
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
2973
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
2975
+ Backport from mainline
2978
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
2979
+ variable 'size'; calculate 'size' right in the front; use
2980
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
2981
+ pcum->aapcs_stack_words.
2983
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
2985
+ Backport from mainline
2987
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
2989
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
2990
+ (BU_MISC_2): Rename to ...
2991
+ (BU_LDBL128_2): ... this.
2992
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
2993
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
2994
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
2995
+ RS6000_BTM_LDBL128.
2996
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
2997
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
2998
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
2999
+ (unpacktf_1): Likewise.
3000
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
3001
+ (__builtin_longdouble_dw1): Likewise.
3002
+ * doc/sourcebuild.texi (longdouble128): Document.
3004
+2014-06-13 Jason Merrill <jason@redhat.com>
3007
+ * common.opt (-fno-gnu-unique): Add.
3008
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
3010
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
3012
+ Backport from 2014-05-09 trunk r210272
3014
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
3015
+ unsigned int initializers for regno_in, regno_out.
3017
+ Backport from 2014-05-14 trunk r210418
3018
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
3019
+ shifted values to avoid build warning.
3021
+ Backport from 2014-06-12 trunk r211491
3024
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
3025
+ loading from address spaces.
3027
+2014-06-12 Alan Modra <amodra@gmail.com>
3030
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
3031
+ * doc/tm.texi: Regenerate.
3032
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
3033
+ Use throughout in place of REG_PARM_STACK_SPACE.
3034
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
3035
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
3036
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
3037
+ prototype_p when incoming. Use function decl when incoming
3038
+ to handle K&R style functions.
3039
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
3040
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
3042
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3044
+ Back port from trunk
3045
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3048
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
3049
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
3050
+ handles swapping the two 64-bit double words on little endian
3051
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
3052
+ these types are properly swapped. Change all of the insns and
3053
+ splits that do the 64-bit swaps to use VSX_LE.
3054
+ (vsx_le_perm_load_<mode>): Likewise.
3055
+ (vsx_le_perm_store_<mode>): Likewise.
3056
+ (splitters for little endian memory operations): Likewise.
3057
+ (vsx_xxpermdi2_le_<mode>): Likewise.
3058
+ (vsx_lxvd2x2_le_<mode>): Likewise.
3059
+ (vsx_stxvd2x2_le_<mode>): Likewise.
3061
+2014-06-05 Martin Jambor <mjambor@suse.cz>
3064
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
3067
+2014-06-04 Richard Biener <rguenther@suse.de>
3069
+ PR tree-optimization/61383
3070
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
3073
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3075
+ Backport from mainline
3076
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3078
+ PR rtl-optimization/60866
3079
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
3080
+ Default it to -1. Pass it down to init_simplejump_data.
3081
+ (init_simplejump_data): New parameter old_seqno. Pass it down
3082
+ to get_seqno_for_a_jump.
3083
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
3084
+ initializing new jump seqno as a last resort. Add comment.
3085
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
3086
+ jump and pass it down to sel_init_new_insn.
3087
+ (sel_redirect_edge_and_branch_force): Likewise.
3089
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3091
+ Backport from mainline
3092
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3094
+ PR rtl-optimization/60901
3095
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
3096
+ bb predecessor belongs to the same scheduling region. Adjust comment.
3098
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
3100
+ Backport from mainline
3101
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
3104
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
3105
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
3107
+2014-05-28 Guozhi Wei <carrot@google.com>
3110
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
3112
+ (vqdmulhq_n_s16): Likewise.
3114
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
3116
+ Backport from mainline
3117
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
3119
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
3120
+ predicate to detect a negative quotient.
3122
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
3125
+ * doc/extend.texi (Local Labels): Note that label differences are
3126
+ not supported for AVR.
3128
+2014-05-26 Michael Tautschnig <mt@debian.org>
3131
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
3132
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
3134
+2014-05-23 Alan Modra <amodra@gmail.com>
3137
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
3138
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
3139
+ Use "Y" constraint rather than "m".
3141
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3143
+ Backport from mainline
3144
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3146
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
3148
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
3151
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
3153
2014-05-22 Release Manager
3155
* GCC 4.8.3 released.
3156
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
3157
===================================================================
3158
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
3159
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch)
3161
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
3163
+/* { dg-do compile { target { powerpc64le-*-* } } } */
3164
+/* { dg-options "-O0 -Wdeprecated" } */
3166
+#include <altivec.h>
3172
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
3173
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
3175
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
3176
===================================================================
3177
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release)
3178
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch)
3180
+/* { dg-do run { target { powerpc64*-*-* } } } */
3181
+/* { dg-require-effective-target powerpc_vsx_ok } */
3182
+/* { dg-options "-mvsx" } */
3184
+#include <altivec.h>
3188
+vector double vec = (vector double) {99.0, 99.0};
3192
+ int actual = vec_all_nge(vec, vec);
3196
+ actual = vec_all_nle(vec, vec);
3200
+ actual = vec_any_nge(vec, vec);
3204
+ actual = vec_any_nle(vec, vec);
3210
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
3211
===================================================================
3212
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release)
3213
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch)
3215
/* { dg-do compile { target { powerpc*-*-* } } } */
3216
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3217
/* { dg-require-effective-target powerpc_vsx_ok } */
3218
-/* { dg-options "-O3 -mcpu=power7" } */
3219
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
3221
/* Test the various load/store varients. */
3223
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
3224
===================================================================
3225
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
3226
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
3228
/* { dg-do assemble } */
3229
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
3230
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
3231
+/* { dg-require-effective-target longdouble128 } */
3232
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
3234
typedef float TFmode __attribute__ ((mode (TF)));
3235
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
3236
===================================================================
3237
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
3238
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
3240
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3241
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
3242
/* { dg-require-effective-target powerpc_fprs } */
3243
+/* { dg-require-effective-target longdouble128 } */
3244
/* { dg-options "-O2 -mhard-float" } */
3247
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
3248
===================================================================
3249
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release)
3250
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch)
3252
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3253
+/* { dg-options "-mabi=elfv2" } */
3260
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
3264
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
3265
===================================================================
3266
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
3267
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
3269
+/* { dg-do compile { target { powerpc*-*-* } } } */
3270
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3271
+/* { dg-require-effective-target powerpc_htm_ok } */
3272
+/* { dg-options "-O2 -mhtm" } */
3274
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
3275
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
3277
+#include <htmintrin.h>
3281
+ return _HTM_STATE(__builtin_ttest());
3283
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
3284
===================================================================
3285
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
3286
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch)
3288
+/* Test expected code generation for lvsl and lvsr on little endian.
3289
+ Note that lvsl and lvsr are each produced once, but the filename
3290
+ causes them to appear twice in the file. */
3292
+/* { dg-do compile { target { powerpc64le-*-* } } } */
3293
+/* { dg-options "-O0 -Wno-deprecated" } */
3294
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
3295
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
3296
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
3297
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
3300
+#include <altivec.h>
3306
+ vector unsigned char a = vec_lvsl (4, f);
3307
+ vector unsigned char b = vec_lvsr (8, f);
3309
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
3310
===================================================================
3311
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release)
3312
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch)
3314
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3315
+/* { dg-options "-mno-compat-align-parm" } */
3319
+ long a __attribute__((aligned (16)));
3322
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
3326
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
3327
===================================================================
3328
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release)
3329
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch)
3331
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3332
+/* { dg-require-effective-target powerpc_altivec_ok } */
3333
+/* { dg-options "-maltivec" } */
3337
+ int a __attribute__((vector_size (8)));
3338
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
3340
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
3341
===================================================================
3342
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release)
3343
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch)
3345
/* { dg-do compile { target powerpc*-*-* } } */
3346
/* { dg-require-effective-target powerpc_altivec_ok } */
3347
-/* { dg-options "-maltivec -O0 -Wall" } */
3348
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
3350
#include <altivec.h>
3352
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
3353
===================================================================
3354
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release)
3355
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch)
3357
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
3358
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
3359
/* { dg-require-effective-target powerpc_altivec_ok } */
3360
-/* { dg-options "-maltivec -O2" } */
3361
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
3363
#include <altivec.h>
3365
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
3366
===================================================================
3367
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
3368
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
3370
/* { dg-do compile { target powerpc_altivec_ok } } */
3371
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
3372
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
3374
#include <altivec.h>
3376
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
3377
===================================================================
3378
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
3379
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
3381
+/* { dg-do compile } */
3382
+/* { dg-options "-O2 -mieee" } */
3384
+void foo (int *dimensions, double **params, int hh)
3388
+ else if (dimensions[hh] > 0)
3389
+ params[hh][0] = 1.0f;
3391
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
3392
===================================================================
3393
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
3394
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
3396
+/* Test AAPCS64 layout and __builtin_va_start.
3398
+ Pass named HFA/HVA argument on stack. */
3400
+/* { dg-do run { target aarch64*-*-* } } */
3402
+#ifndef IN_FRAMEWORK
3403
+#define AAPCS64_TEST_STDARG
3404
+#define TESTFILE "va_arg-14.c"
3405
+#include "type-def.h"
3407
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
3408
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
3409
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
3410
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
3412
+#include "abitest.h"
3414
+ ARG (float, 1.0f, S0, 0)
3415
+ ARG (float, 2.0f, S1, 1)
3416
+ ARG (float, 3.0f, S2, 2)
3417
+ ARG (float, 4.0f, S3, 3)
3418
+ ARG (float, 5.0f, S4, 4)
3419
+ ARG (float, 6.0f, S5, 5)
3420
+ ARG (float, 7.0f, S6, 6)
3421
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
3422
+ /* Previous argument size has been rounded up to the nearest multiple of
3424
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
3425
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
3426
+ ARG (vf4_t, float32x4, STACK + 32, 9)
3427
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
3429
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
3431
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
3432
===================================================================
3433
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
3434
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
3449
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
3450
===================================================================
3451
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
3452
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
3454
+/* Test AAPCS64 layout and __builtin_va_start.
3456
+ Pass named HFA/HVA argument on stack. */
3458
+/* { dg-do run { target aarch64*-*-* } } */
3460
+#ifndef IN_FRAMEWORK
3461
+#define AAPCS64_TEST_STDARG
3462
+#define TESTFILE "va_arg-13.c"
3464
+struct float_float_t
3476
+#define HAS_DATA_INIT_FUNC
3480
+ float_float.a = 1.2f;
3481
+ float_float.b = 2.2f;
3483
+ float_int.b8 = 4983.80f;
3486
+#include "abitest.h"
3488
+ ARG (float, 1.0f, S0, 0)
3489
+ ARG (float, 2.0f, S1, 1)
3490
+ ARG (float, 3.0f, S2, 2)
3491
+ ARG (float, 4.0f, S3, 3)
3492
+ ARG (float, 5.0f, S4, 4)
3493
+ ARG (float, 6.0f, S5, 5)
3494
+ ARG (float, 7.0f, S6, 6)
3495
+ ARG (struct float_float_t, float_float, STACK, 7)
3496
+ ARG (int, 9, W0, 8)
3497
+ ARG (int, 10, W1, 9)
3498
+ ARG (int, 11, W2, 10)
3499
+ ARG (int, 12, W3, 11)
3500
+ ARG (int, 13, W4, 12)
3501
+ ARG (int, 14, W5, 13)
3502
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
3504
+ /* Note on the reason of using 'X7' instead of 'W7' here:
3505
+ Using 'X7' makes sure the test works in the big-endian mode.
3506
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
3507
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
3508
+ the memory, with the content of the other 4 bytes unspecified. The
3509
+ test framework will only compare the 4 relavent bytes. */
3510
+ ANON (union float_int_t, float_int, X7, 15)
3511
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
3513
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
3514
===================================================================
3515
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
3516
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
3518
+/* Test AAPCS64 layout and __builtin_va_start.
3520
+ Pass named __128int argument on stack. */
3522
+/* { dg-do run { target aarch64*-*-* } } */
3524
+#ifndef IN_FRAMEWORK
3525
+#define AAPCS64_TEST_STDARG
3526
+#define TESTFILE "va_arg-15.c"
3527
+#include "type-def.h"
3529
+union int128_t qword;
3531
+#define HAS_DATA_INIT_FUNC
3535
+ /* Init signed quad-word integer. */
3536
+ qword.l64 = 0xfdb9753102468aceLL;
3537
+ qword.h64 = 0xeca8642013579bdfLL;
3540
+#include "abitest.h"
3542
+ ARG (int, 1, W0, 0)
3543
+ ARG (int, 2, W1, 1)
3544
+ ARG (int, 3, W2, 2)
3545
+ ARG (int, 4, W3, 3)
3546
+ ARG (int, 5, W4, 4)
3547
+ ARG (int, 6, W5, 5)
3548
+ ARG (int, 7, W6, 6)
3549
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
3551
+#ifndef __AAPCS64_BIG_ENDIAN__
3552
+ LAST_ANON (int, 8, STACK + 16, 8)
3554
+ LAST_ANON (int, 8, STACK + 20, 8)
3557
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
3558
===================================================================
3559
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release)
3560
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch)
3562
+/* { dg-do assemble } */
3563
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
3566
+test (int a, double b, int c, int d, int e)
3569
+ __asm__ __volatile ("// %0, %1"
3572
+ : /* No clobbers */
3576
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
3577
===================================================================
3578
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
3579
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
3581
+/* { dg-do run } */
3582
+/* { dg-options "-std=gnu99" } */
3584
+#include <stdlib.h>
3585
+#include <stdarg.h>
3587
+#define NC __attribute__((noinline,noclone))
3589
+void NC vfun (char n, ...)
3600
+ if (11 != va_arg (ap, int))
3604
+ if (2222 != va_arg (ap, int))
3608
+ if (333333 != va_arg (ap, __int24))
3612
+ if (44444444 != va_arg (ap, long))
3616
+ if (8888888888888888 != va_arg (ap, long long))
3625
+void NC boo_qi (const __flash char *p)
3630
+void NC boox_qi (const __memx char *p)
3635
+void NC boo_hi (const __flash int *p)
3640
+void NC boox_hi (const __memx int *p)
3645
+void NC boo_psi (const __flash __int24 *p)
3650
+void NC boox_psi (const __memx __int24 *p)
3655
+void NC boo_si (const __flash long *p)
3660
+void NC boox_si (const __memx long *p)
3665
+void NC boo_di (const __flash long long *p)
3670
+void NC boox_di (const __memx long long *p)
3675
+const __flash char f_qi = 11;
3676
+const __flash int f_hi = 2222;
3677
+const __flash __int24 f_psi = 333333;
3678
+const __flash long f_si = 44444444;
3679
+const __flash long long f_di = 8888888888888888;
3681
+const __memx char x_qi = 11;
3682
+const __memx int x_hi = 2222;
3683
+const __memx __int24 x_psi = 333333;
3684
+const __memx long x_si = 44444444;
3685
+const __memx long long x_di = 8888888888888888;
3689
+__int24 r_psi = 333333;
3690
+long r_si = 44444444;
3691
+long long r_di = 8888888888888888;
3703
+ boox_psi (&x_psi);
3709
+ boox_psi (&r_psi);
3715
Index: gcc/testsuite/gcc.target/i386/pr61923.c
3716
===================================================================
3717
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release)
3718
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch)
3720
+/* PR debug/61923 */
3721
+/* { dg-do compile } */
3722
+/* { dg-options "-O2 -fcompare-debug" } */
3734
+struct ext4_map_blocks
3740
+int ext4_da_map_blocks_ei_0;
3741
+void fn1 (int p1, struct ext4_map_blocks *p2)
3746
+ ext4_da_map_blocks_ei_0++;
3747
+ arch_spinlock_t *lock;
3748
+ switch (sizeof *&lock->tickets.head)
3750
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
3754
+ fn2 (p2->m_lblk, p2->m_len);
3756
Index: gcc/testsuite/gcc.target/i386/pr61423.c
3757
===================================================================
3758
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
3759
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
3761
+/* PR target/61423 */
3762
+/* { dg-do run { target ia32 } } */
3763
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
3766
+static unsigned int A[N];
3769
+__attribute__((noinline))
3772
+ unsigned int sum = 0;
3776
+ for (i = 0; i < N; i++)
3789
+ for(i = 0; i < N; i++)
3795
+ __builtin_abort ();
3799
Index: gcc/testsuite/gcc.target/i386/pr60901.c
3800
===================================================================
3801
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
3802
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
3804
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
3807
+extern void bar (void);
3808
+extern int baz (int);
3814
+ for (j = 0; j < n; j++)
3816
+ for (i = 1; i < j; i++)
3821
Index: gcc/testsuite/gcc.target/i386/pr61801.c
3822
===================================================================
3823
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release)
3824
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch)
3826
+/* PR rtl-optimization/61801 */
3827
+/* { dg-do compile } */
3828
+/* { dg-options "-Os -fcompare-debug" } */
3842
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
3847
Index: gcc/testsuite/gcc.target/i386/pr61446.c
3848
===================================================================
3849
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
3850
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
3852
+/* PR rtl-optimization/61446 */
3854
+/* { dg-do compile { target { ia32 } } } */
3855
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
3860
+ const double dfa = a;
3861
+ const unsigned int hi = dfa / 0x1p32f;
3862
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
3864
+ return ((unsigned long long) hi << (4 * (8))) | lo;
3866
Index: gcc/testsuite/gcc.target/i386/pr63947.c
3867
===================================================================
3868
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../tags/gcc_4_8_3_release)
3869
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../branches/gcc-4_8-branch)
3871
+/* PR target/63947 */
3872
+/* { dg-do assemble } */
3873
+/* { dg-options "-Os" } */
3874
+/* { dg-additional-options "-march=i686" { target ia32 } } */
3876
+long double foo (unsigned a, unsigned b)
3880
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
3881
===================================================================
3882
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release)
3883
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch)
3885
+/* { dg-do run } */
3886
+/* { dg-options "-march=octeon" } */
3888
+extern void abort (void);
3892
+ struct node *next;
3893
+ struct node *prev;
3900
+ struct node *first;
3903
+struct head heads[5];
3907
+struct head *head = &heads[2];
3909
+static int __attribute__((noinline))
3912
+ node.prev = (void *)head;
3913
+ head->first = &node;
3915
+ struct node *n = head->first;
3916
+ struct head *h = &heads[k];
3917
+ struct node *next = n->next;
3919
+ if (n->prev == (void *)h)
3922
+ n->prev->next = next;
3924
+ n->next = h->first;
3925
+ return n->next == &node;
3935
Index: gcc/testsuite/gcc.target/sh/pr61996.c
3936
===================================================================
3937
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
3938
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
3940
+/* Check that the option -musermode has no effect on targets that do not
3941
+ support user/privileged mode and that it does not interfere with option
3942
+ -matomic-model=soft-imask. */
3943
+/* { dg-do compile } */
3944
+/* { dg-options "-matomic-model=soft-imask" } */
3945
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
3952
Index: gcc/testsuite/lib/target-supports.exp
3953
===================================================================
3954
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
3955
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
3956
@@ -1790,6 +1790,15 @@
3960
+# Return 1 if the target supports long double of 128 bits,
3963
+proc check_effective_target_longdouble128 { } {
3964
+ return [check_no_compiler_messages longdouble128 object {
3965
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
3969
# Return 1 if the target supports double of 64 bits,
3972
@@ -5329,3 +5338,40 @@
3977
+# Return 1 if <fenv.h> is available with all the standard IEEE
3978
+# exceptions and floating-point exceptions are raised by arithmetic
3979
+# operations. (If the target requires special options for "inexact"
3980
+# exceptions, those need to be specified in the testcases.)
3982
+proc check_effective_target_fenv_exceptions {} {
3983
+ return [check_runtime fenv_exceptions {
3985
+ #include <stdlib.h>
3986
+ #ifndef FE_DIVBYZERO
3987
+ # error Missing FE_DIVBYZERO
3989
+ #ifndef FE_INEXACT
3990
+ # error Missing FE_INEXACT
3992
+ #ifndef FE_INVALID
3993
+ # error Missing FE_INVALID
3995
+ #ifndef FE_OVERFLOW
3996
+ # error Missing FE_OVERFLOW
3998
+ #ifndef FE_UNDERFLOW
3999
+ # error Missing FE_UNDERFLOW
4001
+ volatile float a = 0.0f, r;
4006
+ if (fetestexcept (FE_INVALID))
4013
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
4014
===================================================================
4015
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
4016
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
4018
! { dg-require-effective-target fortran_large_real }
4019
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
4020
-! Test XFAILed on these platforms because the system's printf() lacks
4021
+! { dg-do run { xfail powerpc*-apple-darwin* } }
4022
+! Test XFAILed on this platform because the system's printf() lacks
4023
! proper support for denormalized long doubles. See PR24685
4025
! This tests that the default formats for formatted I/O of reals are
4026
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
4027
===================================================================
4028
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release)
4029
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch)
4031
+! { dg-do compile }
4032
+! { dg-options "-fdump-tree-original" }
4033
+! PR 61999 - this used to ICE.
4034
+! Original test case by A. Kasahara
4036
+ use, intrinsic:: iso_fortran_env, only: output_unit
4040
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
4044
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
4045
+! { dg-final { cleanup-tree-dump "original" } }
4046
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
4047
===================================================================
4048
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release)
4049
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch)
4052
+! { dg-do compile }
4053
+! { dg-options "-fopenmp" }
4056
+ integer, parameter :: p(2) = (/ 11, 12 /)
4059
+ !$omp parallel do default(none)
4064
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
4065
===================================================================
4066
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release)
4067
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch)
4070
+! { dg-do compile }
4071
+! { dg-options "-fopenmp" }
4075
+ integer :: s1, s2, s3
4078
+ type(t), parameter :: u = t(1, 2, 3)
4080
+ !$omp parallel do default(none)
4085
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
4086
===================================================================
4087
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
4088
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
4091
+! { dg-options "-fcray-pointer" }
4106
+ if (z /= 42) call abort
4108
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
4109
===================================================================
4110
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release)
4111
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch)
4114
+! Tests fix for PR61780 in which the loop reversal mechanism was
4115
+! not accounting for the first index being an element so that no
4116
+! loop in this dimension is created.
4118
+! Contributed by Manfred Tietze on clf.
4122
+ integer, parameter :: n = 10, k = 3
4124
+ integer, dimension(n,n) :: y
4125
+ integer :: res1(n), res2(n)
4138
+ y(k,4:n) = y(k,3:n-1)
4142
+ y(k,n:4:-1) = y(k,n-1:3:-1)
4147
+ if (any(res1 /= res2)) call abort ()
4149
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
4150
===================================================================
4151
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
4152
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
4154
+C { dg-do compile }
4156
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
4159
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
4162
Index: gcc/testsuite/gfortran.dg/nint_2.f90
4163
===================================================================
4164
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
4165
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
4167
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
4170
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
4171
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
4172
+! Note that this doesn't fail on powerpc64le-*-linux*.
4174
integer(kind=8) :: i1, i2
4176
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
4177
===================================================================
4178
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release)
4179
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch)
4183
call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4184
- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4185
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
4186
call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4187
call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4189
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
4190
===================================================================
4191
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release)
4192
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch)
4195
+! { dg-options "-ffrontend-optimize" }
4196
+! PR 62214 - this used to give the wrong result.
4197
+! Original test case by Oliver Fuhrer
4200
+ CHARACTER(LEN=20) :: fullNames(2)
4201
+ CHARACTER(LEN=255) :: pathName
4202
+ CHARACTER(LEN=5) :: fileNames(2)
4204
+ pathName = "/dir1/dir2/"
4205
+ fileNames = (/ "file1", "file2" /)
4206
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
4207
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
4208
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
4210
Index: gcc/testsuite/gfortran.dg/pr45636.f90
4211
===================================================================
4212
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
4213
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
4218
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
4219
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
4220
! { dg-final { cleanup-tree-dump "forwprop2" } }
4221
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
4222
===================================================================
4223
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
4224
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
4227
+! Test the fix for PR61459.
4229
+! Contributed by John Wingate <johnww@tds.net>
4235
+ public :: f_segfault, f_segfault_plus, f_workaround
4236
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
4240
+ function f_segfault(x)
4241
+ real, dimension(:), allocatable :: f_segfault
4242
+ real, dimension(:), intent(in) :: x
4243
+ allocate(f_segfault(2))
4244
+ f_segfault = matmul(b,x)
4245
+ end function f_segfault
4247
+! Sefaulted without the ALLOCATE as well.
4248
+ function f_segfault_plus(x)
4249
+ real, dimension(:), allocatable :: f_segfault_plus
4250
+ real, dimension(:), intent(in) :: x
4251
+ f_segfault_plus = matmul(b,x)
4252
+ end function f_segfault_plus
4254
+ function f_workaround(x)
4255
+ real, dimension(:), allocatable :: f_workaround
4256
+ real, dimension(:), intent(in) :: x
4257
+ real, dimension(:), allocatable :: tmp
4258
+ allocate(f_workaround(2),tmp(2))
4260
+ f_workaround = tmp
4261
+ end function f_workaround
4268
+ real, dimension(2) :: x = 1.0, y
4269
+ y = f_workaround (x)
4270
+ if (any (f_segfault (x) .ne. y)) call abort
4271
+ if (any (f_segfault_plus (x) .ne. y)) call abort
4273
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
4274
===================================================================
4275
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release)
4276
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch)
4279
real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78]
4280
real,parameter :: myeps(size(values)) = epsilon(0.0) &
4281
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
4282
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
4283
! The following is sufficient for me - the values above are a bit
4285
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
4286
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
4287
===================================================================
4288
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
4289
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
4291
+#ifdef __INT32_TYPE__
4292
+typedef __INT32_TYPE__ int32_t;
4294
+typedef int int32_t;
4297
+#ifdef __UINT32_TYPE__
4298
+typedef __UINT32_TYPE__ uint32_t;
4300
+typedef unsigned uint32_t;
4303
+#define __fake_const_swab32(x) ((uint32_t)( \
4304
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
4305
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
4306
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
4307
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
4309
+/* Previous version of bswap optimization failed to consider sign extension
4310
+ and as a result would replace an expression *not* doing a bswap by a
4313
+__attribute__ ((noinline, noclone)) uint32_t
4314
+fake_bswap32 (uint32_t in)
4316
+ return __fake_const_swab32 (in);
4322
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
4324
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4326
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
4327
+ __builtin_abort ();
4330
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
4331
===================================================================
4332
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
4333
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
4335
+set additional_flags "-Wno-psabi"
4337
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
4338
===================================================================
4339
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release)
4340
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch)
4348
+static union U u = { 0x12345678 };
4350
+/* Constant folding used to fail to account for endianness when folding a
4356
+#ifdef __BYTE_ORDER__
4357
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4358
+ return u.b - 0x45678;
4360
+ return u.b - 0x12345;
4365
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
4366
===================================================================
4367
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
4368
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
4380
+ __builtin_abort ();
4383
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
4384
===================================================================
4385
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release)
4386
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch)
4388
set additional_flags "-mno-mmx"
4391
+set additional_flags "-Wno-psabi"
4393
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
4394
===================================================================
4395
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
4396
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
4398
+#ifdef __INT16_TYPE__
4399
+typedef __INT16_TYPE__ int16_t;
4401
+typedef short int16_t;
4404
+#ifdef __UINT32_TYPE__
4405
+typedef __UINT32_TYPE__ uint32_t;
4407
+typedef unsigned uint32_t;
4410
+#define __fake_const_swab32(x) ((uint32_t)( \
4411
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
4412
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
4413
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
4414
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
4417
+/* Previous version of bswap optimization failed to consider sign extension
4418
+ and as a result would replace an expression *not* doing a bswap by a
4421
+__attribute__ ((noinline, noclone)) uint32_t
4422
+fake_bswap32 (uint32_t in)
4424
+ return __fake_const_swab32 (in);
4430
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4432
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
4434
+ if (fake_bswap32 (0x81828384) != 0xff838281)
4435
+ __builtin_abort ();
4438
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
4439
===================================================================
4440
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
4441
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
4443
+#ifdef __UINT64_TYPE__
4444
+typedef __UINT64_TYPE__ uint64_t;
4446
+typedef unsigned long long uint64_t;
4449
+#ifndef __SIZEOF_INT128__
4450
+#define __int128 long long
4453
+/* Some version of bswap optimization would ICE when analyzing a mask constant
4454
+ too big for an HOST_WIDE_INT (PR61375). */
4456
+__attribute__ ((noinline, noclone)) uint64_t
4457
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
4459
+ __int128 mask = (__int128)0xffff << 56;
4460
+ return ((in1 & mask) >> 56) | in2;
4467
+#ifdef __SIZEOF_INT128__
4470
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
4472
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
4474
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
4475
+ __builtin_abort ();
4478
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
4479
===================================================================
4480
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release)
4481
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch)
4486
+set additional_flags "-Wno-psabi"
4488
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
4489
===================================================================
4490
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release)
4491
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch)
4493
+set additional_flags "-Wno-psabi"
4495
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
4496
===================================================================
4497
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
4498
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
4500
+/* PR tree-optimization/61684 */
4505
+static short **e = 0;
4510
+ for (; c < 1; c++)
4513
+ a = d && (c && 1) & *b;
4515
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
4516
===================================================================
4517
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
4518
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
4520
+/* PR inline-asm/63282 */
4527
+ asm volatile goto ("" : : : : a, b);
4533
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
4534
===================================================================
4535
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release)
4536
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch)
4538
+with Ada.Streams; use Ada.Streams;
4540
+package body Opt41_Pkg is
4542
+ type Wstream is new Root_Stream_Type with record
4543
+ S : Unbounded_String;
4546
+ procedure Read (Stream : in out Wstream;
4547
+ Item : out Stream_Element_Array;
4548
+ Last : out Stream_Element_Offset) is null;
4550
+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
4552
+ for J in Item'Range loop
4553
+ Append (Stream.S, Character'Val (Item (J)));
4557
+ function Rec_Write (R : Rec) return Unbounded_String is
4558
+ S : aliased Wstream;
4560
+ Rec'Output (S'Access, R);
4564
+ type Rstream is new Root_Stream_Type with record
4565
+ S : String_Access;
4566
+ Idx : Integer := 1;
4569
+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
4571
+ procedure Read (Stream : in out Rstream;
4572
+ Item : out Stream_Element_Array;
4573
+ Last : out Stream_Element_Offset) is
4575
+ Last := Stream_Element_Offset'Min
4576
+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
4577
+ for I in Item'First .. Last loop
4578
+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
4579
+ Stream.Idx := Stream.Idx + 1;
4583
+ function Rec_Read (Str : String_Access) return Rec is
4584
+ S : aliased Rstream;
4587
+ return Rec'Input (S'Access);
4591
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
4592
===================================================================
4593
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release)
4594
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch)
4596
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
4598
+package Opt41_Pkg is
4600
+ type Enum is (One, Two, Three, Four, Five, Six);
4602
+ type Rec (D : Enum) is record
4606
+ when Two | Five | Six =>
4607
+ S : Unbounded_String;
4609
+ when Two => B : Boolean;
4610
+ when others => null;
4617
+ type Rec_Ptr is access all Rec;
4619
+ function Rec_Write (R : Rec) return Unbounded_String;
4621
+ function Rec_Read (Str : String_Access) return Rec;
4624
Index: gcc/testsuite/gnat.dg/opt39.adb
4625
===================================================================
4626
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
4627
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
4629
+-- { dg-do compile }
4630
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
4632
+procedure Opt39 (I : Integer) is
4634
+ type Rec is record
4642
+ procedure Set (A : access Rec; I : Integer) is
4643
+ Tmp : Rec := A.all;
4652
+ Set (R'Access, I);
4654
+ raise Program_Error;
4658
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
4659
+-- { dg-final { cleanup-tree-dump "optimized" } }
4660
Index: gcc/testsuite/gnat.dg/opt41.adb
4661
===================================================================
4662
--- a/src/gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release)
4663
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch)
4666
+-- { dg-options "-Os" }
4668
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
4669
+with Opt41_Pkg; use Opt41_Pkg;
4672
+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
4673
+ SP : String_Access := new String'(To_String (Rec_Write (R)));
4674
+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
4676
+ if RP.D /= R.D then
4677
+ raise Program_Error;
4680
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
4681
===================================================================
4682
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
4683
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
4686
+-- { dg-options "-gnato -O" }
4688
+procedure Overflow_Fixed is
4690
+ type Unsigned_8_Bit is mod 2**8;
4692
+ procedure Fixed_To_Eight (Value : Duration) is
4693
+ Item : Unsigned_8_Bit;
4695
+ Item := Unsigned_8_Bit(Value);
4696
+ raise Program_Error;
4698
+ when Constraint_Error => null; -- expected case
4702
+ Fixed_To_Eight (-0.5);
4704
Index: gcc/testsuite/gnat.dg/aliasing1.adb
4705
===================================================================
4706
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
4707
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
4712
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
4713
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
4714
-- { dg-final { cleanup-tree-dump "optimized" } }
4715
Index: gcc/testsuite/gcc.dg/pr60866.c
4716
===================================================================
4717
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
4718
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
4720
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
4721
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
4726
+foo (int w, int **dnroot, int **dn)
4729
+ int *xchild = xchild;
4730
+ for (; w < n; w++)
4734
+ for (child = *dn; child; child = xchild)
4738
Index: gcc/testsuite/gcc.dg/pr51879-12.c
4739
===================================================================
4740
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../tags/gcc_4_8_3_release)
4741
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../branches/gcc-4_8-branch)
4746
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
4747
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
4748
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
4749
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
4750
/* { dg-final { cleanup-tree-dump "pre" } } */
4751
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
4752
===================================================================
4753
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release)
4754
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch)
4756
/* { dg-do compile } */
4757
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4758
#include <altivec.h>
4759
typedef const volatile unsigned int _1;
4760
typedef const unsigned int _2;
4761
Index: gcc/testsuite/gcc.dg/vmx/ops.c
4762
===================================================================
4763
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release)
4764
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch)
4766
/* { dg-do compile } */
4767
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4768
#include <altivec.h>
4770
extern char * *var_char_ptr;
4771
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
4772
===================================================================
4773
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
4774
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
4776
/* { dg-do compile } */
4777
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
4779
/* Checks from the original ops.c that pass pointers to long or
4780
unsigned long for operations that support that in released versions
4781
Index: gcc/testsuite/gcc.dg/pr63665.c
4782
===================================================================
4783
--- a/src/gcc/testsuite/gcc.dg/pr63665.c (.../tags/gcc_4_8_3_release)
4784
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c (.../branches/gcc-4_8-branch)
4786
+/* { dg-do run } */
4787
+/* { dg-require-effective-target int32plus } */
4788
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
4793
+ int y = 0x80000000;
4800
+ if (test5 (0x80000000) != 0)
4801
+ __builtin_abort ();
4804
Index: gcc/testsuite/gcc.dg/pr63342.c
4805
===================================================================
4806
--- a/src/gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release)
4807
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch)
4809
+/* PR debug/63342 */
4810
+/* { dg-do compile } */
4811
+/* { dg-options "-g -O2" } */
4812
+/* { dg-additional-options "-fpic" { target fpic } } */
4814
+static __thread double u[9], v[9];
4817
+foo (double **p, double **q)
4828
+ for (i = 0; i < 9; i++)
4830
+ double a = x + v[i];
4831
+ s += u[i] * a * a;
4835
Index: gcc/testsuite/gcc.dg/pr63284.c
4836
===================================================================
4837
--- a/src/gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release)
4838
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch)
4840
+/* PR debug/63284 */
4841
+/* { dg-do compile } */
4842
+/* { dg-options "-O2 -fcompare-debug" } */
4844
+int a[10], *b, *d, c, f;
4882
Index: gcc/testsuite/gcc.dg/pr61045.c
4883
===================================================================
4884
--- a/src/gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release)
4885
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch)
4887
+/* { dg-do run } */
4888
+/* { dg-options "-fstrict-overflow" } */
4893
+ int b = __INT_MAX__;
4894
+ int t = (a - 2) > (b - 1);
4896
+ __builtin_abort();
4899
Index: gcc/testsuite/gcc.dg/pr62167-run.c
4900
===================================================================
4901
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../tags/gcc_4_8_3_release)
4902
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../branches/gcc-4_8-branch)
4904
+/* { dg-do run } */
4905
+/* { dg-options "-O2 -ftree-tail-merge" } */
4909
+ struct node *next;
4910
+ struct node *prev;
4917
+ struct node *first;
4920
+struct head heads[5];
4924
+struct head *head = &heads[2];
4931
+ node.next = (void*)0;
4933
+ node.prev = (void *)head;
4935
+ head->first = &node;
4937
+ struct node *n = head->first;
4939
+ struct head *h = &heads[k];
4941
+ heads[2].first = n->next;
4943
+ if ((void*)n->prev == (void *)h)
4946
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
4947
+ p = n->prev->next;
4949
+ return !(p == (void*)0);
4951
Index: gcc/testsuite/gcc.dg/pr52769.c
4952
===================================================================
4953
--- a/src/gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release)
4954
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch)
4957
+/* { dg-do run } */
4958
+/* { dg-options "-O3" } */
4962
+ int should_be_zero;
4970
+ volatile foo_t foo = {
4975
+ if (foo.should_be_zero != 0)
4976
+ __builtin_abort ();
4980
Index: gcc/testsuite/gcc.dg/pr62167.c
4981
===================================================================
4982
--- a/src/gcc/testsuite/gcc.dg/pr62167.c (.../tags/gcc_4_8_3_release)
4983
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c (.../branches/gcc-4_8-branch)
4985
+/* { dg-do compile } */
4986
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
4990
+ struct node *next;
4991
+ struct node *prev;
4998
+ struct node *first;
5001
+struct head heads[5];
5005
+struct head *head = &heads[2];
5012
+ node.next = (void*)0;
5014
+ node.prev = (void *)head;
5016
+ head->first = &node;
5018
+ struct node *n = head->first;
5020
+ struct head *h = &heads[k];
5022
+ heads[2].first = n->next;
5024
+ if ((void*)n->prev == (void *)h)
5027
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5028
+ p = n->prev->next;
5030
+ return !(p == (void*)0);
5033
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
5034
+/* { dg-final { cleanup-tree-dump "pre" } } */
5035
Index: gcc/testsuite/gcc.dg/pr62004.c
5036
===================================================================
5037
--- a/src/gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release)
5038
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch)
5040
+/* { dg-do run } */
5041
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
5045
+ struct node *next;
5046
+ struct node *prev;
5053
+ struct node *first;
5056
+struct head heads[5];
5060
+struct head *head = &heads[2];
5067
+ node.next = (void*)0;
5069
+ node.prev = (void *)head;
5071
+ head->first = &node;
5073
+ struct node *n = head->first;
5075
+ struct head *h = &heads[k];
5077
+ heads[2].first = n->next;
5079
+ if ((void*)n->prev == (void *)h)
5082
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5083
+ p = n->prev->next;
5085
+ return !(p == (void*)0);
5087
Index: gcc/testsuite/gcc.dg/pr51879-18.c
5088
===================================================================
5089
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release)
5090
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch)
5095
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
5096
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
5097
/* { dg-final { cleanup-tree-dump "pre" } } */
5098
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
5099
===================================================================
5100
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release)
5101
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch)
5103
+/* { dg-do run } */
5105
+extern void abort (void);
5107
+struct node { struct node *next, *prev; } node;
5108
+struct head { struct node *first; } heads[5];
5110
+struct head *head = &heads[2];
5112
+static int __attribute__((noinline))
5115
+ node.prev = (void *)head;
5116
+ head->first = &node;
5118
+ struct node *n = head->first;
5119
+ struct head *h = &heads[k];
5121
+ if (n->prev == (void *)h)
5122
+ h->first = n->next;
5124
+ n->prev->next = n->next;
5126
+ n->next = h->first;
5127
+ return n->next == &node;
5136
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
5137
===================================================================
5138
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release)
5139
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch)
5141
+/* { dg-do compile } */
5146
+ unsigned b = (a * 64 & 192) | 63U;
5149
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
5150
===================================================================
5151
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release)
5152
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch)
5154
+/* { dg-do run } */
5161
+fn1 (int p1, char p2)
5163
+ return p1 || p2 ? 0 : p2;
5174
+ b = fn1 (g = d = e, g);
5185
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
5186
===================================================================
5187
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
5188
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
5190
+/* { dg-do run } */
5192
+int a, b = 1, c, d, e, f, g;
5201
+ g = g ? 0 : 1 % g;
5203
+ for (; d < 1; d = e)
5225
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
5226
===================================================================
5227
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release)
5228
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch)
5230
+/* Test that exact underflow in __float128 signals the underflow
5231
+ exception if trapping is enabled, but does not raise the flag
5234
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
5235
+/* { dg-options "-D_GNU_SOURCE" } */
5236
+/* { dg-require-effective-target fenv_exceptions } */
5239
+#include <setjmp.h>
5240
+#include <signal.h>
5241
+#include <stdlib.h>
5243
+volatile sig_atomic_t caught_sigfpe;
5247
+handle_sigfpe (int sig)
5249
+ caught_sigfpe = 1;
5250
+ siglongjmp (buf, 1);
5256
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
5257
+ volatile __float128 r;
5259
+ if (fetestexcept (FE_UNDERFLOW))
5261
+ if (r != 0x1p-16384q)
5263
+ feenableexcept (FE_UNDERFLOW);
5264
+ signal (SIGFPE, handle_sigfpe);
5265
+ if (sigsetjmp (buf, 1) == 0)
5267
+ if (!caught_sigfpe)
5271
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
5272
===================================================================
5273
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../tags/gcc_4_8_3_release)
5274
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../branches/gcc-4_8-branch)
5276
+/* { dg-do run } */
5278
+#include <stdlib.h>
5280
+#define NUM_OF_STATES 4
5281
+typedef unsigned int entry_t[2];
5282
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
5284
+void __attribute__((noinline,noclone))
5285
+test_00(size_t numOfStates, entries_item_t* p_bm,
5286
+ const unsigned int* polyArray,
5287
+ size_t polyArraySize)
5290
+ unsigned int hlp0, hlp1;
5291
+ for (idx = 0; idx < numOfStates; ++idx)
5295
+ hlp0 = (idx << 1) | 0x00;
5296
+ hlp1 = (idx << 1) | 0x01;
5297
+ p_bm->metricEntries_[idx][0] = 0;
5298
+ p_bm->metricEntries_[idx][1] = 0;
5299
+ for (idy = 0; idy < polyArraySize; ++idy)
5301
+ p_bm->metricEntries_[idx][0]
5302
+ |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
5303
+ p_bm->metricEntries_[idx][1]
5304
+ |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
5311
+ unsigned int polyArray[] = { 0x07, 0x05 };
5312
+ entries_item_t* pBranchMetrics;
5313
+ pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
5314
+ test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
5315
+ sizeof(polyArray) / sizeof(polyArray[0]));
5316
+ if (pBranchMetrics->metricEntries_[0][0] != 0
5317
+ || pBranchMetrics->metricEntries_[0][1] != 3
5318
+ || pBranchMetrics->metricEntries_[1][0] != 1
5319
+ || pBranchMetrics->metricEntries_[1][1] != 2
5320
+ || pBranchMetrics->metricEntries_[2][0] != 3
5321
+ || pBranchMetrics->metricEntries_[2][1] != 0
5322
+ || pBranchMetrics->metricEntries_[3][0] != 2
5323
+ || pBranchMetrics->metricEntries_[3][1] != 1)
5325
+ free(pBranchMetrics);
5328
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
5329
===================================================================
5330
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release)
5331
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch)
5333
T (20, 0, 4, 1, 5) \
5334
T (21, 2, 6, 3, 7) \
5335
T (22, 1, 2, 3, 0) \
5337
+T (23, 2, 1, 0, 3) \
5340
T (116, 1, 2, 4, 3) \
5341
T (117, 7, 3, 3, 0) \
5343
T (119, 0, 3, 5, 6) \
5344
T (120, 0, 0, 1, 5) \
5345
T (121, 4, 6, 2, 1) \
5346
-T (122, 2, 5, 6, 3) \
5347
T (123, 4, 6, 3, 2) \
5348
T (124, 4, 7, 5, 6) \
5349
T (125, 0, 4, 2, 4) \
5350
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
5351
===================================================================
5352
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release)
5353
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch)
5355
/* { dg-do compile } */
5356
/* { dg-options "-Wstack-usage=512" } */
5359
+int foo1 (void) /* { dg-bogus "stack usage" } */
5364
-} /* { dg-bogus "stack usage" } */
5368
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5373
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5377
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5379
char arr[1024] __attribute__((aligned (512)));
5382
/* Force dynamic realignment of argument pointer. */
5383
__builtin_apply ((void (*)()) foo2, 0, 0);
5387
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5390
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
5395
-} /* { dg-warning "stack usage might be unbounded" } */
5397
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
5398
===================================================================
5399
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release)
5400
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch)
5402
+/* { dg-do compile } */
5403
+/* { dg-options "-O3" } */
5413
+static int fn2 (struct S);
5414
+void fn3 (struct S);
5419
+ struct S h = { 0, 0 };
5427
+ struct S j = { 0, 0 };
5446
+ struct S f = { 0, 0 };
5450
Index: gcc/testsuite/gcc.dg/pr62030.c
5451
===================================================================
5452
--- a/src/gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release)
5453
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch)
5455
+/* { dg-do run } */
5456
+/* { dg-options "-O2" } */
5458
+extern void abort (void);
5462
+ struct node *next;
5463
+ struct node *prev;
5470
+ struct node *first;
5473
+struct head heads[5];
5477
+struct head *head = &heads[2];
5479
+static int __attribute__((noinline))
5482
+ node.prev = (void *)head;
5483
+ head->first = &node;
5485
+ struct node *n = head->first;
5486
+ struct head *h = &heads[k];
5487
+ struct node *next = n->next;
5489
+ if (n->prev == (void *)h)
5492
+ n->prev->next = next;
5494
+ n->next = h->first;
5495
+ return n->next == &node;
5505
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
5506
===================================================================
5507
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
5508
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
5510
+/* PR tree-optimization/63341 */
5511
+/* { dg-do run } */
5513
+#include "tree-vect.h"
5515
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
5516
+struct S { char e __attribute__((aligned (64))); U s[32]; };
5517
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
5518
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
5519
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
5520
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
5521
+unsigned short d[32] = { 1 };
5523
+__attribute__((noinline, noclone)) void
5527
+ for (i = 0; i < 32; i++)
5528
+ d[i] = t.s[i].s + 4;
5529
+ for (i = 0; i < 32; i++)
5530
+ if (d[i] != t.s[i].s + 4)
5533
+ asm volatile ("" : : : "memory");
5544
+/* { dg-final { cleanup-tree-dump "vect" } } */
5545
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
5546
===================================================================
5547
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release)
5548
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch)
5550
+/* PR tree-optimization/63189 */
5551
+/* { dg-do run } */
5553
+#include "tree-vect.h"
5555
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
5557
+__attribute__((noinline, noclone)) void
5561
+ for (j = 0; j < 8; j++)
5575
+/* { dg-final { cleanup-tree-dump "vect" } } */
5576
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
5577
===================================================================
5578
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release)
5579
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch)
5581
+/* { dg-require-effective-target vect_int } */
5583
+#include <stdarg.h>
5584
+#include "tree-vect.h"
5589
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5590
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5592
+/* (short, int)->int->int dot product.
5593
+ Not detected as a dot-product pattern. */
5595
+__attribute__ ((noinline)) int
5601
+ for (i = 0; i < len; i++)
5603
+ result += (X[i] * Y[i]);
5609
+/* (int, short)->int->int dot product.
5610
+ Not detected as a dot-product pattern. */
5612
+__attribute__ ((noinline)) int
5618
+ for (i = 0; i < len; i++)
5620
+ result += (Y[i] * X[i]);
5633
+ for (i = 0; i < N; i++)
5637
+ __asm__ volatile ("");
5651
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
5652
+/* { dg-final { cleanup-tree-dump "vect" } } */
5654
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
5655
===================================================================
5656
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../tags/gcc_4_8_3_release)
5657
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../branches/gcc-4_8-branch)
5659
+/* PR tree-optimization/63379 */
5660
+/* { dg-do run } */
5662
+#include "tree-vect.h"
5664
+extern void abort (void);
5671
+Point pt_array[25];
5673
+void __attribute__((noinline,noclone))
5674
+generate_array(void)
5677
+ for (i = 0; i<25; i++)
5679
+ pt_array[i].x = i;
5680
+ pt_array[i].y = 1000+i;
5687
+ generate_array ();
5688
+ Point min_pt = pt_array[0];
5689
+ Point *ptr, *ptr_end;
5690
+ for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
5692
+ min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
5693
+ min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
5696
+ if (min_pt.x != 0 || min_pt.y != 1000)
5701
+/* { dg-final { cleanup-tree-dump "vect" } } */
5702
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
5703
===================================================================
5704
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release)
5705
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch)
5707
+/* { dg-do compile } */
5708
+/* { dg-additional-options "-O1" } */
5718
+int foo (long long p_56, int * p_57)
5725
+ int **l_78 = &l_77;
5730
+ for (g_76 = 1; g_76 >= 0; g_76--)
5733
+ for (l_101 = 4; l_101 >= 0; l_101--)
5738
+ int **l_113 = &l_77;
5746
+/* { dg-final { cleanup-tree-dump "vect" } } */
5747
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
5748
===================================================================
5749
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
5750
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
5752
+/* PR tree-optimization/63189 */
5753
+/* { dg-additional-options "-fwrapv" } */
5754
+/* { dg-do run } */
5756
+#include "tree-vect.h"
5758
+__attribute__((noinline, noclone)) static int
5759
+bar (const short *a, int len)
5764
+ for (x = 0; x < len; x++)
5769
+__attribute__((noinline, noclone)) void
5772
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
5773
+ if (bar (stuff, 9) != 36)
5785
+/* { dg-final { cleanup-tree-dump "vect" } } */
5786
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
5787
===================================================================
5788
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release)
5789
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch)
5791
+/* { dg-do compile } */
5804
+ for (i = 0; i < 16; ++i)
5806
+ x->b[i][0] = a[i][0];
5807
+ x->c[i][0] = 0 != a[i][0];
5808
+ x->b[i][1] = a[i][1];
5812
+/* { dg-final { cleanup-tree-dump "vect" } } */
5813
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
5814
===================================================================
5815
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
5816
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
5818
+/* PR tree-optimization/63189 */
5819
+/* { dg-do run } */
5821
+#include "tree-vect.h"
5823
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
5824
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
5826
+__attribute__((noinline, noclone)) static int
5830
+ for (i = 0; i < 8; ++i)
5831
+ sum += a[i] * b[i];
5835
+__attribute__((noinline, noclone)) void
5850
+/* { dg-final { cleanup-tree-dump "vect" } } */
5851
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
5852
===================================================================
5853
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../tags/gcc_4_8_3_release)
5854
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../branches/gcc-4_8-branch)
5856
+/* { dg-do run } */
5858
+#include "tree-vect.h"
5860
+extern void abort (void);
5862
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
5869
+ for (; a < 8; a++)
5878
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
5879
===================================================================
5880
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
5881
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
5883
+/* PR tree-optimization/63341 */
5884
+/* { dg-do run } */
5886
+#include "tree-vect.h"
5888
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
5889
+struct S { char e __attribute__((aligned (64))); U s[32]; };
5890
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
5891
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
5892
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
5893
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
5894
+unsigned short d[32] = { 1 };
5896
+__attribute__((noinline, noclone)) void
5900
+ for (i = 0; i < 32; i++)
5902
+ if (__builtin_memcmp (d, t.s, sizeof d))
5914
+/* { dg-final { cleanup-tree-dump "vect" } } */
5915
Index: gcc/testsuite/ChangeLog
5916
===================================================================
5917
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
5918
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
5920
+2014-11-26 Richard Biener <rguenther@suse.de>
5922
+ Backport from mainline
5923
+ 2014-08-15 Richard Biener <rguenther@suse.de>
5925
+ PR tree-optimization/62031
5926
+ * gcc.dg/torture/pr62031.c: New testcase.
5928
+ 2014-10-10 Richard Biener <rguenther@suse.de>
5930
+ PR tree-optimization/63379
5931
+ * gcc.dg/vect/pr63379.c: New testcase.
5933
+ 2014-11-07 Richard Biener <rguenther@suse.de>
5935
+ PR tree-optimization/63605
5936
+ * gcc.dg/vect/pr63605.c: New testcase.
5938
+ 2014-10-28 Richard Biener <rguenther@suse.de>
5940
+ PR middle-end/63665
5941
+ * gcc.dg/pr63665.c: New testcase.
5943
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
5946
+ * gcc.target/i386/pr63947.c: New test.
5948
+2014-11-19 Tom de Vries <tom@codesourcery.com>
5950
+ Backport from mainline
5951
+ PR tree-optimization/62167
5952
+ * gcc.dg/pr51879-12.c: Add xfails.
5953
+ * gcc.dg/pr62167-run.c: New test.
5954
+ * gcc.dg/pr62167.c: New test.
5956
+2014-11-18 Teresa Johnson <tejohnson@google.com>
5958
+ Backport from mainline and gcc-4_9 branch.
5959
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
5961
+ PR tree-optimization/63841
5962
+ * g++.dg/tree-ssa/pr63841.C: New test.
5964
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
5967
+ * g++.dg/ipa/pr63838.C: New test.
5969
+2014-11-03 Marek Polacek <polacek@redhat.com>
5972
+ * gcc.dg/pr52769.c: New test.
5974
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5976
+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
5978
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
5980
+ * gnat.dg/opt41.adb: New test.
5981
+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
5983
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5985
+ Backport from mainline r215880
5986
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5988
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
5989
+ failing with the new warning message.
5990
+ * gcc.dg/vmx/3c-01a.c: Likewise.
5991
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
5992
+ * gcc.dg/vmx/ops.c: Likewise.
5993
+ * gcc.target/powerpc/altivec-20.c: Likewise.
5994
+ * gcc.target/powerpc/altivec-6.c: Likewise.
5995
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
5996
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
5997
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
5999
+ Backport from mainline r215882
6000
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6002
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
6004
+ Backport from mainline r216017
6005
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
6007
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
6008
+ * gcc.dg/vmx/ops.c: Likewise.
6009
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
6011
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
6014
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
6015
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
6017
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
6020
+ * gcc.dg/pr63342.c: New test.
6023
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
6024
+ to test 24 in TESTS.
6026
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
6028
+ Backport from mainline
6029
+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6031
+ * lib/target-supports.exp
6032
+ (check_effective_target_fenv_exceptions): New function.
6034
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
6036
+ PR inline-asm/63282
6037
+ * gcc.c-torture/compile/pr63282.c: New test.
6039
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
6041
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
6042
+ to default options.
6044
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6046
+ Backport from mainline r215559
6047
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6050
+ * gcc.target/powerpc/pr63335.c: New test.
6052
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
6054
+ PR tree-optimization/63341
6055
+ * gcc.dg/vect/pr63341-1.c: New test.
6056
+ * gcc.dg/vect/pr63341-2.c: New test.
6058
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
6060
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
6062
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
6065
+ * gcc.dg/pr63284.c: New test.
6067
+2014-09-09 Richard Biener <rguenther@suse.de>
6069
+ Backport from mainline
6070
+ 2014-06-11 Richard Biener <rguenther@suse.de>
6072
+ PR tree-optimization/61452
6073
+ * gcc.dg/torture/pr61452.c: New testcase.
6075
+2014-09-09 Richard Biener <rguenther@suse.de>
6077
+ Backport from mainline
6078
+ 2014-05-05 Richard Biener <rguenther@suse.de>
6080
+ PR middle-end/61010
6081
+ * gcc.dg/torture/pr61010.c: New testcase.
6083
+ 2014-05-28 Richard Biener <rguenther@suse.de>
6085
+ PR middle-end/61045
6086
+ * gcc.dg/pr61045.c: New testcase.
6088
+ 2014-08-11 Richard Biener <rguenther@suse.de>
6090
+ PR tree-optimization/62075
6091
+ * gcc.dg/vect/pr62075.c: New testcase.
6093
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
6095
+ PR tree-optimization/60196
6096
+ PR tree-optimization/63189
6097
+ * gcc.dg/vect/pr63189.c: New test.
6098
+ * gcc.dg/vect/pr60196-1.c: New test.
6099
+ * gcc.dg/vect/pr60196-2.c: New test.
6101
+ Backported from mainline
6102
+ 2013-09-17 Cong Hou <congh@google.com>
6104
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
6105
+ on two arrays with short and int types. This should not be recognized
6106
+ as a dot product pattern.
6108
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
6110
+ Backported from mainline
6111
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
6114
+ * gcc.target/i386/pr61923.c: New test.
6116
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
6118
+ PR testsuite/56194
6119
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
6121
+2014-09-03 Marek Polacek <polacek@redhat.com>
6123
+ Backport from mainline
6124
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
6127
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
6129
+2014-09-03 Martin Jambor <mjambor@suse.cz>
6132
+ * g++.dg/ipa/pr62015.C: New test.
6134
+2014-09-03 Martin Jambor <mjambor@suse.cz>
6137
+ * gcc.dg/ipa/pr61986.c: New test.
6139
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
6141
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
6142
+ failure on s390*-*-linux-gnu.
6144
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6146
+ Backport from mainline
6147
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6150
+ * gcc.target/sh/pr61996.c: New.
6152
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
6154
+ Backport from trunk
6156
+ * gfortran.dg/array_assignment_5.f90: New test.
6158
+2014-08-15 Tom de Vries <tom@codesourcery.com>
6160
+ Backport from mainline:
6161
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
6163
+ PR rtl-optimization/62004
6164
+ PR rtl-optimization/62030
6165
+ * gcc.dg/pr62004.c: New test.
6166
+ * gcc.dg/pr62030.c: Same.
6167
+ * gcc.target/mips/pr62030-octeon.c: Same.
6169
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
6171
+ PR tree-optimization/62073
6172
+ * gcc.dg/vect/pr62073.c: New test.
6174
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6176
+ Backport from mainline
6177
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
6179
+ PR middle-end/62103
6180
+ * gcc.c-torture/execute/bitfld-6.c: New test.
6182
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
6184
+ Backport from trunk
6186
+ * gfortran.dg/dot_product_3.f90: New test case.
6188
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
6190
+ PR tree-optimization/60707
6191
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
6193
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
6195
+ PR rtl-optimization/61801
6196
+ * gcc.target/i386/pr61801.c: Rewritten.
6198
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
6200
+ Backport from mainline
6201
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6203
+ PR tree-optimization/61375
6204
+ * gcc.c-torture/execute/pr61375-1.c: New test.
6206
+2014-08-01 Richard Biener <rguenther@suse.de>
6208
+ PR tree-optimization/61964
6209
+ * gcc.dg/torture/pr61964.c: New testcase.
6210
+ * gcc.dg/pr51879-18.c: XFAIL.
6212
+2014-07-28 Richard Biener <rguenther@suse.de>
6214
+ PR rtl-optimization/61801
6215
+ * gcc.target/i386/pr61801.c: Fix testcase.
6217
+2014-07-28 Richard Biener <rguenther@suse.de>
6219
+ PR rtl-optimization/61801
6220
+ * gcc.target/i386/pr61801.c: New testcase.
6222
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6224
+ Backport from mainline:
6225
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6227
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
6229
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
6230
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
6231
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
6232
+ * gcc.c-torture/execute/pr23135.x: Likewise.
6234
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6236
+ Backport from mainline:
6237
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6239
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
6241
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6243
+ Backport from mainline:
6244
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6246
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
6248
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6250
+ Backport from mainline:
6251
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6253
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
6255
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
6257
+ * gcc.dg/stack-usage-2.c: Adjust.
6259
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
6261
+ Backport from trunk.
6263
+ * gfortran.dg/dependency_44.f90 : New test
6265
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
6267
+ * gnat.dg/opt39.adb: New test.
6269
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
6273
+ * gfortran.dg/allocatable_function_8.f90 : New test
6275
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
6277
+ PR tree-optimization/61684
6278
+ * gcc.c-torture/compile/pr61684.c: New test.
6280
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
6281
+ Fritz Reese <Reese-Fritz@zai.com>
6283
+ * gfortran.dg/oldstyle_5.f: New test.
6285
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
6287
+ Backport from mainline
6288
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
6290
+ PR tree-optimization/61306
6291
+ * gcc.c-torture/execute/pr61306-1.c: New test.
6292
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
6293
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
6295
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6297
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
6299
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
6301
+ Backport from mainline
6302
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
6305
+ * gcc.target/alpha/pr61586.c: New test.
6307
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6309
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
6310
+ powerpc*-*-linux*.
6312
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
6314
+ Backport from mainline
6315
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
6317
+ PR rtl-optimization/61094
6318
+ PR rtl-optimization/61446
6319
+ * gcc.target/i386/pr61446.c : New.
6321
+ Backport from mainline
6322
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
6325
+ * gcc.target/i386/pr61423.c: New test.
6327
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
6329
+ Backport from mainline
6332
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
6333
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
6334
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
6335
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
6337
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6339
+ Backport from trunk.
6341
+ * gfortran.dg/cray_pointers_10.f90: New file.
6343
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6345
+ Backport from mainline
6347
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6349
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
6350
+ * gcc.target/powerpc/pack02.c: Use it.
6351
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
6353
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
6355
+ Backport from 2014-06-12 trunk r211491
6358
+ * gcc.target/avr/torture/pr61443.c: New test.
6360
+2014-06-04 Richard Biener <rguenther@suse.de>
6362
+ PR tree-optimization/61383
6363
+ * gcc.dg/torture/pr61383-1.c: New testcase.
6365
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6367
+ Backport from mainline
6368
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6370
+ PR rtl-optimization/60866
6371
+ * gcc.dg/pr60866.c: New test.
6373
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6375
+ Backport from mainline
6376
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6378
+ PR rtl-optimization/60901
6379
+ * gcc.target/i386/pr60901.c: New test.
6381
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
6383
+ Backport from mainline
6384
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6386
+ * gnat.dg/overflow_fixed.adb: New test.
6388
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6390
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
6392
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6394
+ Backport from mainline
6395
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6397
+ * gcc.target/powerpc/htm-ttest.c: New test.
6399
2014-05-22 Release Manager
6401
* GCC 4.8.3 released.
6402
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
6403
===================================================================
6404
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release)
6405
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch)
6407
+// I think this dynamic_cast has undefined behavior when destroying E::o
6408
+// because we're the F period of destruction has started and ap doesn't
6409
+// point to the object currently being destroyed--but the reasonable
6410
+// options are success or failure, not SEGV.
6414
+extern "C" void abort();
6416
+struct A { virtual ~A(); };
6417
+struct B { virtual ~B() { } };
6418
+struct C : B, A { };
6419
+struct E : virtual B { A o; };
6420
+struct F : virtual C, virtual E { };
6426
+ C* cp2 = dynamic_cast<C*>(ap);
6427
+ if (cp2 != cp && cp2 != 0)
6435
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
6436
===================================================================
6437
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release)
6438
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch)
6440
/* { dg-do compile { target powerpc*-*-* } } */
6441
/* { dg-require-effective-target powerpc_altivec_ok } */
6442
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
6443
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
6445
/* This test checks if AltiVec builtins accept const-qualified
6447
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
6448
===================================================================
6449
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
6450
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
6453
+// { dg-options "-std=gnu++11" }
6459
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
6460
+ decltype(({ int y = x; y; })+0) v1 = 0;
6462
Index: gcc/testsuite/g++.dg/expr/cond12.C
6463
===================================================================
6464
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release)
6465
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch)
6471
+ X& operator=(const X&){}
6472
+ X& operator=(X&){__builtin_abort();}
6475
+int main(int argv,char**) {
6477
+ ((argv > 2) ? a : b) = X();
6479
Index: gcc/testsuite/g++.dg/init/const9.C
6480
===================================================================
6481
--- a/src/gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release)
6482
+++ b/src/gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch)
6485
-// { dg-final { scan-assembler-not "rodata" } }
6486
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
6490
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
6491
===================================================================
6492
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../tags/gcc_4_8_3_release)
6493
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../branches/gcc-4_8-branch)
6495
+/* { dg-do run } */
6496
+/* { dg-options "-O2" } */
6500
+std::string __attribute__ ((noinline)) comp_test_write() {
6503
+ for (int i = 0; i < 2; ++i) {
6504
+ char b = 1 >> (i * 8);
6505
+ data.append(&b, 1);
6511
+std::string __attribute__ ((noinline)) comp_test_write_good() {
6515
+ for (int i = 0; i < 2; ++i) {
6517
+ data.append(&b, 1);
6524
+ std::string good = comp_test_write_good();
6525
+ std::string bad = comp_test_write();
6528
+ __builtin_abort ();
6530
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
6531
===================================================================
6532
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release)
6533
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch)
6537
+// { dg-do run { target c++11 } }
6538
+// { dg-add-options tls }
6539
+// { dg-require-effective-target tls_runtime }
6543
+template <typename> struct A
6545
+ static thread_local int s;
6550
+int f() { return 42; }
6551
+template <typename T> thread_local int A<T>::s = f();
6556
+ __builtin_abort();
6558
Index: gcc/testsuite/g++.dg/parse/typename7.C
6559
===================================================================
6560
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release)
6561
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch)
6566
- template<typename> void foo(int); // { dg-message "note" }
6567
- template<typename T> void bar(T t) { // { dg-message "note" }
6568
+ template<typename> void foo(int);
6569
+ template<typename T> void bar(T t) {
6570
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6571
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
6572
template<typename T> void bad(T t) {
6573
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6578
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6579
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
6581
B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
6583
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
6584
===================================================================
6585
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release)
6586
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch)
6588
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
6589
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
6590
// { dg-prune-output "array bound" }
6591
Index: gcc/testsuite/g++.dg/parse/ambig7.C
6592
===================================================================
6593
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release)
6594
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch)
6600
+ Helper(int a, void (*pfunc)());
6603
+template <int I> void function();
6608
+Helper testOk(A, function<A>);
6609
+Helper testOk2(int(A), function<B>);
6610
+Helper testOk3((int(A)), function<A>);
6611
+Helper testFail(int(A), function<A>);
6612
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
6613
===================================================================
6614
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release)
6615
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch)
6617
# This must be done after the compat-use-*-compiler definitions.
6620
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
6621
+load_lib g++-dg.exp
6625
# Save variables for the C++ compiler under test, which each test will
6626
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
6627
===================================================================
6628
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release)
6629
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch)
6631
/* Structure layout test generator.
6632
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
6633
+ Copyright (C) 2004-2014
6634
Free Software Foundation, Inc.
6635
Contributed by Jakub Jelinek <jakub@redhat.com>.
6640
const char *dg_options[] = {
6641
-"/* { dg-options \"%s-I%s\" } */\n",
6642
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
6643
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
6644
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
6645
"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
6646
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
6647
===================================================================
6648
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
6649
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
6652
+// { dg-do compile { target c++11 } }
6654
+template <class Coord> struct BasePoint
6657
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
6659
+template <class T> struct BaseCoord
6662
+ constexpr BaseCoord (T) : value (1) {}
6664
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
6666
+ typedef BaseCoord Super;
6667
+ constexpr IntCoordTyped (int) : Super (0) {}
6669
+template <class units>
6670
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
6672
+ typedef BasePoint<IntCoordTyped<units> > Super;
6673
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
6678
+IntPointTyped<A> a (0, 0);
6679
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
6680
===================================================================
6681
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release)
6682
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch)
6685
+// { dg-options "-std=c++11 -Wall" }
6690
+ return [&]() -> int {int __t; __t = t; return __t; }();
6691
+ return [&t]() -> int {int __t; __t = t; return __t; }();
6693
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
6694
===================================================================
6695
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
6696
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
6699
+// { dg-do compile { target c++11 } }
6703
+template <typename>
6705
+ typedef const char* name;
6708
+template <typename VT, typename... Fields>
6709
+void New(const char* name,
6710
+ typename Fixed<Fields>::name... field_names);
6712
+template <typename VT, typename... Fields>
6713
+void CreateMetric(const char* name,
6714
+ typename Fixed<Fields>::name... field_names,
6720
+ CreateMetric<int, const char*>("abcd", "def", Base());
6722
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
6723
===================================================================
6724
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release)
6725
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch)
6728
+// { dg-do compile { target c++11 } }
6730
+template <typename T>
6732
+ static constexpr int value = int(T{});
6734
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
6735
===================================================================
6736
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
6737
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
6740
+// { dg-do compile { target c++11 } }
6742
+template <typename _CharT> class A;
6743
+template <typename> class B;
6744
+template <class charT> class C;
6745
+template <> class C<char>
6747
+ virtual void xparse (int &, const B<A<char> > &) const;
6749
+template <class T, class charT = char> class G : C<charT>
6753
+ void default_value (const T &);
6754
+ void xparse (int &, const B<A<charT> > &) const;
6756
+template <class T, class charT>
6757
+void validate (int &, const B<A<charT> > &, T *, int);
6758
+template <class T, class charT>
6759
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
6761
+ validate (p1, p2, (T *)0, 0);
6763
+template <class T> G<T> *value (T *) { return new G<T>(0); }
6766
+template <typename T> struct D;
6767
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
6768
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
6770
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
6772
+ typedef _Scalar Scalar;
6774
+template <typename, int, int, int, int, int _MaxCols> class F
6777
+ typedef typename Eigen::D<F>::Scalar Scalar;
6778
+ F (const Scalar &, const Scalar &, const Scalar &);
6780
+template <class... T>
6781
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
6783
+int main (int, char *[])
6785
+ Eigen::F<double, 3, 1> a (0, 0, 0);
6786
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
6788
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
6789
===================================================================
6790
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
6791
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
6794
+// { dg-do compile { target c++11 } }
6797
+ X& operator=(const X&) = delete;
6798
+ X& operator=(X&& ) = default;
6803
+ *(t ? &a : &b) = X();
6804
+ (t ? a : b) = X();
6806
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
6807
===================================================================
6808
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release)
6809
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch)
6812
+// { dg-options "-std=c++11" }
6816
+void f(X&&); // { dg-message "void f" }
6820
+ operator const X&() const;
6826
+ f(w); // { dg-error "lvalue" }
6828
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
6829
===================================================================
6830
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../tags/gcc_4_8_3_release)
6831
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../branches/gcc-4_8-branch)
6835
+// { dg-options "-O2 -fdump-ipa-pure-const" }
6836
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
6837
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
6838
+// { dg-final { cleanup-ipa-dump "pure-const" } }
6840
+__attribute__((noinline, noclone)) static void bar (int);
6843
+struct S { S () { v++; } ~S () { v++; } };
6845
+__attribute__((noinline, noclone)) static void
6853
+__attribute__((noinline, noclone)) static void
6863
+__attribute__((noinline, noclone)) int
6880
+ asm volatile ("" : : : "memory");
6889
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
6890
===================================================================
6891
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release)
6892
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch)
6894
+/* { dg-do run } */
6895
+/* { dg-options "-O3 -std=c++11" } */
6898
+extern "C" int printf(const char *fmt, ...);
6899
+extern "C" void abort(void);
6902
+ enum _Value { Left, Right, Invalid };
6904
+ constexpr Side() : _value(Invalid) {}
6905
+ constexpr Side(_Value value) : _value(value) {}
6906
+ operator _Value() const { return (_Value)_value; }
6914
+ void adjust(Side side, bool final);
6915
+ void move(Side side);
6920
+ adjust(Side::Invalid, false);
6923
+static void __attribute__((noinline))
6924
+check (int v, int final)
6931
+__attribute__((noinline))
6932
+void A::adjust(Side side, bool final)
6934
+ check ((int)side, final);
6937
+void A::move(Side side)
6939
+ adjust(side, false);
6940
+ adjust(side, true);
6946
+ t.move(Side::Left);
6949
Index: gcc/testsuite/g++.dg/template/local-fn1.C
6950
===================================================================
6951
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
6952
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
6956
+template <typename T = int>
6962
Index: gcc/testsuite/g++.dg/template/conv14.C
6963
===================================================================
6964
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
6965
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
6971
+template<typename Container, typename Key>
6974
+template<typename Container, typename Key, typename KeyStore = Key>
6980
+ Variant(Container st, const Key& i) : index(i), state(st) {}
6982
+ template<typename T>
6983
+ operator T() const {
6984
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
6988
+class AutoCleanVariant : public Variant<XX*, int> {
6990
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
6992
+ template<typename T>
6993
+ operator T() const {
6994
+ return Variant<XX*, int>::operator T();
6997
Index: gcc/testsuite/g++.dg/template/friend55.C
6998
===================================================================
6999
--- a/src/gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release)
7000
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch)
7004
+template <int I> struct A;
7005
+template <int I> class B {
7007
+ template <int A_S> friend void A<A_S>::impl();
7011
+template<int I>struct A { void impl(); };
7014
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
7020
Index: gcc/testsuite/g++.dg/template/memclass5.C
7021
===================================================================
7022
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release)
7023
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch)
7027
+template <typename T>
7030
+ template <typename U>
7033
+ typedef T result2;
7036
+ typedef y<int> zy;
7043
+ typedef double result2;
7048
+ x<int>::zy::result2 xxx;
7049
+ x<int>::y<int>::result2 xxx2;
7051
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
7052
===================================================================
7053
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
7054
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
7062
+ int foo(int X::* ptr);
7064
+ template <int X::* ptr>
7068
+int X::foo(int X::* ptr) {
7069
+ int* p = &(this->*ptr); // OK.
7073
+template <int X::* ptr>
7075
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
7078
Index: gcc/cp/tree.c
7079
===================================================================
7080
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
7081
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
7084
return lvalue_kind (TREE_OPERAND (ref, 0));
7087
+ case DOTSTAR_EXPR:
7088
+ if (TREE_CODE (ref) == MEMBER_REF)
7089
+ op1_lvalue_kind = clk_ordinary;
7091
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
7092
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
7093
+ op1_lvalue_kind = clk_none;
7094
+ return op1_lvalue_kind;
7097
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
7098
/* Look at the member designator. */
7099
@@ -3738,6 +3748,10 @@
7101
init_expr = get_target_expr (exp);
7102
exp = TARGET_EXPR_SLOT (init_expr);
7103
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
7106
+ exp = rvalue (exp);
7110
Index: gcc/cp/ChangeLog
7111
===================================================================
7112
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
7113
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
7115
+2014-10-15 Jason Merrill <jason@redhat.com>
7119
+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
7120
+ committed to this tentative parse.
7123
+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
7124
+ (iterative_hash_template_arg): Likewise.
7127
+ * semantics.c (finish_member_declaration): Don't push closure
7131
+ * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
7132
+ * semantics.c (finish_id_expression): Don't call TLS wrapper in a
7135
+2014-08-07 Jason Merrill <jason@redhat.com>
7138
+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
7141
+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
7143
+2014-01-27 Jason Merrill <jason@redhat.com>
7147
+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
7148
+ list-initialization. A conversion to rvalue ref that involves
7149
+ an lvalue-rvalue conversion is bad.
7150
+ (convert_like_real): Give helpful error message.
7152
+2014-01-29 Jason Merrill <jason@redhat.com>
7155
+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
7156
+ have a friend template in a class template.
7157
+ * pt.c (tsubst_friend_function): Look through it.
7158
+ (push_template_decl_real): A friend member template is
7161
+2014-02-21 Jason Merrill <jason@redhat.com>
7164
+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
7165
+ of the partial instantiation, not the most general template.
7166
+ (maybe_process_partial_specialization): Reassign everything on
7169
+2014-03-05 Jason Merrill <jason@redhat.com>
7172
+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
7173
+ if re-parsing might succeed.
7174
+ * semantics.c (finish_id_expression): Use of a parameter outside
7175
+ the function body is a parse error.
7177
+2014-06-30 Jason Merrill <jason@redhat.com>
7180
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
7183
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
7184
+ deduction failure.
7187
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
7189
+2014-06-17 Jason Merrill <jason@redhat.com>
7192
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
7194
+2014-06-02 Jason Merrill <jason@redhat.com>
7197
+ * pt.c (pack_deducible_p): Handle canonicalization.
7199
2014-05-22 Release Manager
7201
* GCC 4.8.3 released.
7203
===================================================================
7204
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
7205
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
7206
@@ -907,11 +907,13 @@
7207
t; t = TREE_CHAIN (t))
7209
tree inst = TREE_VALUE (t);
7210
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
7211
+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
7212
+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
7214
/* We already have a full specialization of this partial
7215
- instantiation. Reassign it to the new member
7216
- specialization template. */
7217
+ instantiation, or a full specialization has been
7218
+ looked up but not instantiated. Reassign it to the
7219
+ new member specialization template. */
7227
- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
7229
/* But if we've had an implicit instantiation, that's a
7230
problem ([temp.expl.spec]/6). */
7231
error ("specialization %qT after instantiation %qT",
7232
@@ -1569,6 +1571,7 @@
7236
+ iterative_hash_template_arg (TREE_TYPE (arg), val);
7237
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
7239
val = iterative_hash_template_arg (field, val);
7240
@@ -4308,7 +4311,8 @@
7241
in the template-parameter-list of the definition of a member of a
7244
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
7245
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
7246
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
7247
/* You can't have a function template declaration in a local
7248
scope, nor you can you define a member of a class template in a
7250
@@ -4572,7 +4576,8 @@
7251
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
7253
/* See if this is a primary template. */
7254
- if (is_friend && ctx)
7255
+ if (is_friend && ctx
7256
+ && uses_template_parms_level (ctx, processing_template_decl))
7257
/* A friend template that specifies a class context, i.e.
7258
template <typename T> friend void A<T>::f();
7260
@@ -7454,7 +7459,7 @@
7263
/* Let's consider the explicit specialization of a member
7264
- of a class template specialization that is implicitely instantiated,
7265
+ of a class template specialization that is implicitly instantiated,
7269
@@ -7552,9 +7557,9 @@
7271
/* Note this use of the partial instantiation so we can check it
7272
later in maybe_process_partial_specialization. */
7273
- DECL_TEMPLATE_INSTANTIATIONS (templ)
7274
+ DECL_TEMPLATE_INSTANTIATIONS (found)
7275
= tree_cons (arglist, t,
7276
- DECL_TEMPLATE_INSTANTIATIONS (templ));
7277
+ DECL_TEMPLATE_INSTANTIATIONS (found));
7279
if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
7280
/* Now that the type has been registered on the instantiations
7281
@@ -8289,10 +8294,17 @@
7283
if (COMPLETE_TYPE_P (context))
7285
+ tree fn = new_friend;
7286
+ /* do_friend adds the TEMPLATE_DECL for any member friend
7287
+ template even if it isn't a member template, i.e.
7288
+ template <class T> friend A<T>::f();
7289
+ Look through it in that case. */
7290
+ if (TREE_CODE (fn) == TEMPLATE_DECL
7291
+ && !PRIMARY_TEMPLATE_P (fn))
7292
+ fn = DECL_TEMPLATE_RESULT (fn);
7293
/* Check to see that the declaration is really present, and,
7294
possibly obtain an improved declaration. */
7295
- tree fn = check_classfn (context,
7296
- new_friend, NULL_TREE);
7297
+ fn = check_classfn (context, fn, NULL_TREE);
7301
@@ -14488,6 +14500,16 @@
7304
tree r = tsubst_copy (t, args, complain, in_decl);
7305
+ if (TREE_CODE (r) == VAR_DECL
7306
+ && !processing_template_decl
7307
+ && !cp_unevaluated_operand
7308
+ && DECL_THREAD_LOCAL_P (r))
7310
+ if (tree wrap = get_tls_wrapper_fn (r))
7311
+ /* Replace an evaluated use of the thread_local variable with
7312
+ a call to its wrapper. */
7313
+ r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
7316
if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
7317
/* If the original type was a reference, we'll be wrapped in
7318
@@ -14934,7 +14956,7 @@
7320
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
7321
packs; packs = TREE_CHAIN (packs))
7322
- if (TREE_VALUE (packs) == parm)
7323
+ if (template_args_equal (TREE_VALUE (packs), parm))
7325
/* The template parameter pack is used in a function parameter
7326
pack. If this is the end of the parameter list, the
7327
@@ -15502,8 +15524,9 @@
7328
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
7331
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7332
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
7333
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7334
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
7335
+ return unify_template_argument_mismatch (explain_p, parm, arg);
7337
/* For deduction from an init-list we need the actual list. */
7338
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
7339
@@ -19804,6 +19827,8 @@
7343
+ if (dependent_type_p (TREE_TYPE (expression)))
7345
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
7346
if (value_dependent_expression_p (val))
7348
@@ -20009,7 +20034,12 @@
7351
if (BASELINK_P (expression))
7352
- expression = BASELINK_FUNCTIONS (expression);
7354
+ if (BASELINK_OPTYPE (expression)
7355
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
7357
+ expression = BASELINK_FUNCTIONS (expression);
7360
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
7362
Index: gcc/cp/semantics.c
7363
===================================================================
7364
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_3_release)
7365
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
7366
@@ -2735,8 +2735,10 @@
7370
- /* Enter the DECL into the scope of the class. */
7371
- else if (pushdecl_class_level (decl))
7372
+ /* Enter the DECL into the scope of the class, if the class
7373
+ isn't a closure (whose fields are supposed to be unnamed). */
7374
+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
7375
+ || pushdecl_class_level (decl))
7377
if (TREE_CODE (decl) == USING_DECL)
7379
@@ -3108,7 +3110,7 @@
7380
&& DECL_CONTEXT (decl) == NULL_TREE
7381
&& !cp_unevaluated_operand)
7383
- error ("use of parameter %qD outside function body", decl);
7384
+ *error_msg = "use of parameter outside function body";
7385
return error_mark_node;
7388
@@ -3343,6 +3345,7 @@
7390
if (TREE_CODE (decl) == VAR_DECL
7391
&& !cp_unevaluated_operand
7392
+ && !processing_template_decl
7393
&& DECL_THREAD_LOCAL_P (decl)
7394
&& (wrap = get_tls_wrapper_fn (decl)))
7396
@@ -7296,7 +7299,9 @@
7397
constructor_elt *inner = base_field_constructor_elt (n, ce->index);
7400
- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
7401
+ else if (ce->index
7402
+ && (TREE_CODE (ce->index) == NOP_EXPR
7403
+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
7405
/* This is an initializer for an empty base; now that we've
7406
checked that it's constant, we can ignore it. */
7407
Index: gcc/cp/parser.c
7408
===================================================================
7409
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_3_release)
7410
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
7411
@@ -12831,7 +12831,12 @@
7412
the effort required to do the parse, nor will we issue duplicate
7413
error messages about problems during instantiation of the
7417
+ /* Don't do this if we had a parse error in a declarator; re-parsing
7418
+ might succeed if a name changes meaning (60361). */
7419
+ && !(cp_parser_error_occurred (parser)
7420
+ && cp_parser_parsing_tentatively (parser)
7421
+ && parser->in_declarator_p))
7423
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
7425
@@ -23774,8 +23779,6 @@
7427
cp_parser_abort_tentative_parse (cp_parser* parser)
7429
- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
7430
- || errorcount > 0);
7431
cp_parser_simulate_error (parser);
7432
/* Now, pretend that we want to see if the construct was
7433
successfully parsed. */
7434
Index: gcc/cp/call.c
7435
===================================================================
7436
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
7437
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
7438
@@ -1464,7 +1464,7 @@
7440
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
7441
conv = implicit_conversion (to, from, expr, c_cast_p,
7443
+ flags|LOOKUP_NO_TEMP_BIND, complain);
7444
if (!CLASS_TYPE_P (to)
7445
&& CONSTRUCTOR_NELTS (expr) == 1)
7447
@@ -1624,9 +1624,9 @@
7451
- Otherwise, the reference shall be to a non-volatile const type.
7453
- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
7454
+ Otherwise, the reference shall be an lvalue reference to a
7455
+ non-volatile const type, or the reference shall be an rvalue
7457
if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
7460
@@ -1664,7 +1664,16 @@
7461
/* This reference binding, unlike those above, requires the
7462
creation of a temporary. */
7463
conv->need_temporary_p = true;
7464
- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
7465
+ if (TYPE_REF_IS_RVALUE (rto))
7467
+ conv->rvaluedness_matches_p = 1;
7468
+ /* In the second case, if the reference is an rvalue reference and
7469
+ the second standard conversion sequence of the user-defined
7470
+ conversion sequence includes an lvalue-to-rvalue conversion, the
7471
+ program is ill-formed. */
7472
+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
7478
@@ -5811,7 +5820,7 @@
7479
&& convs->kind != ck_list
7480
&& convs->kind != ck_ambig
7481
&& (convs->kind != ck_ref_bind
7482
- || convs->user_conv_p)
7483
+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
7484
&& (convs->kind != ck_rvalue
7485
|| SCALAR_TYPE_P (totype))
7486
&& convs->kind != ck_base)
7487
@@ -6110,7 +6119,8 @@
7488
if (convs->bad_p && !next_conversion (convs)->bad_p)
7490
gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
7491
- && real_lvalue_p (expr));
7492
+ && (real_lvalue_p (expr)
7493
+ || next_conversion(convs)->kind == ck_rvalue));
7495
error_at (loc, "cannot bind %qT lvalue to %qT",
7496
TREE_TYPE (expr), totype);
7497
Index: gcc/cp/friend.c
7498
===================================================================
7499
--- a/src/gcc/cp/friend.c (.../tags/gcc_4_8_3_release)
7500
+++ b/src/gcc/cp/friend.c (.../branches/gcc-4_8-branch)
7501
@@ -502,7 +502,13 @@
7502
? current_template_parms
7505
- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
7506
+ if ((template_member_p
7507
+ /* Always pull out the TEMPLATE_DECL if we have a friend
7508
+ template in a class template so that it gets tsubsted
7509
+ properly later on (59956). tsubst_friend_function knows
7510
+ how to tell this apart from a member template. */
7511
+ || (class_template_depth && friend_depth))
7512
+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
7513
decl = DECL_TI_TEMPLATE (decl);
7516
Index: gcc/haifa-sched.c
7517
===================================================================
7518
--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_8_3_release)
7519
+++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_8-branch)
7520
@@ -2931,7 +2931,7 @@
7522
advance_state (curr_state);
7523
if (sched_verbose >= 6)
7524
- fprintf (sched_dump, ";;\tAdvanced a state.\n");
7525
+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
7528
/* Update register pressure after scheduling INSN. */
7529
@@ -5964,6 +5964,7 @@
7530
modulo_insns_scheduled = 0;
7532
ls.modulo_epilogue = false;
7533
+ ls.first_cycle_insn_p = true;
7535
/* Loop until all the insns in BB are scheduled. */
7536
while ((*current_sched_info->schedule_more_p) ())
7537
@@ -6034,7 +6035,6 @@
7541
- ls.first_cycle_insn_p = true;
7542
ls.shadows_only_p = false;
7543
cycle_issued_insns = 0;
7544
ls.can_issue_more = issue_rate;
7545
@@ -6321,11 +6321,13 @@
7549
+ ls.first_cycle_insn_p = true;
7551
if (ls.modulo_epilogue)
7554
- advance_one_cycle ();
7555
+ if (!ls.first_cycle_insn_p)
7556
+ advance_one_cycle ();
7557
perform_replacements_new_cycle ();
7560
Index: gcc/double-int.c
7561
===================================================================
7562
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
7563
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
7565
== (unsigned HOST_WIDE_INT) htwice)
7566
&& (labs_den <= ltwice)))
7570
/* quo = quo - 1; */
7571
add_double (*lquo, *hquo,
7572
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
7573
Index: gcc/ipa-pure-const.c
7574
===================================================================
7575
--- a/src/gcc/ipa-pure-const.c (.../tags/gcc_4_8_3_release)
7576
+++ b/src/gcc/ipa-pure-const.c (.../branches/gcc-4_8-branch)
7577
@@ -1429,7 +1429,7 @@
7578
else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
7581
- for (ie = node->indirect_calls; ie; ie = ie->next_callee)
7582
+ for (ie = w->indirect_calls; ie; ie = ie->next_callee)
7583
if (ie->can_throw_external)
7585
w_info = (struct ipa_dfs_info *) w->symbol.aux;
7586
Index: gcc/tree-ssa-math-opts.c
7587
===================================================================
7588
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
7589
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
7590
@@ -1537,7 +1537,7 @@
7592
struct symbolic_number {
7593
unsigned HOST_WIDEST_INT n;
7598
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
7599
@@ -1549,13 +1549,15 @@
7600
struct symbolic_number *n,
7603
+ int bitsize = TYPE_PRECISION (n->type);
7608
/* Zero out the extra bits of N in order to avoid them being shifted
7609
into the significant bits. */
7610
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
7611
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
7612
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7613
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7617
@@ -1563,20 +1565,24 @@
7621
+ /* Arithmetic shift of signed type: result is dependent on the value. */
7622
+ if (!TYPE_UNSIGNED (n->type)
7623
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
7628
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
7629
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
7632
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
7633
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
7638
/* Zero unused bits for size. */
7639
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
7640
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
7641
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7642
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7646
@@ -1593,7 +1599,7 @@
7647
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
7650
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
7651
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
7655
@@ -1650,20 +1656,25 @@
7656
to initialize the symbolic number. */
7661
/* Set up the symbolic number N by setting each byte to a
7662
value between 1 and the byte size of rhs1. The highest
7663
order byte is set to n->size and the lowest order
7665
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
7666
- if (n->size % BITS_PER_UNIT != 0)
7667
+ n->type = TREE_TYPE (rhs1);
7668
+ size = TYPE_PRECISION (n->type);
7669
+ if (size % BITS_PER_UNIT != 0)
7671
- n->size /= BITS_PER_UNIT;
7672
+ if (size > HOST_BITS_PER_WIDEST_INT)
7674
+ size /= BITS_PER_UNIT;
7675
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
7676
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
7678
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
7679
+ if (size < (int)sizeof (HOST_WIDEST_INT))
7680
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
7681
- (n->size * BITS_PER_UNIT)) - 1;
7682
+ (size * BITS_PER_UNIT)) - 1;
7684
source_expr1 = rhs1;
7686
@@ -1672,12 +1683,12 @@
7691
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
7692
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
7693
unsigned HOST_WIDEST_INT tmp = val;
7695
/* Only constants masking full bytes are allowed. */
7696
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
7697
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
7698
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
7701
@@ -1693,12 +1704,24 @@
7706
+ int type_size, old_type_size;
7709
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
7710
+ type = gimple_expr_type (stmt);
7711
+ type_size = TYPE_PRECISION (type);
7712
if (type_size % BITS_PER_UNIT != 0)
7714
+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
7717
+ /* Sign extension: result is dependent on the value. */
7718
+ old_type_size = TYPE_PRECISION (n->type);
7719
+ if (!TYPE_UNSIGNED (n->type)
7720
+ && type_size > old_type_size
7722
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
7725
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
7727
/* If STMT casts to a smaller type mask out the bits not
7728
@@ -1705,7 +1728,7 @@
7729
belonging to the target type. */
7730
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
7732
- n->size = type_size / BITS_PER_UNIT;
7737
@@ -1718,7 +1741,7 @@
7739
if (rhs_class == GIMPLE_BINARY_RHS)
7743
struct symbolic_number n1, n2;
7744
unsigned HOST_WIDEST_INT mask;
7746
@@ -1742,11 +1765,12 @@
7747
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
7749
if (source_expr1 != source_expr2
7750
- || n1.size != n2.size)
7751
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
7754
- n->size = n1.size;
7755
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
7756
+ n->type = n1.type;
7757
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
7758
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
7760
unsigned HOST_WIDEST_INT masked1, masked2;
7762
@@ -1785,7 +1809,7 @@
7764
struct symbolic_number n;
7767
+ int limit, bitsize;
7769
/* The last parameter determines the depth search limit. It usually
7770
correlates directly to the number of bytes to be touched. We
7771
@@ -1800,13 +1824,14 @@
7774
/* Zero out the extra bits of N and CMP. */
7775
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
7776
+ bitsize = TYPE_PRECISION (n.type);
7777
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
7779
unsigned HOST_WIDEST_INT mask =
7780
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
7781
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
7784
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
7785
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
7788
/* A complete byte swap should make the symbolic number to start
7789
@@ -1828,7 +1853,7 @@
7790
bool changed = false;
7791
tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
7793
- if (BITS_PER_UNIT != 8)
7794
+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
7797
if (sizeof (HOST_WIDEST_INT) < 8)
7798
Index: gcc/tree-nrv.c
7799
===================================================================
7800
--- a/src/gcc/tree-nrv.c (.../tags/gcc_4_8_3_release)
7801
+++ b/src/gcc/tree-nrv.c (.../branches/gcc-4_8-branch)
7803
same type and alignment as the function's result. */
7804
if (TREE_CODE (found) != VAR_DECL
7805
|| TREE_THIS_VOLATILE (found)
7806
- || DECL_CONTEXT (found) != current_function_decl
7807
- || TREE_STATIC (found)
7808
+ || !auto_var_in_fn_p (found, current_function_decl)
7809
|| TREE_ADDRESSABLE (found)
7810
|| DECL_ALIGN (found) > DECL_ALIGN (result)
7811
|| !useless_type_conversion_p (result_type,
7813
===================================================================
7814
--- a/src/gcc/ifcvt.c (.../tags/gcc_4_8_3_release)
7815
+++ b/src/gcc/ifcvt.c (.../branches/gcc-4_8-branch)
7816
@@ -294,6 +294,28 @@
7818
return (e) ? e->dest : NULL_BLOCK;
7821
+/* Return true if RTXs A and B can be safely interchanged. */
7824
+rtx_interchangeable_p (const_rtx a, const_rtx b)
7826
+ if (!rtx_equal_p (a, b))
7829
+ if (GET_CODE (a) != MEM)
7832
+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
7833
+ reference is not. Interchanging a dead type-unsafe memory reference with
7834
+ a live type-safe one creates a live type-unsafe memory reference, in other
7835
+ words, it makes the program illegal.
7836
+ We check here conservatively whether the two memory references have equal
7837
+ memory attributes. */
7839
+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
7843
/* Go through a bunch of insns, converting them to conditional
7844
execution format if possible. Return TRUE if all of the non-note
7845
@@ -1014,6 +1036,9 @@
7846
|| (rtx_equal_p (if_info->a, XEXP (cond, 1))
7847
&& rtx_equal_p (if_info->b, XEXP (cond, 0))))
7849
+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
7852
y = (code == EQ) ? if_info->a : if_info->b;
7854
/* Avoid generating the move if the source is the destination. */
7855
@@ -2483,7 +2508,7 @@
7857
|| insn_b != last_active_insn (else_bb, FALSE)
7858
|| (set_b = single_set (insn_b)) == NULL_RTX
7859
- || ! rtx_equal_p (x, SET_DEST (set_b)))
7860
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
7864
@@ -2496,7 +2521,7 @@
7865
|| BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
7866
|| !NONJUMP_INSN_P (insn_b)
7867
|| (set_b = single_set (insn_b)) == NULL_RTX
7868
- || ! rtx_equal_p (x, SET_DEST (set_b))
7869
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
7870
|| ! noce_operand_ok (SET_SRC (set_b))
7871
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
7872
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
7873
@@ -2562,7 +2587,7 @@
7875
/* Look and see if A and B are really the same. Avoid creating silly
7876
cmove constructs that no one will fix up later. */
7877
- if (rtx_equal_p (a, b))
7878
+ if (rtx_interchangeable_p (a, b))
7880
/* If we have an INSN_B, we don't have to create any new rtl. Just
7881
move the instruction that we already have. If we don't have an
7882
@@ -4246,6 +4271,9 @@
7883
old_dest = JUMP_LABEL (jump);
7884
if (other_bb != new_dest)
7886
+ if (!any_condjump_p (jump))
7889
if (JUMP_P (BB_END (dest_edge->src)))
7890
new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
7891
else if (new_dest == EXIT_BLOCK_PTR)
7892
Index: gcc/dwarf2out.c
7893
===================================================================
7894
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_3_release)
7895
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
7896
@@ -12234,7 +12234,7 @@
7897
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
7898
VAR_INIT_STATUS_INITIALIZED);
7902
add_loc_descr (&mem_loc_result, op1);
7903
add_loc_descr (&mem_loc_result,
7904
new_loc_descr (DW_OP_plus, 0, 0));
7905
@@ -13882,6 +13882,10 @@
7909
+ case TARGET_MEM_REF:
7914
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
7917
===================================================================
7918
--- a/src/gcc/expr.c (.../tags/gcc_4_8_3_release)
7919
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
7920
@@ -10603,7 +10603,7 @@
7921
|| !host_integerp (TREE_OPERAND (offset, 1), 1)
7922
|| compare_tree_int (TREE_OPERAND (offset, 1),
7923
BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
7924
- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
7925
+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
7928
/* Look at the first operand of BIT_AND_EXPR and strip any conversion.
7929
Index: gcc/ada/socket.c
7930
===================================================================
7931
--- a/src/gcc/ada/socket.c (.../tags/gcc_4_8_3_release)
7932
+++ b/src/gcc/ada/socket.c (.../branches/gcc-4_8-branch)
7937
-#if defined(__linux__) || defined(__GLIBC__)
7938
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
7939
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
7941
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
7942
Index: gcc/ada/uintp.adb
7943
===================================================================
7944
--- a/src/gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release)
7945
+++ b/src/gcc/ada/uintp.adb (.../branches/gcc-4_8-branch)
7946
@@ -171,22 +171,6 @@
7947
-- If Discard_Quotient is True, Quotient is set to No_Uint
7948
-- If Discard_Remainder is True, Remainder is set to No_Uint
7950
- function Vector_To_Uint
7951
- (In_Vec : UI_Vector;
7952
- Negative : Boolean) return Uint;
7953
- -- Functions that calculate values in UI_Vectors, call this function to
7954
- -- create and return the Uint value. In_Vec contains the multiple precision
7955
- -- (Base) representation of a non-negative value. Leading zeroes are
7956
- -- permitted. Negative is set if the desired result is the negative of the
7957
- -- given value. The result will be either the appropriate directly
7958
- -- represented value, or a table entry in the proper canonical format is
7959
- -- created and returned.
7961
- -- Note that Init_Operand puts a signed value in the result vector, but
7962
- -- Vector_To_Uint is always presented with a non-negative value. The
7963
- -- processing of signs is something that is done by the caller before
7964
- -- calling Vector_To_Uint.
7969
Index: gcc/ada/uintp.ads
7970
===================================================================
7971
--- a/src/gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release)
7972
+++ b/src/gcc/ada/uintp.ads (.../branches/gcc-4_8-branch)
7974
Uint_Minus_80 : constant Uint;
7975
Uint_Minus_128 : constant Uint;
7977
+ type UI_Vector is array (Pos range <>) of Int;
7978
+ -- Vector containing the integer values of a Uint value
7980
+ -- Note: An earlier version of this package used pointers of arrays of Ints
7981
+ -- (dynamically allocated) for the Uint type. The change leads to a few
7982
+ -- less natural idioms used throughout this code, but eliminates all uses
7983
+ -- of the heap except for the table package itself. For example, Uint
7984
+ -- parameters are often converted to UI_Vectors for internal manipulation.
7985
+ -- This is done by creating the local UI_Vector using the function N_Digits
7986
+ -- on the Uint to find the size needed for the vector, and then calling
7987
+ -- Init_Operand to copy the values out of the table into the vector.
7992
@@ -252,6 +264,22 @@
7993
-- function is used for capacity checks, and it can be one bit off
7994
-- without affecting its usage.
7996
+ function Vector_To_Uint
7997
+ (In_Vec : UI_Vector;
7998
+ Negative : Boolean) return Uint;
7999
+ -- Functions that calculate values in UI_Vectors, call this function to
8000
+ -- create and return the Uint value. In_Vec contains the multiple precision
8001
+ -- (Base) representation of a non-negative value. Leading zeroes are
8002
+ -- permitted. Negative is set if the desired result is the negative of the
8003
+ -- given value. The result will be either the appropriate directly
8004
+ -- represented value, or a table entry in the proper canonical format is
8005
+ -- created and returned.
8007
+ -- Note that Init_Operand puts a signed value in the result vector, but
8008
+ -- Vector_To_Uint is always presented with a non-negative value. The
8009
+ -- processing of signs is something that is done by the caller before
8010
+ -- calling Vector_To_Uint.
8012
---------------------
8013
-- Output Routines --
8014
---------------------
8015
@@ -494,18 +522,6 @@
8016
-- UI_Vector is defined for this purpose and some internal subprograms
8017
-- used for converting from one to the other are defined.
8019
- type UI_Vector is array (Pos range <>) of Int;
8020
- -- Vector containing the integer values of a Uint value
8022
- -- Note: An earlier version of this package used pointers of arrays of Ints
8023
- -- (dynamically allocated) for the Uint type. The change leads to a few
8024
- -- less natural idioms used throughout this code, but eliminates all uses
8025
- -- of the heap except for the table package itself. For example, Uint
8026
- -- parameters are often converted to UI_Vectors for internal manipulation.
8027
- -- This is done by creating the local UI_Vector using the function N_Digits
8028
- -- on the Uint to find the size needed for the vector, and then calling
8029
- -- Init_Operand to copy the values out of the table into the vector.
8031
type Uint_Entry is record
8033
-- Length of entry in Udigits table in digits (i.e. in words)
8034
Index: gcc/ada/ChangeLog
8035
===================================================================
8036
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release)
8037
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
8039
+2014-11-22 Eric Botcazou <ebotcazou@adacore.com>
8041
+ Backport from mainline
8042
+ 2014-11-20 Vincent Celier <celier@adacore.com>
8045
+ * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
8048
+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
8049
+ Alan Modra <amodra@gmail.com>
8052
+ * uintp.adb (Vector_To_Uint): Move from here to...
8053
+ * uintp.ads (UI_Vector): Make public.
8054
+ (Vector_To_Uint): ...here.
8056
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
8058
+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
8059
+ * gsocket.h Add include of <unistd.h> on RTEMS.
8061
+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
8063
+ * s-osinte-rtems.adb: Correct formatting of line in license block.
8065
2014-05-22 Release Manager
8067
* GCC 4.8.3 released.
8068
Index: gcc/ada/s-osinte-rtems.adb
8069
===================================================================
8070
--- a/src/gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release)
8071
+++ b/src/gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch)
8073
-- You should have received a copy of the GNU General Public License and --
8074
-- a copy of the GCC Runtime Library Exception along with this program; --
8075
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
8076
--- <http://www.gnu.org/licenses/>.
8077
+-- <http://www.gnu.org/licenses/>. --
8079
-- GNARL was developed by the GNARL team at Florida State University. It is --
8080
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
8081
Index: gcc/ada/gsocket.h
8082
===================================================================
8083
--- a/src/gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release)
8084
+++ b/src/gcc/ada/gsocket.h (.../branches/gcc-4_8-branch)
8085
@@ -183,6 +183,11 @@
8086
#include <sys/time.h>
8089
+#if defined(__rtems__)
8090
+#include <unistd.h>
8091
+/* Required, for read(), write(), and close() */
8095
* RTEMS has these .h files but not until you have built and installed RTEMS.
8096
* When building a C/C++ toolset, you also build the newlib C library, so the
8097
Index: gcc/ada/back_end.adb
8098
===================================================================
8099
--- a/src/gcc/ada/back_end.adb (.../tags/gcc_4_8_3_release)
8100
+++ b/src/gcc/ada/back_end.adb (.../branches/gcc-4_8-branch)
8101
@@ -209,9 +209,10 @@
8102
Last : constant Natural := Switch_Last (Switch_Chars);
8105
- -- Skip -o or internal GCC switches together with their argument
8106
+ -- Skip -o, -G or internal GCC switches together with their argument.
8108
if Switch_Chars (First .. Last) = "o"
8109
+ or else Switch_Chars (First .. Last) = "G"
8110
or else Is_Internal_GCC_Switch (Switch_Chars)
8112
Next_Arg := Next_Arg + 1;
8113
Index: gcc/tree-ssa-ifcombine.c
8114
===================================================================
8115
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
8116
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
8117
@@ -105,7 +105,11 @@
8119
gimple stmt = gsi_stmt (gsi);
8121
+ if (is_gimple_debug (stmt))
8124
if (gimple_has_side_effects (stmt)
8125
+ || gimple_could_trap_p (stmt)
8126
|| gimple_vuse (stmt))
8130
while (is_gimple_assign (stmt)
8131
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
8132
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
8133
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
8134
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
8135
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
8136
|| gimple_assign_ssa_name_copy_p (stmt)))
8137
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
8139
Index: gcc/sel-sched-ir.c
8140
===================================================================
8141
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
8142
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
8144
static void free_av_set (basic_block);
8145
static void invalidate_av_set (basic_block);
8146
static void extend_insn_data (void);
8147
-static void sel_init_new_insn (insn_t, int);
8148
+static void sel_init_new_insn (insn_t, int, int = -1);
8149
static void finish_insns (void);
8151
/* Various list functions. */
8152
@@ -4011,9 +4011,10 @@
8156
-/* Compute seqno for INSN by its preds or succs. */
8157
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
8158
+ seqno in corner cases. */
8160
-get_seqno_for_a_jump (insn_t insn)
8161
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
8165
@@ -4069,8 +4070,16 @@
8167
seqno = get_seqno_by_succs (insn);
8171
+ /* The only case where this could be here legally is that the only
8172
+ unscheduled insn was a conditional jump that got removed and turned
8173
+ into this unconditional one. Initialize from the old seqno
8174
+ of that jump passed down to here. */
8175
+ seqno = old_seqno;
8178
gcc_assert (seqno >= 0);
8183
@@ -4250,22 +4259,24 @@
8186
/* This is used to initialize spurious jumps generated by
8187
- sel_redirect_edge (). */
8188
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
8189
+ in corner cases within get_seqno_for_a_jump. */
8191
-init_simplejump_data (insn_t insn)
8192
+init_simplejump_data (insn_t insn, int old_seqno)
8194
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
8195
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
8196
vNULL, true, false, false,
8198
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
8199
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
8200
init_first_time_insn_data (insn);
8203
/* Perform deferred initialization of insns. This is used to process
8204
- a new jump that may be created by redirect_edge. */
8206
-sel_init_new_insn (insn_t insn, int flags)
8207
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
8208
+ for initializing simplejumps in init_simplejump_data. */
8210
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
8212
/* We create data structures for bb when the first insn is emitted in it. */
8214
@@ -4292,7 +4303,7 @@
8215
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
8217
extend_insn_data ();
8218
- init_simplejump_data (insn);
8219
+ init_simplejump_data (insn, old_seqno);
8222
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
8223
@@ -5578,8 +5589,7 @@
8226
/* A wrapper for redirect_edge_and_branch_force, which also initializes
8227
- data structures for possibly created bb and insns. Returns the newly
8228
- added bb or NULL, when a bb was not needed. */
8229
+ data structures for possibly created bb and insns. */
8231
sel_redirect_edge_and_branch_force (edge e, basic_block to)
8233
@@ -5586,6 +5596,7 @@
8234
basic_block jump_bb, src, orig_dest = e->dest;
8237
+ int old_seqno = -1;
8239
/* This function is now used only for bookkeeping code creation, where
8240
we'll never get the single pred of orig_dest block and thus will not
8241
@@ -5594,8 +5605,13 @@
8242
&& !single_pred_p (orig_dest));
8244
prev_max_uid = get_max_uid ();
8245
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
8246
+ when the conditional jump being redirected may become unconditional. */
8247
+ if (any_condjump_p (BB_END (src))
8248
+ && INSN_SEQNO (BB_END (src)) >= 0)
8249
+ old_seqno = INSN_SEQNO (BB_END (src));
8251
jump_bb = redirect_edge_and_branch_force (e, to);
8253
if (jump_bb != NULL)
8254
sel_add_bb (jump_bb);
8256
@@ -5607,7 +5623,8 @@
8258
jump = find_new_jump (src, jump_bb, prev_max_uid);
8260
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
8261
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
8263
set_immediate_dominator (CDI_DOMINATORS, to,
8264
recompute_dominator (CDI_DOMINATORS, to));
8265
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
8266
@@ -5626,6 +5643,7 @@
8268
bool recompute_toporder_p = false;
8269
bool maybe_unreachable = single_pred_p (orig_dest);
8270
+ int old_seqno = -1;
8272
latch_edge_p = (pipelining_p
8273
&& current_loop_nest
8274
@@ -5634,6 +5652,12 @@
8276
prev_max_uid = get_max_uid ();
8278
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
8279
+ when the conditional jump being redirected may become unconditional. */
8280
+ if (any_condjump_p (BB_END (src))
8281
+ && INSN_SEQNO (BB_END (src)) >= 0)
8282
+ old_seqno = INSN_SEQNO (BB_END (src));
8284
redirected = redirect_edge_and_branch (e, to);
8286
gcc_assert (redirected && !last_added_blocks.exists ());
8287
@@ -5654,7 +5678,7 @@
8289
jump = find_new_jump (src, NULL, prev_max_uid);
8291
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
8292
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
8294
/* Only update dominator info when we don't have unreachable blocks.
8295
Otherwise we'll update in maybe_tidy_empty_bb. */
8296
Index: gcc/fortran/interface.c
8297
===================================================================
8298
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_3_release)
8299
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
8300
@@ -1923,7 +1923,7 @@
8301
/* F2008, 12.5.2.5; IR F08/0073. */
8302
if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
8303
&& ((CLASS_DATA (formal)->attr.class_pointer
8304
- && !formal->attr.intent == INTENT_IN)
8305
+ && formal->attr.intent != INTENT_IN)
8306
|| CLASS_DATA (formal)->attr.allocatable))
8308
if (actual->ts.type != BT_CLASS)
8309
Index: gcc/fortran/trans-expr.c
8310
===================================================================
8311
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
8312
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
8313
@@ -7096,7 +7096,7 @@
8315
res_desc = gfc_evaluate_now (desc, &se->pre);
8316
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
8317
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
8318
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
8320
/* Free the lhs after the function call and copy the result data to
8321
the lhs descriptor. */
8322
Index: gcc/fortran/decl.c
8323
===================================================================
8324
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
8325
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
8326
@@ -1996,6 +1996,13 @@
8327
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
8328
"initialization at %C") == FAILURE)
8330
+ else if (gfc_current_state () == COMP_DERIVED)
8332
+ gfc_error ("Invalid old style initialization for derived type "
8333
+ "component at %C");
8338
return match_old_style_init (name);
8340
Index: gcc/fortran/trans-openmp.c
8341
===================================================================
8342
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release)
8343
+++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch)
8344
@@ -115,6 +115,16 @@
8345
if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
8346
return OMP_CLAUSE_DEFAULT_SHARED;
8348
+ /* These are either array or derived parameters, or vtables.
8349
+ In the former cases, the OpenMP standard doesn't consider them to be
8350
+ variables at all (they can't be redefined), but they can nevertheless appear
8351
+ in parallel/task regions and for default(none) purposes treat them as shared.
8352
+ For vtables likely the same handling is desirable. */
8353
+ if (TREE_CODE (decl) == VAR_DECL
8354
+ && TREE_READONLY (decl)
8355
+ && TREE_STATIC (decl))
8356
+ return OMP_CLAUSE_DEFAULT_SHARED;
8358
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
8361
Index: gcc/fortran/ChangeLog
8362
===================================================================
8363
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
8364
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
8366
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
8369
+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
8370
+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
8372
+2014-09-03 Marek Polacek <polacek@redhat.com>
8374
+ Backport from trunk
8376
+ * interface.c (compare_parameter): Fix condition.
8378
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
8380
+ Backport from trunk
8382
+ * gfortran.dg/array_assignment_5.f90: New test.
8384
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
8386
+ Backport from trunk
8388
+ * simplify.c (gfc_simplify_dot_product): Convert types of
8389
+ vectors before calculating the result.
8391
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
8393
+ Backport from trunk.
8395
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
8396
+ that elements are skipped. This then correctly aligns 'reverse'
8397
+ with the scalarizer loops.
8399
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
8403
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
8404
+ for the address expression of 'res_desc'.
8406
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
8407
+ Fritz Reese <Reese-Fritz@zai.com>
8409
+ * decl.c (variable_decl): Reject old style initialization
8410
+ for derived type components.
8412
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8414
+ Backport from trunk.
8416
+ * trans-decl.c (gfc_create_module_variable): Don't create
8417
+ Cray-pointee decls twice.
8419
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
8421
+ Backport from mainline
8422
+ PR libfortran/61310
8423
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
8426
2014-05-22 Release Manager
8428
* GCC 4.8.3 released.
8429
Index: gcc/fortran/frontend-passes.c
8430
===================================================================
8431
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
8432
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
8433
@@ -874,6 +874,10 @@
8437
+ case INTRINSIC_CONCAT:
8438
+ /* Do not do string concatenations. */
8442
/* Binary operators. */
8443
if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
8444
Index: gcc/fortran/trans-decl.c
8445
===================================================================
8446
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
8447
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
8448
@@ -4084,8 +4084,8 @@
8451
/* Don't generate variables from other modules. Variables from
8452
- COMMONs will already have been generated. */
8453
- if (sym->attr.use_assoc || sym->attr.in_common)
8454
+ COMMONs and Cray pointees will already have been generated. */
8455
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
8458
/* Equivalenced variables arrive here after creation. */
8459
Index: gcc/fortran/dependency.c
8460
===================================================================
8461
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release)
8462
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
8463
@@ -1779,6 +1779,7 @@
8464
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
8468
gfc_dependency fin_dep;
8469
gfc_dependency this_dep;
8471
@@ -1828,6 +1829,8 @@
8475
+ /* Index for the reverse array. */
8477
for (n=0; n < lref->u.ar.dimen; n++)
8479
/* Assume dependency when either of array reference is vector
8480
@@ -1862,31 +1865,37 @@
8481
The ability to reverse or not is set by previous conditions
8482
in this dimension. If reversal is not activated, the
8483
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
8485
+ /* Get the indexing right for the scalarizing loop. If this
8486
+ is an element, there is no corresponding loop. */
8487
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
8490
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
8491
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
8493
/* Set reverse if backward dependence and not inhibited. */
8494
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8495
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
8496
- GFC_REVERSE_SET : reverse[n];
8497
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8498
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
8499
+ GFC_REVERSE_SET : reverse[m];
8501
/* Set forward if forward dependence and not inhibited. */
8502
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8503
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
8504
- GFC_FORWARD_SET : reverse[n];
8505
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8506
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
8507
+ GFC_FORWARD_SET : reverse[m];
8509
/* Flag up overlap if dependence not compatible with
8510
the overall state of the expression. */
8511
- if (reverse && reverse[n] == GFC_REVERSE_SET
8512
+ if (reverse && reverse[m] == GFC_REVERSE_SET
8513
&& this_dep == GFC_DEP_FORWARD)
8515
- reverse[n] = GFC_INHIBIT_REVERSE;
8516
+ reverse[m] = GFC_INHIBIT_REVERSE;
8517
this_dep = GFC_DEP_OVERLAP;
8519
- else if (reverse && reverse[n] == GFC_FORWARD_SET
8520
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
8521
&& this_dep == GFC_DEP_BACKWARD)
8523
- reverse[n] = GFC_INHIBIT_REVERSE;
8524
+ reverse[m] = GFC_INHIBIT_REVERSE;
8525
this_dep = GFC_DEP_OVERLAP;
8528
@@ -1893,7 +1902,7 @@
8529
/* If no intention of reversing or reversing is explicitly
8530
inhibited, convert backward dependence to overlap. */
8531
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
8532
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
8533
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
8534
this_dep = GFC_DEP_OVERLAP;
8537
Index: gcc/fortran/simplify.c
8538
===================================================================
8539
--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release)
8540
+++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_8-branch)
8541
@@ -1877,6 +1877,9 @@
8543
gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
8548
if (!is_constant_array_expr (vector_a)
8549
|| !is_constant_array_expr (vector_b))
8551
@@ -1883,8 +1886,14 @@
8553
gcc_assert (vector_a->rank == 1);
8554
gcc_assert (vector_b->rank == 1);
8555
- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
8557
+ temp.expr_type = EXPR_OP;
8558
+ gfc_clear_ts (&temp.ts);
8559
+ temp.value.op.op = INTRINSIC_NONE;
8560
+ temp.value.op.op1 = vector_a;
8561
+ temp.value.op.op2 = vector_b;
8562
+ gfc_type_convert_binary (&temp, 1);
8564
return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
8567
Index: gcc/configure.ac
8568
===================================================================
8569
--- a/src/gcc/configure.ac (.../tags/gcc_4_8_3_release)
8570
+++ b/src/gcc/configure.ac (.../branches/gcc-4_8-branch)
8571
@@ -3443,6 +3443,32 @@
8572
AC_MSG_RESULT($gcc_cv_lto_plugin)
8577
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
8578
+ AC_ARG_ENABLE(fix-cortex-a53-835769,
8580
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
8581
+ [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
8582
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
8583
+ [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
8586
+ case $enableval in
8588
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
8593
+ AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
8594
+ Valid choices are 'yes' and 'no'.])
8601
# All TARGET_ABI_OSF targets.
8602
alpha*-*-linux* | alpha*-*-*bsd*)
8603
gcc_GAS_CHECK_FEATURE([explicit relocation support],
8604
Index: gcc/function.c
8605
===================================================================
8606
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
8607
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
8608
@@ -1354,9 +1354,13 @@
8609
#define STACK_POINTER_OFFSET 0
8612
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
8613
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
8616
/* If not defined, pick an appropriate default for the offset of dynamically
8617
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
8618
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
8619
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
8621
#ifndef STACK_DYNAMIC_OFFSET
8623
@@ -1368,12 +1372,12 @@
8624
`crtl->outgoing_args_size'. Nevertheless, we must allow
8625
for it when allocating stack dynamic objects. */
8627
-#if defined(REG_PARM_STACK_SPACE)
8628
+#ifdef INCOMING_REG_PARM_STACK_SPACE
8629
#define STACK_DYNAMIC_OFFSET(FNDECL) \
8630
((ACCUMULATE_OUTGOING_ARGS \
8631
? (crtl->outgoing_args_size \
8632
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
8633
- : REG_PARM_STACK_SPACE (FNDECL))) \
8634
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
8635
: 0) + (STACK_POINTER_OFFSET))
8637
#define STACK_DYNAMIC_OFFSET(FNDECL) \
8638
@@ -2211,8 +2215,9 @@
8640
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
8642
-#ifdef REG_PARM_STACK_SPACE
8643
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
8644
+#ifdef INCOMING_REG_PARM_STACK_SPACE
8645
+ all->reg_parm_stack_space
8646
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
8650
@@ -4518,6 +4523,7 @@
8651
/* ??? This could be set on a per-function basis by the front-end
8652
but is this worth the hassle? */
8653
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
8654
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
8658
Index: gcc/tree-vectorizer.h
8659
===================================================================
8660
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
8661
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
8663
#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
8665
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
8666
-(L)->may_misalign_stmts.length () > 0
8667
+((L)->may_misalign_stmts.length () > 0)
8668
#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
8669
-(L)->may_alias_ddrs.length () > 0
8670
+((L)->may_alias_ddrs.length () > 0)
8672
#define NITERS_KNOWN_P(n) \
8673
(host_integerp ((n),0) \
8675
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
8676
extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
8677
tree *, gimple_stmt_iterator *,
8678
- gimple *, bool, bool *);
8679
+ gimple *, bool, bool *,
8680
+ tree = NULL_TREE);
8681
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
8682
extern tree vect_create_destination_var (tree, tree);
8683
extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
8685
extern int vect_get_place_in_interleaving_chain (gimple, gimple);
8686
extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
8687
extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
8688
- tree, struct loop *);
8689
+ tree, struct loop *,
8690
+ tree = NULL_TREE);
8692
/* In tree-vect-loop.c. */
8693
/* FORNOW: Used in tree-parloops.c. */
8694
Index: gcc/stor-layout.c
8695
===================================================================
8696
--- a/src/gcc/stor-layout.c (.../tags/gcc_4_8_3_release)
8697
+++ b/src/gcc/stor-layout.c (.../branches/gcc-4_8-branch)
8698
@@ -234,12 +234,7 @@
8699
param_type = TREE_TYPE (ref);
8701
= build_decl (input_location, PARM_DECL, param_name, param_type);
8702
- if (targetm.calls.promote_prototypes (NULL_TREE)
8703
- && INTEGRAL_TYPE_P (param_type)
8704
- && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
8705
- DECL_ARG_TYPE (param_decl) = integer_type_node;
8707
- DECL_ARG_TYPE (param_decl) = param_type;
8708
+ DECL_ARG_TYPE (param_decl) = param_type;
8709
DECL_ARTIFICIAL (param_decl) = 1;
8710
TREE_READONLY (param_decl) = 1;
8712
Index: gcc/tree-vect-loop.c
8713
===================================================================
8714
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release)
8715
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
8716
@@ -2205,7 +2205,8 @@
8719
def1 = SSA_NAME_DEF_STMT (op1);
8720
- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
8721
+ if (gimple_bb (def1)
8722
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
8724
&& flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
8725
&& is_gimple_assign (def1))
8726
Index: gcc/tree-data-ref.c
8727
===================================================================
8728
--- a/src/gcc/tree-data-ref.c (.../tags/gcc_4_8_3_release)
8729
+++ b/src/gcc/tree-data-ref.c (.../branches/gcc-4_8-branch)
8731
ref = fold_build2_loc (EXPR_LOCATION (ref),
8732
MEM_REF, TREE_TYPE (ref),
8734
- DR_UNCONSTRAINED_BASE (dr) = true;
8735
access_fns.safe_push (access_fn);
8738
@@ -1326,14 +1325,20 @@
8742
- /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
8743
- the size of the base-object. So we cannot do any offset/overlap
8744
- based analysis but have to rely on points-to information only. */
8745
+ /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
8746
+ do not know the size of the base-object. So we cannot do any
8747
+ offset/overlap based analysis but have to rely on points-to
8748
+ information only. */
8749
if (TREE_CODE (addr_a) == MEM_REF
8750
- && DR_UNCONSTRAINED_BASE (a))
8751
+ && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
8753
- if (TREE_CODE (addr_b) == MEM_REF
8754
- && DR_UNCONSTRAINED_BASE (b))
8755
+ /* For true dependences we can apply TBAA. */
8756
+ if (flag_strict_aliasing
8757
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
8758
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
8759
+ get_alias_set (DR_REF (b))))
8761
+ if (TREE_CODE (addr_b) == MEM_REF)
8762
return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
8763
TREE_OPERAND (addr_b, 0));
8765
@@ -1341,9 +1346,21 @@
8766
build_fold_addr_expr (addr_b));
8768
else if (TREE_CODE (addr_b) == MEM_REF
8769
- && DR_UNCONSTRAINED_BASE (b))
8770
- return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
8771
- TREE_OPERAND (addr_b, 0));
8772
+ && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
8774
+ /* For true dependences we can apply TBAA. */
8775
+ if (flag_strict_aliasing
8776
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
8777
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
8778
+ get_alias_set (DR_REF (b))))
8780
+ if (TREE_CODE (addr_a) == MEM_REF)
8781
+ return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
8782
+ TREE_OPERAND (addr_b, 0));
8784
+ return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
8785
+ TREE_OPERAND (addr_b, 0));
8788
/* Otherwise DR_BASE_OBJECT is an access that covers the whole object
8789
that is being subsetted in the loop nest. */
8790
Index: gcc/tree-data-ref.h
8791
===================================================================
8792
--- a/src/gcc/tree-data-ref.h (.../tags/gcc_4_8_3_release)
8793
+++ b/src/gcc/tree-data-ref.h (.../branches/gcc-4_8-branch)
8796
/* A list of chrecs. Access functions of the indices. */
8797
vec<tree> access_fns;
8799
- /* Whether BASE_OBJECT is an access representing the whole object
8800
- or whether the access could not be constrained. */
8801
- bool unconstrained_base;
8806
#define DR_STMT(DR) (DR)->stmt
8807
#define DR_REF(DR) (DR)->ref
8808
#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
8809
-#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
8810
#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
8811
#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
8812
#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
8813
Index: gcc/tree-vect-data-refs.c
8814
===================================================================
8815
--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release)
8816
+++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
8817
@@ -3553,6 +3553,9 @@
8819
if LOOP=i_loop: &in (relative to i_loop)
8820
if LOOP=j_loop: &in+i*2B (relative to j_loop)
8821
+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
8822
+ initial address. Unlike OFFSET, which is number of elements to
8823
+ be added, BYTE_OFFSET is measured in bytes.
8826
1. Return an SSA_NAME whose value is the address of the memory location of
8827
@@ -3566,7 +3569,8 @@
8828
vect_create_addr_base_for_vector_ref (gimple stmt,
8829
gimple_seq *new_stmt_list,
8831
- struct loop *loop)
8832
+ struct loop *loop,
8835
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
8836
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
8837
@@ -3628,7 +3632,17 @@
8838
base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
8839
gimple_seq_add_seq (new_stmt_list, seq);
8843
+ tree tmp = create_tmp_var (sizetype, "offset");
8845
+ byte_offset = fold_convert (sizetype, byte_offset);
8846
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
8847
+ base_offset, byte_offset);
8848
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
8849
+ gimple_seq_add_seq (new_stmt_list, seq);
8852
/* base + base_offset */
8854
addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
8855
@@ -3692,6 +3706,10 @@
8856
5. BSI: location where the new stmts are to be placed if there is no loop
8857
6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
8858
pointing to the initial address.
8859
+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
8860
+ to the initial address accessed by the data-ref in STMT. This is
8861
+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
8865
1. Declare a new ptr to vector_type, and have it point to the base of the
8866
@@ -3705,6 +3723,8 @@
8867
initial_address = &a[init];
8868
if OFFSET is supplied:
8869
initial_address = &a[init + OFFSET];
8870
+ if BYTE_OFFSET is supplied:
8871
+ initial_address = &a[init] + BYTE_OFFSET;
8873
Return the initial_address in INITIAL_ADDRESS.
8875
@@ -3722,7 +3742,7 @@
8876
vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
8877
tree offset, tree *initial_address,
8878
gimple_stmt_iterator *gsi, gimple *ptr_incr,
8879
- bool only_init, bool *inv_p)
8880
+ bool only_init, bool *inv_p, tree byte_offset)
8882
const char *base_name;
8883
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
8884
@@ -3881,10 +3901,10 @@
8885
/* (2) Calculate the initial address of the aggregate-pointer, and set
8886
the aggregate-pointer to point to it before the loop. */
8888
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
8889
+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
8891
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
8893
+ offset, loop, byte_offset);
8897
Index: gcc/emit-rtl.c
8898
===================================================================
8899
--- a/src/gcc/emit-rtl.c (.../tags/gcc_4_8_3_release)
8900
+++ b/src/gcc/emit-rtl.c (.../branches/gcc-4_8-branch)
8903
/* Return true if the given memory attributes are equal. */
8907
mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
8909
return (p->alias == q->alias
8910
Index: gcc/gimple-fold.c
8911
===================================================================
8912
--- a/src/gcc/gimple-fold.c (.../tags/gcc_4_8_3_release)
8913
+++ b/src/gcc/gimple-fold.c (.../branches/gcc-4_8-branch)
8914
@@ -2955,8 +2955,8 @@
8916
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
8917
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
8918
- && operand_equal_p (TYPE_SIZE (type),
8919
- TYPE_SIZE (TREE_TYPE (ctor)), 0))
8920
+ && !compare_tree_int (TYPE_SIZE (type), size)
8921
+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
8923
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
8924
ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
8925
Index: gcc/emit-rtl.h
8926
===================================================================
8927
--- a/src/gcc/emit-rtl.h (.../tags/gcc_4_8_3_release)
8928
+++ b/src/gcc/emit-rtl.h (.../branches/gcc-4_8-branch)
8930
#ifndef GCC_EMIT_RTL_H
8931
#define GCC_EMIT_RTL_H
8933
+/* Return whether two MEM_ATTRs are equal. */
8934
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
8936
/* Set the alias set of MEM to SET. */
8937
extern void set_mem_alias_set (rtx, alias_set_type);
8939
Index: gcc/tree-cfgcleanup.c
8940
===================================================================
8941
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
8942
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
8943
@@ -498,7 +498,20 @@
8945
/* First split basic block if stmt is not last. */
8946
if (stmt != gsi_stmt (gsi_last_bb (bb)))
8947
- split_block (bb, stmt);
8949
+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
8951
+ /* Don't split if there are only debug stmts
8952
+ after stmt, that can result in -fcompare-debug
8953
+ failures. Remove the debug stmts instead,
8954
+ they should be all unreachable anyway. */
8955
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
8956
+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
8957
+ gsi_remove (&gsi, true);
8960
+ split_block (bb, stmt);
8963
changed |= remove_fallthru_edge (bb->succs);
8965
Index: gcc/tree-sra.c
8966
===================================================================
8967
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_3_release)
8968
+++ b/src/gcc/tree-sra.c (.../branches/gcc-4_8-branch)
8969
@@ -1030,6 +1030,11 @@
8973
+ if (TREE_THIS_VOLATILE (expr))
8975
+ disqualify_base_of_expr (expr, "part of a volatile reference.");
8979
switch (TREE_CODE (expr))
8981
Index: gcc/common.opt
8982
===================================================================
8983
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
8984
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
8985
@@ -1226,6 +1226,10 @@
8986
Common Report Var(flag_tm)
8987
Enable support for GNU transactional memory
8990
+Common Report Var(flag_gnu_unique) Init(1)
8991
+Use STB_GNU_UNIQUE if supported by the assembler
8995
Does nothing. Preserved for backward compatibility.
8996
Index: gcc/tree-vect-patterns.c
8997
===================================================================
8998
--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release)
8999
+++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch)
9003
oprnd00 = gimple_assign_rhs1 (def_stmt);
9004
- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
9005
+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
9009
Index: gcc/sched-deps.c
9010
===================================================================
9011
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
9012
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
9013
@@ -2744,7 +2744,8 @@
9014
Consider for instance a volatile asm that changes the fpu rounding
9015
mode. An insn should not be moved across this even if it only uses
9016
pseudo-regs because it might give an incorrectly rounded result. */
9017
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
9018
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
9019
+ && !DEBUG_INSN_P (insn))
9020
reg_pending_barrier = TRUE_BARRIER;
9022
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
9023
Index: gcc/tree-vect-stmts.c
9024
===================================================================
9025
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
9026
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
9027
@@ -4319,6 +4319,7 @@
9028
int i, j, group_size;
9029
tree msq = NULL_TREE, lsq;
9030
tree offset = NULL_TREE;
9031
+ tree byte_offset = NULL_TREE;
9032
tree realignment_token = NULL_TREE;
9034
vec<tree> dr_chain = vNULL;
9035
@@ -4934,7 +4935,8 @@
9036
if (alignment_support_scheme == dr_explicit_realign_optimized)
9038
phi = SSA_NAME_DEF_STMT (msq);
9039
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
9040
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
9045
@@ -4955,7 +4957,8 @@
9047
dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
9048
offset, &dummy, gsi,
9049
- &ptr_incr, false, &inv_p);
9050
+ &ptr_incr, false, &inv_p,
9053
dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
9054
TYPE_SIZE_UNIT (aggr_type));
9055
Index: gcc/config.gcc
9056
===================================================================
9057
--- a/src/gcc/config.gcc (.../tags/gcc_4_8_3_release)
9058
+++ b/src/gcc/config.gcc (.../branches/gcc-4_8-branch)
9059
@@ -2466,7 +2466,7 @@
9062
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
9063
- tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
9064
+ tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
9067
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
9068
@@ -2992,6 +2992,9 @@
9076
with_cpu="`echo ${target} | sed 's/-.*$//'`"
9078
@@ -3630,7 +3633,7 @@
9080
"" | sparc | sparcv9 | sparc64 \
9082
- | v8 | supersparc | hypersparc | leon | leon3 \
9083
+ | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
9084
| sparclite | f930 | f934 | sparclite86x \
9085
| sparclet | tsc701 \
9086
| v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
9087
Index: gcc/config/alpha/elf.h
9088
===================================================================
9089
--- a/src/gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release)
9090
+++ b/src/gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch)
9091
@@ -126,6 +126,10 @@
9092
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
9093
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
9095
+/* This variable should be set to 'true' if the target ABI requires
9096
+ unwinding tables even when exceptions are not used. */
9097
+#define TARGET_UNWIND_TABLES_DEFAULT true
9099
/* Select a format to encode pointers in exception handling data. CODE
9100
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
9101
true if the symbol may be affected by dynamic relocations.
9102
Index: gcc/config/alpha/alpha.c
9103
===================================================================
9104
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
9105
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
9106
@@ -8658,6 +8658,11 @@
9111
+ /* __builtin_unreachable can expand to no code at all,
9112
+ leaving (barrier) RTXes in the instruction stream. */
9113
+ goto close_shadow_notrapb;
9118
@@ -8673,6 +8678,7 @@
9119
n = emit_insn_before (gen_trapb (), i);
9120
PUT_MODE (n, TImode);
9121
PUT_MODE (i, TImode);
9122
+ close_shadow_notrapb:
9126
Index: gcc/config/elfos.h
9127
===================================================================
9128
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
9129
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
9131
/* Write the extra assembler code needed to declare an object properly. */
9133
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
9134
-#define USE_GNU_UNIQUE_OBJECT 1
9135
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
9137
#define USE_GNU_UNIQUE_OBJECT 0
9139
Index: gcc/config/sparc/t-rtems
9140
===================================================================
9141
--- a/src/gcc/config/sparc/t-rtems (.../tags/gcc_4_8_3_release)
9142
+++ b/src/gcc/config/sparc/t-rtems (.../branches/gcc-4_8-branch)
9144
# <http://www.gnu.org/licenses/>.
9147
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
9148
-MULTILIB_DIRNAMES = soft v8 leon3
9149
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
9150
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
9151
MULTILIB_MATCHES = msoft-float=mno-fpu
9153
+MULTILIB_EXCEPTIONS = muser-mode
9154
+MULTILIB_EXCEPTIONS += mcpu=leon3
9155
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
9156
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
9157
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
9158
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
9159
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
9160
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
9161
Index: gcc/config/sparc/sparc.md
9162
===================================================================
9163
--- a/src/gcc/config/sparc/sparc.md (.../tags/gcc_4_8_3_release)
9164
+++ b/src/gcc/config/sparc/sparc.md (.../branches/gcc-4_8-branch)
9173
Index: gcc/config/sparc/sparc.opt
9174
===================================================================
9175
--- a/src/gcc/config/sparc/sparc.opt (.../tags/gcc_4_8_3_release)
9176
+++ b/src/gcc/config/sparc/sparc.opt (.../branches/gcc-4_8-branch)
9178
Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
9181
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
9184
Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
9187
Index: gcc/config/sparc/sync.md
9188
===================================================================
9189
--- a/src/gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release)
9190
+++ b/src/gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch)
9193
[(set_attr "type" "multi")])
9195
+;; For LEON3, STB has the effect of membar #StoreLoad.
9196
+(define_insn "*membar_storeload_leon3"
9197
+ [(set (match_operand:BLK 0 "" "")
9198
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
9200
+ "stb\t%%g0, [%%sp-1]"
9201
+ [(set_attr "type" "store")])
9203
;; For V8, LDSTUB has the effect of membar #StoreLoad.
9204
(define_insn "*membar_storeload"
9205
[(set (match_operand:BLK 0 "" "")
9206
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
9208
+ "TARGET_V8 && !TARGET_LEON3"
9209
"ldstub\t[%%sp-1], %%g0"
9210
[(set_attr "type" "multi")])
9212
Index: gcc/config/sparc/sparc-opts.h
9213
===================================================================
9214
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
9215
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
9217
PROCESSOR_HYPERSPARC,
9220
+ PROCESSOR_LEON3V7,
9221
PROCESSOR_SPARCLITE,
9224
Index: gcc/config/sparc/sparc.c
9225
===================================================================
9226
--- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_4_8_3_release)
9227
+++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-4_8-branch)
9228
@@ -1210,6 +1210,7 @@
9229
{ TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
9230
{ TARGET_CPU_leon, PROCESSOR_LEON },
9231
{ TARGET_CPU_leon3, PROCESSOR_LEON3 },
9232
+ { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
9233
{ TARGET_CPU_sparclite, PROCESSOR_F930 },
9234
{ TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
9235
{ TARGET_CPU_sparclet, PROCESSOR_TSC701 },
9236
@@ -1238,6 +1239,7 @@
9237
{ "hypersparc", MASK_ISA, MASK_V8|MASK_FPU },
9238
{ "leon", MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
9239
{ "leon3", MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
9240
+ { "leon3v7", MASK_ISA, MASK_LEON3|MASK_FPU },
9241
{ "sparclite", MASK_ISA, MASK_SPARCLITE },
9242
/* The Fujitsu MB86930 is the original sparclite chip, with no FPU. */
9243
{ "f930", MASK_ISA|MASK_FPU, MASK_SPARCLITE },
9244
@@ -1490,6 +1492,7 @@
9245
sparc_costs = &leon_costs;
9247
case PROCESSOR_LEON3:
9248
+ case PROCESSOR_LEON3V7:
9249
sparc_costs = &leon3_costs;
9251
case PROCESSOR_SPARCLET:
9252
Index: gcc/config/sparc/leon.md
9253
===================================================================
9254
--- a/src/gcc/config/sparc/leon.md (.../tags/gcc_4_8_3_release)
9255
+++ b/src/gcc/config/sparc/leon.md (.../branches/gcc-4_8-branch)
9258
;; Use a double reservation to work around the load pipeline hazard on UT699.
9259
(define_insn_reservation "leon3_load" 1
9260
- (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
9261
+ (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
9264
(define_insn_reservation "leon_store" 2
9265
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
9266
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
9269
;; This describes Gaisler Research's FPU
9271
(define_cpu_unit "grfpu_ds" "grfpu")
9273
(define_insn_reservation "leon_fp_alu" 4
9274
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
9275
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
9276
"grfpu_alu, nothing*3")
9278
(define_insn_reservation "leon_fp_divs" 16
9279
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
9280
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
9281
"grfpu_ds*14, nothing*2")
9283
(define_insn_reservation "leon_fp_divd" 17
9284
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
9285
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
9286
"grfpu_ds*15, nothing*2")
9288
(define_insn_reservation "leon_fp_sqrts" 24
9289
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
9290
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
9291
"grfpu_ds*22, nothing*2")
9293
(define_insn_reservation "leon_fp_sqrtd" 25
9294
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
9295
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
9296
"grfpu_ds*23, nothing*2")
9297
Index: gcc/config/sparc/sparc.h
9298
===================================================================
9299
--- a/src/gcc/config/sparc/sparc.h (.../tags/gcc_4_8_3_release)
9300
+++ b/src/gcc/config/sparc/sparc.h (.../branches/gcc-4_8-branch)
9301
@@ -137,21 +137,22 @@
9302
#define TARGET_CPU_hypersparc 3
9303
#define TARGET_CPU_leon 4
9304
#define TARGET_CPU_leon3 5
9305
-#define TARGET_CPU_sparclite 6
9306
-#define TARGET_CPU_f930 6 /* alias */
9307
-#define TARGET_CPU_f934 6 /* alias */
9308
-#define TARGET_CPU_sparclite86x 7
9309
-#define TARGET_CPU_sparclet 8
9310
-#define TARGET_CPU_tsc701 8 /* alias */
9311
-#define TARGET_CPU_v9 9 /* generic v9 implementation */
9312
-#define TARGET_CPU_sparcv9 9 /* alias */
9313
-#define TARGET_CPU_sparc64 9 /* alias */
9314
-#define TARGET_CPU_ultrasparc 10
9315
-#define TARGET_CPU_ultrasparc3 11
9316
-#define TARGET_CPU_niagara 12
9317
-#define TARGET_CPU_niagara2 13
9318
-#define TARGET_CPU_niagara3 14
9319
-#define TARGET_CPU_niagara4 15
9320
+#define TARGET_CPU_leon3v7 6
9321
+#define TARGET_CPU_sparclite 7
9322
+#define TARGET_CPU_f930 7 /* alias */
9323
+#define TARGET_CPU_f934 7 /* alias */
9324
+#define TARGET_CPU_sparclite86x 8
9325
+#define TARGET_CPU_sparclet 9
9326
+#define TARGET_CPU_tsc701 9 /* alias */
9327
+#define TARGET_CPU_v9 10 /* generic v9 implementation */
9328
+#define TARGET_CPU_sparcv9 10 /* alias */
9329
+#define TARGET_CPU_sparc64 10 /* alias */
9330
+#define TARGET_CPU_ultrasparc 11
9331
+#define TARGET_CPU_ultrasparc3 12
9332
+#define TARGET_CPU_niagara 13
9333
+#define TARGET_CPU_niagara2 14
9334
+#define TARGET_CPU_niagara3 15
9335
+#define TARGET_CPU_niagara4 16
9337
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
9338
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
9339
@@ -239,8 +240,13 @@
9340
#define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
9343
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
9344
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
9345
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
9350
#if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
9351
#error Unrecognized value in TARGET_CPU_DEFAULT.
9354
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
9355
%{mcpu=leon:-D__leon__ -D__sparc_v8__} \
9356
%{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
9357
+%{mcpu=leon3v7:-D__leon__} \
9358
%{mcpu=v9:-D__sparc_v9__} \
9359
%{mcpu=ultrasparc:-D__sparc_v9__} \
9360
%{mcpu=ultrasparc3:-D__sparc_v9__} \
9362
%{mcpu=hypersparc:-Av8} \
9363
%{mcpu=leon:" AS_LEON_FLAG "} \
9364
%{mcpu=leon3:" AS_LEON_FLAG "} \
9365
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
9366
%{mv8plus:-Av8plus} \
9368
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
9369
@@ -1760,8 +1768,10 @@
9372
#define AS_LEON_FLAG "-Aleon"
9373
+#define AS_LEONV7_FLAG "-Aleon"
9375
#define AS_LEON_FLAG "-Av8"
9376
+#define AS_LEONV7_FLAG "-Av7"
9379
/* We use gcc _mcount for profiling. */
9380
Index: gcc/config/i386/i386.md
9381
===================================================================
9382
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
9383
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
9384
@@ -5339,66 +5339,37 @@
9386
;; Avoid store forwarding (partial memory) stall penalty by extending
9387
;; SImode value to DImode through XMM register instead of pushing two
9388
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
9389
-;; targets benefit from this optimization. Also note that fild
9390
-;; loads from memory only.
9391
+;; SImode values to stack. Also note that fild loads from memory only.
9393
-(define_insn "*floatunssi<mode>2_1"
9394
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
9395
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
9396
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
9397
(unsigned_float:X87MODEF
9398
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
9399
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
9400
- (clobber (match_scratch:SI 3 "=X,x"))]
9401
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
9402
+ (clobber (match_scratch:DI 3 "=x"))
9403
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
9405
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9407
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
9409
+ "&& reload_completed"
9410
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
9411
+ (set (match_dup 2) (match_dup 3))
9412
+ (set (match_dup 0)
9413
+ (float:X87MODEF (match_dup 2)))]
9415
[(set_attr "type" "multi")
9416
(set_attr "mode" "<MODE>")])
9419
- [(set (match_operand:X87MODEF 0 "register_operand")
9420
- (unsigned_float:X87MODEF
9421
- (match_operand:SI 1 "register_operand")))
9422
- (clobber (match_operand:DI 2 "memory_operand"))
9423
- (clobber (match_scratch:SI 3))]
9425
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9427
- && reload_completed"
9428
- [(set (match_dup 2) (match_dup 1))
9429
- (set (match_dup 0)
9430
- (float:X87MODEF (match_dup 2)))]
9431
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
9434
- [(set (match_operand:X87MODEF 0 "register_operand")
9435
- (unsigned_float:X87MODEF
9436
- (match_operand:SI 1 "memory_operand")))
9437
- (clobber (match_operand:DI 2 "memory_operand"))
9438
- (clobber (match_scratch:SI 3))]
9440
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9442
- && reload_completed"
9443
- [(set (match_dup 2) (match_dup 3))
9444
- (set (match_dup 0)
9445
- (float:X87MODEF (match_dup 2)))]
9447
- emit_move_insn (operands[3], operands[1]);
9448
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
9451
(define_expand "floatunssi<mode>2"
9453
[(set (match_operand:X87MODEF 0 "register_operand")
9454
(unsigned_float:X87MODEF
9455
(match_operand:SI 1 "nonimmediate_operand")))
9456
- (clobber (match_dup 2))
9457
- (clobber (match_scratch:SI 3))])]
9458
+ (clobber (match_scratch:DI 3))
9459
+ (clobber (match_dup 2))])]
9461
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9463
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
9464
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
9466
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
9467
@@ -13545,7 +13516,8 @@
9468
(set (reg:CCFP FPSR_REG)
9469
(unspec:CCFP [(match_dup 2) (match_dup 3)]
9471
- "TARGET_USE_FANCY_MATH_387"
9472
+ "TARGET_USE_FANCY_MATH_387
9473
+ && flag_finite_math_only"
9475
[(set_attr "type" "fpspc")
9476
(set_attr "mode" "XF")])
9477
@@ -13554,7 +13526,8 @@
9478
[(use (match_operand:XF 0 "register_operand"))
9479
(use (match_operand:XF 1 "general_operand"))
9480
(use (match_operand:XF 2 "general_operand"))]
9481
- "TARGET_USE_FANCY_MATH_387"
9482
+ "TARGET_USE_FANCY_MATH_387
9483
+ && flag_finite_math_only"
9485
rtx label = gen_label_rtx ();
9487
@@ -13577,7 +13550,8 @@
9488
[(use (match_operand:MODEF 0 "register_operand"))
9489
(use (match_operand:MODEF 1 "general_operand"))
9490
(use (match_operand:MODEF 2 "general_operand"))]
9491
- "TARGET_USE_FANCY_MATH_387"
9492
+ "TARGET_USE_FANCY_MATH_387
9493
+ && flag_finite_math_only"
9495
rtx (*gen_truncxf) (rtx, rtx);
9497
@@ -13616,7 +13590,8 @@
9498
(set (reg:CCFP FPSR_REG)
9499
(unspec:CCFP [(match_dup 2) (match_dup 3)]
9501
- "TARGET_USE_FANCY_MATH_387"
9502
+ "TARGET_USE_FANCY_MATH_387
9503
+ && flag_finite_math_only"
9505
[(set_attr "type" "fpspc")
9506
(set_attr "mode" "XF")])
9507
@@ -13625,7 +13600,8 @@
9508
[(use (match_operand:XF 0 "register_operand"))
9509
(use (match_operand:XF 1 "general_operand"))
9510
(use (match_operand:XF 2 "general_operand"))]
9511
- "TARGET_USE_FANCY_MATH_387"
9512
+ "TARGET_USE_FANCY_MATH_387
9513
+ && flag_finite_math_only"
9515
rtx label = gen_label_rtx ();
9517
@@ -13648,7 +13624,8 @@
9518
[(use (match_operand:MODEF 0 "register_operand"))
9519
(use (match_operand:MODEF 1 "general_operand"))
9520
(use (match_operand:MODEF 2 "general_operand"))]
9521
- "TARGET_USE_FANCY_MATH_387"
9522
+ "TARGET_USE_FANCY_MATH_387
9523
+ && flag_finite_math_only"
9525
rtx (*gen_truncxf) (rtx, rtx);
9527
Index: gcc/config/i386/driver-i386.c
9528
===================================================================
9529
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
9530
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
9531
@@ -713,6 +713,11 @@
9532
/* Assume Core 2. */
9535
+ else if (has_longmode)
9536
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
9537
+ -march=native would be unusable for 64-bit compilations,
9538
+ as all the CPUs below are 32-bit only. */
9541
/* It is Core Duo. */
9543
Index: gcc/config/i386/i386.c
9544
===================================================================
9545
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
9546
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
9547
@@ -13800,7 +13800,7 @@
9550
else if (mode == CCCmode)
9552
+ suffix = fp ? "b" : "c";
9556
@@ -13823,9 +13823,9 @@
9560
- suffix = fp ? "nb" : "ae";
9562
else if (mode == CCCmode)
9564
+ suffix = fp ? "nb" : "nc";
9568
@@ -20505,7 +20505,7 @@
9569
t1 = gen_reg_rtx (V32QImode);
9570
t2 = gen_reg_rtx (V32QImode);
9571
t3 = gen_reg_rtx (V32QImode);
9572
- vt2 = GEN_INT (128);
9573
+ vt2 = GEN_INT (-128);
9574
for (i = 0; i < 32; i++)
9576
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
9577
@@ -24640,13 +24640,17 @@
9581
- /* Assume that region is SCC, i.e. all immediate predecessors
9582
- of non-head block are in the same region. */
9584
+ /* Regions are SCCs with the exception of selective
9585
+ scheduling with pipelining of outer blocks enabled.
9586
+ So also check that immediate predecessors of a non-head
9587
+ block are in the same region. */
9588
FOR_EACH_EDGE (e, ei, bb->preds)
9590
/* Avoid creating of loop-carried dependencies through
9591
- using topological odering in region. */
9592
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
9593
+ using topological ordering in the region. */
9594
+ if (rgn == CONTAINING_RGN (e->src->index)
9595
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
9596
add_dependee_for_func_arg (first_arg, e->src);
9599
@@ -38807,8 +38811,8 @@
9600
op0 = gen_lowpart (V4DImode, d->op0);
9601
op1 = gen_lowpart (V4DImode, d->op1);
9603
- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
9604
- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
9605
+ = GEN_INT ((d->perm[0] / (nelt / 2))
9606
+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
9607
emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
9610
Index: gcc/config/sh/sh.c
9611
===================================================================
9612
--- a/src/gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release)
9613
+++ b/src/gcc/config/sh/sh.c (.../branches/gcc-4_8-branch)
9614
@@ -808,6 +808,12 @@
9615
targetm.asm_out.aligned_op.di = NULL;
9616
targetm.asm_out.unaligned_op.di = NULL;
9619
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
9620
+ Disable it for everything else. */
9621
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
9622
+ TARGET_USERMODE = false;
9626
if (! strcmp (sh_div_str, "call-div1"))
9627
@@ -3036,7 +3042,7 @@
9628
struct ashl_lshr_sequence
9632
+ signed char amount[6];
9636
Index: gcc/config/sh/sync.md
9637
===================================================================
9638
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
9639
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
9641
(set (mem:SI (match_dup 1))
9643
[(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
9644
+ (set (reg:SI T_REG) (const_int 1))
9645
(clobber (reg:SI R0_REG))]
9646
"TARGET_ATOMIC_HARD_LLCS
9647
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9649
(set (mem:QIHI (match_dup 1))
9651
[(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
9652
+ (set (reg:SI T_REG) (const_int 1))
9653
(clobber (reg:SI R0_REG))
9654
(clobber (match_scratch:SI 3 "=&r"))
9655
(clobber (match_scratch:SI 4 "=1"))]
9657
[(FETCHOP:SI (mem:SI (match_dup 1))
9658
(match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
9660
+ (set (reg:SI T_REG) (const_int 1))
9661
(clobber (reg:SI R0_REG))]
9662
"TARGET_ATOMIC_HARD_LLCS
9663
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9665
[(FETCHOP:QIHI (mem:QIHI (match_dup 1))
9666
(match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
9668
+ (set (reg:SI T_REG) (const_int 1))
9669
(clobber (reg:SI R0_REG))
9670
(clobber (match_scratch:SI 3 "=&r"))
9671
(clobber (match_scratch:SI 4 "=1"))]
9673
[(not:SI (and:SI (mem:SI (match_dup 1))
9674
(match_operand:SI 2 "logical_operand" "rK08")))]
9676
+ (set (reg:SI T_REG) (const_int 1))
9677
(clobber (reg:SI R0_REG))]
9678
"TARGET_ATOMIC_HARD_LLCS
9679
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9681
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
9682
(match_operand:QIHI 2 "logical_operand" "rK08")))]
9684
+ (set (reg:SI T_REG) (const_int 1))
9685
(clobber (reg:SI R0_REG))
9686
(clobber (match_scratch:SI 3 "=&r"))
9687
(clobber (match_scratch:SI 4 "=1"))]
9691
" mov.<bwl> %3,@%1" "\n"
9695
[(set_attr "length" "20")])
9698
(set (mem:SI (match_dup 1))
9700
[(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
9703
+ (set (reg:SI T_REG) (const_int 1))]
9704
"TARGET_ATOMIC_HARD_LLCS
9705
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9709
[(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
9711
+ (set (reg:SI T_REG) (const_int 1))
9712
(clobber (reg:SI R0_REG))
9713
(clobber (match_scratch:SI 3 "=&r"))
9714
(clobber (match_scratch:SI 4 "=1"))]
9715
@@ -1124,7 +1132,8 @@
9716
(set (mem:SI (match_dup 1))
9718
[(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
9721
+ (set (reg:SI T_REG) (const_int 1))]
9722
"TARGET_ATOMIC_HARD_LLCS
9723
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
9725
@@ -1145,6 +1154,7 @@
9727
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
9729
+ (set (reg:SI T_REG) (const_int 1))
9730
(clobber (reg:SI R0_REG))
9731
(clobber (match_scratch:SI 3 "=&r"))
9732
(clobber (match_scratch:SI 4 "=1"))]
9733
@@ -1353,7 +1363,7 @@
9735
" mov.b @%0,r0" "\n"
9736
" mov.b %1,@%0" "\n"
9741
[(set_attr "length" "16")])
9742
Index: gcc/config/sh/sh.opt
9743
===================================================================
9744
--- a/src/gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release)
9745
+++ b/src/gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch)
9747
Cost to assume for a multiply insn
9750
-Target Report RejectNegative Var(TARGET_USERMODE)
9751
+Target Var(TARGET_USERMODE)
9752
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
9754
;; We might want to enable this by default for TARGET_HARD_SH4, because
9755
Index: gcc/config/microblaze/predicates.md
9756
===================================================================
9757
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
9758
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
9760
(ior (match_operand 0 "const_0_operand")
9761
(match_operand 0 "register_operand")))
9763
-(define_predicate "reg_or_mem_operand"
9764
- (ior (match_operand 0 "memory_operand")
9765
- (match_operand 0 "register_operand")))
9767
;; Return if the operand is either the PC or a label_ref.
9768
(define_special_predicate "pc_or_label_operand"
9769
(ior (match_code "pc,label_ref")
9770
Index: gcc/config/microblaze/microblaze.md
9771
===================================================================
9772
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
9773
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
9774
@@ -1119,18 +1119,6 @@
9778
-;;Load and store reverse
9779
-(define_insn "movsi4_rev"
9780
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
9781
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
9786
- [(set_attr "type" "load,store")
9787
- (set_attr "mode" "SI")
9788
- (set_attr "length" "4,4")])
9790
;; 32-bit floating point moves
9792
(define_expand "movsf"
9793
Index: gcc/config/avr/avr-fixed.md
9794
===================================================================
9795
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
9796
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
9800
// Input and output of the libgcc function
9801
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
9802
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
9803
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
9804
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
9806
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
9807
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
9808
Index: gcc/config/avr/avr.md
9809
===================================================================
9810
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
9811
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
9812
@@ -367,6 +367,15 @@
9817
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
9818
+ // of the poor addressing capabilities of these spaces it's better to
9819
+ // load them in one chunk. And it avoids PR61443.
9821
+ if (MEM_P (operands[0])
9822
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
9823
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
9825
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
9827
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
9828
Index: gcc/config/avr/avr.h
9829
===================================================================
9830
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
9831
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
9832
@@ -250,18 +250,18 @@
9833
#define REG_CLASS_CONTENTS { \
9834
{0x00000000,0x00000000}, /* NO_REGS */ \
9835
{0x00000001,0x00000000}, /* R0_REG */ \
9836
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
9837
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
9838
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
9839
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
9840
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
9841
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
9842
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
9843
- {(3 << REG_Y) | (3 << REG_Z), \
9844
+ {(3u << REG_Y) | (3u << REG_Z), \
9845
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
9846
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
9847
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
9848
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
9849
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
9850
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
9851
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
9852
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
9853
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
9854
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
9855
0x00000000}, /* LD_REGS, r16 - r31 */ \
9856
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
9857
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
9858
Index: gcc/config/aarch64/arm_neon.h
9859
===================================================================
9860
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
9861
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
9862
@@ -13815,7 +13815,7 @@
9864
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
9868
: /* No clobbers */);
9871
@@ -13837,7 +13837,7 @@
9873
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
9877
: /* No clobbers */);
9880
Index: gcc/config/aarch64/aarch64.md
9881
===================================================================
9882
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
9883
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
9884
@@ -3292,6 +3292,7 @@
9885
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
9887
(clobber (reg:DI LR_REGNUM))
9888
+ (clobber (reg:CC CC_REGNUM))
9889
(clobber (match_scratch:DI 1 "=r"))]
9891
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
9892
Index: gcc/config/aarch64/aarch64.opt
9893
===================================================================
9894
--- a/src/gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release)
9895
+++ b/src/gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch)
9897
Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
9898
Generate code which uses only the general registers
9900
+mfix-cortex-a53-835769
9901
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
9902
+Workaround for ARM Cortex-A53 Erratum number 835769
9905
Target Report RejectNegative InverseMask(BIG_END)
9906
Assume target CPU is configured as little endian
9907
Index: gcc/config/aarch64/aarch64-protos.h
9908
===================================================================
9909
--- a/src/gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release)
9910
+++ b/src/gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch)
9913
extern void aarch64_split_combinev16qi (rtx operands[3]);
9914
extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
9915
+extern bool aarch64_madd_needs_nop (rtx);
9916
+extern void aarch64_final_prescan_insn (rtx);
9918
aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
9920
Index: gcc/config/aarch64/aarch64.c
9921
===================================================================
9922
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
9923
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
9924
@@ -1201,6 +1201,7 @@
9925
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
9926
int ncrn, nvrn, nregs;
9927
bool allocate_ncrn, allocate_nvrn;
9928
+ HOST_WIDE_INT size;
9930
/* We need to do this once per argument. */
9931
if (pcum->aapcs_arg_processed)
9932
@@ -1208,6 +1209,11 @@
9934
pcum->aapcs_arg_processed = true;
9936
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
9938
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
9941
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
9942
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
9944
@@ -1258,10 +1264,8 @@
9947
ncrn = pcum->aapcs_ncrn;
9948
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
9949
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
9950
+ nregs = size / UNITS_PER_WORD;
9953
/* C6 - C9. though the sign and zero extension semantics are
9954
handled elsewhere. This is the case where the argument fits
9955
entirely general registers. */
9956
@@ -1309,13 +1313,12 @@
9957
pcum->aapcs_nextncrn = NUM_ARG_REGS;
9959
/* The argument is passed on stack; record the needed number of words for
9960
- this argument (we can re-use NREGS) and align the total size if
9962
+ this argument and align the total size if necessary. */
9964
- pcum->aapcs_stack_words = nregs;
9965
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
9966
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
9967
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
9968
- 16 / UNITS_PER_WORD) + 1;
9969
+ 16 / UNITS_PER_WORD);
9973
@@ -4845,6 +4848,15 @@
9974
aarch64_tune = selected_tune->core;
9975
aarch64_tune_params = selected_tune->tune;
9977
+ if (aarch64_fix_a53_err835769 == 2)
9979
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
9980
+ aarch64_fix_a53_err835769 = 1;
9982
+ aarch64_fix_a53_err835769 = 0;
9986
aarch64_override_options_after_change ();
9989
@@ -6037,6 +6049,135 @@
9994
+/* Return true iff X is a MEM rtx. */
9997
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
9999
+ return MEM_P (*x);
10003
+/* Return true if mem_insn contains a MEM RTX somewhere in it. */
10006
+has_memory_op (rtx mem_insn)
10008
+ rtx pattern = PATTERN (mem_insn);
10009
+ return for_each_rtx (&pattern, is_mem_p, NULL);
10013
+/* Find the first rtx before insn that will generate an assembly
10017
+aarch64_prev_real_insn (rtx insn)
10024
+ insn = prev_real_insn (insn);
10026
+ while (insn && recog_memoized (insn) < 0);
10031
+/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
10034
+is_madd_op (enum attr_v8type t1)
10036
+ return t1 == V8TYPE_MADD
10037
+ || t1 == V8TYPE_MADDL;
10041
+/* Check if there is a register dependency between a load and the insn
10042
+ for which we hold recog_data. */
10045
+dep_between_memop_and_curr (rtx memop)
10050
+ gcc_assert (GET_CODE (memop) == SET);
10052
+ if (!REG_P (SET_DEST (memop)))
10055
+ load_reg = SET_DEST (memop);
10056
+ for (opno = 1; opno < recog_data.n_operands; opno++)
10058
+ rtx operand = recog_data.operand[opno];
10059
+ if (REG_P (operand)
10060
+ && reg_overlap_mentioned_p (load_reg, operand))
10069
+/* When working around the Cortex-A53 erratum 835769,
10070
+ given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
10071
+ instruction and has a preceding memory instruction such that a NOP
10072
+ should be inserted between them. */
10075
+aarch64_madd_needs_nop (rtx insn)
10077
+ enum attr_v8type attr_type;
10081
+ if (!aarch64_fix_a53_err835769)
10084
+ if (recog_memoized (insn) < 0)
10087
+ attr_type = get_attr_v8type (insn);
10088
+ if (!is_madd_op (attr_type))
10091
+ prev = aarch64_prev_real_insn (insn);
10092
+ /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
10093
+ Restore recog state to INSN to avoid state corruption. */
10094
+ extract_constrain_insn_cached (insn);
10096
+ if (!prev || !has_memory_op (prev))
10099
+ body = single_set (prev);
10101
+ /* If the previous insn is a memory op and there is no dependency between
10102
+ it and the madd, emit a nop between them. If we know it's a memop but
10103
+ body is NULL, return true to be safe. */
10104
+ if (GET_MODE (recog_data.operand[0]) == DImode
10105
+ && (!body || !dep_between_memop_and_curr (body)))
10112
+/* Implement FINAL_PRESCAN_INSN. */
10115
+aarch64_final_prescan_insn (rtx insn)
10117
+ if (aarch64_madd_needs_nop (insn))
10118
+ fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
10122
/* Return the equivalent letter for size. */
10123
static unsigned char
10124
sizetochar (int size)
10125
Index: gcc/config/aarch64/aarch64-elf-raw.h
10126
===================================================================
10127
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h (.../tags/gcc_4_8_3_release)
10128
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h (.../branches/gcc-4_8-branch)
10130
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
10131
#define ENDFILE_SPEC " crtend%O%s crtn%O%s"
10133
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
10134
+#define CA53_ERR_835769_SPEC \
10135
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
10137
+#define CA53_ERR_835769_SPEC \
10138
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
10142
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
10143
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
10144
+ CA53_ERR_835769_SPEC
10147
#endif /* GCC_AARCH64_ELF_RAW_H */
10148
Index: gcc/config/aarch64/aarch64-linux.h
10149
===================================================================
10150
--- a/src/gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release)
10151
+++ b/src/gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch)
10154
%{mbig-endian:-EB} %{mlittle-endian:-EL}"
10156
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
10157
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
10158
+#define CA53_ERR_835769_SPEC \
10159
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
10161
+#define CA53_ERR_835769_SPEC \
10162
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
10165
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
10166
+ CA53_ERR_835769_SPEC
10168
#define TARGET_OS_CPP_BUILTINS() \
10175
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
10177
#endif /* GCC_AARCH64_LINUX_H */
10178
Index: gcc/config/aarch64/aarch64.h
10179
===================================================================
10180
--- a/src/gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release)
10181
+++ b/src/gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch)
10182
@@ -465,6 +465,18 @@
10183
(TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
10186
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
10187
+ length so that conditional branching code is updated appropriately. */
10188
+#define ADJUST_INSN_LENGTH(insn, length) \
10191
+ if (aarch64_madd_needs_nop (insn)) \
10195
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
10196
+ aarch64_final_prescan_insn (INSN); \
10198
/* The processor for which instructions should be scheduled. */
10199
extern enum aarch64_processor aarch64_tune;
10201
Index: gcc/config/rs6000/constraints.md
10202
===================================================================
10203
--- a/src/gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release)
10204
+++ b/src/gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch)
10206
(define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
10207
"If -mmfpgpr was used, a floating point register or NO_REGS.")
10209
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
10210
+ "Floating point register if direct moves are available, or NO_REGS.")
10212
+;; At present, DImode is not allowed in the Altivec registers. If in the
10213
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
10214
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
10215
+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
10217
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
10218
+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
10220
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
10221
+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
10223
(define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
10224
"Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
10227
"Floating point register if the STFIWX instruction is enabled or NO_REGS.")
10229
(define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
10230
- "VSX vector register to hold scalar float values or NO_REGS.")
10231
+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
10233
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
10234
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
10235
Index: gcc/config/rs6000/predicates.md
10236
===================================================================
10237
--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release)
10238
+++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch)
10239
@@ -1795,7 +1795,7 @@
10240
(define_predicate "fusion_gpr_mem_load"
10241
(match_code "mem,sign_extend,zero_extend")
10244
+ rtx addr, base, offset;
10246
/* Handle sign/zero extend. */
10247
if (GET_CODE (op) == ZERO_EXTEND
10248
@@ -1825,24 +1825,79 @@
10251
addr = XEXP (op, 0);
10252
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10255
+ base = XEXP (addr, 0);
10256
+ if (!base_reg_operand (base, GET_MODE (base)))
10259
+ offset = XEXP (addr, 1);
10261
if (GET_CODE (addr) == PLUS)
10262
+ return satisfies_constraint_I (offset);
10264
+ else if (GET_CODE (addr) == LO_SUM)
10266
- rtx base = XEXP (addr, 0);
10267
- rtx offset = XEXP (addr, 1);
10268
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10269
+ return small_toc_ref (offset, GET_MODE (offset));
10271
- return (base_reg_operand (base, GET_MODE (base))
10272
- && satisfies_constraint_I (offset));
10273
+ else if (TARGET_ELF && !TARGET_POWERPC64)
10274
+ return CONSTANT_P (offset);
10277
- else if (GET_CODE (addr) == LO_SUM)
10281
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
10282
+;; memory field with both the addis and the memory offset. Sign extension
10283
+;; is not handled here, since lha and lwa are not fused.
10284
+(define_predicate "fusion_gpr_mem_combo"
10285
+ (match_code "mem,zero_extend")
10287
+ rtx addr, base, offset;
10289
+ /* Handle zero extend. */
10290
+ if (GET_CODE (op) == ZERO_EXTEND)
10292
- rtx base = XEXP (addr, 0);
10293
- rtx offset = XEXP (addr, 1);
10294
+ op = XEXP (op, 0);
10295
+ mode = GET_MODE (op);
10298
- if (!base_reg_operand (base, GET_MODE (base)))
10310
+ if (!TARGET_POWERPC64)
10314
- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10319
+ addr = XEXP (op, 0);
10320
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10323
+ base = XEXP (addr, 0);
10324
+ if (!fusion_gpr_addis (base, GET_MODE (base)))
10327
+ offset = XEXP (addr, 1);
10328
+ if (GET_CODE (addr) == PLUS)
10329
+ return satisfies_constraint_I (offset);
10331
+ else if (GET_CODE (addr) == LO_SUM)
10333
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10334
return small_toc_ref (offset, GET_MODE (offset));
10336
else if (TARGET_ELF && !TARGET_POWERPC64)
10337
Index: gcc/config/rs6000/htm.md
10338
===================================================================
10339
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
10340
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
10341
@@ -179,7 +179,7 @@
10343
UNSPECV_HTM_TABORTWCI))
10344
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
10345
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
10346
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
10347
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
10348
(and:SI (match_dup 3) (const_int 15)))
10349
(clobber (scratch:CC))])]
10350
Index: gcc/config/rs6000/freebsd64.h
10351
===================================================================
10352
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
10353
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
10354
@@ -367,7 +367,7 @@
10355
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
10356
#undef ADJUST_FIELD_ALIGN
10357
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
10358
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
10359
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
10362
&& TARGET_ALIGN_NATURAL == 0 \
10363
Index: gcc/config/rs6000/rs6000-protos.h
10364
===================================================================
10365
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
10366
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
10368
extern bool gpr_or_gpr_p (rtx, rtx);
10369
extern bool direct_move_p (rtx, rtx);
10370
extern bool quad_load_store_p (rtx, rtx);
10371
-extern bool fusion_gpr_load_p (rtx *, bool);
10372
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
10373
extern void expand_fusion_gpr_load (rtx *);
10374
-extern const char *emit_fusion_gpr_load (rtx *);
10375
+extern const char *emit_fusion_gpr_load (rtx, rtx);
10376
extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
10378
extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
10379
@@ -153,6 +153,7 @@
10382
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
10383
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
10384
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
10386
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
10387
@@ -161,7 +162,7 @@
10388
extern rtx rs6000_libcall_value (enum machine_mode);
10389
extern rtx rs6000_va_arg (tree, tree);
10390
extern int function_ok_for_sibcall (tree);
10391
-extern int rs6000_reg_parm_stack_space (tree);
10392
+extern int rs6000_reg_parm_stack_space (tree, bool);
10393
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
10394
extern bool rs6000_elf_in_small_data_p (const_tree);
10395
#ifdef ARGS_SIZE_RTX
10396
Index: gcc/config/rs6000/rs6000-builtin.def
10397
===================================================================
10398
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
10399
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
10400
@@ -622,20 +622,13 @@
10401
| RS6000_BTC_TERNARY), \
10402
CODE_FOR_ ## ICODE) /* ICODE */
10404
-/* Miscellaneous builtins. */
10405
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
10406
+/* 128-bit long double floating point builtins. */
10407
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
10408
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
10409
"__builtin_" NAME, /* NAME */ \
10410
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
10411
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
10412
+ | RS6000_BTM_LDBL128), \
10413
(RS6000_BTC_ ## ATTR /* ATTR */ \
10414
- | RS6000_BTC_UNARY), \
10415
- CODE_FOR_ ## ICODE) /* ICODE */
10417
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
10418
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
10419
- "__builtin_" NAME, /* NAME */ \
10420
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
10421
- (RS6000_BTC_ ## ATTR /* ATTR */ \
10422
| RS6000_BTC_BINARY), \
10423
CODE_FOR_ ## ICODE) /* ICODE */
10425
@@ -1593,10 +1586,8 @@
10426
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
10427
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
10429
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
10430
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
10431
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
10432
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
10433
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
10434
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
10436
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
10437
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
10438
Index: gcc/config/rs6000/rs6000-c.c
10439
===================================================================
10440
--- a/src/gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release)
10441
+++ b/src/gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch)
10442
@@ -3265,6 +3265,8 @@
10444
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
10445
RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
10446
+ { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
10447
+ RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
10448
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
10449
RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
10450
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
10451
@@ -3319,6 +3321,8 @@
10453
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
10454
RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
10455
+ { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
10456
+ RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
10457
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
10458
RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
10459
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
10460
@@ -4126,7 +4130,8 @@
10461
argument) is reversed. Patch the arguments here before building
10462
the resolved CALL_EXPR. */
10463
if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
10464
- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
10465
+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
10466
+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
10469
t = args[2], args[2] = args[1], args[1] = t;
10470
@@ -4184,6 +4189,14 @@
10471
if (TARGET_DEBUG_BUILTIN)
10472
fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
10473
(int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
10475
+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
10476
+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
10477
+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
10478
+assignment for unaligned loads and stores");
10479
+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
10480
+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
10481
+assignment for unaligned loads and stores");
10483
/* For now treat vec_splats and vec_promote as the same. */
10484
if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
10485
Index: gcc/config/rs6000/linux64.h
10486
===================================================================
10487
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release)
10488
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
10489
@@ -246,7 +246,7 @@
10490
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
10491
#undef ADJUST_FIELD_ALIGN
10492
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
10493
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
10494
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
10497
&& TARGET_ALIGN_NATURAL == 0 \
10498
Index: gcc/config/rs6000/rs6000.c
10499
===================================================================
10500
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
10501
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
10502
@@ -369,6 +369,7 @@
10503
enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
10504
enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
10505
addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
10506
+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
10509
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
10510
@@ -1704,8 +1705,7 @@
10512
if (TARGET_VSX && VSX_REGNO_P (regno)
10513
&& (VECTOR_MEM_VSX_P (mode)
10514
- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
10515
- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
10516
+ || reg_addr[mode].scalar_in_vmx_p
10517
|| (TARGET_VSX_TIMODE && mode == TImode)
10518
|| (TARGET_VADDUQM && mode == V1TImode)))
10520
@@ -1714,12 +1714,9 @@
10522
if (ALTIVEC_REGNO_P (regno))
10524
- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
10525
+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
10528
- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
10531
return ALTIVEC_REGNO_P (last_regno);
10534
@@ -1897,14 +1894,16 @@
10535
if (rs6000_vector_unit[m] != VECTOR_NONE
10536
|| rs6000_vector_mem[m] != VECTOR_NONE
10537
|| (reg_addr[m].reload_store != CODE_FOR_nothing)
10538
- || (reg_addr[m].reload_load != CODE_FOR_nothing))
10539
+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
10540
+ || reg_addr[m].scalar_in_vmx_p)
10543
- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
10544
+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
10545
rs6000_debug_vector_unit (rs6000_vector_unit[m]),
10546
rs6000_debug_vector_unit (rs6000_vector_mem[m]),
10547
(reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
10548
- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
10549
+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
10550
+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
10553
fputs ("\n", stderr);
10554
@@ -2021,6 +2020,10 @@
10555
"wd reg_class = %s\n"
10556
"wf reg_class = %s\n"
10557
"wg reg_class = %s\n"
10558
+ "wh reg_class = %s\n"
10559
+ "wi reg_class = %s\n"
10560
+ "wj reg_class = %s\n"
10561
+ "wk reg_class = %s\n"
10562
"wl reg_class = %s\n"
10563
"wm reg_class = %s\n"
10564
"wr reg_class = %s\n"
10565
@@ -2040,6 +2043,10 @@
10566
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
10567
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
10568
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
10569
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
10570
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
10571
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
10572
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
10573
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
10574
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
10575
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
10576
@@ -2324,6 +2331,8 @@
10578
for (m = 0; m < NUM_MACHINE_MODES; ++m)
10580
+ enum machine_mode m2 = (enum machine_mode)m;
10582
/* SDmode is special in that we want to access it only via REG+REG
10583
addressing on power7 and above, since we want to use the LFIWZX and
10584
STFIWZX instructions to load it. */
10585
@@ -2358,13 +2367,12 @@
10588
&& (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
10589
- && GET_MODE_SIZE (m) <= 8
10590
- && !VECTOR_MODE_P (m)
10591
- && !COMPLEX_MODE_P (m)
10592
+ && GET_MODE_SIZE (m2) <= 8
10593
+ && !VECTOR_MODE_P (m2)
10594
+ && !COMPLEX_MODE_P (m2)
10596
- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
10597
- && !(m == DFmode && TARGET_UPPER_REGS_DF)
10598
- && !(m == SFmode && TARGET_UPPER_REGS_SF))
10599
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
10600
+ && !reg_addr[m2].scalar_in_vmx_p)
10602
addr_mask |= RELOAD_REG_PRE_INCDEC;
10604
@@ -2595,16 +2603,22 @@
10605
f - Register class to use with traditional SFmode instructions.
10606
v - Altivec register.
10607
wa - Any VSX register.
10608
+ wc - Reserved to represent individual CR bits (used in LLVM).
10609
wd - Preferred register class for V2DFmode.
10610
wf - Preferred register class for V4SFmode.
10611
wg - Float register for power6x move insns.
10612
+ wh - FP register for direct move instructions.
10613
+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
10614
+ wj - FP or VSX register to hold 64-bit integers for direct moves.
10615
+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
10616
wl - Float register if we can do 32-bit signed int loads.
10617
wm - VSX register for ISA 2.07 direct move operations.
10618
+ wn - always NO_REGS.
10619
wr - GPR if 64-bit mode is permitted.
10620
ws - Register class to do ISA 2.06 DF operations.
10621
+ wt - VSX register for TImode in VSX registers.
10622
wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
10623
wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
10624
- wt - VSX register for TImode in VSX registers.
10625
ww - Register class to do SF conversions in with VSX operations.
10626
wx - Float register if we can do 32-bit int stores.
10627
wy - Register class to do ISA 2.07 SF operations.
10628
@@ -2611,21 +2625,22 @@
10629
wz - Float register if we can do 32-bit unsigned int loads. */
10631
if (TARGET_HARD_FLOAT && TARGET_FPRS)
10632
- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
10633
+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
10635
if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
10636
- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
10637
+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
10641
rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
10642
- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
10643
- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
10644
+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
10645
+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
10646
+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
10648
if (TARGET_VSX_TIMODE)
10649
- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
10650
+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
10652
- if (TARGET_UPPER_REGS_DF)
10653
+ if (TARGET_UPPER_REGS_DF) /* DFmode */
10655
rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
10656
rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
10657
@@ -2639,19 +2654,26 @@
10658
if (TARGET_ALTIVEC)
10659
rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
10661
- if (TARGET_MFPGPR)
10662
+ if (TARGET_MFPGPR) /* DFmode */
10663
rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
10666
- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
10667
+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
10669
if (TARGET_DIRECT_MOVE)
10670
- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
10672
+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
10673
+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
10674
+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
10675
+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
10676
+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
10677
+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
10680
if (TARGET_POWERPC64)
10681
rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
10683
- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
10684
+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
10686
rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
10687
rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
10688
@@ -2666,10 +2688,10 @@
10689
rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
10692
- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
10693
+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
10696
- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
10697
+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
10699
/* Set up the reload helper and direct move functions. */
10700
if (TARGET_VSX || TARGET_ALTIVEC)
10701
@@ -2692,10 +2714,11 @@
10702
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
10703
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
10705
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
10706
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
10707
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
10708
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
10709
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
10710
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
10711
+ reg_addr[DFmode].scalar_in_vmx_p = true;
10712
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
10713
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
10715
if (TARGET_P8_VECTOR)
10717
@@ -2703,6 +2726,8 @@
10718
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
10719
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
10720
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
10721
+ if (TARGET_UPPER_REGS_SF)
10722
+ reg_addr[SFmode].scalar_in_vmx_p = true;
10724
if (TARGET_VSX_TIMODE)
10726
@@ -2759,10 +2784,11 @@
10727
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
10728
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
10730
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
10731
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
10732
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
10733
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
10734
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
10735
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
10736
+ reg_addr[DFmode].scalar_in_vmx_p = true;
10737
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
10738
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
10740
if (TARGET_P8_VECTOR)
10742
@@ -2770,6 +2796,8 @@
10743
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
10744
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
10745
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
10746
+ if (TARGET_UPPER_REGS_SF)
10747
+ reg_addr[SFmode].scalar_in_vmx_p = true;
10749
if (TARGET_VSX_TIMODE)
10751
@@ -2810,6 +2838,7 @@
10753
for (m = 0; m < NUM_MACHINE_MODES; ++m)
10755
+ enum machine_mode m2 = (enum machine_mode)m;
10756
int reg_size2 = reg_size;
10758
/* TFmode/TDmode always takes 2 registers, even in VSX. */
10759
@@ -2818,7 +2847,7 @@
10760
reg_size2 = UNITS_PER_FP_WORD;
10762
rs6000_class_max_nregs[m][c]
10763
- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
10764
+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
10768
@@ -3014,7 +3043,8 @@
10769
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
10770
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
10771
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
10772
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
10773
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
10774
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
10777
/* Override command line options. Mostly we process the processor type and
10778
@@ -5861,6 +5891,34 @@
10782
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
10785
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
10787
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
10789
+ if (computed != 128)
10791
+ static bool warned;
10792
+ if (!warned && warn_psabi)
10795
+ inform (input_location,
10796
+ "the layout of aggregates containing vectors with"
10797
+ " %d-byte alignment will change in a future GCC release",
10798
+ computed / BITS_PER_UNIT);
10801
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
10802
+ keep the special treatment of vector types, but warn if there will
10803
+ be differences in future GCC releases. */
10810
/* AIX increases natural record alignment to doubleword if the first
10811
field is an FP double while the FP fields remain word aligned. */
10813
@@ -6109,7 +6167,8 @@
10816
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
10817
- gcc_assert (extra >= 0);
10821
if (GET_CODE (addr) == LO_SUM)
10822
/* For lo_sum addresses, we must allow any offset except one that
10823
@@ -9198,14 +9257,51 @@
10824
|| (type && TREE_CODE (type) == VECTOR_TYPE
10825
&& int_size_in_bytes (type) >= 16))
10827
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
10828
- || DEFAULT_ABI == ABI_ELFv2
10829
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
10830
- && mode == BLKmode
10831
- && type && TYPE_ALIGN (type) > 64)
10833
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
10834
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
10835
+ -mcompat-align-parm is used. */
10836
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
10837
+ || DEFAULT_ABI == ABI_ELFv2)
10838
+ && type && TYPE_ALIGN (type) > 64)
10840
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
10841
+ or homogeneous float/vector aggregates here. We already handled
10842
+ vector aggregates above, but still need to check for float here. */
10843
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
10844
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
10846
+ /* We used to check for BLKmode instead of the above aggregate type
10847
+ check. Warn when this results in any difference to the ABI. */
10848
+ if (aggregate_p != (mode == BLKmode))
10850
+ static bool warned;
10851
+ if (!warned && warn_psabi)
10854
+ inform (input_location,
10855
+ "the ABI of passing aggregates with %d-byte alignment"
10856
+ " will change in a future GCC release",
10857
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
10861
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
10862
+ keep using the BLKmode check, but warn if there will be differences
10863
+ in future GCC releases. */
10864
+ if (mode == BLKmode)
10868
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
10869
+ implement the "aggregate type" check as a BLKmode check here; this
10870
+ means certain aggregate types are in fact not aligned. */
10871
+ if (TARGET_MACHO && rs6000_darwin64_abi
10872
+ && mode == BLKmode
10873
+ && type && TYPE_ALIGN (type) > 64)
10876
- return PARM_BOUNDARY;
10878
+ return PARM_BOUNDARY;
10881
/* The offset in words to the start of the parameter save area. */
10882
@@ -10243,6 +10339,7 @@
10885
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
10888
/* Do we also need to pass this argument in the parameter
10890
@@ -10271,6 +10368,37 @@
10891
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
10894
+ /* If there were not enough FPRs to hold the argument, the rest
10895
+ usually goes into memory. However, if the current position
10896
+ is still within the register parameter area, a portion may
10897
+ actually have to go into GPRs.
10899
+ Note that it may happen that the portion of the argument
10900
+ passed in the first "half" of the first GPR was already
10901
+ passed in the last FPR as well.
10903
+ For unnamed arguments, we already set up GPRs to cover the
10904
+ whole argument in rs6000_psave_function_arg, so there is
10905
+ nothing further to do at this point.
10907
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
10908
+ GCC releases. To avoid any ABI change on the release branch,
10909
+ we retain that original implementation here, but warn if we
10910
+ encounter a case where the ABI will change in the future. */
10911
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
10912
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
10913
+ && cum->nargs_prototype > 0)
10915
+ static bool warned;
10916
+ if (!warned && warn_psabi)
10919
+ inform (input_location,
10920
+ "the ABI of passing homogeneous float aggregates"
10921
+ " will change in a future GCC release");
10925
return rs6000_finish_function_arg (mode, rvec, k);
10927
else if (align_words < GP_ARG_NUM_REG)
10928
@@ -10497,10 +10625,9 @@
10929
list, or passes any parameter in memory. */
10932
-rs6000_function_parms_need_stack (tree fun)
10933
+rs6000_function_parms_need_stack (tree fun, bool incoming)
10935
- function_args_iterator args_iter;
10937
+ tree fntype, result;
10938
CUMULATIVE_ARGS args_so_far_v;
10939
cumulative_args_t args_so_far;
10941
@@ -10507,26 +10634,57 @@
10943
/* Must be a libcall, all of which only use reg parms. */
10948
- fun = TREE_TYPE (fun);
10949
+ fntype = TREE_TYPE (fun);
10951
/* Varargs functions need the parameter save area. */
10952
- if (!prototype_p (fun) || stdarg_p (fun))
10953
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
10956
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
10957
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
10958
args_so_far = pack_cumulative_args (&args_so_far_v);
10960
- if (aggregate_value_p (TREE_TYPE (fun), fun))
10961
+ /* When incoming, we will have been passed the function decl.
10962
+ It is necessary to use the decl to handle K&R style functions,
10963
+ where TYPE_ARG_TYPES may not be available. */
10966
- tree type = build_pointer_type (TREE_TYPE (fun));
10967
- rs6000_parm_needs_stack (args_so_far, type);
10968
+ gcc_assert (DECL_P (fun));
10969
+ result = DECL_RESULT (fun);
10972
+ result = TREE_TYPE (fntype);
10974
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
10975
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
10977
+ if (result && aggregate_value_p (result, fntype))
10979
+ if (!TYPE_P (result))
10980
+ result = TREE_TYPE (result);
10981
+ result = build_pointer_type (result);
10982
+ rs6000_parm_needs_stack (args_so_far, result);
10989
+ for (parm = DECL_ARGUMENTS (fun);
10990
+ parm && parm != void_list_node;
10991
+ parm = TREE_CHAIN (parm))
10992
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
10997
+ function_args_iterator args_iter;
11000
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
11001
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
11008
@@ -10537,7 +10695,7 @@
11009
all parameters in registers. */
11012
-rs6000_reg_parm_stack_space (tree fun)
11013
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
11015
int reg_parm_stack_space;
11017
@@ -10555,7 +10713,7 @@
11019
/* ??? Recomputing this every time is a bit expensive. Is there
11020
a place to cache this information? */
11021
- if (rs6000_function_parms_need_stack (fun))
11022
+ if (rs6000_function_parms_need_stack (fun, incoming))
11023
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
11025
reg_parm_stack_space = 0;
11026
@@ -13544,11 +13702,15 @@
11027
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
11028
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
11029
error ("Builtin function %s requires the -mhard-dfp and"
11030
- "-mpower8-vector options", name);
11031
+ " -mpower8-vector options", name);
11032
else if ((fnmask & RS6000_BTM_DFP) != 0)
11033
error ("Builtin function %s requires the -mhard-dfp option", name);
11034
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
11035
error ("Builtin function %s requires the -mpower8-vector option", name);
11036
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
11037
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
11038
+ error ("Builtin function %s requires the -mhard-float and"
11039
+ " -mlong-double-128 options", name);
11040
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
11041
error ("Builtin function %s requires the -mhard-float option", name);
11043
@@ -13649,8 +13811,8 @@
11044
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
11045
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
11047
- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
11048
- : (int) CODE_FOR_altivec_lvsl);
11049
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
11050
+ : (int) CODE_FOR_altivec_lvsl_direct);
11051
enum machine_mode tmode = insn_data[icode].operand[0].mode;
11052
enum machine_mode mode = insn_data[icode].operand[1].mode;
11054
@@ -13678,7 +13840,6 @@
11055
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
11056
target = gen_reg_rtx (tmode);
11058
- /*pat = gen_altivec_lvsr (target, op);*/
11059
pat = GEN_FCN (icode) (target, op);
11062
@@ -17099,7 +17260,14 @@
11063
prefer Altivec loads.. */
11064
if (rclass == VSX_REGS)
11066
- if (GET_MODE_SIZE (mode) <= 8)
11067
+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
11069
+ rtx addr = XEXP (x, 0);
11070
+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
11071
+ || legitimate_lo_sum_address_p (mode, addr, false))
11072
+ return FLOAT_REGS;
11074
+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
11077
if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
11078
@@ -31413,6 +31581,7 @@
11079
{ "htm", RS6000_BTM_HTM, false, false },
11080
{ "hard-dfp", RS6000_BTM_DFP, false, false },
11081
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
11082
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
11085
/* Option variables that we want to support inside attribute((target)) and
11086
@@ -32663,25 +32832,14 @@
11088
/* Return true if the peephole2 can combine a load involving a combination of
11089
an addis instruction and a load with an offset that can be fused together on
11093
- The operands are:
11094
- operands[0] register set with addis
11095
- operands[1] value set via addis
11096
- operands[2] target register being loaded
11097
- operands[3] D-form memory reference using operands[0].
11099
- In addition, we are passed a boolean that is true if this is a peephole2,
11100
- and we can use see if the addis_reg is dead after the insn and can be
11101
- replaced by the target register. */
11104
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
11105
+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
11106
+ rtx addis_value, /* addis value. */
11107
+ rtx target, /* target register that is loaded. */
11108
+ rtx mem) /* bottom part of the memory addr. */
11110
- rtx addis_reg = operands[0];
11111
- rtx addis_value = operands[1];
11112
- rtx target = operands[2];
11113
- rtx mem = operands[3];
11117
@@ -32695,9 +32853,6 @@
11118
if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
11121
- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
11124
/* Allow sign/zero extension. */
11125
if (GET_CODE (mem) == ZERO_EXTEND
11126
|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
11127
@@ -32706,22 +32861,22 @@
11131
+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
11134
addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
11135
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11138
/* Validate that the register used to load the high value is either the
11139
- register being loaded, or we can safely replace its use in a peephole2.
11140
+ register being loaded, or we can safely replace its use.
11142
- If this is a peephole2, we assume that there are 2 instructions in the
11143
- peephole (addis and load), so we want to check if the target register was
11144
- not used in the memory address and the register to hold the addis result
11145
- is dead after the peephole. */
11146
+ This function is only called from the peephole2 pass and we assume that
11147
+ there are 2 instructions in the peephole (addis and load), so we want to
11148
+ check if the target register was not used in the memory address and the
11149
+ register to hold the addis result is dead after the peephole. */
11150
if (REGNO (addis_reg) != REGNO (target))
11155
if (reg_mentioned_p (target, mem))
11158
@@ -32762,9 +32917,6 @@
11159
enum machine_mode extend_mode = target_mode;
11160
enum machine_mode ptr_mode = Pmode;
11161
enum rtx_code extend = UNKNOWN;
11162
- rtx addis_reg = ((ptr_mode == target_mode)
11164
- : simplify_subreg (ptr_mode, target, target_mode, 0));
11166
if (GET_CODE (orig_mem) == ZERO_EXTEND
11167
|| (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
11168
@@ -32781,13 +32933,14 @@
11169
gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
11171
offset = XEXP (orig_addr, 1);
11172
- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
11173
- new_mem = change_address (orig_mem, target_mode, new_addr);
11174
+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
11175
+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
11177
if (extend != UNKNOWN)
11178
new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
11180
- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
11181
+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
11182
+ UNSPEC_FUSION_GPR);
11183
emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
11185
if (extend == SIGN_EXTEND)
11186
@@ -32806,55 +32959,40 @@
11189
/* Return a string to fuse an addis instruction with a gpr load to the same
11190
- register that we loaded up the addis instruction. The code is complicated,
11191
- so we call output_asm_insn directly, and just return "".
11192
+ register that we loaded up the addis instruction. The address that is used
11193
+ is the logical address that was formed during peephole2:
11194
+ (lo_sum (high) (low-part))
11196
- The operands are:
11197
- operands[0] register set with addis (must be same reg as target).
11198
- operands[1] value set via addis
11199
- operands[2] target register being loaded
11200
- operands[3] D-form memory reference using operands[0]. */
11201
+ The code is complicated, so we call output_asm_insn directly, and just
11205
-emit_fusion_gpr_load (rtx *operands)
11206
+emit_fusion_gpr_load (rtx target, rtx mem)
11208
- rtx addis_reg = operands[0];
11209
- rtx addis_value = operands[1];
11210
- rtx target = operands[2];
11211
- rtx mem = operands[3];
11216
const char *addis_str = NULL;
11217
const char *load_str = NULL;
11218
- const char *extend_insn = NULL;
11219
const char *mode_name = NULL;
11220
char insn_template[80];
11221
enum machine_mode mode;
11222
const char *comment_str = ASM_COMMENT_START;
11223
- bool sign_p = false;
11225
- gcc_assert (REG_P (addis_reg) && REG_P (target));
11226
- gcc_assert (REGNO (addis_reg) == REGNO (target));
11227
+ if (GET_CODE (mem) == ZERO_EXTEND)
11228
+ mem = XEXP (mem, 0);
11230
+ gcc_assert (REG_P (target) && MEM_P (mem));
11232
if (*comment_str == ' ')
11235
- /* Allow sign/zero extension. */
11236
- if (GET_CODE (mem) == ZERO_EXTEND)
11237
- mem = XEXP (mem, 0);
11239
- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
11242
- mem = XEXP (mem, 0);
11245
- gcc_assert (MEM_P (mem));
11246
addr = XEXP (mem, 0);
11247
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11248
gcc_unreachable ();
11250
+ addis_value = XEXP (addr, 0);
11251
load_offset = XEXP (addr, 1);
11253
/* Now emit the load instruction to the same register. */
11254
@@ -32864,29 +33002,22 @@
11256
mode_name = "char";
11258
- extend_insn = "extsb %0,%0";
11262
mode_name = "short";
11264
- extend_insn = "extsh %0,%0";
11270
- extend_insn = "extsw %0,%0";
11274
- if (TARGET_POWERPC64)
11276
- mode_name = "long";
11280
- gcc_unreachable ();
11281
+ gcc_assert (TARGET_POWERPC64);
11282
+ mode_name = "long";
11287
@@ -33030,14 +33161,6 @@
11289
fatal_insn ("Unable to generate load offset for fusion", load_offset);
11291
- /* Handle sign extension. The peephole2 pass generates this as a separate
11292
- insn, but we handle it just in case it got reattached. */
11295
- gcc_assert (extend_insn != NULL);
11296
- output_asm_insn (extend_insn, fuse_ops);
11302
Index: gcc/config/rs6000/vsx.md
11303
===================================================================
11304
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
11305
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
11307
;; Iterator for the 2 64-bit vector types
11308
(define_mode_iterator VSX_D [V2DF V2DI])
11310
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
11311
+;; lxvd2x to properly handle swapping words on little endian
11312
+(define_mode_iterator VSX_LE [V2DF
11315
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
11317
;; Iterator for the 2 32-bit vector types
11318
(define_mode_iterator VSX_W [V4SF V4SI])
11320
@@ -79,19 +86,26 @@
11331
-;; Map the register class used for float<->int conversions
11332
+;; Map the register class used for float<->int conversions (floating point side)
11333
+;; VSr2 is the preferred register class, VSr3 is any register class that will
11335
(define_mode_attr VSr2 [(V2DF "wd")
11342
(define_mode_attr VSr3 [(V2DF "wa")
11349
;; Map the register class for sp<->dp float conversions, destination
11350
(define_mode_attr VSr4 [(SF "ws")
11351
@@ -99,12 +113,27 @@
11355
-;; Map the register class for sp<->dp float conversions, destination
11356
+;; Map the register class for sp<->dp float conversions, source
11357
(define_mode_attr VSr5 [(SF "ws")
11362
+;; The VSX register class that a type can occupy, even if it is not the
11363
+;; preferred register class (VSr is the preferred register class that will get
11364
+;; allocated first).
11365
+(define_mode_attr VSa [(V16QI "wa")
11377
;; Same size integer type for floating point data
11378
(define_mode_attr VSi [(V4SF "v4si")
11380
@@ -200,6 +229,16 @@
11384
+;; Map register class for 64-bit element in 128-bit vector for direct moves
11386
+(define_mode_attr VS_64dm [(V2DF "wk")
11389
+;; Map register class for 64-bit element in 128-bit vector for normal register
11390
+;; to register moves
11391
+(define_mode_attr VS_64reg [(V2DF "ws")
11394
;; Constants for creating unspecs
11395
(define_c_enum "unspec"
11397
@@ -228,8 +267,8 @@
11398
;; The patterns for LE permuted loads and stores come before the general
11399
;; VSX moves so they match first.
11400
(define_insn_and_split "*vsx_le_perm_load_<mode>"
11401
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
11402
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
11403
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
11404
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
11405
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11407
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11408
@@ -251,7 +290,7 @@
11409
(set_attr "length" "8")])
11411
(define_insn_and_split "*vsx_le_perm_load_<mode>"
11412
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
11413
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
11414
(match_operand:VSX_W 1 "memory_operand" "Z"))]
11415
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11417
@@ -342,8 +381,8 @@
11418
(set_attr "length" "8")])
11420
(define_insn "*vsx_le_perm_store_<mode>"
11421
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
11422
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
11423
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
11424
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
11425
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11427
[(set_attr "type" "vecstore")
11428
@@ -350,8 +389,8 @@
11429
(set_attr "length" "12")])
11432
- [(set (match_operand:VSX_D 0 "memory_operand" "")
11433
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
11434
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
11435
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
11436
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
11437
[(set (match_dup 2)
11439
@@ -369,8 +408,8 @@
11440
;; The post-reload split requires that we re-permute the source
11441
;; register in case it is still live.
11443
- [(set (match_operand:VSX_D 0 "memory_operand" "")
11444
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
11445
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
11446
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
11447
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
11448
[(set (match_dup 1)
11450
@@ -388,7 +427,7 @@
11452
(define_insn "*vsx_le_perm_store_<mode>"
11453
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
11454
- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
11455
+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
11456
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11458
[(set_attr "type" "vecstore")
11459
@@ -578,8 +617,8 @@
11462
(define_insn "*vsx_mov<mode>"
11463
- [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?wa,?wa,wQ,?&r,??Y,??r,??r,<VSr>,?wa,*r,v,wZ, v")
11464
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
11465
+ [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ, v")
11466
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
11467
"VECTOR_MEM_VSX_P (<MODE>mode)
11468
&& (register_operand (operands[0], <MODE>mode)
11469
|| register_operand (operands[1], <MODE>mode))"
11470
@@ -681,9 +720,9 @@
11471
;; instructions are now combined with the insn for the traditional floating
11473
(define_insn "*vsx_add<mode>3"
11474
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11475
- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11476
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11477
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11478
+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11479
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11480
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11481
"xvadd<VSs> %x0,%x1,%x2"
11482
[(set_attr "type" "<VStype_simple>")
11483
@@ -690,9 +729,9 @@
11484
(set_attr "fp_type" "<VSfptype_simple>")])
11486
(define_insn "*vsx_sub<mode>3"
11487
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11488
- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11489
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11490
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11491
+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11492
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11493
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11494
"xvsub<VSs> %x0,%x1,%x2"
11495
[(set_attr "type" "<VStype_simple>")
11496
@@ -699,9 +738,9 @@
11497
(set_attr "fp_type" "<VSfptype_simple>")])
11499
(define_insn "*vsx_mul<mode>3"
11500
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11501
- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11502
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11503
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11504
+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11505
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11506
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11507
"xvmul<VSs> %x0,%x1,%x2"
11508
[(set_attr "type" "<VStype_simple>")
11509
@@ -708,9 +747,9 @@
11510
(set_attr "fp_type" "<VSfptype_mul>")])
11512
(define_insn "*vsx_div<mode>3"
11513
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11514
- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11515
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11516
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11517
+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11518
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11519
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11520
"xvdiv<VSs> %x0,%x1,%x2"
11521
[(set_attr "type" "<VStype_div>")
11522
@@ -746,8 +785,8 @@
11524
(define_insn "*vsx_tdiv<mode>3_internal"
11525
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
11526
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
11527
- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
11528
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
11529
+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
11531
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11532
"x<VSv>tdiv<VSs> %0,%x1,%x2"
11533
@@ -755,8 +794,8 @@
11534
(set_attr "fp_type" "<VSfptype_simple>")])
11536
(define_insn "vsx_fre<mode>2"
11537
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11538
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11539
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11540
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11542
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11543
"xvre<VSs> %x0,%x1"
11544
@@ -764,8 +803,8 @@
11545
(set_attr "fp_type" "<VSfptype_simple>")])
11547
(define_insn "*vsx_neg<mode>2"
11548
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11549
- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
11550
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11551
+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
11552
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11553
"xvneg<VSs> %x0,%x1"
11554
[(set_attr "type" "<VStype_simple>")
11555
@@ -772,8 +811,8 @@
11556
(set_attr "fp_type" "<VSfptype_simple>")])
11558
(define_insn "*vsx_abs<mode>2"
11559
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11560
- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
11561
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11562
+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
11563
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11564
"xvabs<VSs> %x0,%x1"
11565
[(set_attr "type" "<VStype_simple>")
11566
@@ -780,10 +819,10 @@
11567
(set_attr "fp_type" "<VSfptype_simple>")])
11569
(define_insn "vsx_nabs<mode>2"
11570
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11571
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11574
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
11575
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
11576
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11577
"xvnabs<VSs> %x0,%x1"
11578
[(set_attr "type" "<VStype_simple>")
11579
@@ -790,9 +829,9 @@
11580
(set_attr "fp_type" "<VSfptype_simple>")])
11582
(define_insn "vsx_smax<mode>3"
11583
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11584
- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11585
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11586
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11587
+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11588
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11589
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11590
"xvmax<VSs> %x0,%x1,%x2"
11591
[(set_attr "type" "<VStype_simple>")
11592
@@ -799,9 +838,9 @@
11593
(set_attr "fp_type" "<VSfptype_simple>")])
11595
(define_insn "*vsx_smin<mode>3"
11596
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11597
- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11598
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11599
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11600
+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11601
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11602
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11603
"xvmin<VSs> %x0,%x1,%x2"
11604
[(set_attr "type" "<VStype_simple>")
11605
@@ -808,8 +847,8 @@
11606
(set_attr "fp_type" "<VSfptype_simple>")])
11608
(define_insn "*vsx_sqrt<mode>2"
11609
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11610
- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
11611
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11612
+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
11613
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11614
"xvsqrt<VSs> %x0,%x1"
11615
[(set_attr "type" "<VStype_sqrt>")
11616
@@ -816,8 +855,8 @@
11617
(set_attr "fp_type" "<VSfptype_sqrt>")])
11619
(define_insn "*vsx_rsqrte<mode>2"
11620
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11621
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11622
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11623
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11625
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11626
"xvrsqrte<VSs> %x0,%x1"
11627
@@ -852,7 +891,7 @@
11629
(define_insn "*vsx_tsqrt<mode>2_internal"
11630
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
11631
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11632
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11633
UNSPEC_VSX_TSQRT))]
11634
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11635
"x<VSv>tsqrt<VSs> %0,%x1"
11636
@@ -865,11 +904,11 @@
11639
(define_insn "*vsx_fmav4sf4"
11640
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
11641
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
11643
- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
11644
- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
11645
- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
11646
+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
11647
+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
11648
+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
11649
"VECTOR_UNIT_VSX_P (V4SFmode)"
11651
xvmaddasp %x0,%x1,%x2
11652
@@ -880,11 +919,11 @@
11653
[(set_attr "type" "vecfloat")])
11655
(define_insn "*vsx_fmav2df4"
11656
- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
11657
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
11659
- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
11660
- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
11661
- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
11662
+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
11663
+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
11664
+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
11665
"VECTOR_UNIT_VSX_P (V2DFmode)"
11667
xvmaddadp %x0,%x1,%x2
11668
@@ -894,12 +933,12 @@
11669
[(set_attr "type" "vecdouble")])
11671
(define_insn "*vsx_fms<mode>4"
11672
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
11673
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
11675
- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
11676
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
11677
+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
11678
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
11680
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
11681
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
11682
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11684
xvmsuba<VSs> %x0,%x1,%x2
11685
@@ -909,12 +948,12 @@
11686
[(set_attr "type" "<VStype_mul>")])
11688
(define_insn "*vsx_nfma<mode>4"
11689
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
11690
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
11693
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
11694
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
11695
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
11696
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
11697
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
11698
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
11699
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11701
xvnmadda<VSs> %x0,%x1,%x2
11702
@@ -959,9 +998,9 @@
11704
;; Vector conditional expressions (no scalar version for these instructions)
11705
(define_insn "vsx_eq<mode>"
11706
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11707
- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11708
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11709
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11710
+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11711
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11712
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11713
"xvcmpeq<VSs> %x0,%x1,%x2"
11714
[(set_attr "type" "<VStype_simple>")
11715
@@ -968,9 +1007,9 @@
11716
(set_attr "fp_type" "<VSfptype_simple>")])
11718
(define_insn "vsx_gt<mode>"
11719
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11720
- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11721
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11722
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11723
+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11724
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11725
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11726
"xvcmpgt<VSs> %x0,%x1,%x2"
11727
[(set_attr "type" "<VStype_simple>")
11728
@@ -977,9 +1016,9 @@
11729
(set_attr "fp_type" "<VSfptype_simple>")])
11731
(define_insn "*vsx_ge<mode>"
11732
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11733
- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11734
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
11735
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11736
+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11737
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
11738
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11739
"xvcmpge<VSs> %x0,%x1,%x2"
11740
[(set_attr "type" "<VStype_simple>")
11741
@@ -990,10 +1029,10 @@
11742
(define_insn "*vsx_eq_<mode>_p"
11745
- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11746
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11747
+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11748
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11750
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11751
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11752
(eq:VSX_F (match_dup 1)
11754
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11755
@@ -1003,10 +1042,10 @@
11756
(define_insn "*vsx_gt_<mode>_p"
11759
- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11760
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11761
+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11762
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11764
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11765
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11766
(gt:VSX_F (match_dup 1)
11768
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11769
@@ -1016,10 +1055,10 @@
11770
(define_insn "*vsx_ge_<mode>_p"
11773
- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
11774
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
11775
+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
11776
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
11778
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11779
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11780
(ge:VSX_F (match_dup 1)
11782
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11783
@@ -1028,23 +1067,23 @@
11786
(define_insn "*vsx_xxsel<mode>"
11787
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
11788
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11789
(if_then_else:VSX_L
11790
- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
11791
+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
11792
(match_operand:VSX_L 4 "zero_constant" ""))
11793
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
11794
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
11795
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
11796
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
11797
"VECTOR_MEM_VSX_P (<MODE>mode)"
11798
"xxsel %x0,%x3,%x2,%x1"
11799
[(set_attr "type" "vecperm")])
11801
(define_insn "*vsx_xxsel<mode>_uns"
11802
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
11803
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11804
(if_then_else:VSX_L
11805
- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
11806
+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
11807
(match_operand:VSX_L 4 "zero_constant" ""))
11808
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
11809
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
11810
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
11811
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
11812
"VECTOR_MEM_VSX_P (<MODE>mode)"
11813
"xxsel %x0,%x3,%x2,%x1"
11814
[(set_attr "type" "vecperm")])
11815
@@ -1051,10 +1090,10 @@
11818
(define_insn "vsx_copysign<mode>3"
11819
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11820
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11822
- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
11823
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
11824
+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
11825
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
11827
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11828
"xvcpsgn<VSs> %x0,%x2,%x1"
11829
@@ -1067,7 +1106,7 @@
11830
;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
11831
;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
11832
(define_insn "vsx_float<VSi><mode>2"
11833
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
11834
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
11835
(float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
11836
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11837
"x<VSv>cvsx<VSc><VSs> %x0,%x1"
11838
@@ -1075,7 +1114,7 @@
11839
(set_attr "fp_type" "<VSfptype_simple>")])
11841
(define_insn "vsx_floatuns<VSi><mode>2"
11842
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
11843
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
11844
(unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
11845
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11846
"x<VSv>cvux<VSc><VSs> %x0,%x1"
11847
@@ -1084,7 +1123,7 @@
11849
(define_insn "vsx_fix_trunc<mode><VSi>2"
11850
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
11851
- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
11852
+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
11853
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11854
"x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
11855
[(set_attr "type" "<VStype_simple>")
11856
@@ -1092,7 +1131,7 @@
11858
(define_insn "vsx_fixuns_trunc<mode><VSi>2"
11859
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
11860
- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
11861
+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
11862
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11863
"x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
11864
[(set_attr "type" "<VStype_simple>")
11865
@@ -1100,8 +1139,8 @@
11867
;; Math rounding functions
11868
(define_insn "vsx_x<VSv>r<VSs>i"
11869
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11870
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11871
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11872
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11873
UNSPEC_VSX_ROUND_I))]
11874
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11875
"x<VSv>r<VSs>i %x0,%x1"
11876
@@ -1109,8 +1148,8 @@
11877
(set_attr "fp_type" "<VSfptype_simple>")])
11879
(define_insn "vsx_x<VSv>r<VSs>ic"
11880
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11881
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11882
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11883
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11884
UNSPEC_VSX_ROUND_IC))]
11885
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11886
"x<VSv>r<VSs>ic %x0,%x1"
11887
@@ -1118,8 +1157,8 @@
11888
(set_attr "fp_type" "<VSfptype_simple>")])
11890
(define_insn "vsx_btrunc<mode>2"
11891
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11892
- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
11893
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11894
+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
11895
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11896
"xvr<VSs>iz %x0,%x1"
11897
[(set_attr "type" "<VStype_simple>")
11898
@@ -1126,8 +1165,8 @@
11899
(set_attr "fp_type" "<VSfptype_simple>")])
11901
(define_insn "*vsx_b2trunc<mode>2"
11902
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
11903
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
11904
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11905
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
11907
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11908
"x<VSv>r<VSs>iz %x0,%x1"
11909
@@ -1135,8 +1174,8 @@
11910
(set_attr "fp_type" "<VSfptype_simple>")])
11912
(define_insn "vsx_floor<mode>2"
11913
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11914
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11915
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11916
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11918
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11919
"xvr<VSs>im %x0,%x1"
11920
@@ -1144,8 +1183,8 @@
11921
(set_attr "fp_type" "<VSfptype_simple>")])
11923
(define_insn "vsx_ceil<mode>2"
11924
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
11925
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
11926
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11927
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
11929
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11930
"xvr<VSs>ip %x0,%x1"
11931
@@ -1160,8 +1199,8 @@
11932
;; scalar single precision instructions internally use the double format.
11933
;; Prefer the altivec registers, since we likely will need to do a vperm
11934
(define_insn "vsx_<VS_spdp_insn>"
11935
- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
11936
- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
11937
+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
11938
+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
11939
UNSPEC_VSX_CVSPDP))]
11940
"VECTOR_UNIT_VSX_P (<MODE>mode)"
11941
"<VS_spdp_insn> %x0,%x1"
11942
@@ -1169,8 +1208,8 @@
11944
;; xscvspdp, represent the scalar SF type as V4SF
11945
(define_insn "vsx_xscvspdp"
11946
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
11947
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
11948
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
11949
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
11950
UNSPEC_VSX_CVSPDP))]
11951
"VECTOR_UNIT_VSX_P (V4SFmode)"
11953
@@ -1197,7 +1236,7 @@
11955
;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
11956
(define_insn "vsx_xscvdpspn"
11957
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
11958
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
11959
(unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
11960
UNSPEC_VSX_CVDPSPN))]
11962
@@ -1205,8 +1244,8 @@
11963
[(set_attr "type" "fp")])
11965
(define_insn "vsx_xscvspdpn"
11966
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
11967
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
11968
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
11969
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
11970
UNSPEC_VSX_CVSPDPN))]
11972
"xscvspdpn %x0,%x1"
11973
@@ -1213,8 +1252,8 @@
11974
[(set_attr "type" "fp")])
11976
(define_insn "vsx_xscvdpspn_scalar"
11977
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
11978
- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
11979
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
11980
+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
11981
UNSPEC_VSX_CVDPSPN))]
11983
"xscvdpspn %x0,%x1"
11984
@@ -1302,10 +1341,10 @@
11985
;; since the xsrdpiz instruction does not truncate the value if the floating
11986
;; point value is < LONG_MIN or > LONG_MAX.
11987
(define_insn "*vsx_float_fix_<mode>2"
11988
- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
11989
+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
11992
- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
11993
+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
11994
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
11995
&& VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
11996
&& !flag_trapping_math && TARGET_FRIZ"
11997
@@ -1318,10 +1357,10 @@
11999
;; Build a V2DF/V2DI vector from two scalars
12000
(define_insn "vsx_concat_<mode>"
12001
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
12002
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12004
- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
12005
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
12006
+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
12007
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
12008
"VECTOR_MEM_VSX_P (<MODE>mode)"
12010
if (BYTES_BIG_ENDIAN)
12011
@@ -1352,9 +1391,9 @@
12012
;; xxpermdi for little endian loads and stores. We need several of
12013
;; these since the form of the PARALLEL differs by mode.
12014
(define_insn "*vsx_xxpermdi2_le_<mode>"
12015
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
12016
- (vec_select:VSX_D
12017
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
12018
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
12019
+ (vec_select:VSX_LE
12020
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
12021
(parallel [(const_int 1) (const_int 0)])))]
12022
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12023
"xxpermdi %x0,%x1,%x1,2"
12024
@@ -1361,9 +1400,9 @@
12025
[(set_attr "type" "vecperm")])
12027
(define_insn "*vsx_xxpermdi4_le_<mode>"
12028
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
12029
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
12031
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
12032
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
12033
(parallel [(const_int 2) (const_int 3)
12034
(const_int 0) (const_int 1)])))]
12035
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12036
@@ -1401,9 +1440,9 @@
12037
;; lxvd2x for little endian loads. We need several of
12038
;; these since the form of the PARALLEL differs by mode.
12039
(define_insn "*vsx_lxvd2x2_le_<mode>"
12040
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
12041
- (vec_select:VSX_D
12042
- (match_operand:VSX_D 1 "memory_operand" "Z")
12043
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
12044
+ (vec_select:VSX_LE
12045
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
12046
(parallel [(const_int 1) (const_int 0)])))]
12047
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12049
@@ -1410,7 +1449,7 @@
12050
[(set_attr "type" "vecload")])
12052
(define_insn "*vsx_lxvd2x4_le_<mode>"
12053
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
12054
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
12056
(match_operand:VSX_W 1 "memory_operand" "Z")
12057
(parallel [(const_int 2) (const_int 3)
12058
@@ -1450,9 +1489,9 @@
12059
;; stxvd2x for little endian stores. We need several of
12060
;; these since the form of the PARALLEL differs by mode.
12061
(define_insn "*vsx_stxvd2x2_le_<mode>"
12062
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
12063
- (vec_select:VSX_D
12064
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
12065
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
12066
+ (vec_select:VSX_LE
12067
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
12068
(parallel [(const_int 1) (const_int 0)])))]
12069
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12071
@@ -1461,7 +1500,7 @@
12072
(define_insn "*vsx_stxvd2x4_le_<mode>"
12073
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
12075
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
12076
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
12077
(parallel [(const_int 2) (const_int 3)
12078
(const_int 0) (const_int 1)])))]
12079
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12080
@@ -1513,11 +1552,12 @@
12082
;; Set the element of a V2DI/VD2F mode
12083
(define_insn "vsx_set_<mode>"
12084
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
12085
- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
12086
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
12087
- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
12088
- UNSPEC_VSX_SET))]
12089
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
12091
+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
12092
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
12093
+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
12094
+ UNSPEC_VSX_SET))]
12095
"VECTOR_MEM_VSX_P (<MODE>mode)"
12097
int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
12098
@@ -1582,7 +1622,7 @@
12099
(define_insn_and_split "vsx_extract_v4sf"
12100
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
12102
- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
12103
+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
12104
(parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
12105
(clobber (match_scratch:V4SF 3 "=X,0"))]
12106
"VECTOR_UNIT_VSX_P (V4SFmode)"
12107
@@ -1606,7 +1646,7 @@
12109
if (GET_CODE (op3) == SCRATCH)
12110
op3 = gen_reg_rtx (V4SFmode);
12111
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
12112
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
12115
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
12116
@@ -1765,9 +1805,9 @@
12119
(define_insn "vsx_splat_<mode>"
12120
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
12121
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
12122
(vec_duplicate:VSX_D
12123
- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
12124
+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
12125
"VECTOR_MEM_VSX_P (<MODE>mode)"
12127
xxpermdi %x0,%x1,%x1,0
12128
@@ -1780,10 +1820,10 @@
12131
(define_insn "vsx_xxspltw_<mode>"
12132
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12133
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12134
(vec_duplicate:VSX_W
12135
(vec_select:<VS_scalar>
12136
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12137
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12139
[(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
12140
"VECTOR_MEM_VSX_P (<MODE>mode)"
12141
@@ -1796,8 +1836,8 @@
12142
[(set_attr "type" "vecperm")])
12144
(define_insn "vsx_xxspltw_<mode>_direct"
12145
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12146
- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12147
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12148
+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12149
(match_operand:QI 2 "u5bit_cint_operand" "i,i")]
12150
UNSPEC_VSX_XXSPLTW))]
12151
"VECTOR_MEM_VSX_P (<MODE>mode)"
12152
@@ -1806,11 +1846,11 @@
12154
;; V4SF/V4SI interleave
12155
(define_insn "vsx_xxmrghw_<mode>"
12156
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12157
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12159
(vec_concat:<VS_double>
12160
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12161
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
12162
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12163
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
12164
(parallel [(const_int 0) (const_int 4)
12165
(const_int 1) (const_int 5)])))]
12166
"VECTOR_MEM_VSX_P (<MODE>mode)"
12167
@@ -1823,11 +1863,11 @@
12168
[(set_attr "type" "vecperm")])
12170
(define_insn "vsx_xxmrglw_<mode>"
12171
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12172
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12174
(vec_concat:<VS_double>
12175
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12176
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
12177
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12178
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
12179
(parallel [(const_int 2) (const_int 6)
12180
(const_int 3) (const_int 7)])))]
12181
"VECTOR_MEM_VSX_P (<MODE>mode)"
12182
@@ -1841,9 +1881,9 @@
12184
;; Shift left double by word immediate
12185
(define_insn "vsx_xxsldwi_<mode>"
12186
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
12187
- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
12188
- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
12189
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
12190
+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
12191
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
12192
(match_operand:QI 3 "u5bit_cint_operand" "i")]
12193
UNSPEC_VSX_SLDWI))]
12194
"VECTOR_MEM_VSX_P (<MODE>mode)"
12195
@@ -1924,7 +1964,7 @@
12196
;; to the top element of the V2DF array without doing an extract.
12198
(define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
12199
- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
12200
+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
12204
Index: gcc/config/rs6000/rs6000.h
12205
===================================================================
12206
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
12207
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
12208
@@ -1438,6 +1438,10 @@
12209
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
12210
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
12211
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
12212
+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
12213
+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
12214
+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
12215
+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
12216
RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
12217
RS6000_CONSTRAINT_wm, /* VSX register for direct move */
12218
RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
12219
@@ -1462,6 +1466,9 @@
12220
#define VSX_REG_CLASS_P(CLASS) \
12221
((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
12223
+/* Return whether a given register class targets general purpose registers. */
12224
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
12226
/* Given an rtx X being reloaded into a reg required to be
12227
in class CLASS, return the class of reg to actually use.
12228
In general this is just CLASS; but on some machines
12229
@@ -1593,8 +1600,15 @@
12230
/* Define this if stack space is still allocated for a parameter passed
12231
in a register. The value is the number of bytes allocated to this
12233
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
12234
+#define REG_PARM_STACK_SPACE(FNDECL) \
12235
+ rs6000_reg_parm_stack_space ((FNDECL), false)
12237
+/* Define this macro if space guaranteed when compiling a function body
12238
+ is different to space required when making a call, a situation that
12239
+ can arise with K&R style function definitions. */
12240
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
12241
+ rs6000_reg_parm_stack_space ((FNDECL), true)
12243
/* Define this if the above stack space is to be considered part of the
12244
space allocated by the caller. */
12245
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
12246
@@ -2483,8 +2497,8 @@
12247
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
12249
/* Builtin targets. For now, we reuse the masks for those options that are in
12250
- target flags, and pick two random bits for SPE and paired which aren't in
12252
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
12253
+ aren't in target_flags. */
12254
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
12255
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
12256
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
12257
@@ -2501,6 +2515,7 @@
12258
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
12259
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
12260
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
12261
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
12263
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
12265
@@ -2514,7 +2529,8 @@
12266
| RS6000_BTM_POPCNTD \
12267
| RS6000_BTM_CELL \
12269
- | RS6000_BTM_HARD_FLOAT)
12270
+ | RS6000_BTM_HARD_FLOAT \
12271
+ | RS6000_BTM_LDBL128)
12273
/* Define builtin enum index. */
12275
Index: gcc/config/rs6000/altivec.md
12276
===================================================================
12277
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release)
12278
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
12279
@@ -2297,7 +2297,31 @@
12281
[(set_attr "type" "vecsimple")])
12283
-(define_insn "altivec_lvsl"
12284
+(define_expand "altivec_lvsl"
12285
+ [(use (match_operand:V16QI 0 "register_operand" ""))
12286
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
12289
+ if (VECTOR_ELT_ORDER_BIG)
12290
+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
12294
+ rtx mask, perm[16], constv, vperm;
12295
+ mask = gen_reg_rtx (V16QImode);
12296
+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
12297
+ for (i = 0; i < 16; ++i)
12298
+ perm[i] = GEN_INT (i);
12299
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
12300
+ constv = force_reg (V16QImode, constv);
12301
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
12303
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
12308
+(define_insn "altivec_lvsl_direct"
12309
[(set (match_operand:V16QI 0 "register_operand" "=v")
12310
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
12312
@@ -2305,7 +2329,31 @@
12314
[(set_attr "type" "vecload")])
12316
-(define_insn "altivec_lvsr"
12317
+(define_expand "altivec_lvsr"
12318
+ [(use (match_operand:V16QI 0 "register_operand" ""))
12319
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
12322
+ if (VECTOR_ELT_ORDER_BIG)
12323
+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
12327
+ rtx mask, perm[16], constv, vperm;
12328
+ mask = gen_reg_rtx (V16QImode);
12329
+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
12330
+ for (i = 0; i < 16; ++i)
12331
+ perm[i] = GEN_INT (i);
12332
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
12333
+ constv = force_reg (V16QImode, constv);
12334
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
12336
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
12341
+(define_insn "altivec_lvsr_direct"
12342
[(set (match_operand:V16QI 0 "register_operand" "=v")
12343
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
12345
Index: gcc/config/rs6000/rs6000.md
12346
===================================================================
12347
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
12348
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
12349
@@ -134,6 +134,7 @@
12350
UNSPEC_UNPACK_128BIT
12353
+ UNSPEC_FUSION_GPR
12357
@@ -317,8 +318,25 @@
12358
(define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
12360
; Definitions for 32-bit fpr direct move
12361
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
12362
+; At present, the decimal modes are not allowed in the traditional altivec
12363
+; registers, so restrict the constraints to just the traditional FPRs.
12364
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
12366
+; Definitions for 32-bit VSX
12367
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
12369
+; Definitions for 32-bit use of altivec registers
12370
+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
12372
+; Definitions for 64-bit VSX
12373
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
12375
+; Definitions for 64-bit direct move
12376
+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
12378
+; Definitions for 64-bit use of altivec registers
12379
+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
12381
; These modes do not fit in integer registers in 32-bit mode.
12382
; but on e500v2, the gpr are 64 bit registers
12383
(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
12384
@@ -424,7 +442,7 @@
12387
;; Mode attribute for boolean operation register constraints for output
12388
-(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
12389
+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
12391
(V16QI "wa,v,&?r,?r,?r")
12392
(V8HI "wa,v,&?r,?r,?r")
12393
@@ -435,7 +453,7 @@
12394
(V1TI "wa,v,&?r,?r,?r")])
12396
;; Mode attribute for boolean operation register constraints for operand1
12397
-(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
12398
+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
12400
(V16QI "wa,v,r,0,r")
12401
(V8HI "wa,v,r,0,r")
12402
@@ -446,7 +464,7 @@
12403
(V1TI "wa,v,r,0,r")])
12405
;; Mode attribute for boolean operation register constraints for operand2
12406
-(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
12407
+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
12409
(V16QI "wa,v,r,r,0")
12410
(V8HI "wa,v,r,r,0")
12411
@@ -459,7 +477,7 @@
12412
;; Mode attribute for boolean operation register constraints for operand1
12413
;; for one_cmpl. To simplify things, we repeat the constraint where 0
12414
;; is used for operand1 or operand2
12415
-(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
12416
+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
12418
(V16QI "wa,v,r,0,0")
12419
(V8HI "wa,v,r,0,0")
12420
@@ -566,7 +584,7 @@
12423
(define_insn "*zero_extendsidi2_lfiwzx"
12424
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
12425
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
12426
(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
12427
"TARGET_POWERPC64 && TARGET_LFIWZX"
12429
@@ -736,8 +754,8 @@
12432
(define_insn "*extendsidi2_lfiwax"
12433
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
12434
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
12435
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
12436
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
12437
"TARGET_POWERPC64 && TARGET_LFIWAX"
12440
@@ -760,7 +778,7 @@
12442
(define_insn "*extendsidi2_nocell"
12443
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
12444
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
12445
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
12446
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
12449
@@ -5614,7 +5632,7 @@
12450
; We don't define lfiwax/lfiwzx with the normal definition, because we
12451
; don't want to support putting SImode in FPR registers.
12452
(define_insn "lfiwax"
12453
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
12454
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
12455
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
12457
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
12458
@@ -5694,7 +5712,7 @@
12459
(set_attr "type" "fpload")])
12461
(define_insn "lfiwzx"
12462
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
12463
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
12464
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
12466
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
12467
@@ -9210,8 +9228,8 @@
12470
(define_insn "mov<mode>_hardfloat"
12471
- [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,wa,wa,<f32_lr>,<f32_sm>,wu,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
12472
- (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,wa,j,<f32_lm>,<f32_sr>,Z,wu,r,<f32_dm>,r,h,0,G,Fn"))]
12473
+ [(set (match_operand:FMOVE32 0 "nonimmediate_operand" "=!r,!r,m,f,<f32_vsx>,<f32_vsx>,<f32_lr>,<f32_sm>,<f32_av>,Z,?<f32_dm>,?r,*c*l,!r,*h,!r,!r")
12474
+ (match_operand:FMOVE32 1 "input_operand" "r,m,r,f,<f32_vsx>,j,<f32_lm>,<f32_sr>,Z,<f32_av>,r,<f32_dm>,r, h, 0, G,Fn"))]
12475
"(gpc_reg_operand (operands[0], <MODE>mode)
12476
|| gpc_reg_operand (operands[1], <MODE>mode))
12477
&& (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
12478
@@ -9422,8 +9440,8 @@
12481
(define_insn "*mov<mode>_hardfloat32"
12482
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
12483
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
12484
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
12485
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
12486
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
12487
&& (gpc_reg_operand (operands[0], <MODE>mode)
12488
|| gpc_reg_operand (operands[1], <MODE>mode))"
12489
@@ -9491,8 +9509,8 @@
12490
; ld/std require word-aligned displacements -> 'Y' constraint.
12491
; List Y->r and r->Y before r->r for reload.
12492
(define_insn "*mov<mode>_hardfloat64"
12493
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,wm")
12494
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,r,h,0,G,H,F,wg,r,wm,r"))]
12495
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,*c*l,!r,*h,!r,!r,!r,r,wg,r,<f64_dm>")
12496
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,r,h,0,G,H,F,wg,r,<f64_dm>,r"))]
12497
"TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
12498
&& (gpc_reg_operand (operands[0], <MODE>mode)
12499
|| gpc_reg_operand (operands[1], <MODE>mode))"
12500
@@ -10272,8 +10290,8 @@
12501
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
12503
(define_insn "*movdi_internal64"
12504
- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
12505
- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
12506
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
12507
+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
12509
&& (gpc_reg_operand (operands[0], DImode)
12510
|| gpc_reg_operand (operands[1], DImode))"
12511
@@ -10293,7 +10311,8 @@
12517
+ xxlxor %x0,%x0,%x0"
12518
[(set_attr_alternative "type"
12520
(match_test "update_indexed_address_mem (operands[0], VOIDmode)")
12521
@@ -10334,8 +10353,9 @@
12522
(const_string "mftgpr")
12523
(const_string "mffgpr")
12524
(const_string "mftgpr")
12525
- (const_string "mffgpr")])
12526
- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
12527
+ (const_string "mffgpr")
12528
+ (const_string "vecsimple")])
12529
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
12531
;; immediate value valid for a single instruction hiding in a const_double
12533
@@ -15751,23 +15771,10 @@
12534
;; a GPR. The addis instruction must be adjacent to the load, and use the same
12535
;; register that is being loaded. The fused ops must be physically adjacent.
12537
-;; We use define_peephole for the actual addis/load, and the register used to
12538
-;; hold the addis value must be the same as the register being loaded. We use
12539
-;; define_peephole2 to change the register used for addis to be the register
12540
-;; being loaded, since we can look at whether it is dead after the load insn.
12541
+;; Find cases where the addis that feeds into a load instruction is either used
12542
+;; once or is the same as the target register, and replace it with the fusion
12546
- [(set (match_operand:P 0 "base_reg_operand" "")
12547
- (match_operand:P 1 "fusion_gpr_addis" ""))
12548
- (set (match_operand:INT1 2 "base_reg_operand" "")
12549
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
12550
- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
12552
- return emit_fusion_gpr_load (operands);
12554
- [(set_attr "type" "load")
12555
- (set_attr "length" "8")])
12558
[(set (match_operand:P 0 "base_reg_operand" "")
12559
(match_operand:P 1 "fusion_gpr_addis" ""))
12560
@@ -15774,9 +15781,8 @@
12561
(set (match_operand:INT1 2 "base_reg_operand" "")
12562
(match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
12564
- && (REGNO (operands[0]) != REGNO (operands[2])
12565
- || GET_CODE (operands[3]) == SIGN_EXTEND)
12566
- && fusion_gpr_load_p (operands, true)"
12567
+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
12571
expand_fusion_gpr_load (operands);
12572
@@ -15783,6 +15789,20 @@
12576
+;; Fusion insn, created by the define_peephole2 above (and eventually by
12579
+(define_insn "fusion_gpr_load_<mode>"
12580
+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
12581
+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
12582
+ UNSPEC_FUSION_GPR))]
12583
+ "TARGET_P8_FUSION"
12585
+ return emit_fusion_gpr_load (operands[0], operands[1]);
12587
+ [(set_attr "type" "load")
12588
+ (set_attr "length" "8")])
12591
;; Miscellaneous ISA 2.06 (power7) instructions
12592
(define_insn "addg6s"
12593
@@ -15847,26 +15867,6 @@
12597
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
12598
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
12601
-(define_expand "unpacktf_0"
12602
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
12603
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
12605
- UNSPEC_UNPACK_128BIT))]
12609
-(define_expand "unpacktf_1"
12610
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
12611
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
12613
- UNSPEC_UNPACK_128BIT))]
12617
(define_insn_and_split "unpack<mode>_dm"
12618
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
12620
Index: gcc/config/rs6000/sysv4.h
12621
===================================================================
12622
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release)
12623
+++ b/src/gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch)
12624
@@ -292,7 +292,7 @@
12625
/* An expression for the alignment of a structure field FIELD if the
12626
alignment computed in the usual way is COMPUTED. */
12627
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
12628
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
12629
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
12632
#undef BIGGEST_FIELD_ALIGNMENT
12633
@@ -949,3 +949,27 @@
12634
#define TARGET_USES_SYSV4_OPT 1
12636
#undef DBX_REGISTER_NUMBER
12638
+/* Link -lasan early on the command line. For -static-libasan, don't link
12639
+ it for -shared link, the executable should be compiled with -static-libasan
12640
+ in that case, and for executable link link with --{,no-}whole-archive around
12641
+ it to force everything into the executable. And similarly for -ltsan. */
12642
+#if defined(HAVE_LD_STATIC_DYNAMIC)
12643
+#undef LIBASAN_EARLY_SPEC
12644
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
12645
+ "%{static-libasan:%{!shared:" \
12646
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
12647
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
12648
+#undef LIBTSAN_EARLY_SPEC
12649
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
12650
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
12651
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
12654
+/* Additional libraries needed by -static-libasan. */
12655
+#undef STATIC_LIBASAN_LIBS
12656
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
12658
+/* Additional libraries needed by -static-libtsan. */
12659
+#undef STATIC_LIBTSAN_LIBS
12660
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
12661
Index: gcc/config/arm/arm.c
12662
===================================================================
12663
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
12664
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
12666
static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
12667
static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
12668
inline static int thumb1_index_register_rtx_p (rtx, int);
12669
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
12670
static int thumb_far_jump_used_p (void);
12671
static bool thumb_force_lr_save (void);
12672
static unsigned arm_size_return_regs (void);
12673
@@ -24476,9 +24475,13 @@
12674
fputs (":\n", file);
12677
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
12678
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
12679
rtx tem = XEXP (DECL_RTL (function), 0);
12680
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
12681
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
12682
+ pipeline offset is four rather than eight. Adjust the offset
12684
+ tem = plus_constant (GET_MODE (tem), tem,
12685
+ TARGET_THUMB1_ONLY ? -3 : -7);
12686
tem = gen_rtx_MINUS (GET_MODE (tem),
12688
gen_rtx_SYMBOL_REF (Pmode,
12689
@@ -27462,4 +27465,13 @@
12693
+/* return TRUE if x is a reference to a value in a constant pool */
12695
+arm_is_constant_pool_ref (rtx x)
12697
+ return (MEM_P (x)
12698
+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
12699
+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
12702
#include "gt-arm.h"
12703
Index: gcc/config/arm/arm.h
12704
===================================================================
12705
--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_3_release)
12706
+++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
12707
@@ -2082,9 +2082,10 @@
12708
? reverse_condition_maybe_unordered (code) \
12709
: reverse_condition (code))
12711
-/* The arm5 clz instruction returns 32. */
12712
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
12713
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
12714
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
12715
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
12716
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
12717
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
12719
#define CC_STATUS_INIT \
12720
do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
12721
Index: gcc/config/arm/arm-protos.h
12722
===================================================================
12723
--- a/src/gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release)
12724
+++ b/src/gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch)
12726
extern int legitimate_pic_operand_p (rtx);
12727
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
12728
extern rtx legitimize_tls_address (rtx, rtx);
12729
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
12730
extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
12731
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
12732
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
12733
@@ -286,4 +287,6 @@
12735
extern void arm_emit_eabi_attribute (const char *, int, int);
12737
+extern bool arm_is_constant_pool_ref (rtx);
12739
#endif /* ! GCC_ARM_PROTOS_H */
12740
Index: gcc/config/arm/constraints.md
12741
===================================================================
12742
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
12743
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
12745
;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
12747
;; The following memory constraints have been used:
12748
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
12749
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
12750
;; in ARM state: Uq
12751
;; in Thumb state: Uu, Uw
12753
@@ -310,6 +310,12 @@
12754
An address valid for loading/storing register exclusive"
12755
(match_operand 0 "mem_noofs_operand"))
12757
+(define_memory_constraint "Uh"
12759
+ An address suitable for byte and half-word loads which does not point inside a constant pool"
12760
+ (and (match_code "mem")
12761
+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
12763
(define_memory_constraint "Ut"
12765
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
12766
@@ -356,7 +362,8 @@
12767
(and (match_code "mem")
12768
(match_test "TARGET_ARM
12769
&& arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
12770
- SIGN_EXTEND, 0)")))
12772
+ && !arm_is_constant_pool_ref (op)")))
12774
(define_memory_constraint "Q"
12776
Index: gcc/config/arm/arm.md
12777
===================================================================
12778
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
12779
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
12780
@@ -4047,7 +4047,7 @@
12781
(define_insn "unaligned_loadhis"
12782
[(set (match_operand:SI 0 "s_register_operand" "=l,r")
12784
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
12785
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
12786
UNSPEC_UNALIGNED_LOAD)))]
12787
"unaligned_access && TARGET_32BIT"
12788
"ldr%(sh%)\t%0, %1\t@ unaligned"
12789
@@ -4655,7 +4655,7 @@
12791
(define_insn "*arm_zero_extendhisi2_v6"
12792
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
12793
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12794
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12795
"TARGET_ARM && arm_arch6"
12798
@@ -4748,7 +4748,7 @@
12800
(define_insn "*arm_zero_extendqisi2_v6"
12801
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
12802
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
12803
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
12804
"TARGET_ARM && arm_arch6"
12807
@@ -4980,7 +4980,7 @@
12809
(define_insn "*arm_extendhisi2"
12810
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
12811
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12812
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12813
"TARGET_ARM && arm_arch4 && !arm_arch6"
12816
@@ -4987,23 +4987,19 @@
12817
ldr%(sh%)\\t%0, %1"
12818
[(set_attr "length" "8,4")
12819
(set_attr "type" "alu_shift,load_byte")
12820
- (set_attr "predicable" "yes")
12821
- (set_attr "pool_range" "*,256")
12822
- (set_attr "neg_pool_range" "*,244")]
12823
+ (set_attr "predicable" "yes")]
12826
;; ??? Check Thumb-2 pool range
12827
(define_insn "*arm_extendhisi2_v6"
12828
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
12829
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
12830
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
12831
"TARGET_32BIT && arm_arch6"
12834
ldr%(sh%)\\t%0, %1"
12835
[(set_attr "type" "simple_alu_shift,load_byte")
12836
- (set_attr "predicable" "yes")
12837
- (set_attr "pool_range" "*,256")
12838
- (set_attr "neg_pool_range" "*,244")]
12839
+ (set_attr "predicable" "yes")]
12842
(define_insn "*arm_extendhisi2addsi"
12843
@@ -5045,9 +5041,7 @@
12844
"TARGET_ARM && arm_arch4"
12845
"ldr%(sb%)\\t%0, %1"
12846
[(set_attr "type" "load_byte")
12847
- (set_attr "predicable" "yes")
12848
- (set_attr "pool_range" "256")
12849
- (set_attr "neg_pool_range" "244")]
12850
+ (set_attr "predicable" "yes")]
12853
(define_expand "extendqisi2"
12854
@@ -5087,9 +5081,7 @@
12855
ldr%(sb%)\\t%0, %1"
12856
[(set_attr "length" "8,4")
12857
(set_attr "type" "alu_shift,load_byte")
12858
- (set_attr "predicable" "yes")
12859
- (set_attr "pool_range" "*,256")
12860
- (set_attr "neg_pool_range" "*,244")]
12861
+ (set_attr "predicable" "yes")]
12864
(define_insn "*arm_extendqisi_v6"
12865
@@ -5101,9 +5093,7 @@
12867
ldr%(sb%)\\t%0, %1"
12868
[(set_attr "type" "simple_alu_shift,load_byte")
12869
- (set_attr "predicable" "yes")
12870
- (set_attr "pool_range" "*,256")
12871
- (set_attr "neg_pool_range" "*,244")]
12872
+ (set_attr "predicable" "yes")]
12875
(define_insn "*arm_extendqisi2addsi"
12876
@@ -7630,12 +7620,13 @@
12878
(define_insn "*arm_cmpdi_unsigned"
12879
[(set (reg:CC_CZ CC_REGNUM)
12880
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
12881
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
12882
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
12883
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
12885
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
12886
[(set_attr "conds" "set")
12887
- (set_attr "length" "8")]
12888
+ (set_attr "arch" "a,t2")
12889
+ (set_attr "length" "8,10")]
12892
(define_insn "*arm_cmpdi_zero"
12893
Index: gcc/config/arm/t-rtems-eabi
12894
===================================================================
12895
--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release)
12896
+++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch)
12898
# Custom RTEMS EABI multilibs
12900
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
12901
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
12902
+MULTILIB_OPTIONS = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
12903
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
12905
# Enumeration of multilibs
12907
MULTILIB_EXCEPTIONS =
12908
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
12909
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
12910
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12911
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
12912
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12913
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
12914
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
12915
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
12916
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
12917
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
12918
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12919
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
12920
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12921
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
12922
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
12923
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
12924
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
12925
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
12926
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12927
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
12928
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12929
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
12930
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
12931
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
12932
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
12933
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
12934
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12935
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
12936
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12937
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
12938
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
12939
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
12940
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
12941
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
12942
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
12943
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
12944
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
12945
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
12946
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
12947
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
12948
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
12949
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
12950
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12951
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
12952
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12953
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
12954
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
12955
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
12956
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
12957
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
12958
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12959
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
12960
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
12961
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
12962
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
12963
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
12964
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
12965
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
12966
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
12967
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
12968
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
12969
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
12970
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
12971
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
12972
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
12973
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
12974
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
12975
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
12976
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12977
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
12978
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
12979
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
12980
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
12981
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
12982
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
12983
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
12984
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
12985
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
12986
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
12987
+MULTILIB_EXCEPTIONS += mbig-endian
12988
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
12989
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
12990
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
12991
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
12992
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
12993
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
12994
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
12995
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
12996
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
12997
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
12998
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
12999
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
13000
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13001
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
13002
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
13003
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
13004
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
13005
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
13006
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13007
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
13008
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13009
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
13010
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
13011
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
13012
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
13013
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
13014
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13015
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
13016
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13017
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
13018
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
13019
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
13020
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
13021
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
13022
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
13023
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
13024
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
13025
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
13026
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
13027
# MULTILIB_EXCEPTIONS += mthumb
13028
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
13029
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
13030
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
13031
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
13032
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13033
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
13034
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
13035
MULTILIB_EXCEPTIONS += march=armv6-m
13036
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
13037
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
13038
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
13039
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
13040
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13041
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
13042
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
13043
MULTILIB_EXCEPTIONS += march=armv7-a
13044
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
13045
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
13046
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13047
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
13048
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13049
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
13050
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
13051
MULTILIB_EXCEPTIONS += march=armv7-r
13052
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
13053
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
13054
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13055
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
13056
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13057
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
13058
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
13059
MULTILIB_EXCEPTIONS += march=armv7-m
13060
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
13061
MULTILIB_EXCEPTIONS += mfpu=neon
13062
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
13063
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
13064
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
13065
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
13066
MULTILIB_EXCEPTIONS += mfloat-abi=hard
13067
Index: gcc/config/pa/pa.md
13068
===================================================================
13069
--- a/src/gcc/config/pa/pa.md (.../tags/gcc_4_8_3_release)
13070
+++ b/src/gcc/config/pa/pa.md (.../branches/gcc-4_8-branch)
13071
@@ -123,7 +123,7 @@
13072
;; type "binary" insns have two input operands (1,2) and one output (0)
13074
(define_attr "type"
13075
- "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload"
13076
+ "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload,trap"
13077
(const_string "binary"))
13079
(define_attr "pa_combine_type"
13080
@@ -166,7 +166,7 @@
13081
;; For conditional branches. Frame related instructions are not allowed
13082
;; because they confuse the unwind support.
13083
(define_attr "in_branch_delay" "false,true"
13084
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
13085
+ (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
13086
(eq_attr "length" "4")
13087
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13088
(const_string "true")
13089
@@ -175,7 +175,7 @@
13090
;; Disallow instructions which use the FPU since they will tie up the FPU
13091
;; even if the instruction is nullified.
13092
(define_attr "in_nullified_branch_delay" "false,true"
13093
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
13094
+ (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch,trap")
13095
(eq_attr "length" "4")
13096
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13097
(const_string "true")
13098
@@ -184,7 +184,7 @@
13099
;; For calls and millicode calls. Allow unconditional branches in the
13101
(define_attr "in_call_delay" "false,true"
13102
- (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
13103
+ (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
13104
(eq_attr "length" "4")
13105
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13106
(const_string "true")
13107
@@ -5331,6 +5331,15 @@
13108
[(set_attr "type" "binary,binary")
13109
(set_attr "length" "4,4")])
13111
+;; Trap instructions.
13113
+(define_insn "trap"
13114
+ [(trap_if (const_int 1) (const_int 0))]
13116
+ "{addit|addi,tc},<> 1,%%r0,%%r0"
13117
+ [(set_attr "type" "trap")
13118
+ (set_attr "length" "4")])
13120
;; Clobbering a "register_operand" instead of a match_scratch
13121
;; in operand3 of millicode calls avoids spilling %r1 and
13122
;; produces better code.
13123
Index: gcc/config/pa/pa.c
13124
===================================================================
13125
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release)
13126
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
13127
@@ -3237,7 +3237,12 @@
13129
&& function_label_operand (x, VOIDmode))
13131
- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
13132
+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
13134
+ /* We don't want an OPD when generating fast indirect calls. */
13135
+ if (!TARGET_FAST_INDIRECT_CALLS)
13136
+ fputs ("P%", asm_out_file);
13138
output_addr_const (asm_out_file, x);
13139
fputc ('\n', asm_out_file);
13141
@@ -4160,9 +4165,8 @@
13142
pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
13144
rtx insn = get_last_insn ();
13147
- last_address = 0;
13149
/* pa_expand_epilogue does the dirty work now. We just need
13150
to output the assembler directives which denote the end
13152
@@ -4185,14 +4189,16 @@
13153
if (insn && GET_CODE (insn) == CALL_INSN)
13155
fputs ("\tnop\n", file);
13156
- last_address += 4;
13157
+ extra_nop = true;
13160
+ extra_nop = false;
13162
fputs ("\t.EXIT\n\t.PROCEND\n", file);
13164
if (TARGET_SOM && TARGET_GAS)
13166
- /* We done with this subspace except possibly for some additional
13167
+ /* We are done with this subspace except possibly for some additional
13168
debug information. Forget that we are in this subspace to ensure
13169
that the next function is output in its own subspace. */
13171
@@ -4199,12 +4205,20 @@
13172
cfun->machine->in_nsubspa = 2;
13175
+ /* Thunks do their own insn accounting. */
13176
+ if (cfun->is_thunk)
13179
if (INSN_ADDRESSES_SET_P ())
13181
+ last_address = extra_nop ? 4 : 0;
13182
insn = get_last_nonnote_insn ();
13183
- last_address += INSN_ADDRESSES (INSN_UID (insn));
13184
- if (INSN_P (insn))
13185
- last_address += insn_default_length (insn);
13188
+ last_address += INSN_ADDRESSES (INSN_UID (insn));
13189
+ if (INSN_P (insn))
13190
+ last_address += insn_default_length (insn);
13192
last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
13193
& ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
13195
@@ -8270,8 +8284,7 @@
13196
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
13197
xoperands[2] = GEN_INT (delta);
13199
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
13200
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
13201
+ final_start_function (emit_barrier (), file, 1);
13203
/* Output the thunk. We know that the function is in the same
13204
translation unit (i.e., the same space) as the thunk, and that
13205
@@ -8301,12 +8314,16 @@
13206
|| ((DECL_SECTION_NAME (thunk_fndecl)
13207
== DECL_SECTION_NAME (function))
13208
&& last_address < 262132)))
13209
+ /* In this case, we need to be able to reach the start of
13210
+ the stub table even though the function is likely closer
13211
+ and can be jumped to directly. */
13212
|| (targetm_common.have_named_sections
13213
&& DECL_SECTION_NAME (thunk_fndecl) == NULL
13214
&& DECL_SECTION_NAME (function) == NULL
13215
- && last_address < 262132)
13216
+ && total_code_bytes < MAX_PCREL17F_OFFSET)
13218
|| (!targetm_common.have_named_sections
13219
- && last_address < 262132))))
13220
+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
13223
output_asm_insn ("addil L'%2,%%r26", xoperands);
13224
@@ -8477,17 +8494,8 @@
13228
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
13229
+ final_end_function ();
13231
- if (TARGET_SOM && TARGET_GAS)
13233
- /* We done with this subspace except possibly for some additional
13234
- debug information. Forget that we are in this subspace to ensure
13235
- that the next function is output in its own subspace. */
13236
- in_section = NULL;
13237
- cfun->machine->in_nsubspa = 2;
13240
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
13242
switch_to_section (data_section);
13243
Index: gcc/tree-vect-slp.c
13244
===================================================================
13245
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release)
13246
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
13247
@@ -1837,7 +1837,10 @@
13248
&& (stmt_vinfo = vinfo_for_stmt (use_stmt))
13249
&& !STMT_SLP_TYPE (stmt_vinfo)
13250
&& (STMT_VINFO_RELEVANT (stmt_vinfo)
13251
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
13252
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
13253
+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
13254
+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
13255
+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
13256
&& !(gimple_code (use_stmt) == GIMPLE_PHI
13257
&& STMT_VINFO_DEF_TYPE (stmt_vinfo)
13258
== vect_reduction_def))
13259
@@ -2377,13 +2380,21 @@
13260
neutral_op = build_int_cst (TREE_TYPE (op), -1);
13265
- def_stmt = SSA_NAME_DEF_STMT (op);
13266
- loop = (gimple_bb (stmt))->loop_father;
13267
- neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
13268
- loop_preheader_edge (loop));
13270
+ /* For MIN/MAX we don't have an easy neutral operand but
13271
+ the initial values can be used fine here. Only for
13272
+ a reduction chain we have to force a neutral element. */
13275
+ if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
13276
+ neutral_op = NULL;
13279
+ def_stmt = SSA_NAME_DEF_STMT (op);
13280
+ loop = (gimple_bb (stmt))->loop_father;
13281
+ neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
13282
+ loop_preheader_edge (loop));
13288
Index: gcc/regcprop.c
13289
===================================================================
13290
--- a/src/gcc/regcprop.c (.../tags/gcc_4_8_3_release)
13291
+++ b/src/gcc/regcprop.c (.../branches/gcc-4_8-branch)
13292
@@ -1039,7 +1039,17 @@
13293
but instead among CLOBBERs on the CALL_INSN, we could wrongly
13294
assume the value in it is still live. */
13295
if (ksvd.ignore_set_reg)
13296
- note_stores (PATTERN (insn), kill_clobbered_value, vd);
13298
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
13299
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
13301
+ exp = XEXP (exp, 1))
13303
+ rtx x = XEXP (exp, 0);
13304
+ if (GET_CODE (x) == CLOBBER)
13305
+ kill_value (SET_DEST (x), vd);
13310
/* Notice stores. */
13311
Index: libobjc/encoding.c
13312
===================================================================
13313
--- a/src/libobjc/encoding.c (.../tags/gcc_4_8_3_release)
13314
+++ b/src/libobjc/encoding.c (.../branches/gcc-4_8-branch)
13315
@@ -192,6 +192,8 @@
13316
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
13317
: MAX (COMPUTED, SPECIFIED));})
13319
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
13320
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
13322
/* Skip a variable name, enclosed in quotes ("). */
13324
Index: libobjc/ChangeLog
13325
===================================================================
13326
--- a/src/libobjc/ChangeLog (.../tags/gcc_4_8_3_release)
13327
+++ b/src/libobjc/ChangeLog (.../branches/gcc-4_8-branch)
13329
+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
13332
+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
13333
+ that matches the 4.8 branch ABI.
13335
+2014-07-27 Alan Modra <amodra@gmail.com>
13336
+ Matthias Klose <doko@ubuntu.com>
13340
+ * encoding.c: Define rs6000_special_adjust_field_align_p.
13342
2014-05-22 Release Manager
13344
* GCC 4.8.3 released.
13345
Index: libgfortran/m4/in_pack.m4
13346
===================================================================
13347
--- a/src/libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release)
13348
+++ b/src/libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch)
13350
return source->base_addr;
13352
/* Allocate storage for the destination. */
13353
- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
13354
+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
13356
src = source->base_addr;
13357
stride0 = stride[0];
13358
Index: libgfortran/m4/pack.m4
13359
===================================================================
13360
--- a/src/libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release)
13361
+++ b/src/libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch)
13362
@@ -168,8 +168,8 @@
13366
- /* xmalloc allocates a single byte for zero size. */
13367
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
13368
+ /* xmallocarray allocates a single byte for zero size. */
13369
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
13373
Index: libgfortran/m4/spread.m4
13374
===================================================================
13375
--- a/src/libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release)
13376
+++ b/src/libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch)
13377
@@ -102,8 +102,8 @@
13381
- /* xmalloc allocates a single byte for zero size. */
13382
- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
13383
+ /* xmallocarray allocates a single byte for zero size. */
13384
+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
13388
@@ -245,7 +245,7 @@
13390
if (ret->base_addr == NULL)
13392
- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
13393
+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
13395
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13397
Index: libgfortran/m4/transpose.m4
13398
===================================================================
13399
--- a/src/libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release)
13400
+++ b/src/libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch)
13402
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
13403
GFC_DESCRIPTOR_EXTENT(source, 1));
13405
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
13406
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
13407
+ sizeof ('rtype_name`));
13409
} else if (unlikely (compile_options.bounds_check))
13411
Index: libgfortran/m4/iforeach.m4
13412
===================================================================
13413
--- a/src/libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release)
13414
+++ b/src/libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch)
13416
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13417
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13418
retarray->offset = 0;
13419
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
13420
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
13424
@@ -133,7 +133,7 @@
13425
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13426
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13427
retarray->offset = 0;
13428
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
13429
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
13433
@@ -264,7 +264,7 @@
13434
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13435
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13436
retarray->offset = 0;
13437
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
13438
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
13440
else if (unlikely (compile_options.bounds_check))
13442
Index: libgfortran/m4/eoshift1.m4
13443
===================================================================
13444
--- a/src/libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release)
13445
+++ b/src/libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch)
13446
@@ -106,8 +106,8 @@
13447
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13450
- /* xmalloc allocates a single byte for zero size. */
13451
- ret->base_addr = xmalloc (size * arraysize);
13452
+ /* xmallocarray allocates a single byte for zero size. */
13453
+ ret->base_addr = xmallocarray (arraysize, size);
13456
else if (unlikely (compile_options.bounds_check))
13457
Index: libgfortran/m4/eoshift3.m4
13458
===================================================================
13459
--- a/src/libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release)
13460
+++ b/src/libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch)
13465
- ret->base_addr = xmalloc (size * arraysize);
13466
+ ret->base_addr = xmallocarray (arraysize, size);
13468
ret->dtype = array->dtype;
13469
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
13470
@@ -108,8 +108,8 @@
13471
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13474
- /* xmalloc allocates a single byte for zero size. */
13475
- ret->base_addr = xmalloc (size * arraysize);
13476
+ /* xmallocarray allocates a single byte for zero size. */
13477
+ ret->base_addr = xmallocarray (arraysize, size);
13480
else if (unlikely (compile_options.bounds_check))
13481
Index: libgfortran/m4/shape.m4
13482
===================================================================
13483
--- a/src/libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release)
13484
+++ b/src/libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch)
13487
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
13489
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
13490
+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
13493
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
13494
Index: libgfortran/m4/cshift1.m4
13495
===================================================================
13496
--- a/src/libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release)
13497
+++ b/src/libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch)
13502
- ret->base_addr = xmalloc (size * arraysize);
13503
+ ret->base_addr = xmallocarray (arraysize, size);
13505
ret->dtype = array->dtype;
13506
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
13507
Index: libgfortran/m4/matmull.m4
13508
===================================================================
13509
--- a/src/libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release)
13510
+++ b/src/libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch)
13514
retarray->base_addr
13515
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
13516
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
13517
retarray->offset = 0;
13519
else if (unlikely (compile_options.bounds_check))
13520
Index: libgfortran/m4/bessel.m4
13521
===================================================================
13522
--- a/src/libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release)
13523
+++ b/src/libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch)
13526
size_t size = n2 < n1 ? 0 : n2-n1+1;
13527
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
13528
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
13529
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
13533
@@ -123,7 +123,7 @@
13535
size_t size = n2 < n1 ? 0 : n2-n1+1;
13536
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
13537
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
13538
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
13542
@@ -163,7 +163,7 @@
13544
x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
13546
- for (i = 2; i <= n1+n2; i++)
13547
+ for (i = 2; i <= n2 - n1; i++)
13549
#if defined('rtype_name`_INFINITY)
13550
if (unlikely (last2 == -'rtype_name`_INFINITY))
13551
Index: libgfortran/m4/unpack.m4
13552
===================================================================
13553
--- a/src/libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release)
13554
+++ b/src/libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch)
13555
@@ -100,7 +100,7 @@
13559
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
13560
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
13564
@@ -245,7 +245,7 @@
13568
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
13569
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
13573
Index: libgfortran/m4/reshape.m4
13574
===================================================================
13575
--- a/src/libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release)
13576
+++ b/src/libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch)
13577
@@ -115,11 +115,11 @@
13580
if (unlikely (rs < 1))
13584
- alloc_size = rs * sizeof ('rtype_name`);
13587
- ret->base_addr = xmalloc (alloc_size);
13588
+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
13589
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
13592
Index: libgfortran/m4/ifunction_logical.m4
13593
===================================================================
13594
--- a/src/libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release)
13595
+++ b/src/libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch)
13597
retarray->offset = 0;
13598
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13600
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13601
- * extent[rank-1];
13602
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13604
if (alloc_size == 0)
13610
- retarray->base_addr = xmalloc (alloc_size);
13611
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
13615
Index: libgfortran/m4/ifunction.m4
13616
===================================================================
13617
--- a/src/libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release)
13618
+++ b/src/libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch)
13620
retarray->offset = 0;
13621
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13623
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13624
- * extent[rank-1];
13625
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13627
- retarray->base_addr = xmalloc (alloc_size);
13628
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
13629
if (alloc_size == 0)
13631
/* Make sure we have a zero-sized array. */
13632
@@ -260,8 +259,7 @@
13636
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13637
- * extent[rank-1];
13638
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13640
retarray->offset = 0;
13641
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13642
@@ -273,7 +271,7 @@
13646
- retarray->base_addr = xmalloc (alloc_size);
13647
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
13651
@@ -417,8 +415,7 @@
13652
retarray->offset = 0;
13653
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
13655
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
13656
- * extent[rank-1];
13657
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
13659
if (alloc_size == 0)
13661
@@ -427,7 +424,7 @@
13665
- retarray->base_addr = xmalloc (alloc_size);
13666
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
13670
Index: libgfortran/m4/matmul.m4
13671
===================================================================
13672
--- a/src/libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release)
13673
+++ b/src/libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch)
13674
@@ -125,7 +125,7 @@
13677
retarray->base_addr
13678
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
13679
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
13680
retarray->offset = 0;
13682
else if (unlikely (compile_options.bounds_check))
13683
Index: libgfortran/configure
13684
===================================================================
13685
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
13686
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
13687
@@ -2595,6 +2595,7 @@
13688
as_fn_append ac_func_list " getegid"
13689
as_fn_append ac_func_list " secure_getenv"
13690
as_fn_append ac_func_list " __secure_getenv"
13691
+as_fn_append ac_func_list " strtok_r"
13692
as_fn_append ac_header_list " math.h"
13693
# Check that the precious variables saved in the cache have kept the same
13695
@@ -12339,7 +12340,7 @@
13696
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13697
lt_status=$lt_dlunknown
13698
cat > conftest.$ac_ext <<_LT_EOF
13699
-#line 12342 "configure"
13700
+#line 12343 "configure"
13701
#include "confdefs.h"
13704
@@ -12445,7 +12446,7 @@
13705
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13706
lt_status=$lt_dlunknown
13707
cat > conftest.$ac_ext <<_LT_EOF
13708
-#line 12448 "configure"
13709
+#line 12449 "configure"
13710
#include "confdefs.h"
13713
@@ -16506,6 +16507,8 @@
13722
Index: libgfortran/runtime/in_pack_generic.c
13723
===================================================================
13724
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
13725
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
13726
@@ -180,7 +180,7 @@
13727
return source->base_addr;
13729
/* Allocate storage for the destination. */
13730
- destptr = xmalloc (ssize * size);
13731
+ destptr = xmallocarray (ssize, size);
13732
dest = (char *)destptr;
13733
src = source->base_addr;
13734
stride0 = stride[0] * size;
13735
Index: libgfortran/runtime/memory.c
13736
===================================================================
13737
--- a/src/libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release)
13738
+++ b/src/libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch)
13741
#include "libgfortran.h"
13742
#include <stdlib.h>
13743
+#include <errno.h>
13746
+#define SIZE_MAX ((size_t)-1)
13753
@@ -44,12 +49,34 @@
13758
+xmallocarray (size_t nmemb, size_t size)
13762
+ if (!nmemb || !size)
13763
+ size = nmemb = 1;
13764
+ else if (nmemb > SIZE_MAX / size)
13767
+ os_error ("Integer overflow in xmallocarray");
13770
+ p = malloc (nmemb * size);
13773
+ os_error ("Memory allocation failed in xmallocarray");
13779
/* calloc wrapper that aborts on error. */
13782
xcalloc (size_t nmemb, size_t size)
13784
- if (nmemb * size == 0)
13785
+ if (!nmemb || !size)
13788
void *p = calloc (nmemb, size);
13789
Index: libgfortran/runtime/convert_char.c
13790
===================================================================
13791
--- a/src/libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release)
13792
+++ b/src/libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch)
13794
gfc_charlen_type i, l;
13796
l = len > 0 ? len : 0;
13797
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
13798
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
13800
for (i = 0; i < l; i++)
13801
(*dst)[i] = src[i];
13803
gfc_charlen_type i, l;
13805
l = len > 0 ? len : 0;
13806
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
13807
+ *dst = xmalloc (l + 1);
13809
for (i = 0; i < l; i++)
13810
(*dst)[i] = src[i];
13811
Index: libgfortran/runtime/environ.c
13812
===================================================================
13813
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
13814
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
13815
@@ -833,7 +833,7 @@
13819
- elist = xmalloc (unit_count * sizeof (exception_t));
13820
+ elist = xmallocarray (unit_count, sizeof (exception_t));
13824
Index: libgfortran/runtime/main.c
13825
===================================================================
13826
--- a/src/libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release)
13827
+++ b/src/libgfortran/runtime/main.c (.../branches/gcc-4_8-branch)
13828
@@ -153,6 +153,16 @@
13832
+#ifndef HAVE_STRTOK_R
13834
+gfstrtok_r (char *str, const char *delim,
13835
+ char **saveptr __attribute__ ((unused)))
13837
+ return strtok (str, delim);
13839
+#define strtok_r gfstrtok_r
13842
char *addr2line_path;
13844
/* Find addr2line and store the path. */
13845
@@ -161,30 +171,32 @@
13846
find_addr2line (void)
13849
-#define A2L_LEN 10
13850
+#define A2L_LEN 11
13851
char *path = secure_getenv ("PATH");
13854
+ char *tp = strdup (path);
13857
size_t n = strlen (path);
13858
- char ap[n + 1 + A2L_LEN];
13860
- for (size_t i = 0; i < n; i++)
13861
+ char *ap = xmalloc (n + A2L_LEN);
13863
+ for (char *str = tp;; str = NULL)
13865
- if (path[i] != ':')
13866
- ap[ai++] = path[i];
13868
+ char *token = strtok_r (str, ":", &saveptr);
13871
+ size_t toklen = strlen (token);
13872
+ memcpy (ap, token, toklen);
13873
+ memcpy (ap + toklen, "/addr2line", A2L_LEN);
13874
+ if (access (ap, R_OK|X_OK) == 0)
13877
- memcpy (ap + ai, "addr2line", A2L_LEN);
13878
- if (access (ap, R_OK|X_OK) == 0)
13880
- addr2line_path = strdup (ap);
13885
+ addr2line_path = strdup (ap);
13894
Index: libgfortran/intrinsics/string_intrinsics_inc.c
13895
===================================================================
13896
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release)
13897
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch)
13898
@@ -164,7 +164,7 @@
13901
/* Allocate space for result string. */
13902
- *dest = xmalloc (*len * sizeof (CHARTYPE));
13903
+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
13905
/* Copy string if necessary. */
13906
memcpy (*dest, src, *len * sizeof (CHARTYPE));
13907
@@ -442,7 +442,7 @@
13908
*dest = &zero_length_string;
13911
- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
13912
+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
13913
memcpy (tmp, res, reslen * sizeof (CHARTYPE));
13914
MEMSET (&tmp[reslen], ' ', *rlen - reslen);
13916
Index: libgfortran/intrinsics/pack_generic.c
13917
===================================================================
13918
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
13919
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
13920
@@ -152,8 +152,8 @@
13921
GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
13924
- /* xmalloc allocates a single byte for zero size. */
13925
- ret->base_addr = xmalloc (size * total);
13926
+ /* xmallocarray allocates a single byte for zero size. */
13927
+ ret->base_addr = xmallocarray (total, size);
13930
return; /* In this case, nothing remains to be done. */
13931
@@ -519,7 +519,7 @@
13935
- ret->base_addr = xmalloc (size * total);
13936
+ ret->base_addr = xmallocarray (total, size);
13940
Index: libgfortran/intrinsics/transpose_generic.c
13941
===================================================================
13942
--- a/src/libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release)
13943
+++ b/src/libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch)
13945
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
13946
GFC_DESCRIPTOR_EXTENT(source, 1));
13948
- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
13949
+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
13952
else if (unlikely (compile_options.bounds_check))
13953
Index: libgfortran/intrinsics/cshift0.c
13954
===================================================================
13955
--- a/src/libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release)
13956
+++ b/src/libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch)
13958
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
13961
- /* xmalloc allocates a single byte for zero size. */
13962
- ret->base_addr = xmalloc (size * arraysize);
13963
+ /* xmallocarray allocates a single byte for zero size. */
13964
+ ret->base_addr = xmallocarray (arraysize, size);
13966
else if (unlikely (compile_options.bounds_check))
13968
Index: libgfortran/intrinsics/ctime.c
13969
===================================================================
13970
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
13971
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
13972
@@ -31,31 +31,53 @@
13973
#include <string.h>
13976
-/* strftime-like function that fills a C string with %c format which
13977
- is identical to ctime in the default locale. As ctime and ctime_r
13978
- are poorly specified and their usage not recommended, the
13979
- implementation instead uses strftime. */
13980
+/* Maximum space a ctime-like string might need. A "normal" ctime
13981
+ string is 26 bytes, and in our case 24 bytes as we don't include
13982
+ the trailing newline and null. However, the longest possible year
13983
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
13984
+ 32-bit signed integer) so an extra 7 bytes are needed. */
13985
+#define CTIME_BUFSZ 31
13988
-strctime (char *s, size_t max, const time_t *timep)
13990
+/* Thread-safe ctime-like function that fills a Fortran
13991
+ string. ctime_r is a portability headache and marked as obsolescent
13992
+ in POSIX 2008, which recommends strftime in its place. However,
13993
+ strftime(..., "%c",...) doesn't produce ctime-like output on
13994
+ MinGW, so do it manually with snprintf. */
13997
+gf_ctime (char *s, size_t max, const time_t timev)
14001
+ char buf[CTIME_BUFSZ + 1];
14002
/* Some targets provide a localtime_r based on a draft of the POSIX
14003
standard where the return type is int rather than the
14004
standardized struct tm*. */
14005
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
14006
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
14008
- failed = localtime_r (timep, <m) == NULL,
14009
- failed = localtime_r (timep, <m) != 0);
14010
+ failed = localtime_r (&timev, <m) == NULL,
14011
+ failed = localtime_r (&timev, <m) != 0);
14014
- return strftime (s, max, "%c", <m);
14016
+ int n = snprintf (buf, sizeof (buf),
14017
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
14018
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
14019
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
14020
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
14021
+ 1900 + ltm.tm_year);
14024
+ if ((size_t) n <= max)
14026
+ cf_strcpy (s, max, buf);
14030
+ memset (s, ' ', max);
14034
-/* In the default locale, the date and time representation fits in 26
14035
- bytes. However, other locales might need more space. */
14038
extern void fdate (char **, gfc_charlen_type *);
14039
export_proto(fdate);
14041
fdate (char ** date, gfc_charlen_type * date_len)
14043
time_t now = time(NULL);
14044
- *date = xmalloc (CSZ);
14045
- *date_len = strctime (*date, CSZ, &now);
14046
+ *date = xmalloc (CTIME_BUFSZ);
14047
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
14052
fdate_sub (char * date, gfc_charlen_type date_len)
14054
time_t now = time(NULL);
14055
- char *s = xmalloc (date_len + 1);
14056
- size_t n = strctime (s, date_len + 1, &now);
14057
- fstrcpy (date, date_len, s, n);
14059
+ gf_ctime (date, date_len, now);
14064
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
14067
- *date = xmalloc (CSZ);
14068
- *date_len = strctime (*date, CSZ, &now);
14069
+ *date = xmalloc (CTIME_BUFSZ);
14070
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
14074
@@ -103,8 +122,5 @@
14075
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
14078
- char *s = xmalloc (date_len + 1);
14079
- size_t n = strctime (s, date_len + 1, &now);
14080
- fstrcpy (date, date_len, s, n);
14082
+ gf_ctime (date, date_len, now);
14084
Index: libgfortran/intrinsics/spread_generic.c
14085
===================================================================
14086
--- a/src/libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release)
14087
+++ b/src/libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch)
14088
@@ -100,7 +100,7 @@
14089
GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
14092
- ret->base_addr = xmalloc (rs * size);
14093
+ ret->base_addr = xmallocarray (rs, size);
14097
@@ -245,7 +245,7 @@
14099
if (ret->base_addr == NULL)
14101
- ret->base_addr = xmalloc (ncopies * size);
14102
+ ret->base_addr = xmallocarray (ncopies, size);
14104
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14106
Index: libgfortran/intrinsics/unpack_generic.c
14107
===================================================================
14108
--- a/src/libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release)
14109
+++ b/src/libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch)
14110
@@ -125,7 +125,7 @@
14114
- ret->base_addr = xmalloc (rs * size);
14115
+ ret->base_addr = xmallocarray (rs, size);
14119
Index: libgfortran/intrinsics/eoshift0.c
14120
===================================================================
14121
--- a/src/libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release)
14122
+++ b/src/libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch)
14127
- /* xmalloc allocates a single byte for zero size. */
14128
- ret->base_addr = xmalloc (size * arraysize);
14129
+ /* xmallocarray allocates a single byte for zero size. */
14130
+ ret->base_addr = xmallocarray (arraysize, size);
14132
else if (unlikely (compile_options.bounds_check))
14134
Index: libgfortran/intrinsics/eoshift2.c
14135
===================================================================
14136
--- a/src/libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release)
14137
+++ b/src/libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch)
14140
ret->dtype = array->dtype;
14142
- /* xmalloc allocates a single byte for zero size. */
14143
- ret->base_addr = xmalloc (size * arraysize);
14144
+ /* xmallocarray allocates a single byte for zero size. */
14145
+ ret->base_addr = xmallocarray (arraysize, size);
14147
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14149
Index: libgfortran/intrinsics/reshape_generic.c
14150
===================================================================
14151
--- a/src/libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release)
14152
+++ b/src/libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch)
14153
@@ -99,11 +99,11 @@
14156
if (unlikely (rs < 1))
14158
+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
14160
- alloc_size = rs * size;
14163
- ret->base_addr = xmalloc (alloc_size);
14164
+ ret->base_addr = xmallocarray (alloc_size, size);
14166
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14168
Index: libgfortran/configure.ac
14169
===================================================================
14170
--- a/src/libgfortran/configure.ac (.../tags/gcc_4_8_3_release)
14171
+++ b/src/libgfortran/configure.ac (.../branches/gcc-4_8-branch)
14172
@@ -267,7 +267,7 @@
14173
strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
14174
getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
14175
readlink getgid getpid getppid getuid geteuid umask getegid \
14176
-secure_getenv __secure_getenv)
14177
+secure_getenv __secure_getenv strtok_r)
14179
# Check strerror_r, cannot be above as versions with two and three arguments exist
14180
LIBGFOR_CHECK_STRERROR_R
14181
Index: libgfortran/ChangeLog
14182
===================================================================
14183
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
14184
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
14186
+2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
14188
+ PR libfortran/63589
14189
+ * configure.ac: Check for strtok_r.
14190
+ * runtime/main.c (gfstrtok_r): Fallback implementation of
14192
+ (find_addr2line): Use strtok_r to split PATH.
14193
+ * config.h.in: Regenerated.
14194
+ * configure: Regenerated.
14196
+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
14198
+ PR libgfortran/62188
14199
+ * m4/bessel.m4: Avoid indexing off the end of an array.
14200
+ * generated/bessel_r10.c: Regenerated.
14201
+ * generated/bessel_r16.c: Ditto.
14202
+ * generated/bessel_r4.c: Ditto.
14203
+ * generated/bessel_r8.c: Ditto.
14205
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
14207
+ Backport from mainline
14209
+ * libgfortran.h (xmallocarray): New prototype.
14210
+ * runtime/memory.c (xmallocarray): New function.
14211
+ (xcalloc): Check for nonzero separately instead of multiplying.
14212
+ * generated/*.c: Regenerated.
14213
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
14215
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
14216
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
14217
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
14218
+ (pack_s_internal): Likewise.
14219
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
14220
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
14221
+ (spread_internal_scalar): Likewise.
14222
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
14223
+ (string_minmax): Likewise.
14224
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
14225
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
14226
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
14227
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
14229
+ * io/unit.c (get_internal_unit): Likewise.
14230
+ (filename_from_unit): Don't cast xmalloc return value.
14231
+ * io/write.c (nml_write_obj): Likewise, formatting.
14232
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
14233
+ instead of xmalloc.
14234
+ (besse_yn_r'rtype_kind`): Likewise.
14235
+ * m4/cshift1.m4 (cshift1): Likewise.
14236
+ * m4/eoshift1.m4 (eoshift1): Likewise.
14237
+ * m4/eoshift3.m4 (eoshift3): Likewise.
14238
+ * m4/iforeach.m4: Likewise.
14239
+ * m4/ifunction.m4: Likewise.
14240
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
14242
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
14243
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
14244
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
14245
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
14246
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
14247
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
14248
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
14249
+ (spread_scalar_'rtype_code`): Likewise.
14250
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
14251
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
14252
+ (unpack1_'rtype_code`): Likewise.
14253
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
14254
+ (convert_char4_to_char1): Simplify.
14255
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
14257
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
14259
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
14261
+ Backport from mainline
14262
+ PR libfortran/61310
14263
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
14264
+ instead of strftime.
14265
+ (fdate): Use gf_ctime.
14266
+ (fdate_sub): Likewise.
14267
+ (ctime): Likewise.
14268
+ (ctime_sub): Likewise.
14270
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
14272
+ Backport from trunk.
14273
+ PR libfortran/61187
14274
+ * io/unix.c (raw_close): Check if s->fd is -1.
14275
+ (fd_to_stream): Check return value of fstat(), handle error.
14277
2014-05-22 Release Manager
14279
* GCC 4.8.3 released.
14280
Index: libgfortran/generated/spread_r10.c
14281
===================================================================
14282
--- a/src/libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release)
14283
+++ b/src/libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch)
14284
@@ -101,8 +101,8 @@
14288
- /* xmalloc allocates a single byte for zero size. */
14289
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
14290
+ /* xmallocarray allocates a single byte for zero size. */
14291
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
14295
@@ -244,7 +244,7 @@
14297
if (ret->base_addr == NULL)
14299
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
14300
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
14302
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14304
Index: libgfortran/generated/maxloc1_4_r8.c
14305
===================================================================
14306
--- a/src/libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release)
14307
+++ b/src/libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch)
14309
retarray->offset = 0;
14310
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14312
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14313
- * extent[rank-1];
14314
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14316
- retarray->base_addr = xmalloc (alloc_size);
14317
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14318
if (alloc_size == 0)
14320
/* Make sure we have a zero-sized array. */
14321
@@ -294,8 +293,7 @@
14325
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14326
- * extent[rank-1];
14327
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14329
retarray->offset = 0;
14330
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14331
@@ -307,7 +305,7 @@
14335
- retarray->base_addr = xmalloc (alloc_size);
14336
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14340
@@ -485,8 +483,7 @@
14341
retarray->offset = 0;
14342
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14344
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14345
- * extent[rank-1];
14346
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14348
if (alloc_size == 0)
14350
@@ -495,7 +492,7 @@
14354
- retarray->base_addr = xmalloc (alloc_size);
14355
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14359
Index: libgfortran/generated/norm2_r4.c
14360
===================================================================
14361
--- a/src/libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release)
14362
+++ b/src/libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch)
14363
@@ -101,10 +101,9 @@
14364
retarray->offset = 0;
14365
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14367
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14368
- * extent[rank-1];
14369
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14371
- retarray->base_addr = xmalloc (alloc_size);
14372
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14373
if (alloc_size == 0)
14375
/* Make sure we have a zero-sized array. */
14376
Index: libgfortran/generated/parity_l2.c
14377
===================================================================
14378
--- a/src/libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release)
14379
+++ b/src/libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch)
14381
retarray->offset = 0;
14382
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14384
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14385
- * extent[rank-1];
14386
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14388
- retarray->base_addr = xmalloc (alloc_size);
14389
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
14390
if (alloc_size == 0)
14392
/* Make sure we have a zero-sized array. */
14393
Index: libgfortran/generated/eoshift3_4.c
14394
===================================================================
14395
--- a/src/libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release)
14396
+++ b/src/libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch)
14401
- ret->base_addr = xmalloc (size * arraysize);
14402
+ ret->base_addr = xmallocarray (arraysize, size);
14404
ret->dtype = array->dtype;
14405
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14406
@@ -107,8 +107,8 @@
14407
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14410
- /* xmalloc allocates a single byte for zero size. */
14411
- ret->base_addr = xmalloc (size * arraysize);
14412
+ /* xmallocarray allocates a single byte for zero size. */
14413
+ ret->base_addr = xmallocarray (arraysize, size);
14416
else if (unlikely (compile_options.bounds_check))
14417
Index: libgfortran/generated/transpose_c8.c
14418
===================================================================
14419
--- a/src/libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release)
14420
+++ b/src/libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch)
14422
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14423
GFC_DESCRIPTOR_EXTENT(source, 1));
14425
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
14426
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
14427
+ sizeof (GFC_COMPLEX_8));
14429
} else if (unlikely (compile_options.bounds_check))
14431
Index: libgfortran/generated/eoshift1_8.c
14432
===================================================================
14433
--- a/src/libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release)
14434
+++ b/src/libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch)
14435
@@ -105,8 +105,8 @@
14436
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14439
- /* xmalloc allocates a single byte for zero size. */
14440
- ret->base_addr = xmalloc (size * arraysize);
14441
+ /* xmallocarray allocates a single byte for zero size. */
14442
+ ret->base_addr = xmallocarray (arraysize, size);
14445
else if (unlikely (compile_options.bounds_check))
14446
Index: libgfortran/generated/reshape_r16.c
14447
===================================================================
14448
--- a/src/libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release)
14449
+++ b/src/libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch)
14450
@@ -111,11 +111,11 @@
14453
if (unlikely (rs < 1))
14457
- alloc_size = rs * sizeof (GFC_REAL_16);
14460
- ret->base_addr = xmalloc (alloc_size);
14461
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14462
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14465
Index: libgfortran/generated/bessel_r4.c
14466
===================================================================
14467
--- a/src/libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release)
14468
+++ b/src/libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch)
14471
size_t size = n2 < n1 ? 0 : n2-n1+1;
14472
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14473
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
14474
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
14478
@@ -122,7 +122,7 @@
14480
size_t size = n2 < n1 ? 0 : n2-n1+1;
14481
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14482
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
14483
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
14487
@@ -162,7 +162,7 @@
14489
x2rev = GFC_REAL_4_LITERAL(2.)/x;
14491
- for (i = 2; i <= n1+n2; i++)
14492
+ for (i = 2; i <= n2 - n1; i++)
14494
#if defined(GFC_REAL_4_INFINITY)
14495
if (unlikely (last2 == -GFC_REAL_4_INFINITY))
14496
Index: libgfortran/generated/any_l2.c
14497
===================================================================
14498
--- a/src/libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release)
14499
+++ b/src/libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch)
14500
@@ -101,8 +101,7 @@
14501
retarray->offset = 0;
14502
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14504
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14505
- * extent[rank-1];
14506
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14508
if (alloc_size == 0)
14510
@@ -111,7 +110,7 @@
14514
- retarray->base_addr = xmalloc (alloc_size);
14515
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
14519
Index: libgfortran/generated/product_r4.c
14520
===================================================================
14521
--- a/src/libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release)
14522
+++ b/src/libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch)
14524
retarray->offset = 0;
14525
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14527
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14528
- * extent[rank-1];
14529
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14531
- retarray->base_addr = xmalloc (alloc_size);
14532
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14533
if (alloc_size == 0)
14535
/* Make sure we have a zero-sized array. */
14536
@@ -272,8 +271,7 @@
14540
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14541
- * extent[rank-1];
14542
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14544
retarray->offset = 0;
14545
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14546
@@ -285,7 +283,7 @@
14550
- retarray->base_addr = xmalloc (alloc_size);
14551
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14555
@@ -430,8 +428,7 @@
14556
retarray->offset = 0;
14557
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14559
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14560
- * extent[rank-1];
14561
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14563
if (alloc_size == 0)
14565
@@ -440,7 +437,7 @@
14569
- retarray->base_addr = xmalloc (alloc_size);
14570
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14574
Index: libgfortran/generated/iany_i1.c
14575
===================================================================
14576
--- a/src/libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release)
14577
+++ b/src/libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch)
14579
retarray->offset = 0;
14580
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14582
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14583
- * extent[rank-1];
14584
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14586
- retarray->base_addr = xmalloc (alloc_size);
14587
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14588
if (alloc_size == 0)
14590
/* Make sure we have a zero-sized array. */
14591
@@ -272,8 +271,7 @@
14595
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14596
- * extent[rank-1];
14597
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14599
retarray->offset = 0;
14600
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14601
@@ -285,7 +283,7 @@
14605
- retarray->base_addr = xmalloc (alloc_size);
14606
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14610
@@ -430,8 +428,7 @@
14611
retarray->offset = 0;
14612
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14614
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14615
- * extent[rank-1];
14616
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14618
if (alloc_size == 0)
14620
@@ -440,7 +437,7 @@
14624
- retarray->base_addr = xmalloc (alloc_size);
14625
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
14629
Index: libgfortran/generated/parity_l16.c
14630
===================================================================
14631
--- a/src/libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release)
14632
+++ b/src/libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch)
14634
retarray->offset = 0;
14635
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14637
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14638
- * extent[rank-1];
14639
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14641
- retarray->base_addr = xmalloc (alloc_size);
14642
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
14643
if (alloc_size == 0)
14645
/* Make sure we have a zero-sized array. */
14646
Index: libgfortran/generated/in_pack_r4.c
14647
===================================================================
14648
--- a/src/libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release)
14649
+++ b/src/libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch)
14651
return source->base_addr;
14653
/* Allocate storage for the destination. */
14654
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
14655
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
14657
src = source->base_addr;
14658
stride0 = stride[0];
14659
Index: libgfortran/generated/product_i2.c
14660
===================================================================
14661
--- a/src/libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release)
14662
+++ b/src/libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch)
14664
retarray->offset = 0;
14665
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14667
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14668
- * extent[rank-1];
14669
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14671
- retarray->base_addr = xmalloc (alloc_size);
14672
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14673
if (alloc_size == 0)
14675
/* Make sure we have a zero-sized array. */
14676
@@ -272,8 +271,7 @@
14680
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14681
- * extent[rank-1];
14682
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14684
retarray->offset = 0;
14685
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14686
@@ -285,7 +283,7 @@
14690
- retarray->base_addr = xmalloc (alloc_size);
14691
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14695
@@ -430,8 +428,7 @@
14696
retarray->offset = 0;
14697
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14699
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14700
- * extent[rank-1];
14701
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14703
if (alloc_size == 0)
14705
@@ -440,7 +437,7 @@
14709
- retarray->base_addr = xmalloc (alloc_size);
14710
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
14714
Index: libgfortran/generated/iparity_i4.c
14715
===================================================================
14716
--- a/src/libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release)
14717
+++ b/src/libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch)
14719
retarray->offset = 0;
14720
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14722
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14723
- * extent[rank-1];
14724
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14726
- retarray->base_addr = xmalloc (alloc_size);
14727
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14728
if (alloc_size == 0)
14730
/* Make sure we have a zero-sized array. */
14731
@@ -272,8 +271,7 @@
14735
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14736
- * extent[rank-1];
14737
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14739
retarray->offset = 0;
14740
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14741
@@ -285,7 +283,7 @@
14745
- retarray->base_addr = xmalloc (alloc_size);
14746
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14750
@@ -430,8 +428,7 @@
14751
retarray->offset = 0;
14752
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14754
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14755
- * extent[rank-1];
14756
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14758
if (alloc_size == 0)
14760
@@ -440,7 +437,7 @@
14764
- retarray->base_addr = xmalloc (alloc_size);
14765
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14769
Index: libgfortran/generated/minloc0_4_i1.c
14770
===================================================================
14771
--- a/src/libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release)
14772
+++ b/src/libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch)
14774
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14775
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14776
retarray->offset = 0;
14777
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14778
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14782
@@ -199,7 +199,7 @@
14783
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14784
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14785
retarray->offset = 0;
14786
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14787
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14791
@@ -367,7 +367,7 @@
14792
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14793
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14794
retarray->offset = 0;
14795
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14796
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14798
else if (unlikely (compile_options.bounds_check))
14800
Index: libgfortran/generated/reshape_c4.c
14801
===================================================================
14802
--- a/src/libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release)
14803
+++ b/src/libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch)
14804
@@ -111,11 +111,11 @@
14807
if (unlikely (rs < 1))
14811
- alloc_size = rs * sizeof (GFC_COMPLEX_4);
14814
- ret->base_addr = xmalloc (alloc_size);
14815
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
14816
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14819
Index: libgfortran/generated/maxloc0_4_r16.c
14820
===================================================================
14821
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
14822
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
14824
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14825
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14826
retarray->offset = 0;
14827
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14828
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14832
@@ -199,7 +199,7 @@
14833
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
14834
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14835
retarray->offset = 0;
14836
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14837
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14841
@@ -367,7 +367,7 @@
14842
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
14843
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14844
retarray->offset = 0;
14845
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
14846
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
14848
else if (unlikely (compile_options.bounds_check))
14850
Index: libgfortran/generated/iall_i8.c
14851
===================================================================
14852
--- a/src/libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release)
14853
+++ b/src/libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch)
14855
retarray->offset = 0;
14856
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14858
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14859
- * extent[rank-1];
14860
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14862
- retarray->base_addr = xmalloc (alloc_size);
14863
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14864
if (alloc_size == 0)
14866
/* Make sure we have a zero-sized array. */
14867
@@ -272,8 +271,7 @@
14871
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14872
- * extent[rank-1];
14873
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14875
retarray->offset = 0;
14876
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14877
@@ -285,7 +283,7 @@
14881
- retarray->base_addr = xmalloc (alloc_size);
14882
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14886
@@ -430,8 +428,7 @@
14887
retarray->offset = 0;
14888
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14890
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14891
- * extent[rank-1];
14892
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14894
if (alloc_size == 0)
14896
@@ -440,7 +437,7 @@
14900
- retarray->base_addr = xmalloc (alloc_size);
14901
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14905
Index: libgfortran/generated/maxloc1_8_r16.c
14906
===================================================================
14907
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
14908
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
14910
retarray->offset = 0;
14911
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14913
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14914
- * extent[rank-1];
14915
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14917
- retarray->base_addr = xmalloc (alloc_size);
14918
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14919
if (alloc_size == 0)
14921
/* Make sure we have a zero-sized array. */
14922
@@ -294,8 +293,7 @@
14926
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14927
- * extent[rank-1];
14928
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14930
retarray->offset = 0;
14931
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14932
@@ -307,7 +305,7 @@
14936
- retarray->base_addr = xmalloc (alloc_size);
14937
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14941
@@ -485,8 +483,7 @@
14942
retarray->offset = 0;
14943
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14945
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14946
- * extent[rank-1];
14947
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14949
if (alloc_size == 0)
14951
@@ -495,7 +492,7 @@
14955
- retarray->base_addr = xmalloc (alloc_size);
14956
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
14960
Index: libgfortran/generated/sum_r16.c
14961
===================================================================
14962
--- a/src/libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release)
14963
+++ b/src/libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch)
14965
retarray->offset = 0;
14966
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14968
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14969
- * extent[rank-1];
14970
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14972
- retarray->base_addr = xmalloc (alloc_size);
14973
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14974
if (alloc_size == 0)
14976
/* Make sure we have a zero-sized array. */
14977
@@ -272,8 +271,7 @@
14981
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14982
- * extent[rank-1];
14983
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14985
retarray->offset = 0;
14986
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14987
@@ -285,7 +283,7 @@
14991
- retarray->base_addr = xmalloc (alloc_size);
14992
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
14996
@@ -430,8 +428,7 @@
14997
retarray->offset = 0;
14998
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15000
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15001
- * extent[rank-1];
15002
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15004
if (alloc_size == 0)
15006
@@ -440,7 +437,7 @@
15010
- retarray->base_addr = xmalloc (alloc_size);
15011
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15015
Index: libgfortran/generated/sum_i1.c
15016
===================================================================
15017
--- a/src/libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release)
15018
+++ b/src/libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch)
15020
retarray->offset = 0;
15021
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15023
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15024
- * extent[rank-1];
15025
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15027
- retarray->base_addr = xmalloc (alloc_size);
15028
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15029
if (alloc_size == 0)
15031
/* Make sure we have a zero-sized array. */
15032
@@ -272,8 +271,7 @@
15036
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15037
- * extent[rank-1];
15038
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15040
retarray->offset = 0;
15041
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15042
@@ -285,7 +283,7 @@
15046
- retarray->base_addr = xmalloc (alloc_size);
15047
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15051
@@ -430,8 +428,7 @@
15052
retarray->offset = 0;
15053
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15055
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15056
- * extent[rank-1];
15057
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15059
if (alloc_size == 0)
15061
@@ -440,7 +437,7 @@
15065
- retarray->base_addr = xmalloc (alloc_size);
15066
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15070
Index: libgfortran/generated/in_pack_i2.c
15071
===================================================================
15072
--- a/src/libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release)
15073
+++ b/src/libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch)
15075
return source->base_addr;
15077
/* Allocate storage for the destination. */
15078
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
15079
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
15081
src = source->base_addr;
15082
stride0 = stride[0];
15083
Index: libgfortran/generated/transpose_r10.c
15084
===================================================================
15085
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
15086
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
15088
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15089
GFC_DESCRIPTOR_EXTENT(source, 1));
15091
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
15092
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15093
+ sizeof (GFC_REAL_10));
15095
} else if (unlikely (compile_options.bounds_check))
15097
Index: libgfortran/generated/maxloc1_16_r16.c
15098
===================================================================
15099
--- a/src/libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release)
15100
+++ b/src/libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch)
15102
retarray->offset = 0;
15103
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15105
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15106
- * extent[rank-1];
15107
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15109
- retarray->base_addr = xmalloc (alloc_size);
15110
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15111
if (alloc_size == 0)
15113
/* Make sure we have a zero-sized array. */
15114
@@ -294,8 +293,7 @@
15118
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15119
- * extent[rank-1];
15120
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15122
retarray->offset = 0;
15123
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15124
@@ -307,7 +305,7 @@
15128
- retarray->base_addr = xmalloc (alloc_size);
15129
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15133
@@ -485,8 +483,7 @@
15134
retarray->offset = 0;
15135
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15137
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15138
- * extent[rank-1];
15139
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15141
if (alloc_size == 0)
15143
@@ -495,7 +492,7 @@
15147
- retarray->base_addr = xmalloc (alloc_size);
15148
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15152
Index: libgfortran/generated/maxloc1_16_i4.c
15153
===================================================================
15154
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
15155
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
15157
retarray->offset = 0;
15158
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15160
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15161
- * extent[rank-1];
15162
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15164
- retarray->base_addr = xmalloc (alloc_size);
15165
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15166
if (alloc_size == 0)
15168
/* Make sure we have a zero-sized array. */
15169
@@ -294,8 +293,7 @@
15173
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15174
- * extent[rank-1];
15175
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15177
retarray->offset = 0;
15178
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15179
@@ -307,7 +305,7 @@
15183
- retarray->base_addr = xmalloc (alloc_size);
15184
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15188
@@ -485,8 +483,7 @@
15189
retarray->offset = 0;
15190
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15192
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15193
- * extent[rank-1];
15194
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15196
if (alloc_size == 0)
15198
@@ -495,7 +492,7 @@
15202
- retarray->base_addr = xmalloc (alloc_size);
15203
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15207
Index: libgfortran/generated/spread_i1.c
15208
===================================================================
15209
--- a/src/libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release)
15210
+++ b/src/libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch)
15211
@@ -101,8 +101,8 @@
15215
- /* xmalloc allocates a single byte for zero size. */
15216
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
15217
+ /* xmallocarray allocates a single byte for zero size. */
15218
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
15222
@@ -244,7 +244,7 @@
15224
if (ret->base_addr == NULL)
15226
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
15227
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
15229
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15231
Index: libgfortran/generated/maxloc0_16_i8.c
15232
===================================================================
15233
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
15234
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
15236
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15237
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15238
retarray->offset = 0;
15239
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15240
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15244
@@ -199,7 +199,7 @@
15245
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15246
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15247
retarray->offset = 0;
15248
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15249
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15253
@@ -367,7 +367,7 @@
15254
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15255
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15256
retarray->offset = 0;
15257
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15258
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15260
else if (unlikely (compile_options.bounds_check))
15262
Index: libgfortran/generated/maxval_r16.c
15263
===================================================================
15264
--- a/src/libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release)
15265
+++ b/src/libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch)
15267
retarray->offset = 0;
15268
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15270
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15271
- * extent[rank-1];
15272
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15274
- retarray->base_addr = xmalloc (alloc_size);
15275
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15276
if (alloc_size == 0)
15278
/* Make sure we have a zero-sized array. */
15279
@@ -286,8 +285,7 @@
15283
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15284
- * extent[rank-1];
15285
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15287
retarray->offset = 0;
15288
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15289
@@ -299,7 +297,7 @@
15293
- retarray->base_addr = xmalloc (alloc_size);
15294
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15298
@@ -472,8 +470,7 @@
15299
retarray->offset = 0;
15300
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15302
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15303
- * extent[rank-1];
15304
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15306
if (alloc_size == 0)
15308
@@ -482,7 +479,7 @@
15312
- retarray->base_addr = xmalloc (alloc_size);
15313
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15317
Index: libgfortran/generated/product_c10.c
15318
===================================================================
15319
--- a/src/libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release)
15320
+++ b/src/libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch)
15322
retarray->offset = 0;
15323
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15325
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15326
- * extent[rank-1];
15327
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15329
- retarray->base_addr = xmalloc (alloc_size);
15330
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15331
if (alloc_size == 0)
15333
/* Make sure we have a zero-sized array. */
15334
@@ -272,8 +271,7 @@
15338
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15339
- * extent[rank-1];
15340
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15342
retarray->offset = 0;
15343
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15344
@@ -285,7 +283,7 @@
15348
- retarray->base_addr = xmalloc (alloc_size);
15349
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15353
@@ -430,8 +428,7 @@
15354
retarray->offset = 0;
15355
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15357
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15358
- * extent[rank-1];
15359
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15361
if (alloc_size == 0)
15363
@@ -440,7 +437,7 @@
15367
- retarray->base_addr = xmalloc (alloc_size);
15368
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15372
Index: libgfortran/generated/minloc1_8_i4.c
15373
===================================================================
15374
--- a/src/libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release)
15375
+++ b/src/libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch)
15377
retarray->offset = 0;
15378
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15380
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15381
- * extent[rank-1];
15382
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15384
- retarray->base_addr = xmalloc (alloc_size);
15385
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15386
if (alloc_size == 0)
15388
/* Make sure we have a zero-sized array. */
15389
@@ -294,8 +293,7 @@
15393
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15394
- * extent[rank-1];
15395
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15397
retarray->offset = 0;
15398
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15399
@@ -307,7 +305,7 @@
15403
- retarray->base_addr = xmalloc (alloc_size);
15404
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15408
@@ -485,8 +483,7 @@
15409
retarray->offset = 0;
15410
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15412
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15413
- * extent[rank-1];
15414
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15416
if (alloc_size == 0)
15418
@@ -495,7 +492,7 @@
15422
- retarray->base_addr = xmalloc (alloc_size);
15423
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15427
Index: libgfortran/generated/minloc0_16_i16.c
15428
===================================================================
15429
--- a/src/libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release)
15430
+++ b/src/libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch)
15432
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15433
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15434
retarray->offset = 0;
15435
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15436
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15440
@@ -199,7 +199,7 @@
15441
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15442
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15443
retarray->offset = 0;
15444
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15445
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15449
@@ -367,7 +367,7 @@
15450
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15451
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15452
retarray->offset = 0;
15453
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15454
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15456
else if (unlikely (compile_options.bounds_check))
15458
Index: libgfortran/generated/matmul_r16.c
15459
===================================================================
15460
--- a/src/libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release)
15461
+++ b/src/libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch)
15462
@@ -124,7 +124,7 @@
15465
retarray->base_addr
15466
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
15467
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
15468
retarray->offset = 0;
15470
else if (unlikely (compile_options.bounds_check))
15471
Index: libgfortran/generated/minloc0_4_r4.c
15472
===================================================================
15473
--- a/src/libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release)
15474
+++ b/src/libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch)
15476
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15477
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15478
retarray->offset = 0;
15479
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15480
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15484
@@ -199,7 +199,7 @@
15485
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15486
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15487
retarray->offset = 0;
15488
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15489
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15493
@@ -367,7 +367,7 @@
15494
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15495
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15496
retarray->offset = 0;
15497
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15498
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15500
else if (unlikely (compile_options.bounds_check))
15502
Index: libgfortran/generated/iany_i2.c
15503
===================================================================
15504
--- a/src/libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release)
15505
+++ b/src/libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch)
15507
retarray->offset = 0;
15508
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15510
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15511
- * extent[rank-1];
15512
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15514
- retarray->base_addr = xmalloc (alloc_size);
15515
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15516
if (alloc_size == 0)
15518
/* Make sure we have a zero-sized array. */
15519
@@ -272,8 +271,7 @@
15523
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15524
- * extent[rank-1];
15525
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15527
retarray->offset = 0;
15528
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15529
@@ -285,7 +283,7 @@
15533
- retarray->base_addr = xmalloc (alloc_size);
15534
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15538
@@ -430,8 +428,7 @@
15539
retarray->offset = 0;
15540
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15542
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15543
- * extent[rank-1];
15544
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15546
if (alloc_size == 0)
15548
@@ -440,7 +437,7 @@
15552
- retarray->base_addr = xmalloc (alloc_size);
15553
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15557
Index: libgfortran/generated/sum_r4.c
15558
===================================================================
15559
--- a/src/libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release)
15560
+++ b/src/libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch)
15562
retarray->offset = 0;
15563
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15565
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15566
- * extent[rank-1];
15567
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15569
- retarray->base_addr = xmalloc (alloc_size);
15570
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15571
if (alloc_size == 0)
15573
/* Make sure we have a zero-sized array. */
15574
@@ -272,8 +271,7 @@
15578
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15579
- * extent[rank-1];
15580
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15582
retarray->offset = 0;
15583
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15584
@@ -285,7 +283,7 @@
15588
- retarray->base_addr = xmalloc (alloc_size);
15589
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15593
@@ -430,8 +428,7 @@
15594
retarray->offset = 0;
15595
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15597
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15598
- * extent[rank-1];
15599
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15601
if (alloc_size == 0)
15603
@@ -440,7 +437,7 @@
15607
- retarray->base_addr = xmalloc (alloc_size);
15608
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15612
Index: libgfortran/generated/unpack_c8.c
15613
===================================================================
15614
--- a/src/libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release)
15615
+++ b/src/libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch)
15620
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
15621
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
15625
@@ -244,7 +244,7 @@
15629
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
15630
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
15634
Index: libgfortran/generated/in_pack_c16.c
15635
===================================================================
15636
--- a/src/libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release)
15637
+++ b/src/libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch)
15639
return source->base_addr;
15641
/* Allocate storage for the destination. */
15642
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
15643
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
15645
src = source->base_addr;
15646
stride0 = stride[0];
15647
Index: libgfortran/generated/minloc0_4_i2.c
15648
===================================================================
15649
--- a/src/libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release)
15650
+++ b/src/libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch)
15652
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15653
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15654
retarray->offset = 0;
15655
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15656
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15660
@@ -199,7 +199,7 @@
15661
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15662
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15663
retarray->offset = 0;
15664
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15665
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15669
@@ -367,7 +367,7 @@
15670
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15671
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15672
retarray->offset = 0;
15673
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15674
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15676
else if (unlikely (compile_options.bounds_check))
15678
Index: libgfortran/generated/spread_c10.c
15679
===================================================================
15680
--- a/src/libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release)
15681
+++ b/src/libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch)
15682
@@ -101,8 +101,8 @@
15686
- /* xmalloc allocates a single byte for zero size. */
15687
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
15688
+ /* xmallocarray allocates a single byte for zero size. */
15689
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
15693
@@ -244,7 +244,7 @@
15695
if (ret->base_addr == NULL)
15697
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
15698
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
15700
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15702
Index: libgfortran/generated/maxloc0_8_i1.c
15703
===================================================================
15704
--- a/src/libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release)
15705
+++ b/src/libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch)
15707
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15708
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15709
retarray->offset = 0;
15710
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15711
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15715
@@ -199,7 +199,7 @@
15716
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15717
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15718
retarray->offset = 0;
15719
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15720
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15724
@@ -367,7 +367,7 @@
15725
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15726
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15727
retarray->offset = 0;
15728
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15729
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15731
else if (unlikely (compile_options.bounds_check))
15733
Index: libgfortran/generated/spread_r4.c
15734
===================================================================
15735
--- a/src/libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release)
15736
+++ b/src/libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch)
15737
@@ -101,8 +101,8 @@
15741
- /* xmalloc allocates a single byte for zero size. */
15742
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
15743
+ /* xmallocarray allocates a single byte for zero size. */
15744
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
15748
@@ -244,7 +244,7 @@
15750
if (ret->base_addr == NULL)
15752
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
15753
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
15755
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15757
Index: libgfortran/generated/minloc0_8_i8.c
15758
===================================================================
15759
--- a/src/libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release)
15760
+++ b/src/libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch)
15762
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15763
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15764
retarray->offset = 0;
15765
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15766
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15770
@@ -199,7 +199,7 @@
15771
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15772
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15773
retarray->offset = 0;
15774
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15775
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15779
@@ -367,7 +367,7 @@
15780
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15781
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15782
retarray->offset = 0;
15783
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
15784
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
15786
else if (unlikely (compile_options.bounds_check))
15788
Index: libgfortran/generated/matmul_c8.c
15789
===================================================================
15790
--- a/src/libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release)
15791
+++ b/src/libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch)
15792
@@ -124,7 +124,7 @@
15795
retarray->base_addr
15796
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
15797
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
15798
retarray->offset = 0;
15800
else if (unlikely (compile_options.bounds_check))
15801
Index: libgfortran/generated/minloc1_16_r10.c
15802
===================================================================
15803
--- a/src/libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release)
15804
+++ b/src/libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch)
15806
retarray->offset = 0;
15807
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15809
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15810
- * extent[rank-1];
15811
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15813
- retarray->base_addr = xmalloc (alloc_size);
15814
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15815
if (alloc_size == 0)
15817
/* Make sure we have a zero-sized array. */
15818
@@ -294,8 +293,7 @@
15822
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15823
- * extent[rank-1];
15824
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15826
retarray->offset = 0;
15827
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15828
@@ -307,7 +305,7 @@
15832
- retarray->base_addr = xmalloc (alloc_size);
15833
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15837
@@ -485,8 +483,7 @@
15838
retarray->offset = 0;
15839
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15841
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15842
- * extent[rank-1];
15843
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15845
if (alloc_size == 0)
15847
@@ -495,7 +492,7 @@
15851
- retarray->base_addr = xmalloc (alloc_size);
15852
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15856
Index: libgfortran/generated/sum_i2.c
15857
===================================================================
15858
--- a/src/libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release)
15859
+++ b/src/libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch)
15861
retarray->offset = 0;
15862
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15864
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15865
- * extent[rank-1];
15866
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15868
- retarray->base_addr = xmalloc (alloc_size);
15869
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15870
if (alloc_size == 0)
15872
/* Make sure we have a zero-sized array. */
15873
@@ -272,8 +271,7 @@
15877
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15878
- * extent[rank-1];
15879
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15881
retarray->offset = 0;
15882
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15883
@@ -285,7 +283,7 @@
15887
- retarray->base_addr = xmalloc (alloc_size);
15888
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15892
@@ -430,8 +428,7 @@
15893
retarray->offset = 0;
15894
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15896
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15897
- * extent[rank-1];
15898
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15900
if (alloc_size == 0)
15902
@@ -440,7 +437,7 @@
15906
- retarray->base_addr = xmalloc (alloc_size);
15907
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15911
Index: libgfortran/generated/iparity_i16.c
15912
===================================================================
15913
--- a/src/libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release)
15914
+++ b/src/libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch)
15916
retarray->offset = 0;
15917
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15919
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15920
- * extent[rank-1];
15921
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15923
- retarray->base_addr = xmalloc (alloc_size);
15924
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15925
if (alloc_size == 0)
15927
/* Make sure we have a zero-sized array. */
15928
@@ -272,8 +271,7 @@
15932
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15933
- * extent[rank-1];
15934
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15936
retarray->offset = 0;
15937
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15938
@@ -285,7 +283,7 @@
15942
- retarray->base_addr = xmalloc (alloc_size);
15943
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15947
@@ -430,8 +428,7 @@
15948
retarray->offset = 0;
15949
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15951
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15952
- * extent[rank-1];
15953
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15955
if (alloc_size == 0)
15957
@@ -440,7 +437,7 @@
15961
- retarray->base_addr = xmalloc (alloc_size);
15962
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15966
Index: libgfortran/generated/minloc0_16_i1.c
15967
===================================================================
15968
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
15969
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
15971
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15972
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15973
retarray->offset = 0;
15974
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15975
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15979
@@ -199,7 +199,7 @@
15980
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15981
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15982
retarray->offset = 0;
15983
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15984
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15988
@@ -367,7 +367,7 @@
15989
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15990
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15991
retarray->offset = 0;
15992
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15993
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15995
else if (unlikely (compile_options.bounds_check))
15997
Index: libgfortran/generated/reshape_c16.c
15998
===================================================================
15999
--- a/src/libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release)
16000
+++ b/src/libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch)
16001
@@ -111,11 +111,11 @@
16004
if (unlikely (rs < 1))
16008
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
16011
- ret->base_addr = xmalloc (alloc_size);
16012
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
16013
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16016
Index: libgfortran/generated/pack_c4.c
16017
===================================================================
16018
--- a/src/libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release)
16019
+++ b/src/libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch)
16020
@@ -167,8 +167,8 @@
16024
- /* xmalloc allocates a single byte for zero size. */
16025
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
16026
+ /* xmallocarray allocates a single byte for zero size. */
16027
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
16031
Index: libgfortran/generated/parity_l4.c
16032
===================================================================
16033
--- a/src/libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release)
16034
+++ b/src/libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch)
16036
retarray->offset = 0;
16037
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16039
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16040
- * extent[rank-1];
16041
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16043
- retarray->base_addr = xmalloc (alloc_size);
16044
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
16045
if (alloc_size == 0)
16047
/* Make sure we have a zero-sized array. */
16048
Index: libgfortran/generated/spread_i2.c
16049
===================================================================
16050
--- a/src/libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release)
16051
+++ b/src/libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch)
16052
@@ -101,8 +101,8 @@
16056
- /* xmalloc allocates a single byte for zero size. */
16057
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
16058
+ /* xmallocarray allocates a single byte for zero size. */
16059
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
16063
@@ -244,7 +244,7 @@
16065
if (ret->base_addr == NULL)
16067
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
16068
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
16070
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16072
Index: libgfortran/generated/any_l4.c
16073
===================================================================
16074
--- a/src/libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release)
16075
+++ b/src/libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch)
16076
@@ -101,8 +101,7 @@
16077
retarray->offset = 0;
16078
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16080
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16081
- * extent[rank-1];
16082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16084
if (alloc_size == 0)
16086
@@ -111,7 +110,7 @@
16090
- retarray->base_addr = xmalloc (alloc_size);
16091
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
16095
Index: libgfortran/generated/maxloc1_4_i8.c
16096
===================================================================
16097
--- a/src/libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release)
16098
+++ b/src/libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch)
16100
retarray->offset = 0;
16101
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16103
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16104
- * extent[rank-1];
16105
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16107
- retarray->base_addr = xmalloc (alloc_size);
16108
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16109
if (alloc_size == 0)
16111
/* Make sure we have a zero-sized array. */
16112
@@ -294,8 +293,7 @@
16116
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16117
- * extent[rank-1];
16118
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16120
retarray->offset = 0;
16121
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16122
@@ -307,7 +305,7 @@
16126
- retarray->base_addr = xmalloc (alloc_size);
16127
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16131
@@ -485,8 +483,7 @@
16132
retarray->offset = 0;
16133
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16135
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16136
- * extent[rank-1];
16137
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16139
if (alloc_size == 0)
16141
@@ -495,7 +492,7 @@
16145
- retarray->base_addr = xmalloc (alloc_size);
16146
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16150
Index: libgfortran/generated/maxloc0_8_r4.c
16151
===================================================================
16152
--- a/src/libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release)
16153
+++ b/src/libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch)
16155
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16156
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16157
retarray->offset = 0;
16158
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16159
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16163
@@ -199,7 +199,7 @@
16164
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16165
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16166
retarray->offset = 0;
16167
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16168
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16172
@@ -367,7 +367,7 @@
16173
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16174
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16175
retarray->offset = 0;
16176
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16177
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16179
else if (unlikely (compile_options.bounds_check))
16181
Index: libgfortran/generated/maxloc1_4_i16.c
16182
===================================================================
16183
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
16184
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
16186
retarray->offset = 0;
16187
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16189
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16190
- * extent[rank-1];
16191
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16193
- retarray->base_addr = xmalloc (alloc_size);
16194
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16195
if (alloc_size == 0)
16197
/* Make sure we have a zero-sized array. */
16198
@@ -294,8 +293,7 @@
16202
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16203
- * extent[rank-1];
16204
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16206
retarray->offset = 0;
16207
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16208
@@ -307,7 +305,7 @@
16212
- retarray->base_addr = xmalloc (alloc_size);
16213
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16217
@@ -485,8 +483,7 @@
16218
retarray->offset = 0;
16219
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16221
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16222
- * extent[rank-1];
16223
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16225
if (alloc_size == 0)
16227
@@ -495,7 +492,7 @@
16231
- retarray->base_addr = xmalloc (alloc_size);
16232
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16236
Index: libgfortran/generated/minloc0_4_r10.c
16237
===================================================================
16238
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
16239
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
16241
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16242
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16243
retarray->offset = 0;
16244
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16245
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16249
@@ -199,7 +199,7 @@
16250
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16251
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16252
retarray->offset = 0;
16253
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16254
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16258
@@ -367,7 +367,7 @@
16259
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16260
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16261
retarray->offset = 0;
16262
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16263
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16265
else if (unlikely (compile_options.bounds_check))
16267
Index: libgfortran/generated/minloc0_8_i16.c
16268
===================================================================
16269
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
16270
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
16272
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16273
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16274
retarray->offset = 0;
16275
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16276
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16280
@@ -199,7 +199,7 @@
16281
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16282
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16283
retarray->offset = 0;
16284
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16285
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16289
@@ -367,7 +367,7 @@
16290
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16291
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16292
retarray->offset = 0;
16293
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16294
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16296
else if (unlikely (compile_options.bounds_check))
16298
Index: libgfortran/generated/minloc1_8_r10.c
16299
===================================================================
16300
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
16301
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
16303
retarray->offset = 0;
16304
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16306
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16307
- * extent[rank-1];
16308
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16310
- retarray->base_addr = xmalloc (alloc_size);
16311
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16312
if (alloc_size == 0)
16314
/* Make sure we have a zero-sized array. */
16315
@@ -294,8 +293,7 @@
16319
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16320
- * extent[rank-1];
16321
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16323
retarray->offset = 0;
16324
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16325
@@ -307,7 +305,7 @@
16329
- retarray->base_addr = xmalloc (alloc_size);
16330
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16334
@@ -485,8 +483,7 @@
16335
retarray->offset = 0;
16336
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16338
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16339
- * extent[rank-1];
16340
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16342
if (alloc_size == 0)
16344
@@ -495,7 +492,7 @@
16348
- retarray->base_addr = xmalloc (alloc_size);
16349
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16353
Index: libgfortran/generated/minloc0_16_r4.c
16354
===================================================================
16355
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
16356
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
16358
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16359
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16360
retarray->offset = 0;
16361
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16362
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16366
@@ -199,7 +199,7 @@
16367
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16368
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16369
retarray->offset = 0;
16370
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16371
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16375
@@ -367,7 +367,7 @@
16376
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16377
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16378
retarray->offset = 0;
16379
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16380
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16382
else if (unlikely (compile_options.bounds_check))
16384
Index: libgfortran/generated/product_i4.c
16385
===================================================================
16386
--- a/src/libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release)
16387
+++ b/src/libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch)
16389
retarray->offset = 0;
16390
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16392
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16393
- * extent[rank-1];
16394
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16396
- retarray->base_addr = xmalloc (alloc_size);
16397
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16398
if (alloc_size == 0)
16400
/* Make sure we have a zero-sized array. */
16401
@@ -272,8 +271,7 @@
16405
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16406
- * extent[rank-1];
16407
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16409
retarray->offset = 0;
16410
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16411
@@ -285,7 +283,7 @@
16415
- retarray->base_addr = xmalloc (alloc_size);
16416
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16420
@@ -430,8 +428,7 @@
16421
retarray->offset = 0;
16422
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16424
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16425
- * extent[rank-1];
16426
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16428
if (alloc_size == 0)
16430
@@ -440,7 +437,7 @@
16434
- retarray->base_addr = xmalloc (alloc_size);
16435
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16439
Index: libgfortran/generated/sum_c16.c
16440
===================================================================
16441
--- a/src/libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release)
16442
+++ b/src/libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch)
16444
retarray->offset = 0;
16445
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16447
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16448
- * extent[rank-1];
16449
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16451
- retarray->base_addr = xmalloc (alloc_size);
16452
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
16453
if (alloc_size == 0)
16455
/* Make sure we have a zero-sized array. */
16456
@@ -272,8 +271,7 @@
16460
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16461
- * extent[rank-1];
16462
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16464
retarray->offset = 0;
16465
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16466
@@ -285,7 +283,7 @@
16470
- retarray->base_addr = xmalloc (alloc_size);
16471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
16475
@@ -430,8 +428,7 @@
16476
retarray->offset = 0;
16477
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16479
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16480
- * extent[rank-1];
16481
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16483
if (alloc_size == 0)
16485
@@ -440,7 +437,7 @@
16489
- retarray->base_addr = xmalloc (alloc_size);
16490
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
16494
Index: libgfortran/generated/transpose_c10.c
16495
===================================================================
16496
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
16497
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
16499
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16500
GFC_DESCRIPTOR_EXTENT(source, 1));
16502
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
16503
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16504
+ sizeof (GFC_COMPLEX_10));
16506
} else if (unlikely (compile_options.bounds_check))
16508
Index: libgfortran/generated/maxloc1_16_r8.c
16509
===================================================================
16510
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
16511
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
16513
retarray->offset = 0;
16514
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16516
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16517
- * extent[rank-1];
16518
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16520
- retarray->base_addr = xmalloc (alloc_size);
16521
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16522
if (alloc_size == 0)
16524
/* Make sure we have a zero-sized array. */
16525
@@ -294,8 +293,7 @@
16529
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16530
- * extent[rank-1];
16531
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16533
retarray->offset = 0;
16534
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16535
@@ -307,7 +305,7 @@
16539
- retarray->base_addr = xmalloc (alloc_size);
16540
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16544
@@ -485,8 +483,7 @@
16545
retarray->offset = 0;
16546
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16548
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16549
- * extent[rank-1];
16550
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16552
if (alloc_size == 0)
16554
@@ -495,7 +492,7 @@
16558
- retarray->base_addr = xmalloc (alloc_size);
16559
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16563
Index: libgfortran/generated/transpose_r4.c
16564
===================================================================
16565
--- a/src/libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release)
16566
+++ b/src/libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch)
16568
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16569
GFC_DESCRIPTOR_EXTENT(source, 1));
16571
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
16572
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16573
+ sizeof (GFC_REAL_4));
16575
} else if (unlikely (compile_options.bounds_check))
16577
Index: libgfortran/generated/cshift1_4.c
16578
===================================================================
16579
--- a/src/libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release)
16580
+++ b/src/libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch)
16585
- ret->base_addr = xmalloc (size * arraysize);
16586
+ ret->base_addr = xmallocarray (arraysize, size);
16588
ret->dtype = array->dtype;
16589
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16590
Index: libgfortran/generated/maxloc0_8_i2.c
16591
===================================================================
16592
--- a/src/libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release)
16593
+++ b/src/libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch)
16595
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16596
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16597
retarray->offset = 0;
16598
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16599
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16603
@@ -199,7 +199,7 @@
16604
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16605
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16606
retarray->offset = 0;
16607
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16608
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16612
@@ -367,7 +367,7 @@
16613
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16614
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16615
retarray->offset = 0;
16616
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16617
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16619
else if (unlikely (compile_options.bounds_check))
16621
Index: libgfortran/generated/count_8_l.c
16622
===================================================================
16623
--- a/src/libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release)
16624
+++ b/src/libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch)
16625
@@ -101,8 +101,7 @@
16626
retarray->offset = 0;
16627
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16629
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16630
- * extent[rank-1];
16631
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16633
if (alloc_size == 0)
16635
@@ -111,7 +110,7 @@
16639
- retarray->base_addr = xmalloc (alloc_size);
16640
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16644
Index: libgfortran/generated/in_pack_i4.c
16645
===================================================================
16646
--- a/src/libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release)
16647
+++ b/src/libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch)
16649
return source->base_addr;
16651
/* Allocate storage for the destination. */
16652
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
16653
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
16655
src = source->base_addr;
16656
stride0 = stride[0];
16657
Index: libgfortran/generated/minloc0_16_i2.c
16658
===================================================================
16659
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
16660
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
16662
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16663
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16664
retarray->offset = 0;
16665
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16666
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16670
@@ -199,7 +199,7 @@
16671
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16672
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16673
retarray->offset = 0;
16674
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16675
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16679
@@ -367,7 +367,7 @@
16680
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16681
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16682
retarray->offset = 0;
16683
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16684
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16686
else if (unlikely (compile_options.bounds_check))
16688
Index: libgfortran/generated/minloc1_8_r8.c
16689
===================================================================
16690
--- a/src/libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release)
16691
+++ b/src/libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch)
16693
retarray->offset = 0;
16694
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16696
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16697
- * extent[rank-1];
16698
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16700
- retarray->base_addr = xmalloc (alloc_size);
16701
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16702
if (alloc_size == 0)
16704
/* Make sure we have a zero-sized array. */
16705
@@ -294,8 +293,7 @@
16709
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16710
- * extent[rank-1];
16711
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16713
retarray->offset = 0;
16714
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16715
@@ -307,7 +305,7 @@
16719
- retarray->base_addr = xmalloc (alloc_size);
16720
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16724
@@ -485,8 +483,7 @@
16725
retarray->offset = 0;
16726
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16728
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16729
- * extent[rank-1];
16730
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16732
if (alloc_size == 0)
16734
@@ -495,7 +492,7 @@
16738
- retarray->base_addr = xmalloc (alloc_size);
16739
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16743
Index: libgfortran/generated/matmul_c16.c
16744
===================================================================
16745
--- a/src/libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release)
16746
+++ b/src/libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch)
16747
@@ -124,7 +124,7 @@
16750
retarray->base_addr
16751
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
16752
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
16753
retarray->offset = 0;
16755
else if (unlikely (compile_options.bounds_check))
16756
Index: libgfortran/generated/minval_i1.c
16757
===================================================================
16758
--- a/src/libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release)
16759
+++ b/src/libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch)
16761
retarray->offset = 0;
16762
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16764
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16765
- * extent[rank-1];
16766
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16768
- retarray->base_addr = xmalloc (alloc_size);
16769
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16770
if (alloc_size == 0)
16772
/* Make sure we have a zero-sized array. */
16773
@@ -286,8 +285,7 @@
16777
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16778
- * extent[rank-1];
16779
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16781
retarray->offset = 0;
16782
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16783
@@ -299,7 +297,7 @@
16787
- retarray->base_addr = xmalloc (alloc_size);
16788
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16792
@@ -472,8 +470,7 @@
16793
retarray->offset = 0;
16794
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16796
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16797
- * extent[rank-1];
16798
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16800
if (alloc_size == 0)
16802
@@ -482,7 +479,7 @@
16806
- retarray->base_addr = xmalloc (alloc_size);
16807
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16811
Index: libgfortran/generated/shape_i16.c
16812
===================================================================
16813
--- a/src/libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release)
16814
+++ b/src/libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch)
16817
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
16819
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16820
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16823
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
16824
Index: libgfortran/generated/iany_i4.c
16825
===================================================================
16826
--- a/src/libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release)
16827
+++ b/src/libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch)
16829
retarray->offset = 0;
16830
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16832
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16833
- * extent[rank-1];
16834
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16836
- retarray->base_addr = xmalloc (alloc_size);
16837
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16838
if (alloc_size == 0)
16840
/* Make sure we have a zero-sized array. */
16841
@@ -272,8 +271,7 @@
16845
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16846
- * extent[rank-1];
16847
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16849
retarray->offset = 0;
16850
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16851
@@ -285,7 +283,7 @@
16855
- retarray->base_addr = xmalloc (alloc_size);
16856
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16860
@@ -430,8 +428,7 @@
16861
retarray->offset = 0;
16862
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16864
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16865
- * extent[rank-1];
16866
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16868
if (alloc_size == 0)
16870
@@ -440,7 +437,7 @@
16874
- retarray->base_addr = xmalloc (alloc_size);
16875
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16879
Index: libgfortran/generated/minloc0_16_r16.c
16880
===================================================================
16881
--- a/src/libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release)
16882
+++ b/src/libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch)
16884
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16885
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16886
retarray->offset = 0;
16887
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16888
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16892
@@ -199,7 +199,7 @@
16893
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16894
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16895
retarray->offset = 0;
16896
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16897
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16901
@@ -367,7 +367,7 @@
16902
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16903
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16904
retarray->offset = 0;
16905
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16906
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16908
else if (unlikely (compile_options.bounds_check))
16910
Index: libgfortran/generated/product_i16.c
16911
===================================================================
16912
--- a/src/libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release)
16913
+++ b/src/libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch)
16915
retarray->offset = 0;
16916
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16918
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16919
- * extent[rank-1];
16920
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16922
- retarray->base_addr = xmalloc (alloc_size);
16923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16924
if (alloc_size == 0)
16926
/* Make sure we have a zero-sized array. */
16927
@@ -272,8 +271,7 @@
16931
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16932
- * extent[rank-1];
16933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16935
retarray->offset = 0;
16936
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16937
@@ -285,7 +283,7 @@
16941
- retarray->base_addr = xmalloc (alloc_size);
16942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16946
@@ -430,8 +428,7 @@
16947
retarray->offset = 0;
16948
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16950
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16951
- * extent[rank-1];
16952
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16954
if (alloc_size == 0)
16956
@@ -440,7 +437,7 @@
16960
- retarray->base_addr = xmalloc (alloc_size);
16961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16965
Index: libgfortran/generated/unpack_i1.c
16966
===================================================================
16967
--- a/src/libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release)
16968
+++ b/src/libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch)
16973
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
16974
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
16978
@@ -244,7 +244,7 @@
16982
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
16983
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
16987
Index: libgfortran/generated/minloc0_4_i4.c
16988
===================================================================
16989
--- a/src/libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release)
16990
+++ b/src/libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch)
16992
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16993
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16994
retarray->offset = 0;
16995
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16996
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17000
@@ -199,7 +199,7 @@
17001
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17002
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17003
retarray->offset = 0;
17004
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17005
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17009
@@ -367,7 +367,7 @@
17010
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17011
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17012
retarray->offset = 0;
17013
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17014
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17016
else if (unlikely (compile_options.bounds_check))
17018
Index: libgfortran/generated/matmul_i1.c
17019
===================================================================
17020
--- a/src/libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release)
17021
+++ b/src/libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch)
17022
@@ -124,7 +124,7 @@
17025
retarray->base_addr
17026
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
17027
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
17028
retarray->offset = 0;
17030
else if (unlikely (compile_options.bounds_check))
17031
Index: libgfortran/generated/minval_r4.c
17032
===================================================================
17033
--- a/src/libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release)
17034
+++ b/src/libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch)
17036
retarray->offset = 0;
17037
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17039
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17040
- * extent[rank-1];
17041
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17043
- retarray->base_addr = xmalloc (alloc_size);
17044
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17045
if (alloc_size == 0)
17047
/* Make sure we have a zero-sized array. */
17048
@@ -286,8 +285,7 @@
17052
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17053
- * extent[rank-1];
17054
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17056
retarray->offset = 0;
17057
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17058
@@ -299,7 +297,7 @@
17062
- retarray->base_addr = xmalloc (alloc_size);
17063
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17067
@@ -472,8 +470,7 @@
17068
retarray->offset = 0;
17069
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17071
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17072
- * extent[rank-1];
17073
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17075
if (alloc_size == 0)
17077
@@ -482,7 +479,7 @@
17081
- retarray->base_addr = xmalloc (alloc_size);
17082
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17086
Index: libgfortran/generated/spread_i16.c
17087
===================================================================
17088
--- a/src/libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release)
17089
+++ b/src/libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch)
17090
@@ -101,8 +101,8 @@
17094
- /* xmalloc allocates a single byte for zero size. */
17095
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
17096
+ /* xmallocarray allocates a single byte for zero size. */
17097
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
17101
@@ -244,7 +244,7 @@
17103
if (ret->base_addr == NULL)
17105
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
17106
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
17108
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17110
Index: libgfortran/generated/sum_i4.c
17111
===================================================================
17112
--- a/src/libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release)
17113
+++ b/src/libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch)
17115
retarray->offset = 0;
17116
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17118
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17119
- * extent[rank-1];
17120
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17122
- retarray->base_addr = xmalloc (alloc_size);
17123
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17124
if (alloc_size == 0)
17126
/* Make sure we have a zero-sized array. */
17127
@@ -272,8 +271,7 @@
17131
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17132
- * extent[rank-1];
17133
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17135
retarray->offset = 0;
17136
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17137
@@ -285,7 +283,7 @@
17141
- retarray->base_addr = xmalloc (alloc_size);
17142
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17146
@@ -430,8 +428,7 @@
17147
retarray->offset = 0;
17148
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17150
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17151
- * extent[rank-1];
17152
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17154
if (alloc_size == 0)
17156
@@ -440,7 +437,7 @@
17160
- retarray->base_addr = xmalloc (alloc_size);
17161
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17165
Index: libgfortran/generated/unpack_r10.c
17166
===================================================================
17167
--- a/src/libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release)
17168
+++ b/src/libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch)
17173
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
17174
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
17178
@@ -244,7 +244,7 @@
17182
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
17183
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
17187
Index: libgfortran/generated/bessel_r16.c
17188
===================================================================
17189
--- a/src/libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release)
17190
+++ b/src/libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch)
17193
size_t size = n2 < n1 ? 0 : n2-n1+1;
17194
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17195
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
17196
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
17200
@@ -126,7 +126,7 @@
17202
size_t size = n2 < n1 ? 0 : n2-n1+1;
17203
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17204
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
17205
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
17209
@@ -166,7 +166,7 @@
17211
x2rev = GFC_REAL_16_LITERAL(2.)/x;
17213
- for (i = 2; i <= n1+n2; i++)
17214
+ for (i = 2; i <= n2 - n1; i++)
17216
#if defined(GFC_REAL_16_INFINITY)
17217
if (unlikely (last2 == -GFC_REAL_16_INFINITY))
17218
Index: libgfortran/generated/norm2_r8.c
17219
===================================================================
17220
--- a/src/libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release)
17221
+++ b/src/libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch)
17222
@@ -101,10 +101,9 @@
17223
retarray->offset = 0;
17224
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17226
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17227
- * extent[rank-1];
17228
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17230
- retarray->base_addr = xmalloc (alloc_size);
17231
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17232
if (alloc_size == 0)
17234
/* Make sure we have a zero-sized array. */
17235
Index: libgfortran/generated/spread_i4.c
17236
===================================================================
17237
--- a/src/libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release)
17238
+++ b/src/libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch)
17239
@@ -101,8 +101,8 @@
17243
- /* xmalloc allocates a single byte for zero size. */
17244
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
17245
+ /* xmallocarray allocates a single byte for zero size. */
17246
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
17250
@@ -244,7 +244,7 @@
17252
if (ret->base_addr == NULL)
17254
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
17255
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
17257
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17259
Index: libgfortran/generated/eoshift3_8.c
17260
===================================================================
17261
--- a/src/libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release)
17262
+++ b/src/libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch)
17267
- ret->base_addr = xmalloc (size * arraysize);
17268
+ ret->base_addr = xmallocarray (arraysize, size);
17270
ret->dtype = array->dtype;
17271
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17272
@@ -107,8 +107,8 @@
17273
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17276
- /* xmalloc allocates a single byte for zero size. */
17277
- ret->base_addr = xmalloc (size * arraysize);
17278
+ /* xmallocarray allocates a single byte for zero size. */
17279
+ ret->base_addr = xmallocarray (arraysize, size);
17282
else if (unlikely (compile_options.bounds_check))
17283
Index: libgfortran/generated/minloc1_4_i1.c
17284
===================================================================
17285
--- a/src/libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release)
17286
+++ b/src/libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch)
17288
retarray->offset = 0;
17289
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17291
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17292
- * extent[rank-1];
17293
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17295
- retarray->base_addr = xmalloc (alloc_size);
17296
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17297
if (alloc_size == 0)
17299
/* Make sure we have a zero-sized array. */
17300
@@ -294,8 +293,7 @@
17304
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17305
- * extent[rank-1];
17306
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17308
retarray->offset = 0;
17309
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17310
@@ -307,7 +305,7 @@
17314
- retarray->base_addr = xmalloc (alloc_size);
17315
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17319
@@ -485,8 +483,7 @@
17320
retarray->offset = 0;
17321
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17323
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17324
- * extent[rank-1];
17325
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17327
if (alloc_size == 0)
17329
@@ -495,7 +492,7 @@
17333
- retarray->base_addr = xmalloc (alloc_size);
17334
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17338
Index: libgfortran/generated/minval_i2.c
17339
===================================================================
17340
--- a/src/libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release)
17341
+++ b/src/libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch)
17343
retarray->offset = 0;
17344
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17346
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17347
- * extent[rank-1];
17348
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17350
- retarray->base_addr = xmalloc (alloc_size);
17351
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17352
if (alloc_size == 0)
17354
/* Make sure we have a zero-sized array. */
17355
@@ -286,8 +285,7 @@
17359
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17360
- * extent[rank-1];
17361
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17363
retarray->offset = 0;
17364
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17365
@@ -299,7 +297,7 @@
17369
- retarray->base_addr = xmalloc (alloc_size);
17370
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17374
@@ -472,8 +470,7 @@
17375
retarray->offset = 0;
17376
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17378
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17379
- * extent[rank-1];
17380
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17382
if (alloc_size == 0)
17384
@@ -482,7 +479,7 @@
17388
- retarray->base_addr = xmalloc (alloc_size);
17389
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17393
Index: libgfortran/generated/bessel_r8.c
17394
===================================================================
17395
--- a/src/libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release)
17396
+++ b/src/libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch)
17399
size_t size = n2 < n1 ? 0 : n2-n1+1;
17400
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17401
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
17402
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
17406
@@ -122,7 +122,7 @@
17408
size_t size = n2 < n1 ? 0 : n2-n1+1;
17409
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17410
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
17411
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
17415
@@ -162,7 +162,7 @@
17417
x2rev = GFC_REAL_8_LITERAL(2.)/x;
17419
- for (i = 2; i <= n1+n2; i++)
17420
+ for (i = 2; i <= n2 - n1; i++)
17422
#if defined(GFC_REAL_8_INFINITY)
17423
if (unlikely (last2 == -GFC_REAL_8_INFINITY))
17424
Index: libgfortran/generated/unpack_r4.c
17425
===================================================================
17426
--- a/src/libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release)
17427
+++ b/src/libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch)
17432
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
17433
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
17437
@@ -244,7 +244,7 @@
17441
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
17442
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
17446
Index: libgfortran/generated/product_r8.c
17447
===================================================================
17448
--- a/src/libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release)
17449
+++ b/src/libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch)
17451
retarray->offset = 0;
17452
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17454
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17455
- * extent[rank-1];
17456
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17458
- retarray->base_addr = xmalloc (alloc_size);
17459
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17460
if (alloc_size == 0)
17462
/* Make sure we have a zero-sized array. */
17463
@@ -272,8 +271,7 @@
17467
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17468
- * extent[rank-1];
17469
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17471
retarray->offset = 0;
17472
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17473
@@ -285,7 +283,7 @@
17477
- retarray->base_addr = xmalloc (alloc_size);
17478
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17482
@@ -430,8 +428,7 @@
17483
retarray->offset = 0;
17484
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17486
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17487
- * extent[rank-1];
17488
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17490
if (alloc_size == 0)
17492
@@ -440,7 +437,7 @@
17496
- retarray->base_addr = xmalloc (alloc_size);
17497
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17501
Index: libgfortran/generated/matmul_r4.c
17502
===================================================================
17503
--- a/src/libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release)
17504
+++ b/src/libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch)
17505
@@ -124,7 +124,7 @@
17508
retarray->base_addr
17509
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
17510
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
17511
retarray->offset = 0;
17513
else if (unlikely (compile_options.bounds_check))
17514
Index: libgfortran/generated/unpack_i2.c
17515
===================================================================
17516
--- a/src/libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release)
17517
+++ b/src/libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch)
17522
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
17523
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
17527
@@ -244,7 +244,7 @@
17531
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
17532
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
17536
Index: libgfortran/generated/in_pack_r8.c
17537
===================================================================
17538
--- a/src/libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release)
17539
+++ b/src/libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch)
17541
return source->base_addr;
17543
/* Allocate storage for the destination. */
17544
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
17545
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
17547
src = source->base_addr;
17548
stride0 = stride[0];
17549
Index: libgfortran/generated/maxloc1_4_r16.c
17550
===================================================================
17551
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
17552
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
17554
retarray->offset = 0;
17555
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17557
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17558
- * extent[rank-1];
17559
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17561
- retarray->base_addr = xmalloc (alloc_size);
17562
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17563
if (alloc_size == 0)
17565
/* Make sure we have a zero-sized array. */
17566
@@ -294,8 +293,7 @@
17570
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17571
- * extent[rank-1];
17572
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17574
retarray->offset = 0;
17575
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17576
@@ -307,7 +305,7 @@
17580
- retarray->base_addr = xmalloc (alloc_size);
17581
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17585
@@ -485,8 +483,7 @@
17586
retarray->offset = 0;
17587
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17589
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17590
- * extent[rank-1];
17591
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17593
if (alloc_size == 0)
17595
@@ -495,7 +492,7 @@
17599
- retarray->base_addr = xmalloc (alloc_size);
17600
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17604
Index: libgfortran/generated/minloc0_8_r16.c
17605
===================================================================
17606
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
17607
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
17609
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17610
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17611
retarray->offset = 0;
17612
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17613
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17617
@@ -199,7 +199,7 @@
17618
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17619
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17620
retarray->offset = 0;
17621
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17622
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17626
@@ -367,7 +367,7 @@
17627
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17628
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17629
retarray->offset = 0;
17630
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17631
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17633
else if (unlikely (compile_options.bounds_check))
17635
Index: libgfortran/generated/reshape_c8.c
17636
===================================================================
17637
--- a/src/libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release)
17638
+++ b/src/libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch)
17639
@@ -111,11 +111,11 @@
17642
if (unlikely (rs < 1))
17646
- alloc_size = rs * sizeof (GFC_COMPLEX_8);
17649
- ret->base_addr = xmalloc (alloc_size);
17650
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
17651
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17654
Index: libgfortran/generated/iparity_i8.c
17655
===================================================================
17656
--- a/src/libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release)
17657
+++ b/src/libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch)
17659
retarray->offset = 0;
17660
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17662
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17663
- * extent[rank-1];
17664
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17666
- retarray->base_addr = xmalloc (alloc_size);
17667
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17668
if (alloc_size == 0)
17670
/* Make sure we have a zero-sized array. */
17671
@@ -272,8 +271,7 @@
17675
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17676
- * extent[rank-1];
17677
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17679
retarray->offset = 0;
17680
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17681
@@ -285,7 +283,7 @@
17685
- retarray->base_addr = xmalloc (alloc_size);
17686
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17690
@@ -430,8 +428,7 @@
17691
retarray->offset = 0;
17692
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17694
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17695
- * extent[rank-1];
17696
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17698
if (alloc_size == 0)
17700
@@ -440,7 +437,7 @@
17704
- retarray->base_addr = xmalloc (alloc_size);
17705
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17709
Index: libgfortran/generated/count_1_l.c
17710
===================================================================
17711
--- a/src/libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release)
17712
+++ b/src/libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch)
17713
@@ -101,8 +101,7 @@
17714
retarray->offset = 0;
17715
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17717
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17718
- * extent[rank-1];
17719
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17721
if (alloc_size == 0)
17723
@@ -111,7 +110,7 @@
17727
- retarray->base_addr = xmalloc (alloc_size);
17728
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17732
Index: libgfortran/generated/maxloc0_8_i4.c
17733
===================================================================
17734
--- a/src/libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release)
17735
+++ b/src/libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch)
17737
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17738
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17739
retarray->offset = 0;
17740
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17741
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17745
@@ -199,7 +199,7 @@
17746
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17747
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17748
retarray->offset = 0;
17749
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17750
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17754
@@ -367,7 +367,7 @@
17755
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17756
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17757
retarray->offset = 0;
17758
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17759
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17761
else if (unlikely (compile_options.bounds_check))
17763
Index: libgfortran/generated/matmul_i2.c
17764
===================================================================
17765
--- a/src/libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release)
17766
+++ b/src/libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch)
17767
@@ -124,7 +124,7 @@
17770
retarray->base_addr
17771
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
17772
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
17773
retarray->offset = 0;
17775
else if (unlikely (compile_options.bounds_check))
17776
Index: libgfortran/generated/minloc1_4_r4.c
17777
===================================================================
17778
--- a/src/libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release)
17779
+++ b/src/libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch)
17781
retarray->offset = 0;
17782
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17784
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17785
- * extent[rank-1];
17786
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17788
- retarray->base_addr = xmalloc (alloc_size);
17789
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17790
if (alloc_size == 0)
17792
/* Make sure we have a zero-sized array. */
17793
@@ -294,8 +293,7 @@
17797
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17798
- * extent[rank-1];
17799
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17801
retarray->offset = 0;
17802
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17803
@@ -307,7 +305,7 @@
17807
- retarray->base_addr = xmalloc (alloc_size);
17808
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17812
@@ -485,8 +483,7 @@
17813
retarray->offset = 0;
17814
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17816
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17817
- * extent[rank-1];
17818
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17820
if (alloc_size == 0)
17822
@@ -495,7 +492,7 @@
17826
- retarray->base_addr = xmalloc (alloc_size);
17827
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17831
Index: libgfortran/generated/transpose_i16.c
17832
===================================================================
17833
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
17834
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
17836
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17837
GFC_DESCRIPTOR_EXTENT(source, 1));
17839
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
17840
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17841
+ sizeof (GFC_INTEGER_16));
17843
} else if (unlikely (compile_options.bounds_check))
17845
Index: libgfortran/generated/minloc0_16_i4.c
17846
===================================================================
17847
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
17848
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
17850
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17851
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17852
retarray->offset = 0;
17853
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17854
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17858
@@ -199,7 +199,7 @@
17859
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17860
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17861
retarray->offset = 0;
17862
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17863
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17867
@@ -367,7 +367,7 @@
17868
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17869
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17870
retarray->offset = 0;
17871
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17872
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17874
else if (unlikely (compile_options.bounds_check))
17876
Index: libgfortran/generated/transpose_i4.c
17877
===================================================================
17878
--- a/src/libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release)
17879
+++ b/src/libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch)
17881
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17882
GFC_DESCRIPTOR_EXTENT(source, 1));
17884
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
17885
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17886
+ sizeof (GFC_INTEGER_4));
17888
} else if (unlikely (compile_options.bounds_check))
17890
Index: libgfortran/generated/maxloc1_16_i8.c
17891
===================================================================
17892
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
17893
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
17895
retarray->offset = 0;
17896
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17898
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17899
- * extent[rank-1];
17900
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17902
- retarray->base_addr = xmalloc (alloc_size);
17903
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17904
if (alloc_size == 0)
17906
/* Make sure we have a zero-sized array. */
17907
@@ -294,8 +293,7 @@
17911
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17912
- * extent[rank-1];
17913
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17915
retarray->offset = 0;
17916
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17917
@@ -307,7 +305,7 @@
17921
- retarray->base_addr = xmalloc (alloc_size);
17922
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17926
@@ -485,8 +483,7 @@
17927
retarray->offset = 0;
17928
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17930
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17931
- * extent[rank-1];
17932
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17934
if (alloc_size == 0)
17936
@@ -495,7 +492,7 @@
17940
- retarray->base_addr = xmalloc (alloc_size);
17941
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17945
Index: libgfortran/generated/minloc1_4_i2.c
17946
===================================================================
17947
--- a/src/libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release)
17948
+++ b/src/libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch)
17950
retarray->offset = 0;
17951
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17953
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17954
- * extent[rank-1];
17955
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17957
- retarray->base_addr = xmalloc (alloc_size);
17958
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17959
if (alloc_size == 0)
17961
/* Make sure we have a zero-sized array. */
17962
@@ -294,8 +293,7 @@
17966
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17967
- * extent[rank-1];
17968
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17970
retarray->offset = 0;
17971
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17972
@@ -307,7 +305,7 @@
17976
- retarray->base_addr = xmalloc (alloc_size);
17977
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17981
@@ -485,8 +483,7 @@
17982
retarray->offset = 0;
17983
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17985
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17986
- * extent[rank-1];
17987
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17989
if (alloc_size == 0)
17991
@@ -495,7 +492,7 @@
17995
- retarray->base_addr = xmalloc (alloc_size);
17996
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18000
Index: libgfortran/generated/matmul_l16.c
18001
===================================================================
18002
--- a/src/libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release)
18003
+++ b/src/libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch)
18007
retarray->base_addr
18008
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
18009
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
18010
retarray->offset = 0;
18012
else if (unlikely (compile_options.bounds_check))
18013
Index: libgfortran/generated/maxloc1_8_i1.c
18014
===================================================================
18015
--- a/src/libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release)
18016
+++ b/src/libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch)
18018
retarray->offset = 0;
18019
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18021
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18022
- * extent[rank-1];
18023
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18025
- retarray->base_addr = xmalloc (alloc_size);
18026
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18027
if (alloc_size == 0)
18029
/* Make sure we have a zero-sized array. */
18030
@@ -294,8 +293,7 @@
18034
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18035
- * extent[rank-1];
18036
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18038
retarray->offset = 0;
18039
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18040
@@ -307,7 +305,7 @@
18044
- retarray->base_addr = xmalloc (alloc_size);
18045
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18049
@@ -485,8 +483,7 @@
18050
retarray->offset = 0;
18051
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18053
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18054
- * extent[rank-1];
18055
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18057
if (alloc_size == 0)
18059
@@ -495,7 +492,7 @@
18063
- retarray->base_addr = xmalloc (alloc_size);
18064
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18068
Index: libgfortran/generated/minloc1_8_i8.c
18069
===================================================================
18070
--- a/src/libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release)
18071
+++ b/src/libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch)
18073
retarray->offset = 0;
18074
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18076
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18077
- * extent[rank-1];
18078
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18080
- retarray->base_addr = xmalloc (alloc_size);
18081
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18082
if (alloc_size == 0)
18084
/* Make sure we have a zero-sized array. */
18085
@@ -294,8 +293,7 @@
18089
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18090
- * extent[rank-1];
18091
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18093
retarray->offset = 0;
18094
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18095
@@ -307,7 +305,7 @@
18099
- retarray->base_addr = xmalloc (alloc_size);
18100
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18104
@@ -485,8 +483,7 @@
18105
retarray->offset = 0;
18106
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18108
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18109
- * extent[rank-1];
18110
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18112
if (alloc_size == 0)
18114
@@ -495,7 +492,7 @@
18118
- retarray->base_addr = xmalloc (alloc_size);
18119
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18123
Index: libgfortran/generated/minloc0_4_r8.c
18124
===================================================================
18125
--- a/src/libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release)
18126
+++ b/src/libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch)
18128
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18129
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18130
retarray->offset = 0;
18131
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18132
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18136
@@ -199,7 +199,7 @@
18137
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18138
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18139
retarray->offset = 0;
18140
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18141
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18145
@@ -367,7 +367,7 @@
18146
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18147
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18148
retarray->offset = 0;
18149
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18150
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18152
else if (unlikely (compile_options.bounds_check))
18154
Index: libgfortran/generated/product_r16.c
18155
===================================================================
18156
--- a/src/libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release)
18157
+++ b/src/libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch)
18159
retarray->offset = 0;
18160
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18162
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18163
- * extent[rank-1];
18164
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18166
- retarray->base_addr = xmalloc (alloc_size);
18167
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18168
if (alloc_size == 0)
18170
/* Make sure we have a zero-sized array. */
18171
@@ -272,8 +271,7 @@
18175
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18176
- * extent[rank-1];
18177
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18179
retarray->offset = 0;
18180
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18181
@@ -285,7 +283,7 @@
18185
- retarray->base_addr = xmalloc (alloc_size);
18186
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18190
@@ -430,8 +428,7 @@
18191
retarray->offset = 0;
18192
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18194
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18195
- * extent[rank-1];
18196
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18198
if (alloc_size == 0)
18200
@@ -440,7 +437,7 @@
18204
- retarray->base_addr = xmalloc (alloc_size);
18205
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18209
Index: libgfortran/generated/sum_r8.c
18210
===================================================================
18211
--- a/src/libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release)
18212
+++ b/src/libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch)
18214
retarray->offset = 0;
18215
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18217
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18218
- * extent[rank-1];
18219
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18221
- retarray->base_addr = xmalloc (alloc_size);
18222
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18223
if (alloc_size == 0)
18225
/* Make sure we have a zero-sized array. */
18226
@@ -272,8 +271,7 @@
18230
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18231
- * extent[rank-1];
18232
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18234
retarray->offset = 0;
18235
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18236
@@ -285,7 +283,7 @@
18240
- retarray->base_addr = xmalloc (alloc_size);
18241
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18245
@@ -430,8 +428,7 @@
18246
retarray->offset = 0;
18247
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18249
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18250
- * extent[rank-1];
18251
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18253
if (alloc_size == 0)
18255
@@ -440,7 +437,7 @@
18259
- retarray->base_addr = xmalloc (alloc_size);
18260
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18264
Index: libgfortran/generated/norm2_r10.c
18265
===================================================================
18266
--- a/src/libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release)
18267
+++ b/src/libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch)
18268
@@ -101,10 +101,9 @@
18269
retarray->offset = 0;
18270
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18272
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18273
- * extent[rank-1];
18274
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18276
- retarray->base_addr = xmalloc (alloc_size);
18277
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18278
if (alloc_size == 0)
18280
/* Make sure we have a zero-sized array. */
18281
Index: libgfortran/generated/unpack_c10.c
18282
===================================================================
18283
--- a/src/libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release)
18284
+++ b/src/libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch)
18289
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
18290
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
18294
@@ -244,7 +244,7 @@
18298
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
18299
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
18303
Index: libgfortran/generated/spread_r8.c
18304
===================================================================
18305
--- a/src/libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release)
18306
+++ b/src/libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch)
18307
@@ -101,8 +101,8 @@
18311
- /* xmalloc allocates a single byte for zero size. */
18312
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
18313
+ /* xmallocarray allocates a single byte for zero size. */
18314
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
18318
@@ -244,7 +244,7 @@
18320
if (ret->base_addr == NULL)
18322
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
18323
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
18325
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18327
Index: libgfortran/generated/minloc1_16_i16.c
18328
===================================================================
18329
--- a/src/libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release)
18330
+++ b/src/libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch)
18332
retarray->offset = 0;
18333
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18335
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18336
- * extent[rank-1];
18337
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18339
- retarray->base_addr = xmalloc (alloc_size);
18340
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18341
if (alloc_size == 0)
18343
/* Make sure we have a zero-sized array. */
18344
@@ -294,8 +293,7 @@
18348
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18349
- * extent[rank-1];
18350
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18352
retarray->offset = 0;
18353
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18354
@@ -307,7 +305,7 @@
18358
- retarray->base_addr = xmalloc (alloc_size);
18359
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18363
@@ -485,8 +483,7 @@
18364
retarray->offset = 0;
18365
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18367
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18368
- * extent[rank-1];
18369
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18371
if (alloc_size == 0)
18373
@@ -495,7 +492,7 @@
18377
- retarray->base_addr = xmalloc (alloc_size);
18378
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18382
Index: libgfortran/generated/maxloc1_8_r4.c
18383
===================================================================
18384
--- a/src/libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release)
18385
+++ b/src/libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch)
18387
retarray->offset = 0;
18388
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18390
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18391
- * extent[rank-1];
18392
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18394
- retarray->base_addr = xmalloc (alloc_size);
18395
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18396
if (alloc_size == 0)
18398
/* Make sure we have a zero-sized array. */
18399
@@ -294,8 +293,7 @@
18403
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18404
- * extent[rank-1];
18405
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18407
retarray->offset = 0;
18408
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18409
@@ -307,7 +305,7 @@
18413
- retarray->base_addr = xmalloc (alloc_size);
18414
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18418
@@ -485,8 +483,7 @@
18419
retarray->offset = 0;
18420
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18422
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18423
- * extent[rank-1];
18424
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18426
if (alloc_size == 0)
18428
@@ -495,7 +492,7 @@
18432
- retarray->base_addr = xmalloc (alloc_size);
18433
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18437
Index: libgfortran/generated/minloc1_16_i1.c
18438
===================================================================
18439
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
18440
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
18442
retarray->offset = 0;
18443
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18445
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18446
- * extent[rank-1];
18447
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18449
- retarray->base_addr = xmalloc (alloc_size);
18450
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18451
if (alloc_size == 0)
18453
/* Make sure we have a zero-sized array. */
18454
@@ -294,8 +293,7 @@
18458
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18459
- * extent[rank-1];
18460
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18462
retarray->offset = 0;
18463
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18464
@@ -307,7 +305,7 @@
18468
- retarray->base_addr = xmalloc (alloc_size);
18469
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18473
@@ -485,8 +483,7 @@
18474
retarray->offset = 0;
18475
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18477
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18478
- * extent[rank-1];
18479
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18481
if (alloc_size == 0)
18483
@@ -495,7 +492,7 @@
18487
- retarray->base_addr = xmalloc (alloc_size);
18488
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18492
Index: libgfortran/generated/spread_r16.c
18493
===================================================================
18494
--- a/src/libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release)
18495
+++ b/src/libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch)
18496
@@ -101,8 +101,8 @@
18500
- /* xmalloc allocates a single byte for zero size. */
18501
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
18502
+ /* xmallocarray allocates a single byte for zero size. */
18503
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
18507
@@ -244,7 +244,7 @@
18509
if (ret->base_addr == NULL)
18511
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
18512
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
18514
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18516
Index: libgfortran/generated/pack_c8.c
18517
===================================================================
18518
--- a/src/libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release)
18519
+++ b/src/libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch)
18520
@@ -167,8 +167,8 @@
18524
- /* xmalloc allocates a single byte for zero size. */
18525
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
18526
+ /* xmallocarray allocates a single byte for zero size. */
18527
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
18531
Index: libgfortran/generated/minval_r10.c
18532
===================================================================
18533
--- a/src/libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release)
18534
+++ b/src/libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch)
18536
retarray->offset = 0;
18537
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18539
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18540
- * extent[rank-1];
18541
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18543
- retarray->base_addr = xmalloc (alloc_size);
18544
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18545
if (alloc_size == 0)
18547
/* Make sure we have a zero-sized array. */
18548
@@ -286,8 +285,7 @@
18552
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18553
- * extent[rank-1];
18554
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18556
retarray->offset = 0;
18557
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18558
@@ -299,7 +297,7 @@
18562
- retarray->base_addr = xmalloc (alloc_size);
18563
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18567
@@ -472,8 +470,7 @@
18568
retarray->offset = 0;
18569
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18571
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18572
- * extent[rank-1];
18573
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18575
if (alloc_size == 0)
18577
@@ -482,7 +479,7 @@
18581
- retarray->base_addr = xmalloc (alloc_size);
18582
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18586
Index: libgfortran/generated/parity_l8.c
18587
===================================================================
18588
--- a/src/libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release)
18589
+++ b/src/libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch)
18591
retarray->offset = 0;
18592
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18594
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18595
- * extent[rank-1];
18596
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18598
- retarray->base_addr = xmalloc (alloc_size);
18599
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
18600
if (alloc_size == 0)
18602
/* Make sure we have a zero-sized array. */
18603
Index: libgfortran/generated/minval_i4.c
18604
===================================================================
18605
--- a/src/libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release)
18606
+++ b/src/libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch)
18608
retarray->offset = 0;
18609
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18611
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18612
- * extent[rank-1];
18613
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18615
- retarray->base_addr = xmalloc (alloc_size);
18616
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18617
if (alloc_size == 0)
18619
/* Make sure we have a zero-sized array. */
18620
@@ -286,8 +285,7 @@
18624
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18625
- * extent[rank-1];
18626
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18628
retarray->offset = 0;
18629
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18630
@@ -299,7 +297,7 @@
18634
- retarray->base_addr = xmalloc (alloc_size);
18635
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18639
@@ -472,8 +470,7 @@
18640
retarray->offset = 0;
18641
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18643
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18644
- * extent[rank-1];
18645
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18647
if (alloc_size == 0)
18649
@@ -482,7 +479,7 @@
18653
- retarray->base_addr = xmalloc (alloc_size);
18654
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18658
Index: libgfortran/generated/maxloc1_8_i2.c
18659
===================================================================
18660
--- a/src/libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release)
18661
+++ b/src/libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch)
18663
retarray->offset = 0;
18664
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18666
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18667
- * extent[rank-1];
18668
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18670
- retarray->base_addr = xmalloc (alloc_size);
18671
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18672
if (alloc_size == 0)
18674
/* Make sure we have a zero-sized array. */
18675
@@ -294,8 +293,7 @@
18679
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18680
- * extent[rank-1];
18681
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18683
retarray->offset = 0;
18684
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18685
@@ -307,7 +305,7 @@
18689
- retarray->base_addr = xmalloc (alloc_size);
18690
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18694
@@ -485,8 +483,7 @@
18695
retarray->offset = 0;
18696
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18698
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18699
- * extent[rank-1];
18700
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18702
if (alloc_size == 0)
18704
@@ -495,7 +492,7 @@
18708
- retarray->base_addr = xmalloc (alloc_size);
18709
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18713
Index: libgfortran/generated/any_l8.c
18714
===================================================================
18715
--- a/src/libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release)
18716
+++ b/src/libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch)
18717
@@ -101,8 +101,7 @@
18718
retarray->offset = 0;
18719
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18721
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18722
- * extent[rank-1];
18723
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18725
if (alloc_size == 0)
18727
@@ -111,7 +110,7 @@
18731
- retarray->base_addr = xmalloc (alloc_size);
18732
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
18736
Index: libgfortran/generated/maxloc0_16_r10.c
18737
===================================================================
18738
--- a/src/libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release)
18739
+++ b/src/libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch)
18741
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18742
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18743
retarray->offset = 0;
18744
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18745
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18749
@@ -199,7 +199,7 @@
18750
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18751
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18752
retarray->offset = 0;
18753
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18754
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18758
@@ -367,7 +367,7 @@
18759
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18760
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18761
retarray->offset = 0;
18762
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18763
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18765
else if (unlikely (compile_options.bounds_check))
18767
Index: libgfortran/generated/minloc0_4_i16.c
18768
===================================================================
18769
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
18770
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
18772
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18773
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18774
retarray->offset = 0;
18775
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18776
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18780
@@ -199,7 +199,7 @@
18781
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18782
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18783
retarray->offset = 0;
18784
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18785
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18789
@@ -367,7 +367,7 @@
18790
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18791
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18792
retarray->offset = 0;
18793
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18794
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18796
else if (unlikely (compile_options.bounds_check))
18798
Index: libgfortran/generated/maxloc0_8_r8.c
18799
===================================================================
18800
--- a/src/libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release)
18801
+++ b/src/libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch)
18803
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18804
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18805
retarray->offset = 0;
18806
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18807
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18811
@@ -199,7 +199,7 @@
18812
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18813
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18814
retarray->offset = 0;
18815
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18816
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18820
@@ -367,7 +367,7 @@
18821
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18822
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18823
retarray->offset = 0;
18824
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18825
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18827
else if (unlikely (compile_options.bounds_check))
18829
Index: libgfortran/generated/minloc1_4_r10.c
18830
===================================================================
18831
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
18832
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
18834
retarray->offset = 0;
18835
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18837
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18838
- * extent[rank-1];
18839
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18841
- retarray->base_addr = xmalloc (alloc_size);
18842
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18843
if (alloc_size == 0)
18845
/* Make sure we have a zero-sized array. */
18846
@@ -294,8 +293,7 @@
18850
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18851
- * extent[rank-1];
18852
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18854
retarray->offset = 0;
18855
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18856
@@ -307,7 +305,7 @@
18860
- retarray->base_addr = xmalloc (alloc_size);
18861
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18865
@@ -485,8 +483,7 @@
18866
retarray->offset = 0;
18867
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18869
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18870
- * extent[rank-1];
18871
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18873
if (alloc_size == 0)
18875
@@ -495,7 +492,7 @@
18879
- retarray->base_addr = xmalloc (alloc_size);
18880
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18884
Index: libgfortran/generated/minloc1_8_i16.c
18885
===================================================================
18886
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
18887
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
18889
retarray->offset = 0;
18890
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18892
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18893
- * extent[rank-1];
18894
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18896
- retarray->base_addr = xmalloc (alloc_size);
18897
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18898
if (alloc_size == 0)
18900
/* Make sure we have a zero-sized array. */
18901
@@ -294,8 +293,7 @@
18905
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18906
- * extent[rank-1];
18907
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18909
retarray->offset = 0;
18910
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18911
@@ -307,7 +305,7 @@
18915
- retarray->base_addr = xmalloc (alloc_size);
18916
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18920
@@ -485,8 +483,7 @@
18921
retarray->offset = 0;
18922
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18924
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18925
- * extent[rank-1];
18926
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18928
if (alloc_size == 0)
18930
@@ -495,7 +492,7 @@
18934
- retarray->base_addr = xmalloc (alloc_size);
18935
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18939
Index: libgfortran/generated/maxloc0_8_r10.c
18940
===================================================================
18941
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
18942
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
18944
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18945
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18946
retarray->offset = 0;
18947
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18948
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18952
@@ -199,7 +199,7 @@
18953
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18954
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18955
retarray->offset = 0;
18956
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18957
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18961
@@ -367,7 +367,7 @@
18962
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18963
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18964
retarray->offset = 0;
18965
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18966
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18968
else if (unlikely (compile_options.bounds_check))
18970
Index: libgfortran/generated/unpack_i4.c
18971
===================================================================
18972
--- a/src/libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release)
18973
+++ b/src/libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch)
18978
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
18979
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
18983
@@ -244,7 +244,7 @@
18987
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
18988
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
18992
Index: libgfortran/generated/minloc1_16_r4.c
18993
===================================================================
18994
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
18995
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
18997
retarray->offset = 0;
18998
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19000
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19001
- * extent[rank-1];
19002
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19004
- retarray->base_addr = xmalloc (alloc_size);
19005
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19006
if (alloc_size == 0)
19008
/* Make sure we have a zero-sized array. */
19009
@@ -294,8 +293,7 @@
19013
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19014
- * extent[rank-1];
19015
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19017
retarray->offset = 0;
19018
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19019
@@ -307,7 +305,7 @@
19023
- retarray->base_addr = xmalloc (alloc_size);
19024
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19028
@@ -485,8 +483,7 @@
19029
retarray->offset = 0;
19030
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19032
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19033
- * extent[rank-1];
19034
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19036
if (alloc_size == 0)
19038
@@ -495,7 +492,7 @@
19042
- retarray->base_addr = xmalloc (alloc_size);
19043
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19047
Index: libgfortran/generated/product_i8.c
19048
===================================================================
19049
--- a/src/libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release)
19050
+++ b/src/libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch)
19052
retarray->offset = 0;
19053
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19055
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19056
- * extent[rank-1];
19057
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19059
- retarray->base_addr = xmalloc (alloc_size);
19060
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19061
if (alloc_size == 0)
19063
/* Make sure we have a zero-sized array. */
19064
@@ -272,8 +271,7 @@
19068
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19069
- * extent[rank-1];
19070
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19072
retarray->offset = 0;
19073
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19074
@@ -285,7 +283,7 @@
19078
- retarray->base_addr = xmalloc (alloc_size);
19079
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19083
@@ -430,8 +428,7 @@
19084
retarray->offset = 0;
19085
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19087
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19088
- * extent[rank-1];
19089
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19091
if (alloc_size == 0)
19093
@@ -440,7 +437,7 @@
19097
- retarray->base_addr = xmalloc (alloc_size);
19098
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19102
Index: libgfortran/generated/minloc0_16_r8.c
19103
===================================================================
19104
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
19105
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
19107
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19108
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19109
retarray->offset = 0;
19110
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19111
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19115
@@ -199,7 +199,7 @@
19116
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19117
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19118
retarray->offset = 0;
19119
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19120
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19124
@@ -367,7 +367,7 @@
19125
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19126
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19127
retarray->offset = 0;
19128
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19129
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19131
else if (unlikely (compile_options.bounds_check))
19133
Index: libgfortran/generated/count_2_l.c
19134
===================================================================
19135
--- a/src/libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release)
19136
+++ b/src/libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch)
19137
@@ -101,8 +101,7 @@
19138
retarray->offset = 0;
19139
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19141
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19142
- * extent[rank-1];
19143
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19145
if (alloc_size == 0)
19147
@@ -111,7 +110,7 @@
19151
- retarray->base_addr = xmalloc (alloc_size);
19152
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19156
Index: libgfortran/generated/transpose_r8.c
19157
===================================================================
19158
--- a/src/libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release)
19159
+++ b/src/libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch)
19161
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19162
GFC_DESCRIPTOR_EXTENT(source, 1));
19164
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
19165
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19166
+ sizeof (GFC_REAL_8));
19168
} else if (unlikely (compile_options.bounds_check))
19170
Index: libgfortran/generated/cshift1_8.c
19171
===================================================================
19172
--- a/src/libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release)
19173
+++ b/src/libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch)
19178
- ret->base_addr = xmalloc (size * arraysize);
19179
+ ret->base_addr = xmallocarray (arraysize, size);
19181
ret->dtype = array->dtype;
19182
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
19183
Index: libgfortran/generated/matmul_i4.c
19184
===================================================================
19185
--- a/src/libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release)
19186
+++ b/src/libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch)
19187
@@ -124,7 +124,7 @@
19190
retarray->base_addr
19191
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
19192
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
19193
retarray->offset = 0;
19195
else if (unlikely (compile_options.bounds_check))
19196
Index: libgfortran/generated/pack_r10.c
19197
===================================================================
19198
--- a/src/libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release)
19199
+++ b/src/libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch)
19200
@@ -167,8 +167,8 @@
19204
- /* xmalloc allocates a single byte for zero size. */
19205
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
19206
+ /* xmallocarray allocates a single byte for zero size. */
19207
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
19211
Index: libgfortran/generated/minloc1_16_i2.c
19212
===================================================================
19213
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
19214
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
19216
retarray->offset = 0;
19217
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19219
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19220
- * extent[rank-1];
19221
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19223
- retarray->base_addr = xmalloc (alloc_size);
19224
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19225
if (alloc_size == 0)
19227
/* Make sure we have a zero-sized array. */
19228
@@ -294,8 +293,7 @@
19232
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19233
- * extent[rank-1];
19234
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19236
retarray->offset = 0;
19237
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19238
@@ -307,7 +305,7 @@
19242
- retarray->base_addr = xmalloc (alloc_size);
19243
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19247
@@ -485,8 +483,7 @@
19248
retarray->offset = 0;
19249
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19251
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19252
- * extent[rank-1];
19253
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19255
if (alloc_size == 0)
19257
@@ -495,7 +492,7 @@
19261
- retarray->base_addr = xmalloc (alloc_size);
19262
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19266
Index: libgfortran/generated/in_pack_i8.c
19267
===================================================================
19268
--- a/src/libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release)
19269
+++ b/src/libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch)
19271
return source->base_addr;
19273
/* Allocate storage for the destination. */
19274
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
19275
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
19277
src = source->base_addr;
19278
stride0 = stride[0];
19279
Index: libgfortran/generated/transpose_r16.c
19280
===================================================================
19281
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
19282
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
19284
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19285
GFC_DESCRIPTOR_EXTENT(source, 1));
19287
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
19288
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19289
+ sizeof (GFC_REAL_16));
19291
} else if (unlikely (compile_options.bounds_check))
19293
Index: libgfortran/generated/minloc1_4_i4.c
19294
===================================================================
19295
--- a/src/libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release)
19296
+++ b/src/libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch)
19298
retarray->offset = 0;
19299
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19301
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19302
- * extent[rank-1];
19303
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19305
- retarray->base_addr = xmalloc (alloc_size);
19306
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19307
if (alloc_size == 0)
19309
/* Make sure we have a zero-sized array. */
19310
@@ -294,8 +293,7 @@
19314
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19315
- * extent[rank-1];
19316
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19318
retarray->offset = 0;
19319
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19320
@@ -307,7 +305,7 @@
19324
- retarray->base_addr = xmalloc (alloc_size);
19325
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19329
@@ -485,8 +483,7 @@
19330
retarray->offset = 0;
19331
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19333
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19334
- * extent[rank-1];
19335
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19337
if (alloc_size == 0)
19339
@@ -495,7 +492,7 @@
19343
- retarray->base_addr = xmalloc (alloc_size);
19344
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19348
Index: libgfortran/generated/maxval_i1.c
19349
===================================================================
19350
--- a/src/libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release)
19351
+++ b/src/libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch)
19353
retarray->offset = 0;
19354
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19356
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19357
- * extent[rank-1];
19358
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19360
- retarray->base_addr = xmalloc (alloc_size);
19361
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19362
if (alloc_size == 0)
19364
/* Make sure we have a zero-sized array. */
19365
@@ -286,8 +285,7 @@
19369
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19370
- * extent[rank-1];
19371
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19373
retarray->offset = 0;
19374
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19375
@@ -299,7 +297,7 @@
19379
- retarray->base_addr = xmalloc (alloc_size);
19380
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19384
@@ -472,8 +470,7 @@
19385
retarray->offset = 0;
19386
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19388
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19389
- * extent[rank-1];
19390
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19392
if (alloc_size == 0)
19394
@@ -482,7 +479,7 @@
19398
- retarray->base_addr = xmalloc (alloc_size);
19399
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19403
Index: libgfortran/generated/product_c16.c
19404
===================================================================
19405
--- a/src/libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release)
19406
+++ b/src/libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch)
19408
retarray->offset = 0;
19409
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19411
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19412
- * extent[rank-1];
19413
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19415
- retarray->base_addr = xmalloc (alloc_size);
19416
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19417
if (alloc_size == 0)
19419
/* Make sure we have a zero-sized array. */
19420
@@ -272,8 +271,7 @@
19424
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19425
- * extent[rank-1];
19426
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19428
retarray->offset = 0;
19429
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19430
@@ -285,7 +283,7 @@
19434
- retarray->base_addr = xmalloc (alloc_size);
19435
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19439
@@ -430,8 +428,7 @@
19440
retarray->offset = 0;
19441
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19443
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19444
- * extent[rank-1];
19445
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19447
if (alloc_size == 0)
19449
@@ -440,7 +437,7 @@
19453
- retarray->base_addr = xmalloc (alloc_size);
19454
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19458
Index: libgfortran/generated/reshape_r4.c
19459
===================================================================
19460
--- a/src/libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release)
19461
+++ b/src/libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch)
19462
@@ -111,11 +111,11 @@
19465
if (unlikely (rs < 1))
19469
- alloc_size = rs * sizeof (GFC_REAL_4);
19472
- ret->base_addr = xmalloc (alloc_size);
19473
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19474
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
19477
Index: libgfortran/generated/iany_i8.c
19478
===================================================================
19479
--- a/src/libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release)
19480
+++ b/src/libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch)
19482
retarray->offset = 0;
19483
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19485
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19486
- * extent[rank-1];
19487
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19489
- retarray->base_addr = xmalloc (alloc_size);
19490
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19491
if (alloc_size == 0)
19493
/* Make sure we have a zero-sized array. */
19494
@@ -272,8 +271,7 @@
19498
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19499
- * extent[rank-1];
19500
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19502
retarray->offset = 0;
19503
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19504
@@ -285,7 +283,7 @@
19508
- retarray->base_addr = xmalloc (alloc_size);
19509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19513
@@ -430,8 +428,7 @@
19514
retarray->offset = 0;
19515
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19517
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19518
- * extent[rank-1];
19519
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19521
if (alloc_size == 0)
19523
@@ -440,7 +437,7 @@
19527
- retarray->base_addr = xmalloc (alloc_size);
19528
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19532
Index: libgfortran/generated/cshift1_16.c
19533
===================================================================
19534
--- a/src/libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release)
19535
+++ b/src/libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch)
19540
- ret->base_addr = xmalloc (size * arraysize);
19541
+ ret->base_addr = xmallocarray (arraysize, size);
19543
ret->dtype = array->dtype;
19544
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
19545
Index: libgfortran/generated/maxloc0_4_i1.c
19546
===================================================================
19547
--- a/src/libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release)
19548
+++ b/src/libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch)
19550
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19551
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19552
retarray->offset = 0;
19553
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19554
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19558
@@ -199,7 +199,7 @@
19559
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19560
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19561
retarray->offset = 0;
19562
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19563
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19567
@@ -367,7 +367,7 @@
19568
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19569
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19570
retarray->offset = 0;
19571
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19572
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19574
else if (unlikely (compile_options.bounds_check))
19576
Index: libgfortran/generated/minloc0_4_i8.c
19577
===================================================================
19578
--- a/src/libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release)
19579
+++ b/src/libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch)
19581
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19582
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19583
retarray->offset = 0;
19584
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19585
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19589
@@ -199,7 +199,7 @@
19590
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19591
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19592
retarray->offset = 0;
19593
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19594
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19598
@@ -367,7 +367,7 @@
19599
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19600
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19601
retarray->offset = 0;
19602
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19603
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19605
else if (unlikely (compile_options.bounds_check))
19607
Index: libgfortran/generated/spread_c16.c
19608
===================================================================
19609
--- a/src/libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release)
19610
+++ b/src/libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch)
19611
@@ -101,8 +101,8 @@
19615
- /* xmalloc allocates a single byte for zero size. */
19616
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
19617
+ /* xmallocarray allocates a single byte for zero size. */
19618
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
19622
@@ -244,7 +244,7 @@
19624
if (ret->base_addr == NULL)
19626
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
19627
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
19629
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19631
Index: libgfortran/generated/maxval_r4.c
19632
===================================================================
19633
--- a/src/libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release)
19634
+++ b/src/libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch)
19636
retarray->offset = 0;
19637
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19639
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19640
- * extent[rank-1];
19641
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19643
- retarray->base_addr = xmalloc (alloc_size);
19644
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19645
if (alloc_size == 0)
19647
/* Make sure we have a zero-sized array. */
19648
@@ -286,8 +285,7 @@
19652
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19653
- * extent[rank-1];
19654
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19656
retarray->offset = 0;
19657
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19658
@@ -299,7 +297,7 @@
19662
- retarray->base_addr = xmalloc (alloc_size);
19663
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19667
@@ -472,8 +470,7 @@
19668
retarray->offset = 0;
19669
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19671
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19672
- * extent[rank-1];
19673
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19675
if (alloc_size == 0)
19677
@@ -482,7 +479,7 @@
19681
- retarray->base_addr = xmalloc (alloc_size);
19682
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19686
Index: libgfortran/generated/minval_r8.c
19687
===================================================================
19688
--- a/src/libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release)
19689
+++ b/src/libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch)
19691
retarray->offset = 0;
19692
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19694
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19695
- * extent[rank-1];
19696
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19698
- retarray->base_addr = xmalloc (alloc_size);
19699
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19700
if (alloc_size == 0)
19702
/* Make sure we have a zero-sized array. */
19703
@@ -286,8 +285,7 @@
19707
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19708
- * extent[rank-1];
19709
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19711
retarray->offset = 0;
19712
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19713
@@ -299,7 +297,7 @@
19717
- retarray->base_addr = xmalloc (alloc_size);
19718
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19722
@@ -472,8 +470,7 @@
19723
retarray->offset = 0;
19724
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19726
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19727
- * extent[rank-1];
19728
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19730
if (alloc_size == 0)
19732
@@ -482,7 +479,7 @@
19736
- retarray->base_addr = xmalloc (alloc_size);
19737
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19741
Index: libgfortran/generated/minloc1_16_r16.c
19742
===================================================================
19743
--- a/src/libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release)
19744
+++ b/src/libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch)
19746
retarray->offset = 0;
19747
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19749
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19750
- * extent[rank-1];
19751
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19753
- retarray->base_addr = xmalloc (alloc_size);
19754
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19755
if (alloc_size == 0)
19757
/* Make sure we have a zero-sized array. */
19758
@@ -294,8 +293,7 @@
19762
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19763
- * extent[rank-1];
19764
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19766
retarray->offset = 0;
19767
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19768
@@ -307,7 +305,7 @@
19772
- retarray->base_addr = xmalloc (alloc_size);
19773
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19777
@@ -485,8 +483,7 @@
19778
retarray->offset = 0;
19779
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19781
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19782
- * extent[rank-1];
19783
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19785
if (alloc_size == 0)
19787
@@ -495,7 +492,7 @@
19791
- retarray->base_addr = xmalloc (alloc_size);
19792
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19796
Index: libgfortran/generated/unpack_i16.c
19797
===================================================================
19798
--- a/src/libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release)
19799
+++ b/src/libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch)
19804
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
19805
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
19809
@@ -244,7 +244,7 @@
19813
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
19814
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
19818
Index: libgfortran/generated/sum_i8.c
19819
===================================================================
19820
--- a/src/libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release)
19821
+++ b/src/libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch)
19823
retarray->offset = 0;
19824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19826
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19827
- * extent[rank-1];
19828
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19830
- retarray->base_addr = xmalloc (alloc_size);
19831
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19832
if (alloc_size == 0)
19834
/* Make sure we have a zero-sized array. */
19835
@@ -272,8 +271,7 @@
19839
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19840
- * extent[rank-1];
19841
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19843
retarray->offset = 0;
19844
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19845
@@ -285,7 +283,7 @@
19849
- retarray->base_addr = xmalloc (alloc_size);
19850
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19854
@@ -430,8 +428,7 @@
19855
retarray->offset = 0;
19856
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19858
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19859
- * extent[rank-1];
19860
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19862
if (alloc_size == 0)
19864
@@ -440,7 +437,7 @@
19868
- retarray->base_addr = xmalloc (alloc_size);
19869
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19873
Index: libgfortran/generated/pack_i1.c
19874
===================================================================
19875
--- a/src/libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release)
19876
+++ b/src/libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch)
19877
@@ -167,8 +167,8 @@
19881
- /* xmalloc allocates a single byte for zero size. */
19882
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
19883
+ /* xmallocarray allocates a single byte for zero size. */
19884
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
19888
Index: libgfortran/generated/any_l16.c
19889
===================================================================
19890
--- a/src/libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release)
19891
+++ b/src/libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch)
19892
@@ -101,8 +101,7 @@
19893
retarray->offset = 0;
19894
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19896
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19897
- * extent[rank-1];
19898
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19900
if (alloc_size == 0)
19902
@@ -111,7 +110,7 @@
19906
- retarray->base_addr = xmalloc (alloc_size);
19907
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
19911
Index: libgfortran/generated/spread_i8.c
19912
===================================================================
19913
--- a/src/libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release)
19914
+++ b/src/libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch)
19915
@@ -101,8 +101,8 @@
19919
- /* xmalloc allocates a single byte for zero size. */
19920
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
19921
+ /* xmallocarray allocates a single byte for zero size. */
19922
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
19926
@@ -244,7 +244,7 @@
19928
if (ret->base_addr == NULL)
19930
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
19931
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
19933
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19935
Index: libgfortran/generated/maxval_i2.c
19936
===================================================================
19937
--- a/src/libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release)
19938
+++ b/src/libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch)
19940
retarray->offset = 0;
19941
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19943
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19944
- * extent[rank-1];
19945
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19947
- retarray->base_addr = xmalloc (alloc_size);
19948
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19949
if (alloc_size == 0)
19951
/* Make sure we have a zero-sized array. */
19952
@@ -286,8 +285,7 @@
19956
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19957
- * extent[rank-1];
19958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19960
retarray->offset = 0;
19961
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19962
@@ -299,7 +297,7 @@
19966
- retarray->base_addr = xmalloc (alloc_size);
19967
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19971
@@ -472,8 +470,7 @@
19972
retarray->offset = 0;
19973
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19975
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19976
- * extent[rank-1];
19977
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19979
if (alloc_size == 0)
19981
@@ -482,7 +479,7 @@
19985
- retarray->base_addr = xmalloc (alloc_size);
19986
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19990
Index: libgfortran/generated/maxloc1_8_i4.c
19991
===================================================================
19992
--- a/src/libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release)
19993
+++ b/src/libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch)
19995
retarray->offset = 0;
19996
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19998
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19999
- * extent[rank-1];
20000
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20002
- retarray->base_addr = xmalloc (alloc_size);
20003
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20004
if (alloc_size == 0)
20006
/* Make sure we have a zero-sized array. */
20007
@@ -294,8 +293,7 @@
20011
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20012
- * extent[rank-1];
20013
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20015
retarray->offset = 0;
20016
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20017
@@ -307,7 +305,7 @@
20021
- retarray->base_addr = xmalloc (alloc_size);
20022
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20026
@@ -485,8 +483,7 @@
20027
retarray->offset = 0;
20028
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20030
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20031
- * extent[rank-1];
20032
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20034
if (alloc_size == 0)
20036
@@ -495,7 +492,7 @@
20040
- retarray->base_addr = xmalloc (alloc_size);
20041
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20045
Index: libgfortran/generated/unpack_r8.c
20046
===================================================================
20047
--- a/src/libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release)
20048
+++ b/src/libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch)
20053
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
20054
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
20058
@@ -244,7 +244,7 @@
20062
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
20063
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
20067
Index: libgfortran/generated/maxloc0_4_r4.c
20068
===================================================================
20069
--- a/src/libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release)
20070
+++ b/src/libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch)
20072
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20073
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20074
retarray->offset = 0;
20075
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20076
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20080
@@ -199,7 +199,7 @@
20081
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20082
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20083
retarray->offset = 0;
20084
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20085
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20089
@@ -367,7 +367,7 @@
20090
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20091
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20092
retarray->offset = 0;
20093
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20094
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20096
else if (unlikely (compile_options.bounds_check))
20098
Index: libgfortran/generated/all_l1.c
20099
===================================================================
20100
--- a/src/libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release)
20101
+++ b/src/libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch)
20102
@@ -101,8 +101,7 @@
20103
retarray->offset = 0;
20104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20106
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20107
- * extent[rank-1];
20108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20110
if (alloc_size == 0)
20112
@@ -111,7 +110,7 @@
20116
- retarray->base_addr = xmalloc (alloc_size);
20117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
20121
Index: libgfortran/generated/matmul_r8.c
20122
===================================================================
20123
--- a/src/libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release)
20124
+++ b/src/libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch)
20125
@@ -124,7 +124,7 @@
20128
retarray->base_addr
20129
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
20130
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
20131
retarray->offset = 0;
20133
else if (unlikely (compile_options.bounds_check))
20134
Index: libgfortran/generated/minloc0_4_r16.c
20135
===================================================================
20136
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
20137
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
20139
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20140
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20141
retarray->offset = 0;
20142
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20143
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20147
@@ -199,7 +199,7 @@
20148
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20149
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20150
retarray->offset = 0;
20151
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20152
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20156
@@ -367,7 +367,7 @@
20157
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20158
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20159
retarray->offset = 0;
20160
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20161
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20163
else if (unlikely (compile_options.bounds_check))
20165
Index: libgfortran/generated/maxloc0_4_i2.c
20166
===================================================================
20167
--- a/src/libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release)
20168
+++ b/src/libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch)
20170
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20171
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20172
retarray->offset = 0;
20173
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20174
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20178
@@ -199,7 +199,7 @@
20179
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20180
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20181
retarray->offset = 0;
20182
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20183
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20187
@@ -367,7 +367,7 @@
20188
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20189
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20190
retarray->offset = 0;
20191
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20192
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20194
else if (unlikely (compile_options.bounds_check))
20196
Index: libgfortran/generated/minloc1_8_r16.c
20197
===================================================================
20198
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
20199
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
20201
retarray->offset = 0;
20202
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20204
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20205
- * extent[rank-1];
20206
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20208
- retarray->base_addr = xmalloc (alloc_size);
20209
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20210
if (alloc_size == 0)
20212
/* Make sure we have a zero-sized array. */
20213
@@ -294,8 +293,7 @@
20217
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20218
- * extent[rank-1];
20219
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20221
retarray->offset = 0;
20222
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20223
@@ -307,7 +305,7 @@
20227
- retarray->base_addr = xmalloc (alloc_size);
20228
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20232
@@ -485,8 +483,7 @@
20233
retarray->offset = 0;
20234
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20236
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20237
- * extent[rank-1];
20238
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20240
if (alloc_size == 0)
20242
@@ -495,7 +492,7 @@
20246
- retarray->base_addr = xmalloc (alloc_size);
20247
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20251
Index: libgfortran/generated/pack_c10.c
20252
===================================================================
20253
--- a/src/libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release)
20254
+++ b/src/libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch)
20255
@@ -167,8 +167,8 @@
20259
- /* xmalloc allocates a single byte for zero size. */
20260
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
20261
+ /* xmallocarray allocates a single byte for zero size. */
20262
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
20266
Index: libgfortran/generated/pack_r4.c
20267
===================================================================
20268
--- a/src/libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release)
20269
+++ b/src/libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch)
20270
@@ -167,8 +167,8 @@
20274
- /* xmalloc allocates a single byte for zero size. */
20275
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
20276
+ /* xmallocarray allocates a single byte for zero size. */
20277
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
20281
Index: libgfortran/generated/transpose_c16.c
20282
===================================================================
20283
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
20284
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
20286
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20287
GFC_DESCRIPTOR_EXTENT(source, 1));
20289
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
20290
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20291
+ sizeof (GFC_COMPLEX_16));
20293
} else if (unlikely (compile_options.bounds_check))
20295
Index: libgfortran/generated/maxloc0_8_i8.c
20296
===================================================================
20297
--- a/src/libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release)
20298
+++ b/src/libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch)
20300
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20301
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20302
retarray->offset = 0;
20303
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20304
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20308
@@ -199,7 +199,7 @@
20309
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20310
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20311
retarray->offset = 0;
20312
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20313
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20317
@@ -367,7 +367,7 @@
20318
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20319
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20320
retarray->offset = 0;
20321
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20322
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20324
else if (unlikely (compile_options.bounds_check))
20326
Index: libgfortran/generated/minloc1_4_r8.c
20327
===================================================================
20328
--- a/src/libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release)
20329
+++ b/src/libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch)
20331
retarray->offset = 0;
20332
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20334
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20335
- * extent[rank-1];
20336
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20338
- retarray->base_addr = xmalloc (alloc_size);
20339
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20340
if (alloc_size == 0)
20342
/* Make sure we have a zero-sized array. */
20343
@@ -294,8 +293,7 @@
20347
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20348
- * extent[rank-1];
20349
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20351
retarray->offset = 0;
20352
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20353
@@ -307,7 +305,7 @@
20357
- retarray->base_addr = xmalloc (alloc_size);
20358
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20362
@@ -485,8 +483,7 @@
20363
retarray->offset = 0;
20364
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20366
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20367
- * extent[rank-1];
20368
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20370
if (alloc_size == 0)
20372
@@ -495,7 +492,7 @@
20376
- retarray->base_addr = xmalloc (alloc_size);
20377
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20381
Index: libgfortran/generated/minloc1_16_i4.c
20382
===================================================================
20383
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
20384
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
20386
retarray->offset = 0;
20387
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20389
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20390
- * extent[rank-1];
20391
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20393
- retarray->base_addr = xmalloc (alloc_size);
20394
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20395
if (alloc_size == 0)
20397
/* Make sure we have a zero-sized array. */
20398
@@ -294,8 +293,7 @@
20402
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20403
- * extent[rank-1];
20404
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20406
retarray->offset = 0;
20407
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20408
@@ -307,7 +305,7 @@
20412
- retarray->base_addr = xmalloc (alloc_size);
20413
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20417
@@ -485,8 +483,7 @@
20418
retarray->offset = 0;
20419
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20421
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20422
- * extent[rank-1];
20423
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20425
if (alloc_size == 0)
20427
@@ -495,7 +492,7 @@
20431
- retarray->base_addr = xmalloc (alloc_size);
20432
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20436
Index: libgfortran/generated/minloc0_16_i8.c
20437
===================================================================
20438
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
20439
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
20441
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20442
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20443
retarray->offset = 0;
20444
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20445
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20449
@@ -199,7 +199,7 @@
20450
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20451
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20452
retarray->offset = 0;
20453
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20454
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20458
@@ -367,7 +367,7 @@
20459
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20460
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20461
retarray->offset = 0;
20462
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20463
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20465
else if (unlikely (compile_options.bounds_check))
20467
Index: libgfortran/generated/pack_i2.c
20468
===================================================================
20469
--- a/src/libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release)
20470
+++ b/src/libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch)
20471
@@ -167,8 +167,8 @@
20475
- /* xmalloc allocates a single byte for zero size. */
20476
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
20477
+ /* xmallocarray allocates a single byte for zero size. */
20478
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
20482
Index: libgfortran/generated/transpose_i8.c
20483
===================================================================
20484
--- a/src/libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release)
20485
+++ b/src/libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch)
20487
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20488
GFC_DESCRIPTOR_EXTENT(source, 1));
20490
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
20491
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20492
+ sizeof (GFC_INTEGER_8));
20494
} else if (unlikely (compile_options.bounds_check))
20496
Index: libgfortran/generated/eoshift1_16.c
20497
===================================================================
20498
--- a/src/libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release)
20499
+++ b/src/libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch)
20500
@@ -105,8 +105,8 @@
20501
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
20504
- /* xmalloc allocates a single byte for zero size. */
20505
- ret->base_addr = xmalloc (size * arraysize);
20506
+ /* xmallocarray allocates a single byte for zero size. */
20507
+ ret->base_addr = xmallocarray (arraysize, size);
20510
else if (unlikely (compile_options.bounds_check))
20511
Index: libgfortran/generated/all_l2.c
20512
===================================================================
20513
--- a/src/libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release)
20514
+++ b/src/libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch)
20515
@@ -101,8 +101,7 @@
20516
retarray->offset = 0;
20517
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20519
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20520
- * extent[rank-1];
20521
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20523
if (alloc_size == 0)
20525
@@ -111,7 +110,7 @@
20529
- retarray->base_addr = xmalloc (alloc_size);
20530
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
20534
Index: libgfortran/generated/product_c4.c
20535
===================================================================
20536
--- a/src/libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release)
20537
+++ b/src/libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch)
20539
retarray->offset = 0;
20540
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20542
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20543
- * extent[rank-1];
20544
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20546
- retarray->base_addr = xmalloc (alloc_size);
20547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20548
if (alloc_size == 0)
20550
/* Make sure we have a zero-sized array. */
20551
@@ -272,8 +271,7 @@
20555
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20556
- * extent[rank-1];
20557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20559
retarray->offset = 0;
20560
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20561
@@ -285,7 +283,7 @@
20565
- retarray->base_addr = xmalloc (alloc_size);
20566
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20570
@@ -430,8 +428,7 @@
20571
retarray->offset = 0;
20572
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20574
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20575
- * extent[rank-1];
20576
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20578
if (alloc_size == 0)
20580
@@ -440,7 +437,7 @@
20584
- retarray->base_addr = xmalloc (alloc_size);
20585
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
20589
Index: libgfortran/generated/iall_i1.c
20590
===================================================================
20591
--- a/src/libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release)
20592
+++ b/src/libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch)
20594
retarray->offset = 0;
20595
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20597
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20598
- * extent[rank-1];
20599
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20601
- retarray->base_addr = xmalloc (alloc_size);
20602
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20603
if (alloc_size == 0)
20605
/* Make sure we have a zero-sized array. */
20606
@@ -272,8 +271,7 @@
20610
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20611
- * extent[rank-1];
20612
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20614
retarray->offset = 0;
20615
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20616
@@ -285,7 +283,7 @@
20620
- retarray->base_addr = xmalloc (alloc_size);
20621
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20625
@@ -430,8 +428,7 @@
20626
retarray->offset = 0;
20627
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20629
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20630
- * extent[rank-1];
20631
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20633
if (alloc_size == 0)
20635
@@ -440,7 +437,7 @@
20639
- retarray->base_addr = xmalloc (alloc_size);
20640
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20644
Index: libgfortran/generated/reshape_i4.c
20645
===================================================================
20646
--- a/src/libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release)
20647
+++ b/src/libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch)
20648
@@ -111,11 +111,11 @@
20651
if (unlikely (rs < 1))
20655
- alloc_size = rs * sizeof (GFC_INTEGER_4);
20658
- ret->base_addr = xmalloc (alloc_size);
20659
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20660
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20663
Index: libgfortran/generated/in_pack_r10.c
20664
===================================================================
20665
--- a/src/libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release)
20666
+++ b/src/libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch)
20668
return source->base_addr;
20670
/* Allocate storage for the destination. */
20671
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
20672
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
20674
src = source->base_addr;
20675
stride0 = stride[0];
20676
Index: libgfortran/generated/in_pack_c4.c
20677
===================================================================
20678
--- a/src/libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release)
20679
+++ b/src/libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch)
20681
return source->base_addr;
20683
/* Allocate storage for the destination. */
20684
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
20685
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
20687
src = source->base_addr;
20688
stride0 = stride[0];
20689
Index: libgfortran/generated/all_l16.c
20690
===================================================================
20691
--- a/src/libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release)
20692
+++ b/src/libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch)
20693
@@ -101,8 +101,7 @@
20694
retarray->offset = 0;
20695
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20697
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20698
- * extent[rank-1];
20699
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20701
if (alloc_size == 0)
20703
@@ -111,7 +110,7 @@
20707
- retarray->base_addr = xmalloc (alloc_size);
20708
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
20712
Index: libgfortran/generated/maxloc0_16_i1.c
20713
===================================================================
20714
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
20715
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
20717
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20718
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20719
retarray->offset = 0;
20720
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20721
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20725
@@ -199,7 +199,7 @@
20726
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20727
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20728
retarray->offset = 0;
20729
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20730
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20734
@@ -367,7 +367,7 @@
20735
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20736
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20737
retarray->offset = 0;
20738
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20739
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20741
else if (unlikely (compile_options.bounds_check))
20743
Index: libgfortran/generated/maxloc1_8_r8.c
20744
===================================================================
20745
--- a/src/libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release)
20746
+++ b/src/libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch)
20748
retarray->offset = 0;
20749
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20751
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20752
- * extent[rank-1];
20753
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20755
- retarray->base_addr = xmalloc (alloc_size);
20756
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20757
if (alloc_size == 0)
20759
/* Make sure we have a zero-sized array. */
20760
@@ -294,8 +293,7 @@
20764
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20765
- * extent[rank-1];
20766
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20768
retarray->offset = 0;
20769
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20770
@@ -307,7 +305,7 @@
20774
- retarray->base_addr = xmalloc (alloc_size);
20775
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20779
@@ -485,8 +483,7 @@
20780
retarray->offset = 0;
20781
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20783
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20784
- * extent[rank-1];
20785
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20787
if (alloc_size == 0)
20789
@@ -495,7 +492,7 @@
20793
- retarray->base_addr = xmalloc (alloc_size);
20794
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20798
Index: libgfortran/generated/minval_i16.c
20799
===================================================================
20800
--- a/src/libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release)
20801
+++ b/src/libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch)
20803
retarray->offset = 0;
20804
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20806
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20807
- * extent[rank-1];
20808
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20810
- retarray->base_addr = xmalloc (alloc_size);
20811
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20812
if (alloc_size == 0)
20814
/* Make sure we have a zero-sized array. */
20815
@@ -286,8 +285,7 @@
20819
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20820
- * extent[rank-1];
20821
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20823
retarray->offset = 0;
20824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20825
@@ -299,7 +297,7 @@
20829
- retarray->base_addr = xmalloc (alloc_size);
20830
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20834
@@ -472,8 +470,7 @@
20835
retarray->offset = 0;
20836
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20838
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20839
- * extent[rank-1];
20840
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20842
if (alloc_size == 0)
20844
@@ -482,7 +479,7 @@
20848
- retarray->base_addr = xmalloc (alloc_size);
20849
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20853
Index: libgfortran/generated/reshape_r10.c
20854
===================================================================
20855
--- a/src/libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release)
20856
+++ b/src/libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch)
20857
@@ -111,11 +111,11 @@
20860
if (unlikely (rs < 1))
20864
- alloc_size = rs * sizeof (GFC_REAL_10);
20867
- ret->base_addr = xmalloc (alloc_size);
20868
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20869
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20872
Index: libgfortran/generated/unpack_r16.c
20873
===================================================================
20874
--- a/src/libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release)
20875
+++ b/src/libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch)
20880
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
20881
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
20885
@@ -244,7 +244,7 @@
20889
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
20890
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
20894
Index: libgfortran/generated/maxval_i4.c
20895
===================================================================
20896
--- a/src/libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release)
20897
+++ b/src/libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch)
20899
retarray->offset = 0;
20900
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20902
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20903
- * extent[rank-1];
20904
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20906
- retarray->base_addr = xmalloc (alloc_size);
20907
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20908
if (alloc_size == 0)
20910
/* Make sure we have a zero-sized array. */
20911
@@ -286,8 +285,7 @@
20915
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20916
- * extent[rank-1];
20917
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20919
retarray->offset = 0;
20920
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20921
@@ -299,7 +297,7 @@
20925
- retarray->base_addr = xmalloc (alloc_size);
20926
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20930
@@ -472,8 +470,7 @@
20931
retarray->offset = 0;
20932
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20934
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20935
- * extent[rank-1];
20936
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20938
if (alloc_size == 0)
20940
@@ -482,7 +479,7 @@
20944
- retarray->base_addr = xmalloc (alloc_size);
20945
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20949
Index: libgfortran/generated/minval_i8.c
20950
===================================================================
20951
--- a/src/libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release)
20952
+++ b/src/libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch)
20954
retarray->offset = 0;
20955
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20957
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20958
- * extent[rank-1];
20959
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20961
- retarray->base_addr = xmalloc (alloc_size);
20962
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20963
if (alloc_size == 0)
20965
/* Make sure we have a zero-sized array. */
20966
@@ -286,8 +285,7 @@
20970
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20971
- * extent[rank-1];
20972
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20974
retarray->offset = 0;
20975
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20976
@@ -299,7 +297,7 @@
20980
- retarray->base_addr = xmalloc (alloc_size);
20981
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20985
@@ -472,8 +470,7 @@
20986
retarray->offset = 0;
20987
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20989
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20990
- * extent[rank-1];
20991
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20993
if (alloc_size == 0)
20995
@@ -482,7 +479,7 @@
20999
- retarray->base_addr = xmalloc (alloc_size);
21000
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21004
Index: libgfortran/generated/maxloc0_16_i16.c
21005
===================================================================
21006
--- a/src/libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release)
21007
+++ b/src/libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch)
21009
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21010
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21011
retarray->offset = 0;
21012
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21013
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21017
@@ -199,7 +199,7 @@
21018
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21019
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21020
retarray->offset = 0;
21021
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21022
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21026
@@ -367,7 +367,7 @@
21027
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21028
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21029
retarray->offset = 0;
21030
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21031
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21033
else if (unlikely (compile_options.bounds_check))
21035
Index: libgfortran/generated/shape_i4.c
21036
===================================================================
21037
--- a/src/libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release)
21038
+++ b/src/libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch)
21041
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
21043
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21044
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21047
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
21048
Index: libgfortran/generated/minloc1_4_i16.c
21049
===================================================================
21050
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
21051
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
21053
retarray->offset = 0;
21054
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21056
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21057
- * extent[rank-1];
21058
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21060
- retarray->base_addr = xmalloc (alloc_size);
21061
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21062
if (alloc_size == 0)
21064
/* Make sure we have a zero-sized array. */
21065
@@ -294,8 +293,7 @@
21069
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21070
- * extent[rank-1];
21071
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21073
retarray->offset = 0;
21074
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21075
@@ -307,7 +305,7 @@
21079
- retarray->base_addr = xmalloc (alloc_size);
21080
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21084
@@ -485,8 +483,7 @@
21085
retarray->offset = 0;
21086
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21088
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21089
- * extent[rank-1];
21090
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21092
if (alloc_size == 0)
21094
@@ -495,7 +492,7 @@
21098
- retarray->base_addr = xmalloc (alloc_size);
21099
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21103
Index: libgfortran/generated/maxloc0_4_r10.c
21104
===================================================================
21105
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
21106
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
21108
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21109
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21110
retarray->offset = 0;
21111
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21112
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21116
@@ -199,7 +199,7 @@
21117
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21118
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21119
retarray->offset = 0;
21120
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21121
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21125
@@ -367,7 +367,7 @@
21126
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21127
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21128
retarray->offset = 0;
21129
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21130
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21132
else if (unlikely (compile_options.bounds_check))
21134
Index: libgfortran/generated/maxloc0_8_i16.c
21135
===================================================================
21136
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
21137
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
21139
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21140
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21141
retarray->offset = 0;
21142
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21143
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21147
@@ -199,7 +199,7 @@
21148
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21149
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21150
retarray->offset = 0;
21151
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21152
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21156
@@ -367,7 +367,7 @@
21157
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21158
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21159
retarray->offset = 0;
21160
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21161
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21163
else if (unlikely (compile_options.bounds_check))
21165
Index: libgfortran/generated/iall_i2.c
21166
===================================================================
21167
--- a/src/libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release)
21168
+++ b/src/libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch)
21170
retarray->offset = 0;
21171
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21173
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21174
- * extent[rank-1];
21175
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21177
- retarray->base_addr = xmalloc (alloc_size);
21178
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21179
if (alloc_size == 0)
21181
/* Make sure we have a zero-sized array. */
21182
@@ -272,8 +271,7 @@
21186
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21187
- * extent[rank-1];
21188
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21190
retarray->offset = 0;
21191
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21192
@@ -285,7 +283,7 @@
21196
- retarray->base_addr = xmalloc (alloc_size);
21197
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21201
@@ -430,8 +428,7 @@
21202
retarray->offset = 0;
21203
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21205
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21206
- * extent[rank-1];
21207
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21209
if (alloc_size == 0)
21211
@@ -440,7 +437,7 @@
21215
- retarray->base_addr = xmalloc (alloc_size);
21216
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21220
Index: libgfortran/generated/maxloc1_8_r10.c
21221
===================================================================
21222
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
21223
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
21225
retarray->offset = 0;
21226
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21228
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21229
- * extent[rank-1];
21230
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21232
- retarray->base_addr = xmalloc (alloc_size);
21233
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21234
if (alloc_size == 0)
21236
/* Make sure we have a zero-sized array. */
21237
@@ -294,8 +293,7 @@
21241
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21242
- * extent[rank-1];
21243
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21245
retarray->offset = 0;
21246
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21247
@@ -307,7 +305,7 @@
21251
- retarray->base_addr = xmalloc (alloc_size);
21252
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21256
@@ -485,8 +483,7 @@
21257
retarray->offset = 0;
21258
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21260
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21261
- * extent[rank-1];
21262
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21264
if (alloc_size == 0)
21266
@@ -495,7 +492,7 @@
21270
- retarray->base_addr = xmalloc (alloc_size);
21271
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21275
Index: libgfortran/generated/maxloc0_16_r4.c
21276
===================================================================
21277
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
21278
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
21280
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21281
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21282
retarray->offset = 0;
21283
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21284
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21288
@@ -199,7 +199,7 @@
21289
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21290
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21291
retarray->offset = 0;
21292
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21293
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21297
@@ -367,7 +367,7 @@
21298
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21299
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21300
retarray->offset = 0;
21301
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21302
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21304
else if (unlikely (compile_options.bounds_check))
21306
Index: libgfortran/generated/minloc0_8_i1.c
21307
===================================================================
21308
--- a/src/libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release)
21309
+++ b/src/libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch)
21311
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21312
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21313
retarray->offset = 0;
21314
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21315
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21319
@@ -199,7 +199,7 @@
21320
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21321
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21322
retarray->offset = 0;
21323
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21324
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21328
@@ -367,7 +367,7 @@
21329
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21330
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21331
retarray->offset = 0;
21332
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21333
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21335
else if (unlikely (compile_options.bounds_check))
21337
Index: libgfortran/generated/minloc1_16_r8.c
21338
===================================================================
21339
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
21340
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
21342
retarray->offset = 0;
21343
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21345
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21346
- * extent[rank-1];
21347
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21349
- retarray->base_addr = xmalloc (alloc_size);
21350
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21351
if (alloc_size == 0)
21353
/* Make sure we have a zero-sized array. */
21354
@@ -294,8 +293,7 @@
21358
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21359
- * extent[rank-1];
21360
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21362
retarray->offset = 0;
21363
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21364
@@ -307,7 +305,7 @@
21368
- retarray->base_addr = xmalloc (alloc_size);
21369
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21373
@@ -485,8 +483,7 @@
21374
retarray->offset = 0;
21375
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21377
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21378
- * extent[rank-1];
21379
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21381
if (alloc_size == 0)
21383
@@ -495,7 +492,7 @@
21387
- retarray->base_addr = xmalloc (alloc_size);
21388
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21392
Index: libgfortran/generated/unpack_i8.c
21393
===================================================================
21394
--- a/src/libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release)
21395
+++ b/src/libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch)
21400
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
21401
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
21405
@@ -244,7 +244,7 @@
21409
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
21410
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
21414
Index: libgfortran/generated/maxloc0_4_i4.c
21415
===================================================================
21416
--- a/src/libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release)
21417
+++ b/src/libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch)
21419
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21420
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21421
retarray->offset = 0;
21422
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21423
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21427
@@ -199,7 +199,7 @@
21428
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21429
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21430
retarray->offset = 0;
21431
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21432
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21436
@@ -367,7 +367,7 @@
21437
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21438
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21439
retarray->offset = 0;
21440
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21441
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21443
else if (unlikely (compile_options.bounds_check))
21445
Index: libgfortran/generated/count_4_l.c
21446
===================================================================
21447
--- a/src/libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release)
21448
+++ b/src/libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch)
21449
@@ -101,8 +101,7 @@
21450
retarray->offset = 0;
21451
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21453
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21454
- * extent[rank-1];
21455
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21457
if (alloc_size == 0)
21459
@@ -111,7 +110,7 @@
21463
- retarray->base_addr = xmalloc (alloc_size);
21464
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21468
Index: libgfortran/generated/sum_r10.c
21469
===================================================================
21470
--- a/src/libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release)
21471
+++ b/src/libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch)
21473
retarray->offset = 0;
21474
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21476
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21477
- * extent[rank-1];
21478
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21480
- retarray->base_addr = xmalloc (alloc_size);
21481
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21482
if (alloc_size == 0)
21484
/* Make sure we have a zero-sized array. */
21485
@@ -272,8 +271,7 @@
21489
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21490
- * extent[rank-1];
21491
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21493
retarray->offset = 0;
21494
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21495
@@ -285,7 +283,7 @@
21499
- retarray->base_addr = xmalloc (alloc_size);
21500
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21504
@@ -430,8 +428,7 @@
21505
retarray->offset = 0;
21506
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21508
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21509
- * extent[rank-1];
21510
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21512
if (alloc_size == 0)
21514
@@ -440,7 +437,7 @@
21518
- retarray->base_addr = xmalloc (alloc_size);
21519
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21523
Index: libgfortran/generated/sum_c4.c
21524
===================================================================
21525
--- a/src/libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release)
21526
+++ b/src/libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch)
21528
retarray->offset = 0;
21529
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21531
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21532
- * extent[rank-1];
21533
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21535
- retarray->base_addr = xmalloc (alloc_size);
21536
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21537
if (alloc_size == 0)
21539
/* Make sure we have a zero-sized array. */
21540
@@ -272,8 +271,7 @@
21544
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21545
- * extent[rank-1];
21546
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21548
retarray->offset = 0;
21549
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21550
@@ -285,7 +283,7 @@
21554
- retarray->base_addr = xmalloc (alloc_size);
21555
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21559
@@ -430,8 +428,7 @@
21560
retarray->offset = 0;
21561
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21563
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21564
- * extent[rank-1];
21565
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21567
if (alloc_size == 0)
21569
@@ -440,7 +437,7 @@
21573
- retarray->base_addr = xmalloc (alloc_size);
21574
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21578
Index: libgfortran/generated/maxloc1_16_r10.c
21579
===================================================================
21580
--- a/src/libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release)
21581
+++ b/src/libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch)
21583
retarray->offset = 0;
21584
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21586
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21587
- * extent[rank-1];
21588
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21590
- retarray->base_addr = xmalloc (alloc_size);
21591
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21592
if (alloc_size == 0)
21594
/* Make sure we have a zero-sized array. */
21595
@@ -294,8 +293,7 @@
21599
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21600
- * extent[rank-1];
21601
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21603
retarray->offset = 0;
21604
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21605
@@ -307,7 +305,7 @@
21609
- retarray->base_addr = xmalloc (alloc_size);
21610
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21614
@@ -485,8 +483,7 @@
21615
retarray->offset = 0;
21616
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21618
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21619
- * extent[rank-1];
21620
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21622
if (alloc_size == 0)
21624
@@ -495,7 +492,7 @@
21628
- retarray->base_addr = xmalloc (alloc_size);
21629
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21633
Index: libgfortran/generated/pack_i16.c
21634
===================================================================
21635
--- a/src/libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release)
21636
+++ b/src/libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch)
21637
@@ -167,8 +167,8 @@
21641
- /* xmalloc allocates a single byte for zero size. */
21642
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
21643
+ /* xmallocarray allocates a single byte for zero size. */
21644
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
21648
Index: libgfortran/generated/matmul_i8.c
21649
===================================================================
21650
--- a/src/libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release)
21651
+++ b/src/libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch)
21652
@@ -124,7 +124,7 @@
21655
retarray->base_addr
21656
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
21657
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
21658
retarray->offset = 0;
21660
else if (unlikely (compile_options.bounds_check))
21661
Index: libgfortran/generated/maxloc0_16_i2.c
21662
===================================================================
21663
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
21664
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
21666
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21667
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21668
retarray->offset = 0;
21669
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21670
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21674
@@ -199,7 +199,7 @@
21675
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21676
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21677
retarray->offset = 0;
21678
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21679
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21683
@@ -367,7 +367,7 @@
21684
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21685
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21686
retarray->offset = 0;
21687
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21688
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21690
else if (unlikely (compile_options.bounds_check))
21692
Index: libgfortran/generated/spread_c4.c
21693
===================================================================
21694
--- a/src/libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release)
21695
+++ b/src/libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch)
21696
@@ -101,8 +101,8 @@
21700
- /* xmalloc allocates a single byte for zero size. */
21701
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
21702
+ /* xmallocarray allocates a single byte for zero size. */
21703
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
21707
@@ -244,7 +244,7 @@
21709
if (ret->base_addr == NULL)
21711
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
21712
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
21714
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21716
Index: libgfortran/generated/maxval_r10.c
21717
===================================================================
21718
--- a/src/libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release)
21719
+++ b/src/libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch)
21721
retarray->offset = 0;
21722
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21724
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21725
- * extent[rank-1];
21726
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21728
- retarray->base_addr = xmalloc (alloc_size);
21729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21730
if (alloc_size == 0)
21732
/* Make sure we have a zero-sized array. */
21733
@@ -286,8 +285,7 @@
21737
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21738
- * extent[rank-1];
21739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21741
retarray->offset = 0;
21742
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21743
@@ -299,7 +297,7 @@
21747
- retarray->base_addr = xmalloc (alloc_size);
21748
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21752
@@ -472,8 +470,7 @@
21753
retarray->offset = 0;
21754
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21756
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21757
- * extent[rank-1];
21758
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21760
if (alloc_size == 0)
21762
@@ -482,7 +479,7 @@
21766
- retarray->base_addr = xmalloc (alloc_size);
21767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21771
Index: libgfortran/generated/pack_i4.c
21772
===================================================================
21773
--- a/src/libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release)
21774
+++ b/src/libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch)
21775
@@ -167,8 +167,8 @@
21779
- /* xmalloc allocates a single byte for zero size. */
21780
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
21781
+ /* xmallocarray allocates a single byte for zero size. */
21782
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
21786
Index: libgfortran/generated/maxloc1_4_i1.c
21787
===================================================================
21788
--- a/src/libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release)
21789
+++ b/src/libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch)
21791
retarray->offset = 0;
21792
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21794
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21795
- * extent[rank-1];
21796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21798
- retarray->base_addr = xmalloc (alloc_size);
21799
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21800
if (alloc_size == 0)
21802
/* Make sure we have a zero-sized array. */
21803
@@ -294,8 +293,7 @@
21807
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21808
- * extent[rank-1];
21809
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21811
retarray->offset = 0;
21812
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21813
@@ -307,7 +305,7 @@
21817
- retarray->base_addr = xmalloc (alloc_size);
21818
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21822
@@ -485,8 +483,7 @@
21823
retarray->offset = 0;
21824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21826
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21827
- * extent[rank-1];
21828
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21830
if (alloc_size == 0)
21832
@@ -495,7 +492,7 @@
21836
- retarray->base_addr = xmalloc (alloc_size);
21837
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21841
Index: libgfortran/generated/matmul_r10.c
21842
===================================================================
21843
--- a/src/libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release)
21844
+++ b/src/libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch)
21845
@@ -124,7 +124,7 @@
21848
retarray->base_addr
21849
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
21850
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
21851
retarray->offset = 0;
21853
else if (unlikely (compile_options.bounds_check))
21854
Index: libgfortran/generated/minloc1_4_i8.c
21855
===================================================================
21856
--- a/src/libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release)
21857
+++ b/src/libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch)
21859
retarray->offset = 0;
21860
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21862
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21863
- * extent[rank-1];
21864
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21866
- retarray->base_addr = xmalloc (alloc_size);
21867
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21868
if (alloc_size == 0)
21870
/* Make sure we have a zero-sized array. */
21871
@@ -294,8 +293,7 @@
21875
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21876
- * extent[rank-1];
21877
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21879
retarray->offset = 0;
21880
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21881
@@ -307,7 +305,7 @@
21885
- retarray->base_addr = xmalloc (alloc_size);
21886
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21890
@@ -485,8 +483,7 @@
21891
retarray->offset = 0;
21892
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21894
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21895
- * extent[rank-1];
21896
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21898
if (alloc_size == 0)
21900
@@ -495,7 +492,7 @@
21904
- retarray->base_addr = xmalloc (alloc_size);
21905
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21909
Index: libgfortran/generated/minloc0_8_r4.c
21910
===================================================================
21911
--- a/src/libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release)
21912
+++ b/src/libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch)
21914
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21915
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21916
retarray->offset = 0;
21917
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21918
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21922
@@ -199,7 +199,7 @@
21923
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21924
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21925
retarray->offset = 0;
21926
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21927
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21931
@@ -367,7 +367,7 @@
21932
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21933
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21934
retarray->offset = 0;
21935
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21936
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21938
else if (unlikely (compile_options.bounds_check))
21940
Index: libgfortran/generated/matmul_l4.c
21941
===================================================================
21942
--- a/src/libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release)
21943
+++ b/src/libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch)
21947
retarray->base_addr
21948
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
21949
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
21950
retarray->offset = 0;
21952
else if (unlikely (compile_options.bounds_check))
21953
Index: libgfortran/generated/reshape_r8.c
21954
===================================================================
21955
--- a/src/libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release)
21956
+++ b/src/libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch)
21957
@@ -111,11 +111,11 @@
21960
if (unlikely (rs < 1))
21964
- alloc_size = rs * sizeof (GFC_REAL_8);
21967
- ret->base_addr = xmalloc (alloc_size);
21968
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21969
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21972
Index: libgfortran/generated/in_pack_c10.c
21973
===================================================================
21974
--- a/src/libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release)
21975
+++ b/src/libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch)
21977
return source->base_addr;
21979
/* Allocate storage for the destination. */
21980
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
21981
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
21983
src = source->base_addr;
21984
stride0 = stride[0];
21985
Index: libgfortran/generated/all_l4.c
21986
===================================================================
21987
--- a/src/libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release)
21988
+++ b/src/libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch)
21989
@@ -101,8 +101,7 @@
21990
retarray->offset = 0;
21991
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21993
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21994
- * extent[rank-1];
21995
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21997
if (alloc_size == 0)
21999
@@ -111,7 +110,7 @@
22003
- retarray->base_addr = xmalloc (alloc_size);
22004
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
22008
Index: libgfortran/generated/minloc0_8_i2.c
22009
===================================================================
22010
--- a/src/libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release)
22011
+++ b/src/libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch)
22013
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22014
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22015
retarray->offset = 0;
22016
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22017
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22021
@@ -199,7 +199,7 @@
22022
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22023
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22024
retarray->offset = 0;
22025
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22026
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22030
@@ -367,7 +367,7 @@
22031
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22032
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22033
retarray->offset = 0;
22034
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22035
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22037
else if (unlikely (compile_options.bounds_check))
22039
Index: libgfortran/generated/norm2_r16.c
22040
===================================================================
22041
--- a/src/libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release)
22042
+++ b/src/libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch)
22043
@@ -105,10 +105,9 @@
22044
retarray->offset = 0;
22045
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22047
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22048
- * extent[rank-1];
22049
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22051
- retarray->base_addr = xmalloc (alloc_size);
22052
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22053
if (alloc_size == 0)
22055
/* Make sure we have a zero-sized array. */
22056
Index: libgfortran/generated/reshape_c10.c
22057
===================================================================
22058
--- a/src/libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release)
22059
+++ b/src/libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch)
22060
@@ -111,11 +111,11 @@
22063
if (unlikely (rs < 1))
22067
- alloc_size = rs * sizeof (GFC_COMPLEX_10);
22070
- ret->base_addr = xmalloc (alloc_size);
22071
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
22072
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22075
Index: libgfortran/generated/unpack_c16.c
22076
===================================================================
22077
--- a/src/libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release)
22078
+++ b/src/libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch)
22083
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
22084
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
22088
@@ -244,7 +244,7 @@
22092
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
22093
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
22097
Index: libgfortran/generated/maxloc1_4_r4.c
22098
===================================================================
22099
--- a/src/libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release)
22100
+++ b/src/libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch)
22102
retarray->offset = 0;
22103
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22105
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22106
- * extent[rank-1];
22107
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22109
- retarray->base_addr = xmalloc (alloc_size);
22110
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22111
if (alloc_size == 0)
22113
/* Make sure we have a zero-sized array. */
22114
@@ -294,8 +293,7 @@
22118
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22119
- * extent[rank-1];
22120
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22122
retarray->offset = 0;
22123
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22124
@@ -307,7 +305,7 @@
22128
- retarray->base_addr = xmalloc (alloc_size);
22129
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22133
@@ -485,8 +483,7 @@
22134
retarray->offset = 0;
22135
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22137
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22138
- * extent[rank-1];
22139
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22141
if (alloc_size == 0)
22143
@@ -495,7 +492,7 @@
22147
- retarray->base_addr = xmalloc (alloc_size);
22148
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22152
Index: libgfortran/generated/maxval_r8.c
22153
===================================================================
22154
--- a/src/libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release)
22155
+++ b/src/libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch)
22157
retarray->offset = 0;
22158
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22160
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22161
- * extent[rank-1];
22162
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22164
- retarray->base_addr = xmalloc (alloc_size);
22165
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22166
if (alloc_size == 0)
22168
/* Make sure we have a zero-sized array. */
22169
@@ -286,8 +285,7 @@
22173
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22174
- * extent[rank-1];
22175
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22177
retarray->offset = 0;
22178
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22179
@@ -299,7 +297,7 @@
22183
- retarray->base_addr = xmalloc (alloc_size);
22184
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22188
@@ -472,8 +470,7 @@
22189
retarray->offset = 0;
22190
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22192
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22193
- * extent[rank-1];
22194
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22196
if (alloc_size == 0)
22198
@@ -482,7 +479,7 @@
22202
- retarray->base_addr = xmalloc (alloc_size);
22203
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22207
Index: libgfortran/generated/transpose_c4.c
22208
===================================================================
22209
--- a/src/libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release)
22210
+++ b/src/libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch)
22212
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
22213
GFC_DESCRIPTOR_EXTENT(source, 1));
22215
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
22216
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
22217
+ sizeof (GFC_COMPLEX_4));
22219
} else if (unlikely (compile_options.bounds_check))
22221
Index: libgfortran/generated/eoshift1_4.c
22222
===================================================================
22223
--- a/src/libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release)
22224
+++ b/src/libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch)
22225
@@ -105,8 +105,8 @@
22226
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
22229
- /* xmalloc allocates a single byte for zero size. */
22230
- ret->base_addr = xmalloc (size * arraysize);
22231
+ /* xmallocarray allocates a single byte for zero size. */
22232
+ ret->base_addr = xmallocarray (arraysize, size);
22235
else if (unlikely (compile_options.bounds_check))
22236
Index: libgfortran/generated/minval_r16.c
22237
===================================================================
22238
--- a/src/libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release)
22239
+++ b/src/libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch)
22241
retarray->offset = 0;
22242
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22244
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22245
- * extent[rank-1];
22246
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22248
- retarray->base_addr = xmalloc (alloc_size);
22249
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22250
if (alloc_size == 0)
22252
/* Make sure we have a zero-sized array. */
22253
@@ -286,8 +285,7 @@
22257
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22258
- * extent[rank-1];
22259
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22261
retarray->offset = 0;
22262
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22263
@@ -299,7 +297,7 @@
22267
- retarray->base_addr = xmalloc (alloc_size);
22268
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22272
@@ -472,8 +470,7 @@
22273
retarray->offset = 0;
22274
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22276
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22277
- * extent[rank-1];
22278
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22280
if (alloc_size == 0)
22282
@@ -482,7 +479,7 @@
22286
- retarray->base_addr = xmalloc (alloc_size);
22287
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22291
Index: libgfortran/generated/iany_i16.c
22292
===================================================================
22293
--- a/src/libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release)
22294
+++ b/src/libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch)
22296
retarray->offset = 0;
22297
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22299
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22300
- * extent[rank-1];
22301
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22303
- retarray->base_addr = xmalloc (alloc_size);
22304
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22305
if (alloc_size == 0)
22307
/* Make sure we have a zero-sized array. */
22308
@@ -272,8 +271,7 @@
22312
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22313
- * extent[rank-1];
22314
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22316
retarray->offset = 0;
22317
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22318
@@ -285,7 +283,7 @@
22322
- retarray->base_addr = xmalloc (alloc_size);
22323
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22327
@@ -430,8 +428,7 @@
22328
retarray->offset = 0;
22329
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22331
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22332
- * extent[rank-1];
22333
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22335
if (alloc_size == 0)
22337
@@ -440,7 +437,7 @@
22341
- retarray->base_addr = xmalloc (alloc_size);
22342
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22346
Index: libgfortran/generated/maxloc1_4_i2.c
22347
===================================================================
22348
--- a/src/libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release)
22349
+++ b/src/libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch)
22351
retarray->offset = 0;
22352
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22354
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22355
- * extent[rank-1];
22356
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22358
- retarray->base_addr = xmalloc (alloc_size);
22359
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22360
if (alloc_size == 0)
22362
/* Make sure we have a zero-sized array. */
22363
@@ -294,8 +293,7 @@
22367
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22368
- * extent[rank-1];
22369
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22371
retarray->offset = 0;
22372
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22373
@@ -307,7 +305,7 @@
22377
- retarray->base_addr = xmalloc (alloc_size);
22378
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22382
@@ -485,8 +483,7 @@
22383
retarray->offset = 0;
22384
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22386
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22387
- * extent[rank-1];
22388
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22390
if (alloc_size == 0)
22392
@@ -495,7 +492,7 @@
22396
- retarray->base_addr = xmalloc (alloc_size);
22397
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22401
Index: libgfortran/generated/maxloc1_8_i8.c
22402
===================================================================
22403
--- a/src/libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release)
22404
+++ b/src/libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch)
22406
retarray->offset = 0;
22407
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22409
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22410
- * extent[rank-1];
22411
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22413
- retarray->base_addr = xmalloc (alloc_size);
22414
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22415
if (alloc_size == 0)
22417
/* Make sure we have a zero-sized array. */
22418
@@ -294,8 +293,7 @@
22422
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22423
- * extent[rank-1];
22424
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22426
retarray->offset = 0;
22427
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22428
@@ -307,7 +305,7 @@
22432
- retarray->base_addr = xmalloc (alloc_size);
22433
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22437
@@ -485,8 +483,7 @@
22438
retarray->offset = 0;
22439
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22441
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22442
- * extent[rank-1];
22443
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22445
if (alloc_size == 0)
22447
@@ -495,7 +492,7 @@
22451
- retarray->base_addr = xmalloc (alloc_size);
22452
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22456
Index: libgfortran/generated/maxloc0_4_r8.c
22457
===================================================================
22458
--- a/src/libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release)
22459
+++ b/src/libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch)
22461
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22462
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22463
retarray->offset = 0;
22464
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22465
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22469
@@ -199,7 +199,7 @@
22470
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22471
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22472
retarray->offset = 0;
22473
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22474
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22478
@@ -367,7 +367,7 @@
22479
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22480
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22481
retarray->offset = 0;
22482
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22483
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22485
else if (unlikely (compile_options.bounds_check))
22487
Index: libgfortran/generated/maxloc0_16_r16.c
22488
===================================================================
22489
--- a/src/libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release)
22490
+++ b/src/libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch)
22492
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22493
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22494
retarray->offset = 0;
22495
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22496
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22500
@@ -199,7 +199,7 @@
22501
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22502
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22503
retarray->offset = 0;
22504
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22505
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22509
@@ -367,7 +367,7 @@
22510
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22511
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22512
retarray->offset = 0;
22513
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22514
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22516
else if (unlikely (compile_options.bounds_check))
22518
Index: libgfortran/generated/sum_c10.c
22519
===================================================================
22520
--- a/src/libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release)
22521
+++ b/src/libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch)
22523
retarray->offset = 0;
22524
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22526
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22527
- * extent[rank-1];
22528
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22530
- retarray->base_addr = xmalloc (alloc_size);
22531
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
22532
if (alloc_size == 0)
22534
/* Make sure we have a zero-sized array. */
22535
@@ -272,8 +271,7 @@
22539
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22540
- * extent[rank-1];
22541
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22543
retarray->offset = 0;
22544
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22545
@@ -285,7 +283,7 @@
22549
- retarray->base_addr = xmalloc (alloc_size);
22550
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
22554
@@ -430,8 +428,7 @@
22555
retarray->offset = 0;
22556
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22558
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22559
- * extent[rank-1];
22560
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22562
if (alloc_size == 0)
22564
@@ -440,7 +437,7 @@
22568
- retarray->base_addr = xmalloc (alloc_size);
22569
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
22573
Index: libgfortran/generated/iall_i4.c
22574
===================================================================
22575
--- a/src/libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release)
22576
+++ b/src/libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch)
22578
retarray->offset = 0;
22579
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22581
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22582
- * extent[rank-1];
22583
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22585
- retarray->base_addr = xmalloc (alloc_size);
22586
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22587
if (alloc_size == 0)
22589
/* Make sure we have a zero-sized array. */
22590
@@ -272,8 +271,7 @@
22594
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22595
- * extent[rank-1];
22596
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22598
retarray->offset = 0;
22599
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22600
@@ -285,7 +283,7 @@
22604
- retarray->base_addr = xmalloc (alloc_size);
22605
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22609
@@ -430,8 +428,7 @@
22610
retarray->offset = 0;
22611
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22613
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22614
- * extent[rank-1];
22615
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22617
if (alloc_size == 0)
22619
@@ -440,7 +437,7 @@
22623
- retarray->base_addr = xmalloc (alloc_size);
22624
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22628
Index: libgfortran/generated/minloc1_4_r16.c
22629
===================================================================
22630
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
22631
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
22633
retarray->offset = 0;
22634
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22636
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22637
- * extent[rank-1];
22638
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22640
- retarray->base_addr = xmalloc (alloc_size);
22641
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22642
if (alloc_size == 0)
22644
/* Make sure we have a zero-sized array. */
22645
@@ -294,8 +293,7 @@
22649
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22650
- * extent[rank-1];
22651
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22653
retarray->offset = 0;
22654
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22655
@@ -307,7 +305,7 @@
22659
- retarray->base_addr = xmalloc (alloc_size);
22660
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22664
@@ -485,8 +483,7 @@
22665
retarray->offset = 0;
22666
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22668
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22669
- * extent[rank-1];
22670
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22672
if (alloc_size == 0)
22674
@@ -495,7 +492,7 @@
22678
- retarray->base_addr = xmalloc (alloc_size);
22679
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22683
Index: libgfortran/generated/maxloc0_8_r16.c
22684
===================================================================
22685
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
22686
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
22688
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22689
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22690
retarray->offset = 0;
22691
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22692
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22696
@@ -199,7 +199,7 @@
22697
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22698
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22699
retarray->offset = 0;
22700
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22701
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22705
@@ -367,7 +367,7 @@
22706
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22707
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22708
retarray->offset = 0;
22709
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22710
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22712
else if (unlikely (compile_options.bounds_check))
22714
Index: libgfortran/generated/pack_r8.c
22715
===================================================================
22716
--- a/src/libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release)
22717
+++ b/src/libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch)
22718
@@ -167,8 +167,8 @@
22722
- /* xmalloc allocates a single byte for zero size. */
22723
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
22724
+ /* xmallocarray allocates a single byte for zero size. */
22725
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
22729
Index: libgfortran/generated/matmul_c10.c
22730
===================================================================
22731
--- a/src/libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release)
22732
+++ b/src/libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch)
22733
@@ -124,7 +124,7 @@
22736
retarray->base_addr
22737
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
22738
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
22739
retarray->offset = 0;
22741
else if (unlikely (compile_options.bounds_check))
22742
Index: libgfortran/generated/maxloc0_16_i4.c
22743
===================================================================
22744
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
22745
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
22747
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22748
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22749
retarray->offset = 0;
22750
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22751
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22755
@@ -199,7 +199,7 @@
22756
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22757
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22758
retarray->offset = 0;
22759
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22760
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22764
@@ -367,7 +367,7 @@
22765
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22766
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22767
retarray->offset = 0;
22768
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22769
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22771
else if (unlikely (compile_options.bounds_check))
22773
Index: libgfortran/generated/pack_r16.c
22774
===================================================================
22775
--- a/src/libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release)
22776
+++ b/src/libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch)
22777
@@ -167,8 +167,8 @@
22781
- /* xmalloc allocates a single byte for zero size. */
22782
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
22783
+ /* xmallocarray allocates a single byte for zero size. */
22784
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
22788
Index: libgfortran/generated/minloc1_16_i8.c
22789
===================================================================
22790
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
22791
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
22793
retarray->offset = 0;
22794
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22796
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22797
- * extent[rank-1];
22798
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22800
- retarray->base_addr = xmalloc (alloc_size);
22801
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22802
if (alloc_size == 0)
22804
/* Make sure we have a zero-sized array. */
22805
@@ -294,8 +293,7 @@
22809
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22810
- * extent[rank-1];
22811
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22813
retarray->offset = 0;
22814
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22815
@@ -307,7 +305,7 @@
22819
- retarray->base_addr = xmalloc (alloc_size);
22820
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22824
@@ -485,8 +483,7 @@
22825
retarray->offset = 0;
22826
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22828
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22829
- * extent[rank-1];
22830
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22832
if (alloc_size == 0)
22834
@@ -495,7 +492,7 @@
22838
- retarray->base_addr = xmalloc (alloc_size);
22839
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22843
Index: libgfortran/generated/minloc0_16_r10.c
22844
===================================================================
22845
--- a/src/libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release)
22846
+++ b/src/libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch)
22848
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22849
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22850
retarray->offset = 0;
22851
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22852
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22856
@@ -199,7 +199,7 @@
22857
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22858
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22859
retarray->offset = 0;
22860
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22861
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22865
@@ -367,7 +367,7 @@
22866
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22867
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22868
retarray->offset = 0;
22869
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22870
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22872
else if (unlikely (compile_options.bounds_check))
22874
Index: libgfortran/generated/unpack_c4.c
22875
===================================================================
22876
--- a/src/libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release)
22877
+++ b/src/libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch)
22882
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
22883
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
22887
@@ -244,7 +244,7 @@
22891
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
22892
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
22896
Index: libgfortran/generated/iparity_i1.c
22897
===================================================================
22898
--- a/src/libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release)
22899
+++ b/src/libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch)
22901
retarray->offset = 0;
22902
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22904
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22905
- * extent[rank-1];
22906
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22908
- retarray->base_addr = xmalloc (alloc_size);
22909
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22910
if (alloc_size == 0)
22912
/* Make sure we have a zero-sized array. */
22913
@@ -272,8 +271,7 @@
22917
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22918
- * extent[rank-1];
22919
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22921
retarray->offset = 0;
22922
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22923
@@ -285,7 +283,7 @@
22927
- retarray->base_addr = xmalloc (alloc_size);
22928
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22932
@@ -430,8 +428,7 @@
22933
retarray->offset = 0;
22934
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22936
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22937
- * extent[rank-1];
22938
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22940
if (alloc_size == 0)
22942
@@ -440,7 +437,7 @@
22946
- retarray->base_addr = xmalloc (alloc_size);
22947
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22951
Index: libgfortran/generated/product_c8.c
22952
===================================================================
22953
--- a/src/libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release)
22954
+++ b/src/libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch)
22956
retarray->offset = 0;
22957
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22959
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22960
- * extent[rank-1];
22961
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22963
- retarray->base_addr = xmalloc (alloc_size);
22964
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
22965
if (alloc_size == 0)
22967
/* Make sure we have a zero-sized array. */
22968
@@ -272,8 +271,7 @@
22972
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22973
- * extent[rank-1];
22974
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22976
retarray->offset = 0;
22977
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22978
@@ -285,7 +283,7 @@
22982
- retarray->base_addr = xmalloc (alloc_size);
22983
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
22987
@@ -430,8 +428,7 @@
22988
retarray->offset = 0;
22989
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22991
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22992
- * extent[rank-1];
22993
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22995
if (alloc_size == 0)
22997
@@ -440,7 +437,7 @@
23001
- retarray->base_addr = xmalloc (alloc_size);
23002
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23006
Index: libgfortran/generated/in_pack_i16.c
23007
===================================================================
23008
--- a/src/libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release)
23009
+++ b/src/libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch)
23011
return source->base_addr;
23013
/* Allocate storage for the destination. */
23014
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
23015
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
23017
src = source->base_addr;
23018
stride0 = stride[0];
23019
Index: libgfortran/generated/minloc0_8_i4.c
23020
===================================================================
23021
--- a/src/libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release)
23022
+++ b/src/libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch)
23024
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23025
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23026
retarray->offset = 0;
23027
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23028
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23032
@@ -199,7 +199,7 @@
23033
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23034
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23035
retarray->offset = 0;
23036
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23037
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23041
@@ -367,7 +367,7 @@
23042
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23043
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23044
retarray->offset = 0;
23045
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23046
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23048
else if (unlikely (compile_options.bounds_check))
23050
Index: libgfortran/generated/matmul_c4.c
23051
===================================================================
23052
--- a/src/libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release)
23053
+++ b/src/libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch)
23054
@@ -124,7 +124,7 @@
23057
retarray->base_addr
23058
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
23059
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
23060
retarray->offset = 0;
23062
else if (unlikely (compile_options.bounds_check))
23063
Index: libgfortran/generated/reshape_i8.c
23064
===================================================================
23065
--- a/src/libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release)
23066
+++ b/src/libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch)
23067
@@ -111,11 +111,11 @@
23070
if (unlikely (rs < 1))
23074
- alloc_size = rs * sizeof (GFC_INTEGER_8);
23077
- ret->base_addr = xmalloc (alloc_size);
23078
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23079
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23082
Index: libgfortran/generated/in_pack_c8.c
23083
===================================================================
23084
--- a/src/libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release)
23085
+++ b/src/libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch)
23087
return source->base_addr;
23089
/* Allocate storage for the destination. */
23090
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
23091
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
23093
src = source->base_addr;
23094
stride0 = stride[0];
23095
Index: libgfortran/generated/bessel_r10.c
23096
===================================================================
23097
--- a/src/libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release)
23098
+++ b/src/libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch)
23101
size_t size = n2 < n1 ? 0 : n2-n1+1;
23102
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
23103
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
23104
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
23108
@@ -122,7 +122,7 @@
23110
size_t size = n2 < n1 ? 0 : n2-n1+1;
23111
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
23112
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
23113
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
23117
@@ -162,7 +162,7 @@
23119
x2rev = GFC_REAL_10_LITERAL(2.)/x;
23121
- for (i = 2; i <= n1+n2; i++)
23122
+ for (i = 2; i <= n2 - n1; i++)
23124
#if defined(GFC_REAL_10_INFINITY)
23125
if (unlikely (last2 == -GFC_REAL_10_INFINITY))
23126
Index: libgfortran/generated/iall_i16.c
23127
===================================================================
23128
--- a/src/libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release)
23129
+++ b/src/libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch)
23131
retarray->offset = 0;
23132
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23134
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23135
- * extent[rank-1];
23136
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23138
- retarray->base_addr = xmalloc (alloc_size);
23139
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23140
if (alloc_size == 0)
23142
/* Make sure we have a zero-sized array. */
23143
@@ -272,8 +271,7 @@
23147
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23148
- * extent[rank-1];
23149
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23151
retarray->offset = 0;
23152
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23153
@@ -285,7 +283,7 @@
23157
- retarray->base_addr = xmalloc (alloc_size);
23158
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23162
@@ -430,8 +428,7 @@
23163
retarray->offset = 0;
23164
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23166
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23167
- * extent[rank-1];
23168
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23170
if (alloc_size == 0)
23172
@@ -440,7 +437,7 @@
23176
- retarray->base_addr = xmalloc (alloc_size);
23177
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23181
Index: libgfortran/generated/maxloc1_16_i1.c
23182
===================================================================
23183
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
23184
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
23186
retarray->offset = 0;
23187
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23189
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23190
- * extent[rank-1];
23191
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23193
- retarray->base_addr = xmalloc (alloc_size);
23194
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23195
if (alloc_size == 0)
23197
/* Make sure we have a zero-sized array. */
23198
@@ -294,8 +293,7 @@
23202
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23203
- * extent[rank-1];
23204
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23206
retarray->offset = 0;
23207
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23208
@@ -307,7 +305,7 @@
23212
- retarray->base_addr = xmalloc (alloc_size);
23213
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23217
@@ -485,8 +483,7 @@
23218
retarray->offset = 0;
23219
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23221
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23222
- * extent[rank-1];
23223
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23225
if (alloc_size == 0)
23227
@@ -495,7 +492,7 @@
23231
- retarray->base_addr = xmalloc (alloc_size);
23232
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23236
Index: libgfortran/generated/reshape_i16.c
23237
===================================================================
23238
--- a/src/libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release)
23239
+++ b/src/libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch)
23240
@@ -111,11 +111,11 @@
23243
if (unlikely (rs < 1))
23247
- alloc_size = rs * sizeof (GFC_INTEGER_16);
23250
- ret->base_addr = xmalloc (alloc_size);
23251
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23252
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23255
Index: libgfortran/generated/count_16_l.c
23256
===================================================================
23257
--- a/src/libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release)
23258
+++ b/src/libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch)
23259
@@ -101,8 +101,7 @@
23260
retarray->offset = 0;
23261
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23263
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23264
- * extent[rank-1];
23265
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23267
if (alloc_size == 0)
23269
@@ -111,7 +110,7 @@
23273
- retarray->base_addr = xmalloc (alloc_size);
23274
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23278
Index: libgfortran/generated/minloc1_8_i1.c
23279
===================================================================
23280
--- a/src/libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release)
23281
+++ b/src/libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch)
23283
retarray->offset = 0;
23284
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23286
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23287
- * extent[rank-1];
23288
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23290
- retarray->base_addr = xmalloc (alloc_size);
23291
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23292
if (alloc_size == 0)
23294
/* Make sure we have a zero-sized array. */
23295
@@ -294,8 +293,7 @@
23299
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23300
- * extent[rank-1];
23301
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23303
retarray->offset = 0;
23304
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23305
@@ -307,7 +305,7 @@
23309
- retarray->base_addr = xmalloc (alloc_size);
23310
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23314
@@ -485,8 +483,7 @@
23315
retarray->offset = 0;
23316
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23318
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23319
- * extent[rank-1];
23320
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23322
if (alloc_size == 0)
23324
@@ -495,7 +492,7 @@
23328
- retarray->base_addr = xmalloc (alloc_size);
23329
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23333
Index: libgfortran/generated/maxloc1_4_i4.c
23334
===================================================================
23335
--- a/src/libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release)
23336
+++ b/src/libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch)
23338
retarray->offset = 0;
23339
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23341
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23342
- * extent[rank-1];
23343
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23345
- retarray->base_addr = xmalloc (alloc_size);
23346
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23347
if (alloc_size == 0)
23349
/* Make sure we have a zero-sized array. */
23350
@@ -294,8 +293,7 @@
23354
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23355
- * extent[rank-1];
23356
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23358
retarray->offset = 0;
23359
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23360
@@ -307,7 +305,7 @@
23364
- retarray->base_addr = xmalloc (alloc_size);
23365
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23369
@@ -485,8 +483,7 @@
23370
retarray->offset = 0;
23371
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23373
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23374
- * extent[rank-1];
23375
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23377
if (alloc_size == 0)
23379
@@ -495,7 +492,7 @@
23383
- retarray->base_addr = xmalloc (alloc_size);
23384
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23388
Index: libgfortran/generated/maxval_i8.c
23389
===================================================================
23390
--- a/src/libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release)
23391
+++ b/src/libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch)
23393
retarray->offset = 0;
23394
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23396
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23397
- * extent[rank-1];
23398
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23400
- retarray->base_addr = xmalloc (alloc_size);
23401
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23402
if (alloc_size == 0)
23404
/* Make sure we have a zero-sized array. */
23405
@@ -286,8 +285,7 @@
23409
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23410
- * extent[rank-1];
23411
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23413
retarray->offset = 0;
23414
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23415
@@ -299,7 +297,7 @@
23419
- retarray->base_addr = xmalloc (alloc_size);
23420
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23424
@@ -472,8 +470,7 @@
23425
retarray->offset = 0;
23426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23428
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23429
- * extent[rank-1];
23430
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23432
if (alloc_size == 0)
23434
@@ -482,7 +479,7 @@
23438
- retarray->base_addr = xmalloc (alloc_size);
23439
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23443
Index: libgfortran/generated/eoshift3_16.c
23444
===================================================================
23445
--- a/src/libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release)
23446
+++ b/src/libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch)
23451
- ret->base_addr = xmalloc (size * arraysize);
23452
+ ret->base_addr = xmallocarray (arraysize, size);
23454
ret->dtype = array->dtype;
23455
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
23456
@@ -107,8 +107,8 @@
23457
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
23460
- /* xmalloc allocates a single byte for zero size. */
23461
- ret->base_addr = xmalloc (size * arraysize);
23462
+ /* xmallocarray allocates a single byte for zero size. */
23463
+ ret->base_addr = xmallocarray (arraysize, size);
23466
else if (unlikely (compile_options.bounds_check))
23467
Index: libgfortran/generated/shape_i8.c
23468
===================================================================
23469
--- a/src/libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release)
23470
+++ b/src/libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch)
23473
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
23475
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23476
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23479
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
23480
Index: libgfortran/generated/maxloc0_4_i16.c
23481
===================================================================
23482
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
23483
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
23485
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23486
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23487
retarray->offset = 0;
23488
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23489
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23493
@@ -199,7 +199,7 @@
23494
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23495
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23496
retarray->offset = 0;
23497
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23498
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23502
@@ -367,7 +367,7 @@
23503
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23504
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23505
retarray->offset = 0;
23506
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23507
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23509
else if (unlikely (compile_options.bounds_check))
23511
Index: libgfortran/generated/maxloc1_4_r10.c
23512
===================================================================
23513
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
23514
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
23516
retarray->offset = 0;
23517
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23519
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23520
- * extent[rank-1];
23521
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23523
- retarray->base_addr = xmalloc (alloc_size);
23524
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23525
if (alloc_size == 0)
23527
/* Make sure we have a zero-sized array. */
23528
@@ -294,8 +293,7 @@
23532
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23533
- * extent[rank-1];
23534
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23536
retarray->offset = 0;
23537
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23538
@@ -307,7 +305,7 @@
23542
- retarray->base_addr = xmalloc (alloc_size);
23543
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23547
@@ -485,8 +483,7 @@
23548
retarray->offset = 0;
23549
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23551
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23552
- * extent[rank-1];
23553
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23555
if (alloc_size == 0)
23557
@@ -495,7 +492,7 @@
23561
- retarray->base_addr = xmalloc (alloc_size);
23562
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23566
Index: libgfortran/generated/maxloc1_8_i16.c
23567
===================================================================
23568
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
23569
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
23571
retarray->offset = 0;
23572
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23574
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23575
- * extent[rank-1];
23576
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23578
- retarray->base_addr = xmalloc (alloc_size);
23579
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23580
if (alloc_size == 0)
23582
/* Make sure we have a zero-sized array. */
23583
@@ -294,8 +293,7 @@
23587
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23588
- * extent[rank-1];
23589
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23591
retarray->offset = 0;
23592
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23593
@@ -307,7 +305,7 @@
23597
- retarray->base_addr = xmalloc (alloc_size);
23598
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23602
@@ -485,8 +483,7 @@
23603
retarray->offset = 0;
23604
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23606
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23607
- * extent[rank-1];
23608
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23610
if (alloc_size == 0)
23612
@@ -495,7 +492,7 @@
23616
- retarray->base_addr = xmalloc (alloc_size);
23617
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23621
Index: libgfortran/generated/minloc0_8_r10.c
23622
===================================================================
23623
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
23624
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
23626
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23627
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23628
retarray->offset = 0;
23629
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23630
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23634
@@ -199,7 +199,7 @@
23635
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23636
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23637
retarray->offset = 0;
23638
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23639
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23643
@@ -367,7 +367,7 @@
23644
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23645
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23646
retarray->offset = 0;
23647
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23648
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23650
else if (unlikely (compile_options.bounds_check))
23652
Index: libgfortran/generated/iparity_i2.c
23653
===================================================================
23654
--- a/src/libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release)
23655
+++ b/src/libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch)
23657
retarray->offset = 0;
23658
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23660
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23661
- * extent[rank-1];
23662
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23664
- retarray->base_addr = xmalloc (alloc_size);
23665
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23666
if (alloc_size == 0)
23668
/* Make sure we have a zero-sized array. */
23669
@@ -272,8 +271,7 @@
23673
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23674
- * extent[rank-1];
23675
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23677
retarray->offset = 0;
23678
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23679
@@ -285,7 +283,7 @@
23683
- retarray->base_addr = xmalloc (alloc_size);
23684
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23688
@@ -430,8 +428,7 @@
23689
retarray->offset = 0;
23690
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23692
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23693
- * extent[rank-1];
23694
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23696
if (alloc_size == 0)
23698
@@ -440,7 +437,7 @@
23702
- retarray->base_addr = xmalloc (alloc_size);
23703
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23707
Index: libgfortran/generated/maxloc1_16_r4.c
23708
===================================================================
23709
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
23710
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
23712
retarray->offset = 0;
23713
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23715
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23716
- * extent[rank-1];
23717
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23719
- retarray->base_addr = xmalloc (alloc_size);
23720
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23721
if (alloc_size == 0)
23723
/* Make sure we have a zero-sized array. */
23724
@@ -294,8 +293,7 @@
23728
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23729
- * extent[rank-1];
23730
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23732
retarray->offset = 0;
23733
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23734
@@ -307,7 +305,7 @@
23738
- retarray->base_addr = xmalloc (alloc_size);
23739
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23743
@@ -485,8 +483,7 @@
23744
retarray->offset = 0;
23745
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23747
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23748
- * extent[rank-1];
23749
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23751
if (alloc_size == 0)
23753
@@ -495,7 +492,7 @@
23757
- retarray->base_addr = xmalloc (alloc_size);
23758
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23762
Index: libgfortran/generated/maxloc0_16_r8.c
23763
===================================================================
23764
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
23765
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
23767
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23768
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23769
retarray->offset = 0;
23770
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23771
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23775
@@ -199,7 +199,7 @@
23776
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23777
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23778
retarray->offset = 0;
23779
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23780
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23784
@@ -367,7 +367,7 @@
23785
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23786
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23787
retarray->offset = 0;
23788
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23789
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23791
else if (unlikely (compile_options.bounds_check))
23793
Index: libgfortran/generated/sum_i16.c
23794
===================================================================
23795
--- a/src/libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release)
23796
+++ b/src/libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch)
23798
retarray->offset = 0;
23799
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23801
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23802
- * extent[rank-1];
23803
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23805
- retarray->base_addr = xmalloc (alloc_size);
23806
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23807
if (alloc_size == 0)
23809
/* Make sure we have a zero-sized array. */
23810
@@ -272,8 +271,7 @@
23814
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23815
- * extent[rank-1];
23816
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23818
retarray->offset = 0;
23819
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23820
@@ -285,7 +283,7 @@
23824
- retarray->base_addr = xmalloc (alloc_size);
23825
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23829
@@ -430,8 +428,7 @@
23830
retarray->offset = 0;
23831
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23833
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23834
- * extent[rank-1];
23835
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23837
if (alloc_size == 0)
23839
@@ -440,7 +437,7 @@
23843
- retarray->base_addr = xmalloc (alloc_size);
23844
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23848
Index: libgfortran/generated/maxloc0_4_i8.c
23849
===================================================================
23850
--- a/src/libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release)
23851
+++ b/src/libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch)
23853
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23854
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23855
retarray->offset = 0;
23856
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23857
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23861
@@ -199,7 +199,7 @@
23862
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23863
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23864
retarray->offset = 0;
23865
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23866
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23870
@@ -367,7 +367,7 @@
23871
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23872
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23873
retarray->offset = 0;
23874
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23875
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23877
else if (unlikely (compile_options.bounds_check))
23879
Index: libgfortran/generated/pack_c16.c
23880
===================================================================
23881
--- a/src/libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release)
23882
+++ b/src/libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch)
23883
@@ -167,8 +167,8 @@
23887
- /* xmalloc allocates a single byte for zero size. */
23888
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
23889
+ /* xmallocarray allocates a single byte for zero size. */
23890
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
23894
Index: libgfortran/generated/maxloc1_16_i16.c
23895
===================================================================
23896
--- a/src/libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release)
23897
+++ b/src/libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch)
23899
retarray->offset = 0;
23900
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23902
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23903
- * extent[rank-1];
23904
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23906
- retarray->base_addr = xmalloc (alloc_size);
23907
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23908
if (alloc_size == 0)
23910
/* Make sure we have a zero-sized array. */
23911
@@ -294,8 +293,7 @@
23915
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23916
- * extent[rank-1];
23917
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23919
retarray->offset = 0;
23920
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23921
@@ -307,7 +305,7 @@
23925
- retarray->base_addr = xmalloc (alloc_size);
23926
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23930
@@ -485,8 +483,7 @@
23931
retarray->offset = 0;
23932
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23934
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23935
- * extent[rank-1];
23936
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23938
if (alloc_size == 0)
23940
@@ -495,7 +492,7 @@
23944
- retarray->base_addr = xmalloc (alloc_size);
23945
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23949
Index: libgfortran/generated/minloc1_8_r4.c
23950
===================================================================
23951
--- a/src/libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release)
23952
+++ b/src/libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch)
23954
retarray->offset = 0;
23955
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23957
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23958
- * extent[rank-1];
23959
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23961
- retarray->base_addr = xmalloc (alloc_size);
23962
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23963
if (alloc_size == 0)
23965
/* Make sure we have a zero-sized array. */
23966
@@ -294,8 +293,7 @@
23970
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23971
- * extent[rank-1];
23972
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23974
retarray->offset = 0;
23975
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23976
@@ -307,7 +305,7 @@
23980
- retarray->base_addr = xmalloc (alloc_size);
23981
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23985
@@ -485,8 +483,7 @@
23986
retarray->offset = 0;
23987
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23989
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23990
- * extent[rank-1];
23991
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23993
if (alloc_size == 0)
23995
@@ -495,7 +492,7 @@
23999
- retarray->base_addr = xmalloc (alloc_size);
24000
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24004
Index: libgfortran/generated/sum_c8.c
24005
===================================================================
24006
--- a/src/libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release)
24007
+++ b/src/libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch)
24009
retarray->offset = 0;
24010
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24012
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24013
- * extent[rank-1];
24014
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24016
- retarray->base_addr = xmalloc (alloc_size);
24017
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24018
if (alloc_size == 0)
24020
/* Make sure we have a zero-sized array. */
24021
@@ -272,8 +271,7 @@
24025
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24026
- * extent[rank-1];
24027
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24029
retarray->offset = 0;
24030
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24031
@@ -285,7 +283,7 @@
24035
- retarray->base_addr = xmalloc (alloc_size);
24036
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24040
@@ -430,8 +428,7 @@
24041
retarray->offset = 0;
24042
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24044
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24045
- * extent[rank-1];
24046
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24048
if (alloc_size == 0)
24050
@@ -440,7 +437,7 @@
24054
- retarray->base_addr = xmalloc (alloc_size);
24055
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24059
Index: libgfortran/generated/maxloc1_16_i2.c
24060
===================================================================
24061
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
24062
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
24064
retarray->offset = 0;
24065
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24067
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24068
- * extent[rank-1];
24069
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24071
- retarray->base_addr = xmalloc (alloc_size);
24072
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24073
if (alloc_size == 0)
24075
/* Make sure we have a zero-sized array. */
24076
@@ -294,8 +293,7 @@
24080
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24081
- * extent[rank-1];
24082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24084
retarray->offset = 0;
24085
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24086
@@ -307,7 +305,7 @@
24090
- retarray->base_addr = xmalloc (alloc_size);
24091
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24095
@@ -485,8 +483,7 @@
24096
retarray->offset = 0;
24097
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24099
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24100
- * extent[rank-1];
24101
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24103
if (alloc_size == 0)
24105
@@ -495,7 +492,7 @@
24109
- retarray->base_addr = xmalloc (alloc_size);
24110
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24114
Index: libgfortran/generated/parity_l1.c
24115
===================================================================
24116
--- a/src/libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release)
24117
+++ b/src/libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch)
24119
retarray->offset = 0;
24120
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24122
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24123
- * extent[rank-1];
24124
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24126
- retarray->base_addr = xmalloc (alloc_size);
24127
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
24128
if (alloc_size == 0)
24130
/* Make sure we have a zero-sized array. */
24131
Index: libgfortran/generated/maxval_i16.c
24132
===================================================================
24133
--- a/src/libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release)
24134
+++ b/src/libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch)
24136
retarray->offset = 0;
24137
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24139
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24140
- * extent[rank-1];
24141
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24143
- retarray->base_addr = xmalloc (alloc_size);
24144
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24145
if (alloc_size == 0)
24147
/* Make sure we have a zero-sized array. */
24148
@@ -286,8 +285,7 @@
24152
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24153
- * extent[rank-1];
24154
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24156
retarray->offset = 0;
24157
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24158
@@ -299,7 +297,7 @@
24162
- retarray->base_addr = xmalloc (alloc_size);
24163
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24167
@@ -472,8 +470,7 @@
24168
retarray->offset = 0;
24169
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24171
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24172
- * extent[rank-1];
24173
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24175
if (alloc_size == 0)
24177
@@ -482,7 +479,7 @@
24181
- retarray->base_addr = xmalloc (alloc_size);
24182
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24186
Index: libgfortran/generated/spread_c8.c
24187
===================================================================
24188
--- a/src/libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release)
24189
+++ b/src/libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch)
24190
@@ -101,8 +101,8 @@
24194
- /* xmalloc allocates a single byte for zero size. */
24195
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
24196
+ /* xmallocarray allocates a single byte for zero size. */
24197
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
24201
@@ -244,7 +244,7 @@
24203
if (ret->base_addr == NULL)
24205
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
24206
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
24208
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
24210
Index: libgfortran/generated/matmul_i16.c
24211
===================================================================
24212
--- a/src/libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release)
24213
+++ b/src/libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch)
24214
@@ -124,7 +124,7 @@
24217
retarray->base_addr
24218
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
24219
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
24220
retarray->offset = 0;
24222
else if (unlikely (compile_options.bounds_check))
24223
Index: libgfortran/generated/pack_i8.c
24224
===================================================================
24225
--- a/src/libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release)
24226
+++ b/src/libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch)
24227
@@ -167,8 +167,8 @@
24231
- /* xmalloc allocates a single byte for zero size. */
24232
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
24233
+ /* xmallocarray allocates a single byte for zero size. */
24234
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
24238
Index: libgfortran/generated/any_l1.c
24239
===================================================================
24240
--- a/src/libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release)
24241
+++ b/src/libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch)
24242
@@ -101,8 +101,7 @@
24243
retarray->offset = 0;
24244
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24246
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24247
- * extent[rank-1];
24248
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24250
if (alloc_size == 0)
24252
@@ -111,7 +110,7 @@
24256
- retarray->base_addr = xmalloc (alloc_size);
24257
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
24261
Index: libgfortran/generated/minloc1_8_i2.c
24262
===================================================================
24263
--- a/src/libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release)
24264
+++ b/src/libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch)
24266
retarray->offset = 0;
24267
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24269
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24270
- * extent[rank-1];
24271
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24273
- retarray->base_addr = xmalloc (alloc_size);
24274
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24275
if (alloc_size == 0)
24277
/* Make sure we have a zero-sized array. */
24278
@@ -294,8 +293,7 @@
24282
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24283
- * extent[rank-1];
24284
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24286
retarray->offset = 0;
24287
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24288
@@ -307,7 +305,7 @@
24292
- retarray->base_addr = xmalloc (alloc_size);
24293
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24297
@@ -485,8 +483,7 @@
24298
retarray->offset = 0;
24299
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24301
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24302
- * extent[rank-1];
24303
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24305
if (alloc_size == 0)
24307
@@ -495,7 +492,7 @@
24311
- retarray->base_addr = xmalloc (alloc_size);
24312
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24316
Index: libgfortran/generated/minloc0_8_r8.c
24317
===================================================================
24318
--- a/src/libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release)
24319
+++ b/src/libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch)
24321
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24322
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24323
retarray->offset = 0;
24324
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24325
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24329
@@ -199,7 +199,7 @@
24330
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24331
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24332
retarray->offset = 0;
24333
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24334
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24338
@@ -367,7 +367,7 @@
24339
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24340
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24341
retarray->offset = 0;
24342
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24343
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24345
else if (unlikely (compile_options.bounds_check))
24347
Index: libgfortran/generated/matmul_l8.c
24348
===================================================================
24349
--- a/src/libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release)
24350
+++ b/src/libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch)
24354
retarray->base_addr
24355
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
24356
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
24357
retarray->offset = 0;
24359
else if (unlikely (compile_options.bounds_check))
24360
Index: libgfortran/generated/product_r10.c
24361
===================================================================
24362
--- a/src/libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release)
24363
+++ b/src/libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch)
24365
retarray->offset = 0;
24366
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24368
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24369
- * extent[rank-1];
24370
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24372
- retarray->base_addr = xmalloc (alloc_size);
24373
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24374
if (alloc_size == 0)
24376
/* Make sure we have a zero-sized array. */
24377
@@ -272,8 +271,7 @@
24381
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24382
- * extent[rank-1];
24383
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24385
retarray->offset = 0;
24386
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24387
@@ -285,7 +283,7 @@
24391
- retarray->base_addr = xmalloc (alloc_size);
24392
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24396
@@ -430,8 +428,7 @@
24397
retarray->offset = 0;
24398
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24400
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24401
- * extent[rank-1];
24402
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24404
if (alloc_size == 0)
24406
@@ -440,7 +437,7 @@
24410
- retarray->base_addr = xmalloc (alloc_size);
24411
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24415
Index: libgfortran/generated/product_i1.c
24416
===================================================================
24417
--- a/src/libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release)
24418
+++ b/src/libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch)
24420
retarray->offset = 0;
24421
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24423
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24424
- * extent[rank-1];
24425
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24427
- retarray->base_addr = xmalloc (alloc_size);
24428
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24429
if (alloc_size == 0)
24431
/* Make sure we have a zero-sized array. */
24432
@@ -272,8 +271,7 @@
24436
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24437
- * extent[rank-1];
24438
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24440
retarray->offset = 0;
24441
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24442
@@ -285,7 +283,7 @@
24446
- retarray->base_addr = xmalloc (alloc_size);
24447
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24451
@@ -430,8 +428,7 @@
24452
retarray->offset = 0;
24453
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24455
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24456
- * extent[rank-1];
24457
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24459
if (alloc_size == 0)
24461
@@ -440,7 +437,7 @@
24465
- retarray->base_addr = xmalloc (alloc_size);
24466
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24470
Index: libgfortran/generated/all_l8.c
24471
===================================================================
24472
--- a/src/libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release)
24473
+++ b/src/libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch)
24474
@@ -101,8 +101,7 @@
24475
retarray->offset = 0;
24476
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24478
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24479
- * extent[rank-1];
24480
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24482
if (alloc_size == 0)
24484
@@ -111,7 +110,7 @@
24488
- retarray->base_addr = xmalloc (alloc_size);
24489
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
24493
Index: libgfortran/generated/in_pack_r16.c
24494
===================================================================
24495
--- a/src/libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release)
24496
+++ b/src/libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch)
24498
return source->base_addr;
24500
/* Allocate storage for the destination. */
24501
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
24502
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
24504
src = source->base_addr;
24505
stride0 = stride[0];
24506
Index: libgfortran/generated/in_pack_i1.c
24507
===================================================================
24508
--- a/src/libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release)
24509
+++ b/src/libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch)
24511
return source->base_addr;
24513
/* Allocate storage for the destination. */
24514
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
24515
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
24517
src = source->base_addr;
24518
stride0 = stride[0];
24519
Index: libgfortran/libgfortran.h
24520
===================================================================
24521
--- a/src/libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release)
24522
+++ b/src/libgfortran/libgfortran.h (.../branches/gcc-4_8-branch)
24523
@@ -751,6 +751,9 @@
24524
extern void *xmalloc (size_t) __attribute__ ((malloc));
24525
internal_proto(xmalloc);
24527
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
24528
+internal_proto(xmallocarray);
24530
extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
24531
internal_proto(xcalloc);
24533
Index: libgfortran/config.h.in
24534
===================================================================
24535
--- a/src/libgfortran/config.h.in (.../tags/gcc_4_8_3_release)
24536
+++ b/src/libgfortran/config.h.in (.../branches/gcc-4_8-branch)
24537
@@ -711,6 +711,9 @@
24538
/* Define to 1 if you have the `strtof' function. */
24541
+/* Define to 1 if you have the `strtok_r' function. */
24542
+#undef HAVE_STRTOK_R
24544
/* Define to 1 if you have the `strtold' function. */
24545
#undef HAVE_STRTOLD
24547
Index: libgfortran/io/list_read.c
24548
===================================================================
24549
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release)
24550
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
24551
@@ -2354,7 +2354,7 @@
24553
index_type len = strlen (nl->var_name) + 1;
24555
- char * ext_name = (char*)xmalloc (len + 1);
24556
+ char * ext_name = xmalloc (len + 1);
24557
memcpy (ext_name, nl->var_name, len-1);
24558
memcpy (ext_name + len - 1, "%", 2);
24559
for (nl = nl->next; nl; nl = nl->next)
24560
Index: libgfortran/io/unit.c
24561
===================================================================
24562
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
24563
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
24564
@@ -455,7 +455,7 @@
24566
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
24567
iunit->ls = (array_loop_spec *)
24568
- xmalloc (iunit->rank * sizeof (array_loop_spec));
24569
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
24570
dtp->internal_unit_len *=
24571
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
24573
Index: libgfortran/io/unix.c
24574
===================================================================
24575
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
24576
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
24577
@@ -407,7 +407,9 @@
24581
- if (s->fd != STDOUT_FILENO
24584
+ else if (s->fd != STDOUT_FILENO
24585
&& s->fd != STDERR_FILENO
24586
&& s->fd != STDIN_FILENO)
24587
retval = close (s->fd);
24588
@@ -983,7 +985,15 @@
24590
/* Get the current length of the file. */
24592
- fstat (fd, &statbuf);
24593
+ if (fstat (fd, &statbuf) == -1)
24595
+ s->st_dev = s->st_ino = -1;
24596
+ s->file_length = 0;
24597
+ if (errno == EBADF)
24600
+ return (stream *) s;
24603
s->st_dev = statbuf.st_dev;
24604
s->st_ino = statbuf.st_ino;
24605
Index: libgfortran/io/transfer.c
24606
===================================================================
24607
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release)
24608
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
24609
@@ -3776,9 +3776,9 @@
24610
if (nml->var_rank > 0)
24612
nml->dim = (descriptor_dimension*)
24613
- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
24614
+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
24615
nml->ls = (array_loop_spec*)
24616
- xmalloc (nml->var_rank * sizeof (array_loop_spec));
24617
+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
24621
Index: libgfortran/io/write.c
24622
===================================================================
24623
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_3_release)
24624
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
24625
@@ -1863,7 +1863,7 @@
24626
base_var_name_len = base ? strlen (base->var_name) : 0;
24627
ext_name_len = base_name_len + base_var_name_len
24628
+ strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
24629
- ext_name = (char*)xmalloc (ext_name_len);
24630
+ ext_name = xmalloc (ext_name_len);
24632
memcpy (ext_name, base_name, base_name_len);
24633
clen = strlen (obj->var_name + base_var_name_len);
24634
@@ -1892,7 +1892,7 @@
24635
/* Now obj_name. */
24637
obj_name_len = strlen (obj->var_name) + 1;
24638
- obj_name = xmalloc (obj_name_len+1);
24639
+ obj_name = xmalloc (obj_name_len + 1);
24640
memcpy (obj_name, obj->var_name, obj_name_len-1);
24641
memcpy (obj_name + obj_name_len-1, "%", 2);
24643
Index: libada/Makefile.in
24644
===================================================================
24645
--- a/src/libada/Makefile.in (.../tags/gcc_4_8_3_release)
24646
+++ b/src/libada/Makefile.in (.../branches/gcc-4_8-branch)
24648
PICFLAG = @PICFLAG@
24649
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
24650
GNATLIBCFLAGS= -g -O2
24651
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
24652
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
24653
-fexceptions -DIN_RTS @have_getipinfo@
24655
host_subdir = @host_subdir@
24656
Index: libada/ChangeLog
24657
===================================================================
24658
--- a/src/libada/ChangeLog (.../tags/gcc_4_8_3_release)
24659
+++ b/src/libada/ChangeLog (.../branches/gcc-4_8-branch)
24661
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
24663
+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
24665
2014-05-22 Release Manager
24667
* GCC 4.8.3 released.
24668
Index: libffi/src/powerpc/linux64_closure.S
24669
===================================================================
24670
--- a/src/libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release)
24671
+++ b/src/libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch)
24672
@@ -381,7 +381,8 @@
24676
-# if defined __ELF__ && defined __linux__
24679
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
24680
.section .note.GNU-stack,"",@progbits
24683
Index: libffi/src/powerpc/linux64.S
24684
===================================================================
24685
--- a/src/libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release)
24686
+++ b/src/libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch)
24687
@@ -254,7 +254,8 @@
24691
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
24694
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
24695
.section .note.GNU-stack,"",@progbits
24698
Index: libffi/ChangeLog
24699
===================================================================
24700
--- a/src/libffi/ChangeLog (.../tags/gcc_4_8_3_release)
24701
+++ b/src/libffi/ChangeLog (.../branches/gcc-4_8-branch)
24703
+2014-09-11 Jakub Jelinek <jakub@redhat.com>
24705
+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
24706
+ POWERPC64 is not defined.
24707
+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
24709
2014-05-22 Release Manager
24711
* GCC 4.8.3 released.
24712
Index: libcpp/ChangeLog
24713
===================================================================
24714
--- a/src/libcpp/ChangeLog (.../tags/gcc_4_8_3_release)
24715
+++ b/src/libcpp/ChangeLog (.../branches/gcc-4_8-branch)
24717
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24719
+ Backport from mainline r215873
24720
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24722
+ * lex.c (search_line_fast): Add new version to be used for Power8
24723
+ and later targets when Altivec is enabled. Restrict the existing
24724
+ Altivec version to big-endian systems so that lvsr is not used on
24725
+ little endian, where it is deprecated. Remove LE-specific code
24726
+ from the now-BE-only version.
24728
2014-05-22 Release Manager
24730
* GCC 4.8.3 released.
24731
Index: libcpp/lex.c
24732
===================================================================
24733
--- a/src/libcpp/lex.c (.../tags/gcc_4_8_3_release)
24734
+++ b/src/libcpp/lex.c (.../branches/gcc-4_8-branch)
24735
@@ -515,9 +515,111 @@
24736
search_line_fast = impl;
24739
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
24740
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
24742
-/* A vection of the fast scanner using AltiVec vectorized byte compares. */
24743
+/* A vection of the fast scanner using AltiVec vectorized byte compares
24744
+ and VSX unaligned loads (when VSX is available). This is otherwise
24745
+ the same as the pre-GCC 5 version. */
24747
+static const uchar *
24748
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
24750
+ typedef __attribute__((altivec(vector))) unsigned char vc;
24752
+ const vc repl_nl = {
24753
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
24754
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
24756
+ const vc repl_cr = {
24757
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
24758
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
24760
+ const vc repl_bs = {
24761
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
24762
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
24764
+ const vc repl_qm = {
24765
+ '?', '?', '?', '?', '?', '?', '?', '?',
24766
+ '?', '?', '?', '?', '?', '?', '?', '?',
24768
+ const vc zero = { 0 };
24772
+ /* Main loop processing 16 bytes at a time. */
24775
+ vc m_nl, m_cr, m_bs, m_qm;
24777
+ data = *((const vc *)s);
24780
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
24781
+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
24782
+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
24783
+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
24784
+ t = (m_nl | m_cr) | (m_bs | m_qm);
24786
+ /* T now contains 0xff in bytes for which we matched one of the relevant
24787
+ characters. We want to exit the loop if any byte in T is non-zero.
24788
+ Below is the expansion of vec_any_ne(t, zero). */
24790
+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
24792
+ /* Restore s to to point to the 16 bytes we just processed. */
24796
+#define N (sizeof(vc) / sizeof(long))
24800
+ /* Statically assert that N is 2 or 4. */
24801
+ unsigned long l[(N == 2 || N == 4) ? N : -1];
24803
+ unsigned long l, i = 0;
24807
+ /* Find the first word of T that is non-zero. */
24814
+ s += sizeof(unsigned long);
24818
+ s += sizeof(unsigned long);
24823
+ s += sizeof(unsigned long);
24827
+ /* L now contains 0xff in bytes for which we matched one of the
24828
+ relevant characters. We can find the byte index by finding
24829
+ its bit index and dividing by 8. */
24830
+#ifdef __BIG_ENDIAN__
24831
+ l = __builtin_clzl(l) >> 3;
24833
+ l = __builtin_ctzl(l) >> 3;
24841
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
24843
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
24844
+ This cannot be used for little endian because vec_lvsl/lvsr are
24845
+ deprecated for little endian and the code won't work properly. */
24846
/* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
24847
so we can't compile this function without -maltivec on the command line
24848
(or implied by some other switch). */
24849
@@ -559,13 +661,8 @@
24850
beginning with all ones and shifting in zeros according to the
24851
mis-alignment. The LVSR instruction pulls the exact shift we
24852
want from the address. */
24853
-#ifdef __BIG_ENDIAN__
24854
mask = __builtin_vec_lvsr(0, s);
24855
mask = __builtin_vec_perm(zero, ones, mask);
24857
- mask = __builtin_vec_lvsl(0, s);
24858
- mask = __builtin_vec_perm(ones, zero, mask);
24862
/* While altivec loads mask addresses, we still need to align S so
24863
@@ -629,11 +726,7 @@
24864
/* L now contains 0xff in bytes for which we matched one of the
24865
relevant characters. We can find the byte index by finding
24866
its bit index and dividing by 8. */
24867
-#ifdef __BIG_ENDIAN__
24868
l = __builtin_clzl(l) >> 3;
24870
- l = __builtin_ctzl(l) >> 3;
24876
===================================================================
24877
--- a/src/. (.../tags/gcc_4_8_3_release)
24878
+++ b/src/. (.../branches/gcc-4_8-branch)
24880
Property changes on: .
24881
___________________________________________________________________
24882
Modified: svn:mergeinfo
24883
Merged /trunk:r211733,215049