1
# DP: updates from the 4.8 branch upto 20141128 (r218178).
5
cat > ${dir}LAST_UPDATED <<EOF
6
Sat Nov 29 01:59:08 CET 2014
7
Sat Nov 29 00:59:08 UTC 2014 (revision 218178)
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: libgomp/ChangeLog
16
===================================================================
17
--- a/src/libgomp/ChangeLog (.../tags/gcc_4_8_3_release)
18
+++ b/src/libgomp/ChangeLog (.../branches/gcc-4_8-branch)
20
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
22
+ Backported from mainline
23
+ 2014-11-24 Jakub Jelinek <jakub@redhat.com>
26
+ * libgomp.fortran/pr63938-1.f90: New test.
27
+ * libgomp.fortran/pr63938-2.f90: New test.
29
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
32
+ * testsuite/libgomp.c/pr61200.c: New test.
34
2014-05-22 Release Manager
37
Index: libgomp/testsuite/libgomp.fortran/pr63938-1.f90
38
===================================================================
39
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90 (.../tags/gcc_4_8_3_release)
40
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90 (.../branches/gcc-4_8-branch)
53
+!$omp end parallel do
54
+ if (x(1) .ne. 1000) call abort
55
+end program pr63938_1
56
Index: libgomp/testsuite/libgomp.fortran/pr63938-2.f90
57
===================================================================
58
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90 (.../tags/gcc_4_8_3_release)
59
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90 (.../branches/gcc-4_8-branch)
76
+!$omp end parallel do
77
+ if (x%x .ne. 1000) call abort
78
+end program pr63938_2
79
Index: libgomp/testsuite/libgomp.c/pr61200.c
80
===================================================================
81
--- a/src/libgomp/testsuite/libgomp.c/pr61200.c (.../tags/gcc_4_8_3_release)
82
+++ b/src/libgomp/testsuite/libgomp.c/pr61200.c (.../branches/gcc-4_8-branch)
84
+/* PR libgomp/61200 */
99
+ for (i = 0; i < 2; i++)
103
+ #pragma omp parallel num_threads(2)
114
+ #pragma omp task shared(var)
121
+ #pragma omp taskwait
132
+ for (i = 0; i < 2; i++)
136
+ #pragma omp task shared(var)
144
+ #pragma omp parallel num_threads(2)
154
+ #pragma omp taskwait
162
+ omp_set_nested (1);
163
+ #pragma omp parallel num_threads(2)
166
+ #pragma omp parallel num_threads(2)
171
Index: libstdc++-v3/python/libstdcxx/v6/printers.py
172
===================================================================
173
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_8_3_release)
174
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_8-branch)
176
-# Pretty-printers for libstc++.
177
+# Pretty-printers for libstdc++.
179
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
187
+### Python 2 + Python 3 compatibility code
189
+# Resources about compatibility:
191
+# * <http://pythonhosted.org/six/>: Documentation of the "six" module
193
+# FIXME: The handling of e.g. std::basic_string (at least on char)
194
+# probably needs updating to work with Python 3's new string rules.
196
+# In particular, Python 3 has a separate type (called byte) for
197
+# bytestrings, and a special b"" syntax for the byte literals; the old
198
+# str() type has been redefined to always store Unicode text.
200
+# We probably can't do much about this until this GDB PR is addressed:
201
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
203
+if sys.version_info[0] > 2:
206
+ # Python 3 folds these into the normal functions.
209
+ # Also, int subsumes long
214
+ """Compatibility mixin for iterators
216
+ Instead of writing next() methods for iterators, write
217
+ __next__() methods and use this mixin to make them work in
218
+ Python 2 as well as Python 3.
220
+ Idea stolen from the "six" documentation:
221
+ <http://pythonhosted.org/six/#six.Iterator>
225
+ return self.__next__()
227
+ # In Python 2, we still need these from itertools
228
+ from itertools import imap, izip
230
# Try to use the new-style pretty-printing if available.
234
# anything fancier here.
235
field = typ.fields()[0]
236
if not field.is_base_class:
237
- raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
238
+ raise ValueError("Cannot find type %s::%s" % (str(orig), name))
241
class SharedPointerPrinter:
243
class StdListPrinter:
247
+ class _iterator(Iterator):
248
def __init__(self, nodetype, head):
249
self.nodetype = nodetype
250
self.base = head['_M_next']
256
+ def __next__(self):
257
if self.base == self.head:
259
elt = self.base.cast(self.nodetype).dereference()
261
class StdSlistPrinter:
262
"Print a __gnu_cxx::slist"
265
+ class _iterator(Iterator):
266
def __init__(self, nodetype, head):
267
self.nodetype = nodetype
268
self.base = head['_M_head']['_M_next']
274
+ def __next__(self):
277
elt = self.base.cast(self.nodetype).dereference()
279
class StdVectorPrinter:
280
"Print a std::vector"
283
+ class _iterator(Iterator):
284
def __init__ (self, start, finish, bitvec):
292
+ def __next__(self):
294
self.count = self.count + 1
297
class StdTuplePrinter:
301
+ class _iterator(Iterator):
302
def __init__ (self, head):
305
@@ -276,13 +320,13 @@
306
# Set the actual head to the first pair.
307
self.head = self.head.cast (nodes[0].type)
308
elif len (nodes) != 0:
309
- raise ValueError, "Top of tuple tree does not consist of a single node."
310
+ raise ValueError("Top of tuple tree does not consist of a single node.")
317
+ def __next__ (self):
318
nodes = self.head.type.fields ()
319
# Check for further recursions in the inheritance tree.
323
# Check that this iteration has an expected structure.
325
- raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
326
+ raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
328
# - Left node is the next recursion parent.
329
# - Right node is the actual class contained in the tuple.
331
return self.visualizer.display_hint ()
334
-class RbtreeIterator:
335
+class RbtreeIterator(Iterator):
336
def __init__(self, rbtree):
337
self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
338
self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
341
return int (self.size)
344
+ def __next__(self):
345
if self.count == self.size:
349
"Print a std::map or std::multimap"
351
# Turn an RbtreeIterator into a pretty-print iterator.
353
+ class _iter(Iterator):
354
def __init__(self, rbiter, type):
362
+ def __next__(self):
363
if self.count % 2 == 0:
364
- n = self.rbiter.next()
365
+ n = next(self.rbiter)
366
n = n.cast(self.type).dereference()['_M_value_field']
370
"Print a std::set or std::multiset"
372
# Turn an RbtreeIterator into a pretty-print iterator.
374
+ class _iter(Iterator):
375
def __init__(self, rbiter, type):
383
- item = self.rbiter.next()
384
+ def __next__(self):
385
+ item = next(self.rbiter)
386
item = item.cast(self.type).dereference()['_M_value_field']
387
# FIXME: this is weird ... what to do?
388
# Maybe a 'set' display hint?
390
class StdDequePrinter:
394
+ class _iter(Iterator):
395
def __init__(self, node, start, end, last, buffer_size):
403
+ def __next__(self):
404
if self.p == self.last:
408
def display_hint (self):
411
-class Tr1HashtableIterator:
412
+class Tr1HashtableIterator(Iterator):
413
def __init__ (self, hash):
414
self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
415
self.node_type = find_type(hash.type, '__node_type').pointer()
421
+ def __next__ (self):
424
node = self.node.cast(self.node_type)
429
- counter = itertools.imap (self.format_count, itertools.count())
430
- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
431
+ counter = imap (self.format_count, itertools.count())
432
+ return izip (counter, Tr1HashtableIterator (self.hashtable()))
434
class Tr1UnorderedMapPrinter:
435
"Print a tr1::unordered_map"
436
@@ -688,11 +732,11 @@
440
- counter = itertools.imap (self.format_count, itertools.count())
441
+ counter = imap (self.format_count, itertools.count())
442
# Map over the hash table and flatten the result.
443
- data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
444
+ data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
445
# Zip the two iterators together.
446
- return itertools.izip (counter, data)
447
+ return izip (counter, data)
449
def display_hint (self):
452
class StdForwardListPrinter:
453
"Print a std::forward_list"
456
+ class _iterator(Iterator):
457
def __init__(self, nodetype, head):
458
self.nodetype = nodetype
459
self.base = head['_M_next']
465
+ def __next__(self):
468
elt = self.base.cast(self.nodetype).dereference()
470
# A small sanity check.
472
if not self.compiled_rx.match(name + '<>'):
473
- raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
474
+ raise ValueError('libstdc++ programming error: "%s" does not match' % name)
475
printer = RxPrinter(name, function)
476
self.subprinters.append(printer)
477
self.lookup[name] = printer
478
Index: libstdc++-v3/scripts/run_doxygen
479
===================================================================
480
--- a/src/libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release)
481
+++ b/src/libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch)
486
- # Also drop in the header file and style sheet
487
- doxygen -w latex header.tex doxygen.sty
488
+ # Grrr, Doxygen 1.8.x changed the -w latex options.
489
+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
491
+ # Also drop in the header file (maybe footer file) and style sheet
492
+ if $need_footer; then
493
+ doxygen -w latex header.tex footer.tex doxygen.sty
495
+ doxygen -w latex header.tex doxygen.sty
499
echo :: LaTeX pages begin with
500
Index: libstdc++-v3/configure.host
501
===================================================================
502
--- a/src/libstdc++-v3/configure.host (.../tags/gcc_4_8_3_release)
503
+++ b/src/libstdc++-v3/configure.host (.../branches/gcc-4_8-branch)
505
os_include_dir="os/aix"
506
atomicity_dir="os/aix"
507
atomic_word_dir="os/aix"
508
- OPT_LDFLAGS="-Wl,-G"
511
os_include_dir="os/generic"
512
Index: libstdc++-v3/doc/xml/manual/containers.xml
513
===================================================================
514
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release)
515
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch)
517
<section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
520
- Yes it is, and that's okay. This is a decision that we preserved
521
- when we imported SGI's STL implementation. The following is
522
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
523
+ In future GCC will change it to O(1) but O(N) was a decision that we
524
+ preserved when we imported SGI's STL implementation. The following is
525
quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
532
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
533
-<?dbhtml filename="vector.html"?>
537
- <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
540
- In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
541
- message to the list</link>, Daniel Kostecky announced work on an
542
- alternate form of <code>std::vector</code> that would support
543
- hints on the number of elements to be over-allocated. The design
544
- was also described, along with possible implementation choices.
547
- 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>
548
- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
551
- </section></section>
554
<!-- Sect1 02 : Associative -->
555
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
556
===================================================================
557
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release)
558
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch)
559
@@ -226,10 +226,12 @@
563
+ <?dbhtml bgcolor="#B0B0B0" ?>
564
<entry>18.8.6</entry>
565
<entry><code>nested_exception</code></entry>
568
+ <entry>Partial</entry>
569
+ <entry>Follows an earlier C++0x draft, not the final specification.
574
@@ -612,10 +614,11 @@
578
+ <?dbhtml bgcolor="#B0B0B0" ?>
579
<entry>20.6.12.4</entry>
580
<entry><code>uninitialized_fill_n</code></entry>
583
+ <entry>Partial</entry>
584
+ <entry>Returns <code>void</code>.</entry>
587
<entry>20.6.13</entry>
588
@@ -1119,10 +1122,13 @@
592
+ <?dbhtml bgcolor="#B0B0B0" ?>
594
<entry>Class template <code>basic_string</code></entry>
597
+ <entry>Partial</entry>
598
+ <entry>Non-conforming Copy-On-Write implementation.
599
+ Missing <code>getline</code> overloads for rvalue streams.
604
@@ -1190,10 +1196,11 @@
608
+ <?dbhtml bgcolor="#B0B0B0" ?>
609
<entry>22.3.3.1</entry>
610
<entry>Character classification</entry>
613
+ <entry>Partial</entry>
614
+ <entry>Missing <code>isblank</code>.</entry>
617
<entry>22.3.3.2</entry>
618
@@ -1272,16 +1279,18 @@
622
+ <?dbhtml bgcolor="#B0B0B0" ?>
623
<entry>22.4.5.1</entry>
624
<entry>Class template <code>time_get</code></entry>
627
+ <entry>Partial</entry>
628
+ <entry>Missing <code>get</code> and <code>do_get</code></entry>
631
+ <?dbhtml bgcolor="#B0B0B0" ?>
632
<entry>22.4.5.2</entry>
633
<entry>Class template <code>time_get_byname</code></entry>
636
+ <entry>Partial</entry>
637
+ <entry>Likewise</entry>
640
<entry>22.4.5.3</entry>
641
@@ -1434,8 +1443,10 @@
642
<entry>23.3.5</entry>
643
<entry>Class template <code>list</code></entry>
644
<entry>Partial</entry>
645
- <entry><code>insert</code> and <code>erase</code> members do not
646
- take <code>const_iterator</code> arguments (N2350).</entry>
648
+ <code>insert</code> and <code>erase</code> members do not
649
+ take <code>const_iterator</code> arguments (N2350).
653
<?dbhtml bgcolor="#B0B0B0" ?>
654
@@ -1650,10 +1661,11 @@
658
+ <?dbhtml bgcolor="#B0B0B0" ?>
660
<entry>Mutating sequence operations</entry>
663
+ <entry>Partial</entry>
664
+ <entry><code>rotate</code> returns <code>void</code>.</entry>
668
@@ -2060,10 +2072,13 @@
672
+ <?dbhtml bgcolor="#B0B0B0" ?>
674
<entry>C Library</entry>
677
+ <entry>Partial</entry>
678
+ <entry><code><ctgmath></code> doesn't include
679
+ <code><ccomplex></code>
684
@@ -2143,6 +2158,7 @@
685
Missing move and swap operations on <code>basic_ios</code>.
686
Missing <code>io_errc</code> and <code>iostream_category</code>.
687
<code>ios_base::failure</code> is not derived from <code>system_error</code>.
688
+ Missing <code>ios_base::hexfloat</code>.
692
Index: libstdc++-v3/doc/html/index.html
693
===================================================================
694
--- a/src/libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release)
695
+++ b/src/libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch)
697
</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.
700
-</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.
701
+</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.
704
</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.
707
</a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
708
<acronym class="acronym">GNU</acronym> General Public License version 3
709
- </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>
710
\ No newline at end of file
711
+ </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>
712
Index: libstdc++-v3/doc/html/manual/status.html
713
===================================================================
714
--- a/src/libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release)
715
+++ b/src/libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch)
717
<code class="code">set_new_handler</code> is not thread-safe.
718
</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>.
719
<code class="code">set_terminate</code> is not thread-safe.
720
- </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">
721
+ </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.
722
+ </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">
723
<span class="emphasis"><em>19</em></span>
724
</td><td colspan="3" align="left">
725
<span class="emphasis"><em>Diagnostics</em></span>
727
<span class="emphasis"><em>20</em></span>
728
</td><td colspan="3" align="left">
729
<span class="emphasis"><em>General utilities</em></span>
730
- </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">
731
+ </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">
734
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
735
@@ -187,14 +188,16 @@
736
<span class="emphasis"><em>21</em></span>
737
</td><td colspan="3" align="left">
738
<span class="emphasis"><em>Strings</em></span>
739
- </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.
740
+ </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.
741
+ Missing <code class="code">getline</code> overloads for rvalue streams.
742
+ </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.
743
Missing <code class="filename"><cuchar></code>
744
</td></tr><tr><td align="left">
745
<span class="emphasis"><em>22</em></span>
746
</td><td colspan="3" align="left">
747
<span class="emphasis"><em>Localization</em></span>
748
- </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
749
- <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">
750
+ </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
751
+ <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">
752
<span class="emphasis"><em>23</em></span>
753
</td><td colspan="3" align="left">
754
<span class="emphasis"><em>Containers</em></span>
756
</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>
757
meet the requirements
758
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
759
- 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
760
- 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
761
+ 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.
762
+ <code class="code">insert</code> and <code class="code">erase</code> members do not
763
+ take <code class="code">const_iterator</code> arguments (N2350).
764
+ </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
765
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
766
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">
767
<span class="emphasis"><em>24</em></span>
768
@@ -212,11 +217,13 @@
769
<span class="emphasis"><em>25</em></span>
770
</td><td colspan="3" align="left">
771
<span class="emphasis"><em>Algorithms</em></span>
772
- </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">
773
+ </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">
774
<span class="emphasis"><em>26</em></span>
775
</td><td colspan="3" align="left">
776
<span class="emphasis"><em>Numerics</em></span>
777
- </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">
778
+ </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
779
+ <code class="code"><ccomplex></code>
780
+ </td></tr><tr><td align="left">
781
<span class="emphasis"><em>27</em></span>
782
</td><td colspan="3" align="left">
783
<span class="emphasis"><em>Input/output library</em></span>
785
Missing move and swap operations on <code class="code">basic_ios</code>.
786
Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
787
<code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
788
+ Missing <code class="code">ios_base::hexfloat</code>.
789
</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">
790
Missing move and swap operations
791
Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
792
Index: libstdc++-v3/doc/html/manual/abi.html
793
===================================================================
794
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
795
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
797
definitions, where the version definition is the maximum for a
798
particular release. Labels are cumulative. If a particular release
799
is not listed, it has the same version labels as the preceding
800
- 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>
801
+ 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>
802
Release versioning on the libstdc++.so binary, implemented in
803
the same way as the libgcc_s.so binary above. Listed is the
804
filename: <code class="constant">DT_SONAME</code> can be deduced from
806
has the same filename and <code class="constant">DT_SONAME</code> as the
808
</p><p>It is versioned as follows:
809
- </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>
810
+ </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>
811
Note 1: Error should be libstdc++.so.3.0.3.
813
Note 2: Not strictly required.
815
GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
816
release.) If a particular release is not listed, it has the same
817
version labels as the preceding release.
818
- </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,
819
+ </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,
820
__GXX_ABI_VERSION. This macro is defined as the version of the
821
compiler v3 ABI, with g++ 3.0 being version 100. This macro will
822
be automatically defined whenever g++ is used (the curious can
823
Index: libstdc++-v3/doc/html/manual/std_contents.html
824
===================================================================
825
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release)
826
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch)
828
</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.
831
-</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.
832
+</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.
835
</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.
837
</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.
840
-</td></tr></table></div></body></html>
841
\ No newline at end of file
842
+</td></tr></table></div></body></html>
843
Index: libstdc++-v3/doc/html/manual/containers.html
844
===================================================================
845
--- a/src/libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release)
846
+++ b/src/libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch)
848
</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.
850
<a id="idm269999493408" class="indexterm"></a>
851
-</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>
852
- Yes it is, and that's okay. This is a decision that we preserved
853
- when we imported SGI's STL implementation. The following is
854
+</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>
855
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
856
+ In future GCC will change it to O(1) but O(N) was a decision that we
857
+ preserved when we imported SGI's STL implementation. The following is
858
quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
859
</p><div class="blockquote"><blockquote class="blockquote"><p>
860
The size() member function, for list and slist, takes time
862
</p><pre class="programlisting">
865
- </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>
866
- </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>
867
- In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
868
- message to the list</a>, Daniel Kostecky announced work on an
869
- alternate form of <code class="code">std::vector</code> that would support
870
- hints on the number of elements to be over-allocated. The design
871
- was also described, along with possible implementation choices.
873
- 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>
874
- and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
875
- </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>
876
\ No newline at end of file
877
+ </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>
878
Index: libstdc++-v3/doc/html/manual/index.html
879
===================================================================
880
--- a/src/libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release)
881
+++ b/src/libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch)
883
</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.
886
-</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.
887
+</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.
890
</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.
892
</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.
895
-</td></tr></table></div></body></html>
896
\ No newline at end of file
897
+</td></tr></table></div></body></html>
898
Index: libstdc++-v3/include/std/future
899
===================================================================
900
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
901
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
902
@@ -351,12 +351,14 @@
904
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
906
- bool __set = __ignore_failure;
907
+ bool __set = false;
908
// all calls to this function are serialized,
909
// side-effects of invoking __res only happen once
910
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
914
+ _M_cond.notify_all();
915
+ else if (!__ignore_failure)
916
__throw_future_error(int(future_errc::promise_already_satisfied));
920
lock_guard<mutex> __lock(_M_mutex);
921
_M_result.swap(__res);
923
- _M_cond.notify_all();
927
@@ -983,22 +984,25 @@
929
set_value(const _Res& __r)
931
+ auto __future = _M_future;
932
auto __setter = _State::__setter(this, __r);
933
- _M_future->_M_set_result(std::move(__setter));
934
+ __future->_M_set_result(std::move(__setter));
938
set_value(_Res&& __r)
940
+ auto __future = _M_future;
941
auto __setter = _State::__setter(this, std::move(__r));
942
- _M_future->_M_set_result(std::move(__setter));
943
+ __future->_M_set_result(std::move(__setter));
947
set_exception(exception_ptr __p)
949
+ auto __future = _M_future;
950
auto __setter = _State::__setter(__p, this);
951
- _M_future->_M_set_result(std::move(__setter));
952
+ __future->_M_set_result(std::move(__setter));
956
@@ -1081,15 +1085,17 @@
960
+ auto __future = _M_future;
961
auto __setter = _State::__setter(this, __r);
962
- _M_future->_M_set_result(std::move(__setter));
963
+ __future->_M_set_result(std::move(__setter));
967
set_exception(exception_ptr __p)
969
+ auto __future = _M_future;
970
auto __setter = _State::__setter(__p, this);
971
- _M_future->_M_set_result(std::move(__setter));
972
+ __future->_M_set_result(std::move(__setter));
976
@@ -1166,8 +1172,9 @@
978
set_exception(exception_ptr __p)
980
+ auto __future = _M_future;
981
auto __setter = _State::__setter(__p, this);
982
- _M_future->_M_set_result(std::move(__setter));
983
+ __future->_M_set_result(std::move(__setter));
987
@@ -1193,8 +1200,9 @@
989
promise<void>::set_value()
991
+ auto __future = _M_future;
992
auto __setter = _State::__setter(this);
993
- _M_future->_M_set_result(std::move(__setter));
994
+ __future->_M_set_result(std::move(__setter));
998
Index: libstdc++-v3/include/ext/rope
999
===================================================================
1000
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
1001
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
1002
@@ -1544,7 +1544,7 @@
1003
typedef typename _Base::allocator_type allocator_type;
1004
using _Base::_M_tree_ptr;
1005
using _Base::get_allocator;
1006
- using _Base::_M_get_allocator;
1007
+ using _Base::_M_get_allocator;
1008
typedef __GC_CONST _CharT* _Cstrptr;
1010
static _CharT _S_empty_c_str[1];
1011
@@ -1876,8 +1876,9 @@
1012
const allocator_type& __a = allocator_type())
1015
- this->_M_tree_ptr = (0 == __len) ?
1016
- 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
1017
+ this->_M_tree_ptr = (0 == __len)
1019
+ : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
1022
rope(const rope& __x, const allocator_type& __a = allocator_type())
1023
Index: libstdc++-v3/include/bits/stl_tree.h
1024
===================================================================
1025
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
1026
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
1027
@@ -510,11 +510,11 @@
1031
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
1032
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
1036
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1037
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1039
static const_reference
1040
_S_value(_Const_Link_type __x)
1041
Index: libstdc++-v3/include/tr2/bool_set
1042
===================================================================
1043
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
1044
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
1048
* See N2136, Bool_set: multi-valued logic
1049
- * by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
1050
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
1052
* The implicit conversion to bool is slippery! I may use the new
1053
* explicit conversion. This has been specialized in the language
1054
Index: libstdc++-v3/ChangeLog
1055
===================================================================
1056
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
1057
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
1059
+2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
1061
+ Backport from mainline
1062
+ 2014-09-10 Tony Wang <tony.wang@arm.com>
1065
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
1066
+ Return with CONTINUE_UNWINDING when the state pattern
1067
+ contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1069
+2014-11-05 David Edelsohn <dje.gcc@gmail.com>
1071
+ Backported from mainline.
1072
+ 2014-10-30 David Edelsohn <dje.gcc@gmail.com>
1074
+ * configure.host (aix4.3+, 5+): Do not use -G in link command.
1076
+2014-10-15 Jason Merrill <jason@redhat.com>
1078
+ * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
1079
+ dynamic_cast more gracefully.
1081
+2014-10-14 Kai Tietz <ktietz@redhat.com>
1083
+ PR libstdc++/57440
1084
+ * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
1085
+ Define to avoid leak.
1086
+ * config/os/mingw32-w64/os_defines.h: Likewise.
1088
+2014-10-03 Jonathan Wakely <jwakely@redhat.com>
1090
+ PR libstdc++/63449
1091
+ * doc/xml/manual/containers.xml: Remove outdated section. Update
1093
+ * doc/html/*: Regenerate.
1095
+2014-10-01 Jonathan Wakely <jwakely@redhat.com>
1097
+ * doc/xml/manual/status_cxx2011.xml: Corrections.
1098
+ * doc/html/manual/status.html: Regenerate.
1100
+2014-08-28 Samuel Bronson <naesten@gmail.com>
1102
+ Backport r212453 from trunk
1103
+ 2014-07-11 Samuel Bronson <naesten@gmail.com>
1104
+ Matthias Klose <doko@ubuntu.com>
1106
+ PR libstdc++/58962
1107
+ * python/libstdcxx/v6/printers.py: Port to Python 2+3
1108
+ (imap): New compat function.
1110
+ (Iterator): New mixin to allow writing iterators in Python 3 style
1111
+ regardless of which version we're running on.
1112
+ [Python3] (long) New compat alias for "int".
1113
+ * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
1115
+ Backport r210625 from trunk
1116
+ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
1118
+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
1120
+2014-08-26 John David Anglin <danglin@gcc.gnu.org>
1122
+ * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1124
+2014-08-26 Jonathan Wakely <jwakely@redhat.com>
1126
+ * doc/xml/manual/status_cxx2011.xml: Correct status table.
1127
+ * doc/html/manual/*: Regenerate.
1129
+2014-08-04 Jonathan Wakely <jwakely@redhat.com>
1131
+ Backported from mainline
1132
+ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
1134
+ PR libstdc++/61946
1135
+ * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
1136
+ const allocator_type&)): Pass non-const allocator to
1137
+ _S_new_RopeFunction.
1138
+ * testsuite/ext/rope/61946.cc: New.
1140
+2014-08-04 Zifei Tong <zifeitong@gmail.com>
1142
+ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
1143
+ _GLIBCXX_ prefix to macro.
1145
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
1147
+ Backport from mainline
1148
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
1150
+ PR libstdc++/60734
1151
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
1153
+ Backport from mainline
1154
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
1156
+ PR libstdc++/60966
1157
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
1158
+ Signal condition variable after call_once returns.
1159
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
1160
+ (promise::set_value, promise::set_exception): Increment the reference
1161
+ count on the shared state until the function returns.
1162
+ * testsuite/30_threads/promise/60966.cc: New.
1164
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
1166
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
1167
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
1169
2014-05-22 Release Manager
1171
* GCC 4.8.3 released.
1172
Index: libstdc++-v3/libsupc++/atexit_thread.cc
1173
===================================================================
1174
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release)
1175
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch)
1178
#include "bits/gthr.h"
1180
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
1181
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
1183
extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
1184
void *arg, void *d);
1186
return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
1189
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1190
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1193
// One element in a singly-linked stack of cleanups.
1198
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1199
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1200
Index: libstdc++-v3/libsupc++/eh_personality.cc
1201
===================================================================
1202
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc (.../tags/gcc_4_8_3_release)
1203
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc (.../branches/gcc-4_8-branch)
1204
@@ -378,6 +378,12 @@
1205
switch (state & _US_ACTION_MASK)
1207
case _US_VIRTUAL_UNWIND_FRAME:
1208
+ // If the unwind state pattern is
1209
+ // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1210
+ // then we don't need to search for any handler as it is not a real
1211
+ // exception. Just unwind the stack.
1212
+ if (state & _US_FORCE_UNWIND)
1213
+ CONTINUE_UNWINDING;
1214
actions = _UA_SEARCH_PHASE;
1217
Index: libstdc++-v3/libsupc++/dyncast.cc
1218
===================================================================
1219
--- a/src/libstdc++-v3/libsupc++/dyncast.cc (.../tags/gcc_4_8_3_release)
1220
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc (.../branches/gcc-4_8-branch)
1222
adjust_pointer <void> (src_ptr, prefix->whole_object);
1223
const __class_type_info *whole_type = prefix->whole_type;
1224
__class_type_info::__dyncast_result result;
1226
+ // If the whole object vptr doesn't refer to the whole object type, we're
1227
+ // in the middle of constructing a primary base, and src is a separate
1228
+ // base. This has undefined behavior and we can't find anything outside
1229
+ // of the base we're actually constructing, so fail now rather than
1230
+ // segfault later trying to use a vbase offset that doesn't exist.
1231
+ const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
1232
+ const vtable_prefix *whole_prefix =
1233
+ adjust_pointer <vtable_prefix> (whole_vtable,
1234
+ -offsetof (vtable_prefix, origin));
1235
+ if (whole_prefix->whole_type != whole_type)
1238
whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
1239
dst_type, whole_ptr, src_type, src_ptr, result);
1240
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1241
===================================================================
1242
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
1243
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
1245
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1246
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1247
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1248
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1249
+// { dg-require-cstdint "" }
1250
+// { dg-require-gthreads "" }
1251
+// { dg-require-atomic-builtins "" }
1253
+// Copyright (C) 2014 Free Software Foundation, Inc.
1255
+// This file is part of the GNU ISO C++ Library. This library is free
1256
+// software; you can redistribute it and/or modify it under the
1257
+// terms of the GNU General Public License as published by the
1258
+// Free Software Foundation; either version 3, or (at your option)
1259
+// any later version.
1261
+// This library is distributed in the hope that it will be useful,
1262
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1263
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1264
+// GNU General Public License for more details.
1266
+// You should have received a copy of the GNU General Public License along
1267
+// with this library; see the file COPYING3. If not see
1268
+// <http://www.gnu.org/licenses/>.
1271
+// This test hangs if std::promise::~promise() destroys the
1272
+// shared state before std::promise::set_value() finishes using it.
1278
+const int THREADS = 10;
1280
+void run_task(std::promise<void>* pr)
1282
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
1288
+ std::vector<std::promise<void>*> tasks(THREADS);
1289
+ std::vector<std::thread> threads(THREADS);
1290
+ std::vector<std::future<void>> futures(THREADS);
1292
+ for (int i = 0; i < THREADS; ++i)
1294
+ std::promise<void>* task = new std::promise<void>;
1296
+ futures[i] = task->get_future();
1297
+ threads[i] = std::thread(run_task, task);
1300
+ for (int i = 0; i < THREADS; ++i)
1302
+ // the temporary future releases the state as soon as wait() returns
1303
+ std::future<void>(std::move(futures[i])).wait();
1304
+ // state is ready, should now be safe to delete promise, so it
1305
+ // releases the shared state too
1309
+ for (auto& t : threads)
1312
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1313
===================================================================
1314
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release)
1315
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch)
1317
+// Copyright (C) 2014 Free Software Foundation, Inc.
1319
+// This file is part of the GNU ISO C++ Library. This library is free
1320
+// software; you can redistribute it and/or modify it under the
1321
+// terms of the GNU General Public License as published by the
1322
+// Free Software Foundation; either version 3, or (at your option)
1323
+// any later version.
1325
+// This library is distributed in the hope that it will be useful,
1326
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1327
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1328
+// GNU General Public License for more details.
1330
+// You should have received a copy of the GNU General Public License along
1331
+// with this library; see the file COPYING3. If not see
1332
+// <http://www.gnu.org/licenses/>.
1334
+// { dg-do compile }
1336
+#include <ext/rope>
1338
+struct empty_char_prod : __gnu_cxx::char_producer<char>
1340
+ virtual void operator()(size_t, size_t, char*) {}
1345
+ empty_char_prod* ecp = new empty_char_prod;
1346
+ __gnu_cxx::crope excrope( ecp, 10L, true );
1348
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1349
===================================================================
1350
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release)
1351
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch)
1356
- set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1357
+ set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1359
if {!$do_whatis_tests} {
1360
send_log "skipping 'whatis' tests - gdb too old"
1362
# but not earlier versions.
1363
# Return 1 if the version is ok, 0 otherwise.
1364
proc gdb_version_check {} {
1365
- return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1366
+ return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1367
"<built-in function lookup_global_symbol>"]
1369
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
1370
===================================================================
1371
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../tags/gcc_4_8_3_release)
1372
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../branches/gcc-4_8-branch)
1374
#define _GLIBCXX_LLP64 1
1377
+// See libstdc++/59807
1378
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1381
Index: libstdc++-v3/config/os/mingw32/os_defines.h
1382
===================================================================
1383
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../tags/gcc_4_8_3_release)
1384
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../branches/gcc-4_8-branch)
1386
#define _GLIBCXX_LLP64 1
1389
+// See libstdc++/59807
1390
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1393
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1394
===================================================================
1395
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release)
1396
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch)
1398
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1399
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1400
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1401
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1402
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1403
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1404
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1406
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1407
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1408
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1409
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1410
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1411
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1412
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1413
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1414
@@ -1204,6 +1207,7 @@
1415
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1416
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1417
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1418
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1419
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1420
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1421
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1422
@@ -1471,6 +1475,11 @@
1423
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1424
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1425
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1426
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1427
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1428
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1429
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1430
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1431
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1432
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1433
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1434
@@ -1900,6 +1909,8 @@
1435
FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1436
FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1437
FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1438
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1439
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1440
FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1441
FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1442
FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1443
@@ -2436,6 +2447,7 @@
1444
FUNC:__cxa_guard_release@@CXXABI_1.3
1445
FUNC:__cxa_pure_virtual@@CXXABI_1.3
1446
FUNC:__cxa_rethrow@@CXXABI_1.3
1447
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1448
FUNC:__cxa_throw@@CXXABI_1.3
1449
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1450
FUNC:__cxa_vec_cctor@@CXXABI_1.3
1451
@@ -2482,6 +2494,7 @@
1452
OBJECT:0:CXXABI_1.3.4
1453
OBJECT:0:CXXABI_1.3.5
1454
OBJECT:0:CXXABI_1.3.6
1455
+OBJECT:0:CXXABI_1.3.7
1456
OBJECT:0:CXXABI_TM_1
1457
OBJECT:0:GLIBCXX_3.4
1458
OBJECT:0:GLIBCXX_3.4.1
1459
@@ -2493,6 +2506,8 @@
1460
OBJECT:0:GLIBCXX_3.4.15
1461
OBJECT:0:GLIBCXX_3.4.16
1462
OBJECT:0:GLIBCXX_3.4.17
1463
+OBJECT:0:GLIBCXX_3.4.18
1464
+OBJECT:0:GLIBCXX_3.4.19
1465
OBJECT:0:GLIBCXX_3.4.2
1466
OBJECT:0:GLIBCXX_3.4.3
1467
OBJECT:0:GLIBCXX_3.4.4
1468
@@ -2992,6 +3007,8 @@
1469
OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1470
OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1471
OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1472
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1473
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1474
OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1475
OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1476
OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1478
===================================================================
1479
--- a/src/configure.ac (.../tags/gcc_4_8_3_release)
1480
+++ b/src/configure.ac (.../branches/gcc-4_8-branch)
1481
@@ -1154,6 +1154,9 @@
1483
host_makefile_frag="config/mh-mingw"
1486
+ host_makefile_frag="config/mh-alpha-linux"
1489
host_makefile_frag="config/mh-pa-hpux10"
1492
===================================================================
1493
--- a/src/ChangeLog (.../tags/gcc_4_8_3_release)
1494
+++ b/src/ChangeLog (.../branches/gcc-4_8-branch)
1496
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1499
+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1500
+ * configure: Regenerate.
1502
2014-05-22 Release Manager
1504
* GCC 4.8.3 released.
1505
Index: contrib/ChangeLog
1506
===================================================================
1507
--- a/src/contrib/ChangeLog (.../tags/gcc_4_8_3_release)
1508
+++ b/src/contrib/ChangeLog (.../branches/gcc-4_8-branch)
1510
+2014-07-07 Richard Biener <rguenther@suse.de>
1512
+ * gennews: Use gcc-3.0/index.html.
1514
2014-05-22 Release Manager
1516
* GCC 4.8.3 released.
1517
Index: contrib/gennews
1518
===================================================================
1519
--- a/src/contrib/gennews (.../tags/gcc_4_8_3_release)
1520
+++ b/src/contrib/gennews (.../branches/gcc-4_8-branch)
1522
gcc-3.3/index.html gcc-3.3/changes.html
1523
gcc-3.2/index.html gcc-3.2/changes.html
1524
gcc-3.1/index.html gcc-3.1/changes.html
1525
- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1526
+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1527
gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
1528
egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
1529
egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
1530
Index: config/mh-alpha-linux
1531
===================================================================
1532
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
1533
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
1535
+# Prevent GPREL16 relocation truncation
1536
+LDFLAGS += -Wl,--no-relax
1537
+BOOT_LDFLAGS += -Wl,--no-relax
1538
Index: config/ChangeLog
1539
===================================================================
1540
--- a/src/config/ChangeLog (.../tags/gcc_4_8_3_release)
1541
+++ b/src/config/ChangeLog (.../branches/gcc-4_8-branch)
1543
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1546
+ * mh-alpha-linux: New file.
1548
2014-05-22 Release Manager
1550
* GCC 4.8.3 released.
1551
Index: libjava/classpath
1552
===================================================================
1553
--- a/src/libjava/classpath (.../tags/gcc_4_8_3_release)
1554
+++ b/src/libjava/classpath (.../branches/gcc-4_8-branch)
1556
Property changes on: libjava/classpath
1557
___________________________________________________________________
1558
Modified: svn:mergeinfo
1559
Merged /trunk/libjava/classpath:r211733,215049
1561
===================================================================
1562
--- a/src/configure (.../tags/gcc_4_8_3_release)
1563
+++ b/src/configure (.../branches/gcc-4_8-branch)
1564
@@ -3834,6 +3834,9 @@
1566
host_makefile_frag="config/mh-mingw"
1569
+ host_makefile_frag="config/mh-alpha-linux"
1572
host_makefile_frag="config/mh-pa-hpux10"
1574
Index: libgcc/ChangeLog
1575
===================================================================
1576
--- a/src/libgcc/ChangeLog (.../tags/gcc_4_8_3_release)
1577
+++ b/src/libgcc/ChangeLog (.../branches/gcc-4_8-branch)
1579
+2014-10-26 John David Anglin <danglin@gcc.gnu.org>
1581
+ * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
1582
+ (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
1583
+ memory read accesses are ok.
1585
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
1587
+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
1588
+ bits not set bits as indicating trapping exceptions.
1590
2014-05-22 Release Manager
1592
* GCC 4.8.3 released.
1593
Index: libgcc/config/i386/sfp-machine.h
1594
===================================================================
1595
--- a/src/libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release)
1596
+++ b/src/libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch)
1598
__sfp_handle_exceptions (_fex); \
1601
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1602
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
1604
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
1606
Index: libgcc/config/pa/linux-unwind.h
1607
===================================================================
1608
--- a/src/libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release)
1609
+++ b/src/libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch)
1612
#include <sys/ucontext.h>
1614
+/* Return TRUE if read access to *P is allowed. */
1617
+pa32_read_access_ok (void *p)
1621
+ __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
1625
/* Unfortunately, because of various bugs and changes to the kernel,
1626
we have several cases to deal with.
1629
tell us how to locate the sigcontext structure.
1631
Note that with a 2.4 64-bit kernel, the signal context is not properly
1632
- passed back to userspace so the unwind will not work correctly. */
1633
+ passed back to userspace so the unwind will not work correctly.
1635
+ There is also a bug in various glibc versions. The (CONTEXT)->ra
1636
+ for the outermost frame is not marked as undefined, so we need to
1637
+ check whether read access is allowed for all the accesses used in
1638
+ searching for the signal trampoline. */
1640
#define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
1642
static _Unwind_Reason_Code
1644
e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
1647
- if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
1648
+ if (pa32_read_access_ok (pc)
1649
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1651
- else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
1652
+ else if (pa32_read_access_ok (&pc[4])
1653
+ && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
1658
- else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
1659
+ else if (pa32_read_access_ok (&pc[5])
1660
+ && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
1664
@@ -96,13 +115,16 @@
1665
word boundary and we can then determine the frame offset. */
1666
sp = (unsigned long)context->ra;
1667
pc = (unsigned int *)sp;
1668
- if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
1670
+ && pa32_read_access_ok (pc)
1671
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
1674
return _URC_END_OF_STACK;
1677
- if (pc[1] != 0x3414015a
1678
+ if (!pa32_read_access_ok (&pc[3])
1679
+ || pc[1] != 0x3414015a
1680
|| pc[2] != 0xe4008200
1681
|| pc[3] != 0x08000240)
1682
return _URC_END_OF_STACK;
1683
Index: gcc/tree-ssa-tail-merge.c
1684
===================================================================
1685
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release)
1686
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
1688
def_operand_p def_p;
1690
if (gimple_has_side_effects (stmt)
1691
- || gimple_vdef (stmt) != NULL_TREE)
1692
+ || gimple_vdef (stmt) != NULL_TREE
1693
+ || gimple_vuse (stmt) != NULL_TREE)
1696
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
1697
@@ -1060,6 +1061,24 @@
1701
+/* Return true if gimple operands T1 and T2 have the same value. */
1704
+gimple_operand_equal_value_p (tree t1, tree t2)
1709
+ if (t1 == NULL_TREE
1710
+ || t2 == NULL_TREE)
1713
+ if (operand_equal_p (t1, t2, 0))
1716
+ return gvn_uses_equal (t1, t2);
1719
/* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
1720
gimple_bb (s2) are members of SAME_SUCC. */
1722
@@ -1122,11 +1141,13 @@
1723
lhs2 = gimple_get_lhs (s2);
1724
if (TREE_CODE (lhs1) != SSA_NAME
1725
&& TREE_CODE (lhs2) != SSA_NAME)
1726
- return (vn_valueize (gimple_vdef (s1))
1727
- == vn_valueize (gimple_vdef (s2)));
1728
+ return (operand_equal_p (lhs1, lhs2, 0)
1729
+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
1730
+ gimple_assign_rhs1 (s2)));
1731
else if (TREE_CODE (lhs1) == SSA_NAME
1732
&& TREE_CODE (lhs2) == SSA_NAME)
1733
- return vn_valueize (lhs1) == vn_valueize (lhs2);
1734
+ return operand_equal_p (gimple_assign_rhs1 (s1),
1735
+ gimple_assign_rhs1 (s2), 0);
1739
Index: gcc/DATESTAMP
1740
===================================================================
1741
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
1742
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
1746
Index: gcc/tree-ssa-strlen.c
1747
===================================================================
1748
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
1749
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
1750
@@ -1777,7 +1777,7 @@
1754
- else if (is_gimple_assign (stmt))
1755
+ else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
1757
tree lhs = gimple_assign_lhs (stmt);
1760
===================================================================
1761
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
1762
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
1764
else if (!opt_for_fn (node->symbol.decl, optimize)
1765
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
1766
reason = "non-optimized function";
1767
+ else if (node->tm_clone)
1768
+ reason = "transactional memory clone";
1770
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
1771
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
1772
@@ -2902,6 +2904,11 @@
1773
intersect_with_agg_replacements (cs->caller, src_idx,
1784
@@ -2917,6 +2924,11 @@
1786
intersect_with_plats (src_plats, &inter, 0);
1795
else if (jfunc->type == IPA_JF_ANCESTOR
1796
@@ -3000,7 +3012,8 @@
1797
vec<cgraph_edge_p> callers)
1799
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
1800
- struct ipa_agg_replacement_value *res = NULL;
1801
+ struct ipa_agg_replacement_value *res;
1802
+ struct ipa_agg_replacement_value **tail = &res;
1803
struct cgraph_edge *cs;
1804
int i, j, count = ipa_get_param_count (dest_info);
1806
@@ -3044,8 +3057,8 @@
1807
v->offset = item->offset;
1808
v->value = item->value;
1809
v->by_ref = plats->aggs_by_ref;
1817
@@ -3052,6 +3065,7 @@
1818
if (inter.exists ())
1825
@@ -3060,7 +3074,8 @@
1826
static struct ipa_agg_replacement_value *
1827
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
1829
- struct ipa_agg_replacement_value *res = NULL;
1830
+ struct ipa_agg_replacement_value *res;
1831
+ struct ipa_agg_replacement_value **tail = &res;
1832
struct ipa_agg_jump_function *aggjf;
1833
struct ipa_agg_jf_item *item;
1835
@@ -3074,9 +3089,10 @@
1836
v->offset = item->offset;
1837
v->value = item->value;
1838
v->by_ref = aggjf->by_ref;
1848
Index: gcc/configure
1849
===================================================================
1850
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
1851
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
1853
enable_gnu_indirect_function
1854
enable_initfini_array
1856
+enable_fix_cortex_a53_835769
1857
enable_gnu_unique_object
1858
enable_linker_build_id
1859
with_long_double_128
1860
@@ -1619,6 +1620,14 @@
1862
--enable-initfini-array use .init_array/.fini_array sections
1863
--enable-comdat enable COMDAT group support
1865
+ --enable-fix-cortex-a53-835769
1866
+ enable workaround for AArch64 Cortex-A53 erratum
1868
+ --disable-fix-cortex-a53-835769
1869
+ disable workaround for AArch64 Cortex-A53 erratum
1872
--enable-gnu-unique-object
1873
enable the use of the @gnu_unique_object ELF
1874
extension on glibc systems
1875
@@ -17838,7 +17847,7 @@
1876
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1877
lt_status=$lt_dlunknown
1878
cat > conftest.$ac_ext <<_LT_EOF
1879
-#line 17841 "configure"
1880
+#line 17850 "configure"
1881
#include "confdefs.h"
1884
@@ -17944,7 +17953,7 @@
1885
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1886
lt_status=$lt_dlunknown
1887
cat > conftest.$ac_ext <<_LT_EOF
1888
-#line 17947 "configure"
1889
+#line 17956 "configure"
1890
#include "confdefs.h"
1893
@@ -23796,6 +23805,28 @@
1894
$as_echo "$gcc_cv_lto_plugin" >&6; }
1899
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
1900
+ # Check whether --enable-fix-cortex-a53-835769 was given.
1901
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
1902
+ enableval=$enable_fix_cortex_a53_835769;
1903
+ case $enableval in
1905
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
1910
+ as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
1911
+ Valid choices are 'yes' and 'no'." "$LINENO" 5
1919
# All TARGET_ABI_OSF targets.
1920
alpha*-*-linux* | alpha*-*-*bsd*)
1921
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
1922
Index: gcc/fold-const.c
1923
===================================================================
1924
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_3_release)
1925
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
1926
@@ -8929,7 +8929,8 @@
1927
/* If the constant operation overflowed this can be
1928
simplified as a comparison against INT_MAX/INT_MIN. */
1929
if (TREE_CODE (lhs) == INTEGER_CST
1930
- && TREE_OVERFLOW (lhs))
1931
+ && TREE_OVERFLOW (lhs)
1932
+ && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
1934
int const1_sgn = tree_int_cst_sgn (const1);
1935
enum tree_code code2 = code;
1936
@@ -9213,7 +9214,7 @@
1937
/* Transform comparisons of the form X +- C1 CMP Y +- C2 to
1938
X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
1939
the resulting offset is smaller in absolute value than the
1941
+ original one and has the same sign. */
1942
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
1943
&& (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
1944
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
1945
@@ -9232,19 +9233,20 @@
1948
/* Put the constant on the side where it doesn't overflow and is
1949
- of lower absolute value than before. */
1950
+ of lower absolute value and of same sign than before. */
1951
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1952
? MINUS_EXPR : PLUS_EXPR,
1954
if (!TREE_OVERFLOW (cst)
1955
- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
1956
+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
1957
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
1959
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1960
return fold_build2_loc (loc, code, type,
1962
- fold_build2_loc (loc,
1963
- TREE_CODE (arg1), TREE_TYPE (arg1),
1966
+ fold_build2_loc (loc, TREE_CODE (arg1),
1971
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
1972
@@ -9251,13 +9253,15 @@
1973
? MINUS_EXPR : PLUS_EXPR,
1975
if (!TREE_OVERFLOW (cst)
1976
- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
1977
+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
1978
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
1980
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
1981
return fold_build2_loc (loc, code, type,
1982
- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
1985
+ fold_build2_loc (loc, TREE_CODE (arg0),
1992
@@ -11218,7 +11222,6 @@
1994
double_int c1, c2, c3, msk;
1995
int width = TYPE_PRECISION (type), w;
1996
- bool try_simplify = true;
1998
c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
1999
c2 = tree_to_double_int (arg1);
2000
@@ -11255,20 +11258,7 @@
2004
- /* If X is a tree of the form (Y * K1) & K2, this might conflict
2005
- with that optimization from the BIT_AND_EXPR optimizations.
2006
- This could end up in an infinite recursion. */
2007
- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
2008
- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
2011
- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
2012
- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
2014
- try_simplify = (masked != c1);
2017
- if (try_simplify && c3 != c1)
2019
return fold_build2_loc (loc, BIT_IOR_EXPR, type,
2020
fold_build2_loc (loc, BIT_AND_EXPR, type,
2021
TREE_OPERAND (arg0, 0),
2022
@@ -11658,16 +11648,25 @@
2023
&& TREE_CODE (arg0) == MULT_EXPR
2024
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
2026
+ double_int darg1 = tree_to_double_int (arg1);
2028
- = mask_with_tz (type, tree_to_double_int (arg1),
2029
+ = mask_with_tz (type, darg1,
2030
tree_to_double_int (TREE_OPERAND (arg0, 1)));
2032
if (masked.is_zero ())
2033
return omit_two_operands_loc (loc, type, build_zero_cst (type),
2035
- else if (masked != tree_to_double_int (arg1))
2036
- return fold_build2_loc (loc, code, type, op0,
2037
- double_int_to_tree (type, masked));
2038
+ else if (masked != darg1)
2040
+ /* Avoid the transform if arg1 is a mask of some
2041
+ mode which allows further optimizations. */
2042
+ int pop = darg1.popcount ();
2043
+ if (!(pop >= BITS_PER_UNIT
2044
+ && exact_log2 (pop) != -1
2045
+ && double_int::mask (pop) == darg1))
2046
+ return fold_build2_loc (loc, code, type, op0,
2047
+ double_int_to_tree (type, masked));
2051
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
2052
@@ -13083,6 +13082,8 @@
2053
tree arg01 = TREE_OPERAND (arg0, 1);
2054
tree itype = TREE_TYPE (arg00);
2055
if (TREE_INT_CST_HIGH (arg01) == 0
2056
+ && !(TREE_CODE (itype) == COMPLEX_TYPE
2057
+ || TREE_CODE (itype) == VECTOR_TYPE)
2058
&& TREE_INT_CST_LOW (arg01)
2059
== (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
2061
Index: gcc/omp-low.c
2062
===================================================================
2063
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
2064
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
2066
static int taskreg_nesting_level;
2067
struct omp_region *root_omp_region;
2068
static bitmap task_shared_vars;
2069
+static vec<omp_context *> taskreg_contexts;
2071
static void scan_omp (gimple_seq *, omp_context *);
2072
static tree scan_omp_1_op (tree *, int *, void *);
2073
@@ -1586,7 +1587,6 @@
2074
TREE_STATIC (decl) = 1;
2075
TREE_USED (decl) = 1;
2076
DECL_ARTIFICIAL (decl) = 1;
2077
- DECL_NAMELESS (decl) = 1;
2078
DECL_IGNORED_P (decl) = 0;
2079
TREE_PUBLIC (decl) = 0;
2080
DECL_UNINLINABLE (decl) = 1;
2081
@@ -1656,6 +1656,7 @@
2084
ctx = new_omp_context (stmt, outer_ctx);
2085
+ taskreg_contexts.safe_push (ctx);
2086
if (taskreg_nesting_level > 1)
2087
ctx->is_nested = true;
2088
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2089
@@ -1675,11 +1676,6 @@
2091
if (TYPE_FIELDS (ctx->record_type) == NULL)
2092
ctx->record_type = ctx->receiver_decl = NULL;
2095
- layout_type (ctx->record_type);
2096
- fixup_child_record_type (ctx);
2100
/* Scan an OpenMP task directive. */
2101
@@ -1690,7 +1686,6 @@
2104
gimple stmt = gsi_stmt (*gsi);
2105
- location_t loc = gimple_location (stmt);
2107
/* Ignore task directives with empty bodies. */
2109
@@ -1701,6 +1696,7 @@
2112
ctx = new_omp_context (stmt, outer_ctx);
2113
+ taskreg_contexts.safe_push (ctx);
2114
if (taskreg_nesting_level > 1)
2115
ctx->is_nested = true;
2116
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2117
@@ -1738,8 +1734,71 @@
2118
t = build_int_cst (long_integer_type_node, 1);
2119
gimple_omp_task_set_arg_align (stmt, t);
2124
+/* If any decls have been made addressable during scan_omp,
2125
+ adjust their fields if needed, and layout record types
2126
+ of parallel/task constructs. */
2129
+finish_taskreg_scan (omp_context *ctx)
2131
+ if (ctx->record_type == NULL_TREE)
2134
+ /* If any task_shared_vars were needed, verify all
2135
+ OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
2136
+ statements if use_pointer_for_field hasn't changed
2137
+ because of that. If it did, update field types now. */
2138
+ if (task_shared_vars)
2142
+ for (c = gimple_omp_taskreg_clauses (ctx->stmt);
2143
+ c; c = OMP_CLAUSE_CHAIN (c))
2144
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
2146
+ tree decl = OMP_CLAUSE_DECL (c);
2148
+ /* Global variables don't need to be copied,
2149
+ the receiver side will use them directly. */
2150
+ if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
2152
+ if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
2153
+ || !use_pointer_for_field (decl, ctx))
2155
+ tree field = lookup_field (decl, ctx);
2156
+ if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
2157
+ && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
2159
+ TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
2160
+ TREE_THIS_VOLATILE (field) = 0;
2161
+ DECL_USER_ALIGN (field) = 0;
2162
+ DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
2163
+ if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
2164
+ TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
2165
+ if (ctx->srecord_type)
2167
+ tree sfield = lookup_sfield (decl, ctx);
2168
+ TREE_TYPE (sfield) = TREE_TYPE (field);
2169
+ TREE_THIS_VOLATILE (sfield) = 0;
2170
+ DECL_USER_ALIGN (sfield) = 0;
2171
+ DECL_ALIGN (sfield) = DECL_ALIGN (field);
2172
+ if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
2173
+ TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
2178
+ if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
2180
+ layout_type (ctx->record_type);
2181
+ fixup_child_record_type (ctx);
2185
+ location_t loc = gimple_location (ctx->stmt);
2186
tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
2187
/* Move VLA fields to the end. */
2188
p = &TYPE_FIELDS (ctx->record_type);
2189
@@ -1759,12 +1818,12 @@
2190
fixup_child_record_type (ctx);
2191
if (ctx->srecord_type)
2192
layout_type (ctx->srecord_type);
2193
- t = fold_convert_loc (loc, long_integer_type_node,
2194
- TYPE_SIZE_UNIT (ctx->record_type));
2195
- gimple_omp_task_set_arg_size (stmt, t);
2196
+ tree t = fold_convert_loc (loc, long_integer_type_node,
2197
+ TYPE_SIZE_UNIT (ctx->record_type));
2198
+ gimple_omp_task_set_arg_size (ctx->stmt, t);
2199
t = build_int_cst (long_integer_type_node,
2200
TYPE_ALIGN_UNIT (ctx->record_type));
2201
- gimple_omp_task_set_arg_align (stmt, t);
2202
+ gimple_omp_task_set_arg_align (ctx->stmt, t);
2206
@@ -7113,6 +7172,8 @@
2207
execute_lower_omp (void)
2213
/* This pass always runs, to provide PROP_gimple_lomp.
2214
But there is nothing to do unless -fopenmp is given. */
2215
@@ -7125,6 +7186,9 @@
2216
body = gimple_body (current_function_decl);
2217
scan_omp (&body, NULL);
2218
gcc_assert (taskreg_nesting_level == 0);
2219
+ FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
2220
+ finish_taskreg_scan (ctx);
2221
+ taskreg_contexts.release ();
2223
if (all_contexts->root)
2226
===================================================================
2227
--- a/src/gcc/toplev.c (.../tags/gcc_4_8_3_release)
2228
+++ b/src/gcc/toplev.c (.../branches/gcc-4_8-branch)
2229
@@ -1036,16 +1036,19 @@
2231
if (warn_stack_usage >= 0)
2233
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
2235
if (stack_usage_kind == DYNAMIC)
2236
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
2237
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
2238
else if (stack_usage > warn_stack_usage)
2240
if (stack_usage_kind == DYNAMIC_BOUNDED)
2241
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
2244
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
2247
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
2249
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
2254
Index: gcc/tree-ssa-sccvn.c
2255
===================================================================
2256
--- a/src/gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release)
2257
+++ b/src/gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch)
2258
@@ -3015,33 +3015,12 @@
2259
/* If all value numbered to the same value, the phi node has that
2263
- if (is_gimple_min_invariant (sameval))
2265
- VN_INFO (PHI_RESULT (phi))->has_constants = true;
2266
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2270
- VN_INFO (PHI_RESULT (phi))->has_constants = false;
2271
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2273
+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
2275
- if (TREE_CODE (sameval) == SSA_NAME)
2276
- return visit_copy (PHI_RESULT (phi), sameval);
2278
- return set_ssa_val_to (PHI_RESULT (phi), sameval);
2281
/* Otherwise, see if it is equivalent to a phi node in this block. */
2282
result = vn_phi_lookup (phi);
2285
- if (TREE_CODE (result) == SSA_NAME)
2286
- changed = visit_copy (PHI_RESULT (phi), result);
2288
- changed = set_ssa_val_to (PHI_RESULT (phi), result);
2290
+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
2293
vn_phi_insert (phi, PHI_RESULT (phi));
2294
@@ -3142,24 +3121,18 @@
2295
catch those with constants. The goal here is to simultaneously
2296
combine constants between expressions, but avoid infinite
2297
expansion of expressions during simplification. */
2298
- if (TREE_CODE (op0) == SSA_NAME)
2300
- if (VN_INFO (op0)->has_constants
2301
+ op0 = vn_valueize (op0);
2302
+ if (TREE_CODE (op0) == SSA_NAME
2303
+ && (VN_INFO (op0)->has_constants
2304
|| TREE_CODE_CLASS (code) == tcc_comparison
2305
- || code == COMPLEX_EXPR)
2306
- op0 = valueize_expr (vn_get_expr_for (op0));
2308
- op0 = vn_valueize (op0);
2310
+ || code == COMPLEX_EXPR))
2311
+ op0 = valueize_expr (vn_get_expr_for (op0));
2313
- if (TREE_CODE (op1) == SSA_NAME)
2315
- if (VN_INFO (op1)->has_constants
2316
- || code == COMPLEX_EXPR)
2317
- op1 = valueize_expr (vn_get_expr_for (op1));
2319
- op1 = vn_valueize (op1);
2321
+ op1 = vn_valueize (op1);
2322
+ if (TREE_CODE (op1) == SSA_NAME
2323
+ && (VN_INFO (op1)->has_constants
2324
+ || code == COMPLEX_EXPR))
2325
+ op1 = valueize_expr (vn_get_expr_for (op1));
2327
/* Pointer plus constant can be represented as invariant address.
2328
Do so to allow further propatation, see also tree forwprop. */
2329
@@ -3217,27 +3190,31 @@
2333
- if (VN_INFO (op0)->has_constants)
2334
- op0 = valueize_expr (vn_get_expr_for (op0));
2335
- else if (CONVERT_EXPR_CODE_P (code)
2336
- || code == REALPART_EXPR
2337
- || code == IMAGPART_EXPR
2338
- || code == VIEW_CONVERT_EXPR
2339
- || code == BIT_FIELD_REF)
2340
+ op0 = vn_valueize (op0);
2341
+ if (TREE_CODE (op0) == SSA_NAME)
2343
- /* We want to do tree-combining on conversion-like expressions.
2344
- Make sure we feed only SSA_NAMEs or constants to fold though. */
2345
- tree tem = valueize_expr (vn_get_expr_for (op0));
2346
- if (UNARY_CLASS_P (tem)
2347
- || BINARY_CLASS_P (tem)
2348
- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2349
- || TREE_CODE (tem) == SSA_NAME
2350
- || TREE_CODE (tem) == CONSTRUCTOR
2351
- || is_gimple_min_invariant (tem))
2353
+ if (VN_INFO (op0)->has_constants)
2354
+ op0 = valueize_expr (vn_get_expr_for (op0));
2355
+ else if (CONVERT_EXPR_CODE_P (code)
2356
+ || code == REALPART_EXPR
2357
+ || code == IMAGPART_EXPR
2358
+ || code == VIEW_CONVERT_EXPR
2359
+ || code == BIT_FIELD_REF)
2361
+ /* We want to do tree-combining on conversion-like expressions.
2362
+ Make sure we feed only SSA_NAMEs or constants to fold though. */
2363
+ tree tem = valueize_expr (vn_get_expr_for (op0));
2364
+ if (UNARY_CLASS_P (tem)
2365
+ || BINARY_CLASS_P (tem)
2366
+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2367
+ || TREE_CODE (tem) == SSA_NAME
2368
+ || TREE_CODE (tem) == CONSTRUCTOR
2369
+ || is_gimple_min_invariant (tem))
2374
- /* Avoid folding if nothing changed, but remember the expression. */
2375
+ /* Avoid folding if nothing changed. */
2376
if (op0 == orig_op0)
2379
Index: gcc/cgraphunit.c
2380
===================================================================
2381
--- a/src/gcc/cgraphunit.c (.../tags/gcc_4_8_3_release)
2382
+++ b/src/gcc/cgraphunit.c (.../branches/gcc-4_8-branch)
2383
@@ -1097,7 +1097,7 @@
2384
/* We use local aliases for C++ thunks to force the tailcall
2385
to bind locally. This is a hack - to keep it working do
2386
the following (which is not strictly correct). */
2387
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
2388
+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
2389
|| ! DECL_VIRTUAL_P (target_node->symbol.decl))
2390
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
2392
Index: gcc/ChangeLog
2393
===================================================================
2394
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
2395
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
2397
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
2399
+ Backported from mainline
2400
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
2402
+ PR middle-end/64067
2403
+ * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
2404
+ Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
2405
+ not only if modifier is EXPAND_INITIALIZER, but whenever
2406
+ COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
2408
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
2410
+ PR rtl-optimization/63659
2411
+ * ree.c (update_reg_equal_equiv_notes): New function.
2412
+ (combine_set_extension, transform_ifelse): Use it.
2414
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
2417
+ * omp-low.c (taskreg_contexts): New variable.
2418
+ (scan_omp_parallel): Push newly created context into taskreg_contexts
2419
+ vector and move record layout code to finish_taskreg_scan.
2420
+ (scan_omp_task): Likewise.
2421
+ (finish_taskreg_scan): New function.
2422
+ (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
2423
+ vector elements and release it.
2425
+2014-11-26 Richard Biener <rguenther@suse.de>
2427
+ Backport from mainline
2428
+ 2014-10-08 Richard Biener <rguenther@suse.de>
2430
+ PR tree-optimization/61969
2431
+ * tree-nrv.c (pass_nrv::execute): Properly test for automatic
2434
+ 2014-08-15 Richard Biener <rguenther@suse.de>
2436
+ PR tree-optimization/62031
2437
+ * tree-data-ref.c (dr_analyze_indices): Do not set
2438
+ DR_UNCONSTRAINED_BASE.
2439
+ (dr_may_alias_p): All indirect accesses have to go the
2440
+ formerly DR_UNCONSTRAINED_BASE path.
2441
+ * tree-data-ref.h (struct indices): Remove
2442
+ unconstrained_base member.
2443
+ (DR_UNCONSTRAINED_BASE): Remove.
2445
+ 2014-10-10 Richard Biener <rguenther@suse.de>
2447
+ PR tree-optimization/63379
2448
+ * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
2449
+ a neutral operand for min/max when it is not a reduction chain.
2451
+ 2014-11-07 Richard Biener <rguenther@suse.de>
2453
+ PR tree-optimization/63605
2454
+ * fold-const.c (fold_binary_loc): Properly use element_precision
2455
+ for types that may not be scalar.
2457
+ 2014-10-28 Richard Biener <rguenther@suse.de>
2459
+ PR middle-end/63665
2460
+ * fold-const.c (fold_comparison): Properly guard simplifying
2461
+ against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
2463
+2014-11-22 Oleg Endo <olegendo@gcc.gnu.org>
2465
+ Backport from mainline
2466
+ 2014-11-20 Segher Boessenkool <segher@kernel.crashing.org>
2469
+ * config/sh/sh.c: Use signed char for signed field.
2471
+2014-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2474
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
2475
+ the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
2478
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
2481
+ * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
2482
+ Output "b" and "nb" suffix for FP mode.
2484
+2014-11-19 Tom de Vries <tom@codesourcery.com>
2486
+ Backport from mainline
2487
+ PR tree-optimization/62167
2488
+ * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
2490
+ (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
2493
+2014-11-18 Teresa Johnson <tejohnson@google.com>
2495
+ Backport from mainline and gcc-4_9 branch.
2496
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
2498
+ PR tree-optimization/63841
2499
+ * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
2501
+2014-11-16 Eric Botcazou <ebotcazou@adacore.com>
2503
+ * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
2504
+ * doc/tm.texi: Regenerate.
2506
+ Backport from mainline
2507
+ 2013-09-16 Andreas Schwab <schwab@linux-m68k.org>
2509
+ * doc/tm.texi.in (Cond Exec Macros): Remove node.
2510
+ (Condition Code): Don't reference it.
2511
+ * doc/tm.texi: Regenerate.
2513
+2014-11-13 Christophe Lyon <christophe.lyon@linaro.org>
2515
+ Backport from mainline
2516
+ 2014-11-02 Michael Collison <michael.collison@linaro.org>
2518
+ * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
2519
+ to support vector modes.
2520
+ (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
2522
+2014-11-13 Eric Botcazou <ebotcazou@adacore.com>
2524
+ * doc/tm.texi.in (SELECT_CC_MODE): Update example.
2525
+ (REVERSIBLE_CC_MODE): Fix example.
2526
+ (REVERSE_CONDITION): Fix typo.
2527
+ * doc/tm.texi: Regenerate.
2529
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
2532
+ * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
2533
+ chain instead of node->indirect_calls.
2535
+2014-11-10 Daniel Hellstrom <daniel@gaisler.com>
2537
+ Backport from mainline
2538
+ * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
2539
+ * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
2541
+2014-11-07 Daniel Hellstrom <daniel@gaisler.com>
2543
+ * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
2544
+ * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
2545
+ * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
2547
+ * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
2548
+ * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
2549
+ * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
2550
+ * config/sparc/sparc.md (cpu): Add leon3v7.
2551
+ * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
2553
+2014-11-06 John David Anglin <danglin@gcc.gnu.org>
2555
+ * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
2556
+ Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
2559
+2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2561
+ * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
2562
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
2563
+ * config/aarch64/aarch64-linux.h
2564
+ (CA53_ERR_835769_SPEC): Define.
2565
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
2567
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2569
+ * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
2570
+ recog state after aarch64_prev_real_insn call.
2572
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2574
+ * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
2576
+ * configure.ac: Add --enable-fix-cortex-a53-835769 option.
2577
+ * configure: Regenerate.
2578
+ * config/aarch64/aarch64.c (aarch64_override_options): Handle
2579
+ TARGET_FIX_ERR_A53_835769_DEFAULT.
2580
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
2582
+ * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
2584
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2586
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
2587
+ * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
2588
+ (FINAL_PRESCAN_INSN): Likewise.
2589
+ * config/aarch64/aarch64.h (is_mem_p): New function.
2590
+ (has_memory_op): Likewise.
2591
+ (aarch64_prev_real_insn): Likewise.
2592
+ (is_madd_op): Likewise.
2593
+ (dep_between_memop_and_curr): Likewise.
2594
+ (aarch64_madd_needs_nop): Likewise.
2595
+ (aarch64_final_prescan_insn): Likewise.
2596
+ * doc/invoke.texi (Document new option).
2598
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
2600
+ * stor-layout.c (self_referential_size): Do not promote arguments.
2602
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2604
+ Backport from mainline r215880
2605
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2607
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2608
+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
2609
+ little endian target.
2611
+ Backport from mainline r215882
2612
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2614
+ * altivec.md (altivec_lvsl): New define_expand.
2615
+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
2616
+ (altivec_lvsr): New define_expand.
2617
+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
2618
+ * rs6000.c (rs6000_expand_builtin): Change to use
2619
+ altivec_lvs[lr]_direct; remove commented-out code.
2621
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2623
+ Backport from mainline
2624
+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
2626
+ PR rtl-optimization/57003
2627
+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
2628
+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
2629
+ killing regs_invalidated_by_call.
2631
+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2633
+ Backport from mainline
2634
+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
2637
+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
2638
+ atomic_fetch_<fetchop_name>si_hard,
2639
+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
2640
+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
2641
+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
2642
+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
2644
+2014-10-02 Martin Jambor <mjambor@suse.cz>
2646
+ PR tree-optimization/63375
2647
+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
2650
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
2653
+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
2657
+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
2658
+ argument to avx2_permv2ti.
2660
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
2662
+ Backport from mainline
2663
+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
2665
+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
2666
+ (fmod<mode>3): Ditto.
2667
+ (fpremxf4_i387): Ditto.
2668
+ (reminderxf3): Ditto.
2669
+ (reminder<mode>3): Ditto.
2670
+ (fprem1xf4_i387): Ditto.
2672
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
2674
+ PR inline-asm/63282
2675
+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
2676
+ or invert_jump_1 if jump isn't any_condjump_p.
2678
+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
2680
+ Backport from mainline r212303
2682
+ * config/arm/arm-protos.h (arm_legitimate_address_p,
2683
+ arm_is_constant_pool_ref): Add prototypes.
2684
+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
2685
+ (arm_is_constant_pool_ref) New function.
2686
+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
2687
+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
2688
+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
2689
+ operand and remove pool_range and neg_pool_range attributes.
2690
+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
2691
+ pool_range and neg_pool_range attributes.
2692
+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
2693
+ constant pool references.
2695
+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
2697
+ * config/pa/pa.c (pa_output_function_epilogue): Only update
2698
+ last_address when a nonnote insn is found.
2700
+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2702
+ Backport from mainline
2703
+ 2014-09-25 Nick Clifton <nickc@redhat.com>
2704
+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
2707
+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
2708
+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
2710
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2712
+ Backport from mainline r215559
2713
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2716
+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
2717
+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
2719
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
2721
+ PR tree-optimization/63341
2722
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
2723
+ vect_create_addr_base_for_vector_ref): Add another tree argument
2724
+ defaulting to NULL_TREE.
2725
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
2726
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
2727
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
2728
+ add that to base_offset too if non-NULL.
2729
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
2730
+ for dr_explicit_realign_optimized set it to vector byte size
2731
+ - 1 instead of setting offset, pass byte_offset down to
2732
+ vect_create_data_ref_ptr.
2734
+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2736
+ Back port from trunk:
2737
+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
2739
+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
2740
+ refine the constraints used on 32/64-bit floating point moves.
2741
+ (f32_av): Likewise.
2742
+ (f64_vsx): Likewise.
2743
+ (f64_dm): Likewise.
2744
+ (f64_av): Likewise.
2745
+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
2746
+ (BOOL_REGS_OP1): Likewise.
2747
+ (BOOL_REGS_OP2): Likewise.
2748
+ (BOOL_REGS_UNARY): Likewise.
2749
+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
2750
+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
2751
+ for moves involving VSX registers. Do not use constraints that
2752
+ target VSX registers for decimal types.
2753
+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
2754
+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
2756
+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2758
+ Back port from trunk:
2759
+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
2761
+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
2762
+ for base_reg_operand to be common between LO_SUM and PLUS.
2763
+ (fusion_gpr_mem_combo): New predicate to match a fused address
2764
+ that combines the addis and memory offset address.
2766
+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
2767
+ calling signature.
2768
+ (emit_fusion_gpr_load): Likewise.
2770
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
2771
+ signature to pass each argument separately, rather than
2772
+ using an operands array. Rewrite the insns found by peephole2 to
2773
+ be a single insn, rather than hoping the insns will still be
2774
+ together when the peephole pass is done. Drop being called via a
2776
+ (emit_fusion_gpr_load): Change calling signature to be called from
2777
+ the fusion_gpr_load_<mode> insns with a combined memory address
2778
+ instead of the peephole pass passing the addis and offset
2781
+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
2783
+ (power8 fusion peephole): Drop support for doing power8 via a
2784
+ normal peephole that was created by the peephole2 pass.
2785
+ (power8 fusion peephole2): Create a new insn with the fused
2786
+ address, so that the fused operation is kept together after
2787
+ register allocation is done.
2788
+ (fusion_gpr_load_<mode>): Likewise.
2790
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
2793
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
2794
+ if there are only debug stmts after the noreturn call, instead
2795
+ remove the debug stmts.
2797
+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2799
+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
2800
+ V2DF, V4SF, DF, and DI modes.
2801
+ (vsx_fmav2df2): Likewise.
2802
+ (vsx_float_fix_<mode>2): Likewise.
2803
+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
2805
+2014-09-10 Alan Modra <amodra@gmail.com>
2808
+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
2811
+2014-09-09 Richard Biener <rguenther@suse.de>
2813
+ Backport from mainline
2814
+ 2014-06-11 Richard Biener <rguenther@suse.de>
2816
+ PR tree-optimization/61452
2817
+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
2818
+ expr and has_constants in case we found a leader.
2819
+ (simplify_binary_expression): Always valueize operands first.
2820
+ (simplify_unary_expression): Likewise.
2822
+2014-09-09 Richard Biener <rguenther@suse.de>
2824
+ Backport from mainline
2825
+ 2014-05-05 Richard Biener <rguenther@suse.de>
2827
+ PR middle-end/61010
2828
+ * fold-const.c (fold_binary_loc): Consistently avoid
2829
+ canonicalizing X & CST away from a CST that is the mask
2832
+ 2014-05-28 Richard Biener <rguenther@suse.de>
2834
+ PR middle-end/61045
2835
+ * fold-const.c (fold_comparison): When folding
2836
+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
2837
+ the sign of the remaining constant operand stays the same.
2839
+ 2014-08-11 Richard Biener <rguenther@suse.de>
2841
+ PR tree-optimization/62075
2842
+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
2843
+ handle uses in patterns.
2845
+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2847
+ Backport from mainline.
2848
+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
2850
+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
2851
+ (-mtune): Likewise.
2852
+ (-mcpu): Likewise.
2854
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2856
+ PR tree-optimization/60196
2857
+ PR tree-optimization/63189
2858
+ Backported from mainline
2859
+ 2013-09-17 Cong Hou <congh@google.com>
2861
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
2862
+ when checking the dot production pattern. The type of rhs operand
2863
+ of multiply is now checked correctly.
2865
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
2867
+ Backported from mainline
2868
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
2871
+ * haifa-sched.c (advance_one_cycle): Fix dump.
2872
+ (schedule_block): Don't advance cycle if we are already at the
2873
+ beginning of the cycle.
2875
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2878
+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
2879
+ pass-trough jump functions correctly.
2881
+2014-09-03 Martin Jambor <mjambor@suse.cz>
2884
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
2885
+ created replacements in ascending order of offsets.
2886
+ (known_aggs_to_agg_replacement_list): Likewise.
2888
+2014-09-01 Marek Polacek <polacek@redhat.com>
2890
+ Backport from mainline
2891
+ 2014-08-21 Marek Polacek <polacek@redhat.com>
2894
+ * expr.c (is_aligning_offset): Remove logical not.
2896
+2014-09-01 Marek Polacek <polacek@redhat.com>
2898
+ Backport from mainline
2899
+ 2014-08-19 Marek Polacek <polacek@redhat.com>
2902
+ * cgraphunit.c (handle_alias_pairs): Fix condition.
2904
+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
2906
+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
2907
+ prefix to function labels when generating fast indirect calls.
2909
+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
2911
+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
2913
+2014-08-26 Marek Polacek <polacek@redhat.com>
2915
+ Backport from mainline
2916
+ 2014-08-26 Marek Polacek <polacek@redhat.com>
2919
+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
2920
+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
2922
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2924
+ Backport from mainline
2925
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
2928
+ * config/sh/sh.opt (musermode): Allow negative form.
2929
+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
2930
+ targets that don't support it.
2931
+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
2932
+ Document -mno-usermode option.
2934
+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
2937
+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
2938
+ last_address when the current function is a thunk.
2939
+ (pa_asm_output_mi_thunk): When we don't have named sections or they
2940
+ are not being used, check that thunk can reach the stub table with a
2943
+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2945
+ Backport fro mainline
2946
+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
2949
+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
2950
+ documentation to state it is only for VSX operations.
2952
+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
2953
+ constraint only active if VSX.
2955
+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
2956
+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
2957
+ (lfiwzx): Likewise.
2959
+2014-08-15 Tom de Vries <tom@codesourcery.com>
2961
+ Backport from mainline:
2962
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
2964
+ PR rtl-optimization/62004
2965
+ PR rtl-optimization/62030
2966
+ * ifcvt.c (rtx_interchangeable_p): New function.
2967
+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
2969
+ 2014-08-05 Richard Biener <rguenther@suse.de>
2971
+ * emit-rtl.h (mem_attrs_eq_p): Declare.
2972
+ * emit-rtl.c (mem_attrs_eq_p): Export.
2974
+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
2976
+ Backport from trunk:
2977
+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
2980
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
2981
+ size accounting for thunks.
2982
+ (pa_asm_output_mi_thunk): Use final_start_function() and
2983
+ final_end_function() to output function start and end directives.
2985
+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2987
+ Backport from mainline:
2988
+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
2990
+ * doc/invoke.texi (SH options): Document missing processor variant
2991
+ options. Remove references to Hitachi. Undocument deprecated mspace
2994
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
2996
+ PR tree-optimization/62073
2997
+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
3000
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3002
+ Backport from mainline
3003
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
3005
+ PR middle-end/62103
3006
+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
3007
+ bitfields, that is when size doesn't match the size of type or the
3008
+ size of the constructor.
3010
+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
3012
+ Backport patch from mainline
3013
+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3015
+ * config/rs6000/constraints.md (wh constraint): New constraint,
3016
+ for FP registers if direct move is available.
3017
+ (wi constraint): New constraint, for VSX/FP registers that can
3018
+ handle 64-bit integers.
3019
+ (wj constraint): New constraint for VSX/FP registers that can
3020
+ handle 64-bit integers for direct moves.
3021
+ (wk constraint): New constraint for VSX/FP registers that can
3022
+ handle 64-bit doubles for direct moves.
3023
+ (wy constraint): Make documentation match implementation.
3025
+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
3026
+ scalar_in_vmx_p field to simplify tests of whether SFmode or
3027
+ DFmode can go in the Altivec registers.
3028
+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
3029
+ (rs6000_setup_reg_addr_masks): Likewise.
3030
+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
3031
+ field, and wh/wi/wj/wk constraints.
3032
+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
3033
+ the wh/wi/wj/wk constraints.
3034
+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
3035
+ upper registers, prefer VSX registers unless the operation is a
3036
+ memory operation with REG+OFFSET addressing.
3038
+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
3039
+ DImode. Change SFmode to use ww constraint instead of d to allow
3040
+ SF registers in the upper registers.
3043
+ (VSr5): Fix thinko in comment.
3044
+ (VSa): New mode attribute that is an alternative to wa, that
3045
+ returns the VSX register class that a mode can go in, but may not
3046
+ be the preferred register class.
3047
+ (VS_64dm): New mode attribute for appropriate register classes for
3048
+ referencing 64-bit elements of vectors for direct moves and normal
3050
+ (VS_64reg): Likewise.
3051
+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
3052
+ register allocator to only registers the data type can handle.
3053
+ (vsx_le_perm_load_<mode>): Likewise.
3054
+ (vsx_le_perm_store_<mode>): Likewise.
3055
+ (vsx_xxpermdi2_le_<mode>): Likewise.
3056
+ (vsx_xxpermdi4_le_<mode>): Likewise.
3057
+ (vsx_lxvd2x2_le_<mode>): Likewise.
3058
+ (vsx_lxvd2x4_le_<mode>): Likewise.
3059
+ (vsx_stxvd2x2_le_<mode>): Likewise.
3060
+ (vsx_add<mode>3): Likewise.
3061
+ (vsx_sub<mode>3): Likewise.
3062
+ (vsx_mul<mode>3): Likewise.
3063
+ (vsx_div<mode>3): Likewise.
3064
+ (vsx_tdiv<mode>3_internal): Likewise.
3065
+ (vsx_fre<mode>2): Likewise.
3066
+ (vsx_neg<mode>2): Likewise.
3067
+ (vsx_abs<mode>2): Likewise.
3068
+ (vsx_nabs<mode>2): Likewise.
3069
+ (vsx_smax<mode>3): Likewise.
3070
+ (vsx_smin<mode>3): Likewise.
3071
+ (vsx_sqrt<mode>2): Likewise.
3072
+ (vsx_rsqrte<mode>2): Likewise.
3073
+ (vsx_tsqrt<mode>2_internal): Likewise.
3074
+ (vsx_fms<mode>4): Likewise.
3075
+ (vsx_nfma<mode>4): Likewise.
3076
+ (vsx_eq<mode>): Likewise.
3077
+ (vsx_gt<mode>): Likewise.
3078
+ (vsx_ge<mode>): Likewise.
3079
+ (vsx_eq<mode>_p): Likewise.
3080
+ (vsx_gt<mode>_p): Likewise.
3081
+ (vsx_ge<mode>_p): Likewise.
3082
+ (vsx_xxsel<mode>): Likewise.
3083
+ (vsx_xxsel<mode>_uns): Likewise.
3084
+ (vsx_copysign<mode>3): Likewise.
3085
+ (vsx_float<VSi><mode>2): Likewise.
3086
+ (vsx_floatuns<VSi><mode>2): Likewise.
3087
+ (vsx_fix_trunc<mode><VSi>2): Likewise.
3088
+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
3089
+ (vsx_x<VSv>r<VSs>i): Likewise.
3090
+ (vsx_x<VSv>r<VSs>ic): Likewise.
3091
+ (vsx_btrunc<mode>2): Likewise.
3092
+ (vsx_b2trunc<mode>2): Likewise.
3093
+ (vsx_floor<mode>2): Likewise.
3094
+ (vsx_ceil<mode>2): Likewise.
3095
+ (vsx_<VS_spdp_insn>): Likewise.
3096
+ (vsx_xscvspdp): Likewise.
3097
+ (vsx_xvcvspuxds): Likewise.
3098
+ (vsx_float_fix_<mode>2): Likewise.
3099
+ (vsx_set_<mode>): Likewise.
3100
+ (vsx_extract_<mode>_internal1): Likewise.
3101
+ (vsx_extract_<mode>_internal2): Likewise.
3102
+ (vsx_extract_<mode>_load): Likewise.
3103
+ (vsx_extract_<mode>_store): Likewise.
3104
+ (vsx_splat_<mode>): Likewise.
3105
+ (vsx_xxspltw_<mode>): Likewise.
3106
+ (vsx_xxspltw_<mode>_direct): Likewise.
3107
+ (vsx_xxmrghw_<mode>): Likewise.
3108
+ (vsx_xxmrglw_<mode>): Likewise.
3109
+ (vsx_xxsldwi_<mode>): Likewise.
3110
+ (vsx_xscvdpspn): Tighten constraints to only use register classes
3112
+ (vsx_xscvspdpn): Likewise.
3113
+ (vsx_xscvdpspn_scalar): Likewise.
3115
+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
3116
+ wj, and wk constraints.
3117
+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
3118
+ general purpose registers.
3120
+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
3122
+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
3123
+ DImode instead of wm. Use wk constraint for direct move of DFmode
3125
+ (extendsidi2_lfiwax): Likewise.
3126
+ (lfiwax): Likewise.
3127
+ (lfiwzx): Likewise.
3128
+ (movdi_internal64): Likewise.
3130
+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
3131
+ wk constraints. Make the wy constraint documentation match them
3134
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
3136
+ Backport from mainline
3137
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3139
+ PR tree-optimization/61375
3140
+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
3141
+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
3142
+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
3144
+2014-08-01 Richard Biener <rguenther@suse.de>
3146
+ PR tree-optimization/61964
3147
+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
3148
+ function merged from trunk.
3149
+ (gimple_equal_p): Handle non-SSA LHS solely by structural
3152
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
3154
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
3156
+2014-07-24 Kyle McMartin <kyle@redhat.com>
3158
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
3160
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3162
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
3164
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
3165
+ function. Issue -Wpsabi warning if future GCC releases will use
3166
+ different field alignment rules for this type.
3167
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
3168
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
3169
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
3171
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3173
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
3174
+ -Wpsabi note when encountering a type where future GCC releases
3175
+ will apply different alignment requirements.
3177
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3179
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
3180
+ does not fit fully into floating-point registers, and there is still
3181
+ space in the register parameter area, issue -Wpsabi note that the ABI
3182
+ will change in a future GCC release.
3184
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
3186
+ * config/arm/t-rtems-eabi: Add
3187
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
3188
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
3189
+ mbig-endian/mthumb/march=armv7-r, and
3190
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
3193
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
3195
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
3196
+ (LIBTSAN_EARLY_SPEC): Likewise.
3197
+ (STATIC_LIBASAN_LIBS): Likewise.
3198
+ (STATIC_LIBTSAN_LIBS): Likewise.
3200
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
3202
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
3204
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
3206
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
3207
+ (*membar_storeload): Disable for LEON3.
3209
+2014-07-17 Richard Biener <rguenther@suse.de>
3211
+ PR rtl-optimization/61801
3212
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
3213
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
3216
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
3218
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
3219
+ on the FUNCTION_DECL.
3221
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
3223
+ * doc/install.texi: Remove links to defunct package providers for
3226
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
3228
+ PR middle-end/53590
3229
+ * function.c (allocate_struct_function): Revert r188667 change.
3231
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
3233
+ PR tree-optimization/61684
3234
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
3235
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
3237
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
3239
+ Backport from Mainline
3240
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
3241
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
3243
+ PR tree-optimization/61306
3244
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
3245
+ expression instead of its size.
3246
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
3247
+ false to prevent optimization when the result is unpredictable due to
3248
+ arithmetic right shift of signed type with highest byte is set.
3249
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
3250
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
3251
+ result is unpredictable due to sign extension.
3252
+ (find_bswap): Adapt to change in struct symbolic_number.
3254
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
3256
+ Backport from mainline
3257
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
3260
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
3262
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3265
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
3266
+ extraction other than index 3.
3268
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
3271
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
3272
+ model family 6 CPU with has_longmode never use a CPU without
3275
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3277
+ Backport from mainline
3279
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
3280
+ Chung-Lin Tang <cltang@codesourcery.com>
3282
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
3283
+ TARGET_THUMB1_ONLY. Add comments.
3285
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
3287
+ Backport from mainline
3288
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
3291
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
3292
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
3293
+ and corresponding splitters. Zero extend general register
3294
+ or memory input operand to XMM temporary. Enable for
3295
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
3296
+ (floatunssi<mode>2): Update expander predicate.
3298
+2014-06-18 Richard Henderson <rth@redhat.com>
3301
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
3303
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
3305
+ Revert on gcc-4_8-branch.
3306
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
3307
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
3309
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
3311
+ Backport from mainline
3314
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
3315
+ variable 'size'; calculate 'size' right in the front; use
3316
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
3317
+ pcum->aapcs_stack_words.
3319
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3321
+ Backport from mainline
3323
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3325
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
3326
+ (BU_MISC_2): Rename to ...
3327
+ (BU_LDBL128_2): ... this.
3328
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
3329
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
3330
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
3331
+ RS6000_BTM_LDBL128.
3332
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
3333
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
3334
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
3335
+ (unpacktf_1): Likewise.
3336
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
3337
+ (__builtin_longdouble_dw1): Likewise.
3338
+ * doc/sourcebuild.texi (longdouble128): Document.
3340
+2014-06-13 Jason Merrill <jason@redhat.com>
3343
+ * common.opt (-fno-gnu-unique): Add.
3344
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
3346
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
3348
+ Backport from 2014-05-09 trunk r210272
3350
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
3351
+ unsigned int initializers for regno_in, regno_out.
3353
+ Backport from 2014-05-14 trunk r210418
3354
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
3355
+ shifted values to avoid build warning.
3357
+ Backport from 2014-06-12 trunk r211491
3360
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
3361
+ loading from address spaces.
3363
+2014-06-12 Alan Modra <amodra@gmail.com>
3366
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
3367
+ * doc/tm.texi: Regenerate.
3368
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
3369
+ Use throughout in place of REG_PARM_STACK_SPACE.
3370
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
3371
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
3372
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
3373
+ prototype_p when incoming. Use function decl when incoming
3374
+ to handle K&R style functions.
3375
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
3376
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
3378
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3380
+ Back port from trunk
3381
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3384
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
3385
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
3386
+ handles swapping the two 64-bit double words on little endian
3387
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
3388
+ these types are properly swapped. Change all of the insns and
3389
+ splits that do the 64-bit swaps to use VSX_LE.
3390
+ (vsx_le_perm_load_<mode>): Likewise.
3391
+ (vsx_le_perm_store_<mode>): Likewise.
3392
+ (splitters for little endian memory operations): Likewise.
3393
+ (vsx_xxpermdi2_le_<mode>): Likewise.
3394
+ (vsx_lxvd2x2_le_<mode>): Likewise.
3395
+ (vsx_stxvd2x2_le_<mode>): Likewise.
3397
+2014-06-05 Martin Jambor <mjambor@suse.cz>
3400
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
3403
+2014-06-04 Richard Biener <rguenther@suse.de>
3405
+ PR tree-optimization/61383
3406
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
3409
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3411
+ Backport from mainline
3412
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3414
+ PR rtl-optimization/60866
3415
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
3416
+ Default it to -1. Pass it down to init_simplejump_data.
3417
+ (init_simplejump_data): New parameter old_seqno. Pass it down
3418
+ to get_seqno_for_a_jump.
3419
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
3420
+ initializing new jump seqno as a last resort. Add comment.
3421
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
3422
+ jump and pass it down to sel_init_new_insn.
3423
+ (sel_redirect_edge_and_branch_force): Likewise.
3425
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
3427
+ Backport from mainline
3428
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
3430
+ PR rtl-optimization/60901
3431
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
3432
+ bb predecessor belongs to the same scheduling region. Adjust comment.
3434
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
3436
+ Backport from mainline
3437
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
3440
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
3441
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
3443
+2014-05-28 Guozhi Wei <carrot@google.com>
3446
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
3448
+ (vqdmulhq_n_s16): Likewise.
3450
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
3452
+ Backport from mainline
3453
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
3455
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
3456
+ predicate to detect a negative quotient.
3458
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
3461
+ * doc/extend.texi (Local Labels): Note that label differences are
3462
+ not supported for AVR.
3464
+2014-05-26 Michael Tautschnig <mt@debian.org>
3467
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
3468
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
3470
+2014-05-23 Alan Modra <amodra@gmail.com>
3473
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
3474
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
3475
+ Use "Y" constraint rather than "m".
3477
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3479
+ Backport from mainline
3480
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
3482
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
3484
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
3487
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
3489
2014-05-22 Release Manager
3491
* GCC 4.8.3 released.
3492
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
3493
===================================================================
3494
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
3495
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch)
3497
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
3499
+/* { dg-do compile { target { powerpc64le-*-* } } } */
3500
+/* { dg-options "-O0 -Wdeprecated" } */
3502
+#include <altivec.h>
3508
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
3509
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
3511
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
3512
===================================================================
3513
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release)
3514
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch)
3516
+/* { dg-do run { target { powerpc64*-*-* } } } */
3517
+/* { dg-require-effective-target powerpc_vsx_ok } */
3518
+/* { dg-options "-mvsx" } */
3520
+#include <altivec.h>
3524
+vector double vec = (vector double) {99.0, 99.0};
3528
+ int actual = vec_all_nge(vec, vec);
3532
+ actual = vec_all_nle(vec, vec);
3536
+ actual = vec_any_nge(vec, vec);
3540
+ actual = vec_any_nle(vec, vec);
3546
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
3547
===================================================================
3548
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release)
3549
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch)
3551
/* { dg-do compile { target { powerpc*-*-* } } } */
3552
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3553
/* { dg-require-effective-target powerpc_vsx_ok } */
3554
-/* { dg-options "-O3 -mcpu=power7" } */
3555
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
3557
/* Test the various load/store varients. */
3559
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
3560
===================================================================
3561
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
3562
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
3564
/* { dg-do assemble } */
3565
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
3566
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
3567
+/* { dg-require-effective-target longdouble128 } */
3568
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
3570
typedef float TFmode __attribute__ ((mode (TF)));
3571
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
3572
===================================================================
3573
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
3574
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
3576
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3577
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
3578
/* { dg-require-effective-target powerpc_fprs } */
3579
+/* { dg-require-effective-target longdouble128 } */
3580
/* { dg-options "-O2 -mhard-float" } */
3583
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
3584
===================================================================
3585
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release)
3586
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch)
3588
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3589
+/* { dg-options "-mabi=elfv2" } */
3596
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
3600
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
3601
===================================================================
3602
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
3603
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
3605
+/* { dg-do compile { target { powerpc*-*-* } } } */
3606
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3607
+/* { dg-require-effective-target powerpc_htm_ok } */
3608
+/* { dg-options "-O2 -mhtm" } */
3610
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
3611
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
3613
+#include <htmintrin.h>
3617
+ return _HTM_STATE(__builtin_ttest());
3619
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
3620
===================================================================
3621
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
3622
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch)
3624
+/* Test expected code generation for lvsl and lvsr on little endian.
3625
+ Note that lvsl and lvsr are each produced once, but the filename
3626
+ causes them to appear twice in the file. */
3628
+/* { dg-do compile { target { powerpc64le-*-* } } } */
3629
+/* { dg-options "-O0 -Wno-deprecated" } */
3630
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
3631
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
3632
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
3633
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
3636
+#include <altivec.h>
3642
+ vector unsigned char a = vec_lvsl (4, f);
3643
+ vector unsigned char b = vec_lvsr (8, f);
3645
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
3646
===================================================================
3647
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release)
3648
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch)
3650
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3651
+/* { dg-options "-mno-compat-align-parm" } */
3655
+ long a __attribute__((aligned (16)));
3658
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
3662
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
3663
===================================================================
3664
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release)
3665
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch)
3667
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
3668
+/* { dg-require-effective-target powerpc_altivec_ok } */
3669
+/* { dg-options "-maltivec" } */
3673
+ int a __attribute__((vector_size (8)));
3674
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
3676
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
3677
===================================================================
3678
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release)
3679
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch)
3681
/* { dg-do compile { target powerpc*-*-* } } */
3682
/* { dg-require-effective-target powerpc_altivec_ok } */
3683
-/* { dg-options "-maltivec -O0 -Wall" } */
3684
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
3686
#include <altivec.h>
3688
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
3689
===================================================================
3690
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release)
3691
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch)
3693
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
3694
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
3695
/* { dg-require-effective-target powerpc_altivec_ok } */
3696
-/* { dg-options "-maltivec -O2" } */
3697
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
3699
#include <altivec.h>
3701
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
3702
===================================================================
3703
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
3704
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
3706
/* { dg-do compile { target powerpc_altivec_ok } } */
3707
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
3708
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
3710
#include <altivec.h>
3712
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
3713
===================================================================
3714
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
3715
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
3717
+/* { dg-do compile } */
3718
+/* { dg-options "-O2 -mieee" } */
3720
+void foo (int *dimensions, double **params, int hh)
3724
+ else if (dimensions[hh] > 0)
3725
+ params[hh][0] = 1.0f;
3727
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
3728
===================================================================
3729
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
3730
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
3732
+/* Test AAPCS64 layout and __builtin_va_start.
3734
+ Pass named HFA/HVA argument on stack. */
3736
+/* { dg-do run { target aarch64*-*-* } } */
3738
+#ifndef IN_FRAMEWORK
3739
+#define AAPCS64_TEST_STDARG
3740
+#define TESTFILE "va_arg-14.c"
3741
+#include "type-def.h"
3743
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
3744
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
3745
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
3746
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
3748
+#include "abitest.h"
3750
+ ARG (float, 1.0f, S0, 0)
3751
+ ARG (float, 2.0f, S1, 1)
3752
+ ARG (float, 3.0f, S2, 2)
3753
+ ARG (float, 4.0f, S3, 3)
3754
+ ARG (float, 5.0f, S4, 4)
3755
+ ARG (float, 6.0f, S5, 5)
3756
+ ARG (float, 7.0f, S6, 6)
3757
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
3758
+ /* Previous argument size has been rounded up to the nearest multiple of
3760
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
3761
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
3762
+ ARG (vf4_t, float32x4, STACK + 32, 9)
3763
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
3765
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
3767
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
3768
===================================================================
3769
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
3770
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
3785
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
3786
===================================================================
3787
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
3788
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
3790
+/* Test AAPCS64 layout and __builtin_va_start.
3792
+ Pass named HFA/HVA argument on stack. */
3794
+/* { dg-do run { target aarch64*-*-* } } */
3796
+#ifndef IN_FRAMEWORK
3797
+#define AAPCS64_TEST_STDARG
3798
+#define TESTFILE "va_arg-13.c"
3800
+struct float_float_t
3812
+#define HAS_DATA_INIT_FUNC
3816
+ float_float.a = 1.2f;
3817
+ float_float.b = 2.2f;
3819
+ float_int.b8 = 4983.80f;
3822
+#include "abitest.h"
3824
+ ARG (float, 1.0f, S0, 0)
3825
+ ARG (float, 2.0f, S1, 1)
3826
+ ARG (float, 3.0f, S2, 2)
3827
+ ARG (float, 4.0f, S3, 3)
3828
+ ARG (float, 5.0f, S4, 4)
3829
+ ARG (float, 6.0f, S5, 5)
3830
+ ARG (float, 7.0f, S6, 6)
3831
+ ARG (struct float_float_t, float_float, STACK, 7)
3832
+ ARG (int, 9, W0, 8)
3833
+ ARG (int, 10, W1, 9)
3834
+ ARG (int, 11, W2, 10)
3835
+ ARG (int, 12, W3, 11)
3836
+ ARG (int, 13, W4, 12)
3837
+ ARG (int, 14, W5, 13)
3838
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
3840
+ /* Note on the reason of using 'X7' instead of 'W7' here:
3841
+ Using 'X7' makes sure the test works in the big-endian mode.
3842
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
3843
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
3844
+ the memory, with the content of the other 4 bytes unspecified. The
3845
+ test framework will only compare the 4 relavent bytes. */
3846
+ ANON (union float_int_t, float_int, X7, 15)
3847
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
3849
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
3850
===================================================================
3851
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
3852
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
3854
+/* Test AAPCS64 layout and __builtin_va_start.
3856
+ Pass named __128int argument on stack. */
3858
+/* { dg-do run { target aarch64*-*-* } } */
3860
+#ifndef IN_FRAMEWORK
3861
+#define AAPCS64_TEST_STDARG
3862
+#define TESTFILE "va_arg-15.c"
3863
+#include "type-def.h"
3865
+union int128_t qword;
3867
+#define HAS_DATA_INIT_FUNC
3871
+ /* Init signed quad-word integer. */
3872
+ qword.l64 = 0xfdb9753102468aceLL;
3873
+ qword.h64 = 0xeca8642013579bdfLL;
3876
+#include "abitest.h"
3878
+ ARG (int, 1, W0, 0)
3879
+ ARG (int, 2, W1, 1)
3880
+ ARG (int, 3, W2, 2)
3881
+ ARG (int, 4, W3, 3)
3882
+ ARG (int, 5, W4, 4)
3883
+ ARG (int, 6, W5, 5)
3884
+ ARG (int, 7, W6, 6)
3885
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
3887
+#ifndef __AAPCS64_BIG_ENDIAN__
3888
+ LAST_ANON (int, 8, STACK + 16, 8)
3890
+ LAST_ANON (int, 8, STACK + 20, 8)
3893
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
3894
===================================================================
3895
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release)
3896
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch)
3898
+/* { dg-do assemble } */
3899
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
3902
+test (int a, double b, int c, int d, int e)
3905
+ __asm__ __volatile ("// %0, %1"
3908
+ : /* No clobbers */
3912
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
3913
===================================================================
3914
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
3915
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
3917
+/* { dg-do run } */
3918
+/* { dg-options "-std=gnu99" } */
3920
+#include <stdlib.h>
3921
+#include <stdarg.h>
3923
+#define NC __attribute__((noinline,noclone))
3925
+void NC vfun (char n, ...)
3936
+ if (11 != va_arg (ap, int))
3940
+ if (2222 != va_arg (ap, int))
3944
+ if (333333 != va_arg (ap, __int24))
3948
+ if (44444444 != va_arg (ap, long))
3952
+ if (8888888888888888 != va_arg (ap, long long))
3961
+void NC boo_qi (const __flash char *p)
3966
+void NC boox_qi (const __memx char *p)
3971
+void NC boo_hi (const __flash int *p)
3976
+void NC boox_hi (const __memx int *p)
3981
+void NC boo_psi (const __flash __int24 *p)
3986
+void NC boox_psi (const __memx __int24 *p)
3991
+void NC boo_si (const __flash long *p)
3996
+void NC boox_si (const __memx long *p)
4001
+void NC boo_di (const __flash long long *p)
4006
+void NC boox_di (const __memx long long *p)
4011
+const __flash char f_qi = 11;
4012
+const __flash int f_hi = 2222;
4013
+const __flash __int24 f_psi = 333333;
4014
+const __flash long f_si = 44444444;
4015
+const __flash long long f_di = 8888888888888888;
4017
+const __memx char x_qi = 11;
4018
+const __memx int x_hi = 2222;
4019
+const __memx __int24 x_psi = 333333;
4020
+const __memx long x_si = 44444444;
4021
+const __memx long long x_di = 8888888888888888;
4025
+__int24 r_psi = 333333;
4026
+long r_si = 44444444;
4027
+long long r_di = 8888888888888888;
4039
+ boox_psi (&x_psi);
4045
+ boox_psi (&r_psi);
4051
Index: gcc/testsuite/gcc.target/i386/pr61923.c
4052
===================================================================
4053
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release)
4054
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch)
4056
+/* PR debug/61923 */
4057
+/* { dg-do compile } */
4058
+/* { dg-options "-O2 -fcompare-debug" } */
4070
+struct ext4_map_blocks
4076
+int ext4_da_map_blocks_ei_0;
4077
+void fn1 (int p1, struct ext4_map_blocks *p2)
4082
+ ext4_da_map_blocks_ei_0++;
4083
+ arch_spinlock_t *lock;
4084
+ switch (sizeof *&lock->tickets.head)
4086
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
4090
+ fn2 (p2->m_lblk, p2->m_len);
4092
Index: gcc/testsuite/gcc.target/i386/pr61423.c
4093
===================================================================
4094
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
4095
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
4097
+/* PR target/61423 */
4098
+/* { dg-do run { target ia32 } } */
4099
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
4102
+static unsigned int A[N];
4105
+__attribute__((noinline))
4108
+ unsigned int sum = 0;
4112
+ for (i = 0; i < N; i++)
4125
+ for(i = 0; i < N; i++)
4131
+ __builtin_abort ();
4135
Index: gcc/testsuite/gcc.target/i386/pr60901.c
4136
===================================================================
4137
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
4138
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
4140
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
4143
+extern void bar (void);
4144
+extern int baz (int);
4150
+ for (j = 0; j < n; j++)
4152
+ for (i = 1; i < j; i++)
4157
Index: gcc/testsuite/gcc.target/i386/pr61801.c
4158
===================================================================
4159
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release)
4160
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch)
4162
+/* PR rtl-optimization/61801 */
4163
+/* { dg-do compile } */
4164
+/* { dg-options "-Os -fcompare-debug" } */
4178
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
4183
Index: gcc/testsuite/gcc.target/i386/pr61446.c
4184
===================================================================
4185
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
4186
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
4188
+/* PR rtl-optimization/61446 */
4190
+/* { dg-do compile { target { ia32 } } } */
4191
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
4196
+ const double dfa = a;
4197
+ const unsigned int hi = dfa / 0x1p32f;
4198
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
4200
+ return ((unsigned long long) hi << (4 * (8))) | lo;
4202
Index: gcc/testsuite/gcc.target/i386/pr63947.c
4203
===================================================================
4204
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../tags/gcc_4_8_3_release)
4205
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../branches/gcc-4_8-branch)
4207
+/* PR target/63947 */
4208
+/* { dg-do assemble } */
4209
+/* { dg-options "-Os" } */
4210
+/* { dg-additional-options "-march=i686" { target ia32 } } */
4212
+long double foo (unsigned a, unsigned b)
4216
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
4217
===================================================================
4218
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release)
4219
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch)
4221
+/* { dg-do run } */
4222
+/* { dg-options "-march=octeon" } */
4224
+extern void abort (void);
4228
+ struct node *next;
4229
+ struct node *prev;
4236
+ struct node *first;
4239
+struct head heads[5];
4243
+struct head *head = &heads[2];
4245
+static int __attribute__((noinline))
4248
+ node.prev = (void *)head;
4249
+ head->first = &node;
4251
+ struct node *n = head->first;
4252
+ struct head *h = &heads[k];
4253
+ struct node *next = n->next;
4255
+ if (n->prev == (void *)h)
4258
+ n->prev->next = next;
4260
+ n->next = h->first;
4261
+ return n->next == &node;
4271
Index: gcc/testsuite/gcc.target/sh/pr61996.c
4272
===================================================================
4273
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
4274
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
4276
+/* Check that the option -musermode has no effect on targets that do not
4277
+ support user/privileged mode and that it does not interfere with option
4278
+ -matomic-model=soft-imask. */
4279
+/* { dg-do compile } */
4280
+/* { dg-options "-matomic-model=soft-imask" } */
4281
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
4288
Index: gcc/testsuite/lib/target-supports.exp
4289
===================================================================
4290
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
4291
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
4292
@@ -1790,6 +1790,15 @@
4296
+# Return 1 if the target supports long double of 128 bits,
4299
+proc check_effective_target_longdouble128 { } {
4300
+ return [check_no_compiler_messages longdouble128 object {
4301
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
4305
# Return 1 if the target supports double of 64 bits,
4308
@@ -5329,3 +5338,40 @@
4313
+# Return 1 if <fenv.h> is available with all the standard IEEE
4314
+# exceptions and floating-point exceptions are raised by arithmetic
4315
+# operations. (If the target requires special options for "inexact"
4316
+# exceptions, those need to be specified in the testcases.)
4318
+proc check_effective_target_fenv_exceptions {} {
4319
+ return [check_runtime fenv_exceptions {
4321
+ #include <stdlib.h>
4322
+ #ifndef FE_DIVBYZERO
4323
+ # error Missing FE_DIVBYZERO
4325
+ #ifndef FE_INEXACT
4326
+ # error Missing FE_INEXACT
4328
+ #ifndef FE_INVALID
4329
+ # error Missing FE_INVALID
4331
+ #ifndef FE_OVERFLOW
4332
+ # error Missing FE_OVERFLOW
4334
+ #ifndef FE_UNDERFLOW
4335
+ # error Missing FE_UNDERFLOW
4337
+ volatile float a = 0.0f, r;
4342
+ if (fetestexcept (FE_INVALID))
4349
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
4350
===================================================================
4351
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
4352
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
4354
! { dg-require-effective-target fortran_large_real }
4355
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
4356
-! Test XFAILed on these platforms because the system's printf() lacks
4357
+! { dg-do run { xfail powerpc*-apple-darwin* } }
4358
+! Test XFAILed on this platform because the system's printf() lacks
4359
! proper support for denormalized long doubles. See PR24685
4361
! This tests that the default formats for formatted I/O of reals are
4362
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
4363
===================================================================
4364
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release)
4365
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch)
4367
+! { dg-do compile }
4368
+! { dg-options "-fdump-tree-original" }
4369
+! PR 61999 - this used to ICE.
4370
+! Original test case by A. Kasahara
4372
+ use, intrinsic:: iso_fortran_env, only: output_unit
4376
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
4380
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
4381
+! { dg-final { cleanup-tree-dump "original" } }
4382
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
4383
===================================================================
4384
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release)
4385
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch)
4388
+! { dg-do compile }
4389
+! { dg-options "-fopenmp" }
4392
+ integer, parameter :: p(2) = (/ 11, 12 /)
4395
+ !$omp parallel do default(none)
4400
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
4401
===================================================================
4402
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release)
4403
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch)
4406
+! { dg-do compile }
4407
+! { dg-options "-fopenmp" }
4411
+ integer :: s1, s2, s3
4414
+ type(t), parameter :: u = t(1, 2, 3)
4416
+ !$omp parallel do default(none)
4421
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
4422
===================================================================
4423
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
4424
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
4427
+! { dg-options "-fcray-pointer" }
4442
+ if (z /= 42) call abort
4444
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
4445
===================================================================
4446
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release)
4447
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch)
4450
+! Tests fix for PR61780 in which the loop reversal mechanism was
4451
+! not accounting for the first index being an element so that no
4452
+! loop in this dimension is created.
4454
+! Contributed by Manfred Tietze on clf.
4458
+ integer, parameter :: n = 10, k = 3
4460
+ integer, dimension(n,n) :: y
4461
+ integer :: res1(n), res2(n)
4474
+ y(k,4:n) = y(k,3:n-1)
4478
+ y(k,n:4:-1) = y(k,n-1:3:-1)
4483
+ if (any(res1 /= res2)) call abort ()
4485
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
4486
===================================================================
4487
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
4488
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
4490
+C { dg-do compile }
4492
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
4495
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
4498
Index: gcc/testsuite/gfortran.dg/nint_2.f90
4499
===================================================================
4500
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
4501
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
4503
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
4506
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
4507
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
4508
+! Note that this doesn't fail on powerpc64le-*-linux*.
4510
integer(kind=8) :: i1, i2
4512
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
4513
===================================================================
4514
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release)
4515
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch)
4519
call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4520
- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4521
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
4522
call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4523
call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
4525
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
4526
===================================================================
4527
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release)
4528
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch)
4531
+! { dg-options "-ffrontend-optimize" }
4532
+! PR 62214 - this used to give the wrong result.
4533
+! Original test case by Oliver Fuhrer
4536
+ CHARACTER(LEN=20) :: fullNames(2)
4537
+ CHARACTER(LEN=255) :: pathName
4538
+ CHARACTER(LEN=5) :: fileNames(2)
4540
+ pathName = "/dir1/dir2/"
4541
+ fileNames = (/ "file1", "file2" /)
4542
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
4543
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
4544
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
4546
Index: gcc/testsuite/gfortran.dg/pr45636.f90
4547
===================================================================
4548
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
4549
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
4554
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
4555
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
4556
! { dg-final { cleanup-tree-dump "forwprop2" } }
4557
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
4558
===================================================================
4559
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
4560
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
4563
+! Test the fix for PR61459.
4565
+! Contributed by John Wingate <johnww@tds.net>
4571
+ public :: f_segfault, f_segfault_plus, f_workaround
4572
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
4576
+ function f_segfault(x)
4577
+ real, dimension(:), allocatable :: f_segfault
4578
+ real, dimension(:), intent(in) :: x
4579
+ allocate(f_segfault(2))
4580
+ f_segfault = matmul(b,x)
4581
+ end function f_segfault
4583
+! Sefaulted without the ALLOCATE as well.
4584
+ function f_segfault_plus(x)
4585
+ real, dimension(:), allocatable :: f_segfault_plus
4586
+ real, dimension(:), intent(in) :: x
4587
+ f_segfault_plus = matmul(b,x)
4588
+ end function f_segfault_plus
4590
+ function f_workaround(x)
4591
+ real, dimension(:), allocatable :: f_workaround
4592
+ real, dimension(:), intent(in) :: x
4593
+ real, dimension(:), allocatable :: tmp
4594
+ allocate(f_workaround(2),tmp(2))
4596
+ f_workaround = tmp
4597
+ end function f_workaround
4604
+ real, dimension(2) :: x = 1.0, y
4605
+ y = f_workaround (x)
4606
+ if (any (f_segfault (x) .ne. y)) call abort
4607
+ if (any (f_segfault_plus (x) .ne. y)) call abort
4609
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
4610
===================================================================
4611
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release)
4612
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch)
4615
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]
4616
real,parameter :: myeps(size(values)) = epsilon(0.0) &
4617
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
4618
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
4619
! The following is sufficient for me - the values above are a bit
4621
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
4622
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
4623
===================================================================
4624
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
4625
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
4627
+/* PR rtl-optimization/63659 */
4629
+int a, b, c, *d = &b, g, h, i;
4638
+ for (a = 0; a; a++)
4645
+ char j = c, k = -1, l;
4647
+ f = l == 0 ? k : k % l;
4652
+ __builtin_abort ();
4656
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
4657
===================================================================
4658
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
4659
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
4661
+#ifdef __INT32_TYPE__
4662
+typedef __INT32_TYPE__ int32_t;
4664
+typedef int int32_t;
4667
+#ifdef __UINT32_TYPE__
4668
+typedef __UINT32_TYPE__ uint32_t;
4670
+typedef unsigned uint32_t;
4673
+#define __fake_const_swab32(x) ((uint32_t)( \
4674
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
4675
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
4676
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
4677
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
4679
+/* Previous version of bswap optimization failed to consider sign extension
4680
+ and as a result would replace an expression *not* doing a bswap by a
4683
+__attribute__ ((noinline, noclone)) uint32_t
4684
+fake_bswap32 (uint32_t in)
4686
+ return __fake_const_swab32 (in);
4692
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
4694
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4696
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
4697
+ __builtin_abort ();
4700
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
4701
===================================================================
4702
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
4703
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
4705
+set additional_flags "-Wno-psabi"
4707
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
4708
===================================================================
4709
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release)
4710
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch)
4718
+static union U u = { 0x12345678 };
4720
+/* Constant folding used to fail to account for endianness when folding a
4726
+#ifdef __BYTE_ORDER__
4727
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4728
+ return u.b - 0x45678;
4730
+ return u.b - 0x12345;
4735
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
4736
===================================================================
4737
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
4738
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
4750
+ __builtin_abort ();
4753
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
4754
===================================================================
4755
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release)
4756
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch)
4758
set additional_flags "-mno-mmx"
4761
+set additional_flags "-Wno-psabi"
4763
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
4764
===================================================================
4765
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
4766
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
4768
+#ifdef __INT16_TYPE__
4769
+typedef __INT16_TYPE__ int16_t;
4771
+typedef short int16_t;
4774
+#ifdef __UINT32_TYPE__
4775
+typedef __UINT32_TYPE__ uint32_t;
4777
+typedef unsigned uint32_t;
4780
+#define __fake_const_swab32(x) ((uint32_t)( \
4781
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
4782
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
4783
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
4784
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
4787
+/* Previous version of bswap optimization failed to consider sign extension
4788
+ and as a result would replace an expression *not* doing a bswap by a
4791
+__attribute__ ((noinline, noclone)) uint32_t
4792
+fake_bswap32 (uint32_t in)
4794
+ return __fake_const_swab32 (in);
4800
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
4802
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
4804
+ if (fake_bswap32 (0x81828384) != 0xff838281)
4805
+ __builtin_abort ();
4808
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
4809
===================================================================
4810
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
4811
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
4813
+#ifdef __UINT64_TYPE__
4814
+typedef __UINT64_TYPE__ uint64_t;
4816
+typedef unsigned long long uint64_t;
4819
+#ifndef __SIZEOF_INT128__
4820
+#define __int128 long long
4823
+/* Some version of bswap optimization would ICE when analyzing a mask constant
4824
+ too big for an HOST_WIDE_INT (PR61375). */
4826
+__attribute__ ((noinline, noclone)) uint64_t
4827
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
4829
+ __int128 mask = (__int128)0xffff << 56;
4830
+ return ((in1 & mask) >> 56) | in2;
4837
+#ifdef __SIZEOF_INT128__
4840
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
4842
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
4844
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
4845
+ __builtin_abort ();
4848
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
4849
===================================================================
4850
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release)
4851
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch)
4856
+set additional_flags "-Wno-psabi"
4858
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
4859
===================================================================
4860
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release)
4861
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch)
4863
+set additional_flags "-Wno-psabi"
4865
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
4866
===================================================================
4867
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
4868
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
4870
+/* PR tree-optimization/61684 */
4875
+static short **e = 0;
4880
+ for (; c < 1; c++)
4883
+ a = d && (c && 1) & *b;
4885
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
4886
===================================================================
4887
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
4888
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
4890
+/* PR middle-end/64067 */
4892
+struct S { int s; };
4893
+int *const v[1] = { &((struct S) { .s = 42 }).s };
4900
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
4901
===================================================================
4902
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
4903
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
4905
+/* PR inline-asm/63282 */
4912
+ asm volatile goto ("" : : : : a, b);
4918
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
4919
===================================================================
4920
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release)
4921
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch)
4923
+with Ada.Streams; use Ada.Streams;
4925
+package body Opt41_Pkg is
4927
+ type Wstream is new Root_Stream_Type with record
4928
+ S : Unbounded_String;
4931
+ procedure Read (Stream : in out Wstream;
4932
+ Item : out Stream_Element_Array;
4933
+ Last : out Stream_Element_Offset) is null;
4935
+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
4937
+ for J in Item'Range loop
4938
+ Append (Stream.S, Character'Val (Item (J)));
4942
+ function Rec_Write (R : Rec) return Unbounded_String is
4943
+ S : aliased Wstream;
4945
+ Rec'Output (S'Access, R);
4949
+ type Rstream is new Root_Stream_Type with record
4950
+ S : String_Access;
4951
+ Idx : Integer := 1;
4954
+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
4956
+ procedure Read (Stream : in out Rstream;
4957
+ Item : out Stream_Element_Array;
4958
+ Last : out Stream_Element_Offset) is
4960
+ Last := Stream_Element_Offset'Min
4961
+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
4962
+ for I in Item'First .. Last loop
4963
+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
4964
+ Stream.Idx := Stream.Idx + 1;
4968
+ function Rec_Read (Str : String_Access) return Rec is
4969
+ S : aliased Rstream;
4972
+ return Rec'Input (S'Access);
4976
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
4977
===================================================================
4978
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release)
4979
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch)
4981
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
4983
+package Opt41_Pkg is
4985
+ type Enum is (One, Two, Three, Four, Five, Six);
4987
+ type Rec (D : Enum) is record
4991
+ when Two | Five | Six =>
4992
+ S : Unbounded_String;
4994
+ when Two => B : Boolean;
4995
+ when others => null;
5002
+ type Rec_Ptr is access all Rec;
5004
+ function Rec_Write (R : Rec) return Unbounded_String;
5006
+ function Rec_Read (Str : String_Access) return Rec;
5009
Index: gcc/testsuite/gnat.dg/opt39.adb
5010
===================================================================
5011
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
5012
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
5014
+-- { dg-do compile }
5015
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
5017
+procedure Opt39 (I : Integer) is
5019
+ type Rec is record
5027
+ procedure Set (A : access Rec; I : Integer) is
5028
+ Tmp : Rec := A.all;
5037
+ Set (R'Access, I);
5039
+ raise Program_Error;
5043
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
5044
+-- { dg-final { cleanup-tree-dump "optimized" } }
5045
Index: gcc/testsuite/gnat.dg/opt41.adb
5046
===================================================================
5047
--- a/src/gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release)
5048
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch)
5051
+-- { dg-options "-Os" }
5053
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5054
+with Opt41_Pkg; use Opt41_Pkg;
5057
+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
5058
+ SP : String_Access := new String'(To_String (Rec_Write (R)));
5059
+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
5061
+ if RP.D /= R.D then
5062
+ raise Program_Error;
5065
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
5066
===================================================================
5067
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
5068
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
5071
+-- { dg-options "-gnato -O" }
5073
+procedure Overflow_Fixed is
5075
+ type Unsigned_8_Bit is mod 2**8;
5077
+ procedure Fixed_To_Eight (Value : Duration) is
5078
+ Item : Unsigned_8_Bit;
5080
+ Item := Unsigned_8_Bit(Value);
5081
+ raise Program_Error;
5083
+ when Constraint_Error => null; -- expected case
5087
+ Fixed_To_Eight (-0.5);
5089
Index: gcc/testsuite/gnat.dg/aliasing1.adb
5090
===================================================================
5091
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
5092
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
5097
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
5098
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
5099
-- { dg-final { cleanup-tree-dump "optimized" } }
5100
Index: gcc/testsuite/gcc.dg/pr60866.c
5101
===================================================================
5102
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
5103
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
5105
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
5106
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
5111
+foo (int w, int **dnroot, int **dn)
5114
+ int *xchild = xchild;
5115
+ for (; w < n; w++)
5119
+ for (child = *dn; child; child = xchild)
5123
Index: gcc/testsuite/gcc.dg/pr51879-12.c
5124
===================================================================
5125
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../tags/gcc_4_8_3_release)
5126
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../branches/gcc-4_8-branch)
5131
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
5132
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
5133
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
5134
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
5135
/* { dg-final { cleanup-tree-dump "pre" } } */
5136
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
5137
===================================================================
5138
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release)
5139
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch)
5141
/* { dg-do compile } */
5142
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5143
#include <altivec.h>
5144
typedef const volatile unsigned int _1;
5145
typedef const unsigned int _2;
5146
Index: gcc/testsuite/gcc.dg/vmx/ops.c
5147
===================================================================
5148
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release)
5149
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch)
5151
/* { dg-do compile } */
5152
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5153
#include <altivec.h>
5155
extern char * *var_char_ptr;
5156
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
5157
===================================================================
5158
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
5159
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
5161
/* { dg-do compile } */
5162
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5164
/* Checks from the original ops.c that pass pointers to long or
5165
unsigned long for operations that support that in released versions
5166
Index: gcc/testsuite/gcc.dg/pr63665.c
5167
===================================================================
5168
--- a/src/gcc/testsuite/gcc.dg/pr63665.c (.../tags/gcc_4_8_3_release)
5169
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c (.../branches/gcc-4_8-branch)
5171
+/* { dg-do run } */
5172
+/* { dg-require-effective-target int32plus } */
5173
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
5178
+ int y = 0x80000000;
5185
+ if (test5 (0x80000000) != 0)
5186
+ __builtin_abort ();
5189
Index: gcc/testsuite/gcc.dg/pr63342.c
5190
===================================================================
5191
--- a/src/gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release)
5192
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch)
5194
+/* PR debug/63342 */
5195
+/* { dg-do compile } */
5196
+/* { dg-options "-g -O2" } */
5197
+/* { dg-additional-options "-fpic" { target fpic } } */
5199
+static __thread double u[9], v[9];
5202
+foo (double **p, double **q)
5213
+ for (i = 0; i < 9; i++)
5215
+ double a = x + v[i];
5216
+ s += u[i] * a * a;
5220
Index: gcc/testsuite/gcc.dg/pr63284.c
5221
===================================================================
5222
--- a/src/gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release)
5223
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch)
5225
+/* PR debug/63284 */
5226
+/* { dg-do compile } */
5227
+/* { dg-options "-O2 -fcompare-debug" } */
5229
+int a[10], *b, *d, c, f;
5267
Index: gcc/testsuite/gcc.dg/pr61045.c
5268
===================================================================
5269
--- a/src/gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release)
5270
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch)
5272
+/* { dg-do run } */
5273
+/* { dg-options "-fstrict-overflow" } */
5278
+ int b = __INT_MAX__;
5279
+ int t = (a - 2) > (b - 1);
5281
+ __builtin_abort();
5284
Index: gcc/testsuite/gcc.dg/pr62167-run.c
5285
===================================================================
5286
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../tags/gcc_4_8_3_release)
5287
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../branches/gcc-4_8-branch)
5289
+/* { dg-do run } */
5290
+/* { dg-options "-O2 -ftree-tail-merge" } */
5294
+ struct node *next;
5295
+ struct node *prev;
5302
+ struct node *first;
5305
+struct head heads[5];
5309
+struct head *head = &heads[2];
5316
+ node.next = (void*)0;
5318
+ node.prev = (void *)head;
5320
+ head->first = &node;
5322
+ struct node *n = head->first;
5324
+ struct head *h = &heads[k];
5326
+ heads[2].first = n->next;
5328
+ if ((void*)n->prev == (void *)h)
5331
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5332
+ p = n->prev->next;
5334
+ return !(p == (void*)0);
5336
Index: gcc/testsuite/gcc.dg/pr52769.c
5337
===================================================================
5338
--- a/src/gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release)
5339
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch)
5342
+/* { dg-do run } */
5343
+/* { dg-options "-O3" } */
5347
+ int should_be_zero;
5355
+ volatile foo_t foo = {
5360
+ if (foo.should_be_zero != 0)
5361
+ __builtin_abort ();
5365
Index: gcc/testsuite/gcc.dg/pr62167.c
5366
===================================================================
5367
--- a/src/gcc/testsuite/gcc.dg/pr62167.c (.../tags/gcc_4_8_3_release)
5368
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c (.../branches/gcc-4_8-branch)
5370
+/* { dg-do compile } */
5371
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
5375
+ struct node *next;
5376
+ struct node *prev;
5383
+ struct node *first;
5386
+struct head heads[5];
5390
+struct head *head = &heads[2];
5397
+ node.next = (void*)0;
5399
+ node.prev = (void *)head;
5401
+ head->first = &node;
5403
+ struct node *n = head->first;
5405
+ struct head *h = &heads[k];
5407
+ heads[2].first = n->next;
5409
+ if ((void*)n->prev == (void *)h)
5412
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5413
+ p = n->prev->next;
5415
+ return !(p == (void*)0);
5418
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
5419
+/* { dg-final { cleanup-tree-dump "pre" } } */
5420
Index: gcc/testsuite/gcc.dg/pr62004.c
5421
===================================================================
5422
--- a/src/gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release)
5423
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch)
5425
+/* { dg-do run } */
5426
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
5430
+ struct node *next;
5431
+ struct node *prev;
5438
+ struct node *first;
5441
+struct head heads[5];
5445
+struct head *head = &heads[2];
5452
+ node.next = (void*)0;
5454
+ node.prev = (void *)head;
5456
+ head->first = &node;
5458
+ struct node *n = head->first;
5460
+ struct head *h = &heads[k];
5462
+ heads[2].first = n->next;
5464
+ if ((void*)n->prev == (void *)h)
5467
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5468
+ p = n->prev->next;
5470
+ return !(p == (void*)0);
5472
Index: gcc/testsuite/gcc.dg/pr51879-18.c
5473
===================================================================
5474
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release)
5475
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch)
5480
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
5481
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
5482
/* { dg-final { cleanup-tree-dump "pre" } } */
5483
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
5484
===================================================================
5485
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release)
5486
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch)
5488
+/* { dg-do run } */
5490
+extern void abort (void);
5492
+struct node { struct node *next, *prev; } node;
5493
+struct head { struct node *first; } heads[5];
5495
+struct head *head = &heads[2];
5497
+static int __attribute__((noinline))
5500
+ node.prev = (void *)head;
5501
+ head->first = &node;
5503
+ struct node *n = head->first;
5504
+ struct head *h = &heads[k];
5506
+ if (n->prev == (void *)h)
5507
+ h->first = n->next;
5509
+ n->prev->next = n->next;
5511
+ n->next = h->first;
5512
+ return n->next == &node;
5521
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
5522
===================================================================
5523
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release)
5524
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch)
5526
+/* { dg-do compile } */
5531
+ unsigned b = (a * 64 & 192) | 63U;
5534
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
5535
===================================================================
5536
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release)
5537
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch)
5539
+/* { dg-do run } */
5546
+fn1 (int p1, char p2)
5548
+ return p1 || p2 ? 0 : p2;
5559
+ b = fn1 (g = d = e, g);
5570
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
5571
===================================================================
5572
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
5573
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
5575
+/* { dg-do run } */
5577
+int a, b = 1, c, d, e, f, g;
5586
+ g = g ? 0 : 1 % g;
5588
+ for (; d < 1; d = e)
5610
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
5611
===================================================================
5612
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release)
5613
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch)
5615
+/* Test that exact underflow in __float128 signals the underflow
5616
+ exception if trapping is enabled, but does not raise the flag
5619
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
5620
+/* { dg-options "-D_GNU_SOURCE" } */
5621
+/* { dg-require-effective-target fenv_exceptions } */
5624
+#include <setjmp.h>
5625
+#include <signal.h>
5626
+#include <stdlib.h>
5628
+volatile sig_atomic_t caught_sigfpe;
5632
+handle_sigfpe (int sig)
5634
+ caught_sigfpe = 1;
5635
+ siglongjmp (buf, 1);
5641
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
5642
+ volatile __float128 r;
5644
+ if (fetestexcept (FE_UNDERFLOW))
5646
+ if (r != 0x1p-16384q)
5648
+ feenableexcept (FE_UNDERFLOW);
5649
+ signal (SIGFPE, handle_sigfpe);
5650
+ if (sigsetjmp (buf, 1) == 0)
5652
+ if (!caught_sigfpe)
5656
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
5657
===================================================================
5658
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../tags/gcc_4_8_3_release)
5659
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../branches/gcc-4_8-branch)
5661
+/* { dg-do run } */
5663
+#include <stdlib.h>
5665
+#define NUM_OF_STATES 4
5666
+typedef unsigned int entry_t[2];
5667
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
5669
+void __attribute__((noinline,noclone))
5670
+test_00(size_t numOfStates, entries_item_t* p_bm,
5671
+ const unsigned int* polyArray,
5672
+ size_t polyArraySize)
5675
+ unsigned int hlp0, hlp1;
5676
+ for (idx = 0; idx < numOfStates; ++idx)
5680
+ hlp0 = (idx << 1) | 0x00;
5681
+ hlp1 = (idx << 1) | 0x01;
5682
+ p_bm->metricEntries_[idx][0] = 0;
5683
+ p_bm->metricEntries_[idx][1] = 0;
5684
+ for (idy = 0; idy < polyArraySize; ++idy)
5686
+ p_bm->metricEntries_[idx][0]
5687
+ |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
5688
+ p_bm->metricEntries_[idx][1]
5689
+ |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
5696
+ unsigned int polyArray[] = { 0x07, 0x05 };
5697
+ entries_item_t* pBranchMetrics;
5698
+ pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
5699
+ test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
5700
+ sizeof(polyArray) / sizeof(polyArray[0]));
5701
+ if (pBranchMetrics->metricEntries_[0][0] != 0
5702
+ || pBranchMetrics->metricEntries_[0][1] != 3
5703
+ || pBranchMetrics->metricEntries_[1][0] != 1
5704
+ || pBranchMetrics->metricEntries_[1][1] != 2
5705
+ || pBranchMetrics->metricEntries_[2][0] != 3
5706
+ || pBranchMetrics->metricEntries_[2][1] != 0
5707
+ || pBranchMetrics->metricEntries_[3][0] != 2
5708
+ || pBranchMetrics->metricEntries_[3][1] != 1)
5710
+ free(pBranchMetrics);
5713
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
5714
===================================================================
5715
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release)
5716
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch)
5718
T (20, 0, 4, 1, 5) \
5719
T (21, 2, 6, 3, 7) \
5720
T (22, 1, 2, 3, 0) \
5722
+T (23, 2, 1, 0, 3) \
5725
T (116, 1, 2, 4, 3) \
5726
T (117, 7, 3, 3, 0) \
5728
T (119, 0, 3, 5, 6) \
5729
T (120, 0, 0, 1, 5) \
5730
T (121, 4, 6, 2, 1) \
5731
-T (122, 2, 5, 6, 3) \
5732
T (123, 4, 6, 3, 2) \
5733
T (124, 4, 7, 5, 6) \
5734
T (125, 0, 4, 2, 4) \
5735
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
5736
===================================================================
5737
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release)
5738
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch)
5740
/* { dg-do compile } */
5741
/* { dg-options "-Wstack-usage=512" } */
5744
+int foo1 (void) /* { dg-bogus "stack usage" } */
5749
-} /* { dg-bogus "stack usage" } */
5753
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5758
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
5762
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5764
char arr[1024] __attribute__((aligned (512)));
5767
/* Force dynamic realignment of argument pointer. */
5768
__builtin_apply ((void (*)()) foo2, 0, 0);
5772
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
5775
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
5780
-} /* { dg-warning "stack usage might be unbounded" } */
5782
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
5783
===================================================================
5784
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release)
5785
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch)
5787
+/* { dg-do compile } */
5788
+/* { dg-options "-O3" } */
5798
+static int fn2 (struct S);
5799
+void fn3 (struct S);
5804
+ struct S h = { 0, 0 };
5812
+ struct S j = { 0, 0 };
5831
+ struct S f = { 0, 0 };
5835
Index: gcc/testsuite/gcc.dg/pr62030.c
5836
===================================================================
5837
--- a/src/gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release)
5838
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch)
5840
+/* { dg-do run } */
5841
+/* { dg-options "-O2" } */
5843
+extern void abort (void);
5847
+ struct node *next;
5848
+ struct node *prev;
5855
+ struct node *first;
5858
+struct head heads[5];
5862
+struct head *head = &heads[2];
5864
+static int __attribute__((noinline))
5867
+ node.prev = (void *)head;
5868
+ head->first = &node;
5870
+ struct node *n = head->first;
5871
+ struct head *h = &heads[k];
5872
+ struct node *next = n->next;
5874
+ if (n->prev == (void *)h)
5877
+ n->prev->next = next;
5879
+ n->next = h->first;
5880
+ return n->next == &node;
5890
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
5891
===================================================================
5892
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
5893
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
5895
+/* PR tree-optimization/63341 */
5896
+/* { dg-do run } */
5898
+#include "tree-vect.h"
5900
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
5901
+struct S { char e __attribute__((aligned (64))); U s[32]; };
5902
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
5903
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
5904
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
5905
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
5906
+unsigned short d[32] = { 1 };
5908
+__attribute__((noinline, noclone)) void
5912
+ for (i = 0; i < 32; i++)
5913
+ d[i] = t.s[i].s + 4;
5914
+ for (i = 0; i < 32; i++)
5915
+ if (d[i] != t.s[i].s + 4)
5918
+ asm volatile ("" : : : "memory");
5929
+/* { dg-final { cleanup-tree-dump "vect" } } */
5930
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
5931
===================================================================
5932
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release)
5933
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch)
5935
+/* PR tree-optimization/63189 */
5936
+/* { dg-do run } */
5938
+#include "tree-vect.h"
5940
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
5942
+__attribute__((noinline, noclone)) void
5946
+ for (j = 0; j < 8; j++)
5960
+/* { dg-final { cleanup-tree-dump "vect" } } */
5961
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
5962
===================================================================
5963
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release)
5964
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch)
5966
+/* { dg-require-effective-target vect_int } */
5968
+#include <stdarg.h>
5969
+#include "tree-vect.h"
5974
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5975
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5977
+/* (short, int)->int->int dot product.
5978
+ Not detected as a dot-product pattern. */
5980
+__attribute__ ((noinline)) int
5986
+ for (i = 0; i < len; i++)
5988
+ result += (X[i] * Y[i]);
5994
+/* (int, short)->int->int dot product.
5995
+ Not detected as a dot-product pattern. */
5997
+__attribute__ ((noinline)) int
6003
+ for (i = 0; i < len; i++)
6005
+ result += (Y[i] * X[i]);
6018
+ for (i = 0; i < N; i++)
6022
+ __asm__ volatile ("");
6036
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
6037
+/* { dg-final { cleanup-tree-dump "vect" } } */
6039
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
6040
===================================================================
6041
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../tags/gcc_4_8_3_release)
6042
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../branches/gcc-4_8-branch)
6044
+/* PR tree-optimization/63379 */
6045
+/* { dg-do run } */
6047
+#include "tree-vect.h"
6049
+extern void abort (void);
6056
+Point pt_array[25];
6058
+void __attribute__((noinline,noclone))
6059
+generate_array(void)
6062
+ for (i = 0; i<25; i++)
6064
+ pt_array[i].x = i;
6065
+ pt_array[i].y = 1000+i;
6072
+ generate_array ();
6073
+ Point min_pt = pt_array[0];
6074
+ Point *ptr, *ptr_end;
6075
+ for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
6077
+ min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
6078
+ min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
6081
+ if (min_pt.x != 0 || min_pt.y != 1000)
6086
+/* { dg-final { cleanup-tree-dump "vect" } } */
6087
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
6088
===================================================================
6089
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release)
6090
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch)
6092
+/* { dg-do compile } */
6093
+/* { dg-additional-options "-O1" } */
6103
+int foo (long long p_56, int * p_57)
6110
+ int **l_78 = &l_77;
6115
+ for (g_76 = 1; g_76 >= 0; g_76--)
6118
+ for (l_101 = 4; l_101 >= 0; l_101--)
6123
+ int **l_113 = &l_77;
6131
+/* { dg-final { cleanup-tree-dump "vect" } } */
6132
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
6133
===================================================================
6134
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
6135
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
6137
+/* PR tree-optimization/63189 */
6138
+/* { dg-additional-options "-fwrapv" } */
6139
+/* { dg-do run } */
6141
+#include "tree-vect.h"
6143
+__attribute__((noinline, noclone)) static int
6144
+bar (const short *a, int len)
6149
+ for (x = 0; x < len; x++)
6154
+__attribute__((noinline, noclone)) void
6157
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
6158
+ if (bar (stuff, 9) != 36)
6170
+/* { dg-final { cleanup-tree-dump "vect" } } */
6171
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
6172
===================================================================
6173
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release)
6174
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch)
6176
+/* { dg-do compile } */
6189
+ for (i = 0; i < 16; ++i)
6191
+ x->b[i][0] = a[i][0];
6192
+ x->c[i][0] = 0 != a[i][0];
6193
+ x->b[i][1] = a[i][1];
6197
+/* { dg-final { cleanup-tree-dump "vect" } } */
6198
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
6199
===================================================================
6200
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
6201
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
6203
+/* PR tree-optimization/63189 */
6204
+/* { dg-do run } */
6206
+#include "tree-vect.h"
6208
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
6209
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
6211
+__attribute__((noinline, noclone)) static int
6215
+ for (i = 0; i < 8; ++i)
6216
+ sum += a[i] * b[i];
6220
+__attribute__((noinline, noclone)) void
6235
+/* { dg-final { cleanup-tree-dump "vect" } } */
6236
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
6237
===================================================================
6238
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../tags/gcc_4_8_3_release)
6239
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../branches/gcc-4_8-branch)
6241
+/* { dg-do run } */
6243
+#include "tree-vect.h"
6245
+extern void abort (void);
6247
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
6254
+ for (; a < 8; a++)
6263
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
6264
===================================================================
6265
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
6266
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
6268
+/* PR tree-optimization/63341 */
6269
+/* { dg-do run } */
6271
+#include "tree-vect.h"
6273
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
6274
+struct S { char e __attribute__((aligned (64))); U s[32]; };
6275
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
6276
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
6277
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
6278
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
6279
+unsigned short d[32] = { 1 };
6281
+__attribute__((noinline, noclone)) void
6285
+ for (i = 0; i < 32; i++)
6287
+ if (__builtin_memcmp (d, t.s, sizeof d))
6299
+/* { dg-final { cleanup-tree-dump "vect" } } */
6300
Index: gcc/testsuite/ChangeLog
6301
===================================================================
6302
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
6303
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
6305
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
6307
+ Backported from mainline
6308
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
6310
+ PR middle-end/64067
6311
+ * gcc.c-torture/compile/pr64067.c: New test.
6313
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
6315
+ PR rtl-optimization/63659
6316
+ * gcc.c-torture/execute/pr63659.c: New test.
6318
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
6321
+ * c-c++-common/gomp/pr61200.c: New test.
6323
+2014-11-26 Richard Biener <rguenther@suse.de>
6325
+ Backport from mainline
6326
+ 2014-08-15 Richard Biener <rguenther@suse.de>
6328
+ PR tree-optimization/62031
6329
+ * gcc.dg/torture/pr62031.c: New testcase.
6331
+ 2014-10-10 Richard Biener <rguenther@suse.de>
6333
+ PR tree-optimization/63379
6334
+ * gcc.dg/vect/pr63379.c: New testcase.
6336
+ 2014-11-07 Richard Biener <rguenther@suse.de>
6338
+ PR tree-optimization/63605
6339
+ * gcc.dg/vect/pr63605.c: New testcase.
6341
+ 2014-10-28 Richard Biener <rguenther@suse.de>
6343
+ PR middle-end/63665
6344
+ * gcc.dg/pr63665.c: New testcase.
6346
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
6349
+ * gcc.target/i386/pr63947.c: New test.
6351
+2014-11-19 Tom de Vries <tom@codesourcery.com>
6353
+ Backport from mainline
6354
+ PR tree-optimization/62167
6355
+ * gcc.dg/pr51879-12.c: Add xfails.
6356
+ * gcc.dg/pr62167-run.c: New test.
6357
+ * gcc.dg/pr62167.c: New test.
6359
+2014-11-18 Teresa Johnson <tejohnson@google.com>
6361
+ Backport from mainline and gcc-4_9 branch.
6362
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
6364
+ PR tree-optimization/63841
6365
+ * g++.dg/tree-ssa/pr63841.C: New test.
6367
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
6370
+ * g++.dg/ipa/pr63838.C: New test.
6372
+2014-11-03 Marek Polacek <polacek@redhat.com>
6375
+ * gcc.dg/pr52769.c: New test.
6377
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6379
+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
6381
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
6383
+ * gnat.dg/opt41.adb: New test.
6384
+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
6386
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6388
+ Backport from mainline r215880
6389
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6391
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
6392
+ failing with the new warning message.
6393
+ * gcc.dg/vmx/3c-01a.c: Likewise.
6394
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
6395
+ * gcc.dg/vmx/ops.c: Likewise.
6396
+ * gcc.target/powerpc/altivec-20.c: Likewise.
6397
+ * gcc.target/powerpc/altivec-6.c: Likewise.
6398
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
6399
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
6400
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
6402
+ Backport from mainline r215882
6403
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6405
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
6407
+ Backport from mainline r216017
6408
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
6410
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
6411
+ * gcc.dg/vmx/ops.c: Likewise.
6412
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
6414
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
6417
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
6418
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
6420
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
6423
+ * gcc.dg/pr63342.c: New test.
6426
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
6427
+ to test 24 in TESTS.
6429
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
6431
+ Backport from mainline
6432
+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6434
+ * lib/target-supports.exp
6435
+ (check_effective_target_fenv_exceptions): New function.
6437
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
6439
+ PR inline-asm/63282
6440
+ * gcc.c-torture/compile/pr63282.c: New test.
6442
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
6444
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
6445
+ to default options.
6447
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6449
+ Backport from mainline r215559
6450
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6453
+ * gcc.target/powerpc/pr63335.c: New test.
6455
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
6457
+ PR tree-optimization/63341
6458
+ * gcc.dg/vect/pr63341-1.c: New test.
6459
+ * gcc.dg/vect/pr63341-2.c: New test.
6461
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
6463
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
6465
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
6468
+ * gcc.dg/pr63284.c: New test.
6470
+2014-09-09 Richard Biener <rguenther@suse.de>
6472
+ Backport from mainline
6473
+ 2014-06-11 Richard Biener <rguenther@suse.de>
6475
+ PR tree-optimization/61452
6476
+ * gcc.dg/torture/pr61452.c: New testcase.
6478
+2014-09-09 Richard Biener <rguenther@suse.de>
6480
+ Backport from mainline
6481
+ 2014-05-05 Richard Biener <rguenther@suse.de>
6483
+ PR middle-end/61010
6484
+ * gcc.dg/torture/pr61010.c: New testcase.
6486
+ 2014-05-28 Richard Biener <rguenther@suse.de>
6488
+ PR middle-end/61045
6489
+ * gcc.dg/pr61045.c: New testcase.
6491
+ 2014-08-11 Richard Biener <rguenther@suse.de>
6493
+ PR tree-optimization/62075
6494
+ * gcc.dg/vect/pr62075.c: New testcase.
6496
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
6498
+ PR tree-optimization/60196
6499
+ PR tree-optimization/63189
6500
+ * gcc.dg/vect/pr63189.c: New test.
6501
+ * gcc.dg/vect/pr60196-1.c: New test.
6502
+ * gcc.dg/vect/pr60196-2.c: New test.
6504
+ Backported from mainline
6505
+ 2013-09-17 Cong Hou <congh@google.com>
6507
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
6508
+ on two arrays with short and int types. This should not be recognized
6509
+ as a dot product pattern.
6511
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
6513
+ Backported from mainline
6514
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
6517
+ * gcc.target/i386/pr61923.c: New test.
6519
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
6521
+ PR testsuite/56194
6522
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
6524
+2014-09-03 Marek Polacek <polacek@redhat.com>
6526
+ Backport from mainline
6527
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
6530
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
6532
+2014-09-03 Martin Jambor <mjambor@suse.cz>
6535
+ * g++.dg/ipa/pr62015.C: New test.
6537
+2014-09-03 Martin Jambor <mjambor@suse.cz>
6540
+ * gcc.dg/ipa/pr61986.c: New test.
6542
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
6544
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
6545
+ failure on s390*-*-linux-gnu.
6547
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6549
+ Backport from mainline
6550
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
6553
+ * gcc.target/sh/pr61996.c: New.
6555
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
6557
+ Backport from trunk
6559
+ * gfortran.dg/array_assignment_5.f90: New test.
6561
+2014-08-15 Tom de Vries <tom@codesourcery.com>
6563
+ Backport from mainline:
6564
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
6566
+ PR rtl-optimization/62004
6567
+ PR rtl-optimization/62030
6568
+ * gcc.dg/pr62004.c: New test.
6569
+ * gcc.dg/pr62030.c: Same.
6570
+ * gcc.target/mips/pr62030-octeon.c: Same.
6572
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
6574
+ PR tree-optimization/62073
6575
+ * gcc.dg/vect/pr62073.c: New test.
6577
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6579
+ Backport from mainline
6580
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
6582
+ PR middle-end/62103
6583
+ * gcc.c-torture/execute/bitfld-6.c: New test.
6585
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
6587
+ Backport from trunk
6589
+ * gfortran.dg/dot_product_3.f90: New test case.
6591
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
6593
+ PR tree-optimization/60707
6594
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
6596
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
6598
+ PR rtl-optimization/61801
6599
+ * gcc.target/i386/pr61801.c: Rewritten.
6601
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
6603
+ Backport from mainline
6604
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6606
+ PR tree-optimization/61375
6607
+ * gcc.c-torture/execute/pr61375-1.c: New test.
6609
+2014-08-01 Richard Biener <rguenther@suse.de>
6611
+ PR tree-optimization/61964
6612
+ * gcc.dg/torture/pr61964.c: New testcase.
6613
+ * gcc.dg/pr51879-18.c: XFAIL.
6615
+2014-07-28 Richard Biener <rguenther@suse.de>
6617
+ PR rtl-optimization/61801
6618
+ * gcc.target/i386/pr61801.c: Fix testcase.
6620
+2014-07-28 Richard Biener <rguenther@suse.de>
6622
+ PR rtl-optimization/61801
6623
+ * gcc.target/i386/pr61801.c: New testcase.
6625
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6627
+ Backport from mainline:
6628
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6630
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
6632
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
6633
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
6634
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
6635
+ * gcc.c-torture/execute/pr23135.x: Likewise.
6637
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6639
+ Backport from mainline:
6640
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6642
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
6644
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6646
+ Backport from mainline:
6647
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6649
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
6651
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6653
+ Backport from mainline:
6654
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6656
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
6658
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
6660
+ * gcc.dg/stack-usage-2.c: Adjust.
6662
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
6664
+ Backport from trunk.
6666
+ * gfortran.dg/dependency_44.f90 : New test
6668
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
6670
+ * gnat.dg/opt39.adb: New test.
6672
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
6676
+ * gfortran.dg/allocatable_function_8.f90 : New test
6678
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
6680
+ PR tree-optimization/61684
6681
+ * gcc.c-torture/compile/pr61684.c: New test.
6683
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
6684
+ Fritz Reese <Reese-Fritz@zai.com>
6686
+ * gfortran.dg/oldstyle_5.f: New test.
6688
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
6690
+ Backport from mainline
6691
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
6693
+ PR tree-optimization/61306
6694
+ * gcc.c-torture/execute/pr61306-1.c: New test.
6695
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
6696
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
6698
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6700
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
6702
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
6704
+ Backport from mainline
6705
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
6708
+ * gcc.target/alpha/pr61586.c: New test.
6710
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6712
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
6713
+ powerpc*-*-linux*.
6715
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
6717
+ Backport from mainline
6718
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
6720
+ PR rtl-optimization/61094
6721
+ PR rtl-optimization/61446
6722
+ * gcc.target/i386/pr61446.c : New.
6724
+ Backport from mainline
6725
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
6728
+ * gcc.target/i386/pr61423.c: New test.
6730
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
6732
+ Backport from mainline
6735
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
6736
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
6737
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
6738
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
6740
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6742
+ Backport from trunk.
6744
+ * gfortran.dg/cray_pointers_10.f90: New file.
6746
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6748
+ Backport from mainline
6750
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
6752
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
6753
+ * gcc.target/powerpc/pack02.c: Use it.
6754
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
6756
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
6758
+ Backport from 2014-06-12 trunk r211491
6761
+ * gcc.target/avr/torture/pr61443.c: New test.
6763
+2014-06-04 Richard Biener <rguenther@suse.de>
6765
+ PR tree-optimization/61383
6766
+ * gcc.dg/torture/pr61383-1.c: New testcase.
6768
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6770
+ Backport from mainline
6771
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6773
+ PR rtl-optimization/60866
6774
+ * gcc.dg/pr60866.c: New test.
6776
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
6778
+ Backport from mainline
6779
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
6781
+ PR rtl-optimization/60901
6782
+ * gcc.target/i386/pr60901.c: New test.
6784
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
6786
+ Backport from mainline
6787
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6789
+ * gnat.dg/overflow_fixed.adb: New test.
6791
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
6793
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
6795
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6797
+ Backport from mainline
6798
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
6800
+ * gcc.target/powerpc/htm-ttest.c: New test.
6802
2014-05-22 Release Manager
6804
* GCC 4.8.3 released.
6805
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
6806
===================================================================
6807
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release)
6808
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch)
6810
+// I think this dynamic_cast has undefined behavior when destroying E::o
6811
+// because we're the F period of destruction has started and ap doesn't
6812
+// point to the object currently being destroyed--but the reasonable
6813
+// options are success or failure, not SEGV.
6817
+extern "C" void abort();
6819
+struct A { virtual ~A(); };
6820
+struct B { virtual ~B() { } };
6821
+struct C : B, A { };
6822
+struct E : virtual B { A o; };
6823
+struct F : virtual C, virtual E { };
6829
+ C* cp2 = dynamic_cast<C*>(ap);
6830
+ if (cp2 != cp && cp2 != 0)
6838
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
6839
===================================================================
6840
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release)
6841
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch)
6843
/* { dg-do compile { target powerpc*-*-* } } */
6844
/* { dg-require-effective-target powerpc_altivec_ok } */
6845
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
6846
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
6848
/* This test checks if AltiVec builtins accept const-qualified
6850
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
6851
===================================================================
6852
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
6853
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
6856
+// { dg-options "-std=gnu++11" }
6862
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
6863
+ decltype(({ int y = x; y; })+0) v1 = 0;
6865
Index: gcc/testsuite/g++.dg/expr/cond12.C
6866
===================================================================
6867
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release)
6868
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch)
6874
+ X& operator=(const X&){}
6875
+ X& operator=(X&){__builtin_abort();}
6878
+int main(int argv,char**) {
6880
+ ((argv > 2) ? a : b) = X();
6882
Index: gcc/testsuite/g++.dg/init/const9.C
6883
===================================================================
6884
--- a/src/gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release)
6885
+++ b/src/gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch)
6888
-// { dg-final { scan-assembler-not "rodata" } }
6889
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
6893
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
6894
===================================================================
6895
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../tags/gcc_4_8_3_release)
6896
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../branches/gcc-4_8-branch)
6898
+/* { dg-do run } */
6899
+/* { dg-options "-O2" } */
6903
+std::string __attribute__ ((noinline)) comp_test_write() {
6906
+ for (int i = 0; i < 2; ++i) {
6907
+ char b = 1 >> (i * 8);
6908
+ data.append(&b, 1);
6914
+std::string __attribute__ ((noinline)) comp_test_write_good() {
6918
+ for (int i = 0; i < 2; ++i) {
6920
+ data.append(&b, 1);
6927
+ std::string good = comp_test_write_good();
6928
+ std::string bad = comp_test_write();
6931
+ __builtin_abort ();
6933
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
6934
===================================================================
6935
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release)
6936
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch)
6940
+// { dg-do run { target c++11 } }
6941
+// { dg-add-options tls }
6942
+// { dg-require-effective-target tls_runtime }
6946
+template <typename> struct A
6948
+ static thread_local int s;
6953
+int f() { return 42; }
6954
+template <typename T> thread_local int A<T>::s = f();
6959
+ __builtin_abort();
6961
Index: gcc/testsuite/g++.dg/parse/typename7.C
6962
===================================================================
6963
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release)
6964
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch)
6969
- template<typename> void foo(int); // { dg-message "note" }
6970
- template<typename T> void bar(T t) { // { dg-message "note" }
6971
+ template<typename> void foo(int);
6972
+ template<typename T> void bar(T t) {
6973
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6974
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
6975
template<typename T> void bad(T t) {
6976
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6981
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
6982
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
6984
B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
6986
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
6987
===================================================================
6988
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release)
6989
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch)
6991
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
6992
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
6993
// { dg-prune-output "array bound" }
6994
Index: gcc/testsuite/g++.dg/parse/ambig7.C
6995
===================================================================
6996
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release)
6997
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch)
7003
+ Helper(int a, void (*pfunc)());
7006
+template <int I> void function();
7011
+Helper testOk(A, function<A>);
7012
+Helper testOk2(int(A), function<B>);
7013
+Helper testOk3((int(A)), function<A>);
7014
+Helper testFail(int(A), function<A>);
7015
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
7016
===================================================================
7017
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release)
7018
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch)
7020
# This must be done after the compat-use-*-compiler definitions.
7023
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
7024
+load_lib g++-dg.exp
7028
# Save variables for the C++ compiler under test, which each test will
7029
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
7030
===================================================================
7031
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release)
7032
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch)
7034
/* Structure layout test generator.
7035
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
7036
+ Copyright (C) 2004-2014
7037
Free Software Foundation, Inc.
7038
Contributed by Jakub Jelinek <jakub@redhat.com>.
7043
const char *dg_options[] = {
7044
-"/* { dg-options \"%s-I%s\" } */\n",
7045
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
7046
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
7047
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
7048
"/* { 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",
7049
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
7050
===================================================================
7051
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
7052
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
7055
+// { dg-do compile { target c++11 } }
7057
+template <class Coord> struct BasePoint
7060
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
7062
+template <class T> struct BaseCoord
7065
+ constexpr BaseCoord (T) : value (1) {}
7067
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
7069
+ typedef BaseCoord Super;
7070
+ constexpr IntCoordTyped (int) : Super (0) {}
7072
+template <class units>
7073
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
7075
+ typedef BasePoint<IntCoordTyped<units> > Super;
7076
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
7081
+IntPointTyped<A> a (0, 0);
7082
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
7083
===================================================================
7084
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release)
7085
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch)
7088
+// { dg-options "-std=c++11 -Wall" }
7093
+ return [&]() -> int {int __t; __t = t; return __t; }();
7094
+ return [&t]() -> int {int __t; __t = t; return __t; }();
7096
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
7097
===================================================================
7098
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
7099
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
7102
+// { dg-do compile { target c++11 } }
7106
+template <typename>
7108
+ typedef const char* name;
7111
+template <typename VT, typename... Fields>
7112
+void New(const char* name,
7113
+ typename Fixed<Fields>::name... field_names);
7115
+template <typename VT, typename... Fields>
7116
+void CreateMetric(const char* name,
7117
+ typename Fixed<Fields>::name... field_names,
7123
+ CreateMetric<int, const char*>("abcd", "def", Base());
7125
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
7126
===================================================================
7127
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release)
7128
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch)
7131
+// { dg-do compile { target c++11 } }
7133
+template <typename T>
7135
+ static constexpr int value = int(T{});
7137
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
7138
===================================================================
7139
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
7140
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
7143
+// { dg-do compile { target c++11 } }
7145
+template <typename _CharT> class A;
7146
+template <typename> class B;
7147
+template <class charT> class C;
7148
+template <> class C<char>
7150
+ virtual void xparse (int &, const B<A<char> > &) const;
7152
+template <class T, class charT = char> class G : C<charT>
7156
+ void default_value (const T &);
7157
+ void xparse (int &, const B<A<charT> > &) const;
7159
+template <class T, class charT>
7160
+void validate (int &, const B<A<charT> > &, T *, int);
7161
+template <class T, class charT>
7162
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
7164
+ validate (p1, p2, (T *)0, 0);
7166
+template <class T> G<T> *value (T *) { return new G<T>(0); }
7169
+template <typename T> struct D;
7170
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
7171
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
7173
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
7175
+ typedef _Scalar Scalar;
7177
+template <typename, int, int, int, int, int _MaxCols> class F
7180
+ typedef typename Eigen::D<F>::Scalar Scalar;
7181
+ F (const Scalar &, const Scalar &, const Scalar &);
7183
+template <class... T>
7184
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
7186
+int main (int, char *[])
7188
+ Eigen::F<double, 3, 1> a (0, 0, 0);
7189
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
7191
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
7192
===================================================================
7193
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
7194
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
7197
+// { dg-do compile { target c++11 } }
7200
+ X& operator=(const X&) = delete;
7201
+ X& operator=(X&& ) = default;
7206
+ *(t ? &a : &b) = X();
7207
+ (t ? a : b) = X();
7209
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
7210
===================================================================
7211
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release)
7212
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch)
7215
+// { dg-options "-std=c++11" }
7219
+void f(X&&); // { dg-message "void f" }
7223
+ operator const X&() const;
7229
+ f(w); // { dg-error "lvalue" }
7231
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
7232
===================================================================
7233
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../tags/gcc_4_8_3_release)
7234
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../branches/gcc-4_8-branch)
7238
+// { dg-options "-O2 -fdump-ipa-pure-const" }
7239
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
7240
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
7241
+// { dg-final { cleanup-ipa-dump "pure-const" } }
7243
+__attribute__((noinline, noclone)) static void bar (int);
7246
+struct S { S () { v++; } ~S () { v++; } };
7248
+__attribute__((noinline, noclone)) static void
7256
+__attribute__((noinline, noclone)) static void
7266
+__attribute__((noinline, noclone)) int
7283
+ asm volatile ("" : : : "memory");
7292
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
7293
===================================================================
7294
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release)
7295
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch)
7297
+/* { dg-do run } */
7298
+/* { dg-options "-O3 -std=c++11" } */
7301
+extern "C" int printf(const char *fmt, ...);
7302
+extern "C" void abort(void);
7305
+ enum _Value { Left, Right, Invalid };
7307
+ constexpr Side() : _value(Invalid) {}
7308
+ constexpr Side(_Value value) : _value(value) {}
7309
+ operator _Value() const { return (_Value)_value; }
7317
+ void adjust(Side side, bool final);
7318
+ void move(Side side);
7323
+ adjust(Side::Invalid, false);
7326
+static void __attribute__((noinline))
7327
+check (int v, int final)
7334
+__attribute__((noinline))
7335
+void A::adjust(Side side, bool final)
7337
+ check ((int)side, final);
7340
+void A::move(Side side)
7342
+ adjust(side, false);
7343
+ adjust(side, true);
7349
+ t.move(Side::Left);
7352
Index: gcc/testsuite/g++.dg/template/local-fn1.C
7353
===================================================================
7354
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
7355
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
7359
+template <typename T = int>
7365
Index: gcc/testsuite/g++.dg/template/conv14.C
7366
===================================================================
7367
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
7368
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
7374
+template<typename Container, typename Key>
7377
+template<typename Container, typename Key, typename KeyStore = Key>
7383
+ Variant(Container st, const Key& i) : index(i), state(st) {}
7385
+ template<typename T>
7386
+ operator T() const {
7387
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
7391
+class AutoCleanVariant : public Variant<XX*, int> {
7393
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
7395
+ template<typename T>
7396
+ operator T() const {
7397
+ return Variant<XX*, int>::operator T();
7400
Index: gcc/testsuite/g++.dg/template/friend55.C
7401
===================================================================
7402
--- a/src/gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release)
7403
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch)
7407
+template <int I> struct A;
7408
+template <int I> class B {
7410
+ template <int A_S> friend void A<A_S>::impl();
7414
+template<int I>struct A { void impl(); };
7417
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
7423
Index: gcc/testsuite/g++.dg/template/memclass5.C
7424
===================================================================
7425
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release)
7426
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch)
7430
+template <typename T>
7433
+ template <typename U>
7436
+ typedef T result2;
7439
+ typedef y<int> zy;
7446
+ typedef double result2;
7451
+ x<int>::zy::result2 xxx;
7452
+ x<int>::y<int>::result2 xxx2;
7454
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
7455
===================================================================
7456
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
7457
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
7465
+ int foo(int X::* ptr);
7467
+ template <int X::* ptr>
7471
+int X::foo(int X::* ptr) {
7472
+ int* p = &(this->*ptr); // OK.
7476
+template <int X::* ptr>
7478
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
7481
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
7482
===================================================================
7483
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../tags/gcc_4_8_3_release)
7484
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../branches/gcc-4_8-branch)
7486
+/* PR libgomp/61200 */
7492
+ #pragma omp parallel
7494
+ __builtin_abort ();
7495
+ #pragma omp task shared(var)
7499
Index: gcc/cp/tree.c
7500
===================================================================
7501
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
7502
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
7505
return lvalue_kind (TREE_OPERAND (ref, 0));
7508
+ case DOTSTAR_EXPR:
7509
+ if (TREE_CODE (ref) == MEMBER_REF)
7510
+ op1_lvalue_kind = clk_ordinary;
7512
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
7513
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
7514
+ op1_lvalue_kind = clk_none;
7515
+ return op1_lvalue_kind;
7518
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
7519
/* Look at the member designator. */
7520
@@ -3738,6 +3748,10 @@
7522
init_expr = get_target_expr (exp);
7523
exp = TARGET_EXPR_SLOT (init_expr);
7524
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
7527
+ exp = rvalue (exp);
7531
Index: gcc/cp/ChangeLog
7532
===================================================================
7533
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
7534
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
7536
+2014-10-15 Jason Merrill <jason@redhat.com>
7540
+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
7541
+ committed to this tentative parse.
7544
+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
7545
+ (iterative_hash_template_arg): Likewise.
7548
+ * semantics.c (finish_member_declaration): Don't push closure
7552
+ * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
7553
+ * semantics.c (finish_id_expression): Don't call TLS wrapper in a
7556
+2014-08-07 Jason Merrill <jason@redhat.com>
7559
+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
7562
+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
7564
+2014-01-27 Jason Merrill <jason@redhat.com>
7568
+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
7569
+ list-initialization. A conversion to rvalue ref that involves
7570
+ an lvalue-rvalue conversion is bad.
7571
+ (convert_like_real): Give helpful error message.
7573
+2014-01-29 Jason Merrill <jason@redhat.com>
7576
+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
7577
+ have a friend template in a class template.
7578
+ * pt.c (tsubst_friend_function): Look through it.
7579
+ (push_template_decl_real): A friend member template is
7582
+2014-02-21 Jason Merrill <jason@redhat.com>
7585
+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
7586
+ of the partial instantiation, not the most general template.
7587
+ (maybe_process_partial_specialization): Reassign everything on
7590
+2014-03-05 Jason Merrill <jason@redhat.com>
7593
+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
7594
+ if re-parsing might succeed.
7595
+ * semantics.c (finish_id_expression): Use of a parameter outside
7596
+ the function body is a parse error.
7598
+2014-06-30 Jason Merrill <jason@redhat.com>
7601
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
7604
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
7605
+ deduction failure.
7608
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
7610
+2014-06-17 Jason Merrill <jason@redhat.com>
7613
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
7615
+2014-06-02 Jason Merrill <jason@redhat.com>
7618
+ * pt.c (pack_deducible_p): Handle canonicalization.
7620
2014-05-22 Release Manager
7622
* GCC 4.8.3 released.
7624
===================================================================
7625
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
7626
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
7627
@@ -907,11 +907,13 @@
7628
t; t = TREE_CHAIN (t))
7630
tree inst = TREE_VALUE (t);
7631
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
7632
+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
7633
+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
7635
/* We already have a full specialization of this partial
7636
- instantiation. Reassign it to the new member
7637
- specialization template. */
7638
+ instantiation, or a full specialization has been
7639
+ looked up but not instantiated. Reassign it to the
7640
+ new member specialization template. */
7648
- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
7650
/* But if we've had an implicit instantiation, that's a
7651
problem ([temp.expl.spec]/6). */
7652
error ("specialization %qT after instantiation %qT",
7653
@@ -1569,6 +1571,7 @@
7657
+ iterative_hash_template_arg (TREE_TYPE (arg), val);
7658
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
7660
val = iterative_hash_template_arg (field, val);
7661
@@ -4308,7 +4311,8 @@
7662
in the template-parameter-list of the definition of a member of a
7665
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
7666
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
7667
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
7668
/* You can't have a function template declaration in a local
7669
scope, nor you can you define a member of a class template in a
7671
@@ -4572,7 +4576,8 @@
7672
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
7674
/* See if this is a primary template. */
7675
- if (is_friend && ctx)
7676
+ if (is_friend && ctx
7677
+ && uses_template_parms_level (ctx, processing_template_decl))
7678
/* A friend template that specifies a class context, i.e.
7679
template <typename T> friend void A<T>::f();
7681
@@ -7454,7 +7459,7 @@
7684
/* Let's consider the explicit specialization of a member
7685
- of a class template specialization that is implicitely instantiated,
7686
+ of a class template specialization that is implicitly instantiated,
7690
@@ -7552,9 +7557,9 @@
7692
/* Note this use of the partial instantiation so we can check it
7693
later in maybe_process_partial_specialization. */
7694
- DECL_TEMPLATE_INSTANTIATIONS (templ)
7695
+ DECL_TEMPLATE_INSTANTIATIONS (found)
7696
= tree_cons (arglist, t,
7697
- DECL_TEMPLATE_INSTANTIATIONS (templ));
7698
+ DECL_TEMPLATE_INSTANTIATIONS (found));
7700
if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
7701
/* Now that the type has been registered on the instantiations
7702
@@ -8289,10 +8294,17 @@
7704
if (COMPLETE_TYPE_P (context))
7706
+ tree fn = new_friend;
7707
+ /* do_friend adds the TEMPLATE_DECL for any member friend
7708
+ template even if it isn't a member template, i.e.
7709
+ template <class T> friend A<T>::f();
7710
+ Look through it in that case. */
7711
+ if (TREE_CODE (fn) == TEMPLATE_DECL
7712
+ && !PRIMARY_TEMPLATE_P (fn))
7713
+ fn = DECL_TEMPLATE_RESULT (fn);
7714
/* Check to see that the declaration is really present, and,
7715
possibly obtain an improved declaration. */
7716
- tree fn = check_classfn (context,
7717
- new_friend, NULL_TREE);
7718
+ fn = check_classfn (context, fn, NULL_TREE);
7722
@@ -14488,6 +14500,16 @@
7725
tree r = tsubst_copy (t, args, complain, in_decl);
7726
+ if (TREE_CODE (r) == VAR_DECL
7727
+ && !processing_template_decl
7728
+ && !cp_unevaluated_operand
7729
+ && DECL_THREAD_LOCAL_P (r))
7731
+ if (tree wrap = get_tls_wrapper_fn (r))
7732
+ /* Replace an evaluated use of the thread_local variable with
7733
+ a call to its wrapper. */
7734
+ r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
7737
if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
7738
/* If the original type was a reference, we'll be wrapped in
7739
@@ -14934,7 +14956,7 @@
7741
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
7742
packs; packs = TREE_CHAIN (packs))
7743
- if (TREE_VALUE (packs) == parm)
7744
+ if (template_args_equal (TREE_VALUE (packs), parm))
7746
/* The template parameter pack is used in a function parameter
7747
pack. If this is the end of the parameter list, the
7748
@@ -15502,8 +15524,9 @@
7749
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
7752
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7753
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
7754
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
7755
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
7756
+ return unify_template_argument_mismatch (explain_p, parm, arg);
7758
/* For deduction from an init-list we need the actual list. */
7759
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
7760
@@ -19804,6 +19827,8 @@
7764
+ if (dependent_type_p (TREE_TYPE (expression)))
7766
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
7767
if (value_dependent_expression_p (val))
7769
@@ -20009,7 +20034,12 @@
7772
if (BASELINK_P (expression))
7773
- expression = BASELINK_FUNCTIONS (expression);
7775
+ if (BASELINK_OPTYPE (expression)
7776
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
7778
+ expression = BASELINK_FUNCTIONS (expression);
7781
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
7783
Index: gcc/cp/semantics.c
7784
===================================================================
7785
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_3_release)
7786
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
7787
@@ -2735,8 +2735,10 @@
7791
- /* Enter the DECL into the scope of the class. */
7792
- else if (pushdecl_class_level (decl))
7793
+ /* Enter the DECL into the scope of the class, if the class
7794
+ isn't a closure (whose fields are supposed to be unnamed). */
7795
+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
7796
+ || pushdecl_class_level (decl))
7798
if (TREE_CODE (decl) == USING_DECL)
7800
@@ -3108,7 +3110,7 @@
7801
&& DECL_CONTEXT (decl) == NULL_TREE
7802
&& !cp_unevaluated_operand)
7804
- error ("use of parameter %qD outside function body", decl);
7805
+ *error_msg = "use of parameter outside function body";
7806
return error_mark_node;
7809
@@ -3343,6 +3345,7 @@
7811
if (TREE_CODE (decl) == VAR_DECL
7812
&& !cp_unevaluated_operand
7813
+ && !processing_template_decl
7814
&& DECL_THREAD_LOCAL_P (decl)
7815
&& (wrap = get_tls_wrapper_fn (decl)))
7817
@@ -7296,7 +7299,9 @@
7818
constructor_elt *inner = base_field_constructor_elt (n, ce->index);
7821
- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
7822
+ else if (ce->index
7823
+ && (TREE_CODE (ce->index) == NOP_EXPR
7824
+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
7826
/* This is an initializer for an empty base; now that we've
7827
checked that it's constant, we can ignore it. */
7828
Index: gcc/cp/parser.c
7829
===================================================================
7830
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_3_release)
7831
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
7832
@@ -12831,7 +12831,12 @@
7833
the effort required to do the parse, nor will we issue duplicate
7834
error messages about problems during instantiation of the
7838
+ /* Don't do this if we had a parse error in a declarator; re-parsing
7839
+ might succeed if a name changes meaning (60361). */
7840
+ && !(cp_parser_error_occurred (parser)
7841
+ && cp_parser_parsing_tentatively (parser)
7842
+ && parser->in_declarator_p))
7844
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
7846
@@ -23774,8 +23779,6 @@
7848
cp_parser_abort_tentative_parse (cp_parser* parser)
7850
- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
7851
- || errorcount > 0);
7852
cp_parser_simulate_error (parser);
7853
/* Now, pretend that we want to see if the construct was
7854
successfully parsed. */
7855
Index: gcc/cp/call.c
7856
===================================================================
7857
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
7858
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
7859
@@ -1464,7 +1464,7 @@
7861
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
7862
conv = implicit_conversion (to, from, expr, c_cast_p,
7864
+ flags|LOOKUP_NO_TEMP_BIND, complain);
7865
if (!CLASS_TYPE_P (to)
7866
&& CONSTRUCTOR_NELTS (expr) == 1)
7868
@@ -1624,9 +1624,9 @@
7872
- Otherwise, the reference shall be to a non-volatile const type.
7874
- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
7875
+ Otherwise, the reference shall be an lvalue reference to a
7876
+ non-volatile const type, or the reference shall be an rvalue
7878
if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
7881
@@ -1664,7 +1664,16 @@
7882
/* This reference binding, unlike those above, requires the
7883
creation of a temporary. */
7884
conv->need_temporary_p = true;
7885
- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
7886
+ if (TYPE_REF_IS_RVALUE (rto))
7888
+ conv->rvaluedness_matches_p = 1;
7889
+ /* In the second case, if the reference is an rvalue reference and
7890
+ the second standard conversion sequence of the user-defined
7891
+ conversion sequence includes an lvalue-to-rvalue conversion, the
7892
+ program is ill-formed. */
7893
+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
7899
@@ -5811,7 +5820,7 @@
7900
&& convs->kind != ck_list
7901
&& convs->kind != ck_ambig
7902
&& (convs->kind != ck_ref_bind
7903
- || convs->user_conv_p)
7904
+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
7905
&& (convs->kind != ck_rvalue
7906
|| SCALAR_TYPE_P (totype))
7907
&& convs->kind != ck_base)
7908
@@ -6110,7 +6119,8 @@
7909
if (convs->bad_p && !next_conversion (convs)->bad_p)
7911
gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
7912
- && real_lvalue_p (expr));
7913
+ && (real_lvalue_p (expr)
7914
+ || next_conversion(convs)->kind == ck_rvalue));
7916
error_at (loc, "cannot bind %qT lvalue to %qT",
7917
TREE_TYPE (expr), totype);
7918
Index: gcc/cp/friend.c
7919
===================================================================
7920
--- a/src/gcc/cp/friend.c (.../tags/gcc_4_8_3_release)
7921
+++ b/src/gcc/cp/friend.c (.../branches/gcc-4_8-branch)
7922
@@ -502,7 +502,13 @@
7923
? current_template_parms
7926
- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
7927
+ if ((template_member_p
7928
+ /* Always pull out the TEMPLATE_DECL if we have a friend
7929
+ template in a class template so that it gets tsubsted
7930
+ properly later on (59956). tsubst_friend_function knows
7931
+ how to tell this apart from a member template. */
7932
+ || (class_template_depth && friend_depth))
7933
+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
7934
decl = DECL_TI_TEMPLATE (decl);
7937
Index: gcc/haifa-sched.c
7938
===================================================================
7939
--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_8_3_release)
7940
+++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_8-branch)
7941
@@ -2931,7 +2931,7 @@
7943
advance_state (curr_state);
7944
if (sched_verbose >= 6)
7945
- fprintf (sched_dump, ";;\tAdvanced a state.\n");
7946
+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
7949
/* Update register pressure after scheduling INSN. */
7950
@@ -5964,6 +5964,7 @@
7951
modulo_insns_scheduled = 0;
7953
ls.modulo_epilogue = false;
7954
+ ls.first_cycle_insn_p = true;
7956
/* Loop until all the insns in BB are scheduled. */
7957
while ((*current_sched_info->schedule_more_p) ())
7958
@@ -6034,7 +6035,6 @@
7962
- ls.first_cycle_insn_p = true;
7963
ls.shadows_only_p = false;
7964
cycle_issued_insns = 0;
7965
ls.can_issue_more = issue_rate;
7966
@@ -6321,11 +6321,13 @@
7970
+ ls.first_cycle_insn_p = true;
7972
if (ls.modulo_epilogue)
7975
- advance_one_cycle ();
7976
+ if (!ls.first_cycle_insn_p)
7977
+ advance_one_cycle ();
7978
perform_replacements_new_cycle ();
7981
Index: gcc/double-int.c
7982
===================================================================
7983
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
7984
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
7986
== (unsigned HOST_WIDE_INT) htwice)
7987
&& (labs_den <= ltwice)))
7991
/* quo = quo - 1; */
7992
add_double (*lquo, *hquo,
7993
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
7994
Index: gcc/ipa-pure-const.c
7995
===================================================================
7996
--- a/src/gcc/ipa-pure-const.c (.../tags/gcc_4_8_3_release)
7997
+++ b/src/gcc/ipa-pure-const.c (.../branches/gcc-4_8-branch)
7998
@@ -1429,7 +1429,7 @@
7999
else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
8002
- for (ie = node->indirect_calls; ie; ie = ie->next_callee)
8003
+ for (ie = w->indirect_calls; ie; ie = ie->next_callee)
8004
if (ie->can_throw_external)
8006
w_info = (struct ipa_dfs_info *) w->symbol.aux;
8007
Index: gcc/tree-ssa-math-opts.c
8008
===================================================================
8009
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
8010
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
8011
@@ -1537,7 +1537,7 @@
8013
struct symbolic_number {
8014
unsigned HOST_WIDEST_INT n;
8019
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
8020
@@ -1549,13 +1549,15 @@
8021
struct symbolic_number *n,
8024
+ int bitsize = TYPE_PRECISION (n->type);
8029
/* Zero out the extra bits of N in order to avoid them being shifted
8030
into the significant bits. */
8031
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8032
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
8033
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8034
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8038
@@ -1563,20 +1565,24 @@
8042
+ /* Arithmetic shift of signed type: result is dependent on the value. */
8043
+ if (!TYPE_UNSIGNED (n->type)
8044
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
8049
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
8050
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
8053
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
8054
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
8059
/* Zero unused bits for size. */
8060
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8061
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
8062
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8063
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8067
@@ -1593,7 +1599,7 @@
8068
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
8071
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
8072
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
8076
@@ -1650,20 +1656,25 @@
8077
to initialize the symbolic number. */
8082
/* Set up the symbolic number N by setting each byte to a
8083
value between 1 and the byte size of rhs1. The highest
8084
order byte is set to n->size and the lowest order
8086
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
8087
- if (n->size % BITS_PER_UNIT != 0)
8088
+ n->type = TREE_TYPE (rhs1);
8089
+ size = TYPE_PRECISION (n->type);
8090
+ if (size % BITS_PER_UNIT != 0)
8092
- n->size /= BITS_PER_UNIT;
8093
+ if (size > HOST_BITS_PER_WIDEST_INT)
8095
+ size /= BITS_PER_UNIT;
8096
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
8097
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
8099
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8100
+ if (size < (int)sizeof (HOST_WIDEST_INT))
8101
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
8102
- (n->size * BITS_PER_UNIT)) - 1;
8103
+ (size * BITS_PER_UNIT)) - 1;
8105
source_expr1 = rhs1;
8107
@@ -1672,12 +1683,12 @@
8112
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
8113
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
8114
unsigned HOST_WIDEST_INT tmp = val;
8116
/* Only constants masking full bytes are allowed. */
8117
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
8118
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
8119
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
8122
@@ -1693,12 +1704,24 @@
8127
+ int type_size, old_type_size;
8130
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
8131
+ type = gimple_expr_type (stmt);
8132
+ type_size = TYPE_PRECISION (type);
8133
if (type_size % BITS_PER_UNIT != 0)
8135
+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
8138
+ /* Sign extension: result is dependent on the value. */
8139
+ old_type_size = TYPE_PRECISION (n->type);
8140
+ if (!TYPE_UNSIGNED (n->type)
8141
+ && type_size > old_type_size
8143
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
8146
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
8148
/* If STMT casts to a smaller type mask out the bits not
8149
@@ -1705,7 +1728,7 @@
8150
belonging to the target type. */
8151
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
8153
- n->size = type_size / BITS_PER_UNIT;
8158
@@ -1718,7 +1741,7 @@
8160
if (rhs_class == GIMPLE_BINARY_RHS)
8164
struct symbolic_number n1, n2;
8165
unsigned HOST_WIDEST_INT mask;
8167
@@ -1742,11 +1765,12 @@
8168
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
8170
if (source_expr1 != source_expr2
8171
- || n1.size != n2.size)
8172
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
8175
- n->size = n1.size;
8176
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
8177
+ n->type = n1.type;
8178
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
8179
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
8181
unsigned HOST_WIDEST_INT masked1, masked2;
8183
@@ -1785,7 +1809,7 @@
8185
struct symbolic_number n;
8188
+ int limit, bitsize;
8190
/* The last parameter determines the depth search limit. It usually
8191
correlates directly to the number of bytes to be touched. We
8192
@@ -1800,13 +1824,14 @@
8195
/* Zero out the extra bits of N and CMP. */
8196
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
8197
+ bitsize = TYPE_PRECISION (n.type);
8198
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8200
unsigned HOST_WIDEST_INT mask =
8201
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
8202
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8205
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
8206
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
8209
/* A complete byte swap should make the symbolic number to start
8210
@@ -1828,7 +1853,7 @@
8211
bool changed = false;
8212
tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
8214
- if (BITS_PER_UNIT != 8)
8215
+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
8218
if (sizeof (HOST_WIDEST_INT) < 8)
8219
Index: gcc/tree-nrv.c
8220
===================================================================
8221
--- a/src/gcc/tree-nrv.c (.../tags/gcc_4_8_3_release)
8222
+++ b/src/gcc/tree-nrv.c (.../branches/gcc-4_8-branch)
8224
same type and alignment as the function's result. */
8225
if (TREE_CODE (found) != VAR_DECL
8226
|| TREE_THIS_VOLATILE (found)
8227
- || DECL_CONTEXT (found) != current_function_decl
8228
- || TREE_STATIC (found)
8229
+ || !auto_var_in_fn_p (found, current_function_decl)
8230
|| TREE_ADDRESSABLE (found)
8231
|| DECL_ALIGN (found) > DECL_ALIGN (result)
8232
|| !useless_type_conversion_p (result_type,
8234
===================================================================
8235
--- a/src/gcc/ifcvt.c (.../tags/gcc_4_8_3_release)
8236
+++ b/src/gcc/ifcvt.c (.../branches/gcc-4_8-branch)
8237
@@ -294,6 +294,28 @@
8239
return (e) ? e->dest : NULL_BLOCK;
8242
+/* Return true if RTXs A and B can be safely interchanged. */
8245
+rtx_interchangeable_p (const_rtx a, const_rtx b)
8247
+ if (!rtx_equal_p (a, b))
8250
+ if (GET_CODE (a) != MEM)
8253
+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
8254
+ reference is not. Interchanging a dead type-unsafe memory reference with
8255
+ a live type-safe one creates a live type-unsafe memory reference, in other
8256
+ words, it makes the program illegal.
8257
+ We check here conservatively whether the two memory references have equal
8258
+ memory attributes. */
8260
+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
8264
/* Go through a bunch of insns, converting them to conditional
8265
execution format if possible. Return TRUE if all of the non-note
8266
@@ -1014,6 +1036,9 @@
8267
|| (rtx_equal_p (if_info->a, XEXP (cond, 1))
8268
&& rtx_equal_p (if_info->b, XEXP (cond, 0))))
8270
+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
8273
y = (code == EQ) ? if_info->a : if_info->b;
8275
/* Avoid generating the move if the source is the destination. */
8276
@@ -2483,7 +2508,7 @@
8278
|| insn_b != last_active_insn (else_bb, FALSE)
8279
|| (set_b = single_set (insn_b)) == NULL_RTX
8280
- || ! rtx_equal_p (x, SET_DEST (set_b)))
8281
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
8285
@@ -2496,7 +2521,7 @@
8286
|| BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
8287
|| !NONJUMP_INSN_P (insn_b)
8288
|| (set_b = single_set (insn_b)) == NULL_RTX
8289
- || ! rtx_equal_p (x, SET_DEST (set_b))
8290
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
8291
|| ! noce_operand_ok (SET_SRC (set_b))
8292
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
8293
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
8294
@@ -2562,7 +2587,7 @@
8296
/* Look and see if A and B are really the same. Avoid creating silly
8297
cmove constructs that no one will fix up later. */
8298
- if (rtx_equal_p (a, b))
8299
+ if (rtx_interchangeable_p (a, b))
8301
/* If we have an INSN_B, we don't have to create any new rtl. Just
8302
move the instruction that we already have. If we don't have an
8303
@@ -4246,6 +4271,9 @@
8304
old_dest = JUMP_LABEL (jump);
8305
if (other_bb != new_dest)
8307
+ if (!any_condjump_p (jump))
8310
if (JUMP_P (BB_END (dest_edge->src)))
8311
new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
8312
else if (new_dest == EXIT_BLOCK_PTR)
8313
Index: gcc/dwarf2out.c
8314
===================================================================
8315
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_3_release)
8316
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
8317
@@ -12234,7 +12234,7 @@
8318
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
8319
VAR_INIT_STATUS_INITIALIZED);
8323
add_loc_descr (&mem_loc_result, op1);
8324
add_loc_descr (&mem_loc_result,
8325
new_loc_descr (DW_OP_plus, 0, 0));
8326
@@ -13882,6 +13882,10 @@
8330
+ case TARGET_MEM_REF:
8335
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
8338
===================================================================
8339
--- a/src/gcc/expr.c (.../tags/gcc_4_8_3_release)
8340
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
8341
@@ -7590,11 +7590,13 @@
8344
case COMPOUND_LITERAL_EXPR:
8345
- /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
8346
- rtl_for_decl_init is called on DECL_INITIAL with
8347
- COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */
8348
- if (modifier == EXPAND_INITIALIZER
8349
- && COMPOUND_LITERAL_EXPR_DECL (exp))
8350
+ /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
8351
+ initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
8352
+ with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
8353
+ array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
8354
+ the initializers aren't gimplified. */
8355
+ if (COMPOUND_LITERAL_EXPR_DECL (exp)
8356
+ && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
8357
return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
8358
target, tmode, modifier, as);
8360
@@ -10603,7 +10605,7 @@
8361
|| !host_integerp (TREE_OPERAND (offset, 1), 1)
8362
|| compare_tree_int (TREE_OPERAND (offset, 1),
8363
BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
8364
- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
8365
+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
8368
/* Look at the first operand of BIT_AND_EXPR and strip any conversion.
8369
Index: gcc/ada/socket.c
8370
===================================================================
8371
--- a/src/gcc/ada/socket.c (.../tags/gcc_4_8_3_release)
8372
+++ b/src/gcc/ada/socket.c (.../branches/gcc-4_8-branch)
8377
-#if defined(__linux__) || defined(__GLIBC__)
8378
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
8379
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
8381
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
8382
Index: gcc/ada/uintp.adb
8383
===================================================================
8384
--- a/src/gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release)
8385
+++ b/src/gcc/ada/uintp.adb (.../branches/gcc-4_8-branch)
8386
@@ -171,22 +171,6 @@
8387
-- If Discard_Quotient is True, Quotient is set to No_Uint
8388
-- If Discard_Remainder is True, Remainder is set to No_Uint
8390
- function Vector_To_Uint
8391
- (In_Vec : UI_Vector;
8392
- Negative : Boolean) return Uint;
8393
- -- Functions that calculate values in UI_Vectors, call this function to
8394
- -- create and return the Uint value. In_Vec contains the multiple precision
8395
- -- (Base) representation of a non-negative value. Leading zeroes are
8396
- -- permitted. Negative is set if the desired result is the negative of the
8397
- -- given value. The result will be either the appropriate directly
8398
- -- represented value, or a table entry in the proper canonical format is
8399
- -- created and returned.
8401
- -- Note that Init_Operand puts a signed value in the result vector, but
8402
- -- Vector_To_Uint is always presented with a non-negative value. The
8403
- -- processing of signs is something that is done by the caller before
8404
- -- calling Vector_To_Uint.
8409
Index: gcc/ada/uintp.ads
8410
===================================================================
8411
--- a/src/gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release)
8412
+++ b/src/gcc/ada/uintp.ads (.../branches/gcc-4_8-branch)
8414
Uint_Minus_80 : constant Uint;
8415
Uint_Minus_128 : constant Uint;
8417
+ type UI_Vector is array (Pos range <>) of Int;
8418
+ -- Vector containing the integer values of a Uint value
8420
+ -- Note: An earlier version of this package used pointers of arrays of Ints
8421
+ -- (dynamically allocated) for the Uint type. The change leads to a few
8422
+ -- less natural idioms used throughout this code, but eliminates all uses
8423
+ -- of the heap except for the table package itself. For example, Uint
8424
+ -- parameters are often converted to UI_Vectors for internal manipulation.
8425
+ -- This is done by creating the local UI_Vector using the function N_Digits
8426
+ -- on the Uint to find the size needed for the vector, and then calling
8427
+ -- Init_Operand to copy the values out of the table into the vector.
8432
@@ -252,6 +264,22 @@
8433
-- function is used for capacity checks, and it can be one bit off
8434
-- without affecting its usage.
8436
+ function Vector_To_Uint
8437
+ (In_Vec : UI_Vector;
8438
+ Negative : Boolean) return Uint;
8439
+ -- Functions that calculate values in UI_Vectors, call this function to
8440
+ -- create and return the Uint value. In_Vec contains the multiple precision
8441
+ -- (Base) representation of a non-negative value. Leading zeroes are
8442
+ -- permitted. Negative is set if the desired result is the negative of the
8443
+ -- given value. The result will be either the appropriate directly
8444
+ -- represented value, or a table entry in the proper canonical format is
8445
+ -- created and returned.
8447
+ -- Note that Init_Operand puts a signed value in the result vector, but
8448
+ -- Vector_To_Uint is always presented with a non-negative value. The
8449
+ -- processing of signs is something that is done by the caller before
8450
+ -- calling Vector_To_Uint.
8452
---------------------
8453
-- Output Routines --
8454
---------------------
8455
@@ -494,18 +522,6 @@
8456
-- UI_Vector is defined for this purpose and some internal subprograms
8457
-- used for converting from one to the other are defined.
8459
- type UI_Vector is array (Pos range <>) of Int;
8460
- -- Vector containing the integer values of a Uint value
8462
- -- Note: An earlier version of this package used pointers of arrays of Ints
8463
- -- (dynamically allocated) for the Uint type. The change leads to a few
8464
- -- less natural idioms used throughout this code, but eliminates all uses
8465
- -- of the heap except for the table package itself. For example, Uint
8466
- -- parameters are often converted to UI_Vectors for internal manipulation.
8467
- -- This is done by creating the local UI_Vector using the function N_Digits
8468
- -- on the Uint to find the size needed for the vector, and then calling
8469
- -- Init_Operand to copy the values out of the table into the vector.
8471
type Uint_Entry is record
8473
-- Length of entry in Udigits table in digits (i.e. in words)
8474
Index: gcc/ada/ChangeLog
8475
===================================================================
8476
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release)
8477
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
8479
+2014-11-22 Eric Botcazou <ebotcazou@adacore.com>
8481
+ Backport from mainline
8482
+ 2014-11-20 Vincent Celier <celier@adacore.com>
8485
+ * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
8488
+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
8489
+ Alan Modra <amodra@gmail.com>
8492
+ * uintp.adb (Vector_To_Uint): Move from here to...
8493
+ * uintp.ads (UI_Vector): Make public.
8494
+ (Vector_To_Uint): ...here.
8496
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
8498
+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
8499
+ * gsocket.h Add include of <unistd.h> on RTEMS.
8501
+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
8503
+ * s-osinte-rtems.adb: Correct formatting of line in license block.
8505
2014-05-22 Release Manager
8507
* GCC 4.8.3 released.
8508
Index: gcc/ada/s-osinte-rtems.adb
8509
===================================================================
8510
--- a/src/gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release)
8511
+++ b/src/gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch)
8513
-- You should have received a copy of the GNU General Public License and --
8514
-- a copy of the GCC Runtime Library Exception along with this program; --
8515
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
8516
--- <http://www.gnu.org/licenses/>.
8517
+-- <http://www.gnu.org/licenses/>. --
8519
-- GNARL was developed by the GNARL team at Florida State University. It is --
8520
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
8521
Index: gcc/ada/gsocket.h
8522
===================================================================
8523
--- a/src/gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release)
8524
+++ b/src/gcc/ada/gsocket.h (.../branches/gcc-4_8-branch)
8525
@@ -183,6 +183,11 @@
8526
#include <sys/time.h>
8529
+#if defined(__rtems__)
8530
+#include <unistd.h>
8531
+/* Required, for read(), write(), and close() */
8535
* RTEMS has these .h files but not until you have built and installed RTEMS.
8536
* When building a C/C++ toolset, you also build the newlib C library, so the
8537
Index: gcc/ada/back_end.adb
8538
===================================================================
8539
--- a/src/gcc/ada/back_end.adb (.../tags/gcc_4_8_3_release)
8540
+++ b/src/gcc/ada/back_end.adb (.../branches/gcc-4_8-branch)
8541
@@ -209,9 +209,10 @@
8542
Last : constant Natural := Switch_Last (Switch_Chars);
8545
- -- Skip -o or internal GCC switches together with their argument
8546
+ -- Skip -o, -G or internal GCC switches together with their argument.
8548
if Switch_Chars (First .. Last) = "o"
8549
+ or else Switch_Chars (First .. Last) = "G"
8550
or else Is_Internal_GCC_Switch (Switch_Chars)
8552
Next_Arg := Next_Arg + 1;
8553
Index: gcc/tree-ssa-ifcombine.c
8554
===================================================================
8555
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
8556
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
8557
@@ -105,7 +105,11 @@
8559
gimple stmt = gsi_stmt (gsi);
8561
+ if (is_gimple_debug (stmt))
8564
if (gimple_has_side_effects (stmt)
8565
+ || gimple_could_trap_p (stmt)
8566
|| gimple_vuse (stmt))
8570
while (is_gimple_assign (stmt)
8571
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
8572
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
8573
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
8574
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
8575
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
8576
|| gimple_assign_ssa_name_copy_p (stmt)))
8577
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
8579
Index: gcc/sel-sched-ir.c
8580
===================================================================
8581
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
8582
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
8584
static void free_av_set (basic_block);
8585
static void invalidate_av_set (basic_block);
8586
static void extend_insn_data (void);
8587
-static void sel_init_new_insn (insn_t, int);
8588
+static void sel_init_new_insn (insn_t, int, int = -1);
8589
static void finish_insns (void);
8591
/* Various list functions. */
8592
@@ -4011,9 +4011,10 @@
8596
-/* Compute seqno for INSN by its preds or succs. */
8597
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
8598
+ seqno in corner cases. */
8600
-get_seqno_for_a_jump (insn_t insn)
8601
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
8605
@@ -4069,8 +4070,16 @@
8607
seqno = get_seqno_by_succs (insn);
8611
+ /* The only case where this could be here legally is that the only
8612
+ unscheduled insn was a conditional jump that got removed and turned
8613
+ into this unconditional one. Initialize from the old seqno
8614
+ of that jump passed down to here. */
8615
+ seqno = old_seqno;
8618
gcc_assert (seqno >= 0);
8623
@@ -4250,22 +4259,24 @@
8626
/* This is used to initialize spurious jumps generated by
8627
- sel_redirect_edge (). */
8628
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
8629
+ in corner cases within get_seqno_for_a_jump. */
8631
-init_simplejump_data (insn_t insn)
8632
+init_simplejump_data (insn_t insn, int old_seqno)
8634
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
8635
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
8636
vNULL, true, false, false,
8638
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
8639
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
8640
init_first_time_insn_data (insn);
8643
/* Perform deferred initialization of insns. This is used to process
8644
- a new jump that may be created by redirect_edge. */
8646
-sel_init_new_insn (insn_t insn, int flags)
8647
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
8648
+ for initializing simplejumps in init_simplejump_data. */
8650
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
8652
/* We create data structures for bb when the first insn is emitted in it. */
8654
@@ -4292,7 +4303,7 @@
8655
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
8657
extend_insn_data ();
8658
- init_simplejump_data (insn);
8659
+ init_simplejump_data (insn, old_seqno);
8662
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
8663
@@ -5578,8 +5589,7 @@
8666
/* A wrapper for redirect_edge_and_branch_force, which also initializes
8667
- data structures for possibly created bb and insns. Returns the newly
8668
- added bb or NULL, when a bb was not needed. */
8669
+ data structures for possibly created bb and insns. */
8671
sel_redirect_edge_and_branch_force (edge e, basic_block to)
8673
@@ -5586,6 +5596,7 @@
8674
basic_block jump_bb, src, orig_dest = e->dest;
8677
+ int old_seqno = -1;
8679
/* This function is now used only for bookkeeping code creation, where
8680
we'll never get the single pred of orig_dest block and thus will not
8681
@@ -5594,8 +5605,13 @@
8682
&& !single_pred_p (orig_dest));
8684
prev_max_uid = get_max_uid ();
8685
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
8686
+ when the conditional jump being redirected may become unconditional. */
8687
+ if (any_condjump_p (BB_END (src))
8688
+ && INSN_SEQNO (BB_END (src)) >= 0)
8689
+ old_seqno = INSN_SEQNO (BB_END (src));
8691
jump_bb = redirect_edge_and_branch_force (e, to);
8693
if (jump_bb != NULL)
8694
sel_add_bb (jump_bb);
8696
@@ -5607,7 +5623,8 @@
8698
jump = find_new_jump (src, jump_bb, prev_max_uid);
8700
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
8701
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
8703
set_immediate_dominator (CDI_DOMINATORS, to,
8704
recompute_dominator (CDI_DOMINATORS, to));
8705
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
8706
@@ -5626,6 +5643,7 @@
8708
bool recompute_toporder_p = false;
8709
bool maybe_unreachable = single_pred_p (orig_dest);
8710
+ int old_seqno = -1;
8712
latch_edge_p = (pipelining_p
8713
&& current_loop_nest
8714
@@ -5634,6 +5652,12 @@
8716
prev_max_uid = get_max_uid ();
8718
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
8719
+ when the conditional jump being redirected may become unconditional. */
8720
+ if (any_condjump_p (BB_END (src))
8721
+ && INSN_SEQNO (BB_END (src)) >= 0)
8722
+ old_seqno = INSN_SEQNO (BB_END (src));
8724
redirected = redirect_edge_and_branch (e, to);
8726
gcc_assert (redirected && !last_added_blocks.exists ());
8727
@@ -5654,7 +5678,7 @@
8729
jump = find_new_jump (src, NULL, prev_max_uid);
8731
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
8732
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
8734
/* Only update dominator info when we don't have unreachable blocks.
8735
Otherwise we'll update in maybe_tidy_empty_bb. */
8736
Index: gcc/fortran/interface.c
8737
===================================================================
8738
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_3_release)
8739
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
8740
@@ -1923,7 +1923,7 @@
8741
/* F2008, 12.5.2.5; IR F08/0073. */
8742
if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
8743
&& ((CLASS_DATA (formal)->attr.class_pointer
8744
- && !formal->attr.intent == INTENT_IN)
8745
+ && formal->attr.intent != INTENT_IN)
8746
|| CLASS_DATA (formal)->attr.allocatable))
8748
if (actual->ts.type != BT_CLASS)
8749
Index: gcc/fortran/trans-expr.c
8750
===================================================================
8751
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
8752
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
8753
@@ -7096,7 +7096,7 @@
8755
res_desc = gfc_evaluate_now (desc, &se->pre);
8756
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
8757
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
8758
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
8760
/* Free the lhs after the function call and copy the result data to
8761
the lhs descriptor. */
8762
Index: gcc/fortran/decl.c
8763
===================================================================
8764
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
8765
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
8766
@@ -1996,6 +1996,13 @@
8767
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
8768
"initialization at %C") == FAILURE)
8770
+ else if (gfc_current_state () == COMP_DERIVED)
8772
+ gfc_error ("Invalid old style initialization for derived type "
8773
+ "component at %C");
8778
return match_old_style_init (name);
8780
Index: gcc/fortran/trans-openmp.c
8781
===================================================================
8782
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release)
8783
+++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch)
8784
@@ -115,6 +115,16 @@
8785
if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
8786
return OMP_CLAUSE_DEFAULT_SHARED;
8788
+ /* These are either array or derived parameters, or vtables.
8789
+ In the former cases, the OpenMP standard doesn't consider them to be
8790
+ variables at all (they can't be redefined), but they can nevertheless appear
8791
+ in parallel/task regions and for default(none) purposes treat them as shared.
8792
+ For vtables likely the same handling is desirable. */
8793
+ if (TREE_CODE (decl) == VAR_DECL
8794
+ && TREE_READONLY (decl)
8795
+ && TREE_STATIC (decl))
8796
+ return OMP_CLAUSE_DEFAULT_SHARED;
8798
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
8801
@@ -1217,6 +1227,18 @@
8804
lhsaddr = save_expr (lhsaddr);
8805
+ if (TREE_CODE (lhsaddr) != SAVE_EXPR
8806
+ && (TREE_CODE (lhsaddr) != ADDR_EXPR
8807
+ || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
8809
+ /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
8810
+ it even after unsharing function body. */
8811
+ tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
8812
+ DECL_CONTEXT (var) = current_function_decl;
8813
+ lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
8814
+ NULL_TREE, NULL_TREE);
8817
rhs = gfc_evaluate_now (rse.expr, &block);
8819
if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
8820
Index: gcc/fortran/ChangeLog
8821
===================================================================
8822
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
8823
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
8825
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
8827
+ Backported from mainline
8828
+ 2014-11-24 Jakub Jelinek <jakub@redhat.com>
8831
+ * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
8832
+ simple enough for goa_lhs_expr_p.
8834
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
8837
+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
8838
+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
8840
+2014-09-03 Marek Polacek <polacek@redhat.com>
8842
+ Backport from trunk
8844
+ * interface.c (compare_parameter): Fix condition.
8846
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
8848
+ Backport from trunk
8850
+ * gfortran.dg/array_assignment_5.f90: New test.
8852
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
8854
+ Backport from trunk
8856
+ * simplify.c (gfc_simplify_dot_product): Convert types of
8857
+ vectors before calculating the result.
8859
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
8861
+ Backport from trunk.
8863
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
8864
+ that elements are skipped. This then correctly aligns 'reverse'
8865
+ with the scalarizer loops.
8867
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
8871
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
8872
+ for the address expression of 'res_desc'.
8874
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
8875
+ Fritz Reese <Reese-Fritz@zai.com>
8877
+ * decl.c (variable_decl): Reject old style initialization
8878
+ for derived type components.
8880
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8882
+ Backport from trunk.
8884
+ * trans-decl.c (gfc_create_module_variable): Don't create
8885
+ Cray-pointee decls twice.
8887
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
8889
+ Backport from mainline
8890
+ PR libfortran/61310
8891
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
8894
2014-05-22 Release Manager
8896
* GCC 4.8.3 released.
8897
Index: gcc/fortran/frontend-passes.c
8898
===================================================================
8899
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
8900
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
8901
@@ -874,6 +874,10 @@
8905
+ case INTRINSIC_CONCAT:
8906
+ /* Do not do string concatenations. */
8910
/* Binary operators. */
8911
if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
8912
Index: gcc/fortran/trans-decl.c
8913
===================================================================
8914
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
8915
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
8916
@@ -4084,8 +4084,8 @@
8919
/* Don't generate variables from other modules. Variables from
8920
- COMMONs will already have been generated. */
8921
- if (sym->attr.use_assoc || sym->attr.in_common)
8922
+ COMMONs and Cray pointees will already have been generated. */
8923
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
8926
/* Equivalenced variables arrive here after creation. */
8927
Index: gcc/fortran/dependency.c
8928
===================================================================
8929
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release)
8930
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
8931
@@ -1779,6 +1779,7 @@
8932
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
8936
gfc_dependency fin_dep;
8937
gfc_dependency this_dep;
8939
@@ -1828,6 +1829,8 @@
8943
+ /* Index for the reverse array. */
8945
for (n=0; n < lref->u.ar.dimen; n++)
8947
/* Assume dependency when either of array reference is vector
8948
@@ -1862,31 +1865,37 @@
8949
The ability to reverse or not is set by previous conditions
8950
in this dimension. If reversal is not activated, the
8951
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
8953
+ /* Get the indexing right for the scalarizing loop. If this
8954
+ is an element, there is no corresponding loop. */
8955
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
8958
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
8959
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
8961
/* Set reverse if backward dependence and not inhibited. */
8962
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8963
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
8964
- GFC_REVERSE_SET : reverse[n];
8965
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8966
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
8967
+ GFC_REVERSE_SET : reverse[m];
8969
/* Set forward if forward dependence and not inhibited. */
8970
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
8971
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
8972
- GFC_FORWARD_SET : reverse[n];
8973
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
8974
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
8975
+ GFC_FORWARD_SET : reverse[m];
8977
/* Flag up overlap if dependence not compatible with
8978
the overall state of the expression. */
8979
- if (reverse && reverse[n] == GFC_REVERSE_SET
8980
+ if (reverse && reverse[m] == GFC_REVERSE_SET
8981
&& this_dep == GFC_DEP_FORWARD)
8983
- reverse[n] = GFC_INHIBIT_REVERSE;
8984
+ reverse[m] = GFC_INHIBIT_REVERSE;
8985
this_dep = GFC_DEP_OVERLAP;
8987
- else if (reverse && reverse[n] == GFC_FORWARD_SET
8988
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
8989
&& this_dep == GFC_DEP_BACKWARD)
8991
- reverse[n] = GFC_INHIBIT_REVERSE;
8992
+ reverse[m] = GFC_INHIBIT_REVERSE;
8993
this_dep = GFC_DEP_OVERLAP;
8996
@@ -1893,7 +1902,7 @@
8997
/* If no intention of reversing or reversing is explicitly
8998
inhibited, convert backward dependence to overlap. */
8999
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
9000
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
9001
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
9002
this_dep = GFC_DEP_OVERLAP;
9005
Index: gcc/fortran/simplify.c
9006
===================================================================
9007
--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release)
9008
+++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_8-branch)
9009
@@ -1877,6 +1877,9 @@
9011
gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
9016
if (!is_constant_array_expr (vector_a)
9017
|| !is_constant_array_expr (vector_b))
9019
@@ -1883,8 +1886,14 @@
9021
gcc_assert (vector_a->rank == 1);
9022
gcc_assert (vector_b->rank == 1);
9023
- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
9025
+ temp.expr_type = EXPR_OP;
9026
+ gfc_clear_ts (&temp.ts);
9027
+ temp.value.op.op = INTRINSIC_NONE;
9028
+ temp.value.op.op1 = vector_a;
9029
+ temp.value.op.op2 = vector_b;
9030
+ gfc_type_convert_binary (&temp, 1);
9032
return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
9035
Index: gcc/configure.ac
9036
===================================================================
9037
--- a/src/gcc/configure.ac (.../tags/gcc_4_8_3_release)
9038
+++ b/src/gcc/configure.ac (.../branches/gcc-4_8-branch)
9039
@@ -3443,6 +3443,32 @@
9040
AC_MSG_RESULT($gcc_cv_lto_plugin)
9045
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
9046
+ AC_ARG_ENABLE(fix-cortex-a53-835769,
9048
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
9049
+ [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
9050
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
9051
+ [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
9054
+ case $enableval in
9056
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
9061
+ AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
9062
+ Valid choices are 'yes' and 'no'.])
9069
# All TARGET_ABI_OSF targets.
9070
alpha*-*-linux* | alpha*-*-*bsd*)
9071
gcc_GAS_CHECK_FEATURE([explicit relocation support],
9072
Index: gcc/function.c
9073
===================================================================
9074
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
9075
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
9076
@@ -1354,9 +1354,13 @@
9077
#define STACK_POINTER_OFFSET 0
9080
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
9081
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
9084
/* If not defined, pick an appropriate default for the offset of dynamically
9085
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
9086
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
9087
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
9089
#ifndef STACK_DYNAMIC_OFFSET
9091
@@ -1368,12 +1372,12 @@
9092
`crtl->outgoing_args_size'. Nevertheless, we must allow
9093
for it when allocating stack dynamic objects. */
9095
-#if defined(REG_PARM_STACK_SPACE)
9096
+#ifdef INCOMING_REG_PARM_STACK_SPACE
9097
#define STACK_DYNAMIC_OFFSET(FNDECL) \
9098
((ACCUMULATE_OUTGOING_ARGS \
9099
? (crtl->outgoing_args_size \
9100
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
9101
- : REG_PARM_STACK_SPACE (FNDECL))) \
9102
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
9103
: 0) + (STACK_POINTER_OFFSET))
9105
#define STACK_DYNAMIC_OFFSET(FNDECL) \
9106
@@ -2211,8 +2215,9 @@
9108
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
9110
-#ifdef REG_PARM_STACK_SPACE
9111
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
9112
+#ifdef INCOMING_REG_PARM_STACK_SPACE
9113
+ all->reg_parm_stack_space
9114
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
9118
@@ -4518,6 +4523,7 @@
9119
/* ??? This could be set on a per-function basis by the front-end
9120
but is this worth the hassle? */
9121
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
9122
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
9126
Index: gcc/tree-vectorizer.h
9127
===================================================================
9128
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
9129
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
9131
#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
9133
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
9134
-(L)->may_misalign_stmts.length () > 0
9135
+((L)->may_misalign_stmts.length () > 0)
9136
#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
9137
-(L)->may_alias_ddrs.length () > 0
9138
+((L)->may_alias_ddrs.length () > 0)
9140
#define NITERS_KNOWN_P(n) \
9141
(host_integerp ((n),0) \
9143
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
9144
extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
9145
tree *, gimple_stmt_iterator *,
9146
- gimple *, bool, bool *);
9147
+ gimple *, bool, bool *,
9148
+ tree = NULL_TREE);
9149
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
9150
extern tree vect_create_destination_var (tree, tree);
9151
extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
9153
extern int vect_get_place_in_interleaving_chain (gimple, gimple);
9154
extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
9155
extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
9156
- tree, struct loop *);
9157
+ tree, struct loop *,
9158
+ tree = NULL_TREE);
9160
/* In tree-vect-loop.c. */
9161
/* FORNOW: Used in tree-parloops.c. */
9162
Index: gcc/stor-layout.c
9163
===================================================================
9164
--- a/src/gcc/stor-layout.c (.../tags/gcc_4_8_3_release)
9165
+++ b/src/gcc/stor-layout.c (.../branches/gcc-4_8-branch)
9166
@@ -234,12 +234,7 @@
9167
param_type = TREE_TYPE (ref);
9169
= build_decl (input_location, PARM_DECL, param_name, param_type);
9170
- if (targetm.calls.promote_prototypes (NULL_TREE)
9171
- && INTEGRAL_TYPE_P (param_type)
9172
- && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
9173
- DECL_ARG_TYPE (param_decl) = integer_type_node;
9175
- DECL_ARG_TYPE (param_decl) = param_type;
9176
+ DECL_ARG_TYPE (param_decl) = param_type;
9177
DECL_ARTIFICIAL (param_decl) = 1;
9178
TREE_READONLY (param_decl) = 1;
9180
Index: gcc/tree-vect-loop.c
9181
===================================================================
9182
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release)
9183
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
9184
@@ -2205,7 +2205,8 @@
9187
def1 = SSA_NAME_DEF_STMT (op1);
9188
- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
9189
+ if (gimple_bb (def1)
9190
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
9192
&& flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
9193
&& is_gimple_assign (def1))
9194
Index: gcc/tree-data-ref.c
9195
===================================================================
9196
--- a/src/gcc/tree-data-ref.c (.../tags/gcc_4_8_3_release)
9197
+++ b/src/gcc/tree-data-ref.c (.../branches/gcc-4_8-branch)
9199
ref = fold_build2_loc (EXPR_LOCATION (ref),
9200
MEM_REF, TREE_TYPE (ref),
9202
- DR_UNCONSTRAINED_BASE (dr) = true;
9203
access_fns.safe_push (access_fn);
9206
@@ -1326,14 +1325,20 @@
9210
- /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
9211
- the size of the base-object. So we cannot do any offset/overlap
9212
- based analysis but have to rely on points-to information only. */
9213
+ /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
9214
+ do not know the size of the base-object. So we cannot do any
9215
+ offset/overlap based analysis but have to rely on points-to
9216
+ information only. */
9217
if (TREE_CODE (addr_a) == MEM_REF
9218
- && DR_UNCONSTRAINED_BASE (a))
9219
+ && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
9221
- if (TREE_CODE (addr_b) == MEM_REF
9222
- && DR_UNCONSTRAINED_BASE (b))
9223
+ /* For true dependences we can apply TBAA. */
9224
+ if (flag_strict_aliasing
9225
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
9226
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
9227
+ get_alias_set (DR_REF (b))))
9229
+ if (TREE_CODE (addr_b) == MEM_REF)
9230
return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
9231
TREE_OPERAND (addr_b, 0));
9233
@@ -1341,9 +1346,21 @@
9234
build_fold_addr_expr (addr_b));
9236
else if (TREE_CODE (addr_b) == MEM_REF
9237
- && DR_UNCONSTRAINED_BASE (b))
9238
- return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
9239
- TREE_OPERAND (addr_b, 0));
9240
+ && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
9242
+ /* For true dependences we can apply TBAA. */
9243
+ if (flag_strict_aliasing
9244
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
9245
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
9246
+ get_alias_set (DR_REF (b))))
9248
+ if (TREE_CODE (addr_a) == MEM_REF)
9249
+ return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
9250
+ TREE_OPERAND (addr_b, 0));
9252
+ return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
9253
+ TREE_OPERAND (addr_b, 0));
9256
/* Otherwise DR_BASE_OBJECT is an access that covers the whole object
9257
that is being subsetted in the loop nest. */
9258
Index: gcc/tree-data-ref.h
9259
===================================================================
9260
--- a/src/gcc/tree-data-ref.h (.../tags/gcc_4_8_3_release)
9261
+++ b/src/gcc/tree-data-ref.h (.../branches/gcc-4_8-branch)
9264
/* A list of chrecs. Access functions of the indices. */
9265
vec<tree> access_fns;
9267
- /* Whether BASE_OBJECT is an access representing the whole object
9268
- or whether the access could not be constrained. */
9269
- bool unconstrained_base;
9274
#define DR_STMT(DR) (DR)->stmt
9275
#define DR_REF(DR) (DR)->ref
9276
#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
9277
-#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
9278
#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
9279
#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
9280
#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
9281
Index: gcc/tree-vect-data-refs.c
9282
===================================================================
9283
--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release)
9284
+++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
9285
@@ -3553,6 +3553,9 @@
9287
if LOOP=i_loop: &in (relative to i_loop)
9288
if LOOP=j_loop: &in+i*2B (relative to j_loop)
9289
+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
9290
+ initial address. Unlike OFFSET, which is number of elements to
9291
+ be added, BYTE_OFFSET is measured in bytes.
9294
1. Return an SSA_NAME whose value is the address of the memory location of
9295
@@ -3566,7 +3569,8 @@
9296
vect_create_addr_base_for_vector_ref (gimple stmt,
9297
gimple_seq *new_stmt_list,
9299
- struct loop *loop)
9300
+ struct loop *loop,
9303
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
9304
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
9305
@@ -3628,7 +3632,17 @@
9306
base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
9307
gimple_seq_add_seq (new_stmt_list, seq);
9311
+ tree tmp = create_tmp_var (sizetype, "offset");
9313
+ byte_offset = fold_convert (sizetype, byte_offset);
9314
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
9315
+ base_offset, byte_offset);
9316
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
9317
+ gimple_seq_add_seq (new_stmt_list, seq);
9320
/* base + base_offset */
9322
addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
9323
@@ -3692,6 +3706,10 @@
9324
5. BSI: location where the new stmts are to be placed if there is no loop
9325
6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
9326
pointing to the initial address.
9327
+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
9328
+ to the initial address accessed by the data-ref in STMT. This is
9329
+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
9333
1. Declare a new ptr to vector_type, and have it point to the base of the
9334
@@ -3705,6 +3723,8 @@
9335
initial_address = &a[init];
9336
if OFFSET is supplied:
9337
initial_address = &a[init + OFFSET];
9338
+ if BYTE_OFFSET is supplied:
9339
+ initial_address = &a[init] + BYTE_OFFSET;
9341
Return the initial_address in INITIAL_ADDRESS.
9343
@@ -3722,7 +3742,7 @@
9344
vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
9345
tree offset, tree *initial_address,
9346
gimple_stmt_iterator *gsi, gimple *ptr_incr,
9347
- bool only_init, bool *inv_p)
9348
+ bool only_init, bool *inv_p, tree byte_offset)
9350
const char *base_name;
9351
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
9352
@@ -3881,10 +3901,10 @@
9353
/* (2) Calculate the initial address of the aggregate-pointer, and set
9354
the aggregate-pointer to point to it before the loop. */
9356
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
9357
+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
9359
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
9361
+ offset, loop, byte_offset);
9365
Index: gcc/emit-rtl.c
9366
===================================================================
9367
--- a/src/gcc/emit-rtl.c (.../tags/gcc_4_8_3_release)
9368
+++ b/src/gcc/emit-rtl.c (.../branches/gcc-4_8-branch)
9371
/* Return true if the given memory attributes are equal. */
9375
mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
9377
return (p->alias == q->alias
9378
Index: gcc/gimple-fold.c
9379
===================================================================
9380
--- a/src/gcc/gimple-fold.c (.../tags/gcc_4_8_3_release)
9381
+++ b/src/gcc/gimple-fold.c (.../branches/gcc-4_8-branch)
9382
@@ -2955,8 +2955,8 @@
9384
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
9385
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
9386
- && operand_equal_p (TYPE_SIZE (type),
9387
- TYPE_SIZE (TREE_TYPE (ctor)), 0))
9388
+ && !compare_tree_int (TYPE_SIZE (type), size)
9389
+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
9391
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
9392
ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
9393
Index: gcc/emit-rtl.h
9394
===================================================================
9395
--- a/src/gcc/emit-rtl.h (.../tags/gcc_4_8_3_release)
9396
+++ b/src/gcc/emit-rtl.h (.../branches/gcc-4_8-branch)
9398
#ifndef GCC_EMIT_RTL_H
9399
#define GCC_EMIT_RTL_H
9401
+/* Return whether two MEM_ATTRs are equal. */
9402
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
9404
/* Set the alias set of MEM to SET. */
9405
extern void set_mem_alias_set (rtx, alias_set_type);
9407
Index: gcc/tree-cfgcleanup.c
9408
===================================================================
9409
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
9410
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
9411
@@ -498,7 +498,20 @@
9413
/* First split basic block if stmt is not last. */
9414
if (stmt != gsi_stmt (gsi_last_bb (bb)))
9415
- split_block (bb, stmt);
9417
+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
9419
+ /* Don't split if there are only debug stmts
9420
+ after stmt, that can result in -fcompare-debug
9421
+ failures. Remove the debug stmts instead,
9422
+ they should be all unreachable anyway. */
9423
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
9424
+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
9425
+ gsi_remove (&gsi, true);
9428
+ split_block (bb, stmt);
9431
changed |= remove_fallthru_edge (bb->succs);
9433
Index: gcc/tree-sra.c
9434
===================================================================
9435
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_3_release)
9436
+++ b/src/gcc/tree-sra.c (.../branches/gcc-4_8-branch)
9437
@@ -1030,6 +1030,11 @@
9441
+ if (TREE_THIS_VOLATILE (expr))
9443
+ disqualify_base_of_expr (expr, "part of a volatile reference.");
9447
switch (TREE_CODE (expr))
9449
Index: gcc/common.opt
9450
===================================================================
9451
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
9452
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
9453
@@ -1226,6 +1226,10 @@
9454
Common Report Var(flag_tm)
9455
Enable support for GNU transactional memory
9458
+Common Report Var(flag_gnu_unique) Init(1)
9459
+Use STB_GNU_UNIQUE if supported by the assembler
9463
Does nothing. Preserved for backward compatibility.
9464
Index: gcc/tree-vect-patterns.c
9465
===================================================================
9466
--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release)
9467
+++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch)
9471
oprnd00 = gimple_assign_rhs1 (def_stmt);
9472
- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
9473
+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
9477
Index: gcc/sched-deps.c
9478
===================================================================
9479
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
9480
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
9481
@@ -2744,7 +2744,8 @@
9482
Consider for instance a volatile asm that changes the fpu rounding
9483
mode. An insn should not be moved across this even if it only uses
9484
pseudo-regs because it might give an incorrectly rounded result. */
9485
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
9486
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
9487
+ && !DEBUG_INSN_P (insn))
9488
reg_pending_barrier = TRUE_BARRIER;
9490
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
9491
Index: gcc/tree-vect-stmts.c
9492
===================================================================
9493
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
9494
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
9495
@@ -4319,6 +4319,7 @@
9496
int i, j, group_size;
9497
tree msq = NULL_TREE, lsq;
9498
tree offset = NULL_TREE;
9499
+ tree byte_offset = NULL_TREE;
9500
tree realignment_token = NULL_TREE;
9502
vec<tree> dr_chain = vNULL;
9503
@@ -4934,7 +4935,8 @@
9504
if (alignment_support_scheme == dr_explicit_realign_optimized)
9506
phi = SSA_NAME_DEF_STMT (msq);
9507
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
9508
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
9513
@@ -4955,7 +4957,8 @@
9515
dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
9516
offset, &dummy, gsi,
9517
- &ptr_incr, false, &inv_p);
9518
+ &ptr_incr, false, &inv_p,
9521
dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
9522
TYPE_SIZE_UNIT (aggr_type));
9523
Index: gcc/config.gcc
9524
===================================================================
9525
--- a/src/gcc/config.gcc (.../tags/gcc_4_8_3_release)
9526
+++ b/src/gcc/config.gcc (.../branches/gcc-4_8-branch)
9527
@@ -2466,7 +2466,7 @@
9530
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
9531
- tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
9532
+ tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
9535
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
9536
@@ -2992,6 +2992,9 @@
9544
with_cpu="`echo ${target} | sed 's/-.*$//'`"
9546
@@ -3630,7 +3633,7 @@
9548
"" | sparc | sparcv9 | sparc64 \
9550
- | v8 | supersparc | hypersparc | leon | leon3 \
9551
+ | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
9552
| sparclite | f930 | f934 | sparclite86x \
9553
| sparclet | tsc701 \
9554
| v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
9556
===================================================================
9557
--- a/src/gcc/ree.c (.../tags/gcc_4_8_3_release)
9558
+++ b/src/gcc/ree.c (.../branches/gcc-4_8-branch)
9559
@@ -261,6 +261,50 @@
9561
static int max_insn_uid;
9563
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */
9566
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
9567
+ enum machine_mode old_mode, enum rtx_code code)
9569
+ rtx *loc = ®_NOTES (insn);
9572
+ enum reg_note kind = REG_NOTE_KIND (*loc);
9573
+ if (kind == REG_EQUAL || kind == REG_EQUIV)
9575
+ rtx orig_src = XEXP (*loc, 0);
9576
+ /* Update equivalency constants. Recall that RTL constants are
9578
+ if (GET_CODE (orig_src) == CONST_INT
9579
+ && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
9581
+ if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
9582
+ /* Nothing needed. */;
9585
+ /* Zero-extend the negative constant by masking out the
9586
+ bits outside the source mode. */
9588
+ = gen_int_mode (INTVAL (orig_src)
9589
+ & GET_MODE_MASK (old_mode),
9591
+ if (!validate_change (insn, &XEXP (*loc, 0),
9592
+ new_const_int, true))
9595
+ loc = &XEXP (*loc, 1);
9597
+ /* Drop all other notes, they assume a wrong mode. */
9598
+ else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
9602
+ loc = &XEXP (*loc, 1);
9607
/* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
9608
and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
9609
this code modifies the SET rtx to a new SET rtx that extends the
9611
combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
9613
rtx orig_src = SET_SRC (*orig_set);
9614
+ enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
9615
rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
9620
/* Zero-extend the negative constant by masking out the bits outside
9622
- enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
9624
- = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
9625
+ = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
9626
new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
9631
/* This change is a part of a group of changes. Hence,
9632
validate_change will not try to commit the change. */
9633
- if (validate_change (curr_insn, orig_set, new_set, true))
9634
+ if (validate_change (curr_insn, orig_set, new_set, true)
9635
+ && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
9641
ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
9642
new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
9644
- if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
9645
+ if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
9646
+ && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
9651
Index: gcc/config/alpha/elf.h
9652
===================================================================
9653
--- a/src/gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release)
9654
+++ b/src/gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch)
9655
@@ -126,6 +126,10 @@
9656
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
9657
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
9659
+/* This variable should be set to 'true' if the target ABI requires
9660
+ unwinding tables even when exceptions are not used. */
9661
+#define TARGET_UNWIND_TABLES_DEFAULT true
9663
/* Select a format to encode pointers in exception handling data. CODE
9664
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
9665
true if the symbol may be affected by dynamic relocations.
9666
Index: gcc/config/alpha/alpha.c
9667
===================================================================
9668
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
9669
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
9670
@@ -8658,6 +8658,11 @@
9675
+ /* __builtin_unreachable can expand to no code at all,
9676
+ leaving (barrier) RTXes in the instruction stream. */
9677
+ goto close_shadow_notrapb;
9682
@@ -8673,6 +8678,7 @@
9683
n = emit_insn_before (gen_trapb (), i);
9684
PUT_MODE (n, TImode);
9685
PUT_MODE (i, TImode);
9686
+ close_shadow_notrapb:
9690
Index: gcc/config/elfos.h
9691
===================================================================
9692
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
9693
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
9695
/* Write the extra assembler code needed to declare an object properly. */
9697
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
9698
-#define USE_GNU_UNIQUE_OBJECT 1
9699
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
9701
#define USE_GNU_UNIQUE_OBJECT 0
9703
Index: gcc/config/sparc/t-rtems
9704
===================================================================
9705
--- a/src/gcc/config/sparc/t-rtems (.../tags/gcc_4_8_3_release)
9706
+++ b/src/gcc/config/sparc/t-rtems (.../branches/gcc-4_8-branch)
9708
# <http://www.gnu.org/licenses/>.
9711
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
9712
-MULTILIB_DIRNAMES = soft v8 leon3
9713
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
9714
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
9715
MULTILIB_MATCHES = msoft-float=mno-fpu
9717
+MULTILIB_EXCEPTIONS = muser-mode
9718
+MULTILIB_EXCEPTIONS += mcpu=leon3
9719
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
9720
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
9721
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
9722
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
9723
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
9724
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
9725
Index: gcc/config/sparc/sparc.md
9726
===================================================================
9727
--- a/src/gcc/config/sparc/sparc.md (.../tags/gcc_4_8_3_release)
9728
+++ b/src/gcc/config/sparc/sparc.md (.../branches/gcc-4_8-branch)
9737
Index: gcc/config/sparc/sparc.opt
9738
===================================================================
9739
--- a/src/gcc/config/sparc/sparc.opt (.../tags/gcc_4_8_3_release)
9740
+++ b/src/gcc/config/sparc/sparc.opt (.../branches/gcc-4_8-branch)
9742
Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
9745
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
9748
Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
9751
Index: gcc/config/sparc/sync.md
9752
===================================================================
9753
--- a/src/gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release)
9754
+++ b/src/gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch)
9757
[(set_attr "type" "multi")])
9759
+;; For LEON3, STB has the effect of membar #StoreLoad.
9760
+(define_insn "*membar_storeload_leon3"
9761
+ [(set (match_operand:BLK 0 "" "")
9762
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
9764
+ "stb\t%%g0, [%%sp-1]"
9765
+ [(set_attr "type" "store")])
9767
;; For V8, LDSTUB has the effect of membar #StoreLoad.
9768
(define_insn "*membar_storeload"
9769
[(set (match_operand:BLK 0 "" "")
9770
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
9772
+ "TARGET_V8 && !TARGET_LEON3"
9773
"ldstub\t[%%sp-1], %%g0"
9774
[(set_attr "type" "multi")])
9776
Index: gcc/config/sparc/sparc-opts.h
9777
===================================================================
9778
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
9779
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
9781
PROCESSOR_HYPERSPARC,
9784
+ PROCESSOR_LEON3V7,
9785
PROCESSOR_SPARCLITE,
9788
Index: gcc/config/sparc/sparc.c
9789
===================================================================
9790
--- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_4_8_3_release)
9791
+++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-4_8-branch)
9792
@@ -1210,6 +1210,7 @@
9793
{ TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
9794
{ TARGET_CPU_leon, PROCESSOR_LEON },
9795
{ TARGET_CPU_leon3, PROCESSOR_LEON3 },
9796
+ { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
9797
{ TARGET_CPU_sparclite, PROCESSOR_F930 },
9798
{ TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
9799
{ TARGET_CPU_sparclet, PROCESSOR_TSC701 },
9800
@@ -1238,6 +1239,7 @@
9801
{ "hypersparc", MASK_ISA, MASK_V8|MASK_FPU },
9802
{ "leon", MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
9803
{ "leon3", MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
9804
+ { "leon3v7", MASK_ISA, MASK_LEON3|MASK_FPU },
9805
{ "sparclite", MASK_ISA, MASK_SPARCLITE },
9806
/* The Fujitsu MB86930 is the original sparclite chip, with no FPU. */
9807
{ "f930", MASK_ISA|MASK_FPU, MASK_SPARCLITE },
9808
@@ -1490,6 +1492,7 @@
9809
sparc_costs = &leon_costs;
9811
case PROCESSOR_LEON3:
9812
+ case PROCESSOR_LEON3V7:
9813
sparc_costs = &leon3_costs;
9815
case PROCESSOR_SPARCLET:
9816
Index: gcc/config/sparc/leon.md
9817
===================================================================
9818
--- a/src/gcc/config/sparc/leon.md (.../tags/gcc_4_8_3_release)
9819
+++ b/src/gcc/config/sparc/leon.md (.../branches/gcc-4_8-branch)
9822
;; Use a double reservation to work around the load pipeline hazard on UT699.
9823
(define_insn_reservation "leon3_load" 1
9824
- (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
9825
+ (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
9828
(define_insn_reservation "leon_store" 2
9829
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
9830
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
9833
;; This describes Gaisler Research's FPU
9835
(define_cpu_unit "grfpu_ds" "grfpu")
9837
(define_insn_reservation "leon_fp_alu" 4
9838
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
9839
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
9840
"grfpu_alu, nothing*3")
9842
(define_insn_reservation "leon_fp_divs" 16
9843
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
9844
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
9845
"grfpu_ds*14, nothing*2")
9847
(define_insn_reservation "leon_fp_divd" 17
9848
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
9849
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
9850
"grfpu_ds*15, nothing*2")
9852
(define_insn_reservation "leon_fp_sqrts" 24
9853
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
9854
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
9855
"grfpu_ds*22, nothing*2")
9857
(define_insn_reservation "leon_fp_sqrtd" 25
9858
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
9859
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
9860
"grfpu_ds*23, nothing*2")
9861
Index: gcc/config/sparc/sparc.h
9862
===================================================================
9863
--- a/src/gcc/config/sparc/sparc.h (.../tags/gcc_4_8_3_release)
9864
+++ b/src/gcc/config/sparc/sparc.h (.../branches/gcc-4_8-branch)
9865
@@ -137,21 +137,22 @@
9866
#define TARGET_CPU_hypersparc 3
9867
#define TARGET_CPU_leon 4
9868
#define TARGET_CPU_leon3 5
9869
-#define TARGET_CPU_sparclite 6
9870
-#define TARGET_CPU_f930 6 /* alias */
9871
-#define TARGET_CPU_f934 6 /* alias */
9872
-#define TARGET_CPU_sparclite86x 7
9873
-#define TARGET_CPU_sparclet 8
9874
-#define TARGET_CPU_tsc701 8 /* alias */
9875
-#define TARGET_CPU_v9 9 /* generic v9 implementation */
9876
-#define TARGET_CPU_sparcv9 9 /* alias */
9877
-#define TARGET_CPU_sparc64 9 /* alias */
9878
-#define TARGET_CPU_ultrasparc 10
9879
-#define TARGET_CPU_ultrasparc3 11
9880
-#define TARGET_CPU_niagara 12
9881
-#define TARGET_CPU_niagara2 13
9882
-#define TARGET_CPU_niagara3 14
9883
-#define TARGET_CPU_niagara4 15
9884
+#define TARGET_CPU_leon3v7 6
9885
+#define TARGET_CPU_sparclite 7
9886
+#define TARGET_CPU_f930 7 /* alias */
9887
+#define TARGET_CPU_f934 7 /* alias */
9888
+#define TARGET_CPU_sparclite86x 8
9889
+#define TARGET_CPU_sparclet 9
9890
+#define TARGET_CPU_tsc701 9 /* alias */
9891
+#define TARGET_CPU_v9 10 /* generic v9 implementation */
9892
+#define TARGET_CPU_sparcv9 10 /* alias */
9893
+#define TARGET_CPU_sparc64 10 /* alias */
9894
+#define TARGET_CPU_ultrasparc 11
9895
+#define TARGET_CPU_ultrasparc3 12
9896
+#define TARGET_CPU_niagara 13
9897
+#define TARGET_CPU_niagara2 14
9898
+#define TARGET_CPU_niagara3 15
9899
+#define TARGET_CPU_niagara4 16
9901
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
9902
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
9903
@@ -239,8 +240,13 @@
9904
#define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
9907
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
9908
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
9909
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
9914
#if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
9915
#error Unrecognized value in TARGET_CPU_DEFAULT.
9918
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
9919
%{mcpu=leon:-D__leon__ -D__sparc_v8__} \
9920
%{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
9921
+%{mcpu=leon3v7:-D__leon__} \
9922
%{mcpu=v9:-D__sparc_v9__} \
9923
%{mcpu=ultrasparc:-D__sparc_v9__} \
9924
%{mcpu=ultrasparc3:-D__sparc_v9__} \
9926
%{mcpu=hypersparc:-Av8} \
9927
%{mcpu=leon:" AS_LEON_FLAG "} \
9928
%{mcpu=leon3:" AS_LEON_FLAG "} \
9929
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
9930
%{mv8plus:-Av8plus} \
9932
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
9933
@@ -1760,8 +1768,10 @@
9936
#define AS_LEON_FLAG "-Aleon"
9937
+#define AS_LEONV7_FLAG "-Aleon"
9939
#define AS_LEON_FLAG "-Av8"
9940
+#define AS_LEONV7_FLAG "-Av7"
9943
/* We use gcc _mcount for profiling. */
9944
Index: gcc/config/i386/i386.md
9945
===================================================================
9946
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
9947
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
9948
@@ -5339,66 +5339,37 @@
9950
;; Avoid store forwarding (partial memory) stall penalty by extending
9951
;; SImode value to DImode through XMM register instead of pushing two
9952
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
9953
-;; targets benefit from this optimization. Also note that fild
9954
-;; loads from memory only.
9955
+;; SImode values to stack. Also note that fild loads from memory only.
9957
-(define_insn "*floatunssi<mode>2_1"
9958
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
9959
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
9960
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
9961
(unsigned_float:X87MODEF
9962
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
9963
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
9964
- (clobber (match_scratch:SI 3 "=X,x"))]
9965
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
9966
+ (clobber (match_scratch:DI 3 "=x"))
9967
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
9969
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9971
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
9973
+ "&& reload_completed"
9974
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
9975
+ (set (match_dup 2) (match_dup 3))
9976
+ (set (match_dup 0)
9977
+ (float:X87MODEF (match_dup 2)))]
9979
[(set_attr "type" "multi")
9980
(set_attr "mode" "<MODE>")])
9983
- [(set (match_operand:X87MODEF 0 "register_operand")
9984
- (unsigned_float:X87MODEF
9985
- (match_operand:SI 1 "register_operand")))
9986
- (clobber (match_operand:DI 2 "memory_operand"))
9987
- (clobber (match_scratch:SI 3))]
9989
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
9991
- && reload_completed"
9992
- [(set (match_dup 2) (match_dup 1))
9993
- (set (match_dup 0)
9994
- (float:X87MODEF (match_dup 2)))]
9995
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
9998
- [(set (match_operand:X87MODEF 0 "register_operand")
9999
- (unsigned_float:X87MODEF
10000
- (match_operand:SI 1 "memory_operand")))
10001
- (clobber (match_operand:DI 2 "memory_operand"))
10002
- (clobber (match_scratch:SI 3))]
10004
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10006
- && reload_completed"
10007
- [(set (match_dup 2) (match_dup 3))
10008
- (set (match_dup 0)
10009
- (float:X87MODEF (match_dup 2)))]
10011
- emit_move_insn (operands[3], operands[1]);
10012
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
10015
(define_expand "floatunssi<mode>2"
10017
[(set (match_operand:X87MODEF 0 "register_operand")
10018
(unsigned_float:X87MODEF
10019
(match_operand:SI 1 "nonimmediate_operand")))
10020
- (clobber (match_dup 2))
10021
- (clobber (match_scratch:SI 3))])]
10022
+ (clobber (match_scratch:DI 3))
10023
+ (clobber (match_dup 2))])]
10025
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10027
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
10028
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
10030
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
10031
@@ -13545,7 +13516,8 @@
10032
(set (reg:CCFP FPSR_REG)
10033
(unspec:CCFP [(match_dup 2) (match_dup 3)]
10035
- "TARGET_USE_FANCY_MATH_387"
10036
+ "TARGET_USE_FANCY_MATH_387
10037
+ && flag_finite_math_only"
10039
[(set_attr "type" "fpspc")
10040
(set_attr "mode" "XF")])
10041
@@ -13554,7 +13526,8 @@
10042
[(use (match_operand:XF 0 "register_operand"))
10043
(use (match_operand:XF 1 "general_operand"))
10044
(use (match_operand:XF 2 "general_operand"))]
10045
- "TARGET_USE_FANCY_MATH_387"
10046
+ "TARGET_USE_FANCY_MATH_387
10047
+ && flag_finite_math_only"
10049
rtx label = gen_label_rtx ();
10051
@@ -13577,7 +13550,8 @@
10052
[(use (match_operand:MODEF 0 "register_operand"))
10053
(use (match_operand:MODEF 1 "general_operand"))
10054
(use (match_operand:MODEF 2 "general_operand"))]
10055
- "TARGET_USE_FANCY_MATH_387"
10056
+ "TARGET_USE_FANCY_MATH_387
10057
+ && flag_finite_math_only"
10059
rtx (*gen_truncxf) (rtx, rtx);
10061
@@ -13616,7 +13590,8 @@
10062
(set (reg:CCFP FPSR_REG)
10063
(unspec:CCFP [(match_dup 2) (match_dup 3)]
10065
- "TARGET_USE_FANCY_MATH_387"
10066
+ "TARGET_USE_FANCY_MATH_387
10067
+ && flag_finite_math_only"
10069
[(set_attr "type" "fpspc")
10070
(set_attr "mode" "XF")])
10071
@@ -13625,7 +13600,8 @@
10072
[(use (match_operand:XF 0 "register_operand"))
10073
(use (match_operand:XF 1 "general_operand"))
10074
(use (match_operand:XF 2 "general_operand"))]
10075
- "TARGET_USE_FANCY_MATH_387"
10076
+ "TARGET_USE_FANCY_MATH_387
10077
+ && flag_finite_math_only"
10079
rtx label = gen_label_rtx ();
10081
@@ -13648,7 +13624,8 @@
10082
[(use (match_operand:MODEF 0 "register_operand"))
10083
(use (match_operand:MODEF 1 "general_operand"))
10084
(use (match_operand:MODEF 2 "general_operand"))]
10085
- "TARGET_USE_FANCY_MATH_387"
10086
+ "TARGET_USE_FANCY_MATH_387
10087
+ && flag_finite_math_only"
10089
rtx (*gen_truncxf) (rtx, rtx);
10091
Index: gcc/config/i386/driver-i386.c
10092
===================================================================
10093
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
10094
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
10095
@@ -713,6 +713,11 @@
10096
/* Assume Core 2. */
10099
+ else if (has_longmode)
10100
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
10101
+ -march=native would be unusable for 64-bit compilations,
10102
+ as all the CPUs below are 32-bit only. */
10105
/* It is Core Duo. */
10107
Index: gcc/config/i386/i386.c
10108
===================================================================
10109
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
10110
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
10111
@@ -13800,7 +13800,7 @@
10112
if (mode == CCmode)
10114
else if (mode == CCCmode)
10116
+ suffix = fp ? "b" : "c";
10118
gcc_unreachable ();
10120
@@ -13823,9 +13823,9 @@
10123
if (mode == CCmode)
10124
- suffix = fp ? "nb" : "ae";
10126
else if (mode == CCCmode)
10128
+ suffix = fp ? "nb" : "nc";
10130
gcc_unreachable ();
10132
@@ -20505,7 +20505,7 @@
10133
t1 = gen_reg_rtx (V32QImode);
10134
t2 = gen_reg_rtx (V32QImode);
10135
t3 = gen_reg_rtx (V32QImode);
10136
- vt2 = GEN_INT (128);
10137
+ vt2 = GEN_INT (-128);
10138
for (i = 0; i < 32; i++)
10140
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
10141
@@ -24640,13 +24640,17 @@
10145
- /* Assume that region is SCC, i.e. all immediate predecessors
10146
- of non-head block are in the same region. */
10148
+ /* Regions are SCCs with the exception of selective
10149
+ scheduling with pipelining of outer blocks enabled.
10150
+ So also check that immediate predecessors of a non-head
10151
+ block are in the same region. */
10152
FOR_EACH_EDGE (e, ei, bb->preds)
10154
/* Avoid creating of loop-carried dependencies through
10155
- using topological odering in region. */
10156
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
10157
+ using topological ordering in the region. */
10158
+ if (rgn == CONTAINING_RGN (e->src->index)
10159
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
10160
add_dependee_for_func_arg (first_arg, e->src);
10163
@@ -38807,8 +38811,8 @@
10164
op0 = gen_lowpart (V4DImode, d->op0);
10165
op1 = gen_lowpart (V4DImode, d->op1);
10167
- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
10168
- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
10169
+ = GEN_INT ((d->perm[0] / (nelt / 2))
10170
+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
10171
emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
10174
Index: gcc/config/sh/sh.c
10175
===================================================================
10176
--- a/src/gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release)
10177
+++ b/src/gcc/config/sh/sh.c (.../branches/gcc-4_8-branch)
10178
@@ -808,6 +808,12 @@
10179
targetm.asm_out.aligned_op.di = NULL;
10180
targetm.asm_out.unaligned_op.di = NULL;
10183
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
10184
+ Disable it for everything else. */
10185
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
10186
+ TARGET_USERMODE = false;
10190
if (! strcmp (sh_div_str, "call-div1"))
10191
@@ -3036,7 +3042,7 @@
10192
struct ashl_lshr_sequence
10196
+ signed char amount[6];
10200
Index: gcc/config/sh/sync.md
10201
===================================================================
10202
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
10203
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
10204
@@ -466,6 +466,7 @@
10205
(set (mem:SI (match_dup 1))
10207
[(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
10208
+ (set (reg:SI T_REG) (const_int 1))
10209
(clobber (reg:SI R0_REG))]
10210
"TARGET_ATOMIC_HARD_LLCS
10211
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
10212
@@ -484,6 +485,7 @@
10213
(set (mem:QIHI (match_dup 1))
10215
[(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
10216
+ (set (reg:SI T_REG) (const_int 1))
10217
(clobber (reg:SI R0_REG))
10218
(clobber (match_scratch:SI 3 "=&r"))
10219
(clobber (match_scratch:SI 4 "=1"))]
10220
@@ -617,6 +619,7 @@
10221
[(FETCHOP:SI (mem:SI (match_dup 1))
10222
(match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
10224
+ (set (reg:SI T_REG) (const_int 1))
10225
(clobber (reg:SI R0_REG))]
10226
"TARGET_ATOMIC_HARD_LLCS
10227
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
10228
@@ -637,6 +640,7 @@
10229
[(FETCHOP:QIHI (mem:QIHI (match_dup 1))
10230
(match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
10232
+ (set (reg:SI T_REG) (const_int 1))
10233
(clobber (reg:SI R0_REG))
10234
(clobber (match_scratch:SI 3 "=&r"))
10235
(clobber (match_scratch:SI 4 "=1"))]
10236
@@ -784,6 +788,7 @@
10237
[(not:SI (and:SI (mem:SI (match_dup 1))
10238
(match_operand:SI 2 "logical_operand" "rK08")))]
10240
+ (set (reg:SI T_REG) (const_int 1))
10241
(clobber (reg:SI R0_REG))]
10242
"TARGET_ATOMIC_HARD_LLCS
10243
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
10244
@@ -805,6 +810,7 @@
10245
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
10246
(match_operand:QIHI 2 "logical_operand" "rK08")))]
10248
+ (set (reg:SI T_REG) (const_int 1))
10249
(clobber (reg:SI R0_REG))
10250
(clobber (match_scratch:SI 3 "=&r"))
10251
(clobber (match_scratch:SI 4 "=1"))]
10252
@@ -903,7 +909,7 @@
10255
" mov.<bwl> %3,@%1" "\n"
10259
[(set_attr "length" "20")])
10261
@@ -960,7 +966,8 @@
10262
(set (mem:SI (match_dup 1))
10264
[(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
10267
+ (set (reg:SI T_REG) (const_int 1))]
10268
"TARGET_ATOMIC_HARD_LLCS
10269
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
10271
@@ -980,6 +987,7 @@
10273
[(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
10275
+ (set (reg:SI T_REG) (const_int 1))
10276
(clobber (reg:SI R0_REG))
10277
(clobber (match_scratch:SI 3 "=&r"))
10278
(clobber (match_scratch:SI 4 "=1"))]
10279
@@ -1124,7 +1132,8 @@
10280
(set (mem:SI (match_dup 1))
10282
[(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
10285
+ (set (reg:SI T_REG) (const_int 1))]
10286
"TARGET_ATOMIC_HARD_LLCS
10287
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
10289
@@ -1145,6 +1154,7 @@
10291
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
10293
+ (set (reg:SI T_REG) (const_int 1))
10294
(clobber (reg:SI R0_REG))
10295
(clobber (match_scratch:SI 3 "=&r"))
10296
(clobber (match_scratch:SI 4 "=1"))]
10297
@@ -1353,7 +1363,7 @@
10299
" mov.b @%0,r0" "\n"
10300
" mov.b %1,@%0" "\n"
10301
- " stc %2,sr" "\n"
10302
+ " ldc %2,sr" "\n"
10305
[(set_attr "length" "16")])
10306
Index: gcc/config/sh/sh.opt
10307
===================================================================
10308
--- a/src/gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release)
10309
+++ b/src/gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch)
10310
@@ -343,7 +343,7 @@
10311
Cost to assume for a multiply insn
10314
-Target Report RejectNegative Var(TARGET_USERMODE)
10315
+Target Var(TARGET_USERMODE)
10316
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
10318
;; We might want to enable this by default for TARGET_HARD_SH4, because
10319
Index: gcc/config/microblaze/predicates.md
10320
===================================================================
10321
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
10322
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
10324
(ior (match_operand 0 "const_0_operand")
10325
(match_operand 0 "register_operand")))
10327
-(define_predicate "reg_or_mem_operand"
10328
- (ior (match_operand 0 "memory_operand")
10329
- (match_operand 0 "register_operand")))
10331
;; Return if the operand is either the PC or a label_ref.
10332
(define_special_predicate "pc_or_label_operand"
10333
(ior (match_code "pc,label_ref")
10334
Index: gcc/config/microblaze/microblaze.md
10335
===================================================================
10336
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
10337
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
10338
@@ -1119,18 +1119,6 @@
10342
-;;Load and store reverse
10343
-(define_insn "movsi4_rev"
10344
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
10345
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
10350
- [(set_attr "type" "load,store")
10351
- (set_attr "mode" "SI")
10352
- (set_attr "length" "4,4")])
10354
;; 32-bit floating point moves
10356
(define_expand "movsf"
10357
Index: gcc/config/avr/avr-fixed.md
10358
===================================================================
10359
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
10360
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
10361
@@ -430,8 +430,8 @@
10364
// Input and output of the libgcc function
10365
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
10366
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
10367
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
10368
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
10370
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
10371
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
10372
Index: gcc/config/avr/avr.md
10373
===================================================================
10374
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
10375
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
10376
@@ -367,6 +367,15 @@
10381
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
10382
+ // of the poor addressing capabilities of these spaces it's better to
10383
+ // load them in one chunk. And it avoids PR61443.
10385
+ if (MEM_P (operands[0])
10386
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
10387
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
10389
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
10391
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
10392
Index: gcc/config/avr/avr.h
10393
===================================================================
10394
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
10395
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
10396
@@ -250,18 +250,18 @@
10397
#define REG_CLASS_CONTENTS { \
10398
{0x00000000,0x00000000}, /* NO_REGS */ \
10399
{0x00000001,0x00000000}, /* R0_REG */ \
10400
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
10401
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
10402
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
10403
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
10404
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
10405
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
10406
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
10407
- {(3 << REG_Y) | (3 << REG_Z), \
10408
+ {(3u << REG_Y) | (3u << REG_Z), \
10409
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
10410
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
10411
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
10412
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
10413
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
10414
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
10415
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
10416
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
10417
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
10418
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
10419
0x00000000}, /* LD_REGS, r16 - r31 */ \
10420
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
10421
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
10422
Index: gcc/config/aarch64/arm_neon.h
10423
===================================================================
10424
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
10425
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
10426
@@ -13815,7 +13815,7 @@
10428
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
10432
: /* No clobbers */);
10435
@@ -13837,7 +13837,7 @@
10437
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
10441
: /* No clobbers */);
10444
Index: gcc/config/aarch64/aarch64.md
10445
===================================================================
10446
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
10447
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
10448
@@ -3292,6 +3292,7 @@
10449
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
10451
(clobber (reg:DI LR_REGNUM))
10452
+ (clobber (reg:CC CC_REGNUM))
10453
(clobber (match_scratch:DI 1 "=r"))]
10455
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
10456
Index: gcc/config/aarch64/aarch64.opt
10457
===================================================================
10458
--- a/src/gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release)
10459
+++ b/src/gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch)
10461
Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
10462
Generate code which uses only the general registers
10464
+mfix-cortex-a53-835769
10465
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
10466
+Workaround for ARM Cortex-A53 Erratum number 835769
10469
Target Report RejectNegative InverseMask(BIG_END)
10470
Assume target CPU is configured as little endian
10471
Index: gcc/config/aarch64/aarch64-protos.h
10472
===================================================================
10473
--- a/src/gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release)
10474
+++ b/src/gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch)
10475
@@ -247,6 +247,8 @@
10477
extern void aarch64_split_combinev16qi (rtx operands[3]);
10478
extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
10479
+extern bool aarch64_madd_needs_nop (rtx);
10480
+extern void aarch64_final_prescan_insn (rtx);
10482
aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
10484
Index: gcc/config/aarch64/aarch64.c
10485
===================================================================
10486
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
10487
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
10488
@@ -1201,6 +1201,7 @@
10489
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
10490
int ncrn, nvrn, nregs;
10491
bool allocate_ncrn, allocate_nvrn;
10492
+ HOST_WIDE_INT size;
10494
/* We need to do this once per argument. */
10495
if (pcum->aapcs_arg_processed)
10496
@@ -1208,6 +1209,11 @@
10498
pcum->aapcs_arg_processed = true;
10500
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
10502
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
10505
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
10506
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
10508
@@ -1258,10 +1264,8 @@
10511
ncrn = pcum->aapcs_ncrn;
10512
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
10513
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
10514
+ nregs = size / UNITS_PER_WORD;
10517
/* C6 - C9. though the sign and zero extension semantics are
10518
handled elsewhere. This is the case where the argument fits
10519
entirely general registers. */
10520
@@ -1309,13 +1313,12 @@
10521
pcum->aapcs_nextncrn = NUM_ARG_REGS;
10523
/* The argument is passed on stack; record the needed number of words for
10524
- this argument (we can re-use NREGS) and align the total size if
10526
+ this argument and align the total size if necessary. */
10528
- pcum->aapcs_stack_words = nregs;
10529
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
10530
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
10531
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
10532
- 16 / UNITS_PER_WORD) + 1;
10533
+ 16 / UNITS_PER_WORD);
10537
@@ -4845,6 +4848,15 @@
10538
aarch64_tune = selected_tune->core;
10539
aarch64_tune_params = selected_tune->tune;
10541
+ if (aarch64_fix_a53_err835769 == 2)
10543
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
10544
+ aarch64_fix_a53_err835769 = 1;
10546
+ aarch64_fix_a53_err835769 = 0;
10550
aarch64_override_options_after_change ();
10553
@@ -6037,6 +6049,135 @@
10558
+/* Return true iff X is a MEM rtx. */
10561
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
10563
+ return MEM_P (*x);
10567
+/* Return true if mem_insn contains a MEM RTX somewhere in it. */
10570
+has_memory_op (rtx mem_insn)
10572
+ rtx pattern = PATTERN (mem_insn);
10573
+ return for_each_rtx (&pattern, is_mem_p, NULL);
10577
+/* Find the first rtx before insn that will generate an assembly
10581
+aarch64_prev_real_insn (rtx insn)
10588
+ insn = prev_real_insn (insn);
10590
+ while (insn && recog_memoized (insn) < 0);
10595
+/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
10598
+is_madd_op (enum attr_v8type t1)
10600
+ return t1 == V8TYPE_MADD
10601
+ || t1 == V8TYPE_MADDL;
10605
+/* Check if there is a register dependency between a load and the insn
10606
+ for which we hold recog_data. */
10609
+dep_between_memop_and_curr (rtx memop)
10614
+ gcc_assert (GET_CODE (memop) == SET);
10616
+ if (!REG_P (SET_DEST (memop)))
10619
+ load_reg = SET_DEST (memop);
10620
+ for (opno = 1; opno < recog_data.n_operands; opno++)
10622
+ rtx operand = recog_data.operand[opno];
10623
+ if (REG_P (operand)
10624
+ && reg_overlap_mentioned_p (load_reg, operand))
10633
+/* When working around the Cortex-A53 erratum 835769,
10634
+ given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
10635
+ instruction and has a preceding memory instruction such that a NOP
10636
+ should be inserted between them. */
10639
+aarch64_madd_needs_nop (rtx insn)
10641
+ enum attr_v8type attr_type;
10645
+ if (!aarch64_fix_a53_err835769)
10648
+ if (recog_memoized (insn) < 0)
10651
+ attr_type = get_attr_v8type (insn);
10652
+ if (!is_madd_op (attr_type))
10655
+ prev = aarch64_prev_real_insn (insn);
10656
+ /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
10657
+ Restore recog state to INSN to avoid state corruption. */
10658
+ extract_constrain_insn_cached (insn);
10660
+ if (!prev || !has_memory_op (prev))
10663
+ body = single_set (prev);
10665
+ /* If the previous insn is a memory op and there is no dependency between
10666
+ it and the madd, emit a nop between them. If we know it's a memop but
10667
+ body is NULL, return true to be safe. */
10668
+ if (GET_MODE (recog_data.operand[0]) == DImode
10669
+ && (!body || !dep_between_memop_and_curr (body)))
10676
+/* Implement FINAL_PRESCAN_INSN. */
10679
+aarch64_final_prescan_insn (rtx insn)
10681
+ if (aarch64_madd_needs_nop (insn))
10682
+ fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
10686
/* Return the equivalent letter for size. */
10687
static unsigned char
10688
sizetochar (int size)
10689
Index: gcc/config/aarch64/aarch64-elf-raw.h
10690
===================================================================
10691
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h (.../tags/gcc_4_8_3_release)
10692
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h (.../branches/gcc-4_8-branch)
10694
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
10695
#define ENDFILE_SPEC " crtend%O%s crtn%O%s"
10697
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
10698
+#define CA53_ERR_835769_SPEC \
10699
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
10701
+#define CA53_ERR_835769_SPEC \
10702
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
10706
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
10707
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
10708
+ CA53_ERR_835769_SPEC
10711
#endif /* GCC_AARCH64_ELF_RAW_H */
10712
Index: gcc/config/aarch64/aarch64-linux.h
10713
===================================================================
10714
--- a/src/gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release)
10715
+++ b/src/gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch)
10718
%{mbig-endian:-EB} %{mlittle-endian:-EL}"
10720
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
10721
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
10722
+#define CA53_ERR_835769_SPEC \
10723
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
10725
+#define CA53_ERR_835769_SPEC \
10726
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
10729
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
10730
+ CA53_ERR_835769_SPEC
10732
#define TARGET_OS_CPP_BUILTINS() \
10739
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
10741
#endif /* GCC_AARCH64_LINUX_H */
10742
Index: gcc/config/aarch64/aarch64.h
10743
===================================================================
10744
--- a/src/gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release)
10745
+++ b/src/gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch)
10746
@@ -465,6 +465,18 @@
10747
(TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
10750
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
10751
+ length so that conditional branching code is updated appropriately. */
10752
+#define ADJUST_INSN_LENGTH(insn, length) \
10755
+ if (aarch64_madd_needs_nop (insn)) \
10759
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
10760
+ aarch64_final_prescan_insn (INSN); \
10762
/* The processor for which instructions should be scheduled. */
10763
extern enum aarch64_processor aarch64_tune;
10765
Index: gcc/config/rs6000/constraints.md
10766
===================================================================
10767
--- a/src/gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release)
10768
+++ b/src/gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch)
10770
(define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
10771
"If -mmfpgpr was used, a floating point register or NO_REGS.")
10773
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
10774
+ "Floating point register if direct moves are available, or NO_REGS.")
10776
+;; At present, DImode is not allowed in the Altivec registers. If in the
10777
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
10778
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
10779
+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
10781
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
10782
+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
10784
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
10785
+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
10787
(define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
10788
"Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
10791
"Floating point register if the STFIWX instruction is enabled or NO_REGS.")
10793
(define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
10794
- "VSX vector register to hold scalar float values or NO_REGS.")
10795
+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
10797
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
10798
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
10799
Index: gcc/config/rs6000/predicates.md
10800
===================================================================
10801
--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release)
10802
+++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch)
10803
@@ -1795,7 +1795,7 @@
10804
(define_predicate "fusion_gpr_mem_load"
10805
(match_code "mem,sign_extend,zero_extend")
10808
+ rtx addr, base, offset;
10810
/* Handle sign/zero extend. */
10811
if (GET_CODE (op) == ZERO_EXTEND
10812
@@ -1825,24 +1825,79 @@
10815
addr = XEXP (op, 0);
10816
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10819
+ base = XEXP (addr, 0);
10820
+ if (!base_reg_operand (base, GET_MODE (base)))
10823
+ offset = XEXP (addr, 1);
10825
if (GET_CODE (addr) == PLUS)
10826
+ return satisfies_constraint_I (offset);
10828
+ else if (GET_CODE (addr) == LO_SUM)
10830
- rtx base = XEXP (addr, 0);
10831
- rtx offset = XEXP (addr, 1);
10832
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10833
+ return small_toc_ref (offset, GET_MODE (offset));
10835
- return (base_reg_operand (base, GET_MODE (base))
10836
- && satisfies_constraint_I (offset));
10837
+ else if (TARGET_ELF && !TARGET_POWERPC64)
10838
+ return CONSTANT_P (offset);
10841
- else if (GET_CODE (addr) == LO_SUM)
10845
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
10846
+;; memory field with both the addis and the memory offset. Sign extension
10847
+;; is not handled here, since lha and lwa are not fused.
10848
+(define_predicate "fusion_gpr_mem_combo"
10849
+ (match_code "mem,zero_extend")
10851
+ rtx addr, base, offset;
10853
+ /* Handle zero extend. */
10854
+ if (GET_CODE (op) == ZERO_EXTEND)
10856
- rtx base = XEXP (addr, 0);
10857
- rtx offset = XEXP (addr, 1);
10858
+ op = XEXP (op, 0);
10859
+ mode = GET_MODE (op);
10862
- if (!base_reg_operand (base, GET_MODE (base)))
10874
+ if (!TARGET_POWERPC64)
10878
- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10883
+ addr = XEXP (op, 0);
10884
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
10887
+ base = XEXP (addr, 0);
10888
+ if (!fusion_gpr_addis (base, GET_MODE (base)))
10891
+ offset = XEXP (addr, 1);
10892
+ if (GET_CODE (addr) == PLUS)
10893
+ return satisfies_constraint_I (offset);
10895
+ else if (GET_CODE (addr) == LO_SUM)
10897
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
10898
return small_toc_ref (offset, GET_MODE (offset));
10900
else if (TARGET_ELF && !TARGET_POWERPC64)
10901
Index: gcc/config/rs6000/htm.md
10902
===================================================================
10903
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
10904
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
10905
@@ -179,7 +179,7 @@
10907
UNSPECV_HTM_TABORTWCI))
10908
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
10909
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
10910
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
10911
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
10912
(and:SI (match_dup 3) (const_int 15)))
10913
(clobber (scratch:CC))])]
10914
Index: gcc/config/rs6000/freebsd64.h
10915
===================================================================
10916
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
10917
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
10918
@@ -367,7 +367,7 @@
10919
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
10920
#undef ADJUST_FIELD_ALIGN
10921
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
10922
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
10923
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
10926
&& TARGET_ALIGN_NATURAL == 0 \
10927
Index: gcc/config/rs6000/rs6000-protos.h
10928
===================================================================
10929
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
10930
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
10932
extern bool gpr_or_gpr_p (rtx, rtx);
10933
extern bool direct_move_p (rtx, rtx);
10934
extern bool quad_load_store_p (rtx, rtx);
10935
-extern bool fusion_gpr_load_p (rtx *, bool);
10936
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
10937
extern void expand_fusion_gpr_load (rtx *);
10938
-extern const char *emit_fusion_gpr_load (rtx *);
10939
+extern const char *emit_fusion_gpr_load (rtx, rtx);
10940
extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
10942
extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
10943
@@ -153,6 +153,7 @@
10946
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
10947
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
10948
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
10950
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
10951
@@ -161,7 +162,7 @@
10952
extern rtx rs6000_libcall_value (enum machine_mode);
10953
extern rtx rs6000_va_arg (tree, tree);
10954
extern int function_ok_for_sibcall (tree);
10955
-extern int rs6000_reg_parm_stack_space (tree);
10956
+extern int rs6000_reg_parm_stack_space (tree, bool);
10957
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
10958
extern bool rs6000_elf_in_small_data_p (const_tree);
10959
#ifdef ARGS_SIZE_RTX
10960
Index: gcc/config/rs6000/rs6000-builtin.def
10961
===================================================================
10962
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
10963
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
10964
@@ -622,20 +622,13 @@
10965
| RS6000_BTC_TERNARY), \
10966
CODE_FOR_ ## ICODE) /* ICODE */
10968
-/* Miscellaneous builtins. */
10969
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
10970
+/* 128-bit long double floating point builtins. */
10971
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
10972
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
10973
"__builtin_" NAME, /* NAME */ \
10974
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
10975
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
10976
+ | RS6000_BTM_LDBL128), \
10977
(RS6000_BTC_ ## ATTR /* ATTR */ \
10978
- | RS6000_BTC_UNARY), \
10979
- CODE_FOR_ ## ICODE) /* ICODE */
10981
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
10982
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
10983
- "__builtin_" NAME, /* NAME */ \
10984
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
10985
- (RS6000_BTC_ ## ATTR /* ATTR */ \
10986
| RS6000_BTC_BINARY), \
10987
CODE_FOR_ ## ICODE) /* ICODE */
10989
@@ -1593,10 +1586,8 @@
10990
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
10991
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
10993
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
10994
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
10995
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
10996
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
10997
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
10998
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
11000
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
11001
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
11002
Index: gcc/config/rs6000/rs6000-c.c
11003
===================================================================
11004
--- a/src/gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release)
11005
+++ b/src/gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch)
11006
@@ -3265,6 +3265,8 @@
11008
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
11009
RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
11010
+ { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
11011
+ RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
11012
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
11013
RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
11014
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
11015
@@ -3319,6 +3321,8 @@
11017
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
11018
RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
11019
+ { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
11020
+ RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
11021
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
11022
RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
11023
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
11024
@@ -4126,7 +4130,8 @@
11025
argument) is reversed. Patch the arguments here before building
11026
the resolved CALL_EXPR. */
11027
if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
11028
- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
11029
+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
11030
+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
11033
t = args[2], args[2] = args[1], args[1] = t;
11034
@@ -4184,6 +4189,14 @@
11035
if (TARGET_DEBUG_BUILTIN)
11036
fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
11037
(int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
11039
+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
11040
+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
11041
+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
11042
+assignment for unaligned loads and stores");
11043
+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
11044
+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
11045
+assignment for unaligned loads and stores");
11047
/* For now treat vec_splats and vec_promote as the same. */
11048
if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
11049
Index: gcc/config/rs6000/linux64.h
11050
===================================================================
11051
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release)
11052
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
11053
@@ -246,7 +246,7 @@
11054
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
11055
#undef ADJUST_FIELD_ALIGN
11056
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
11057
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
11058
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
11061
&& TARGET_ALIGN_NATURAL == 0 \
11062
Index: gcc/config/rs6000/rs6000.c
11063
===================================================================
11064
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
11065
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
11066
@@ -369,6 +369,7 @@
11067
enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
11068
enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
11069
addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
11070
+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
11073
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
11074
@@ -1704,8 +1705,7 @@
11076
if (TARGET_VSX && VSX_REGNO_P (regno)
11077
&& (VECTOR_MEM_VSX_P (mode)
11078
- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
11079
- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
11080
+ || reg_addr[mode].scalar_in_vmx_p
11081
|| (TARGET_VSX_TIMODE && mode == TImode)
11082
|| (TARGET_VADDUQM && mode == V1TImode)))
11084
@@ -1714,12 +1714,9 @@
11086
if (ALTIVEC_REGNO_P (regno))
11088
- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
11089
+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
11092
- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
11095
return ALTIVEC_REGNO_P (last_regno);
11098
@@ -1897,14 +1894,16 @@
11099
if (rs6000_vector_unit[m] != VECTOR_NONE
11100
|| rs6000_vector_mem[m] != VECTOR_NONE
11101
|| (reg_addr[m].reload_store != CODE_FOR_nothing)
11102
- || (reg_addr[m].reload_load != CODE_FOR_nothing))
11103
+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
11104
+ || reg_addr[m].scalar_in_vmx_p)
11107
- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
11108
+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
11109
rs6000_debug_vector_unit (rs6000_vector_unit[m]),
11110
rs6000_debug_vector_unit (rs6000_vector_mem[m]),
11111
(reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
11112
- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
11113
+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
11114
+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
11117
fputs ("\n", stderr);
11118
@@ -2021,6 +2020,10 @@
11119
"wd reg_class = %s\n"
11120
"wf reg_class = %s\n"
11121
"wg reg_class = %s\n"
11122
+ "wh reg_class = %s\n"
11123
+ "wi reg_class = %s\n"
11124
+ "wj reg_class = %s\n"
11125
+ "wk reg_class = %s\n"
11126
"wl reg_class = %s\n"
11127
"wm reg_class = %s\n"
11128
"wr reg_class = %s\n"
11129
@@ -2040,6 +2043,10 @@
11130
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
11131
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
11132
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
11133
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
11134
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
11135
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
11136
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
11137
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
11138
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
11139
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
11140
@@ -2324,6 +2331,8 @@
11142
for (m = 0; m < NUM_MACHINE_MODES; ++m)
11144
+ enum machine_mode m2 = (enum machine_mode)m;
11146
/* SDmode is special in that we want to access it only via REG+REG
11147
addressing on power7 and above, since we want to use the LFIWZX and
11148
STFIWZX instructions to load it. */
11149
@@ -2358,13 +2367,12 @@
11152
&& (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
11153
- && GET_MODE_SIZE (m) <= 8
11154
- && !VECTOR_MODE_P (m)
11155
- && !COMPLEX_MODE_P (m)
11156
+ && GET_MODE_SIZE (m2) <= 8
11157
+ && !VECTOR_MODE_P (m2)
11158
+ && !COMPLEX_MODE_P (m2)
11160
- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
11161
- && !(m == DFmode && TARGET_UPPER_REGS_DF)
11162
- && !(m == SFmode && TARGET_UPPER_REGS_SF))
11163
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
11164
+ && !reg_addr[m2].scalar_in_vmx_p)
11166
addr_mask |= RELOAD_REG_PRE_INCDEC;
11168
@@ -2595,16 +2603,22 @@
11169
f - Register class to use with traditional SFmode instructions.
11170
v - Altivec register.
11171
wa - Any VSX register.
11172
+ wc - Reserved to represent individual CR bits (used in LLVM).
11173
wd - Preferred register class for V2DFmode.
11174
wf - Preferred register class for V4SFmode.
11175
wg - Float register for power6x move insns.
11176
+ wh - FP register for direct move instructions.
11177
+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
11178
+ wj - FP or VSX register to hold 64-bit integers for direct moves.
11179
+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
11180
wl - Float register if we can do 32-bit signed int loads.
11181
wm - VSX register for ISA 2.07 direct move operations.
11182
+ wn - always NO_REGS.
11183
wr - GPR if 64-bit mode is permitted.
11184
ws - Register class to do ISA 2.06 DF operations.
11185
+ wt - VSX register for TImode in VSX registers.
11186
wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
11187
wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
11188
- wt - VSX register for TImode in VSX registers.
11189
ww - Register class to do SF conversions in with VSX operations.
11190
wx - Float register if we can do 32-bit int stores.
11191
wy - Register class to do ISA 2.07 SF operations.
11192
@@ -2611,21 +2625,22 @@
11193
wz - Float register if we can do 32-bit unsigned int loads. */
11195
if (TARGET_HARD_FLOAT && TARGET_FPRS)
11196
- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
11197
+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
11199
if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
11200
- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
11201
+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
11205
rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
11206
- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
11207
- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
11208
+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
11209
+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
11210
+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
11212
if (TARGET_VSX_TIMODE)
11213
- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
11214
+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
11216
- if (TARGET_UPPER_REGS_DF)
11217
+ if (TARGET_UPPER_REGS_DF) /* DFmode */
11219
rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
11220
rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
11221
@@ -2639,19 +2654,26 @@
11222
if (TARGET_ALTIVEC)
11223
rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
11225
- if (TARGET_MFPGPR)
11226
+ if (TARGET_MFPGPR) /* DFmode */
11227
rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
11230
- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
11231
+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
11233
if (TARGET_DIRECT_MOVE)
11234
- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
11236
+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
11237
+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
11238
+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
11239
+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
11240
+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
11241
+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
11244
if (TARGET_POWERPC64)
11245
rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
11247
- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
11248
+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
11250
rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
11251
rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
11252
@@ -2666,10 +2688,10 @@
11253
rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
11256
- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
11257
+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
11260
- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
11261
+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
11263
/* Set up the reload helper and direct move functions. */
11264
if (TARGET_VSX || TARGET_ALTIVEC)
11265
@@ -2692,10 +2714,11 @@
11266
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
11267
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
11269
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
11270
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
11271
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
11272
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
11273
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
11274
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
11275
+ reg_addr[DFmode].scalar_in_vmx_p = true;
11276
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
11277
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
11279
if (TARGET_P8_VECTOR)
11281
@@ -2703,6 +2726,8 @@
11282
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
11283
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
11284
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
11285
+ if (TARGET_UPPER_REGS_SF)
11286
+ reg_addr[SFmode].scalar_in_vmx_p = true;
11288
if (TARGET_VSX_TIMODE)
11290
@@ -2759,10 +2784,11 @@
11291
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
11292
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
11294
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
11295
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
11296
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
11297
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
11298
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
11299
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
11300
+ reg_addr[DFmode].scalar_in_vmx_p = true;
11301
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
11302
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
11304
if (TARGET_P8_VECTOR)
11306
@@ -2770,6 +2796,8 @@
11307
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
11308
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
11309
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
11310
+ if (TARGET_UPPER_REGS_SF)
11311
+ reg_addr[SFmode].scalar_in_vmx_p = true;
11313
if (TARGET_VSX_TIMODE)
11315
@@ -2810,6 +2838,7 @@
11317
for (m = 0; m < NUM_MACHINE_MODES; ++m)
11319
+ enum machine_mode m2 = (enum machine_mode)m;
11320
int reg_size2 = reg_size;
11322
/* TFmode/TDmode always takes 2 registers, even in VSX. */
11323
@@ -2818,7 +2847,7 @@
11324
reg_size2 = UNITS_PER_FP_WORD;
11326
rs6000_class_max_nregs[m][c]
11327
- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
11328
+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
11332
@@ -3014,7 +3043,8 @@
11333
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
11334
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
11335
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
11336
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
11337
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
11338
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
11341
/* Override command line options. Mostly we process the processor type and
11342
@@ -5861,6 +5891,34 @@
11346
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
11349
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
11351
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
11353
+ if (computed != 128)
11355
+ static bool warned;
11356
+ if (!warned && warn_psabi)
11359
+ inform (input_location,
11360
+ "the layout of aggregates containing vectors with"
11361
+ " %d-byte alignment will change in a future GCC release",
11362
+ computed / BITS_PER_UNIT);
11365
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
11366
+ keep the special treatment of vector types, but warn if there will
11367
+ be differences in future GCC releases. */
11374
/* AIX increases natural record alignment to doubleword if the first
11375
field is an FP double while the FP fields remain word aligned. */
11377
@@ -6109,7 +6167,8 @@
11380
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
11381
- gcc_assert (extra >= 0);
11385
if (GET_CODE (addr) == LO_SUM)
11386
/* For lo_sum addresses, we must allow any offset except one that
11387
@@ -9198,14 +9257,51 @@
11388
|| (type && TREE_CODE (type) == VECTOR_TYPE
11389
&& int_size_in_bytes (type) >= 16))
11391
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
11392
- || DEFAULT_ABI == ABI_ELFv2
11393
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
11394
- && mode == BLKmode
11395
- && type && TYPE_ALIGN (type) > 64)
11397
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
11398
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
11399
+ -mcompat-align-parm is used. */
11400
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
11401
+ || DEFAULT_ABI == ABI_ELFv2)
11402
+ && type && TYPE_ALIGN (type) > 64)
11404
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
11405
+ or homogeneous float/vector aggregates here. We already handled
11406
+ vector aggregates above, but still need to check for float here. */
11407
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
11408
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
11410
+ /* We used to check for BLKmode instead of the above aggregate type
11411
+ check. Warn when this results in any difference to the ABI. */
11412
+ if (aggregate_p != (mode == BLKmode))
11414
+ static bool warned;
11415
+ if (!warned && warn_psabi)
11418
+ inform (input_location,
11419
+ "the ABI of passing aggregates with %d-byte alignment"
11420
+ " will change in a future GCC release",
11421
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
11425
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
11426
+ keep using the BLKmode check, but warn if there will be differences
11427
+ in future GCC releases. */
11428
+ if (mode == BLKmode)
11432
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
11433
+ implement the "aggregate type" check as a BLKmode check here; this
11434
+ means certain aggregate types are in fact not aligned. */
11435
+ if (TARGET_MACHO && rs6000_darwin64_abi
11436
+ && mode == BLKmode
11437
+ && type && TYPE_ALIGN (type) > 64)
11440
- return PARM_BOUNDARY;
11442
+ return PARM_BOUNDARY;
11445
/* The offset in words to the start of the parameter save area. */
11446
@@ -10243,6 +10339,7 @@
11449
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
11452
/* Do we also need to pass this argument in the parameter
11454
@@ -10271,6 +10368,37 @@
11455
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
11458
+ /* If there were not enough FPRs to hold the argument, the rest
11459
+ usually goes into memory. However, if the current position
11460
+ is still within the register parameter area, a portion may
11461
+ actually have to go into GPRs.
11463
+ Note that it may happen that the portion of the argument
11464
+ passed in the first "half" of the first GPR was already
11465
+ passed in the last FPR as well.
11467
+ For unnamed arguments, we already set up GPRs to cover the
11468
+ whole argument in rs6000_psave_function_arg, so there is
11469
+ nothing further to do at this point.
11471
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
11472
+ GCC releases. To avoid any ABI change on the release branch,
11473
+ we retain that original implementation here, but warn if we
11474
+ encounter a case where the ABI will change in the future. */
11475
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
11476
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
11477
+ && cum->nargs_prototype > 0)
11479
+ static bool warned;
11480
+ if (!warned && warn_psabi)
11483
+ inform (input_location,
11484
+ "the ABI of passing homogeneous float aggregates"
11485
+ " will change in a future GCC release");
11489
return rs6000_finish_function_arg (mode, rvec, k);
11491
else if (align_words < GP_ARG_NUM_REG)
11492
@@ -10497,10 +10625,9 @@
11493
list, or passes any parameter in memory. */
11496
-rs6000_function_parms_need_stack (tree fun)
11497
+rs6000_function_parms_need_stack (tree fun, bool incoming)
11499
- function_args_iterator args_iter;
11501
+ tree fntype, result;
11502
CUMULATIVE_ARGS args_so_far_v;
11503
cumulative_args_t args_so_far;
11505
@@ -10507,26 +10634,57 @@
11507
/* Must be a libcall, all of which only use reg parms. */
11512
- fun = TREE_TYPE (fun);
11513
+ fntype = TREE_TYPE (fun);
11515
/* Varargs functions need the parameter save area. */
11516
- if (!prototype_p (fun) || stdarg_p (fun))
11517
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
11520
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
11521
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
11522
args_so_far = pack_cumulative_args (&args_so_far_v);
11524
- if (aggregate_value_p (TREE_TYPE (fun), fun))
11525
+ /* When incoming, we will have been passed the function decl.
11526
+ It is necessary to use the decl to handle K&R style functions,
11527
+ where TYPE_ARG_TYPES may not be available. */
11530
- tree type = build_pointer_type (TREE_TYPE (fun));
11531
- rs6000_parm_needs_stack (args_so_far, type);
11532
+ gcc_assert (DECL_P (fun));
11533
+ result = DECL_RESULT (fun);
11536
+ result = TREE_TYPE (fntype);
11538
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
11539
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
11541
+ if (result && aggregate_value_p (result, fntype))
11543
+ if (!TYPE_P (result))
11544
+ result = TREE_TYPE (result);
11545
+ result = build_pointer_type (result);
11546
+ rs6000_parm_needs_stack (args_so_far, result);
11553
+ for (parm = DECL_ARGUMENTS (fun);
11554
+ parm && parm != void_list_node;
11555
+ parm = TREE_CHAIN (parm))
11556
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
11561
+ function_args_iterator args_iter;
11564
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
11565
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
11572
@@ -10537,7 +10695,7 @@
11573
all parameters in registers. */
11576
-rs6000_reg_parm_stack_space (tree fun)
11577
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
11579
int reg_parm_stack_space;
11581
@@ -10555,7 +10713,7 @@
11583
/* ??? Recomputing this every time is a bit expensive. Is there
11584
a place to cache this information? */
11585
- if (rs6000_function_parms_need_stack (fun))
11586
+ if (rs6000_function_parms_need_stack (fun, incoming))
11587
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
11589
reg_parm_stack_space = 0;
11590
@@ -13544,11 +13702,15 @@
11591
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
11592
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
11593
error ("Builtin function %s requires the -mhard-dfp and"
11594
- "-mpower8-vector options", name);
11595
+ " -mpower8-vector options", name);
11596
else if ((fnmask & RS6000_BTM_DFP) != 0)
11597
error ("Builtin function %s requires the -mhard-dfp option", name);
11598
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
11599
error ("Builtin function %s requires the -mpower8-vector option", name);
11600
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
11601
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
11602
+ error ("Builtin function %s requires the -mhard-float and"
11603
+ " -mlong-double-128 options", name);
11604
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
11605
error ("Builtin function %s requires the -mhard-float option", name);
11607
@@ -13649,8 +13811,8 @@
11608
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
11609
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
11611
- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
11612
- : (int) CODE_FOR_altivec_lvsl);
11613
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
11614
+ : (int) CODE_FOR_altivec_lvsl_direct);
11615
enum machine_mode tmode = insn_data[icode].operand[0].mode;
11616
enum machine_mode mode = insn_data[icode].operand[1].mode;
11618
@@ -13678,7 +13840,6 @@
11619
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
11620
target = gen_reg_rtx (tmode);
11622
- /*pat = gen_altivec_lvsr (target, op);*/
11623
pat = GEN_FCN (icode) (target, op);
11626
@@ -17099,7 +17260,14 @@
11627
prefer Altivec loads.. */
11628
if (rclass == VSX_REGS)
11630
- if (GET_MODE_SIZE (mode) <= 8)
11631
+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
11633
+ rtx addr = XEXP (x, 0);
11634
+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
11635
+ || legitimate_lo_sum_address_p (mode, addr, false))
11636
+ return FLOAT_REGS;
11638
+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
11641
if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
11642
@@ -31413,6 +31581,7 @@
11643
{ "htm", RS6000_BTM_HTM, false, false },
11644
{ "hard-dfp", RS6000_BTM_DFP, false, false },
11645
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
11646
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
11649
/* Option variables that we want to support inside attribute((target)) and
11650
@@ -32663,25 +32832,14 @@
11652
/* Return true if the peephole2 can combine a load involving a combination of
11653
an addis instruction and a load with an offset that can be fused together on
11657
- The operands are:
11658
- operands[0] register set with addis
11659
- operands[1] value set via addis
11660
- operands[2] target register being loaded
11661
- operands[3] D-form memory reference using operands[0].
11663
- In addition, we are passed a boolean that is true if this is a peephole2,
11664
- and we can use see if the addis_reg is dead after the insn and can be
11665
- replaced by the target register. */
11668
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
11669
+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
11670
+ rtx addis_value, /* addis value. */
11671
+ rtx target, /* target register that is loaded. */
11672
+ rtx mem) /* bottom part of the memory addr. */
11674
- rtx addis_reg = operands[0];
11675
- rtx addis_value = operands[1];
11676
- rtx target = operands[2];
11677
- rtx mem = operands[3];
11681
@@ -32695,9 +32853,6 @@
11682
if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
11685
- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
11688
/* Allow sign/zero extension. */
11689
if (GET_CODE (mem) == ZERO_EXTEND
11690
|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
11691
@@ -32706,22 +32861,22 @@
11695
+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
11698
addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
11699
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11702
/* Validate that the register used to load the high value is either the
11703
- register being loaded, or we can safely replace its use in a peephole2.
11704
+ register being loaded, or we can safely replace its use.
11706
- If this is a peephole2, we assume that there are 2 instructions in the
11707
- peephole (addis and load), so we want to check if the target register was
11708
- not used in the memory address and the register to hold the addis result
11709
- is dead after the peephole. */
11710
+ This function is only called from the peephole2 pass and we assume that
11711
+ there are 2 instructions in the peephole (addis and load), so we want to
11712
+ check if the target register was not used in the memory address and the
11713
+ register to hold the addis result is dead after the peephole. */
11714
if (REGNO (addis_reg) != REGNO (target))
11719
if (reg_mentioned_p (target, mem))
11722
@@ -32762,9 +32917,6 @@
11723
enum machine_mode extend_mode = target_mode;
11724
enum machine_mode ptr_mode = Pmode;
11725
enum rtx_code extend = UNKNOWN;
11726
- rtx addis_reg = ((ptr_mode == target_mode)
11728
- : simplify_subreg (ptr_mode, target, target_mode, 0));
11730
if (GET_CODE (orig_mem) == ZERO_EXTEND
11731
|| (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
11732
@@ -32781,13 +32933,14 @@
11733
gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
11735
offset = XEXP (orig_addr, 1);
11736
- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
11737
- new_mem = change_address (orig_mem, target_mode, new_addr);
11738
+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
11739
+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
11741
if (extend != UNKNOWN)
11742
new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
11744
- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
11745
+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
11746
+ UNSPEC_FUSION_GPR);
11747
emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
11749
if (extend == SIGN_EXTEND)
11750
@@ -32806,55 +32959,40 @@
11753
/* Return a string to fuse an addis instruction with a gpr load to the same
11754
- register that we loaded up the addis instruction. The code is complicated,
11755
- so we call output_asm_insn directly, and just return "".
11756
+ register that we loaded up the addis instruction. The address that is used
11757
+ is the logical address that was formed during peephole2:
11758
+ (lo_sum (high) (low-part))
11760
- The operands are:
11761
- operands[0] register set with addis (must be same reg as target).
11762
- operands[1] value set via addis
11763
- operands[2] target register being loaded
11764
- operands[3] D-form memory reference using operands[0]. */
11765
+ The code is complicated, so we call output_asm_insn directly, and just
11769
-emit_fusion_gpr_load (rtx *operands)
11770
+emit_fusion_gpr_load (rtx target, rtx mem)
11772
- rtx addis_reg = operands[0];
11773
- rtx addis_value = operands[1];
11774
- rtx target = operands[2];
11775
- rtx mem = operands[3];
11780
const char *addis_str = NULL;
11781
const char *load_str = NULL;
11782
- const char *extend_insn = NULL;
11783
const char *mode_name = NULL;
11784
char insn_template[80];
11785
enum machine_mode mode;
11786
const char *comment_str = ASM_COMMENT_START;
11787
- bool sign_p = false;
11789
- gcc_assert (REG_P (addis_reg) && REG_P (target));
11790
- gcc_assert (REGNO (addis_reg) == REGNO (target));
11791
+ if (GET_CODE (mem) == ZERO_EXTEND)
11792
+ mem = XEXP (mem, 0);
11794
+ gcc_assert (REG_P (target) && MEM_P (mem));
11796
if (*comment_str == ' ')
11799
- /* Allow sign/zero extension. */
11800
- if (GET_CODE (mem) == ZERO_EXTEND)
11801
- mem = XEXP (mem, 0);
11803
- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
11806
- mem = XEXP (mem, 0);
11809
- gcc_assert (MEM_P (mem));
11810
addr = XEXP (mem, 0);
11811
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11812
gcc_unreachable ();
11814
+ addis_value = XEXP (addr, 0);
11815
load_offset = XEXP (addr, 1);
11817
/* Now emit the load instruction to the same register. */
11818
@@ -32864,29 +33002,22 @@
11820
mode_name = "char";
11822
- extend_insn = "extsb %0,%0";
11826
mode_name = "short";
11828
- extend_insn = "extsh %0,%0";
11834
- extend_insn = "extsw %0,%0";
11838
- if (TARGET_POWERPC64)
11840
- mode_name = "long";
11844
- gcc_unreachable ();
11845
+ gcc_assert (TARGET_POWERPC64);
11846
+ mode_name = "long";
11851
@@ -33030,14 +33161,6 @@
11853
fatal_insn ("Unable to generate load offset for fusion", load_offset);
11855
- /* Handle sign extension. The peephole2 pass generates this as a separate
11856
- insn, but we handle it just in case it got reattached. */
11859
- gcc_assert (extend_insn != NULL);
11860
- output_asm_insn (extend_insn, fuse_ops);
11866
Index: gcc/config/rs6000/vsx.md
11867
===================================================================
11868
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
11869
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
11871
;; Iterator for the 2 64-bit vector types
11872
(define_mode_iterator VSX_D [V2DF V2DI])
11874
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
11875
+;; lxvd2x to properly handle swapping words on little endian
11876
+(define_mode_iterator VSX_LE [V2DF
11879
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
11881
;; Iterator for the 2 32-bit vector types
11882
(define_mode_iterator VSX_W [V4SF V4SI])
11884
@@ -79,19 +86,26 @@
11895
-;; Map the register class used for float<->int conversions
11896
+;; Map the register class used for float<->int conversions (floating point side)
11897
+;; VSr2 is the preferred register class, VSr3 is any register class that will
11899
(define_mode_attr VSr2 [(V2DF "wd")
11906
(define_mode_attr VSr3 [(V2DF "wa")
11913
;; Map the register class for sp<->dp float conversions, destination
11914
(define_mode_attr VSr4 [(SF "ws")
11915
@@ -99,12 +113,27 @@
11919
-;; Map the register class for sp<->dp float conversions, destination
11920
+;; Map the register class for sp<->dp float conversions, source
11921
(define_mode_attr VSr5 [(SF "ws")
11926
+;; The VSX register class that a type can occupy, even if it is not the
11927
+;; preferred register class (VSr is the preferred register class that will get
11928
+;; allocated first).
11929
+(define_mode_attr VSa [(V16QI "wa")
11941
;; Same size integer type for floating point data
11942
(define_mode_attr VSi [(V4SF "v4si")
11944
@@ -200,6 +229,16 @@
11948
+;; Map register class for 64-bit element in 128-bit vector for direct moves
11950
+(define_mode_attr VS_64dm [(V2DF "wk")
11953
+;; Map register class for 64-bit element in 128-bit vector for normal register
11954
+;; to register moves
11955
+(define_mode_attr VS_64reg [(V2DF "ws")
11958
;; Constants for creating unspecs
11959
(define_c_enum "unspec"
11961
@@ -228,8 +267,8 @@
11962
;; The patterns for LE permuted loads and stores come before the general
11963
;; VSX moves so they match first.
11964
(define_insn_and_split "*vsx_le_perm_load_<mode>"
11965
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
11966
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
11967
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
11968
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
11969
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11971
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11972
@@ -251,7 +290,7 @@
11973
(set_attr "length" "8")])
11975
(define_insn_and_split "*vsx_le_perm_load_<mode>"
11976
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
11977
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
11978
(match_operand:VSX_W 1 "memory_operand" "Z"))]
11979
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11981
@@ -342,8 +381,8 @@
11982
(set_attr "length" "8")])
11984
(define_insn "*vsx_le_perm_store_<mode>"
11985
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
11986
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
11987
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
11988
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
11989
"!BYTES_BIG_ENDIAN && TARGET_VSX"
11991
[(set_attr "type" "vecstore")
11992
@@ -350,8 +389,8 @@
11993
(set_attr "length" "12")])
11996
- [(set (match_operand:VSX_D 0 "memory_operand" "")
11997
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
11998
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
11999
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
12000
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
12001
[(set (match_dup 2)
12003
@@ -369,8 +408,8 @@
12004
;; The post-reload split requires that we re-permute the source
12005
;; register in case it is still live.
12007
- [(set (match_operand:VSX_D 0 "memory_operand" "")
12008
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
12009
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
12010
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
12011
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
12012
[(set (match_dup 1)
12014
@@ -388,7 +427,7 @@
12016
(define_insn "*vsx_le_perm_store_<mode>"
12017
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
12018
- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
12019
+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
12020
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12022
[(set_attr "type" "vecstore")
12023
@@ -578,8 +617,8 @@
12026
(define_insn "*vsx_mov<mode>"
12027
- [(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")
12028
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
12029
+ [(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")
12030
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
12031
"VECTOR_MEM_VSX_P (<MODE>mode)
12032
&& (register_operand (operands[0], <MODE>mode)
12033
|| register_operand (operands[1], <MODE>mode))"
12034
@@ -681,9 +720,9 @@
12035
;; instructions are now combined with the insn for the traditional floating
12037
(define_insn "*vsx_add<mode>3"
12038
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12039
- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12040
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12041
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12042
+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12043
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12044
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12045
"xvadd<VSs> %x0,%x1,%x2"
12046
[(set_attr "type" "<VStype_simple>")
12047
@@ -690,9 +729,9 @@
12048
(set_attr "fp_type" "<VSfptype_simple>")])
12050
(define_insn "*vsx_sub<mode>3"
12051
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12052
- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12053
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12054
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12055
+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12056
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12057
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12058
"xvsub<VSs> %x0,%x1,%x2"
12059
[(set_attr "type" "<VStype_simple>")
12060
@@ -699,9 +738,9 @@
12061
(set_attr "fp_type" "<VSfptype_simple>")])
12063
(define_insn "*vsx_mul<mode>3"
12064
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12065
- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12066
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12067
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12068
+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12069
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12070
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12071
"xvmul<VSs> %x0,%x1,%x2"
12072
[(set_attr "type" "<VStype_simple>")
12073
@@ -708,9 +747,9 @@
12074
(set_attr "fp_type" "<VSfptype_mul>")])
12076
(define_insn "*vsx_div<mode>3"
12077
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12078
- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12079
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12080
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12081
+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12082
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12083
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12084
"xvdiv<VSs> %x0,%x1,%x2"
12085
[(set_attr "type" "<VStype_div>")
12086
@@ -746,8 +785,8 @@
12088
(define_insn "*vsx_tdiv<mode>3_internal"
12089
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
12090
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
12091
- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
12092
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
12093
+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
12095
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12096
"x<VSv>tdiv<VSs> %0,%x1,%x2"
12097
@@ -755,8 +794,8 @@
12098
(set_attr "fp_type" "<VSfptype_simple>")])
12100
(define_insn "vsx_fre<mode>2"
12101
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12102
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
12103
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12104
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
12106
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12107
"xvre<VSs> %x0,%x1"
12108
@@ -764,8 +803,8 @@
12109
(set_attr "fp_type" "<VSfptype_simple>")])
12111
(define_insn "*vsx_neg<mode>2"
12112
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12113
- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
12114
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12115
+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
12116
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12117
"xvneg<VSs> %x0,%x1"
12118
[(set_attr "type" "<VStype_simple>")
12119
@@ -772,8 +811,8 @@
12120
(set_attr "fp_type" "<VSfptype_simple>")])
12122
(define_insn "*vsx_abs<mode>2"
12123
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12124
- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
12125
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12126
+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
12127
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12128
"xvabs<VSs> %x0,%x1"
12129
[(set_attr "type" "<VStype_simple>")
12130
@@ -780,10 +819,10 @@
12131
(set_attr "fp_type" "<VSfptype_simple>")])
12133
(define_insn "vsx_nabs<mode>2"
12134
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12135
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12138
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
12139
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
12140
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12141
"xvnabs<VSs> %x0,%x1"
12142
[(set_attr "type" "<VStype_simple>")
12143
@@ -790,9 +829,9 @@
12144
(set_attr "fp_type" "<VSfptype_simple>")])
12146
(define_insn "vsx_smax<mode>3"
12147
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12148
- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12149
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12150
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12151
+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12152
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12153
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12154
"xvmax<VSs> %x0,%x1,%x2"
12155
[(set_attr "type" "<VStype_simple>")
12156
@@ -799,9 +838,9 @@
12157
(set_attr "fp_type" "<VSfptype_simple>")])
12159
(define_insn "*vsx_smin<mode>3"
12160
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12161
- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12162
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12163
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12164
+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12165
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12166
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12167
"xvmin<VSs> %x0,%x1,%x2"
12168
[(set_attr "type" "<VStype_simple>")
12169
@@ -808,8 +847,8 @@
12170
(set_attr "fp_type" "<VSfptype_simple>")])
12172
(define_insn "*vsx_sqrt<mode>2"
12173
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12174
- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
12175
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12176
+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
12177
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12178
"xvsqrt<VSs> %x0,%x1"
12179
[(set_attr "type" "<VStype_sqrt>")
12180
@@ -816,8 +855,8 @@
12181
(set_attr "fp_type" "<VSfptype_sqrt>")])
12183
(define_insn "*vsx_rsqrte<mode>2"
12184
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12185
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
12186
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12187
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
12189
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12190
"xvrsqrte<VSs> %x0,%x1"
12191
@@ -852,7 +891,7 @@
12193
(define_insn "*vsx_tsqrt<mode>2_internal"
12194
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
12195
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
12196
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
12197
UNSPEC_VSX_TSQRT))]
12198
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12199
"x<VSv>tsqrt<VSs> %0,%x1"
12200
@@ -865,11 +904,11 @@
12203
(define_insn "*vsx_fmav4sf4"
12204
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
12205
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
12207
- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
12208
- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
12209
- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
12210
+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
12211
+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
12212
+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
12213
"VECTOR_UNIT_VSX_P (V4SFmode)"
12215
xvmaddasp %x0,%x1,%x2
12216
@@ -880,11 +919,11 @@
12217
[(set_attr "type" "vecfloat")])
12219
(define_insn "*vsx_fmav2df4"
12220
- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
12221
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
12223
- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
12224
- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
12225
- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
12226
+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
12227
+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
12228
+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
12229
"VECTOR_UNIT_VSX_P (V2DFmode)"
12231
xvmaddadp %x0,%x1,%x2
12232
@@ -894,12 +933,12 @@
12233
[(set_attr "type" "vecdouble")])
12235
(define_insn "*vsx_fms<mode>4"
12236
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
12237
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
12239
- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
12240
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
12241
+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
12242
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
12244
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
12245
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
12246
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12248
xvmsuba<VSs> %x0,%x1,%x2
12249
@@ -909,12 +948,12 @@
12250
[(set_attr "type" "<VStype_mul>")])
12252
(define_insn "*vsx_nfma<mode>4"
12253
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
12254
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
12257
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
12258
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
12259
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
12260
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
12261
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
12262
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
12263
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12265
xvnmadda<VSs> %x0,%x1,%x2
12266
@@ -959,9 +998,9 @@
12268
;; Vector conditional expressions (no scalar version for these instructions)
12269
(define_insn "vsx_eq<mode>"
12270
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12271
- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12272
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12273
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12274
+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12275
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12276
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12277
"xvcmpeq<VSs> %x0,%x1,%x2"
12278
[(set_attr "type" "<VStype_simple>")
12279
@@ -968,9 +1007,9 @@
12280
(set_attr "fp_type" "<VSfptype_simple>")])
12282
(define_insn "vsx_gt<mode>"
12283
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12284
- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12285
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12286
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12287
+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12288
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12289
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12290
"xvcmpgt<VSs> %x0,%x1,%x2"
12291
[(set_attr "type" "<VStype_simple>")
12292
@@ -977,9 +1016,9 @@
12293
(set_attr "fp_type" "<VSfptype_simple>")])
12295
(define_insn "*vsx_ge<mode>"
12296
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12297
- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12298
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12299
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12300
+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12301
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12302
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12303
"xvcmpge<VSs> %x0,%x1,%x2"
12304
[(set_attr "type" "<VStype_simple>")
12305
@@ -990,10 +1029,10 @@
12306
(define_insn "*vsx_eq_<mode>_p"
12309
- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
12310
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
12311
+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
12312
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
12314
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12315
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12316
(eq:VSX_F (match_dup 1)
12318
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12319
@@ -1003,10 +1042,10 @@
12320
(define_insn "*vsx_gt_<mode>_p"
12323
- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
12324
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
12325
+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
12326
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
12328
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12329
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12330
(gt:VSX_F (match_dup 1)
12332
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12333
@@ -1016,10 +1055,10 @@
12334
(define_insn "*vsx_ge_<mode>_p"
12337
- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
12338
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
12339
+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
12340
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
12342
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12343
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12344
(ge:VSX_F (match_dup 1)
12346
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12347
@@ -1028,23 +1067,23 @@
12350
(define_insn "*vsx_xxsel<mode>"
12351
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
12352
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12353
(if_then_else:VSX_L
12354
- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
12355
+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
12356
(match_operand:VSX_L 4 "zero_constant" ""))
12357
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
12358
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
12359
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
12360
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
12361
"VECTOR_MEM_VSX_P (<MODE>mode)"
12362
"xxsel %x0,%x3,%x2,%x1"
12363
[(set_attr "type" "vecperm")])
12365
(define_insn "*vsx_xxsel<mode>_uns"
12366
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
12367
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12368
(if_then_else:VSX_L
12369
- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
12370
+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
12371
(match_operand:VSX_L 4 "zero_constant" ""))
12372
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
12373
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
12374
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
12375
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
12376
"VECTOR_MEM_VSX_P (<MODE>mode)"
12377
"xxsel %x0,%x3,%x2,%x1"
12378
[(set_attr "type" "vecperm")])
12379
@@ -1051,10 +1090,10 @@
12382
(define_insn "vsx_copysign<mode>3"
12383
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12384
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12386
- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12387
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
12388
+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12389
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
12391
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12392
"xvcpsgn<VSs> %x0,%x2,%x1"
12393
@@ -1067,7 +1106,7 @@
12394
;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
12395
;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
12396
(define_insn "vsx_float<VSi><mode>2"
12397
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
12398
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
12399
(float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
12400
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12401
"x<VSv>cvsx<VSc><VSs> %x0,%x1"
12402
@@ -1075,7 +1114,7 @@
12403
(set_attr "fp_type" "<VSfptype_simple>")])
12405
(define_insn "vsx_floatuns<VSi><mode>2"
12406
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
12407
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
12408
(unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
12409
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12410
"x<VSv>cvux<VSc><VSs> %x0,%x1"
12411
@@ -1084,7 +1123,7 @@
12413
(define_insn "vsx_fix_trunc<mode><VSi>2"
12414
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
12415
- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
12416
+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
12417
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12418
"x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
12419
[(set_attr "type" "<VStype_simple>")
12420
@@ -1092,7 +1131,7 @@
12422
(define_insn "vsx_fixuns_trunc<mode><VSi>2"
12423
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
12424
- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
12425
+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
12426
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12427
"x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
12428
[(set_attr "type" "<VStype_simple>")
12429
@@ -1100,8 +1139,8 @@
12431
;; Math rounding functions
12432
(define_insn "vsx_x<VSv>r<VSs>i"
12433
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
12434
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
12435
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12436
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
12437
UNSPEC_VSX_ROUND_I))]
12438
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12439
"x<VSv>r<VSs>i %x0,%x1"
12440
@@ -1109,8 +1148,8 @@
12441
(set_attr "fp_type" "<VSfptype_simple>")])
12443
(define_insn "vsx_x<VSv>r<VSs>ic"
12444
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
12445
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
12446
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12447
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
12448
UNSPEC_VSX_ROUND_IC))]
12449
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12450
"x<VSv>r<VSs>ic %x0,%x1"
12451
@@ -1118,8 +1157,8 @@
12452
(set_attr "fp_type" "<VSfptype_simple>")])
12454
(define_insn "vsx_btrunc<mode>2"
12455
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12456
- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
12457
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12458
+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
12459
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12460
"xvr<VSs>iz %x0,%x1"
12461
[(set_attr "type" "<VStype_simple>")
12462
@@ -1126,8 +1165,8 @@
12463
(set_attr "fp_type" "<VSfptype_simple>")])
12465
(define_insn "*vsx_b2trunc<mode>2"
12466
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
12467
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
12468
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12469
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
12471
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12472
"x<VSv>r<VSs>iz %x0,%x1"
12473
@@ -1135,8 +1174,8 @@
12474
(set_attr "fp_type" "<VSfptype_simple>")])
12476
(define_insn "vsx_floor<mode>2"
12477
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12478
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
12479
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12480
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
12482
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12483
"xvr<VSs>im %x0,%x1"
12484
@@ -1144,8 +1183,8 @@
12485
(set_attr "fp_type" "<VSfptype_simple>")])
12487
(define_insn "vsx_ceil<mode>2"
12488
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12489
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
12490
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12491
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
12493
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12494
"xvr<VSs>ip %x0,%x1"
12495
@@ -1160,8 +1199,8 @@
12496
;; scalar single precision instructions internally use the double format.
12497
;; Prefer the altivec registers, since we likely will need to do a vperm
12498
(define_insn "vsx_<VS_spdp_insn>"
12499
- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
12500
- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
12501
+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
12502
+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
12503
UNSPEC_VSX_CVSPDP))]
12504
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12505
"<VS_spdp_insn> %x0,%x1"
12506
@@ -1169,8 +1208,8 @@
12508
;; xscvspdp, represent the scalar SF type as V4SF
12509
(define_insn "vsx_xscvspdp"
12510
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
12511
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
12512
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
12513
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
12514
UNSPEC_VSX_CVSPDP))]
12515
"VECTOR_UNIT_VSX_P (V4SFmode)"
12517
@@ -1197,7 +1236,7 @@
12519
;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
12520
(define_insn "vsx_xscvdpspn"
12521
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
12522
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
12523
(unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
12524
UNSPEC_VSX_CVDPSPN))]
12526
@@ -1205,8 +1244,8 @@
12527
[(set_attr "type" "fp")])
12529
(define_insn "vsx_xscvspdpn"
12530
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
12531
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
12532
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
12533
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
12534
UNSPEC_VSX_CVSPDPN))]
12536
"xscvspdpn %x0,%x1"
12537
@@ -1213,8 +1252,8 @@
12538
[(set_attr "type" "fp")])
12540
(define_insn "vsx_xscvdpspn_scalar"
12541
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
12542
- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
12543
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
12544
+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
12545
UNSPEC_VSX_CVDPSPN))]
12547
"xscvdpspn %x0,%x1"
12548
@@ -1302,10 +1341,10 @@
12549
;; since the xsrdpiz instruction does not truncate the value if the floating
12550
;; point value is < LONG_MIN or > LONG_MAX.
12551
(define_insn "*vsx_float_fix_<mode>2"
12552
- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
12553
+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12556
- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
12557
+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
12558
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
12559
&& VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
12560
&& !flag_trapping_math && TARGET_FRIZ"
12561
@@ -1318,10 +1357,10 @@
12563
;; Build a V2DF/V2DI vector from two scalars
12564
(define_insn "vsx_concat_<mode>"
12565
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
12566
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12568
- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
12569
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
12570
+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
12571
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
12572
"VECTOR_MEM_VSX_P (<MODE>mode)"
12574
if (BYTES_BIG_ENDIAN)
12575
@@ -1352,9 +1391,9 @@
12576
;; xxpermdi for little endian loads and stores. We need several of
12577
;; these since the form of the PARALLEL differs by mode.
12578
(define_insn "*vsx_xxpermdi2_le_<mode>"
12579
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
12580
- (vec_select:VSX_D
12581
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
12582
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
12583
+ (vec_select:VSX_LE
12584
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
12585
(parallel [(const_int 1) (const_int 0)])))]
12586
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12587
"xxpermdi %x0,%x1,%x1,2"
12588
@@ -1361,9 +1400,9 @@
12589
[(set_attr "type" "vecperm")])
12591
(define_insn "*vsx_xxpermdi4_le_<mode>"
12592
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
12593
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
12595
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
12596
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
12597
(parallel [(const_int 2) (const_int 3)
12598
(const_int 0) (const_int 1)])))]
12599
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12600
@@ -1401,9 +1440,9 @@
12601
;; lxvd2x for little endian loads. We need several of
12602
;; these since the form of the PARALLEL differs by mode.
12603
(define_insn "*vsx_lxvd2x2_le_<mode>"
12604
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
12605
- (vec_select:VSX_D
12606
- (match_operand:VSX_D 1 "memory_operand" "Z")
12607
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
12608
+ (vec_select:VSX_LE
12609
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
12610
(parallel [(const_int 1) (const_int 0)])))]
12611
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12613
@@ -1410,7 +1449,7 @@
12614
[(set_attr "type" "vecload")])
12616
(define_insn "*vsx_lxvd2x4_le_<mode>"
12617
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
12618
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
12620
(match_operand:VSX_W 1 "memory_operand" "Z")
12621
(parallel [(const_int 2) (const_int 3)
12622
@@ -1450,9 +1489,9 @@
12623
;; stxvd2x for little endian stores. We need several of
12624
;; these since the form of the PARALLEL differs by mode.
12625
(define_insn "*vsx_stxvd2x2_le_<mode>"
12626
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
12627
- (vec_select:VSX_D
12628
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
12629
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
12630
+ (vec_select:VSX_LE
12631
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
12632
(parallel [(const_int 1) (const_int 0)])))]
12633
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12635
@@ -1461,7 +1500,7 @@
12636
(define_insn "*vsx_stxvd2x4_le_<mode>"
12637
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
12639
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
12640
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
12641
(parallel [(const_int 2) (const_int 3)
12642
(const_int 0) (const_int 1)])))]
12643
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
12644
@@ -1513,11 +1552,12 @@
12646
;; Set the element of a V2DI/VD2F mode
12647
(define_insn "vsx_set_<mode>"
12648
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
12649
- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
12650
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
12651
- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
12652
- UNSPEC_VSX_SET))]
12653
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
12655
+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
12656
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
12657
+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
12658
+ UNSPEC_VSX_SET))]
12659
"VECTOR_MEM_VSX_P (<MODE>mode)"
12661
int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
12662
@@ -1582,7 +1622,7 @@
12663
(define_insn_and_split "vsx_extract_v4sf"
12664
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
12666
- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
12667
+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
12668
(parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
12669
(clobber (match_scratch:V4SF 3 "=X,0"))]
12670
"VECTOR_UNIT_VSX_P (V4SFmode)"
12671
@@ -1606,7 +1646,7 @@
12673
if (GET_CODE (op3) == SCRATCH)
12674
op3 = gen_reg_rtx (V4SFmode);
12675
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
12676
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
12679
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
12680
@@ -1765,9 +1805,9 @@
12683
(define_insn "vsx_splat_<mode>"
12684
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
12685
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
12686
(vec_duplicate:VSX_D
12687
- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
12688
+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
12689
"VECTOR_MEM_VSX_P (<MODE>mode)"
12691
xxpermdi %x0,%x1,%x1,0
12692
@@ -1780,10 +1820,10 @@
12695
(define_insn "vsx_xxspltw_<mode>"
12696
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12697
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12698
(vec_duplicate:VSX_W
12699
(vec_select:<VS_scalar>
12700
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12701
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12703
[(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
12704
"VECTOR_MEM_VSX_P (<MODE>mode)"
12705
@@ -1796,8 +1836,8 @@
12706
[(set_attr "type" "vecperm")])
12708
(define_insn "vsx_xxspltw_<mode>_direct"
12709
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12710
- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12711
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12712
+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12713
(match_operand:QI 2 "u5bit_cint_operand" "i,i")]
12714
UNSPEC_VSX_XXSPLTW))]
12715
"VECTOR_MEM_VSX_P (<MODE>mode)"
12716
@@ -1806,11 +1846,11 @@
12718
;; V4SF/V4SI interleave
12719
(define_insn "vsx_xxmrghw_<mode>"
12720
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12721
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12723
(vec_concat:<VS_double>
12724
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12725
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
12726
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12727
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
12728
(parallel [(const_int 0) (const_int 4)
12729
(const_int 1) (const_int 5)])))]
12730
"VECTOR_MEM_VSX_P (<MODE>mode)"
12731
@@ -1823,11 +1863,11 @@
12732
[(set_attr "type" "vecperm")])
12734
(define_insn "vsx_xxmrglw_<mode>"
12735
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
12736
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
12738
(vec_concat:<VS_double>
12739
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
12740
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
12741
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
12742
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
12743
(parallel [(const_int 2) (const_int 6)
12744
(const_int 3) (const_int 7)])))]
12745
"VECTOR_MEM_VSX_P (<MODE>mode)"
12746
@@ -1841,9 +1881,9 @@
12748
;; Shift left double by word immediate
12749
(define_insn "vsx_xxsldwi_<mode>"
12750
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
12751
- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
12752
- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
12753
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
12754
+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
12755
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
12756
(match_operand:QI 3 "u5bit_cint_operand" "i")]
12757
UNSPEC_VSX_SLDWI))]
12758
"VECTOR_MEM_VSX_P (<MODE>mode)"
12759
@@ -1924,7 +1964,7 @@
12760
;; to the top element of the V2DF array without doing an extract.
12762
(define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
12763
- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
12764
+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
12768
Index: gcc/config/rs6000/rs6000.h
12769
===================================================================
12770
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
12771
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
12772
@@ -1438,6 +1438,10 @@
12773
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
12774
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
12775
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
12776
+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
12777
+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
12778
+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
12779
+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
12780
RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
12781
RS6000_CONSTRAINT_wm, /* VSX register for direct move */
12782
RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
12783
@@ -1462,6 +1466,9 @@
12784
#define VSX_REG_CLASS_P(CLASS) \
12785
((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
12787
+/* Return whether a given register class targets general purpose registers. */
12788
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
12790
/* Given an rtx X being reloaded into a reg required to be
12791
in class CLASS, return the class of reg to actually use.
12792
In general this is just CLASS; but on some machines
12793
@@ -1593,8 +1600,15 @@
12794
/* Define this if stack space is still allocated for a parameter passed
12795
in a register. The value is the number of bytes allocated to this
12797
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
12798
+#define REG_PARM_STACK_SPACE(FNDECL) \
12799
+ rs6000_reg_parm_stack_space ((FNDECL), false)
12801
+/* Define this macro if space guaranteed when compiling a function body
12802
+ is different to space required when making a call, a situation that
12803
+ can arise with K&R style function definitions. */
12804
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
12805
+ rs6000_reg_parm_stack_space ((FNDECL), true)
12807
/* Define this if the above stack space is to be considered part of the
12808
space allocated by the caller. */
12809
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
12810
@@ -2483,8 +2497,8 @@
12811
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
12813
/* Builtin targets. For now, we reuse the masks for those options that are in
12814
- target flags, and pick two random bits for SPE and paired which aren't in
12816
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
12817
+ aren't in target_flags. */
12818
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
12819
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
12820
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
12821
@@ -2501,6 +2515,7 @@
12822
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
12823
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
12824
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
12825
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
12827
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
12829
@@ -2514,7 +2529,8 @@
12830
| RS6000_BTM_POPCNTD \
12831
| RS6000_BTM_CELL \
12833
- | RS6000_BTM_HARD_FLOAT)
12834
+ | RS6000_BTM_HARD_FLOAT \
12835
+ | RS6000_BTM_LDBL128)
12837
/* Define builtin enum index. */
12839
Index: gcc/config/rs6000/altivec.md
12840
===================================================================
12841
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release)
12842
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
12843
@@ -2297,7 +2297,31 @@
12845
[(set_attr "type" "vecsimple")])
12847
-(define_insn "altivec_lvsl"
12848
+(define_expand "altivec_lvsl"
12849
+ [(use (match_operand:V16QI 0 "register_operand" ""))
12850
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
12853
+ if (VECTOR_ELT_ORDER_BIG)
12854
+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
12858
+ rtx mask, perm[16], constv, vperm;
12859
+ mask = gen_reg_rtx (V16QImode);
12860
+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
12861
+ for (i = 0; i < 16; ++i)
12862
+ perm[i] = GEN_INT (i);
12863
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
12864
+ constv = force_reg (V16QImode, constv);
12865
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
12867
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
12872
+(define_insn "altivec_lvsl_direct"
12873
[(set (match_operand:V16QI 0 "register_operand" "=v")
12874
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
12876
@@ -2305,7 +2329,31 @@
12878
[(set_attr "type" "vecload")])
12880
-(define_insn "altivec_lvsr"
12881
+(define_expand "altivec_lvsr"
12882
+ [(use (match_operand:V16QI 0 "register_operand" ""))
12883
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
12886
+ if (VECTOR_ELT_ORDER_BIG)
12887
+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
12891
+ rtx mask, perm[16], constv, vperm;
12892
+ mask = gen_reg_rtx (V16QImode);
12893
+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
12894
+ for (i = 0; i < 16; ++i)
12895
+ perm[i] = GEN_INT (i);
12896
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
12897
+ constv = force_reg (V16QImode, constv);
12898
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
12900
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
12905
+(define_insn "altivec_lvsr_direct"
12906
[(set (match_operand:V16QI 0 "register_operand" "=v")
12907
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
12909
Index: gcc/config/rs6000/rs6000.md
12910
===================================================================
12911
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
12912
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
12913
@@ -134,6 +134,7 @@
12914
UNSPEC_UNPACK_128BIT
12917
+ UNSPEC_FUSION_GPR
12921
@@ -317,8 +318,25 @@
12922
(define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
12924
; Definitions for 32-bit fpr direct move
12925
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
12926
+; At present, the decimal modes are not allowed in the traditional altivec
12927
+; registers, so restrict the constraints to just the traditional FPRs.
12928
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
12930
+; Definitions for 32-bit VSX
12931
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
12933
+; Definitions for 32-bit use of altivec registers
12934
+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
12936
+; Definitions for 64-bit VSX
12937
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
12939
+; Definitions for 64-bit direct move
12940
+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
12942
+; Definitions for 64-bit use of altivec registers
12943
+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
12945
; These modes do not fit in integer registers in 32-bit mode.
12946
; but on e500v2, the gpr are 64 bit registers
12947
(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
12948
@@ -424,7 +442,7 @@
12951
;; Mode attribute for boolean operation register constraints for output
12952
-(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
12953
+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
12955
(V16QI "wa,v,&?r,?r,?r")
12956
(V8HI "wa,v,&?r,?r,?r")
12957
@@ -435,7 +453,7 @@
12958
(V1TI "wa,v,&?r,?r,?r")])
12960
;; Mode attribute for boolean operation register constraints for operand1
12961
-(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
12962
+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
12964
(V16QI "wa,v,r,0,r")
12965
(V8HI "wa,v,r,0,r")
12966
@@ -446,7 +464,7 @@
12967
(V1TI "wa,v,r,0,r")])
12969
;; Mode attribute for boolean operation register constraints for operand2
12970
-(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
12971
+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
12973
(V16QI "wa,v,r,r,0")
12974
(V8HI "wa,v,r,r,0")
12975
@@ -459,7 +477,7 @@
12976
;; Mode attribute for boolean operation register constraints for operand1
12977
;; for one_cmpl. To simplify things, we repeat the constraint where 0
12978
;; is used for operand1 or operand2
12979
-(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
12980
+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
12982
(V16QI "wa,v,r,0,0")
12983
(V8HI "wa,v,r,0,0")
12984
@@ -566,7 +584,7 @@
12987
(define_insn "*zero_extendsidi2_lfiwzx"
12988
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
12989
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
12990
(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
12991
"TARGET_POWERPC64 && TARGET_LFIWZX"
12993
@@ -736,8 +754,8 @@
12996
(define_insn "*extendsidi2_lfiwax"
12997
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
12998
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
12999
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
13000
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
13001
"TARGET_POWERPC64 && TARGET_LFIWAX"
13004
@@ -760,7 +778,7 @@
13006
(define_insn "*extendsidi2_nocell"
13007
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
13008
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
13009
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
13010
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
13013
@@ -5614,7 +5632,7 @@
13014
; We don't define lfiwax/lfiwzx with the normal definition, because we
13015
; don't want to support putting SImode in FPR registers.
13016
(define_insn "lfiwax"
13017
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
13018
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
13019
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
13021
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
13022
@@ -5694,7 +5712,7 @@
13023
(set_attr "type" "fpload")])
13025
(define_insn "lfiwzx"
13026
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
13027
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
13028
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
13030
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
13031
@@ -9210,8 +9228,8 @@
13034
(define_insn "mov<mode>_hardfloat"
13035
- [(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")
13036
- (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"))]
13037
+ [(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")
13038
+ (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"))]
13039
"(gpc_reg_operand (operands[0], <MODE>mode)
13040
|| gpc_reg_operand (operands[1], <MODE>mode))
13041
&& (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
13042
@@ -9422,8 +9440,8 @@
13045
(define_insn "*mov<mode>_hardfloat32"
13046
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
13047
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
13048
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
13049
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
13050
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
13051
&& (gpc_reg_operand (operands[0], <MODE>mode)
13052
|| gpc_reg_operand (operands[1], <MODE>mode))"
13053
@@ -9491,8 +9509,8 @@
13054
; ld/std require word-aligned displacements -> 'Y' constraint.
13055
; List Y->r and r->Y before r->r for reload.
13056
(define_insn "*mov<mode>_hardfloat64"
13057
- [(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")
13058
- (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"))]
13059
+ [(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>")
13060
+ (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"))]
13061
"TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
13062
&& (gpc_reg_operand (operands[0], <MODE>mode)
13063
|| gpc_reg_operand (operands[1], <MODE>mode))"
13064
@@ -10272,8 +10290,8 @@
13065
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
13067
(define_insn "*movdi_internal64"
13068
- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
13069
- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
13070
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
13071
+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
13073
&& (gpc_reg_operand (operands[0], DImode)
13074
|| gpc_reg_operand (operands[1], DImode))"
13075
@@ -10293,7 +10311,8 @@
13081
+ xxlxor %x0,%x0,%x0"
13082
[(set_attr_alternative "type"
13084
(match_test "update_indexed_address_mem (operands[0], VOIDmode)")
13085
@@ -10334,8 +10353,9 @@
13086
(const_string "mftgpr")
13087
(const_string "mffgpr")
13088
(const_string "mftgpr")
13089
- (const_string "mffgpr")])
13090
- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
13091
+ (const_string "mffgpr")
13092
+ (const_string "vecsimple")])
13093
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
13095
;; immediate value valid for a single instruction hiding in a const_double
13097
@@ -15751,23 +15771,10 @@
13098
;; a GPR. The addis instruction must be adjacent to the load, and use the same
13099
;; register that is being loaded. The fused ops must be physically adjacent.
13101
-;; We use define_peephole for the actual addis/load, and the register used to
13102
-;; hold the addis value must be the same as the register being loaded. We use
13103
-;; define_peephole2 to change the register used for addis to be the register
13104
-;; being loaded, since we can look at whether it is dead after the load insn.
13105
+;; Find cases where the addis that feeds into a load instruction is either used
13106
+;; once or is the same as the target register, and replace it with the fusion
13110
- [(set (match_operand:P 0 "base_reg_operand" "")
13111
- (match_operand:P 1 "fusion_gpr_addis" ""))
13112
- (set (match_operand:INT1 2 "base_reg_operand" "")
13113
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
13114
- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
13116
- return emit_fusion_gpr_load (operands);
13118
- [(set_attr "type" "load")
13119
- (set_attr "length" "8")])
13122
[(set (match_operand:P 0 "base_reg_operand" "")
13123
(match_operand:P 1 "fusion_gpr_addis" ""))
13124
@@ -15774,9 +15781,8 @@
13125
(set (match_operand:INT1 2 "base_reg_operand" "")
13126
(match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
13128
- && (REGNO (operands[0]) != REGNO (operands[2])
13129
- || GET_CODE (operands[3]) == SIGN_EXTEND)
13130
- && fusion_gpr_load_p (operands, true)"
13131
+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
13135
expand_fusion_gpr_load (operands);
13136
@@ -15783,6 +15789,20 @@
13140
+;; Fusion insn, created by the define_peephole2 above (and eventually by
13143
+(define_insn "fusion_gpr_load_<mode>"
13144
+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
13145
+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
13146
+ UNSPEC_FUSION_GPR))]
13147
+ "TARGET_P8_FUSION"
13149
+ return emit_fusion_gpr_load (operands[0], operands[1]);
13151
+ [(set_attr "type" "load")
13152
+ (set_attr "length" "8")])
13155
;; Miscellaneous ISA 2.06 (power7) instructions
13156
(define_insn "addg6s"
13157
@@ -15847,26 +15867,6 @@
13161
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
13162
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
13165
-(define_expand "unpacktf_0"
13166
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
13167
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
13169
- UNSPEC_UNPACK_128BIT))]
13173
-(define_expand "unpacktf_1"
13174
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
13175
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
13177
- UNSPEC_UNPACK_128BIT))]
13181
(define_insn_and_split "unpack<mode>_dm"
13182
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
13184
Index: gcc/config/rs6000/sysv4.h
13185
===================================================================
13186
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release)
13187
+++ b/src/gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch)
13188
@@ -292,7 +292,7 @@
13189
/* An expression for the alignment of a structure field FIELD if the
13190
alignment computed in the usual way is COMPUTED. */
13191
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
13192
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
13193
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
13196
#undef BIGGEST_FIELD_ALIGNMENT
13197
@@ -949,3 +949,27 @@
13198
#define TARGET_USES_SYSV4_OPT 1
13200
#undef DBX_REGISTER_NUMBER
13202
+/* Link -lasan early on the command line. For -static-libasan, don't link
13203
+ it for -shared link, the executable should be compiled with -static-libasan
13204
+ in that case, and for executable link link with --{,no-}whole-archive around
13205
+ it to force everything into the executable. And similarly for -ltsan. */
13206
+#if defined(HAVE_LD_STATIC_DYNAMIC)
13207
+#undef LIBASAN_EARLY_SPEC
13208
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
13209
+ "%{static-libasan:%{!shared:" \
13210
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
13211
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
13212
+#undef LIBTSAN_EARLY_SPEC
13213
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
13214
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
13215
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
13218
+/* Additional libraries needed by -static-libasan. */
13219
+#undef STATIC_LIBASAN_LIBS
13220
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
13222
+/* Additional libraries needed by -static-libtsan. */
13223
+#undef STATIC_LIBTSAN_LIBS
13224
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
13225
Index: gcc/config/arm/arm.c
13226
===================================================================
13227
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
13228
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
13230
static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
13231
static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
13232
inline static int thumb1_index_register_rtx_p (rtx, int);
13233
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
13234
static int thumb_far_jump_used_p (void);
13235
static bool thumb_force_lr_save (void);
13236
static unsigned arm_size_return_regs (void);
13237
@@ -24476,9 +24475,13 @@
13238
fputs (":\n", file);
13241
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
13242
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
13243
rtx tem = XEXP (DECL_RTL (function), 0);
13244
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
13245
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
13246
+ pipeline offset is four rather than eight. Adjust the offset
13248
+ tem = plus_constant (GET_MODE (tem), tem,
13249
+ TARGET_THUMB1_ONLY ? -3 : -7);
13250
tem = gen_rtx_MINUS (GET_MODE (tem),
13252
gen_rtx_SYMBOL_REF (Pmode,
13253
@@ -27462,4 +27465,13 @@
13257
+/* return TRUE if x is a reference to a value in a constant pool */
13259
+arm_is_constant_pool_ref (rtx x)
13261
+ return (MEM_P (x)
13262
+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
13263
+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
13266
#include "gt-arm.h"
13267
Index: gcc/config/arm/arm.h
13268
===================================================================
13269
--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_3_release)
13270
+++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
13271
@@ -2082,9 +2082,10 @@
13272
? reverse_condition_maybe_unordered (code) \
13273
: reverse_condition (code))
13275
-/* The arm5 clz instruction returns 32. */
13276
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
13277
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
13278
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
13279
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
13280
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
13281
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
13283
#define CC_STATUS_INIT \
13284
do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
13285
Index: gcc/config/arm/arm-protos.h
13286
===================================================================
13287
--- a/src/gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release)
13288
+++ b/src/gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch)
13290
extern int legitimate_pic_operand_p (rtx);
13291
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
13292
extern rtx legitimize_tls_address (rtx, rtx);
13293
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
13294
extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
13295
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
13296
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
13297
@@ -286,4 +287,6 @@
13299
extern void arm_emit_eabi_attribute (const char *, int, int);
13301
+extern bool arm_is_constant_pool_ref (rtx);
13303
#endif /* ! GCC_ARM_PROTOS_H */
13304
Index: gcc/config/arm/constraints.md
13305
===================================================================
13306
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
13307
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
13309
;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
13311
;; The following memory constraints have been used:
13312
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
13313
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
13314
;; in ARM state: Uq
13315
;; in Thumb state: Uu, Uw
13317
@@ -310,6 +310,12 @@
13318
An address valid for loading/storing register exclusive"
13319
(match_operand 0 "mem_noofs_operand"))
13321
+(define_memory_constraint "Uh"
13323
+ An address suitable for byte and half-word loads which does not point inside a constant pool"
13324
+ (and (match_code "mem")
13325
+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
13327
(define_memory_constraint "Ut"
13329
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
13330
@@ -356,7 +362,8 @@
13331
(and (match_code "mem")
13332
(match_test "TARGET_ARM
13333
&& arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
13334
- SIGN_EXTEND, 0)")))
13336
+ && !arm_is_constant_pool_ref (op)")))
13338
(define_memory_constraint "Q"
13340
Index: gcc/config/arm/arm.md
13341
===================================================================
13342
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
13343
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
13344
@@ -4047,7 +4047,7 @@
13345
(define_insn "unaligned_loadhis"
13346
[(set (match_operand:SI 0 "s_register_operand" "=l,r")
13348
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
13349
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
13350
UNSPEC_UNALIGNED_LOAD)))]
13351
"unaligned_access && TARGET_32BIT"
13352
"ldr%(sh%)\t%0, %1\t@ unaligned"
13353
@@ -4655,7 +4655,7 @@
13355
(define_insn "*arm_zero_extendhisi2_v6"
13356
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
13357
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
13358
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
13359
"TARGET_ARM && arm_arch6"
13362
@@ -4748,7 +4748,7 @@
13364
(define_insn "*arm_zero_extendqisi2_v6"
13365
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
13366
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
13367
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
13368
"TARGET_ARM && arm_arch6"
13371
@@ -4980,7 +4980,7 @@
13373
(define_insn "*arm_extendhisi2"
13374
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
13375
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
13376
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
13377
"TARGET_ARM && arm_arch4 && !arm_arch6"
13380
@@ -4987,23 +4987,19 @@
13381
ldr%(sh%)\\t%0, %1"
13382
[(set_attr "length" "8,4")
13383
(set_attr "type" "alu_shift,load_byte")
13384
- (set_attr "predicable" "yes")
13385
- (set_attr "pool_range" "*,256")
13386
- (set_attr "neg_pool_range" "*,244")]
13387
+ (set_attr "predicable" "yes")]
13390
;; ??? Check Thumb-2 pool range
13391
(define_insn "*arm_extendhisi2_v6"
13392
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
13393
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
13394
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
13395
"TARGET_32BIT && arm_arch6"
13398
ldr%(sh%)\\t%0, %1"
13399
[(set_attr "type" "simple_alu_shift,load_byte")
13400
- (set_attr "predicable" "yes")
13401
- (set_attr "pool_range" "*,256")
13402
- (set_attr "neg_pool_range" "*,244")]
13403
+ (set_attr "predicable" "yes")]
13406
(define_insn "*arm_extendhisi2addsi"
13407
@@ -5045,9 +5041,7 @@
13408
"TARGET_ARM && arm_arch4"
13409
"ldr%(sb%)\\t%0, %1"
13410
[(set_attr "type" "load_byte")
13411
- (set_attr "predicable" "yes")
13412
- (set_attr "pool_range" "256")
13413
- (set_attr "neg_pool_range" "244")]
13414
+ (set_attr "predicable" "yes")]
13417
(define_expand "extendqisi2"
13418
@@ -5087,9 +5081,7 @@
13419
ldr%(sb%)\\t%0, %1"
13420
[(set_attr "length" "8,4")
13421
(set_attr "type" "alu_shift,load_byte")
13422
- (set_attr "predicable" "yes")
13423
- (set_attr "pool_range" "*,256")
13424
- (set_attr "neg_pool_range" "*,244")]
13425
+ (set_attr "predicable" "yes")]
13428
(define_insn "*arm_extendqisi_v6"
13429
@@ -5101,9 +5093,7 @@
13431
ldr%(sb%)\\t%0, %1"
13432
[(set_attr "type" "simple_alu_shift,load_byte")
13433
- (set_attr "predicable" "yes")
13434
- (set_attr "pool_range" "*,256")
13435
- (set_attr "neg_pool_range" "*,244")]
13436
+ (set_attr "predicable" "yes")]
13439
(define_insn "*arm_extendqisi2addsi"
13440
@@ -7630,12 +7620,13 @@
13442
(define_insn "*arm_cmpdi_unsigned"
13443
[(set (reg:CC_CZ CC_REGNUM)
13444
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
13445
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
13446
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
13447
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
13449
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
13450
[(set_attr "conds" "set")
13451
- (set_attr "length" "8")]
13452
+ (set_attr "arch" "a,t2")
13453
+ (set_attr "length" "8,10")]
13456
(define_insn "*arm_cmpdi_zero"
13457
Index: gcc/config/arm/t-rtems-eabi
13458
===================================================================
13459
--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release)
13460
+++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch)
13462
# Custom RTEMS EABI multilibs
13464
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
13465
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
13466
+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
13467
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
13469
# Enumeration of multilibs
13471
MULTILIB_EXCEPTIONS =
13472
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
13473
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
13474
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
13475
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
13476
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13477
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
13478
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
13479
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
13480
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
13481
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
13482
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
13483
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
13484
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13485
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
13486
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
13487
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
13488
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
13489
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
13490
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13491
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
13492
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13493
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
13494
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
13495
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
13496
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
13497
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
13498
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13499
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
13500
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13501
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
13502
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
13503
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
13504
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
13505
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
13506
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
13507
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
13508
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
13509
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
13510
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
13511
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
13512
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
13513
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
13514
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
13515
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
13516
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13517
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
13518
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
13519
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
13520
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
13521
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
13522
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
13523
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
13524
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13525
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
13526
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
13527
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
13528
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
13529
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
13530
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13531
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
13532
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13533
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
13534
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
13535
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
13536
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
13537
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
13538
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13539
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
13540
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13541
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
13542
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
13543
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
13544
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
13545
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
13546
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
13547
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
13548
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
13549
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
13550
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
13551
+MULTILIB_EXCEPTIONS += mbig-endian
13552
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
13553
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
13554
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
13555
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
13556
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13557
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
13558
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
13559
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
13560
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
13561
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
13562
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
13563
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
13564
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13565
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
13566
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
13567
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
13568
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
13569
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
13570
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13571
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
13572
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13573
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
13574
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
13575
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
13576
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
13577
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
13578
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13579
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
13580
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13581
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
13582
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
13583
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
13584
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
13585
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
13586
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
13587
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
13588
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
13589
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
13590
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
13591
# MULTILIB_EXCEPTIONS += mthumb
13592
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
13593
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
13594
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
13595
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
13596
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13597
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
13598
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
13599
MULTILIB_EXCEPTIONS += march=armv6-m
13600
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
13601
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
13602
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
13603
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
13604
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
13605
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
13606
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
13607
MULTILIB_EXCEPTIONS += march=armv7-a
13608
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
13609
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
13610
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
13611
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
13612
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
13613
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
13614
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
13615
MULTILIB_EXCEPTIONS += march=armv7-r
13616
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
13617
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
13618
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
13619
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
13620
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
13621
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
13622
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
13623
MULTILIB_EXCEPTIONS += march=armv7-m
13624
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
13625
MULTILIB_EXCEPTIONS += mfpu=neon
13626
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
13627
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
13628
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
13629
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
13630
MULTILIB_EXCEPTIONS += mfloat-abi=hard
13631
Index: gcc/config/pa/pa.md
13632
===================================================================
13633
--- a/src/gcc/config/pa/pa.md (.../tags/gcc_4_8_3_release)
13634
+++ b/src/gcc/config/pa/pa.md (.../branches/gcc-4_8-branch)
13635
@@ -123,7 +123,7 @@
13636
;; type "binary" insns have two input operands (1,2) and one output (0)
13638
(define_attr "type"
13639
- "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"
13640
+ "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"
13641
(const_string "binary"))
13643
(define_attr "pa_combine_type"
13644
@@ -166,7 +166,7 @@
13645
;; For conditional branches. Frame related instructions are not allowed
13646
;; because they confuse the unwind support.
13647
(define_attr "in_branch_delay" "false,true"
13648
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
13649
+ (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")
13650
(eq_attr "length" "4")
13651
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13652
(const_string "true")
13653
@@ -175,7 +175,7 @@
13654
;; Disallow instructions which use the FPU since they will tie up the FPU
13655
;; even if the instruction is nullified.
13656
(define_attr "in_nullified_branch_delay" "false,true"
13657
- (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")
13658
+ (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")
13659
(eq_attr "length" "4")
13660
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13661
(const_string "true")
13662
@@ -184,7 +184,7 @@
13663
;; For calls and millicode calls. Allow unconditional branches in the
13665
(define_attr "in_call_delay" "false,true"
13666
- (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
13667
+ (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
13668
(eq_attr "length" "4")
13669
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
13670
(const_string "true")
13671
@@ -5331,6 +5331,15 @@
13672
[(set_attr "type" "binary,binary")
13673
(set_attr "length" "4,4")])
13675
+;; Trap instructions.
13677
+(define_insn "trap"
13678
+ [(trap_if (const_int 1) (const_int 0))]
13680
+ "{addit|addi,tc},<> 1,%%r0,%%r0"
13681
+ [(set_attr "type" "trap")
13682
+ (set_attr "length" "4")])
13684
;; Clobbering a "register_operand" instead of a match_scratch
13685
;; in operand3 of millicode calls avoids spilling %r1 and
13686
;; produces better code.
13687
Index: gcc/config/pa/pa.c
13688
===================================================================
13689
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release)
13690
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
13691
@@ -3237,7 +3237,12 @@
13693
&& function_label_operand (x, VOIDmode))
13695
- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
13696
+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
13698
+ /* We don't want an OPD when generating fast indirect calls. */
13699
+ if (!TARGET_FAST_INDIRECT_CALLS)
13700
+ fputs ("P%", asm_out_file);
13702
output_addr_const (asm_out_file, x);
13703
fputc ('\n', asm_out_file);
13705
@@ -4160,9 +4165,8 @@
13706
pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
13708
rtx insn = get_last_insn ();
13711
- last_address = 0;
13713
/* pa_expand_epilogue does the dirty work now. We just need
13714
to output the assembler directives which denote the end
13716
@@ -4185,14 +4189,16 @@
13717
if (insn && GET_CODE (insn) == CALL_INSN)
13719
fputs ("\tnop\n", file);
13720
- last_address += 4;
13721
+ extra_nop = true;
13724
+ extra_nop = false;
13726
fputs ("\t.EXIT\n\t.PROCEND\n", file);
13728
if (TARGET_SOM && TARGET_GAS)
13730
- /* We done with this subspace except possibly for some additional
13731
+ /* We are done with this subspace except possibly for some additional
13732
debug information. Forget that we are in this subspace to ensure
13733
that the next function is output in its own subspace. */
13735
@@ -4199,12 +4205,20 @@
13736
cfun->machine->in_nsubspa = 2;
13739
+ /* Thunks do their own insn accounting. */
13740
+ if (cfun->is_thunk)
13743
if (INSN_ADDRESSES_SET_P ())
13745
+ last_address = extra_nop ? 4 : 0;
13746
insn = get_last_nonnote_insn ();
13747
- last_address += INSN_ADDRESSES (INSN_UID (insn));
13748
- if (INSN_P (insn))
13749
- last_address += insn_default_length (insn);
13752
+ last_address += INSN_ADDRESSES (INSN_UID (insn));
13753
+ if (INSN_P (insn))
13754
+ last_address += insn_default_length (insn);
13756
last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
13757
& ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
13759
@@ -8270,8 +8284,7 @@
13760
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
13761
xoperands[2] = GEN_INT (delta);
13763
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
13764
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
13765
+ final_start_function (emit_barrier (), file, 1);
13767
/* Output the thunk. We know that the function is in the same
13768
translation unit (i.e., the same space) as the thunk, and that
13769
@@ -8301,12 +8314,16 @@
13770
|| ((DECL_SECTION_NAME (thunk_fndecl)
13771
== DECL_SECTION_NAME (function))
13772
&& last_address < 262132)))
13773
+ /* In this case, we need to be able to reach the start of
13774
+ the stub table even though the function is likely closer
13775
+ and can be jumped to directly. */
13776
|| (targetm_common.have_named_sections
13777
&& DECL_SECTION_NAME (thunk_fndecl) == NULL
13778
&& DECL_SECTION_NAME (function) == NULL
13779
- && last_address < 262132)
13780
+ && total_code_bytes < MAX_PCREL17F_OFFSET)
13782
|| (!targetm_common.have_named_sections
13783
- && last_address < 262132))))
13784
+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
13787
output_asm_insn ("addil L'%2,%%r26", xoperands);
13788
@@ -8477,17 +8494,8 @@
13792
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
13793
+ final_end_function ();
13795
- if (TARGET_SOM && TARGET_GAS)
13797
- /* We done with this subspace except possibly for some additional
13798
- debug information. Forget that we are in this subspace to ensure
13799
- that the next function is output in its own subspace. */
13800
- in_section = NULL;
13801
- cfun->machine->in_nsubspa = 2;
13804
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
13806
switch_to_section (data_section);
13807
Index: gcc/tree-vect-slp.c
13808
===================================================================
13809
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release)
13810
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
13811
@@ -1837,7 +1837,10 @@
13812
&& (stmt_vinfo = vinfo_for_stmt (use_stmt))
13813
&& !STMT_SLP_TYPE (stmt_vinfo)
13814
&& (STMT_VINFO_RELEVANT (stmt_vinfo)
13815
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
13816
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
13817
+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
13818
+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
13819
+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
13820
&& !(gimple_code (use_stmt) == GIMPLE_PHI
13821
&& STMT_VINFO_DEF_TYPE (stmt_vinfo)
13822
== vect_reduction_def))
13823
@@ -2377,13 +2380,21 @@
13824
neutral_op = build_int_cst (TREE_TYPE (op), -1);
13829
- def_stmt = SSA_NAME_DEF_STMT (op);
13830
- loop = (gimple_bb (stmt))->loop_father;
13831
- neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
13832
- loop_preheader_edge (loop));
13834
+ /* For MIN/MAX we don't have an easy neutral operand but
13835
+ the initial values can be used fine here. Only for
13836
+ a reduction chain we have to force a neutral element. */
13839
+ if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
13840
+ neutral_op = NULL;
13843
+ def_stmt = SSA_NAME_DEF_STMT (op);
13844
+ loop = (gimple_bb (stmt))->loop_father;
13845
+ neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
13846
+ loop_preheader_edge (loop));
13852
Index: gcc/regcprop.c
13853
===================================================================
13854
--- a/src/gcc/regcprop.c (.../tags/gcc_4_8_3_release)
13855
+++ b/src/gcc/regcprop.c (.../branches/gcc-4_8-branch)
13856
@@ -1039,7 +1039,17 @@
13857
but instead among CLOBBERs on the CALL_INSN, we could wrongly
13858
assume the value in it is still live. */
13859
if (ksvd.ignore_set_reg)
13860
- note_stores (PATTERN (insn), kill_clobbered_value, vd);
13862
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
13863
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
13865
+ exp = XEXP (exp, 1))
13867
+ rtx x = XEXP (exp, 0);
13868
+ if (GET_CODE (x) == CLOBBER)
13869
+ kill_value (SET_DEST (x), vd);
13874
/* Notice stores. */
13875
Index: libobjc/encoding.c
13876
===================================================================
13877
--- a/src/libobjc/encoding.c (.../tags/gcc_4_8_3_release)
13878
+++ b/src/libobjc/encoding.c (.../branches/gcc-4_8-branch)
13879
@@ -192,6 +192,8 @@
13880
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
13881
: MAX (COMPUTED, SPECIFIED));})
13883
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
13884
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
13886
/* Skip a variable name, enclosed in quotes ("). */
13888
Index: libobjc/ChangeLog
13889
===================================================================
13890
--- a/src/libobjc/ChangeLog (.../tags/gcc_4_8_3_release)
13891
+++ b/src/libobjc/ChangeLog (.../branches/gcc-4_8-branch)
13893
+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
13896
+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
13897
+ that matches the 4.8 branch ABI.
13899
+2014-07-27 Alan Modra <amodra@gmail.com>
13900
+ Matthias Klose <doko@ubuntu.com>
13904
+ * encoding.c: Define rs6000_special_adjust_field_align_p.
13906
2014-05-22 Release Manager
13908
* GCC 4.8.3 released.
13909
Index: libgfortran/m4/in_pack.m4
13910
===================================================================
13911
--- a/src/libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release)
13912
+++ b/src/libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch)
13914
return source->base_addr;
13916
/* Allocate storage for the destination. */
13917
- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
13918
+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
13920
src = source->base_addr;
13921
stride0 = stride[0];
13922
Index: libgfortran/m4/pack.m4
13923
===================================================================
13924
--- a/src/libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release)
13925
+++ b/src/libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch)
13926
@@ -168,8 +168,8 @@
13930
- /* xmalloc allocates a single byte for zero size. */
13931
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
13932
+ /* xmallocarray allocates a single byte for zero size. */
13933
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
13937
Index: libgfortran/m4/spread.m4
13938
===================================================================
13939
--- a/src/libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release)
13940
+++ b/src/libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch)
13941
@@ -102,8 +102,8 @@
13945
- /* xmalloc allocates a single byte for zero size. */
13946
- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
13947
+ /* xmallocarray allocates a single byte for zero size. */
13948
+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
13952
@@ -245,7 +245,7 @@
13954
if (ret->base_addr == NULL)
13956
- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
13957
+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
13959
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
13961
Index: libgfortran/m4/transpose.m4
13962
===================================================================
13963
--- a/src/libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release)
13964
+++ b/src/libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch)
13966
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
13967
GFC_DESCRIPTOR_EXTENT(source, 1));
13969
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
13970
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
13971
+ sizeof ('rtype_name`));
13973
} else if (unlikely (compile_options.bounds_check))
13975
Index: libgfortran/m4/iforeach.m4
13976
===================================================================
13977
--- a/src/libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release)
13978
+++ b/src/libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch)
13980
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13981
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13982
retarray->offset = 0;
13983
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
13984
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
13988
@@ -133,7 +133,7 @@
13989
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
13990
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
13991
retarray->offset = 0;
13992
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
13993
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
13997
@@ -264,7 +264,7 @@
13998
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
13999
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
14000
retarray->offset = 0;
14001
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
14002
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
14004
else if (unlikely (compile_options.bounds_check))
14006
Index: libgfortran/m4/eoshift1.m4
14007
===================================================================
14008
--- a/src/libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release)
14009
+++ b/src/libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch)
14010
@@ -106,8 +106,8 @@
14011
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14014
- /* xmalloc allocates a single byte for zero size. */
14015
- ret->base_addr = xmalloc (size * arraysize);
14016
+ /* xmallocarray allocates a single byte for zero size. */
14017
+ ret->base_addr = xmallocarray (arraysize, size);
14020
else if (unlikely (compile_options.bounds_check))
14021
Index: libgfortran/m4/eoshift3.m4
14022
===================================================================
14023
--- a/src/libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release)
14024
+++ b/src/libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch)
14029
- ret->base_addr = xmalloc (size * arraysize);
14030
+ ret->base_addr = xmallocarray (arraysize, size);
14032
ret->dtype = array->dtype;
14033
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14034
@@ -108,8 +108,8 @@
14035
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14038
- /* xmalloc allocates a single byte for zero size. */
14039
- ret->base_addr = xmalloc (size * arraysize);
14040
+ /* xmallocarray allocates a single byte for zero size. */
14041
+ ret->base_addr = xmallocarray (arraysize, size);
14044
else if (unlikely (compile_options.bounds_check))
14045
Index: libgfortran/m4/shape.m4
14046
===================================================================
14047
--- a/src/libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release)
14048
+++ b/src/libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch)
14051
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
14053
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
14054
+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
14057
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
14058
Index: libgfortran/m4/cshift1.m4
14059
===================================================================
14060
--- a/src/libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release)
14061
+++ b/src/libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch)
14066
- ret->base_addr = xmalloc (size * arraysize);
14067
+ ret->base_addr = xmallocarray (arraysize, size);
14069
ret->dtype = array->dtype;
14070
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14071
Index: libgfortran/m4/matmull.m4
14072
===================================================================
14073
--- a/src/libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release)
14074
+++ b/src/libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch)
14078
retarray->base_addr
14079
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
14080
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
14081
retarray->offset = 0;
14083
else if (unlikely (compile_options.bounds_check))
14084
Index: libgfortran/m4/bessel.m4
14085
===================================================================
14086
--- a/src/libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release)
14087
+++ b/src/libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch)
14090
size_t size = n2 < n1 ? 0 : n2-n1+1;
14091
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14092
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
14093
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
14097
@@ -123,7 +123,7 @@
14099
size_t size = n2 < n1 ? 0 : n2-n1+1;
14100
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
14101
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
14102
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
14106
@@ -163,7 +163,7 @@
14108
x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
14110
- for (i = 2; i <= n1+n2; i++)
14111
+ for (i = 2; i <= n2 - n1; i++)
14113
#if defined('rtype_name`_INFINITY)
14114
if (unlikely (last2 == -'rtype_name`_INFINITY))
14115
Index: libgfortran/m4/unpack.m4
14116
===================================================================
14117
--- a/src/libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release)
14118
+++ b/src/libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch)
14119
@@ -100,7 +100,7 @@
14123
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
14124
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
14128
@@ -245,7 +245,7 @@
14132
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
14133
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
14137
Index: libgfortran/m4/reshape.m4
14138
===================================================================
14139
--- a/src/libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release)
14140
+++ b/src/libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch)
14141
@@ -115,11 +115,11 @@
14144
if (unlikely (rs < 1))
14148
- alloc_size = rs * sizeof ('rtype_name`);
14151
- ret->base_addr = xmalloc (alloc_size);
14152
+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
14153
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14156
Index: libgfortran/m4/ifunction_logical.m4
14157
===================================================================
14158
--- a/src/libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release)
14159
+++ b/src/libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch)
14161
retarray->offset = 0;
14162
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14164
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14165
- * extent[rank-1];
14166
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14168
if (alloc_size == 0)
14174
- retarray->base_addr = xmalloc (alloc_size);
14175
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
14179
Index: libgfortran/m4/ifunction.m4
14180
===================================================================
14181
--- a/src/libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release)
14182
+++ b/src/libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch)
14184
retarray->offset = 0;
14185
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14187
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14188
- * extent[rank-1];
14189
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14191
- retarray->base_addr = xmalloc (alloc_size);
14192
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
14193
if (alloc_size == 0)
14195
/* Make sure we have a zero-sized array. */
14196
@@ -260,8 +259,7 @@
14200
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14201
- * extent[rank-1];
14202
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14204
retarray->offset = 0;
14205
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14206
@@ -273,7 +271,7 @@
14210
- retarray->base_addr = xmalloc (alloc_size);
14211
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
14215
@@ -417,8 +415,7 @@
14216
retarray->offset = 0;
14217
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14219
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14220
- * extent[rank-1];
14221
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14223
if (alloc_size == 0)
14225
@@ -427,7 +424,7 @@
14229
- retarray->base_addr = xmalloc (alloc_size);
14230
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
14234
Index: libgfortran/m4/matmul.m4
14235
===================================================================
14236
--- a/src/libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release)
14237
+++ b/src/libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch)
14238
@@ -125,7 +125,7 @@
14241
retarray->base_addr
14242
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
14243
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
14244
retarray->offset = 0;
14246
else if (unlikely (compile_options.bounds_check))
14247
Index: libgfortran/configure
14248
===================================================================
14249
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
14250
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
14251
@@ -2595,6 +2595,7 @@
14252
as_fn_append ac_func_list " getegid"
14253
as_fn_append ac_func_list " secure_getenv"
14254
as_fn_append ac_func_list " __secure_getenv"
14255
+as_fn_append ac_func_list " strtok_r"
14256
as_fn_append ac_header_list " math.h"
14257
# Check that the precious variables saved in the cache have kept the same
14259
@@ -12339,7 +12340,7 @@
14260
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14261
lt_status=$lt_dlunknown
14262
cat > conftest.$ac_ext <<_LT_EOF
14263
-#line 12342 "configure"
14264
+#line 12343 "configure"
14265
#include "confdefs.h"
14268
@@ -12445,7 +12446,7 @@
14269
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14270
lt_status=$lt_dlunknown
14271
cat > conftest.$ac_ext <<_LT_EOF
14272
-#line 12448 "configure"
14273
+#line 12449 "configure"
14274
#include "confdefs.h"
14277
@@ -16506,6 +16507,8 @@
14286
Index: libgfortran/runtime/in_pack_generic.c
14287
===================================================================
14288
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
14289
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
14290
@@ -180,7 +180,7 @@
14291
return source->base_addr;
14293
/* Allocate storage for the destination. */
14294
- destptr = xmalloc (ssize * size);
14295
+ destptr = xmallocarray (ssize, size);
14296
dest = (char *)destptr;
14297
src = source->base_addr;
14298
stride0 = stride[0] * size;
14299
Index: libgfortran/runtime/memory.c
14300
===================================================================
14301
--- a/src/libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release)
14302
+++ b/src/libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch)
14305
#include "libgfortran.h"
14306
#include <stdlib.h>
14307
+#include <errno.h>
14310
+#define SIZE_MAX ((size_t)-1)
14317
@@ -44,12 +49,34 @@
14322
+xmallocarray (size_t nmemb, size_t size)
14326
+ if (!nmemb || !size)
14327
+ size = nmemb = 1;
14328
+ else if (nmemb > SIZE_MAX / size)
14331
+ os_error ("Integer overflow in xmallocarray");
14334
+ p = malloc (nmemb * size);
14337
+ os_error ("Memory allocation failed in xmallocarray");
14343
/* calloc wrapper that aborts on error. */
14346
xcalloc (size_t nmemb, size_t size)
14348
- if (nmemb * size == 0)
14349
+ if (!nmemb || !size)
14352
void *p = calloc (nmemb, size);
14353
Index: libgfortran/runtime/convert_char.c
14354
===================================================================
14355
--- a/src/libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release)
14356
+++ b/src/libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch)
14358
gfc_charlen_type i, l;
14360
l = len > 0 ? len : 0;
14361
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
14362
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
14364
for (i = 0; i < l; i++)
14365
(*dst)[i] = src[i];
14367
gfc_charlen_type i, l;
14369
l = len > 0 ? len : 0;
14370
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
14371
+ *dst = xmalloc (l + 1);
14373
for (i = 0; i < l; i++)
14374
(*dst)[i] = src[i];
14375
Index: libgfortran/runtime/environ.c
14376
===================================================================
14377
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
14378
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
14379
@@ -833,7 +833,7 @@
14383
- elist = xmalloc (unit_count * sizeof (exception_t));
14384
+ elist = xmallocarray (unit_count, sizeof (exception_t));
14388
Index: libgfortran/runtime/main.c
14389
===================================================================
14390
--- a/src/libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release)
14391
+++ b/src/libgfortran/runtime/main.c (.../branches/gcc-4_8-branch)
14392
@@ -153,6 +153,16 @@
14396
+#ifndef HAVE_STRTOK_R
14398
+gfstrtok_r (char *str, const char *delim,
14399
+ char **saveptr __attribute__ ((unused)))
14401
+ return strtok (str, delim);
14403
+#define strtok_r gfstrtok_r
14406
char *addr2line_path;
14408
/* Find addr2line and store the path. */
14409
@@ -161,30 +171,32 @@
14410
find_addr2line (void)
14413
-#define A2L_LEN 10
14414
+#define A2L_LEN 11
14415
char *path = secure_getenv ("PATH");
14418
+ char *tp = strdup (path);
14421
size_t n = strlen (path);
14422
- char ap[n + 1 + A2L_LEN];
14424
- for (size_t i = 0; i < n; i++)
14425
+ char *ap = xmalloc (n + A2L_LEN);
14427
+ for (char *str = tp;; str = NULL)
14429
- if (path[i] != ':')
14430
- ap[ai++] = path[i];
14432
+ char *token = strtok_r (str, ":", &saveptr);
14435
+ size_t toklen = strlen (token);
14436
+ memcpy (ap, token, toklen);
14437
+ memcpy (ap + toklen, "/addr2line", A2L_LEN);
14438
+ if (access (ap, R_OK|X_OK) == 0)
14441
- memcpy (ap + ai, "addr2line", A2L_LEN);
14442
- if (access (ap, R_OK|X_OK) == 0)
14444
- addr2line_path = strdup (ap);
14449
+ addr2line_path = strdup (ap);
14458
Index: libgfortran/intrinsics/string_intrinsics_inc.c
14459
===================================================================
14460
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release)
14461
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch)
14462
@@ -164,7 +164,7 @@
14465
/* Allocate space for result string. */
14466
- *dest = xmalloc (*len * sizeof (CHARTYPE));
14467
+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
14469
/* Copy string if necessary. */
14470
memcpy (*dest, src, *len * sizeof (CHARTYPE));
14471
@@ -442,7 +442,7 @@
14472
*dest = &zero_length_string;
14475
- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
14476
+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
14477
memcpy (tmp, res, reslen * sizeof (CHARTYPE));
14478
MEMSET (&tmp[reslen], ' ', *rlen - reslen);
14480
Index: libgfortran/intrinsics/pack_generic.c
14481
===================================================================
14482
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
14483
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
14484
@@ -152,8 +152,8 @@
14485
GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
14488
- /* xmalloc allocates a single byte for zero size. */
14489
- ret->base_addr = xmalloc (size * total);
14490
+ /* xmallocarray allocates a single byte for zero size. */
14491
+ ret->base_addr = xmallocarray (total, size);
14494
return; /* In this case, nothing remains to be done. */
14495
@@ -519,7 +519,7 @@
14499
- ret->base_addr = xmalloc (size * total);
14500
+ ret->base_addr = xmallocarray (total, size);
14504
Index: libgfortran/intrinsics/transpose_generic.c
14505
===================================================================
14506
--- a/src/libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release)
14507
+++ b/src/libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch)
14509
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14510
GFC_DESCRIPTOR_EXTENT(source, 1));
14512
- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
14513
+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
14516
else if (unlikely (compile_options.bounds_check))
14517
Index: libgfortran/intrinsics/cshift0.c
14518
===================================================================
14519
--- a/src/libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release)
14520
+++ b/src/libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch)
14522
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14525
- /* xmalloc allocates a single byte for zero size. */
14526
- ret->base_addr = xmalloc (size * arraysize);
14527
+ /* xmallocarray allocates a single byte for zero size. */
14528
+ ret->base_addr = xmallocarray (arraysize, size);
14530
else if (unlikely (compile_options.bounds_check))
14532
Index: libgfortran/intrinsics/ctime.c
14533
===================================================================
14534
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
14535
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
14536
@@ -31,31 +31,53 @@
14537
#include <string.h>
14540
-/* strftime-like function that fills a C string with %c format which
14541
- is identical to ctime in the default locale. As ctime and ctime_r
14542
- are poorly specified and their usage not recommended, the
14543
- implementation instead uses strftime. */
14544
+/* Maximum space a ctime-like string might need. A "normal" ctime
14545
+ string is 26 bytes, and in our case 24 bytes as we don't include
14546
+ the trailing newline and null. However, the longest possible year
14547
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
14548
+ 32-bit signed integer) so an extra 7 bytes are needed. */
14549
+#define CTIME_BUFSZ 31
14552
-strctime (char *s, size_t max, const time_t *timep)
14554
+/* Thread-safe ctime-like function that fills a Fortran
14555
+ string. ctime_r is a portability headache and marked as obsolescent
14556
+ in POSIX 2008, which recommends strftime in its place. However,
14557
+ strftime(..., "%c",...) doesn't produce ctime-like output on
14558
+ MinGW, so do it manually with snprintf. */
14561
+gf_ctime (char *s, size_t max, const time_t timev)
14565
+ char buf[CTIME_BUFSZ + 1];
14566
/* Some targets provide a localtime_r based on a draft of the POSIX
14567
standard where the return type is int rather than the
14568
standardized struct tm*. */
14569
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
14570
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
14572
- failed = localtime_r (timep, <m) == NULL,
14573
- failed = localtime_r (timep, <m) != 0);
14574
+ failed = localtime_r (&timev, <m) == NULL,
14575
+ failed = localtime_r (&timev, <m) != 0);
14578
- return strftime (s, max, "%c", <m);
14580
+ int n = snprintf (buf, sizeof (buf),
14581
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
14582
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
14583
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
14584
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
14585
+ 1900 + ltm.tm_year);
14588
+ if ((size_t) n <= max)
14590
+ cf_strcpy (s, max, buf);
14594
+ memset (s, ' ', max);
14598
-/* In the default locale, the date and time representation fits in 26
14599
- bytes. However, other locales might need more space. */
14602
extern void fdate (char **, gfc_charlen_type *);
14603
export_proto(fdate);
14605
fdate (char ** date, gfc_charlen_type * date_len)
14607
time_t now = time(NULL);
14608
- *date = xmalloc (CSZ);
14609
- *date_len = strctime (*date, CSZ, &now);
14610
+ *date = xmalloc (CTIME_BUFSZ);
14611
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
14616
fdate_sub (char * date, gfc_charlen_type date_len)
14618
time_t now = time(NULL);
14619
- char *s = xmalloc (date_len + 1);
14620
- size_t n = strctime (s, date_len + 1, &now);
14621
- fstrcpy (date, date_len, s, n);
14623
+ gf_ctime (date, date_len, now);
14628
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
14631
- *date = xmalloc (CSZ);
14632
- *date_len = strctime (*date, CSZ, &now);
14633
+ *date = xmalloc (CTIME_BUFSZ);
14634
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
14638
@@ -103,8 +122,5 @@
14639
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
14642
- char *s = xmalloc (date_len + 1);
14643
- size_t n = strctime (s, date_len + 1, &now);
14644
- fstrcpy (date, date_len, s, n);
14646
+ gf_ctime (date, date_len, now);
14648
Index: libgfortran/intrinsics/spread_generic.c
14649
===================================================================
14650
--- a/src/libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release)
14651
+++ b/src/libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch)
14652
@@ -100,7 +100,7 @@
14653
GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
14656
- ret->base_addr = xmalloc (rs * size);
14657
+ ret->base_addr = xmallocarray (rs, size);
14661
@@ -245,7 +245,7 @@
14663
if (ret->base_addr == NULL)
14665
- ret->base_addr = xmalloc (ncopies * size);
14666
+ ret->base_addr = xmallocarray (ncopies, size);
14668
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14670
Index: libgfortran/intrinsics/unpack_generic.c
14671
===================================================================
14672
--- a/src/libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release)
14673
+++ b/src/libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch)
14674
@@ -125,7 +125,7 @@
14678
- ret->base_addr = xmalloc (rs * size);
14679
+ ret->base_addr = xmallocarray (rs, size);
14683
Index: libgfortran/intrinsics/eoshift0.c
14684
===================================================================
14685
--- a/src/libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release)
14686
+++ b/src/libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch)
14691
- /* xmalloc allocates a single byte for zero size. */
14692
- ret->base_addr = xmalloc (size * arraysize);
14693
+ /* xmallocarray allocates a single byte for zero size. */
14694
+ ret->base_addr = xmallocarray (arraysize, size);
14696
else if (unlikely (compile_options.bounds_check))
14698
Index: libgfortran/intrinsics/eoshift2.c
14699
===================================================================
14700
--- a/src/libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release)
14701
+++ b/src/libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch)
14704
ret->dtype = array->dtype;
14706
- /* xmalloc allocates a single byte for zero size. */
14707
- ret->base_addr = xmalloc (size * arraysize);
14708
+ /* xmallocarray allocates a single byte for zero size. */
14709
+ ret->base_addr = xmallocarray (arraysize, size);
14711
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14713
Index: libgfortran/intrinsics/reshape_generic.c
14714
===================================================================
14715
--- a/src/libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release)
14716
+++ b/src/libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch)
14717
@@ -99,11 +99,11 @@
14720
if (unlikely (rs < 1))
14722
+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
14724
- alloc_size = rs * size;
14727
- ret->base_addr = xmalloc (alloc_size);
14728
+ ret->base_addr = xmallocarray (alloc_size, size);
14730
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
14732
Index: libgfortran/configure.ac
14733
===================================================================
14734
--- a/src/libgfortran/configure.ac (.../tags/gcc_4_8_3_release)
14735
+++ b/src/libgfortran/configure.ac (.../branches/gcc-4_8-branch)
14736
@@ -267,7 +267,7 @@
14737
strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
14738
getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
14739
readlink getgid getpid getppid getuid geteuid umask getegid \
14740
-secure_getenv __secure_getenv)
14741
+secure_getenv __secure_getenv strtok_r)
14743
# Check strerror_r, cannot be above as versions with two and three arguments exist
14744
LIBGFOR_CHECK_STRERROR_R
14745
Index: libgfortran/ChangeLog
14746
===================================================================
14747
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
14748
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
14750
+2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
14752
+ PR libfortran/63589
14753
+ * configure.ac: Check for strtok_r.
14754
+ * runtime/main.c (gfstrtok_r): Fallback implementation of
14756
+ (find_addr2line): Use strtok_r to split PATH.
14757
+ * config.h.in: Regenerated.
14758
+ * configure: Regenerated.
14760
+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
14762
+ PR libgfortran/62188
14763
+ * m4/bessel.m4: Avoid indexing off the end of an array.
14764
+ * generated/bessel_r10.c: Regenerated.
14765
+ * generated/bessel_r16.c: Ditto.
14766
+ * generated/bessel_r4.c: Ditto.
14767
+ * generated/bessel_r8.c: Ditto.
14769
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
14771
+ Backport from mainline
14773
+ * libgfortran.h (xmallocarray): New prototype.
14774
+ * runtime/memory.c (xmallocarray): New function.
14775
+ (xcalloc): Check for nonzero separately instead of multiplying.
14776
+ * generated/*.c: Regenerated.
14777
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
14779
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
14780
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
14781
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
14782
+ (pack_s_internal): Likewise.
14783
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
14784
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
14785
+ (spread_internal_scalar): Likewise.
14786
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
14787
+ (string_minmax): Likewise.
14788
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
14789
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
14790
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
14791
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
14793
+ * io/unit.c (get_internal_unit): Likewise.
14794
+ (filename_from_unit): Don't cast xmalloc return value.
14795
+ * io/write.c (nml_write_obj): Likewise, formatting.
14796
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
14797
+ instead of xmalloc.
14798
+ (besse_yn_r'rtype_kind`): Likewise.
14799
+ * m4/cshift1.m4 (cshift1): Likewise.
14800
+ * m4/eoshift1.m4 (eoshift1): Likewise.
14801
+ * m4/eoshift3.m4 (eoshift3): Likewise.
14802
+ * m4/iforeach.m4: Likewise.
14803
+ * m4/ifunction.m4: Likewise.
14804
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
14806
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
14807
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
14808
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
14809
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
14810
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
14811
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
14812
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
14813
+ (spread_scalar_'rtype_code`): Likewise.
14814
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
14815
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
14816
+ (unpack1_'rtype_code`): Likewise.
14817
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
14818
+ (convert_char4_to_char1): Simplify.
14819
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
14821
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
14823
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
14825
+ Backport from mainline
14826
+ PR libfortran/61310
14827
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
14828
+ instead of strftime.
14829
+ (fdate): Use gf_ctime.
14830
+ (fdate_sub): Likewise.
14831
+ (ctime): Likewise.
14832
+ (ctime_sub): Likewise.
14834
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
14836
+ Backport from trunk.
14837
+ PR libfortran/61187
14838
+ * io/unix.c (raw_close): Check if s->fd is -1.
14839
+ (fd_to_stream): Check return value of fstat(), handle error.
14841
2014-05-22 Release Manager
14843
* GCC 4.8.3 released.
14844
Index: libgfortran/generated/spread_r10.c
14845
===================================================================
14846
--- a/src/libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release)
14847
+++ b/src/libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch)
14848
@@ -101,8 +101,8 @@
14852
- /* xmalloc allocates a single byte for zero size. */
14853
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
14854
+ /* xmallocarray allocates a single byte for zero size. */
14855
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
14859
@@ -244,7 +244,7 @@
14861
if (ret->base_addr == NULL)
14863
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
14864
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
14866
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14868
Index: libgfortran/generated/maxloc1_4_r8.c
14869
===================================================================
14870
--- a/src/libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release)
14871
+++ b/src/libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch)
14873
retarray->offset = 0;
14874
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14876
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14877
- * extent[rank-1];
14878
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14880
- retarray->base_addr = xmalloc (alloc_size);
14881
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14882
if (alloc_size == 0)
14884
/* Make sure we have a zero-sized array. */
14885
@@ -294,8 +293,7 @@
14889
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14890
- * extent[rank-1];
14891
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14893
retarray->offset = 0;
14894
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14895
@@ -307,7 +305,7 @@
14899
- retarray->base_addr = xmalloc (alloc_size);
14900
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14904
@@ -485,8 +483,7 @@
14905
retarray->offset = 0;
14906
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14908
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14909
- * extent[rank-1];
14910
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14912
if (alloc_size == 0)
14914
@@ -495,7 +492,7 @@
14918
- retarray->base_addr = xmalloc (alloc_size);
14919
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
14923
Index: libgfortran/generated/norm2_r4.c
14924
===================================================================
14925
--- a/src/libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release)
14926
+++ b/src/libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch)
14927
@@ -101,10 +101,9 @@
14928
retarray->offset = 0;
14929
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14931
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14932
- * extent[rank-1];
14933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14935
- retarray->base_addr = xmalloc (alloc_size);
14936
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
14937
if (alloc_size == 0)
14939
/* Make sure we have a zero-sized array. */
14940
Index: libgfortran/generated/parity_l2.c
14941
===================================================================
14942
--- a/src/libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release)
14943
+++ b/src/libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch)
14945
retarray->offset = 0;
14946
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
14948
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
14949
- * extent[rank-1];
14950
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
14952
- retarray->base_addr = xmalloc (alloc_size);
14953
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
14954
if (alloc_size == 0)
14956
/* Make sure we have a zero-sized array. */
14957
Index: libgfortran/generated/eoshift3_4.c
14958
===================================================================
14959
--- a/src/libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release)
14960
+++ b/src/libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch)
14965
- ret->base_addr = xmalloc (size * arraysize);
14966
+ ret->base_addr = xmallocarray (arraysize, size);
14968
ret->dtype = array->dtype;
14969
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
14970
@@ -107,8 +107,8 @@
14971
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
14974
- /* xmalloc allocates a single byte for zero size. */
14975
- ret->base_addr = xmalloc (size * arraysize);
14976
+ /* xmallocarray allocates a single byte for zero size. */
14977
+ ret->base_addr = xmallocarray (arraysize, size);
14980
else if (unlikely (compile_options.bounds_check))
14981
Index: libgfortran/generated/transpose_c8.c
14982
===================================================================
14983
--- a/src/libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release)
14984
+++ b/src/libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch)
14986
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
14987
GFC_DESCRIPTOR_EXTENT(source, 1));
14989
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
14990
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
14991
+ sizeof (GFC_COMPLEX_8));
14993
} else if (unlikely (compile_options.bounds_check))
14995
Index: libgfortran/generated/eoshift1_8.c
14996
===================================================================
14997
--- a/src/libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release)
14998
+++ b/src/libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch)
14999
@@ -105,8 +105,8 @@
15000
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
15003
- /* xmalloc allocates a single byte for zero size. */
15004
- ret->base_addr = xmalloc (size * arraysize);
15005
+ /* xmallocarray allocates a single byte for zero size. */
15006
+ ret->base_addr = xmallocarray (arraysize, size);
15009
else if (unlikely (compile_options.bounds_check))
15010
Index: libgfortran/generated/reshape_r16.c
15011
===================================================================
15012
--- a/src/libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release)
15013
+++ b/src/libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch)
15014
@@ -111,11 +111,11 @@
15017
if (unlikely (rs < 1))
15021
- alloc_size = rs * sizeof (GFC_REAL_16);
15024
- ret->base_addr = xmalloc (alloc_size);
15025
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15026
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15029
Index: libgfortran/generated/bessel_r4.c
15030
===================================================================
15031
--- a/src/libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release)
15032
+++ b/src/libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch)
15035
size_t size = n2 < n1 ? 0 : n2-n1+1;
15036
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15037
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
15038
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
15042
@@ -122,7 +122,7 @@
15044
size_t size = n2 < n1 ? 0 : n2-n1+1;
15045
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15046
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
15047
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
15051
@@ -162,7 +162,7 @@
15053
x2rev = GFC_REAL_4_LITERAL(2.)/x;
15055
- for (i = 2; i <= n1+n2; i++)
15056
+ for (i = 2; i <= n2 - n1; i++)
15058
#if defined(GFC_REAL_4_INFINITY)
15059
if (unlikely (last2 == -GFC_REAL_4_INFINITY))
15060
Index: libgfortran/generated/any_l2.c
15061
===================================================================
15062
--- a/src/libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release)
15063
+++ b/src/libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch)
15064
@@ -101,8 +101,7 @@
15065
retarray->offset = 0;
15066
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15068
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15069
- * extent[rank-1];
15070
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15072
if (alloc_size == 0)
15074
@@ -111,7 +110,7 @@
15078
- retarray->base_addr = xmalloc (alloc_size);
15079
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
15083
Index: libgfortran/generated/product_r4.c
15084
===================================================================
15085
--- a/src/libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release)
15086
+++ b/src/libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch)
15088
retarray->offset = 0;
15089
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15091
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15092
- * extent[rank-1];
15093
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15095
- retarray->base_addr = xmalloc (alloc_size);
15096
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15097
if (alloc_size == 0)
15099
/* Make sure we have a zero-sized array. */
15100
@@ -272,8 +271,7 @@
15104
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15105
- * extent[rank-1];
15106
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15108
retarray->offset = 0;
15109
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15110
@@ -285,7 +283,7 @@
15114
- retarray->base_addr = xmalloc (alloc_size);
15115
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15119
@@ -430,8 +428,7 @@
15120
retarray->offset = 0;
15121
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15123
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15124
- * extent[rank-1];
15125
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15127
if (alloc_size == 0)
15129
@@ -440,7 +437,7 @@
15133
- retarray->base_addr = xmalloc (alloc_size);
15134
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15138
Index: libgfortran/generated/iany_i1.c
15139
===================================================================
15140
--- a/src/libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release)
15141
+++ b/src/libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch)
15143
retarray->offset = 0;
15144
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15146
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15147
- * extent[rank-1];
15148
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15150
- retarray->base_addr = xmalloc (alloc_size);
15151
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15152
if (alloc_size == 0)
15154
/* Make sure we have a zero-sized array. */
15155
@@ -272,8 +271,7 @@
15159
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15160
- * extent[rank-1];
15161
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15163
retarray->offset = 0;
15164
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15165
@@ -285,7 +283,7 @@
15169
- retarray->base_addr = xmalloc (alloc_size);
15170
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15174
@@ -430,8 +428,7 @@
15175
retarray->offset = 0;
15176
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15178
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15179
- * extent[rank-1];
15180
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15182
if (alloc_size == 0)
15184
@@ -440,7 +437,7 @@
15188
- retarray->base_addr = xmalloc (alloc_size);
15189
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15193
Index: libgfortran/generated/parity_l16.c
15194
===================================================================
15195
--- a/src/libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release)
15196
+++ b/src/libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch)
15198
retarray->offset = 0;
15199
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15201
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15202
- * extent[rank-1];
15203
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15205
- retarray->base_addr = xmalloc (alloc_size);
15206
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
15207
if (alloc_size == 0)
15209
/* Make sure we have a zero-sized array. */
15210
Index: libgfortran/generated/in_pack_r4.c
15211
===================================================================
15212
--- a/src/libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release)
15213
+++ b/src/libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch)
15215
return source->base_addr;
15217
/* Allocate storage for the destination. */
15218
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
15219
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
15221
src = source->base_addr;
15222
stride0 = stride[0];
15223
Index: libgfortran/generated/product_i2.c
15224
===================================================================
15225
--- a/src/libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release)
15226
+++ b/src/libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch)
15228
retarray->offset = 0;
15229
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15231
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15232
- * extent[rank-1];
15233
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15235
- retarray->base_addr = xmalloc (alloc_size);
15236
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15237
if (alloc_size == 0)
15239
/* Make sure we have a zero-sized array. */
15240
@@ -272,8 +271,7 @@
15244
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15245
- * extent[rank-1];
15246
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15248
retarray->offset = 0;
15249
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15250
@@ -285,7 +283,7 @@
15254
- retarray->base_addr = xmalloc (alloc_size);
15255
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15259
@@ -430,8 +428,7 @@
15260
retarray->offset = 0;
15261
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15263
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15264
- * extent[rank-1];
15265
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15267
if (alloc_size == 0)
15269
@@ -440,7 +437,7 @@
15273
- retarray->base_addr = xmalloc (alloc_size);
15274
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
15278
Index: libgfortran/generated/iparity_i4.c
15279
===================================================================
15280
--- a/src/libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release)
15281
+++ b/src/libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch)
15283
retarray->offset = 0;
15284
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15286
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15287
- * extent[rank-1];
15288
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15290
- retarray->base_addr = xmalloc (alloc_size);
15291
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15292
if (alloc_size == 0)
15294
/* Make sure we have a zero-sized array. */
15295
@@ -272,8 +271,7 @@
15299
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15300
- * extent[rank-1];
15301
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15303
retarray->offset = 0;
15304
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15305
@@ -285,7 +283,7 @@
15309
- retarray->base_addr = xmalloc (alloc_size);
15310
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15314
@@ -430,8 +428,7 @@
15315
retarray->offset = 0;
15316
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15318
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15319
- * extent[rank-1];
15320
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15322
if (alloc_size == 0)
15324
@@ -440,7 +437,7 @@
15328
- retarray->base_addr = xmalloc (alloc_size);
15329
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15333
Index: libgfortran/generated/minloc0_4_i1.c
15334
===================================================================
15335
--- a/src/libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release)
15336
+++ b/src/libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch)
15338
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15339
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15340
retarray->offset = 0;
15341
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15342
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15346
@@ -199,7 +199,7 @@
15347
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15348
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15349
retarray->offset = 0;
15350
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15351
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15355
@@ -367,7 +367,7 @@
15356
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15357
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15358
retarray->offset = 0;
15359
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15360
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15362
else if (unlikely (compile_options.bounds_check))
15364
Index: libgfortran/generated/reshape_c4.c
15365
===================================================================
15366
--- a/src/libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release)
15367
+++ b/src/libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch)
15368
@@ -111,11 +111,11 @@
15371
if (unlikely (rs < 1))
15375
- alloc_size = rs * sizeof (GFC_COMPLEX_4);
15378
- ret->base_addr = xmalloc (alloc_size);
15379
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
15380
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15383
Index: libgfortran/generated/maxloc0_4_r16.c
15384
===================================================================
15385
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
15386
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
15388
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15389
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15390
retarray->offset = 0;
15391
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15392
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15396
@@ -199,7 +199,7 @@
15397
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15398
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15399
retarray->offset = 0;
15400
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15401
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15405
@@ -367,7 +367,7 @@
15406
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15407
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15408
retarray->offset = 0;
15409
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
15410
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
15412
else if (unlikely (compile_options.bounds_check))
15414
Index: libgfortran/generated/iall_i8.c
15415
===================================================================
15416
--- a/src/libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release)
15417
+++ b/src/libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch)
15419
retarray->offset = 0;
15420
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15422
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15423
- * extent[rank-1];
15424
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15426
- retarray->base_addr = xmalloc (alloc_size);
15427
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15428
if (alloc_size == 0)
15430
/* Make sure we have a zero-sized array. */
15431
@@ -272,8 +271,7 @@
15435
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15436
- * extent[rank-1];
15437
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15439
retarray->offset = 0;
15440
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15441
@@ -285,7 +283,7 @@
15445
- retarray->base_addr = xmalloc (alloc_size);
15446
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15450
@@ -430,8 +428,7 @@
15451
retarray->offset = 0;
15452
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15454
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15455
- * extent[rank-1];
15456
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15458
if (alloc_size == 0)
15460
@@ -440,7 +437,7 @@
15464
- retarray->base_addr = xmalloc (alloc_size);
15465
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15469
Index: libgfortran/generated/maxloc1_8_r16.c
15470
===================================================================
15471
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
15472
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
15474
retarray->offset = 0;
15475
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15477
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15478
- * extent[rank-1];
15479
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15481
- retarray->base_addr = xmalloc (alloc_size);
15482
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15483
if (alloc_size == 0)
15485
/* Make sure we have a zero-sized array. */
15486
@@ -294,8 +293,7 @@
15490
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15491
- * extent[rank-1];
15492
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15494
retarray->offset = 0;
15495
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15496
@@ -307,7 +305,7 @@
15500
- retarray->base_addr = xmalloc (alloc_size);
15501
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15505
@@ -485,8 +483,7 @@
15506
retarray->offset = 0;
15507
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15509
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15510
- * extent[rank-1];
15511
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15513
if (alloc_size == 0)
15515
@@ -495,7 +492,7 @@
15519
- retarray->base_addr = xmalloc (alloc_size);
15520
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15524
Index: libgfortran/generated/sum_r16.c
15525
===================================================================
15526
--- a/src/libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release)
15527
+++ b/src/libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch)
15529
retarray->offset = 0;
15530
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15532
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15533
- * extent[rank-1];
15534
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15536
- retarray->base_addr = xmalloc (alloc_size);
15537
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15538
if (alloc_size == 0)
15540
/* Make sure we have a zero-sized array. */
15541
@@ -272,8 +271,7 @@
15545
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15546
- * extent[rank-1];
15547
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15549
retarray->offset = 0;
15550
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15551
@@ -285,7 +283,7 @@
15555
- retarray->base_addr = xmalloc (alloc_size);
15556
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15560
@@ -430,8 +428,7 @@
15561
retarray->offset = 0;
15562
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15564
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15565
- * extent[rank-1];
15566
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15568
if (alloc_size == 0)
15570
@@ -440,7 +437,7 @@
15574
- retarray->base_addr = xmalloc (alloc_size);
15575
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15579
Index: libgfortran/generated/sum_i1.c
15580
===================================================================
15581
--- a/src/libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release)
15582
+++ b/src/libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch)
15584
retarray->offset = 0;
15585
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15587
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15588
- * extent[rank-1];
15589
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15591
- retarray->base_addr = xmalloc (alloc_size);
15592
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15593
if (alloc_size == 0)
15595
/* Make sure we have a zero-sized array. */
15596
@@ -272,8 +271,7 @@
15600
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15601
- * extent[rank-1];
15602
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15604
retarray->offset = 0;
15605
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15606
@@ -285,7 +283,7 @@
15610
- retarray->base_addr = xmalloc (alloc_size);
15611
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15615
@@ -430,8 +428,7 @@
15616
retarray->offset = 0;
15617
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15619
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15620
- * extent[rank-1];
15621
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15623
if (alloc_size == 0)
15625
@@ -440,7 +437,7 @@
15629
- retarray->base_addr = xmalloc (alloc_size);
15630
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
15634
Index: libgfortran/generated/in_pack_i2.c
15635
===================================================================
15636
--- a/src/libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release)
15637
+++ b/src/libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch)
15639
return source->base_addr;
15641
/* Allocate storage for the destination. */
15642
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
15643
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
15645
src = source->base_addr;
15646
stride0 = stride[0];
15647
Index: libgfortran/generated/transpose_r10.c
15648
===================================================================
15649
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
15650
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
15652
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15653
GFC_DESCRIPTOR_EXTENT(source, 1));
15655
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
15656
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15657
+ sizeof (GFC_REAL_10));
15659
} else if (unlikely (compile_options.bounds_check))
15661
Index: libgfortran/generated/maxloc1_16_r16.c
15662
===================================================================
15663
--- a/src/libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release)
15664
+++ b/src/libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch)
15666
retarray->offset = 0;
15667
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15669
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15670
- * extent[rank-1];
15671
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15673
- retarray->base_addr = xmalloc (alloc_size);
15674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15675
if (alloc_size == 0)
15677
/* Make sure we have a zero-sized array. */
15678
@@ -294,8 +293,7 @@
15682
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15683
- * extent[rank-1];
15684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15686
retarray->offset = 0;
15687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15688
@@ -307,7 +305,7 @@
15692
- retarray->base_addr = xmalloc (alloc_size);
15693
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15697
@@ -485,8 +483,7 @@
15698
retarray->offset = 0;
15699
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15701
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15702
- * extent[rank-1];
15703
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15705
if (alloc_size == 0)
15707
@@ -495,7 +492,7 @@
15711
- retarray->base_addr = xmalloc (alloc_size);
15712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15716
Index: libgfortran/generated/maxloc1_16_i4.c
15717
===================================================================
15718
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
15719
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
15721
retarray->offset = 0;
15722
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15724
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15725
- * extent[rank-1];
15726
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15728
- retarray->base_addr = xmalloc (alloc_size);
15729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15730
if (alloc_size == 0)
15732
/* Make sure we have a zero-sized array. */
15733
@@ -294,8 +293,7 @@
15737
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15738
- * extent[rank-1];
15739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15741
retarray->offset = 0;
15742
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15743
@@ -307,7 +305,7 @@
15747
- retarray->base_addr = xmalloc (alloc_size);
15748
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15752
@@ -485,8 +483,7 @@
15753
retarray->offset = 0;
15754
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15756
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15757
- * extent[rank-1];
15758
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15760
if (alloc_size == 0)
15762
@@ -495,7 +492,7 @@
15766
- retarray->base_addr = xmalloc (alloc_size);
15767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
15771
Index: libgfortran/generated/spread_i1.c
15772
===================================================================
15773
--- a/src/libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release)
15774
+++ b/src/libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch)
15775
@@ -101,8 +101,8 @@
15779
- /* xmalloc allocates a single byte for zero size. */
15780
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
15781
+ /* xmallocarray allocates a single byte for zero size. */
15782
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
15786
@@ -244,7 +244,7 @@
15788
if (ret->base_addr == NULL)
15790
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
15791
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
15793
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15795
Index: libgfortran/generated/maxloc0_16_i8.c
15796
===================================================================
15797
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
15798
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
15800
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15801
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15802
retarray->offset = 0;
15803
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15804
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15808
@@ -199,7 +199,7 @@
15809
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15810
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15811
retarray->offset = 0;
15812
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15813
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15817
@@ -367,7 +367,7 @@
15818
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15819
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15820
retarray->offset = 0;
15821
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
15822
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
15824
else if (unlikely (compile_options.bounds_check))
15826
Index: libgfortran/generated/maxval_r16.c
15827
===================================================================
15828
--- a/src/libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release)
15829
+++ b/src/libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch)
15831
retarray->offset = 0;
15832
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15834
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15835
- * extent[rank-1];
15836
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15838
- retarray->base_addr = xmalloc (alloc_size);
15839
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15840
if (alloc_size == 0)
15842
/* Make sure we have a zero-sized array. */
15843
@@ -286,8 +285,7 @@
15847
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15848
- * extent[rank-1];
15849
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15851
retarray->offset = 0;
15852
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15853
@@ -299,7 +297,7 @@
15857
- retarray->base_addr = xmalloc (alloc_size);
15858
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15862
@@ -472,8 +470,7 @@
15863
retarray->offset = 0;
15864
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15866
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15867
- * extent[rank-1];
15868
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15870
if (alloc_size == 0)
15872
@@ -482,7 +479,7 @@
15876
- retarray->base_addr = xmalloc (alloc_size);
15877
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
15881
Index: libgfortran/generated/product_c10.c
15882
===================================================================
15883
--- a/src/libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release)
15884
+++ b/src/libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch)
15886
retarray->offset = 0;
15887
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15889
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15890
- * extent[rank-1];
15891
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15893
- retarray->base_addr = xmalloc (alloc_size);
15894
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15895
if (alloc_size == 0)
15897
/* Make sure we have a zero-sized array. */
15898
@@ -272,8 +271,7 @@
15902
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15903
- * extent[rank-1];
15904
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15906
retarray->offset = 0;
15907
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15908
@@ -285,7 +283,7 @@
15912
- retarray->base_addr = xmalloc (alloc_size);
15913
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15917
@@ -430,8 +428,7 @@
15918
retarray->offset = 0;
15919
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15921
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15922
- * extent[rank-1];
15923
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15925
if (alloc_size == 0)
15927
@@ -440,7 +437,7 @@
15931
- retarray->base_addr = xmalloc (alloc_size);
15932
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
15936
Index: libgfortran/generated/minloc1_8_i4.c
15937
===================================================================
15938
--- a/src/libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release)
15939
+++ b/src/libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch)
15941
retarray->offset = 0;
15942
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15944
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15945
- * extent[rank-1];
15946
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15948
- retarray->base_addr = xmalloc (alloc_size);
15949
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15950
if (alloc_size == 0)
15952
/* Make sure we have a zero-sized array. */
15953
@@ -294,8 +293,7 @@
15957
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15958
- * extent[rank-1];
15959
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15961
retarray->offset = 0;
15962
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15963
@@ -307,7 +305,7 @@
15967
- retarray->base_addr = xmalloc (alloc_size);
15968
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15972
@@ -485,8 +483,7 @@
15973
retarray->offset = 0;
15974
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15976
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15977
- * extent[rank-1];
15978
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15980
if (alloc_size == 0)
15982
@@ -495,7 +492,7 @@
15986
- retarray->base_addr = xmalloc (alloc_size);
15987
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
15991
Index: libgfortran/generated/minloc0_16_i16.c
15992
===================================================================
15993
--- a/src/libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release)
15994
+++ b/src/libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch)
15996
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15997
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15998
retarray->offset = 0;
15999
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16000
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16004
@@ -199,7 +199,7 @@
16005
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16006
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16007
retarray->offset = 0;
16008
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16009
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16013
@@ -367,7 +367,7 @@
16014
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16015
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16016
retarray->offset = 0;
16017
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16018
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16020
else if (unlikely (compile_options.bounds_check))
16022
Index: libgfortran/generated/matmul_r16.c
16023
===================================================================
16024
--- a/src/libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release)
16025
+++ b/src/libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch)
16026
@@ -124,7 +124,7 @@
16029
retarray->base_addr
16030
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
16031
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
16032
retarray->offset = 0;
16034
else if (unlikely (compile_options.bounds_check))
16035
Index: libgfortran/generated/minloc0_4_r4.c
16036
===================================================================
16037
--- a/src/libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release)
16038
+++ b/src/libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch)
16040
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16041
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16042
retarray->offset = 0;
16043
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16044
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16048
@@ -199,7 +199,7 @@
16049
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16050
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16051
retarray->offset = 0;
16052
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16053
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16057
@@ -367,7 +367,7 @@
16058
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16059
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16060
retarray->offset = 0;
16061
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16062
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16064
else if (unlikely (compile_options.bounds_check))
16066
Index: libgfortran/generated/iany_i2.c
16067
===================================================================
16068
--- a/src/libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release)
16069
+++ b/src/libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch)
16071
retarray->offset = 0;
16072
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16074
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16075
- * extent[rank-1];
16076
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16078
- retarray->base_addr = xmalloc (alloc_size);
16079
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16080
if (alloc_size == 0)
16082
/* Make sure we have a zero-sized array. */
16083
@@ -272,8 +271,7 @@
16087
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16088
- * extent[rank-1];
16089
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16091
retarray->offset = 0;
16092
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16093
@@ -285,7 +283,7 @@
16097
- retarray->base_addr = xmalloc (alloc_size);
16098
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16102
@@ -430,8 +428,7 @@
16103
retarray->offset = 0;
16104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16106
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16107
- * extent[rank-1];
16108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16110
if (alloc_size == 0)
16112
@@ -440,7 +437,7 @@
16116
- retarray->base_addr = xmalloc (alloc_size);
16117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16121
Index: libgfortran/generated/sum_r4.c
16122
===================================================================
16123
--- a/src/libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release)
16124
+++ b/src/libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch)
16126
retarray->offset = 0;
16127
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16129
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16130
- * extent[rank-1];
16131
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16133
- retarray->base_addr = xmalloc (alloc_size);
16134
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16135
if (alloc_size == 0)
16137
/* Make sure we have a zero-sized array. */
16138
@@ -272,8 +271,7 @@
16142
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16143
- * extent[rank-1];
16144
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16146
retarray->offset = 0;
16147
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16148
@@ -285,7 +283,7 @@
16152
- retarray->base_addr = xmalloc (alloc_size);
16153
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16157
@@ -430,8 +428,7 @@
16158
retarray->offset = 0;
16159
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16161
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16162
- * extent[rank-1];
16163
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16165
if (alloc_size == 0)
16167
@@ -440,7 +437,7 @@
16171
- retarray->base_addr = xmalloc (alloc_size);
16172
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16176
Index: libgfortran/generated/unpack_c8.c
16177
===================================================================
16178
--- a/src/libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release)
16179
+++ b/src/libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch)
16184
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
16185
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
16189
@@ -244,7 +244,7 @@
16193
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
16194
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
16198
Index: libgfortran/generated/in_pack_c16.c
16199
===================================================================
16200
--- a/src/libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release)
16201
+++ b/src/libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch)
16203
return source->base_addr;
16205
/* Allocate storage for the destination. */
16206
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
16207
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
16209
src = source->base_addr;
16210
stride0 = stride[0];
16211
Index: libgfortran/generated/minloc0_4_i2.c
16212
===================================================================
16213
--- a/src/libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release)
16214
+++ b/src/libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch)
16216
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16217
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16218
retarray->offset = 0;
16219
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16220
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16224
@@ -199,7 +199,7 @@
16225
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16226
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16227
retarray->offset = 0;
16228
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16229
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16233
@@ -367,7 +367,7 @@
16234
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16235
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16236
retarray->offset = 0;
16237
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16238
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16240
else if (unlikely (compile_options.bounds_check))
16242
Index: libgfortran/generated/spread_c10.c
16243
===================================================================
16244
--- a/src/libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release)
16245
+++ b/src/libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch)
16246
@@ -101,8 +101,8 @@
16250
- /* xmalloc allocates a single byte for zero size. */
16251
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
16252
+ /* xmallocarray allocates a single byte for zero size. */
16253
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
16257
@@ -244,7 +244,7 @@
16259
if (ret->base_addr == NULL)
16261
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
16262
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
16264
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16266
Index: libgfortran/generated/maxloc0_8_i1.c
16267
===================================================================
16268
--- a/src/libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release)
16269
+++ b/src/libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch)
16271
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16272
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16273
retarray->offset = 0;
16274
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16275
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16279
@@ -199,7 +199,7 @@
16280
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16281
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16282
retarray->offset = 0;
16283
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16284
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16288
@@ -367,7 +367,7 @@
16289
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16290
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16291
retarray->offset = 0;
16292
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16293
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16295
else if (unlikely (compile_options.bounds_check))
16297
Index: libgfortran/generated/spread_r4.c
16298
===================================================================
16299
--- a/src/libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release)
16300
+++ b/src/libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch)
16301
@@ -101,8 +101,8 @@
16305
- /* xmalloc allocates a single byte for zero size. */
16306
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
16307
+ /* xmallocarray allocates a single byte for zero size. */
16308
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
16312
@@ -244,7 +244,7 @@
16314
if (ret->base_addr == NULL)
16316
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
16317
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
16319
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16321
Index: libgfortran/generated/minloc0_8_i8.c
16322
===================================================================
16323
--- a/src/libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release)
16324
+++ b/src/libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch)
16326
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16327
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16328
retarray->offset = 0;
16329
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16330
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16334
@@ -199,7 +199,7 @@
16335
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16336
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16337
retarray->offset = 0;
16338
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16339
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16343
@@ -367,7 +367,7 @@
16344
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16345
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16346
retarray->offset = 0;
16347
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16348
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16350
else if (unlikely (compile_options.bounds_check))
16352
Index: libgfortran/generated/matmul_c8.c
16353
===================================================================
16354
--- a/src/libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release)
16355
+++ b/src/libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch)
16356
@@ -124,7 +124,7 @@
16359
retarray->base_addr
16360
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
16361
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
16362
retarray->offset = 0;
16364
else if (unlikely (compile_options.bounds_check))
16365
Index: libgfortran/generated/minloc1_16_r10.c
16366
===================================================================
16367
--- a/src/libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release)
16368
+++ b/src/libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch)
16370
retarray->offset = 0;
16371
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16373
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16374
- * extent[rank-1];
16375
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16377
- retarray->base_addr = xmalloc (alloc_size);
16378
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16379
if (alloc_size == 0)
16381
/* Make sure we have a zero-sized array. */
16382
@@ -294,8 +293,7 @@
16386
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16387
- * extent[rank-1];
16388
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16390
retarray->offset = 0;
16391
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16392
@@ -307,7 +305,7 @@
16396
- retarray->base_addr = xmalloc (alloc_size);
16397
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16401
@@ -485,8 +483,7 @@
16402
retarray->offset = 0;
16403
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16405
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16406
- * extent[rank-1];
16407
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16409
if (alloc_size == 0)
16411
@@ -495,7 +492,7 @@
16415
- retarray->base_addr = xmalloc (alloc_size);
16416
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16420
Index: libgfortran/generated/sum_i2.c
16421
===================================================================
16422
--- a/src/libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release)
16423
+++ b/src/libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch)
16425
retarray->offset = 0;
16426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16428
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16429
- * extent[rank-1];
16430
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16432
- retarray->base_addr = xmalloc (alloc_size);
16433
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16434
if (alloc_size == 0)
16436
/* Make sure we have a zero-sized array. */
16437
@@ -272,8 +271,7 @@
16441
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16442
- * extent[rank-1];
16443
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16445
retarray->offset = 0;
16446
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16447
@@ -285,7 +283,7 @@
16451
- retarray->base_addr = xmalloc (alloc_size);
16452
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16456
@@ -430,8 +428,7 @@
16457
retarray->offset = 0;
16458
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16460
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16461
- * extent[rank-1];
16462
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16464
if (alloc_size == 0)
16466
@@ -440,7 +437,7 @@
16470
- retarray->base_addr = xmalloc (alloc_size);
16471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16475
Index: libgfortran/generated/iparity_i16.c
16476
===================================================================
16477
--- a/src/libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release)
16478
+++ b/src/libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch)
16480
retarray->offset = 0;
16481
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16483
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16484
- * extent[rank-1];
16485
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16487
- retarray->base_addr = xmalloc (alloc_size);
16488
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16489
if (alloc_size == 0)
16491
/* Make sure we have a zero-sized array. */
16492
@@ -272,8 +271,7 @@
16496
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16497
- * extent[rank-1];
16498
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16500
retarray->offset = 0;
16501
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16502
@@ -285,7 +283,7 @@
16506
- retarray->base_addr = xmalloc (alloc_size);
16507
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16511
@@ -430,8 +428,7 @@
16512
retarray->offset = 0;
16513
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16515
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16516
- * extent[rank-1];
16517
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16519
if (alloc_size == 0)
16521
@@ -440,7 +437,7 @@
16525
- retarray->base_addr = xmalloc (alloc_size);
16526
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16530
Index: libgfortran/generated/minloc0_16_i1.c
16531
===================================================================
16532
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
16533
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
16535
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16536
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16537
retarray->offset = 0;
16538
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16539
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16543
@@ -199,7 +199,7 @@
16544
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16545
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16546
retarray->offset = 0;
16547
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16548
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16552
@@ -367,7 +367,7 @@
16553
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16554
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16555
retarray->offset = 0;
16556
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16557
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16559
else if (unlikely (compile_options.bounds_check))
16561
Index: libgfortran/generated/reshape_c16.c
16562
===================================================================
16563
--- a/src/libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release)
16564
+++ b/src/libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch)
16565
@@ -111,11 +111,11 @@
16568
if (unlikely (rs < 1))
16572
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
16575
- ret->base_addr = xmalloc (alloc_size);
16576
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
16577
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16580
Index: libgfortran/generated/pack_c4.c
16581
===================================================================
16582
--- a/src/libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release)
16583
+++ b/src/libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch)
16584
@@ -167,8 +167,8 @@
16588
- /* xmalloc allocates a single byte for zero size. */
16589
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
16590
+ /* xmallocarray allocates a single byte for zero size. */
16591
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
16595
Index: libgfortran/generated/parity_l4.c
16596
===================================================================
16597
--- a/src/libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release)
16598
+++ b/src/libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch)
16600
retarray->offset = 0;
16601
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16603
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16604
- * extent[rank-1];
16605
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16607
- retarray->base_addr = xmalloc (alloc_size);
16608
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
16609
if (alloc_size == 0)
16611
/* Make sure we have a zero-sized array. */
16612
Index: libgfortran/generated/spread_i2.c
16613
===================================================================
16614
--- a/src/libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release)
16615
+++ b/src/libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch)
16616
@@ -101,8 +101,8 @@
16620
- /* xmalloc allocates a single byte for zero size. */
16621
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
16622
+ /* xmallocarray allocates a single byte for zero size. */
16623
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
16627
@@ -244,7 +244,7 @@
16629
if (ret->base_addr == NULL)
16631
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
16632
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
16634
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16636
Index: libgfortran/generated/any_l4.c
16637
===================================================================
16638
--- a/src/libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release)
16639
+++ b/src/libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch)
16640
@@ -101,8 +101,7 @@
16641
retarray->offset = 0;
16642
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16644
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16645
- * extent[rank-1];
16646
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16648
if (alloc_size == 0)
16650
@@ -111,7 +110,7 @@
16654
- retarray->base_addr = xmalloc (alloc_size);
16655
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
16659
Index: libgfortran/generated/maxloc1_4_i8.c
16660
===================================================================
16661
--- a/src/libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release)
16662
+++ b/src/libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch)
16664
retarray->offset = 0;
16665
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16667
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16668
- * extent[rank-1];
16669
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16671
- retarray->base_addr = xmalloc (alloc_size);
16672
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16673
if (alloc_size == 0)
16675
/* Make sure we have a zero-sized array. */
16676
@@ -294,8 +293,7 @@
16680
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16681
- * extent[rank-1];
16682
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16684
retarray->offset = 0;
16685
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16686
@@ -307,7 +305,7 @@
16690
- retarray->base_addr = xmalloc (alloc_size);
16691
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16695
@@ -485,8 +483,7 @@
16696
retarray->offset = 0;
16697
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16699
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16700
- * extent[rank-1];
16701
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16703
if (alloc_size == 0)
16705
@@ -495,7 +492,7 @@
16709
- retarray->base_addr = xmalloc (alloc_size);
16710
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16714
Index: libgfortran/generated/maxloc0_8_r4.c
16715
===================================================================
16716
--- a/src/libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release)
16717
+++ b/src/libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch)
16719
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16720
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16721
retarray->offset = 0;
16722
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16723
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16727
@@ -199,7 +199,7 @@
16728
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16729
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16730
retarray->offset = 0;
16731
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16732
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16736
@@ -367,7 +367,7 @@
16737
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16738
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16739
retarray->offset = 0;
16740
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16741
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16743
else if (unlikely (compile_options.bounds_check))
16745
Index: libgfortran/generated/maxloc1_4_i16.c
16746
===================================================================
16747
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
16748
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
16750
retarray->offset = 0;
16751
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16753
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16754
- * extent[rank-1];
16755
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16757
- retarray->base_addr = xmalloc (alloc_size);
16758
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16759
if (alloc_size == 0)
16761
/* Make sure we have a zero-sized array. */
16762
@@ -294,8 +293,7 @@
16766
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16767
- * extent[rank-1];
16768
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16770
retarray->offset = 0;
16771
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16772
@@ -307,7 +305,7 @@
16776
- retarray->base_addr = xmalloc (alloc_size);
16777
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16781
@@ -485,8 +483,7 @@
16782
retarray->offset = 0;
16783
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16785
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16786
- * extent[rank-1];
16787
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16789
if (alloc_size == 0)
16791
@@ -495,7 +492,7 @@
16795
- retarray->base_addr = xmalloc (alloc_size);
16796
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16800
Index: libgfortran/generated/minloc0_4_r10.c
16801
===================================================================
16802
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
16803
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
16805
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16806
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16807
retarray->offset = 0;
16808
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16809
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16813
@@ -199,7 +199,7 @@
16814
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16815
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16816
retarray->offset = 0;
16817
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16818
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16822
@@ -367,7 +367,7 @@
16823
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16824
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16825
retarray->offset = 0;
16826
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16827
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16829
else if (unlikely (compile_options.bounds_check))
16831
Index: libgfortran/generated/minloc0_8_i16.c
16832
===================================================================
16833
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
16834
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
16836
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16837
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16838
retarray->offset = 0;
16839
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16840
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16844
@@ -199,7 +199,7 @@
16845
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16846
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16847
retarray->offset = 0;
16848
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16849
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16853
@@ -367,7 +367,7 @@
16854
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16855
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16856
retarray->offset = 0;
16857
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
16858
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
16860
else if (unlikely (compile_options.bounds_check))
16862
Index: libgfortran/generated/minloc1_8_r10.c
16863
===================================================================
16864
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
16865
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
16867
retarray->offset = 0;
16868
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16870
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16871
- * extent[rank-1];
16872
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16874
- retarray->base_addr = xmalloc (alloc_size);
16875
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16876
if (alloc_size == 0)
16878
/* Make sure we have a zero-sized array. */
16879
@@ -294,8 +293,7 @@
16883
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16884
- * extent[rank-1];
16885
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16887
retarray->offset = 0;
16888
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16889
@@ -307,7 +305,7 @@
16893
- retarray->base_addr = xmalloc (alloc_size);
16894
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16898
@@ -485,8 +483,7 @@
16899
retarray->offset = 0;
16900
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16902
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16903
- * extent[rank-1];
16904
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16906
if (alloc_size == 0)
16908
@@ -495,7 +492,7 @@
16912
- retarray->base_addr = xmalloc (alloc_size);
16913
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16917
Index: libgfortran/generated/minloc0_16_r4.c
16918
===================================================================
16919
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
16920
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
16922
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16923
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16924
retarray->offset = 0;
16925
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16926
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16930
@@ -199,7 +199,7 @@
16931
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16932
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16933
retarray->offset = 0;
16934
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16935
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16939
@@ -367,7 +367,7 @@
16940
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16941
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16942
retarray->offset = 0;
16943
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16944
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16946
else if (unlikely (compile_options.bounds_check))
16948
Index: libgfortran/generated/product_i4.c
16949
===================================================================
16950
--- a/src/libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release)
16951
+++ b/src/libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch)
16953
retarray->offset = 0;
16954
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16956
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16957
- * extent[rank-1];
16958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16960
- retarray->base_addr = xmalloc (alloc_size);
16961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16962
if (alloc_size == 0)
16964
/* Make sure we have a zero-sized array. */
16965
@@ -272,8 +271,7 @@
16969
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16970
- * extent[rank-1];
16971
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16973
retarray->offset = 0;
16974
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16975
@@ -285,7 +283,7 @@
16979
- retarray->base_addr = xmalloc (alloc_size);
16980
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16984
@@ -430,8 +428,7 @@
16985
retarray->offset = 0;
16986
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16988
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16989
- * extent[rank-1];
16990
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16992
if (alloc_size == 0)
16994
@@ -440,7 +437,7 @@
16998
- retarray->base_addr = xmalloc (alloc_size);
16999
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17003
Index: libgfortran/generated/sum_c16.c
17004
===================================================================
17005
--- a/src/libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release)
17006
+++ b/src/libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch)
17008
retarray->offset = 0;
17009
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17011
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17012
- * extent[rank-1];
17013
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17015
- retarray->base_addr = xmalloc (alloc_size);
17016
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17017
if (alloc_size == 0)
17019
/* Make sure we have a zero-sized array. */
17020
@@ -272,8 +271,7 @@
17024
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17025
- * extent[rank-1];
17026
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17028
retarray->offset = 0;
17029
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17030
@@ -285,7 +283,7 @@
17034
- retarray->base_addr = xmalloc (alloc_size);
17035
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17039
@@ -430,8 +428,7 @@
17040
retarray->offset = 0;
17041
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17043
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17044
- * extent[rank-1];
17045
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17047
if (alloc_size == 0)
17049
@@ -440,7 +437,7 @@
17053
- retarray->base_addr = xmalloc (alloc_size);
17054
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17058
Index: libgfortran/generated/transpose_c10.c
17059
===================================================================
17060
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
17061
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
17063
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17064
GFC_DESCRIPTOR_EXTENT(source, 1));
17066
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
17067
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17068
+ sizeof (GFC_COMPLEX_10));
17070
} else if (unlikely (compile_options.bounds_check))
17072
Index: libgfortran/generated/maxloc1_16_r8.c
17073
===================================================================
17074
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
17075
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
17077
retarray->offset = 0;
17078
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17080
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17081
- * extent[rank-1];
17082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17084
- retarray->base_addr = xmalloc (alloc_size);
17085
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17086
if (alloc_size == 0)
17088
/* Make sure we have a zero-sized array. */
17089
@@ -294,8 +293,7 @@
17093
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17094
- * extent[rank-1];
17095
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17097
retarray->offset = 0;
17098
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17099
@@ -307,7 +305,7 @@
17103
- retarray->base_addr = xmalloc (alloc_size);
17104
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17108
@@ -485,8 +483,7 @@
17109
retarray->offset = 0;
17110
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17112
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17113
- * extent[rank-1];
17114
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17116
if (alloc_size == 0)
17118
@@ -495,7 +492,7 @@
17122
- retarray->base_addr = xmalloc (alloc_size);
17123
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17127
Index: libgfortran/generated/transpose_r4.c
17128
===================================================================
17129
--- a/src/libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release)
17130
+++ b/src/libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch)
17132
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17133
GFC_DESCRIPTOR_EXTENT(source, 1));
17135
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
17136
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17137
+ sizeof (GFC_REAL_4));
17139
} else if (unlikely (compile_options.bounds_check))
17141
Index: libgfortran/generated/cshift1_4.c
17142
===================================================================
17143
--- a/src/libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release)
17144
+++ b/src/libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch)
17149
- ret->base_addr = xmalloc (size * arraysize);
17150
+ ret->base_addr = xmallocarray (arraysize, size);
17152
ret->dtype = array->dtype;
17153
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17154
Index: libgfortran/generated/maxloc0_8_i2.c
17155
===================================================================
17156
--- a/src/libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release)
17157
+++ b/src/libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch)
17159
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17160
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17161
retarray->offset = 0;
17162
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17163
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17167
@@ -199,7 +199,7 @@
17168
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17169
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17170
retarray->offset = 0;
17171
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17172
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17176
@@ -367,7 +367,7 @@
17177
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17178
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17179
retarray->offset = 0;
17180
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17181
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17183
else if (unlikely (compile_options.bounds_check))
17185
Index: libgfortran/generated/count_8_l.c
17186
===================================================================
17187
--- a/src/libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release)
17188
+++ b/src/libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch)
17189
@@ -101,8 +101,7 @@
17190
retarray->offset = 0;
17191
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17193
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17194
- * extent[rank-1];
17195
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17197
if (alloc_size == 0)
17199
@@ -111,7 +110,7 @@
17203
- retarray->base_addr = xmalloc (alloc_size);
17204
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17208
Index: libgfortran/generated/in_pack_i4.c
17209
===================================================================
17210
--- a/src/libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release)
17211
+++ b/src/libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch)
17213
return source->base_addr;
17215
/* Allocate storage for the destination. */
17216
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
17217
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
17219
src = source->base_addr;
17220
stride0 = stride[0];
17221
Index: libgfortran/generated/minloc0_16_i2.c
17222
===================================================================
17223
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
17224
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
17226
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17227
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17228
retarray->offset = 0;
17229
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17230
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17234
@@ -199,7 +199,7 @@
17235
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17236
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17237
retarray->offset = 0;
17238
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17239
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17243
@@ -367,7 +367,7 @@
17244
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17245
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17246
retarray->offset = 0;
17247
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17248
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17250
else if (unlikely (compile_options.bounds_check))
17252
Index: libgfortran/generated/minloc1_8_r8.c
17253
===================================================================
17254
--- a/src/libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release)
17255
+++ b/src/libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch)
17257
retarray->offset = 0;
17258
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17260
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17261
- * extent[rank-1];
17262
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17264
- retarray->base_addr = xmalloc (alloc_size);
17265
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17266
if (alloc_size == 0)
17268
/* Make sure we have a zero-sized array. */
17269
@@ -294,8 +293,7 @@
17273
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17274
- * extent[rank-1];
17275
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17277
retarray->offset = 0;
17278
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17279
@@ -307,7 +305,7 @@
17283
- retarray->base_addr = xmalloc (alloc_size);
17284
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17288
@@ -485,8 +483,7 @@
17289
retarray->offset = 0;
17290
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17292
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17293
- * extent[rank-1];
17294
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17296
if (alloc_size == 0)
17298
@@ -495,7 +492,7 @@
17302
- retarray->base_addr = xmalloc (alloc_size);
17303
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17307
Index: libgfortran/generated/matmul_c16.c
17308
===================================================================
17309
--- a/src/libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release)
17310
+++ b/src/libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch)
17311
@@ -124,7 +124,7 @@
17314
retarray->base_addr
17315
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
17316
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
17317
retarray->offset = 0;
17319
else if (unlikely (compile_options.bounds_check))
17320
Index: libgfortran/generated/minval_i1.c
17321
===================================================================
17322
--- a/src/libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release)
17323
+++ b/src/libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch)
17325
retarray->offset = 0;
17326
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17328
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17329
- * extent[rank-1];
17330
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17332
- retarray->base_addr = xmalloc (alloc_size);
17333
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17334
if (alloc_size == 0)
17336
/* Make sure we have a zero-sized array. */
17337
@@ -286,8 +285,7 @@
17341
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17342
- * extent[rank-1];
17343
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17345
retarray->offset = 0;
17346
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17347
@@ -299,7 +297,7 @@
17351
- retarray->base_addr = xmalloc (alloc_size);
17352
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17356
@@ -472,8 +470,7 @@
17357
retarray->offset = 0;
17358
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17360
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17361
- * extent[rank-1];
17362
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17364
if (alloc_size == 0)
17366
@@ -482,7 +479,7 @@
17370
- retarray->base_addr = xmalloc (alloc_size);
17371
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17375
Index: libgfortran/generated/shape_i16.c
17376
===================================================================
17377
--- a/src/libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release)
17378
+++ b/src/libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch)
17381
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
17383
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17384
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17387
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
17388
Index: libgfortran/generated/iany_i4.c
17389
===================================================================
17390
--- a/src/libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release)
17391
+++ b/src/libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch)
17393
retarray->offset = 0;
17394
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17396
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17397
- * extent[rank-1];
17398
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17400
- retarray->base_addr = xmalloc (alloc_size);
17401
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17402
if (alloc_size == 0)
17404
/* Make sure we have a zero-sized array. */
17405
@@ -272,8 +271,7 @@
17409
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17410
- * extent[rank-1];
17411
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17413
retarray->offset = 0;
17414
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17415
@@ -285,7 +283,7 @@
17419
- retarray->base_addr = xmalloc (alloc_size);
17420
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17424
@@ -430,8 +428,7 @@
17425
retarray->offset = 0;
17426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17428
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17429
- * extent[rank-1];
17430
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17432
if (alloc_size == 0)
17434
@@ -440,7 +437,7 @@
17438
- retarray->base_addr = xmalloc (alloc_size);
17439
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17443
Index: libgfortran/generated/minloc0_16_r16.c
17444
===================================================================
17445
--- a/src/libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release)
17446
+++ b/src/libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch)
17448
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17449
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17450
retarray->offset = 0;
17451
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17452
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17456
@@ -199,7 +199,7 @@
17457
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17458
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17459
retarray->offset = 0;
17460
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17461
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17465
@@ -367,7 +367,7 @@
17466
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17467
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17468
retarray->offset = 0;
17469
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17470
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17472
else if (unlikely (compile_options.bounds_check))
17474
Index: libgfortran/generated/product_i16.c
17475
===================================================================
17476
--- a/src/libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release)
17477
+++ b/src/libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch)
17479
retarray->offset = 0;
17480
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17482
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17483
- * extent[rank-1];
17484
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17486
- retarray->base_addr = xmalloc (alloc_size);
17487
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17488
if (alloc_size == 0)
17490
/* Make sure we have a zero-sized array. */
17491
@@ -272,8 +271,7 @@
17495
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17496
- * extent[rank-1];
17497
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17499
retarray->offset = 0;
17500
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17501
@@ -285,7 +283,7 @@
17505
- retarray->base_addr = xmalloc (alloc_size);
17506
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17510
@@ -430,8 +428,7 @@
17511
retarray->offset = 0;
17512
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17514
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17515
- * extent[rank-1];
17516
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17518
if (alloc_size == 0)
17520
@@ -440,7 +437,7 @@
17524
- retarray->base_addr = xmalloc (alloc_size);
17525
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17529
Index: libgfortran/generated/unpack_i1.c
17530
===================================================================
17531
--- a/src/libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release)
17532
+++ b/src/libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch)
17537
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
17538
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
17542
@@ -244,7 +244,7 @@
17546
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
17547
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
17551
Index: libgfortran/generated/minloc0_4_i4.c
17552
===================================================================
17553
--- a/src/libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release)
17554
+++ b/src/libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch)
17556
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17557
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17558
retarray->offset = 0;
17559
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17560
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17564
@@ -199,7 +199,7 @@
17565
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17566
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17567
retarray->offset = 0;
17568
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17569
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17573
@@ -367,7 +367,7 @@
17574
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17575
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17576
retarray->offset = 0;
17577
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17578
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17580
else if (unlikely (compile_options.bounds_check))
17582
Index: libgfortran/generated/matmul_i1.c
17583
===================================================================
17584
--- a/src/libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release)
17585
+++ b/src/libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch)
17586
@@ -124,7 +124,7 @@
17589
retarray->base_addr
17590
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
17591
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
17592
retarray->offset = 0;
17594
else if (unlikely (compile_options.bounds_check))
17595
Index: libgfortran/generated/minval_r4.c
17596
===================================================================
17597
--- a/src/libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release)
17598
+++ b/src/libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch)
17600
retarray->offset = 0;
17601
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17603
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17604
- * extent[rank-1];
17605
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17607
- retarray->base_addr = xmalloc (alloc_size);
17608
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17609
if (alloc_size == 0)
17611
/* Make sure we have a zero-sized array. */
17612
@@ -286,8 +285,7 @@
17616
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17617
- * extent[rank-1];
17618
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17620
retarray->offset = 0;
17621
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17622
@@ -299,7 +297,7 @@
17626
- retarray->base_addr = xmalloc (alloc_size);
17627
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17631
@@ -472,8 +470,7 @@
17632
retarray->offset = 0;
17633
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17635
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17636
- * extent[rank-1];
17637
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17639
if (alloc_size == 0)
17641
@@ -482,7 +479,7 @@
17645
- retarray->base_addr = xmalloc (alloc_size);
17646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17650
Index: libgfortran/generated/spread_i16.c
17651
===================================================================
17652
--- a/src/libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release)
17653
+++ b/src/libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch)
17654
@@ -101,8 +101,8 @@
17658
- /* xmalloc allocates a single byte for zero size. */
17659
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
17660
+ /* xmallocarray allocates a single byte for zero size. */
17661
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
17665
@@ -244,7 +244,7 @@
17667
if (ret->base_addr == NULL)
17669
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
17670
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
17672
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17674
Index: libgfortran/generated/sum_i4.c
17675
===================================================================
17676
--- a/src/libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release)
17677
+++ b/src/libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch)
17679
retarray->offset = 0;
17680
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17682
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17683
- * extent[rank-1];
17684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17686
- retarray->base_addr = xmalloc (alloc_size);
17687
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17688
if (alloc_size == 0)
17690
/* Make sure we have a zero-sized array. */
17691
@@ -272,8 +271,7 @@
17695
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17696
- * extent[rank-1];
17697
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17699
retarray->offset = 0;
17700
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17701
@@ -285,7 +283,7 @@
17705
- retarray->base_addr = xmalloc (alloc_size);
17706
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17710
@@ -430,8 +428,7 @@
17711
retarray->offset = 0;
17712
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17714
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17715
- * extent[rank-1];
17716
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17718
if (alloc_size == 0)
17720
@@ -440,7 +437,7 @@
17724
- retarray->base_addr = xmalloc (alloc_size);
17725
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17729
Index: libgfortran/generated/unpack_r10.c
17730
===================================================================
17731
--- a/src/libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release)
17732
+++ b/src/libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch)
17737
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
17738
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
17742
@@ -244,7 +244,7 @@
17746
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
17747
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
17751
Index: libgfortran/generated/bessel_r16.c
17752
===================================================================
17753
--- a/src/libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release)
17754
+++ b/src/libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch)
17757
size_t size = n2 < n1 ? 0 : n2-n1+1;
17758
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17759
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
17760
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
17764
@@ -126,7 +126,7 @@
17766
size_t size = n2 < n1 ? 0 : n2-n1+1;
17767
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17768
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
17769
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
17773
@@ -166,7 +166,7 @@
17775
x2rev = GFC_REAL_16_LITERAL(2.)/x;
17777
- for (i = 2; i <= n1+n2; i++)
17778
+ for (i = 2; i <= n2 - n1; i++)
17780
#if defined(GFC_REAL_16_INFINITY)
17781
if (unlikely (last2 == -GFC_REAL_16_INFINITY))
17782
Index: libgfortran/generated/norm2_r8.c
17783
===================================================================
17784
--- a/src/libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release)
17785
+++ b/src/libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch)
17786
@@ -101,10 +101,9 @@
17787
retarray->offset = 0;
17788
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17790
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17791
- * extent[rank-1];
17792
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17794
- retarray->base_addr = xmalloc (alloc_size);
17795
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
17796
if (alloc_size == 0)
17798
/* Make sure we have a zero-sized array. */
17799
Index: libgfortran/generated/spread_i4.c
17800
===================================================================
17801
--- a/src/libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release)
17802
+++ b/src/libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch)
17803
@@ -101,8 +101,8 @@
17807
- /* xmalloc allocates a single byte for zero size. */
17808
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
17809
+ /* xmallocarray allocates a single byte for zero size. */
17810
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
17814
@@ -244,7 +244,7 @@
17816
if (ret->base_addr == NULL)
17818
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
17819
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
17821
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17823
Index: libgfortran/generated/eoshift3_8.c
17824
===================================================================
17825
--- a/src/libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release)
17826
+++ b/src/libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch)
17831
- ret->base_addr = xmalloc (size * arraysize);
17832
+ ret->base_addr = xmallocarray (arraysize, size);
17834
ret->dtype = array->dtype;
17835
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17836
@@ -107,8 +107,8 @@
17837
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17840
- /* xmalloc allocates a single byte for zero size. */
17841
- ret->base_addr = xmalloc (size * arraysize);
17842
+ /* xmallocarray allocates a single byte for zero size. */
17843
+ ret->base_addr = xmallocarray (arraysize, size);
17846
else if (unlikely (compile_options.bounds_check))
17847
Index: libgfortran/generated/minloc1_4_i1.c
17848
===================================================================
17849
--- a/src/libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release)
17850
+++ b/src/libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch)
17852
retarray->offset = 0;
17853
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17855
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17856
- * extent[rank-1];
17857
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17859
- retarray->base_addr = xmalloc (alloc_size);
17860
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17861
if (alloc_size == 0)
17863
/* Make sure we have a zero-sized array. */
17864
@@ -294,8 +293,7 @@
17868
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17869
- * extent[rank-1];
17870
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17872
retarray->offset = 0;
17873
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17874
@@ -307,7 +305,7 @@
17878
- retarray->base_addr = xmalloc (alloc_size);
17879
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17883
@@ -485,8 +483,7 @@
17884
retarray->offset = 0;
17885
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17887
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17888
- * extent[rank-1];
17889
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17891
if (alloc_size == 0)
17893
@@ -495,7 +492,7 @@
17897
- retarray->base_addr = xmalloc (alloc_size);
17898
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17902
Index: libgfortran/generated/minval_i2.c
17903
===================================================================
17904
--- a/src/libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release)
17905
+++ b/src/libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch)
17907
retarray->offset = 0;
17908
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17910
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17911
- * extent[rank-1];
17912
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17914
- retarray->base_addr = xmalloc (alloc_size);
17915
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17916
if (alloc_size == 0)
17918
/* Make sure we have a zero-sized array. */
17919
@@ -286,8 +285,7 @@
17923
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17924
- * extent[rank-1];
17925
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17927
retarray->offset = 0;
17928
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17929
@@ -299,7 +297,7 @@
17933
- retarray->base_addr = xmalloc (alloc_size);
17934
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17938
@@ -472,8 +470,7 @@
17939
retarray->offset = 0;
17940
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17942
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17943
- * extent[rank-1];
17944
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17946
if (alloc_size == 0)
17948
@@ -482,7 +479,7 @@
17952
- retarray->base_addr = xmalloc (alloc_size);
17953
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17957
Index: libgfortran/generated/bessel_r8.c
17958
===================================================================
17959
--- a/src/libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release)
17960
+++ b/src/libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch)
17963
size_t size = n2 < n1 ? 0 : n2-n1+1;
17964
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17965
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
17966
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
17970
@@ -122,7 +122,7 @@
17972
size_t size = n2 < n1 ? 0 : n2-n1+1;
17973
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17974
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
17975
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
17979
@@ -162,7 +162,7 @@
17981
x2rev = GFC_REAL_8_LITERAL(2.)/x;
17983
- for (i = 2; i <= n1+n2; i++)
17984
+ for (i = 2; i <= n2 - n1; i++)
17986
#if defined(GFC_REAL_8_INFINITY)
17987
if (unlikely (last2 == -GFC_REAL_8_INFINITY))
17988
Index: libgfortran/generated/unpack_r4.c
17989
===================================================================
17990
--- a/src/libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release)
17991
+++ b/src/libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch)
17996
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
17997
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
18001
@@ -244,7 +244,7 @@
18005
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
18006
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
18010
Index: libgfortran/generated/product_r8.c
18011
===================================================================
18012
--- a/src/libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release)
18013
+++ b/src/libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch)
18015
retarray->offset = 0;
18016
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18018
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18019
- * extent[rank-1];
18020
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18022
- retarray->base_addr = xmalloc (alloc_size);
18023
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18024
if (alloc_size == 0)
18026
/* Make sure we have a zero-sized array. */
18027
@@ -272,8 +271,7 @@
18031
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18032
- * extent[rank-1];
18033
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18035
retarray->offset = 0;
18036
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18037
@@ -285,7 +283,7 @@
18041
- retarray->base_addr = xmalloc (alloc_size);
18042
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18046
@@ -430,8 +428,7 @@
18047
retarray->offset = 0;
18048
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18050
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18051
- * extent[rank-1];
18052
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18054
if (alloc_size == 0)
18056
@@ -440,7 +437,7 @@
18060
- retarray->base_addr = xmalloc (alloc_size);
18061
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18065
Index: libgfortran/generated/matmul_r4.c
18066
===================================================================
18067
--- a/src/libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release)
18068
+++ b/src/libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch)
18069
@@ -124,7 +124,7 @@
18072
retarray->base_addr
18073
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
18074
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
18075
retarray->offset = 0;
18077
else if (unlikely (compile_options.bounds_check))
18078
Index: libgfortran/generated/unpack_i2.c
18079
===================================================================
18080
--- a/src/libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release)
18081
+++ b/src/libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch)
18086
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
18087
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
18091
@@ -244,7 +244,7 @@
18095
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
18096
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
18100
Index: libgfortran/generated/in_pack_r8.c
18101
===================================================================
18102
--- a/src/libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release)
18103
+++ b/src/libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch)
18105
return source->base_addr;
18107
/* Allocate storage for the destination. */
18108
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
18109
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
18111
src = source->base_addr;
18112
stride0 = stride[0];
18113
Index: libgfortran/generated/maxloc1_4_r16.c
18114
===================================================================
18115
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
18116
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
18118
retarray->offset = 0;
18119
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18121
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18122
- * extent[rank-1];
18123
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18125
- retarray->base_addr = xmalloc (alloc_size);
18126
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18127
if (alloc_size == 0)
18129
/* Make sure we have a zero-sized array. */
18130
@@ -294,8 +293,7 @@
18134
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18135
- * extent[rank-1];
18136
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18138
retarray->offset = 0;
18139
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18140
@@ -307,7 +305,7 @@
18144
- retarray->base_addr = xmalloc (alloc_size);
18145
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18149
@@ -485,8 +483,7 @@
18150
retarray->offset = 0;
18151
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18153
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18154
- * extent[rank-1];
18155
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18157
if (alloc_size == 0)
18159
@@ -495,7 +492,7 @@
18163
- retarray->base_addr = xmalloc (alloc_size);
18164
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18168
Index: libgfortran/generated/minloc0_8_r16.c
18169
===================================================================
18170
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
18171
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
18173
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18174
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18175
retarray->offset = 0;
18176
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18177
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18181
@@ -199,7 +199,7 @@
18182
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18183
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18184
retarray->offset = 0;
18185
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18186
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18190
@@ -367,7 +367,7 @@
18191
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18192
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18193
retarray->offset = 0;
18194
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18195
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18197
else if (unlikely (compile_options.bounds_check))
18199
Index: libgfortran/generated/reshape_c8.c
18200
===================================================================
18201
--- a/src/libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release)
18202
+++ b/src/libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch)
18203
@@ -111,11 +111,11 @@
18206
if (unlikely (rs < 1))
18210
- alloc_size = rs * sizeof (GFC_COMPLEX_8);
18213
- ret->base_addr = xmalloc (alloc_size);
18214
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
18215
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18218
Index: libgfortran/generated/iparity_i8.c
18219
===================================================================
18220
--- a/src/libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release)
18221
+++ b/src/libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch)
18223
retarray->offset = 0;
18224
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18226
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18227
- * extent[rank-1];
18228
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18230
- retarray->base_addr = xmalloc (alloc_size);
18231
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18232
if (alloc_size == 0)
18234
/* Make sure we have a zero-sized array. */
18235
@@ -272,8 +271,7 @@
18239
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18240
- * extent[rank-1];
18241
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18243
retarray->offset = 0;
18244
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18245
@@ -285,7 +283,7 @@
18249
- retarray->base_addr = xmalloc (alloc_size);
18250
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18254
@@ -430,8 +428,7 @@
18255
retarray->offset = 0;
18256
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18258
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18259
- * extent[rank-1];
18260
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18262
if (alloc_size == 0)
18264
@@ -440,7 +437,7 @@
18268
- retarray->base_addr = xmalloc (alloc_size);
18269
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18273
Index: libgfortran/generated/count_1_l.c
18274
===================================================================
18275
--- a/src/libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release)
18276
+++ b/src/libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch)
18277
@@ -101,8 +101,7 @@
18278
retarray->offset = 0;
18279
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18281
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18282
- * extent[rank-1];
18283
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18285
if (alloc_size == 0)
18287
@@ -111,7 +110,7 @@
18291
- retarray->base_addr = xmalloc (alloc_size);
18292
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18296
Index: libgfortran/generated/maxloc0_8_i4.c
18297
===================================================================
18298
--- a/src/libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release)
18299
+++ b/src/libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch)
18301
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18302
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18303
retarray->offset = 0;
18304
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18305
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18309
@@ -199,7 +199,7 @@
18310
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18311
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18312
retarray->offset = 0;
18313
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18314
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18318
@@ -367,7 +367,7 @@
18319
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18320
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18321
retarray->offset = 0;
18322
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18323
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18325
else if (unlikely (compile_options.bounds_check))
18327
Index: libgfortran/generated/matmul_i2.c
18328
===================================================================
18329
--- a/src/libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release)
18330
+++ b/src/libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch)
18331
@@ -124,7 +124,7 @@
18334
retarray->base_addr
18335
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
18336
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
18337
retarray->offset = 0;
18339
else if (unlikely (compile_options.bounds_check))
18340
Index: libgfortran/generated/minloc1_4_r4.c
18341
===================================================================
18342
--- a/src/libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release)
18343
+++ b/src/libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch)
18345
retarray->offset = 0;
18346
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18348
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18349
- * extent[rank-1];
18350
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18352
- retarray->base_addr = xmalloc (alloc_size);
18353
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18354
if (alloc_size == 0)
18356
/* Make sure we have a zero-sized array. */
18357
@@ -294,8 +293,7 @@
18361
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18362
- * extent[rank-1];
18363
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18365
retarray->offset = 0;
18366
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18367
@@ -307,7 +305,7 @@
18371
- retarray->base_addr = xmalloc (alloc_size);
18372
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18376
@@ -485,8 +483,7 @@
18377
retarray->offset = 0;
18378
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18380
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18381
- * extent[rank-1];
18382
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18384
if (alloc_size == 0)
18386
@@ -495,7 +492,7 @@
18390
- retarray->base_addr = xmalloc (alloc_size);
18391
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18395
Index: libgfortran/generated/transpose_i16.c
18396
===================================================================
18397
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
18398
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
18400
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18401
GFC_DESCRIPTOR_EXTENT(source, 1));
18403
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
18404
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18405
+ sizeof (GFC_INTEGER_16));
18407
} else if (unlikely (compile_options.bounds_check))
18409
Index: libgfortran/generated/minloc0_16_i4.c
18410
===================================================================
18411
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
18412
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
18414
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18415
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18416
retarray->offset = 0;
18417
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18418
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18422
@@ -199,7 +199,7 @@
18423
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18424
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18425
retarray->offset = 0;
18426
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18427
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18431
@@ -367,7 +367,7 @@
18432
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18433
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18434
retarray->offset = 0;
18435
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18436
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18438
else if (unlikely (compile_options.bounds_check))
18440
Index: libgfortran/generated/transpose_i4.c
18441
===================================================================
18442
--- a/src/libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release)
18443
+++ b/src/libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch)
18445
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18446
GFC_DESCRIPTOR_EXTENT(source, 1));
18448
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
18449
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18450
+ sizeof (GFC_INTEGER_4));
18452
} else if (unlikely (compile_options.bounds_check))
18454
Index: libgfortran/generated/maxloc1_16_i8.c
18455
===================================================================
18456
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
18457
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
18459
retarray->offset = 0;
18460
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18462
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18463
- * extent[rank-1];
18464
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18466
- retarray->base_addr = xmalloc (alloc_size);
18467
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18468
if (alloc_size == 0)
18470
/* Make sure we have a zero-sized array. */
18471
@@ -294,8 +293,7 @@
18475
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18476
- * extent[rank-1];
18477
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18479
retarray->offset = 0;
18480
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18481
@@ -307,7 +305,7 @@
18485
- retarray->base_addr = xmalloc (alloc_size);
18486
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18490
@@ -485,8 +483,7 @@
18491
retarray->offset = 0;
18492
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18494
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18495
- * extent[rank-1];
18496
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18498
if (alloc_size == 0)
18500
@@ -495,7 +492,7 @@
18504
- retarray->base_addr = xmalloc (alloc_size);
18505
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18509
Index: libgfortran/generated/minloc1_4_i2.c
18510
===================================================================
18511
--- a/src/libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release)
18512
+++ b/src/libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch)
18514
retarray->offset = 0;
18515
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18517
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18518
- * extent[rank-1];
18519
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18521
- retarray->base_addr = xmalloc (alloc_size);
18522
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18523
if (alloc_size == 0)
18525
/* Make sure we have a zero-sized array. */
18526
@@ -294,8 +293,7 @@
18530
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18531
- * extent[rank-1];
18532
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18534
retarray->offset = 0;
18535
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18536
@@ -307,7 +305,7 @@
18540
- retarray->base_addr = xmalloc (alloc_size);
18541
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18545
@@ -485,8 +483,7 @@
18546
retarray->offset = 0;
18547
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18549
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18550
- * extent[rank-1];
18551
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18553
if (alloc_size == 0)
18555
@@ -495,7 +492,7 @@
18559
- retarray->base_addr = xmalloc (alloc_size);
18560
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18564
Index: libgfortran/generated/matmul_l16.c
18565
===================================================================
18566
--- a/src/libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release)
18567
+++ b/src/libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch)
18571
retarray->base_addr
18572
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
18573
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
18574
retarray->offset = 0;
18576
else if (unlikely (compile_options.bounds_check))
18577
Index: libgfortran/generated/maxloc1_8_i1.c
18578
===================================================================
18579
--- a/src/libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release)
18580
+++ b/src/libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch)
18582
retarray->offset = 0;
18583
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18585
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18586
- * extent[rank-1];
18587
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18589
- retarray->base_addr = xmalloc (alloc_size);
18590
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18591
if (alloc_size == 0)
18593
/* Make sure we have a zero-sized array. */
18594
@@ -294,8 +293,7 @@
18598
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18599
- * extent[rank-1];
18600
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18602
retarray->offset = 0;
18603
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18604
@@ -307,7 +305,7 @@
18608
- retarray->base_addr = xmalloc (alloc_size);
18609
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18613
@@ -485,8 +483,7 @@
18614
retarray->offset = 0;
18615
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18617
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18618
- * extent[rank-1];
18619
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18621
if (alloc_size == 0)
18623
@@ -495,7 +492,7 @@
18627
- retarray->base_addr = xmalloc (alloc_size);
18628
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18632
Index: libgfortran/generated/minloc1_8_i8.c
18633
===================================================================
18634
--- a/src/libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release)
18635
+++ b/src/libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch)
18637
retarray->offset = 0;
18638
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18640
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18641
- * extent[rank-1];
18642
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18644
- retarray->base_addr = xmalloc (alloc_size);
18645
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18646
if (alloc_size == 0)
18648
/* Make sure we have a zero-sized array. */
18649
@@ -294,8 +293,7 @@
18653
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18654
- * extent[rank-1];
18655
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18657
retarray->offset = 0;
18658
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18659
@@ -307,7 +305,7 @@
18663
- retarray->base_addr = xmalloc (alloc_size);
18664
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18668
@@ -485,8 +483,7 @@
18669
retarray->offset = 0;
18670
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18672
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18673
- * extent[rank-1];
18674
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18676
if (alloc_size == 0)
18678
@@ -495,7 +492,7 @@
18682
- retarray->base_addr = xmalloc (alloc_size);
18683
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18687
Index: libgfortran/generated/minloc0_4_r8.c
18688
===================================================================
18689
--- a/src/libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release)
18690
+++ b/src/libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch)
18692
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18693
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18694
retarray->offset = 0;
18695
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18696
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18700
@@ -199,7 +199,7 @@
18701
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18702
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18703
retarray->offset = 0;
18704
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18705
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18709
@@ -367,7 +367,7 @@
18710
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18711
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18712
retarray->offset = 0;
18713
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18714
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18716
else if (unlikely (compile_options.bounds_check))
18718
Index: libgfortran/generated/product_r16.c
18719
===================================================================
18720
--- a/src/libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release)
18721
+++ b/src/libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch)
18723
retarray->offset = 0;
18724
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18726
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18727
- * extent[rank-1];
18728
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18730
- retarray->base_addr = xmalloc (alloc_size);
18731
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18732
if (alloc_size == 0)
18734
/* Make sure we have a zero-sized array. */
18735
@@ -272,8 +271,7 @@
18739
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18740
- * extent[rank-1];
18741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18743
retarray->offset = 0;
18744
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18745
@@ -285,7 +283,7 @@
18749
- retarray->base_addr = xmalloc (alloc_size);
18750
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18754
@@ -430,8 +428,7 @@
18755
retarray->offset = 0;
18756
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18758
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18759
- * extent[rank-1];
18760
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18762
if (alloc_size == 0)
18764
@@ -440,7 +437,7 @@
18768
- retarray->base_addr = xmalloc (alloc_size);
18769
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18773
Index: libgfortran/generated/sum_r8.c
18774
===================================================================
18775
--- a/src/libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release)
18776
+++ b/src/libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch)
18778
retarray->offset = 0;
18779
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18781
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18782
- * extent[rank-1];
18783
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18785
- retarray->base_addr = xmalloc (alloc_size);
18786
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18787
if (alloc_size == 0)
18789
/* Make sure we have a zero-sized array. */
18790
@@ -272,8 +271,7 @@
18794
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18795
- * extent[rank-1];
18796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18798
retarray->offset = 0;
18799
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18800
@@ -285,7 +283,7 @@
18804
- retarray->base_addr = xmalloc (alloc_size);
18805
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18809
@@ -430,8 +428,7 @@
18810
retarray->offset = 0;
18811
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18813
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18814
- * extent[rank-1];
18815
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18817
if (alloc_size == 0)
18819
@@ -440,7 +437,7 @@
18823
- retarray->base_addr = xmalloc (alloc_size);
18824
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18828
Index: libgfortran/generated/norm2_r10.c
18829
===================================================================
18830
--- a/src/libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release)
18831
+++ b/src/libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch)
18832
@@ -101,10 +101,9 @@
18833
retarray->offset = 0;
18834
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18836
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18837
- * extent[rank-1];
18838
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18840
- retarray->base_addr = xmalloc (alloc_size);
18841
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
18842
if (alloc_size == 0)
18844
/* Make sure we have a zero-sized array. */
18845
Index: libgfortran/generated/unpack_c10.c
18846
===================================================================
18847
--- a/src/libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release)
18848
+++ b/src/libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch)
18853
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
18854
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
18858
@@ -244,7 +244,7 @@
18862
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
18863
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
18867
Index: libgfortran/generated/spread_r8.c
18868
===================================================================
18869
--- a/src/libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release)
18870
+++ b/src/libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch)
18871
@@ -101,8 +101,8 @@
18875
- /* xmalloc allocates a single byte for zero size. */
18876
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
18877
+ /* xmallocarray allocates a single byte for zero size. */
18878
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
18882
@@ -244,7 +244,7 @@
18884
if (ret->base_addr == NULL)
18886
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
18887
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
18889
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18891
Index: libgfortran/generated/minloc1_16_i16.c
18892
===================================================================
18893
--- a/src/libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release)
18894
+++ b/src/libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch)
18896
retarray->offset = 0;
18897
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18899
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18900
- * extent[rank-1];
18901
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18903
- retarray->base_addr = xmalloc (alloc_size);
18904
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18905
if (alloc_size == 0)
18907
/* Make sure we have a zero-sized array. */
18908
@@ -294,8 +293,7 @@
18912
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18913
- * extent[rank-1];
18914
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18916
retarray->offset = 0;
18917
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18918
@@ -307,7 +305,7 @@
18922
- retarray->base_addr = xmalloc (alloc_size);
18923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18927
@@ -485,8 +483,7 @@
18928
retarray->offset = 0;
18929
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18931
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18932
- * extent[rank-1];
18933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18935
if (alloc_size == 0)
18937
@@ -495,7 +492,7 @@
18941
- retarray->base_addr = xmalloc (alloc_size);
18942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18946
Index: libgfortran/generated/maxloc1_8_r4.c
18947
===================================================================
18948
--- a/src/libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release)
18949
+++ b/src/libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch)
18951
retarray->offset = 0;
18952
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18954
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18955
- * extent[rank-1];
18956
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18958
- retarray->base_addr = xmalloc (alloc_size);
18959
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18960
if (alloc_size == 0)
18962
/* Make sure we have a zero-sized array. */
18963
@@ -294,8 +293,7 @@
18967
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18968
- * extent[rank-1];
18969
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18971
retarray->offset = 0;
18972
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18973
@@ -307,7 +305,7 @@
18977
- retarray->base_addr = xmalloc (alloc_size);
18978
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18982
@@ -485,8 +483,7 @@
18983
retarray->offset = 0;
18984
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18986
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18987
- * extent[rank-1];
18988
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18990
if (alloc_size == 0)
18992
@@ -495,7 +492,7 @@
18996
- retarray->base_addr = xmalloc (alloc_size);
18997
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19001
Index: libgfortran/generated/minloc1_16_i1.c
19002
===================================================================
19003
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
19004
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
19006
retarray->offset = 0;
19007
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19009
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19010
- * extent[rank-1];
19011
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19013
- retarray->base_addr = xmalloc (alloc_size);
19014
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19015
if (alloc_size == 0)
19017
/* Make sure we have a zero-sized array. */
19018
@@ -294,8 +293,7 @@
19022
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19023
- * extent[rank-1];
19024
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19026
retarray->offset = 0;
19027
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19028
@@ -307,7 +305,7 @@
19032
- retarray->base_addr = xmalloc (alloc_size);
19033
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19037
@@ -485,8 +483,7 @@
19038
retarray->offset = 0;
19039
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19041
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19042
- * extent[rank-1];
19043
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19045
if (alloc_size == 0)
19047
@@ -495,7 +492,7 @@
19051
- retarray->base_addr = xmalloc (alloc_size);
19052
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19056
Index: libgfortran/generated/spread_r16.c
19057
===================================================================
19058
--- a/src/libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release)
19059
+++ b/src/libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch)
19060
@@ -101,8 +101,8 @@
19064
- /* xmalloc allocates a single byte for zero size. */
19065
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
19066
+ /* xmallocarray allocates a single byte for zero size. */
19067
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
19071
@@ -244,7 +244,7 @@
19073
if (ret->base_addr == NULL)
19075
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
19076
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
19078
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19080
Index: libgfortran/generated/pack_c8.c
19081
===================================================================
19082
--- a/src/libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release)
19083
+++ b/src/libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch)
19084
@@ -167,8 +167,8 @@
19088
- /* xmalloc allocates a single byte for zero size. */
19089
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
19090
+ /* xmallocarray allocates a single byte for zero size. */
19091
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
19095
Index: libgfortran/generated/minval_r10.c
19096
===================================================================
19097
--- a/src/libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release)
19098
+++ b/src/libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch)
19100
retarray->offset = 0;
19101
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19103
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19104
- * extent[rank-1];
19105
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19107
- retarray->base_addr = xmalloc (alloc_size);
19108
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19109
if (alloc_size == 0)
19111
/* Make sure we have a zero-sized array. */
19112
@@ -286,8 +285,7 @@
19116
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19117
- * extent[rank-1];
19118
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19120
retarray->offset = 0;
19121
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19122
@@ -299,7 +297,7 @@
19126
- retarray->base_addr = xmalloc (alloc_size);
19127
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19131
@@ -472,8 +470,7 @@
19132
retarray->offset = 0;
19133
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19135
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19136
- * extent[rank-1];
19137
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19139
if (alloc_size == 0)
19141
@@ -482,7 +479,7 @@
19145
- retarray->base_addr = xmalloc (alloc_size);
19146
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19150
Index: libgfortran/generated/parity_l8.c
19151
===================================================================
19152
--- a/src/libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release)
19153
+++ b/src/libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch)
19155
retarray->offset = 0;
19156
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19158
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19159
- * extent[rank-1];
19160
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19162
- retarray->base_addr = xmalloc (alloc_size);
19163
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
19164
if (alloc_size == 0)
19166
/* Make sure we have a zero-sized array. */
19167
Index: libgfortran/generated/minval_i4.c
19168
===================================================================
19169
--- a/src/libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release)
19170
+++ b/src/libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch)
19172
retarray->offset = 0;
19173
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19175
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19176
- * extent[rank-1];
19177
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19179
- retarray->base_addr = xmalloc (alloc_size);
19180
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19181
if (alloc_size == 0)
19183
/* Make sure we have a zero-sized array. */
19184
@@ -286,8 +285,7 @@
19188
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19189
- * extent[rank-1];
19190
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19192
retarray->offset = 0;
19193
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19194
@@ -299,7 +297,7 @@
19198
- retarray->base_addr = xmalloc (alloc_size);
19199
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19203
@@ -472,8 +470,7 @@
19204
retarray->offset = 0;
19205
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19207
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19208
- * extent[rank-1];
19209
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19211
if (alloc_size == 0)
19213
@@ -482,7 +479,7 @@
19217
- retarray->base_addr = xmalloc (alloc_size);
19218
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19222
Index: libgfortran/generated/maxloc1_8_i2.c
19223
===================================================================
19224
--- a/src/libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release)
19225
+++ b/src/libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch)
19227
retarray->offset = 0;
19228
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19230
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19231
- * extent[rank-1];
19232
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19234
- retarray->base_addr = xmalloc (alloc_size);
19235
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19236
if (alloc_size == 0)
19238
/* Make sure we have a zero-sized array. */
19239
@@ -294,8 +293,7 @@
19243
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19244
- * extent[rank-1];
19245
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19247
retarray->offset = 0;
19248
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19249
@@ -307,7 +305,7 @@
19253
- retarray->base_addr = xmalloc (alloc_size);
19254
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19258
@@ -485,8 +483,7 @@
19259
retarray->offset = 0;
19260
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19262
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19263
- * extent[rank-1];
19264
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19266
if (alloc_size == 0)
19268
@@ -495,7 +492,7 @@
19272
- retarray->base_addr = xmalloc (alloc_size);
19273
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19277
Index: libgfortran/generated/any_l8.c
19278
===================================================================
19279
--- a/src/libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release)
19280
+++ b/src/libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch)
19281
@@ -101,8 +101,7 @@
19282
retarray->offset = 0;
19283
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19285
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19286
- * extent[rank-1];
19287
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19289
if (alloc_size == 0)
19291
@@ -111,7 +110,7 @@
19295
- retarray->base_addr = xmalloc (alloc_size);
19296
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
19300
Index: libgfortran/generated/maxloc0_16_r10.c
19301
===================================================================
19302
--- a/src/libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release)
19303
+++ b/src/libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch)
19305
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19306
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19307
retarray->offset = 0;
19308
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19309
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19313
@@ -199,7 +199,7 @@
19314
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19315
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19316
retarray->offset = 0;
19317
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19318
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19322
@@ -367,7 +367,7 @@
19323
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19324
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19325
retarray->offset = 0;
19326
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19327
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19329
else if (unlikely (compile_options.bounds_check))
19331
Index: libgfortran/generated/minloc0_4_i16.c
19332
===================================================================
19333
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
19334
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
19336
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19337
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19338
retarray->offset = 0;
19339
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19340
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19344
@@ -199,7 +199,7 @@
19345
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19346
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19347
retarray->offset = 0;
19348
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19349
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19353
@@ -367,7 +367,7 @@
19354
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19355
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19356
retarray->offset = 0;
19357
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19358
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19360
else if (unlikely (compile_options.bounds_check))
19362
Index: libgfortran/generated/maxloc0_8_r8.c
19363
===================================================================
19364
--- a/src/libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release)
19365
+++ b/src/libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch)
19367
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19368
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19369
retarray->offset = 0;
19370
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19371
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19375
@@ -199,7 +199,7 @@
19376
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19377
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19378
retarray->offset = 0;
19379
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19380
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19384
@@ -367,7 +367,7 @@
19385
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19386
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19387
retarray->offset = 0;
19388
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19389
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19391
else if (unlikely (compile_options.bounds_check))
19393
Index: libgfortran/generated/minloc1_4_r10.c
19394
===================================================================
19395
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
19396
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
19398
retarray->offset = 0;
19399
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19401
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19402
- * extent[rank-1];
19403
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19405
- retarray->base_addr = xmalloc (alloc_size);
19406
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19407
if (alloc_size == 0)
19409
/* Make sure we have a zero-sized array. */
19410
@@ -294,8 +293,7 @@
19414
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19415
- * extent[rank-1];
19416
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19418
retarray->offset = 0;
19419
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19420
@@ -307,7 +305,7 @@
19424
- retarray->base_addr = xmalloc (alloc_size);
19425
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19429
@@ -485,8 +483,7 @@
19430
retarray->offset = 0;
19431
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19433
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19434
- * extent[rank-1];
19435
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19437
if (alloc_size == 0)
19439
@@ -495,7 +492,7 @@
19443
- retarray->base_addr = xmalloc (alloc_size);
19444
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19448
Index: libgfortran/generated/minloc1_8_i16.c
19449
===================================================================
19450
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
19451
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
19453
retarray->offset = 0;
19454
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19456
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19457
- * extent[rank-1];
19458
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19460
- retarray->base_addr = xmalloc (alloc_size);
19461
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19462
if (alloc_size == 0)
19464
/* Make sure we have a zero-sized array. */
19465
@@ -294,8 +293,7 @@
19469
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19470
- * extent[rank-1];
19471
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19473
retarray->offset = 0;
19474
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19475
@@ -307,7 +305,7 @@
19479
- retarray->base_addr = xmalloc (alloc_size);
19480
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19484
@@ -485,8 +483,7 @@
19485
retarray->offset = 0;
19486
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19488
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19489
- * extent[rank-1];
19490
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19492
if (alloc_size == 0)
19494
@@ -495,7 +492,7 @@
19498
- retarray->base_addr = xmalloc (alloc_size);
19499
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19503
Index: libgfortran/generated/maxloc0_8_r10.c
19504
===================================================================
19505
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
19506
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
19508
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19509
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19510
retarray->offset = 0;
19511
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19512
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19516
@@ -199,7 +199,7 @@
19517
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19518
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19519
retarray->offset = 0;
19520
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19521
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19525
@@ -367,7 +367,7 @@
19526
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19527
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19528
retarray->offset = 0;
19529
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19530
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19532
else if (unlikely (compile_options.bounds_check))
19534
Index: libgfortran/generated/unpack_i4.c
19535
===================================================================
19536
--- a/src/libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release)
19537
+++ b/src/libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch)
19542
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
19543
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
19547
@@ -244,7 +244,7 @@
19551
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
19552
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
19556
Index: libgfortran/generated/minloc1_16_r4.c
19557
===================================================================
19558
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
19559
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
19561
retarray->offset = 0;
19562
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19564
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19565
- * extent[rank-1];
19566
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19568
- retarray->base_addr = xmalloc (alloc_size);
19569
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19570
if (alloc_size == 0)
19572
/* Make sure we have a zero-sized array. */
19573
@@ -294,8 +293,7 @@
19577
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19578
- * extent[rank-1];
19579
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19581
retarray->offset = 0;
19582
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19583
@@ -307,7 +305,7 @@
19587
- retarray->base_addr = xmalloc (alloc_size);
19588
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19592
@@ -485,8 +483,7 @@
19593
retarray->offset = 0;
19594
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19596
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19597
- * extent[rank-1];
19598
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19600
if (alloc_size == 0)
19602
@@ -495,7 +492,7 @@
19606
- retarray->base_addr = xmalloc (alloc_size);
19607
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19611
Index: libgfortran/generated/product_i8.c
19612
===================================================================
19613
--- a/src/libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release)
19614
+++ b/src/libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch)
19616
retarray->offset = 0;
19617
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19619
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19620
- * extent[rank-1];
19621
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19623
- retarray->base_addr = xmalloc (alloc_size);
19624
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19625
if (alloc_size == 0)
19627
/* Make sure we have a zero-sized array. */
19628
@@ -272,8 +271,7 @@
19632
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19633
- * extent[rank-1];
19634
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19636
retarray->offset = 0;
19637
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19638
@@ -285,7 +283,7 @@
19642
- retarray->base_addr = xmalloc (alloc_size);
19643
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19647
@@ -430,8 +428,7 @@
19648
retarray->offset = 0;
19649
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19651
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19652
- * extent[rank-1];
19653
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19655
if (alloc_size == 0)
19657
@@ -440,7 +437,7 @@
19661
- retarray->base_addr = xmalloc (alloc_size);
19662
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19666
Index: libgfortran/generated/minloc0_16_r8.c
19667
===================================================================
19668
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
19669
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
19671
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19672
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19673
retarray->offset = 0;
19674
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19675
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19679
@@ -199,7 +199,7 @@
19680
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19681
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19682
retarray->offset = 0;
19683
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19684
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19688
@@ -367,7 +367,7 @@
19689
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19690
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19691
retarray->offset = 0;
19692
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19693
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19695
else if (unlikely (compile_options.bounds_check))
19697
Index: libgfortran/generated/count_2_l.c
19698
===================================================================
19699
--- a/src/libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release)
19700
+++ b/src/libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch)
19701
@@ -101,8 +101,7 @@
19702
retarray->offset = 0;
19703
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19705
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19706
- * extent[rank-1];
19707
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19709
if (alloc_size == 0)
19711
@@ -111,7 +110,7 @@
19715
- retarray->base_addr = xmalloc (alloc_size);
19716
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
19720
Index: libgfortran/generated/transpose_r8.c
19721
===================================================================
19722
--- a/src/libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release)
19723
+++ b/src/libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch)
19725
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19726
GFC_DESCRIPTOR_EXTENT(source, 1));
19728
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
19729
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19730
+ sizeof (GFC_REAL_8));
19732
} else if (unlikely (compile_options.bounds_check))
19734
Index: libgfortran/generated/cshift1_8.c
19735
===================================================================
19736
--- a/src/libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release)
19737
+++ b/src/libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch)
19742
- ret->base_addr = xmalloc (size * arraysize);
19743
+ ret->base_addr = xmallocarray (arraysize, size);
19745
ret->dtype = array->dtype;
19746
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
19747
Index: libgfortran/generated/matmul_i4.c
19748
===================================================================
19749
--- a/src/libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release)
19750
+++ b/src/libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch)
19751
@@ -124,7 +124,7 @@
19754
retarray->base_addr
19755
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
19756
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
19757
retarray->offset = 0;
19759
else if (unlikely (compile_options.bounds_check))
19760
Index: libgfortran/generated/pack_r10.c
19761
===================================================================
19762
--- a/src/libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release)
19763
+++ b/src/libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch)
19764
@@ -167,8 +167,8 @@
19768
- /* xmalloc allocates a single byte for zero size. */
19769
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
19770
+ /* xmallocarray allocates a single byte for zero size. */
19771
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
19775
Index: libgfortran/generated/minloc1_16_i2.c
19776
===================================================================
19777
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
19778
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
19780
retarray->offset = 0;
19781
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19783
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19784
- * extent[rank-1];
19785
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19787
- retarray->base_addr = xmalloc (alloc_size);
19788
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19789
if (alloc_size == 0)
19791
/* Make sure we have a zero-sized array. */
19792
@@ -294,8 +293,7 @@
19796
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19797
- * extent[rank-1];
19798
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19800
retarray->offset = 0;
19801
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19802
@@ -307,7 +305,7 @@
19806
- retarray->base_addr = xmalloc (alloc_size);
19807
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19811
@@ -485,8 +483,7 @@
19812
retarray->offset = 0;
19813
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19815
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19816
- * extent[rank-1];
19817
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19819
if (alloc_size == 0)
19821
@@ -495,7 +492,7 @@
19825
- retarray->base_addr = xmalloc (alloc_size);
19826
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19830
Index: libgfortran/generated/in_pack_i8.c
19831
===================================================================
19832
--- a/src/libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release)
19833
+++ b/src/libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch)
19835
return source->base_addr;
19837
/* Allocate storage for the destination. */
19838
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
19839
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
19841
src = source->base_addr;
19842
stride0 = stride[0];
19843
Index: libgfortran/generated/transpose_r16.c
19844
===================================================================
19845
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
19846
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
19848
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19849
GFC_DESCRIPTOR_EXTENT(source, 1));
19851
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
19852
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19853
+ sizeof (GFC_REAL_16));
19855
} else if (unlikely (compile_options.bounds_check))
19857
Index: libgfortran/generated/minloc1_4_i4.c
19858
===================================================================
19859
--- a/src/libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release)
19860
+++ b/src/libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch)
19862
retarray->offset = 0;
19863
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19865
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19866
- * extent[rank-1];
19867
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19869
- retarray->base_addr = xmalloc (alloc_size);
19870
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19871
if (alloc_size == 0)
19873
/* Make sure we have a zero-sized array. */
19874
@@ -294,8 +293,7 @@
19878
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19879
- * extent[rank-1];
19880
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19882
retarray->offset = 0;
19883
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19884
@@ -307,7 +305,7 @@
19888
- retarray->base_addr = xmalloc (alloc_size);
19889
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19893
@@ -485,8 +483,7 @@
19894
retarray->offset = 0;
19895
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19897
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19898
- * extent[rank-1];
19899
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19901
if (alloc_size == 0)
19903
@@ -495,7 +492,7 @@
19907
- retarray->base_addr = xmalloc (alloc_size);
19908
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19912
Index: libgfortran/generated/maxval_i1.c
19913
===================================================================
19914
--- a/src/libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release)
19915
+++ b/src/libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch)
19917
retarray->offset = 0;
19918
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19920
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19921
- * extent[rank-1];
19922
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19924
- retarray->base_addr = xmalloc (alloc_size);
19925
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19926
if (alloc_size == 0)
19928
/* Make sure we have a zero-sized array. */
19929
@@ -286,8 +285,7 @@
19933
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19934
- * extent[rank-1];
19935
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19937
retarray->offset = 0;
19938
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19939
@@ -299,7 +297,7 @@
19943
- retarray->base_addr = xmalloc (alloc_size);
19944
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19948
@@ -472,8 +470,7 @@
19949
retarray->offset = 0;
19950
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19952
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19953
- * extent[rank-1];
19954
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19956
if (alloc_size == 0)
19958
@@ -482,7 +479,7 @@
19962
- retarray->base_addr = xmalloc (alloc_size);
19963
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19967
Index: libgfortran/generated/product_c16.c
19968
===================================================================
19969
--- a/src/libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release)
19970
+++ b/src/libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch)
19972
retarray->offset = 0;
19973
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19975
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19976
- * extent[rank-1];
19977
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19979
- retarray->base_addr = xmalloc (alloc_size);
19980
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19981
if (alloc_size == 0)
19983
/* Make sure we have a zero-sized array. */
19984
@@ -272,8 +271,7 @@
19988
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19989
- * extent[rank-1];
19990
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19992
retarray->offset = 0;
19993
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19994
@@ -285,7 +283,7 @@
19998
- retarray->base_addr = xmalloc (alloc_size);
19999
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
20003
@@ -430,8 +428,7 @@
20004
retarray->offset = 0;
20005
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20007
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20008
- * extent[rank-1];
20009
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20011
if (alloc_size == 0)
20013
@@ -440,7 +437,7 @@
20017
- retarray->base_addr = xmalloc (alloc_size);
20018
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
20022
Index: libgfortran/generated/reshape_r4.c
20023
===================================================================
20024
--- a/src/libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release)
20025
+++ b/src/libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch)
20026
@@ -111,11 +111,11 @@
20029
if (unlikely (rs < 1))
20033
- alloc_size = rs * sizeof (GFC_REAL_4);
20036
- ret->base_addr = xmalloc (alloc_size);
20037
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
20038
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20041
Index: libgfortran/generated/iany_i8.c
20042
===================================================================
20043
--- a/src/libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release)
20044
+++ b/src/libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch)
20046
retarray->offset = 0;
20047
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20049
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20050
- * extent[rank-1];
20051
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20053
- retarray->base_addr = xmalloc (alloc_size);
20054
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20055
if (alloc_size == 0)
20057
/* Make sure we have a zero-sized array. */
20058
@@ -272,8 +271,7 @@
20062
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20063
- * extent[rank-1];
20064
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20066
retarray->offset = 0;
20067
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20068
@@ -285,7 +283,7 @@
20072
- retarray->base_addr = xmalloc (alloc_size);
20073
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20077
@@ -430,8 +428,7 @@
20078
retarray->offset = 0;
20079
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20081
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20082
- * extent[rank-1];
20083
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20085
if (alloc_size == 0)
20087
@@ -440,7 +437,7 @@
20091
- retarray->base_addr = xmalloc (alloc_size);
20092
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20096
Index: libgfortran/generated/cshift1_16.c
20097
===================================================================
20098
--- a/src/libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release)
20099
+++ b/src/libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch)
20104
- ret->base_addr = xmalloc (size * arraysize);
20105
+ ret->base_addr = xmallocarray (arraysize, size);
20107
ret->dtype = array->dtype;
20108
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
20109
Index: libgfortran/generated/maxloc0_4_i1.c
20110
===================================================================
20111
--- a/src/libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release)
20112
+++ b/src/libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch)
20114
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20115
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20116
retarray->offset = 0;
20117
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20118
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20122
@@ -199,7 +199,7 @@
20123
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20124
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20125
retarray->offset = 0;
20126
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20127
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20131
@@ -367,7 +367,7 @@
20132
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20133
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20134
retarray->offset = 0;
20135
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20136
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20138
else if (unlikely (compile_options.bounds_check))
20140
Index: libgfortran/generated/minloc0_4_i8.c
20141
===================================================================
20142
--- a/src/libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release)
20143
+++ b/src/libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch)
20145
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20146
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20147
retarray->offset = 0;
20148
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20149
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20153
@@ -199,7 +199,7 @@
20154
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20155
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20156
retarray->offset = 0;
20157
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20158
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20162
@@ -367,7 +367,7 @@
20163
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20164
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20165
retarray->offset = 0;
20166
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20167
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20169
else if (unlikely (compile_options.bounds_check))
20171
Index: libgfortran/generated/spread_c16.c
20172
===================================================================
20173
--- a/src/libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release)
20174
+++ b/src/libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch)
20175
@@ -101,8 +101,8 @@
20179
- /* xmalloc allocates a single byte for zero size. */
20180
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
20181
+ /* xmallocarray allocates a single byte for zero size. */
20182
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
20186
@@ -244,7 +244,7 @@
20188
if (ret->base_addr == NULL)
20190
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
20191
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
20193
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
20195
Index: libgfortran/generated/maxval_r4.c
20196
===================================================================
20197
--- a/src/libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release)
20198
+++ b/src/libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch)
20200
retarray->offset = 0;
20201
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20203
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20204
- * extent[rank-1];
20205
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20207
- retarray->base_addr = xmalloc (alloc_size);
20208
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
20209
if (alloc_size == 0)
20211
/* Make sure we have a zero-sized array. */
20212
@@ -286,8 +285,7 @@
20216
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20217
- * extent[rank-1];
20218
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20220
retarray->offset = 0;
20221
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20222
@@ -299,7 +297,7 @@
20226
- retarray->base_addr = xmalloc (alloc_size);
20227
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
20231
@@ -472,8 +470,7 @@
20232
retarray->offset = 0;
20233
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20235
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20236
- * extent[rank-1];
20237
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20239
if (alloc_size == 0)
20241
@@ -482,7 +479,7 @@
20245
- retarray->base_addr = xmalloc (alloc_size);
20246
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
20250
Index: libgfortran/generated/minval_r8.c
20251
===================================================================
20252
--- a/src/libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release)
20253
+++ b/src/libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch)
20255
retarray->offset = 0;
20256
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20258
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20259
- * extent[rank-1];
20260
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20262
- retarray->base_addr = xmalloc (alloc_size);
20263
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20264
if (alloc_size == 0)
20266
/* Make sure we have a zero-sized array. */
20267
@@ -286,8 +285,7 @@
20271
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20272
- * extent[rank-1];
20273
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20275
retarray->offset = 0;
20276
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20277
@@ -299,7 +297,7 @@
20281
- retarray->base_addr = xmalloc (alloc_size);
20282
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20286
@@ -472,8 +470,7 @@
20287
retarray->offset = 0;
20288
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20290
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20291
- * extent[rank-1];
20292
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20294
if (alloc_size == 0)
20296
@@ -482,7 +479,7 @@
20300
- retarray->base_addr = xmalloc (alloc_size);
20301
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20305
Index: libgfortran/generated/minloc1_16_r16.c
20306
===================================================================
20307
--- a/src/libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release)
20308
+++ b/src/libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch)
20310
retarray->offset = 0;
20311
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20313
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20314
- * extent[rank-1];
20315
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20317
- retarray->base_addr = xmalloc (alloc_size);
20318
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20319
if (alloc_size == 0)
20321
/* Make sure we have a zero-sized array. */
20322
@@ -294,8 +293,7 @@
20326
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20327
- * extent[rank-1];
20328
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20330
retarray->offset = 0;
20331
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20332
@@ -307,7 +305,7 @@
20336
- retarray->base_addr = xmalloc (alloc_size);
20337
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20341
@@ -485,8 +483,7 @@
20342
retarray->offset = 0;
20343
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20345
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20346
- * extent[rank-1];
20347
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20349
if (alloc_size == 0)
20351
@@ -495,7 +492,7 @@
20355
- retarray->base_addr = xmalloc (alloc_size);
20356
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20360
Index: libgfortran/generated/unpack_i16.c
20361
===================================================================
20362
--- a/src/libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release)
20363
+++ b/src/libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch)
20368
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
20369
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
20373
@@ -244,7 +244,7 @@
20377
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
20378
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
20382
Index: libgfortran/generated/sum_i8.c
20383
===================================================================
20384
--- a/src/libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release)
20385
+++ b/src/libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch)
20387
retarray->offset = 0;
20388
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20390
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20391
- * extent[rank-1];
20392
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20394
- retarray->base_addr = xmalloc (alloc_size);
20395
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20396
if (alloc_size == 0)
20398
/* Make sure we have a zero-sized array. */
20399
@@ -272,8 +271,7 @@
20403
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20404
- * extent[rank-1];
20405
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20407
retarray->offset = 0;
20408
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20409
@@ -285,7 +283,7 @@
20413
- retarray->base_addr = xmalloc (alloc_size);
20414
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20418
@@ -430,8 +428,7 @@
20419
retarray->offset = 0;
20420
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20422
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20423
- * extent[rank-1];
20424
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20426
if (alloc_size == 0)
20428
@@ -440,7 +437,7 @@
20432
- retarray->base_addr = xmalloc (alloc_size);
20433
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20437
Index: libgfortran/generated/pack_i1.c
20438
===================================================================
20439
--- a/src/libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release)
20440
+++ b/src/libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch)
20441
@@ -167,8 +167,8 @@
20445
- /* xmalloc allocates a single byte for zero size. */
20446
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
20447
+ /* xmallocarray allocates a single byte for zero size. */
20448
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
20452
Index: libgfortran/generated/any_l16.c
20453
===================================================================
20454
--- a/src/libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release)
20455
+++ b/src/libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch)
20456
@@ -101,8 +101,7 @@
20457
retarray->offset = 0;
20458
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20460
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20461
- * extent[rank-1];
20462
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20464
if (alloc_size == 0)
20466
@@ -111,7 +110,7 @@
20470
- retarray->base_addr = xmalloc (alloc_size);
20471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
20475
Index: libgfortran/generated/spread_i8.c
20476
===================================================================
20477
--- a/src/libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release)
20478
+++ b/src/libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch)
20479
@@ -101,8 +101,8 @@
20483
- /* xmalloc allocates a single byte for zero size. */
20484
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
20485
+ /* xmallocarray allocates a single byte for zero size. */
20486
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
20490
@@ -244,7 +244,7 @@
20492
if (ret->base_addr == NULL)
20494
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
20495
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
20497
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
20499
Index: libgfortran/generated/maxval_i2.c
20500
===================================================================
20501
--- a/src/libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release)
20502
+++ b/src/libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch)
20504
retarray->offset = 0;
20505
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20507
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20508
- * extent[rank-1];
20509
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20511
- retarray->base_addr = xmalloc (alloc_size);
20512
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20513
if (alloc_size == 0)
20515
/* Make sure we have a zero-sized array. */
20516
@@ -286,8 +285,7 @@
20520
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20521
- * extent[rank-1];
20522
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20524
retarray->offset = 0;
20525
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20526
@@ -299,7 +297,7 @@
20530
- retarray->base_addr = xmalloc (alloc_size);
20531
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20535
@@ -472,8 +470,7 @@
20536
retarray->offset = 0;
20537
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20539
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20540
- * extent[rank-1];
20541
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20543
if (alloc_size == 0)
20545
@@ -482,7 +479,7 @@
20549
- retarray->base_addr = xmalloc (alloc_size);
20550
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20554
Index: libgfortran/generated/maxloc1_8_i4.c
20555
===================================================================
20556
--- a/src/libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release)
20557
+++ b/src/libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch)
20559
retarray->offset = 0;
20560
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20562
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20563
- * extent[rank-1];
20564
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20566
- retarray->base_addr = xmalloc (alloc_size);
20567
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20568
if (alloc_size == 0)
20570
/* Make sure we have a zero-sized array. */
20571
@@ -294,8 +293,7 @@
20575
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20576
- * extent[rank-1];
20577
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20579
retarray->offset = 0;
20580
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20581
@@ -307,7 +305,7 @@
20585
- retarray->base_addr = xmalloc (alloc_size);
20586
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20590
@@ -485,8 +483,7 @@
20591
retarray->offset = 0;
20592
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20594
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20595
- * extent[rank-1];
20596
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20598
if (alloc_size == 0)
20600
@@ -495,7 +492,7 @@
20604
- retarray->base_addr = xmalloc (alloc_size);
20605
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20609
Index: libgfortran/generated/unpack_r8.c
20610
===================================================================
20611
--- a/src/libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release)
20612
+++ b/src/libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch)
20617
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
20618
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
20622
@@ -244,7 +244,7 @@
20626
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
20627
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
20631
Index: libgfortran/generated/maxloc0_4_r4.c
20632
===================================================================
20633
--- a/src/libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release)
20634
+++ b/src/libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch)
20636
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20637
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20638
retarray->offset = 0;
20639
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20640
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20644
@@ -199,7 +199,7 @@
20645
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20646
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20647
retarray->offset = 0;
20648
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20649
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20653
@@ -367,7 +367,7 @@
20654
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20655
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20656
retarray->offset = 0;
20657
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20658
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20660
else if (unlikely (compile_options.bounds_check))
20662
Index: libgfortran/generated/all_l1.c
20663
===================================================================
20664
--- a/src/libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release)
20665
+++ b/src/libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch)
20666
@@ -101,8 +101,7 @@
20667
retarray->offset = 0;
20668
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20670
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20671
- * extent[rank-1];
20672
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20674
if (alloc_size == 0)
20676
@@ -111,7 +110,7 @@
20680
- retarray->base_addr = xmalloc (alloc_size);
20681
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
20685
Index: libgfortran/generated/matmul_r8.c
20686
===================================================================
20687
--- a/src/libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release)
20688
+++ b/src/libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch)
20689
@@ -124,7 +124,7 @@
20692
retarray->base_addr
20693
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
20694
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
20695
retarray->offset = 0;
20697
else if (unlikely (compile_options.bounds_check))
20698
Index: libgfortran/generated/minloc0_4_r16.c
20699
===================================================================
20700
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
20701
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
20703
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20704
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20705
retarray->offset = 0;
20706
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20707
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20711
@@ -199,7 +199,7 @@
20712
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20713
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20714
retarray->offset = 0;
20715
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20716
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20720
@@ -367,7 +367,7 @@
20721
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20722
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20723
retarray->offset = 0;
20724
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20725
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20727
else if (unlikely (compile_options.bounds_check))
20729
Index: libgfortran/generated/maxloc0_4_i2.c
20730
===================================================================
20731
--- a/src/libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release)
20732
+++ b/src/libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch)
20734
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20735
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20736
retarray->offset = 0;
20737
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20738
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20742
@@ -199,7 +199,7 @@
20743
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20744
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20745
retarray->offset = 0;
20746
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20747
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20751
@@ -367,7 +367,7 @@
20752
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20753
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20754
retarray->offset = 0;
20755
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20756
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20758
else if (unlikely (compile_options.bounds_check))
20760
Index: libgfortran/generated/minloc1_8_r16.c
20761
===================================================================
20762
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
20763
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
20765
retarray->offset = 0;
20766
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20768
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20769
- * extent[rank-1];
20770
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20772
- retarray->base_addr = xmalloc (alloc_size);
20773
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20774
if (alloc_size == 0)
20776
/* Make sure we have a zero-sized array. */
20777
@@ -294,8 +293,7 @@
20781
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20782
- * extent[rank-1];
20783
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20785
retarray->offset = 0;
20786
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20787
@@ -307,7 +305,7 @@
20791
- retarray->base_addr = xmalloc (alloc_size);
20792
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20796
@@ -485,8 +483,7 @@
20797
retarray->offset = 0;
20798
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20800
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20801
- * extent[rank-1];
20802
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20804
if (alloc_size == 0)
20806
@@ -495,7 +492,7 @@
20810
- retarray->base_addr = xmalloc (alloc_size);
20811
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20815
Index: libgfortran/generated/pack_c10.c
20816
===================================================================
20817
--- a/src/libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release)
20818
+++ b/src/libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch)
20819
@@ -167,8 +167,8 @@
20823
- /* xmalloc allocates a single byte for zero size. */
20824
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
20825
+ /* xmallocarray allocates a single byte for zero size. */
20826
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
20830
Index: libgfortran/generated/pack_r4.c
20831
===================================================================
20832
--- a/src/libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release)
20833
+++ b/src/libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch)
20834
@@ -167,8 +167,8 @@
20838
- /* xmalloc allocates a single byte for zero size. */
20839
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
20840
+ /* xmallocarray allocates a single byte for zero size. */
20841
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
20845
Index: libgfortran/generated/transpose_c16.c
20846
===================================================================
20847
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
20848
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
20850
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20851
GFC_DESCRIPTOR_EXTENT(source, 1));
20853
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
20854
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20855
+ sizeof (GFC_COMPLEX_16));
20857
} else if (unlikely (compile_options.bounds_check))
20859
Index: libgfortran/generated/maxloc0_8_i8.c
20860
===================================================================
20861
--- a/src/libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release)
20862
+++ b/src/libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch)
20864
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20865
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20866
retarray->offset = 0;
20867
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20868
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20872
@@ -199,7 +199,7 @@
20873
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20874
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20875
retarray->offset = 0;
20876
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20877
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20881
@@ -367,7 +367,7 @@
20882
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20883
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20884
retarray->offset = 0;
20885
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20886
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20888
else if (unlikely (compile_options.bounds_check))
20890
Index: libgfortran/generated/minloc1_4_r8.c
20891
===================================================================
20892
--- a/src/libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release)
20893
+++ b/src/libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch)
20895
retarray->offset = 0;
20896
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20898
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20899
- * extent[rank-1];
20900
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20902
- retarray->base_addr = xmalloc (alloc_size);
20903
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20904
if (alloc_size == 0)
20906
/* Make sure we have a zero-sized array. */
20907
@@ -294,8 +293,7 @@
20911
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20912
- * extent[rank-1];
20913
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20915
retarray->offset = 0;
20916
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20917
@@ -307,7 +305,7 @@
20921
- retarray->base_addr = xmalloc (alloc_size);
20922
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20926
@@ -485,8 +483,7 @@
20927
retarray->offset = 0;
20928
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20930
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20931
- * extent[rank-1];
20932
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20934
if (alloc_size == 0)
20936
@@ -495,7 +492,7 @@
20940
- retarray->base_addr = xmalloc (alloc_size);
20941
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20945
Index: libgfortran/generated/minloc1_16_i4.c
20946
===================================================================
20947
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
20948
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
20950
retarray->offset = 0;
20951
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20953
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20954
- * extent[rank-1];
20955
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20957
- retarray->base_addr = xmalloc (alloc_size);
20958
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20959
if (alloc_size == 0)
20961
/* Make sure we have a zero-sized array. */
20962
@@ -294,8 +293,7 @@
20966
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20967
- * extent[rank-1];
20968
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20970
retarray->offset = 0;
20971
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20972
@@ -307,7 +305,7 @@
20976
- retarray->base_addr = xmalloc (alloc_size);
20977
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20981
@@ -485,8 +483,7 @@
20982
retarray->offset = 0;
20983
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20985
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20986
- * extent[rank-1];
20987
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20989
if (alloc_size == 0)
20991
@@ -495,7 +492,7 @@
20995
- retarray->base_addr = xmalloc (alloc_size);
20996
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21000
Index: libgfortran/generated/minloc0_16_i8.c
21001
===================================================================
21002
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
21003
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
21005
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21006
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21007
retarray->offset = 0;
21008
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21009
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21013
@@ -199,7 +199,7 @@
21014
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21015
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21016
retarray->offset = 0;
21017
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21018
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21022
@@ -367,7 +367,7 @@
21023
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21024
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21025
retarray->offset = 0;
21026
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21027
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21029
else if (unlikely (compile_options.bounds_check))
21031
Index: libgfortran/generated/pack_i2.c
21032
===================================================================
21033
--- a/src/libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release)
21034
+++ b/src/libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch)
21035
@@ -167,8 +167,8 @@
21039
- /* xmalloc allocates a single byte for zero size. */
21040
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
21041
+ /* xmallocarray allocates a single byte for zero size. */
21042
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
21046
Index: libgfortran/generated/transpose_i8.c
21047
===================================================================
21048
--- a/src/libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release)
21049
+++ b/src/libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch)
21051
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
21052
GFC_DESCRIPTOR_EXTENT(source, 1));
21054
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
21055
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
21056
+ sizeof (GFC_INTEGER_8));
21058
} else if (unlikely (compile_options.bounds_check))
21060
Index: libgfortran/generated/eoshift1_16.c
21061
===================================================================
21062
--- a/src/libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release)
21063
+++ b/src/libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch)
21064
@@ -105,8 +105,8 @@
21065
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
21068
- /* xmalloc allocates a single byte for zero size. */
21069
- ret->base_addr = xmalloc (size * arraysize);
21070
+ /* xmallocarray allocates a single byte for zero size. */
21071
+ ret->base_addr = xmallocarray (arraysize, size);
21074
else if (unlikely (compile_options.bounds_check))
21075
Index: libgfortran/generated/all_l2.c
21076
===================================================================
21077
--- a/src/libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release)
21078
+++ b/src/libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch)
21079
@@ -101,8 +101,7 @@
21080
retarray->offset = 0;
21081
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21083
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21084
- * extent[rank-1];
21085
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21087
if (alloc_size == 0)
21089
@@ -111,7 +110,7 @@
21093
- retarray->base_addr = xmalloc (alloc_size);
21094
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
21098
Index: libgfortran/generated/product_c4.c
21099
===================================================================
21100
--- a/src/libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release)
21101
+++ b/src/libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch)
21103
retarray->offset = 0;
21104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21106
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21107
- * extent[rank-1];
21108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21110
- retarray->base_addr = xmalloc (alloc_size);
21111
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21112
if (alloc_size == 0)
21114
/* Make sure we have a zero-sized array. */
21115
@@ -272,8 +271,7 @@
21119
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21120
- * extent[rank-1];
21121
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21123
retarray->offset = 0;
21124
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21125
@@ -285,7 +283,7 @@
21129
- retarray->base_addr = xmalloc (alloc_size);
21130
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21134
@@ -430,8 +428,7 @@
21135
retarray->offset = 0;
21136
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21138
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21139
- * extent[rank-1];
21140
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21142
if (alloc_size == 0)
21144
@@ -440,7 +437,7 @@
21148
- retarray->base_addr = xmalloc (alloc_size);
21149
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
21153
Index: libgfortran/generated/iall_i1.c
21154
===================================================================
21155
--- a/src/libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release)
21156
+++ b/src/libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch)
21158
retarray->offset = 0;
21159
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21161
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21162
- * extent[rank-1];
21163
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21165
- retarray->base_addr = xmalloc (alloc_size);
21166
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
21167
if (alloc_size == 0)
21169
/* Make sure we have a zero-sized array. */
21170
@@ -272,8 +271,7 @@
21174
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21175
- * extent[rank-1];
21176
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21178
retarray->offset = 0;
21179
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21180
@@ -285,7 +283,7 @@
21184
- retarray->base_addr = xmalloc (alloc_size);
21185
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
21189
@@ -430,8 +428,7 @@
21190
retarray->offset = 0;
21191
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21193
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21194
- * extent[rank-1];
21195
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21197
if (alloc_size == 0)
21199
@@ -440,7 +437,7 @@
21203
- retarray->base_addr = xmalloc (alloc_size);
21204
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
21208
Index: libgfortran/generated/reshape_i4.c
21209
===================================================================
21210
--- a/src/libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release)
21211
+++ b/src/libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch)
21212
@@ -111,11 +111,11 @@
21215
if (unlikely (rs < 1))
21219
- alloc_size = rs * sizeof (GFC_INTEGER_4);
21222
- ret->base_addr = xmalloc (alloc_size);
21223
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21224
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21227
Index: libgfortran/generated/in_pack_r10.c
21228
===================================================================
21229
--- a/src/libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release)
21230
+++ b/src/libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch)
21232
return source->base_addr;
21234
/* Allocate storage for the destination. */
21235
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
21236
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
21238
src = source->base_addr;
21239
stride0 = stride[0];
21240
Index: libgfortran/generated/in_pack_c4.c
21241
===================================================================
21242
--- a/src/libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release)
21243
+++ b/src/libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch)
21245
return source->base_addr;
21247
/* Allocate storage for the destination. */
21248
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
21249
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
21251
src = source->base_addr;
21252
stride0 = stride[0];
21253
Index: libgfortran/generated/all_l16.c
21254
===================================================================
21255
--- a/src/libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release)
21256
+++ b/src/libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch)
21257
@@ -101,8 +101,7 @@
21258
retarray->offset = 0;
21259
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21261
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21262
- * extent[rank-1];
21263
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21265
if (alloc_size == 0)
21267
@@ -111,7 +110,7 @@
21271
- retarray->base_addr = xmalloc (alloc_size);
21272
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
21276
Index: libgfortran/generated/maxloc0_16_i1.c
21277
===================================================================
21278
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
21279
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
21281
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21282
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21283
retarray->offset = 0;
21284
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21285
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21289
@@ -199,7 +199,7 @@
21290
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21291
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21292
retarray->offset = 0;
21293
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21294
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21298
@@ -367,7 +367,7 @@
21299
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21300
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21301
retarray->offset = 0;
21302
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21303
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21305
else if (unlikely (compile_options.bounds_check))
21307
Index: libgfortran/generated/maxloc1_8_r8.c
21308
===================================================================
21309
--- a/src/libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release)
21310
+++ b/src/libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch)
21312
retarray->offset = 0;
21313
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21315
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21316
- * extent[rank-1];
21317
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21319
- retarray->base_addr = xmalloc (alloc_size);
21320
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21321
if (alloc_size == 0)
21323
/* Make sure we have a zero-sized array. */
21324
@@ -294,8 +293,7 @@
21328
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21329
- * extent[rank-1];
21330
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21332
retarray->offset = 0;
21333
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21334
@@ -307,7 +305,7 @@
21338
- retarray->base_addr = xmalloc (alloc_size);
21339
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21343
@@ -485,8 +483,7 @@
21344
retarray->offset = 0;
21345
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21347
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21348
- * extent[rank-1];
21349
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21351
if (alloc_size == 0)
21353
@@ -495,7 +492,7 @@
21357
- retarray->base_addr = xmalloc (alloc_size);
21358
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21362
Index: libgfortran/generated/minval_i16.c
21363
===================================================================
21364
--- a/src/libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release)
21365
+++ b/src/libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch)
21367
retarray->offset = 0;
21368
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21370
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21371
- * extent[rank-1];
21372
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21374
- retarray->base_addr = xmalloc (alloc_size);
21375
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21376
if (alloc_size == 0)
21378
/* Make sure we have a zero-sized array. */
21379
@@ -286,8 +285,7 @@
21383
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21384
- * extent[rank-1];
21385
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21387
retarray->offset = 0;
21388
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21389
@@ -299,7 +297,7 @@
21393
- retarray->base_addr = xmalloc (alloc_size);
21394
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21398
@@ -472,8 +470,7 @@
21399
retarray->offset = 0;
21400
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21402
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21403
- * extent[rank-1];
21404
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21406
if (alloc_size == 0)
21408
@@ -482,7 +479,7 @@
21412
- retarray->base_addr = xmalloc (alloc_size);
21413
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21417
Index: libgfortran/generated/reshape_r10.c
21418
===================================================================
21419
--- a/src/libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release)
21420
+++ b/src/libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch)
21421
@@ -111,11 +111,11 @@
21424
if (unlikely (rs < 1))
21428
- alloc_size = rs * sizeof (GFC_REAL_10);
21431
- ret->base_addr = xmalloc (alloc_size);
21432
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21433
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21436
Index: libgfortran/generated/unpack_r16.c
21437
===================================================================
21438
--- a/src/libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release)
21439
+++ b/src/libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch)
21444
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
21445
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
21449
@@ -244,7 +244,7 @@
21453
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
21454
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
21458
Index: libgfortran/generated/maxval_i4.c
21459
===================================================================
21460
--- a/src/libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release)
21461
+++ b/src/libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch)
21463
retarray->offset = 0;
21464
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21466
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21467
- * extent[rank-1];
21468
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21470
- retarray->base_addr = xmalloc (alloc_size);
21471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21472
if (alloc_size == 0)
21474
/* Make sure we have a zero-sized array. */
21475
@@ -286,8 +285,7 @@
21479
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21480
- * extent[rank-1];
21481
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21483
retarray->offset = 0;
21484
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21485
@@ -299,7 +297,7 @@
21489
- retarray->base_addr = xmalloc (alloc_size);
21490
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21494
@@ -472,8 +470,7 @@
21495
retarray->offset = 0;
21496
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21498
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21499
- * extent[rank-1];
21500
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21502
if (alloc_size == 0)
21504
@@ -482,7 +479,7 @@
21508
- retarray->base_addr = xmalloc (alloc_size);
21509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21513
Index: libgfortran/generated/minval_i8.c
21514
===================================================================
21515
--- a/src/libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release)
21516
+++ b/src/libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch)
21518
retarray->offset = 0;
21519
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21521
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21522
- * extent[rank-1];
21523
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21525
- retarray->base_addr = xmalloc (alloc_size);
21526
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21527
if (alloc_size == 0)
21529
/* Make sure we have a zero-sized array. */
21530
@@ -286,8 +285,7 @@
21534
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21535
- * extent[rank-1];
21536
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21538
retarray->offset = 0;
21539
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21540
@@ -299,7 +297,7 @@
21544
- retarray->base_addr = xmalloc (alloc_size);
21545
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21549
@@ -472,8 +470,7 @@
21550
retarray->offset = 0;
21551
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21553
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21554
- * extent[rank-1];
21555
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21557
if (alloc_size == 0)
21559
@@ -482,7 +479,7 @@
21563
- retarray->base_addr = xmalloc (alloc_size);
21564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21568
Index: libgfortran/generated/maxloc0_16_i16.c
21569
===================================================================
21570
--- a/src/libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release)
21571
+++ b/src/libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch)
21573
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21574
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21575
retarray->offset = 0;
21576
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21577
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21581
@@ -199,7 +199,7 @@
21582
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21583
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21584
retarray->offset = 0;
21585
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21586
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21590
@@ -367,7 +367,7 @@
21591
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21592
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21593
retarray->offset = 0;
21594
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21595
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21597
else if (unlikely (compile_options.bounds_check))
21599
Index: libgfortran/generated/shape_i4.c
21600
===================================================================
21601
--- a/src/libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release)
21602
+++ b/src/libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch)
21605
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
21607
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21608
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21611
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
21612
Index: libgfortran/generated/minloc1_4_i16.c
21613
===================================================================
21614
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
21615
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
21617
retarray->offset = 0;
21618
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21620
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21621
- * extent[rank-1];
21622
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21624
- retarray->base_addr = xmalloc (alloc_size);
21625
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21626
if (alloc_size == 0)
21628
/* Make sure we have a zero-sized array. */
21629
@@ -294,8 +293,7 @@
21633
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21634
- * extent[rank-1];
21635
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21637
retarray->offset = 0;
21638
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21639
@@ -307,7 +305,7 @@
21643
- retarray->base_addr = xmalloc (alloc_size);
21644
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21648
@@ -485,8 +483,7 @@
21649
retarray->offset = 0;
21650
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21652
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21653
- * extent[rank-1];
21654
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21656
if (alloc_size == 0)
21658
@@ -495,7 +492,7 @@
21662
- retarray->base_addr = xmalloc (alloc_size);
21663
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21667
Index: libgfortran/generated/maxloc0_4_r10.c
21668
===================================================================
21669
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
21670
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
21672
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21673
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21674
retarray->offset = 0;
21675
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21676
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21680
@@ -199,7 +199,7 @@
21681
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21682
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21683
retarray->offset = 0;
21684
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21685
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21689
@@ -367,7 +367,7 @@
21690
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21691
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21692
retarray->offset = 0;
21693
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21694
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21696
else if (unlikely (compile_options.bounds_check))
21698
Index: libgfortran/generated/maxloc0_8_i16.c
21699
===================================================================
21700
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
21701
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
21703
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21704
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21705
retarray->offset = 0;
21706
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21707
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21711
@@ -199,7 +199,7 @@
21712
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21713
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21714
retarray->offset = 0;
21715
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21716
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21720
@@ -367,7 +367,7 @@
21721
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21722
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21723
retarray->offset = 0;
21724
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21725
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21727
else if (unlikely (compile_options.bounds_check))
21729
Index: libgfortran/generated/iall_i2.c
21730
===================================================================
21731
--- a/src/libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release)
21732
+++ b/src/libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch)
21734
retarray->offset = 0;
21735
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21737
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21738
- * extent[rank-1];
21739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21741
- retarray->base_addr = xmalloc (alloc_size);
21742
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21743
if (alloc_size == 0)
21745
/* Make sure we have a zero-sized array. */
21746
@@ -272,8 +271,7 @@
21750
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21751
- * extent[rank-1];
21752
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21754
retarray->offset = 0;
21755
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21756
@@ -285,7 +283,7 @@
21760
- retarray->base_addr = xmalloc (alloc_size);
21761
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21765
@@ -430,8 +428,7 @@
21766
retarray->offset = 0;
21767
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21769
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21770
- * extent[rank-1];
21771
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21773
if (alloc_size == 0)
21775
@@ -440,7 +437,7 @@
21779
- retarray->base_addr = xmalloc (alloc_size);
21780
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21784
Index: libgfortran/generated/maxloc1_8_r10.c
21785
===================================================================
21786
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
21787
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
21789
retarray->offset = 0;
21790
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21792
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21793
- * extent[rank-1];
21794
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21796
- retarray->base_addr = xmalloc (alloc_size);
21797
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21798
if (alloc_size == 0)
21800
/* Make sure we have a zero-sized array. */
21801
@@ -294,8 +293,7 @@
21805
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21806
- * extent[rank-1];
21807
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21809
retarray->offset = 0;
21810
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21811
@@ -307,7 +305,7 @@
21815
- retarray->base_addr = xmalloc (alloc_size);
21816
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21820
@@ -485,8 +483,7 @@
21821
retarray->offset = 0;
21822
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21824
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21825
- * extent[rank-1];
21826
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21828
if (alloc_size == 0)
21830
@@ -495,7 +492,7 @@
21834
- retarray->base_addr = xmalloc (alloc_size);
21835
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21839
Index: libgfortran/generated/maxloc0_16_r4.c
21840
===================================================================
21841
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
21842
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
21844
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21845
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21846
retarray->offset = 0;
21847
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21848
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21852
@@ -199,7 +199,7 @@
21853
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21854
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21855
retarray->offset = 0;
21856
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21857
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21861
@@ -367,7 +367,7 @@
21862
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21863
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21864
retarray->offset = 0;
21865
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21866
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21868
else if (unlikely (compile_options.bounds_check))
21870
Index: libgfortran/generated/minloc0_8_i1.c
21871
===================================================================
21872
--- a/src/libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release)
21873
+++ b/src/libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch)
21875
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21876
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21877
retarray->offset = 0;
21878
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21879
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21883
@@ -199,7 +199,7 @@
21884
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21885
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21886
retarray->offset = 0;
21887
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21888
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21892
@@ -367,7 +367,7 @@
21893
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21894
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21895
retarray->offset = 0;
21896
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21897
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21899
else if (unlikely (compile_options.bounds_check))
21901
Index: libgfortran/generated/minloc1_16_r8.c
21902
===================================================================
21903
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
21904
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
21906
retarray->offset = 0;
21907
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21909
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21910
- * extent[rank-1];
21911
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21913
- retarray->base_addr = xmalloc (alloc_size);
21914
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21915
if (alloc_size == 0)
21917
/* Make sure we have a zero-sized array. */
21918
@@ -294,8 +293,7 @@
21922
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21923
- * extent[rank-1];
21924
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21926
retarray->offset = 0;
21927
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21928
@@ -307,7 +305,7 @@
21932
- retarray->base_addr = xmalloc (alloc_size);
21933
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21937
@@ -485,8 +483,7 @@
21938
retarray->offset = 0;
21939
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21941
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21942
- * extent[rank-1];
21943
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21945
if (alloc_size == 0)
21947
@@ -495,7 +492,7 @@
21951
- retarray->base_addr = xmalloc (alloc_size);
21952
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21956
Index: libgfortran/generated/unpack_i8.c
21957
===================================================================
21958
--- a/src/libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release)
21959
+++ b/src/libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch)
21964
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
21965
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
21969
@@ -244,7 +244,7 @@
21973
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
21974
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
21978
Index: libgfortran/generated/maxloc0_4_i4.c
21979
===================================================================
21980
--- a/src/libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release)
21981
+++ b/src/libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch)
21983
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21984
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21985
retarray->offset = 0;
21986
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21987
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21991
@@ -199,7 +199,7 @@
21992
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21993
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21994
retarray->offset = 0;
21995
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21996
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22000
@@ -367,7 +367,7 @@
22001
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22002
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22003
retarray->offset = 0;
22004
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22005
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22007
else if (unlikely (compile_options.bounds_check))
22009
Index: libgfortran/generated/count_4_l.c
22010
===================================================================
22011
--- a/src/libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release)
22012
+++ b/src/libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch)
22013
@@ -101,8 +101,7 @@
22014
retarray->offset = 0;
22015
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22017
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22018
- * extent[rank-1];
22019
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22021
if (alloc_size == 0)
22023
@@ -111,7 +110,7 @@
22027
- retarray->base_addr = xmalloc (alloc_size);
22028
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22032
Index: libgfortran/generated/sum_r10.c
22033
===================================================================
22034
--- a/src/libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release)
22035
+++ b/src/libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch)
22037
retarray->offset = 0;
22038
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22040
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22041
- * extent[rank-1];
22042
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22044
- retarray->base_addr = xmalloc (alloc_size);
22045
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22046
if (alloc_size == 0)
22048
/* Make sure we have a zero-sized array. */
22049
@@ -272,8 +271,7 @@
22053
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22054
- * extent[rank-1];
22055
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22057
retarray->offset = 0;
22058
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22059
@@ -285,7 +283,7 @@
22063
- retarray->base_addr = xmalloc (alloc_size);
22064
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22068
@@ -430,8 +428,7 @@
22069
retarray->offset = 0;
22070
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22072
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22073
- * extent[rank-1];
22074
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22076
if (alloc_size == 0)
22078
@@ -440,7 +437,7 @@
22082
- retarray->base_addr = xmalloc (alloc_size);
22083
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22087
Index: libgfortran/generated/sum_c4.c
22088
===================================================================
22089
--- a/src/libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release)
22090
+++ b/src/libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch)
22092
retarray->offset = 0;
22093
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22095
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22096
- * extent[rank-1];
22097
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22099
- retarray->base_addr = xmalloc (alloc_size);
22100
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22101
if (alloc_size == 0)
22103
/* Make sure we have a zero-sized array. */
22104
@@ -272,8 +271,7 @@
22108
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22109
- * extent[rank-1];
22110
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22112
retarray->offset = 0;
22113
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22114
@@ -285,7 +283,7 @@
22118
- retarray->base_addr = xmalloc (alloc_size);
22119
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22123
@@ -430,8 +428,7 @@
22124
retarray->offset = 0;
22125
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22127
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22128
- * extent[rank-1];
22129
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22131
if (alloc_size == 0)
22133
@@ -440,7 +437,7 @@
22137
- retarray->base_addr = xmalloc (alloc_size);
22138
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22142
Index: libgfortran/generated/maxloc1_16_r10.c
22143
===================================================================
22144
--- a/src/libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release)
22145
+++ b/src/libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch)
22147
retarray->offset = 0;
22148
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22150
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22151
- * extent[rank-1];
22152
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22154
- retarray->base_addr = xmalloc (alloc_size);
22155
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22156
if (alloc_size == 0)
22158
/* Make sure we have a zero-sized array. */
22159
@@ -294,8 +293,7 @@
22163
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22164
- * extent[rank-1];
22165
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22167
retarray->offset = 0;
22168
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22169
@@ -307,7 +305,7 @@
22173
- retarray->base_addr = xmalloc (alloc_size);
22174
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22178
@@ -485,8 +483,7 @@
22179
retarray->offset = 0;
22180
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22182
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22183
- * extent[rank-1];
22184
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22186
if (alloc_size == 0)
22188
@@ -495,7 +492,7 @@
22192
- retarray->base_addr = xmalloc (alloc_size);
22193
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22197
Index: libgfortran/generated/pack_i16.c
22198
===================================================================
22199
--- a/src/libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release)
22200
+++ b/src/libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch)
22201
@@ -167,8 +167,8 @@
22205
- /* xmalloc allocates a single byte for zero size. */
22206
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
22207
+ /* xmallocarray allocates a single byte for zero size. */
22208
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
22212
Index: libgfortran/generated/matmul_i8.c
22213
===================================================================
22214
--- a/src/libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release)
22215
+++ b/src/libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch)
22216
@@ -124,7 +124,7 @@
22219
retarray->base_addr
22220
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
22221
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
22222
retarray->offset = 0;
22224
else if (unlikely (compile_options.bounds_check))
22225
Index: libgfortran/generated/maxloc0_16_i2.c
22226
===================================================================
22227
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
22228
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
22230
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22231
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22232
retarray->offset = 0;
22233
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22234
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22238
@@ -199,7 +199,7 @@
22239
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22240
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22241
retarray->offset = 0;
22242
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22243
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22247
@@ -367,7 +367,7 @@
22248
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22249
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22250
retarray->offset = 0;
22251
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22252
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22254
else if (unlikely (compile_options.bounds_check))
22256
Index: libgfortran/generated/spread_c4.c
22257
===================================================================
22258
--- a/src/libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release)
22259
+++ b/src/libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch)
22260
@@ -101,8 +101,8 @@
22264
- /* xmalloc allocates a single byte for zero size. */
22265
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
22266
+ /* xmallocarray allocates a single byte for zero size. */
22267
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
22271
@@ -244,7 +244,7 @@
22273
if (ret->base_addr == NULL)
22275
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
22276
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
22278
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
22280
Index: libgfortran/generated/maxval_r10.c
22281
===================================================================
22282
--- a/src/libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release)
22283
+++ b/src/libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch)
22285
retarray->offset = 0;
22286
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22288
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22289
- * extent[rank-1];
22290
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22292
- retarray->base_addr = xmalloc (alloc_size);
22293
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22294
if (alloc_size == 0)
22296
/* Make sure we have a zero-sized array. */
22297
@@ -286,8 +285,7 @@
22301
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22302
- * extent[rank-1];
22303
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22305
retarray->offset = 0;
22306
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22307
@@ -299,7 +297,7 @@
22311
- retarray->base_addr = xmalloc (alloc_size);
22312
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22316
@@ -472,8 +470,7 @@
22317
retarray->offset = 0;
22318
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22320
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22321
- * extent[rank-1];
22322
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22324
if (alloc_size == 0)
22326
@@ -482,7 +479,7 @@
22330
- retarray->base_addr = xmalloc (alloc_size);
22331
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22335
Index: libgfortran/generated/pack_i4.c
22336
===================================================================
22337
--- a/src/libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release)
22338
+++ b/src/libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch)
22339
@@ -167,8 +167,8 @@
22343
- /* xmalloc allocates a single byte for zero size. */
22344
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
22345
+ /* xmallocarray allocates a single byte for zero size. */
22346
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
22350
Index: libgfortran/generated/maxloc1_4_i1.c
22351
===================================================================
22352
--- a/src/libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release)
22353
+++ b/src/libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch)
22355
retarray->offset = 0;
22356
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22358
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22359
- * extent[rank-1];
22360
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22362
- retarray->base_addr = xmalloc (alloc_size);
22363
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22364
if (alloc_size == 0)
22366
/* Make sure we have a zero-sized array. */
22367
@@ -294,8 +293,7 @@
22371
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22372
- * extent[rank-1];
22373
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22375
retarray->offset = 0;
22376
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22377
@@ -307,7 +305,7 @@
22381
- retarray->base_addr = xmalloc (alloc_size);
22382
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22386
@@ -485,8 +483,7 @@
22387
retarray->offset = 0;
22388
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22390
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22391
- * extent[rank-1];
22392
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22394
if (alloc_size == 0)
22396
@@ -495,7 +492,7 @@
22400
- retarray->base_addr = xmalloc (alloc_size);
22401
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22405
Index: libgfortran/generated/matmul_r10.c
22406
===================================================================
22407
--- a/src/libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release)
22408
+++ b/src/libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch)
22409
@@ -124,7 +124,7 @@
22412
retarray->base_addr
22413
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
22414
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
22415
retarray->offset = 0;
22417
else if (unlikely (compile_options.bounds_check))
22418
Index: libgfortran/generated/minloc1_4_i8.c
22419
===================================================================
22420
--- a/src/libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release)
22421
+++ b/src/libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch)
22423
retarray->offset = 0;
22424
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22426
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22427
- * extent[rank-1];
22428
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22430
- retarray->base_addr = xmalloc (alloc_size);
22431
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22432
if (alloc_size == 0)
22434
/* Make sure we have a zero-sized array. */
22435
@@ -294,8 +293,7 @@
22439
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22440
- * extent[rank-1];
22441
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22443
retarray->offset = 0;
22444
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22445
@@ -307,7 +305,7 @@
22449
- retarray->base_addr = xmalloc (alloc_size);
22450
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22454
@@ -485,8 +483,7 @@
22455
retarray->offset = 0;
22456
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22458
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22459
- * extent[rank-1];
22460
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22462
if (alloc_size == 0)
22464
@@ -495,7 +492,7 @@
22468
- retarray->base_addr = xmalloc (alloc_size);
22469
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22473
Index: libgfortran/generated/minloc0_8_r4.c
22474
===================================================================
22475
--- a/src/libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release)
22476
+++ b/src/libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch)
22478
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22479
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22480
retarray->offset = 0;
22481
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22482
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22486
@@ -199,7 +199,7 @@
22487
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22488
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22489
retarray->offset = 0;
22490
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22491
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22495
@@ -367,7 +367,7 @@
22496
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22497
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22498
retarray->offset = 0;
22499
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22500
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22502
else if (unlikely (compile_options.bounds_check))
22504
Index: libgfortran/generated/matmul_l4.c
22505
===================================================================
22506
--- a/src/libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release)
22507
+++ b/src/libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch)
22511
retarray->base_addr
22512
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
22513
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
22514
retarray->offset = 0;
22516
else if (unlikely (compile_options.bounds_check))
22517
Index: libgfortran/generated/reshape_r8.c
22518
===================================================================
22519
--- a/src/libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release)
22520
+++ b/src/libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch)
22521
@@ -111,11 +111,11 @@
22524
if (unlikely (rs < 1))
22528
- alloc_size = rs * sizeof (GFC_REAL_8);
22531
- ret->base_addr = xmalloc (alloc_size);
22532
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22533
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22536
Index: libgfortran/generated/in_pack_c10.c
22537
===================================================================
22538
--- a/src/libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release)
22539
+++ b/src/libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch)
22541
return source->base_addr;
22543
/* Allocate storage for the destination. */
22544
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
22545
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
22547
src = source->base_addr;
22548
stride0 = stride[0];
22549
Index: libgfortran/generated/all_l4.c
22550
===================================================================
22551
--- a/src/libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release)
22552
+++ b/src/libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch)
22553
@@ -101,8 +101,7 @@
22554
retarray->offset = 0;
22555
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22557
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22558
- * extent[rank-1];
22559
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22561
if (alloc_size == 0)
22563
@@ -111,7 +110,7 @@
22567
- retarray->base_addr = xmalloc (alloc_size);
22568
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
22572
Index: libgfortran/generated/minloc0_8_i2.c
22573
===================================================================
22574
--- a/src/libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release)
22575
+++ b/src/libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch)
22577
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22578
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22579
retarray->offset = 0;
22580
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22581
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22585
@@ -199,7 +199,7 @@
22586
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22587
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22588
retarray->offset = 0;
22589
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22590
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22594
@@ -367,7 +367,7 @@
22595
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22596
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22597
retarray->offset = 0;
22598
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22599
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22601
else if (unlikely (compile_options.bounds_check))
22603
Index: libgfortran/generated/norm2_r16.c
22604
===================================================================
22605
--- a/src/libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release)
22606
+++ b/src/libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch)
22607
@@ -105,10 +105,9 @@
22608
retarray->offset = 0;
22609
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22611
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22612
- * extent[rank-1];
22613
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22615
- retarray->base_addr = xmalloc (alloc_size);
22616
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22617
if (alloc_size == 0)
22619
/* Make sure we have a zero-sized array. */
22620
Index: libgfortran/generated/reshape_c10.c
22621
===================================================================
22622
--- a/src/libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release)
22623
+++ b/src/libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch)
22624
@@ -111,11 +111,11 @@
22627
if (unlikely (rs < 1))
22631
- alloc_size = rs * sizeof (GFC_COMPLEX_10);
22634
- ret->base_addr = xmalloc (alloc_size);
22635
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
22636
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22639
Index: libgfortran/generated/unpack_c16.c
22640
===================================================================
22641
--- a/src/libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release)
22642
+++ b/src/libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch)
22647
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
22648
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
22652
@@ -244,7 +244,7 @@
22656
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
22657
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
22661
Index: libgfortran/generated/maxloc1_4_r4.c
22662
===================================================================
22663
--- a/src/libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release)
22664
+++ b/src/libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch)
22666
retarray->offset = 0;
22667
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22669
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22670
- * extent[rank-1];
22671
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22673
- retarray->base_addr = xmalloc (alloc_size);
22674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22675
if (alloc_size == 0)
22677
/* Make sure we have a zero-sized array. */
22678
@@ -294,8 +293,7 @@
22682
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22683
- * extent[rank-1];
22684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22686
retarray->offset = 0;
22687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22688
@@ -307,7 +305,7 @@
22692
- retarray->base_addr = xmalloc (alloc_size);
22693
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22697
@@ -485,8 +483,7 @@
22698
retarray->offset = 0;
22699
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22701
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22702
- * extent[rank-1];
22703
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22705
if (alloc_size == 0)
22707
@@ -495,7 +492,7 @@
22711
- retarray->base_addr = xmalloc (alloc_size);
22712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22716
Index: libgfortran/generated/maxval_r8.c
22717
===================================================================
22718
--- a/src/libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release)
22719
+++ b/src/libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch)
22721
retarray->offset = 0;
22722
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22724
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22725
- * extent[rank-1];
22726
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22728
- retarray->base_addr = xmalloc (alloc_size);
22729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22730
if (alloc_size == 0)
22732
/* Make sure we have a zero-sized array. */
22733
@@ -286,8 +285,7 @@
22737
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22738
- * extent[rank-1];
22739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22741
retarray->offset = 0;
22742
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22743
@@ -299,7 +297,7 @@
22747
- retarray->base_addr = xmalloc (alloc_size);
22748
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22752
@@ -472,8 +470,7 @@
22753
retarray->offset = 0;
22754
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22756
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22757
- * extent[rank-1];
22758
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22760
if (alloc_size == 0)
22762
@@ -482,7 +479,7 @@
22766
- retarray->base_addr = xmalloc (alloc_size);
22767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22771
Index: libgfortran/generated/transpose_c4.c
22772
===================================================================
22773
--- a/src/libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release)
22774
+++ b/src/libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch)
22776
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
22777
GFC_DESCRIPTOR_EXTENT(source, 1));
22779
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
22780
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
22781
+ sizeof (GFC_COMPLEX_4));
22783
} else if (unlikely (compile_options.bounds_check))
22785
Index: libgfortran/generated/eoshift1_4.c
22786
===================================================================
22787
--- a/src/libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release)
22788
+++ b/src/libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch)
22789
@@ -105,8 +105,8 @@
22790
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
22793
- /* xmalloc allocates a single byte for zero size. */
22794
- ret->base_addr = xmalloc (size * arraysize);
22795
+ /* xmallocarray allocates a single byte for zero size. */
22796
+ ret->base_addr = xmallocarray (arraysize, size);
22799
else if (unlikely (compile_options.bounds_check))
22800
Index: libgfortran/generated/minval_r16.c
22801
===================================================================
22802
--- a/src/libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release)
22803
+++ b/src/libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch)
22805
retarray->offset = 0;
22806
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22808
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22809
- * extent[rank-1];
22810
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22812
- retarray->base_addr = xmalloc (alloc_size);
22813
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22814
if (alloc_size == 0)
22816
/* Make sure we have a zero-sized array. */
22817
@@ -286,8 +285,7 @@
22821
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22822
- * extent[rank-1];
22823
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22825
retarray->offset = 0;
22826
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22827
@@ -299,7 +297,7 @@
22831
- retarray->base_addr = xmalloc (alloc_size);
22832
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22836
@@ -472,8 +470,7 @@
22837
retarray->offset = 0;
22838
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22840
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22841
- * extent[rank-1];
22842
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22844
if (alloc_size == 0)
22846
@@ -482,7 +479,7 @@
22850
- retarray->base_addr = xmalloc (alloc_size);
22851
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
22855
Index: libgfortran/generated/iany_i16.c
22856
===================================================================
22857
--- a/src/libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release)
22858
+++ b/src/libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch)
22860
retarray->offset = 0;
22861
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22863
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22864
- * extent[rank-1];
22865
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22867
- retarray->base_addr = xmalloc (alloc_size);
22868
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22869
if (alloc_size == 0)
22871
/* Make sure we have a zero-sized array. */
22872
@@ -272,8 +271,7 @@
22876
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22877
- * extent[rank-1];
22878
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22880
retarray->offset = 0;
22881
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22882
@@ -285,7 +283,7 @@
22886
- retarray->base_addr = xmalloc (alloc_size);
22887
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22891
@@ -430,8 +428,7 @@
22892
retarray->offset = 0;
22893
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22895
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22896
- * extent[rank-1];
22897
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22899
if (alloc_size == 0)
22901
@@ -440,7 +437,7 @@
22905
- retarray->base_addr = xmalloc (alloc_size);
22906
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22910
Index: libgfortran/generated/maxloc1_4_i2.c
22911
===================================================================
22912
--- a/src/libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release)
22913
+++ b/src/libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch)
22915
retarray->offset = 0;
22916
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22918
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22919
- * extent[rank-1];
22920
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22922
- retarray->base_addr = xmalloc (alloc_size);
22923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22924
if (alloc_size == 0)
22926
/* Make sure we have a zero-sized array. */
22927
@@ -294,8 +293,7 @@
22931
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22932
- * extent[rank-1];
22933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22935
retarray->offset = 0;
22936
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22937
@@ -307,7 +305,7 @@
22941
- retarray->base_addr = xmalloc (alloc_size);
22942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22946
@@ -485,8 +483,7 @@
22947
retarray->offset = 0;
22948
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22950
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22951
- * extent[rank-1];
22952
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22954
if (alloc_size == 0)
22956
@@ -495,7 +492,7 @@
22960
- retarray->base_addr = xmalloc (alloc_size);
22961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22965
Index: libgfortran/generated/maxloc1_8_i8.c
22966
===================================================================
22967
--- a/src/libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release)
22968
+++ b/src/libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch)
22970
retarray->offset = 0;
22971
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22973
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22974
- * extent[rank-1];
22975
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22977
- retarray->base_addr = xmalloc (alloc_size);
22978
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22979
if (alloc_size == 0)
22981
/* Make sure we have a zero-sized array. */
22982
@@ -294,8 +293,7 @@
22986
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22987
- * extent[rank-1];
22988
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22990
retarray->offset = 0;
22991
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22992
@@ -307,7 +305,7 @@
22996
- retarray->base_addr = xmalloc (alloc_size);
22997
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23001
@@ -485,8 +483,7 @@
23002
retarray->offset = 0;
23003
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23005
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23006
- * extent[rank-1];
23007
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23009
if (alloc_size == 0)
23011
@@ -495,7 +492,7 @@
23015
- retarray->base_addr = xmalloc (alloc_size);
23016
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23020
Index: libgfortran/generated/maxloc0_4_r8.c
23021
===================================================================
23022
--- a/src/libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release)
23023
+++ b/src/libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch)
23025
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23026
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23027
retarray->offset = 0;
23028
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23029
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23033
@@ -199,7 +199,7 @@
23034
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23035
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23036
retarray->offset = 0;
23037
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23038
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23042
@@ -367,7 +367,7 @@
23043
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23044
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23045
retarray->offset = 0;
23046
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23047
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23049
else if (unlikely (compile_options.bounds_check))
23051
Index: libgfortran/generated/maxloc0_16_r16.c
23052
===================================================================
23053
--- a/src/libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release)
23054
+++ b/src/libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch)
23056
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23057
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23058
retarray->offset = 0;
23059
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23060
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23064
@@ -199,7 +199,7 @@
23065
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23066
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23067
retarray->offset = 0;
23068
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23069
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23073
@@ -367,7 +367,7 @@
23074
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23075
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23076
retarray->offset = 0;
23077
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23078
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23080
else if (unlikely (compile_options.bounds_check))
23082
Index: libgfortran/generated/sum_c10.c
23083
===================================================================
23084
--- a/src/libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release)
23085
+++ b/src/libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch)
23087
retarray->offset = 0;
23088
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23090
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23091
- * extent[rank-1];
23092
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23094
- retarray->base_addr = xmalloc (alloc_size);
23095
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
23096
if (alloc_size == 0)
23098
/* Make sure we have a zero-sized array. */
23099
@@ -272,8 +271,7 @@
23103
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23104
- * extent[rank-1];
23105
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23107
retarray->offset = 0;
23108
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23109
@@ -285,7 +283,7 @@
23113
- retarray->base_addr = xmalloc (alloc_size);
23114
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
23118
@@ -430,8 +428,7 @@
23119
retarray->offset = 0;
23120
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23122
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23123
- * extent[rank-1];
23124
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23126
if (alloc_size == 0)
23128
@@ -440,7 +437,7 @@
23132
- retarray->base_addr = xmalloc (alloc_size);
23133
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
23137
Index: libgfortran/generated/iall_i4.c
23138
===================================================================
23139
--- a/src/libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release)
23140
+++ b/src/libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch)
23142
retarray->offset = 0;
23143
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23145
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23146
- * extent[rank-1];
23147
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23149
- retarray->base_addr = xmalloc (alloc_size);
23150
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23151
if (alloc_size == 0)
23153
/* Make sure we have a zero-sized array. */
23154
@@ -272,8 +271,7 @@
23158
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23159
- * extent[rank-1];
23160
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23162
retarray->offset = 0;
23163
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23164
@@ -285,7 +283,7 @@
23168
- retarray->base_addr = xmalloc (alloc_size);
23169
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23173
@@ -430,8 +428,7 @@
23174
retarray->offset = 0;
23175
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23177
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23178
- * extent[rank-1];
23179
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23181
if (alloc_size == 0)
23183
@@ -440,7 +437,7 @@
23187
- retarray->base_addr = xmalloc (alloc_size);
23188
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23192
Index: libgfortran/generated/minloc1_4_r16.c
23193
===================================================================
23194
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
23195
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
23197
retarray->offset = 0;
23198
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23200
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23201
- * extent[rank-1];
23202
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23204
- retarray->base_addr = xmalloc (alloc_size);
23205
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23206
if (alloc_size == 0)
23208
/* Make sure we have a zero-sized array. */
23209
@@ -294,8 +293,7 @@
23213
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23214
- * extent[rank-1];
23215
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23217
retarray->offset = 0;
23218
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23219
@@ -307,7 +305,7 @@
23223
- retarray->base_addr = xmalloc (alloc_size);
23224
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23228
@@ -485,8 +483,7 @@
23229
retarray->offset = 0;
23230
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23232
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23233
- * extent[rank-1];
23234
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23236
if (alloc_size == 0)
23238
@@ -495,7 +492,7 @@
23242
- retarray->base_addr = xmalloc (alloc_size);
23243
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23247
Index: libgfortran/generated/maxloc0_8_r16.c
23248
===================================================================
23249
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
23250
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
23252
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23253
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23254
retarray->offset = 0;
23255
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23256
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23260
@@ -199,7 +199,7 @@
23261
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23262
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23263
retarray->offset = 0;
23264
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23265
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23269
@@ -367,7 +367,7 @@
23270
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23271
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23272
retarray->offset = 0;
23273
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23274
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23276
else if (unlikely (compile_options.bounds_check))
23278
Index: libgfortran/generated/pack_r8.c
23279
===================================================================
23280
--- a/src/libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release)
23281
+++ b/src/libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch)
23282
@@ -167,8 +167,8 @@
23286
- /* xmalloc allocates a single byte for zero size. */
23287
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
23288
+ /* xmallocarray allocates a single byte for zero size. */
23289
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
23293
Index: libgfortran/generated/matmul_c10.c
23294
===================================================================
23295
--- a/src/libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release)
23296
+++ b/src/libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch)
23297
@@ -124,7 +124,7 @@
23300
retarray->base_addr
23301
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
23302
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
23303
retarray->offset = 0;
23305
else if (unlikely (compile_options.bounds_check))
23306
Index: libgfortran/generated/maxloc0_16_i4.c
23307
===================================================================
23308
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
23309
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
23311
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23312
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23313
retarray->offset = 0;
23314
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23315
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23319
@@ -199,7 +199,7 @@
23320
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23321
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23322
retarray->offset = 0;
23323
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23324
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23328
@@ -367,7 +367,7 @@
23329
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23330
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23331
retarray->offset = 0;
23332
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23333
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23335
else if (unlikely (compile_options.bounds_check))
23337
Index: libgfortran/generated/pack_r16.c
23338
===================================================================
23339
--- a/src/libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release)
23340
+++ b/src/libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch)
23341
@@ -167,8 +167,8 @@
23345
- /* xmalloc allocates a single byte for zero size. */
23346
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
23347
+ /* xmallocarray allocates a single byte for zero size. */
23348
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
23352
Index: libgfortran/generated/minloc1_16_i8.c
23353
===================================================================
23354
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
23355
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
23357
retarray->offset = 0;
23358
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23360
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23361
- * extent[rank-1];
23362
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23364
- retarray->base_addr = xmalloc (alloc_size);
23365
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23366
if (alloc_size == 0)
23368
/* Make sure we have a zero-sized array. */
23369
@@ -294,8 +293,7 @@
23373
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23374
- * extent[rank-1];
23375
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23377
retarray->offset = 0;
23378
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23379
@@ -307,7 +305,7 @@
23383
- retarray->base_addr = xmalloc (alloc_size);
23384
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23388
@@ -485,8 +483,7 @@
23389
retarray->offset = 0;
23390
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23392
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23393
- * extent[rank-1];
23394
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23396
if (alloc_size == 0)
23398
@@ -495,7 +492,7 @@
23402
- retarray->base_addr = xmalloc (alloc_size);
23403
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23407
Index: libgfortran/generated/minloc0_16_r10.c
23408
===================================================================
23409
--- a/src/libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release)
23410
+++ b/src/libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch)
23412
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23413
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23414
retarray->offset = 0;
23415
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23416
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23420
@@ -199,7 +199,7 @@
23421
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23422
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23423
retarray->offset = 0;
23424
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23425
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23429
@@ -367,7 +367,7 @@
23430
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23431
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23432
retarray->offset = 0;
23433
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23434
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23436
else if (unlikely (compile_options.bounds_check))
23438
Index: libgfortran/generated/unpack_c4.c
23439
===================================================================
23440
--- a/src/libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release)
23441
+++ b/src/libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch)
23446
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
23447
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
23451
@@ -244,7 +244,7 @@
23455
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
23456
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
23460
Index: libgfortran/generated/iparity_i1.c
23461
===================================================================
23462
--- a/src/libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release)
23463
+++ b/src/libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch)
23465
retarray->offset = 0;
23466
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23468
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23469
- * extent[rank-1];
23470
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23472
- retarray->base_addr = xmalloc (alloc_size);
23473
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23474
if (alloc_size == 0)
23476
/* Make sure we have a zero-sized array. */
23477
@@ -272,8 +271,7 @@
23481
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23482
- * extent[rank-1];
23483
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23485
retarray->offset = 0;
23486
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23487
@@ -285,7 +283,7 @@
23491
- retarray->base_addr = xmalloc (alloc_size);
23492
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23496
@@ -430,8 +428,7 @@
23497
retarray->offset = 0;
23498
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23500
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23501
- * extent[rank-1];
23502
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23504
if (alloc_size == 0)
23506
@@ -440,7 +437,7 @@
23510
- retarray->base_addr = xmalloc (alloc_size);
23511
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23515
Index: libgfortran/generated/product_c8.c
23516
===================================================================
23517
--- a/src/libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release)
23518
+++ b/src/libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch)
23520
retarray->offset = 0;
23521
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23523
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23524
- * extent[rank-1];
23525
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23527
- retarray->base_addr = xmalloc (alloc_size);
23528
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23529
if (alloc_size == 0)
23531
/* Make sure we have a zero-sized array. */
23532
@@ -272,8 +271,7 @@
23536
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23537
- * extent[rank-1];
23538
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23540
retarray->offset = 0;
23541
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23542
@@ -285,7 +283,7 @@
23546
- retarray->base_addr = xmalloc (alloc_size);
23547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23551
@@ -430,8 +428,7 @@
23552
retarray->offset = 0;
23553
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23555
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23556
- * extent[rank-1];
23557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23559
if (alloc_size == 0)
23561
@@ -440,7 +437,7 @@
23565
- retarray->base_addr = xmalloc (alloc_size);
23566
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
23570
Index: libgfortran/generated/in_pack_i16.c
23571
===================================================================
23572
--- a/src/libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release)
23573
+++ b/src/libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch)
23575
return source->base_addr;
23577
/* Allocate storage for the destination. */
23578
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
23579
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
23581
src = source->base_addr;
23582
stride0 = stride[0];
23583
Index: libgfortran/generated/minloc0_8_i4.c
23584
===================================================================
23585
--- a/src/libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release)
23586
+++ b/src/libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch)
23588
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23589
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23590
retarray->offset = 0;
23591
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23592
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23596
@@ -199,7 +199,7 @@
23597
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23598
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23599
retarray->offset = 0;
23600
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23601
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23605
@@ -367,7 +367,7 @@
23606
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23607
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23608
retarray->offset = 0;
23609
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23610
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23612
else if (unlikely (compile_options.bounds_check))
23614
Index: libgfortran/generated/matmul_c4.c
23615
===================================================================
23616
--- a/src/libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release)
23617
+++ b/src/libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch)
23618
@@ -124,7 +124,7 @@
23621
retarray->base_addr
23622
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
23623
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
23624
retarray->offset = 0;
23626
else if (unlikely (compile_options.bounds_check))
23627
Index: libgfortran/generated/reshape_i8.c
23628
===================================================================
23629
--- a/src/libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release)
23630
+++ b/src/libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch)
23631
@@ -111,11 +111,11 @@
23634
if (unlikely (rs < 1))
23638
- alloc_size = rs * sizeof (GFC_INTEGER_8);
23641
- ret->base_addr = xmalloc (alloc_size);
23642
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23643
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23646
Index: libgfortran/generated/in_pack_c8.c
23647
===================================================================
23648
--- a/src/libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release)
23649
+++ b/src/libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch)
23651
return source->base_addr;
23653
/* Allocate storage for the destination. */
23654
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
23655
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
23657
src = source->base_addr;
23658
stride0 = stride[0];
23659
Index: libgfortran/generated/bessel_r10.c
23660
===================================================================
23661
--- a/src/libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release)
23662
+++ b/src/libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch)
23665
size_t size = n2 < n1 ? 0 : n2-n1+1;
23666
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
23667
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
23668
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
23672
@@ -122,7 +122,7 @@
23674
size_t size = n2 < n1 ? 0 : n2-n1+1;
23675
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
23676
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
23677
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
23681
@@ -162,7 +162,7 @@
23683
x2rev = GFC_REAL_10_LITERAL(2.)/x;
23685
- for (i = 2; i <= n1+n2; i++)
23686
+ for (i = 2; i <= n2 - n1; i++)
23688
#if defined(GFC_REAL_10_INFINITY)
23689
if (unlikely (last2 == -GFC_REAL_10_INFINITY))
23690
Index: libgfortran/generated/iall_i16.c
23691
===================================================================
23692
--- a/src/libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release)
23693
+++ b/src/libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch)
23695
retarray->offset = 0;
23696
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23698
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23699
- * extent[rank-1];
23700
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23702
- retarray->base_addr = xmalloc (alloc_size);
23703
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23704
if (alloc_size == 0)
23706
/* Make sure we have a zero-sized array. */
23707
@@ -272,8 +271,7 @@
23711
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23712
- * extent[rank-1];
23713
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23715
retarray->offset = 0;
23716
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23717
@@ -285,7 +283,7 @@
23721
- retarray->base_addr = xmalloc (alloc_size);
23722
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23726
@@ -430,8 +428,7 @@
23727
retarray->offset = 0;
23728
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23730
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23731
- * extent[rank-1];
23732
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23734
if (alloc_size == 0)
23736
@@ -440,7 +437,7 @@
23740
- retarray->base_addr = xmalloc (alloc_size);
23741
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23745
Index: libgfortran/generated/maxloc1_16_i1.c
23746
===================================================================
23747
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
23748
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
23750
retarray->offset = 0;
23751
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23753
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23754
- * extent[rank-1];
23755
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23757
- retarray->base_addr = xmalloc (alloc_size);
23758
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23759
if (alloc_size == 0)
23761
/* Make sure we have a zero-sized array. */
23762
@@ -294,8 +293,7 @@
23766
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23767
- * extent[rank-1];
23768
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23770
retarray->offset = 0;
23771
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23772
@@ -307,7 +305,7 @@
23776
- retarray->base_addr = xmalloc (alloc_size);
23777
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23781
@@ -485,8 +483,7 @@
23782
retarray->offset = 0;
23783
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23785
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23786
- * extent[rank-1];
23787
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23789
if (alloc_size == 0)
23791
@@ -495,7 +492,7 @@
23795
- retarray->base_addr = xmalloc (alloc_size);
23796
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23800
Index: libgfortran/generated/reshape_i16.c
23801
===================================================================
23802
--- a/src/libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release)
23803
+++ b/src/libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch)
23804
@@ -111,11 +111,11 @@
23807
if (unlikely (rs < 1))
23811
- alloc_size = rs * sizeof (GFC_INTEGER_16);
23814
- ret->base_addr = xmalloc (alloc_size);
23815
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23816
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23819
Index: libgfortran/generated/count_16_l.c
23820
===================================================================
23821
--- a/src/libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release)
23822
+++ b/src/libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch)
23823
@@ -101,8 +101,7 @@
23824
retarray->offset = 0;
23825
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23827
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23828
- * extent[rank-1];
23829
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23831
if (alloc_size == 0)
23833
@@ -111,7 +110,7 @@
23837
- retarray->base_addr = xmalloc (alloc_size);
23838
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23842
Index: libgfortran/generated/minloc1_8_i1.c
23843
===================================================================
23844
--- a/src/libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release)
23845
+++ b/src/libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch)
23847
retarray->offset = 0;
23848
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23850
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23851
- * extent[rank-1];
23852
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23854
- retarray->base_addr = xmalloc (alloc_size);
23855
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23856
if (alloc_size == 0)
23858
/* Make sure we have a zero-sized array. */
23859
@@ -294,8 +293,7 @@
23863
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23864
- * extent[rank-1];
23865
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23867
retarray->offset = 0;
23868
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23869
@@ -307,7 +305,7 @@
23873
- retarray->base_addr = xmalloc (alloc_size);
23874
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23878
@@ -485,8 +483,7 @@
23879
retarray->offset = 0;
23880
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23882
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23883
- * extent[rank-1];
23884
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23886
if (alloc_size == 0)
23888
@@ -495,7 +492,7 @@
23892
- retarray->base_addr = xmalloc (alloc_size);
23893
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23897
Index: libgfortran/generated/maxloc1_4_i4.c
23898
===================================================================
23899
--- a/src/libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release)
23900
+++ b/src/libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch)
23902
retarray->offset = 0;
23903
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23905
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23906
- * extent[rank-1];
23907
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23909
- retarray->base_addr = xmalloc (alloc_size);
23910
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23911
if (alloc_size == 0)
23913
/* Make sure we have a zero-sized array. */
23914
@@ -294,8 +293,7 @@
23918
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23919
- * extent[rank-1];
23920
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23922
retarray->offset = 0;
23923
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23924
@@ -307,7 +305,7 @@
23928
- retarray->base_addr = xmalloc (alloc_size);
23929
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23933
@@ -485,8 +483,7 @@
23934
retarray->offset = 0;
23935
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23937
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23938
- * extent[rank-1];
23939
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23941
if (alloc_size == 0)
23943
@@ -495,7 +492,7 @@
23947
- retarray->base_addr = xmalloc (alloc_size);
23948
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23952
Index: libgfortran/generated/maxval_i8.c
23953
===================================================================
23954
--- a/src/libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release)
23955
+++ b/src/libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch)
23957
retarray->offset = 0;
23958
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23960
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23961
- * extent[rank-1];
23962
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23964
- retarray->base_addr = xmalloc (alloc_size);
23965
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23966
if (alloc_size == 0)
23968
/* Make sure we have a zero-sized array. */
23969
@@ -286,8 +285,7 @@
23973
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23974
- * extent[rank-1];
23975
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23977
retarray->offset = 0;
23978
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23979
@@ -299,7 +297,7 @@
23983
- retarray->base_addr = xmalloc (alloc_size);
23984
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23988
@@ -472,8 +470,7 @@
23989
retarray->offset = 0;
23990
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23992
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23993
- * extent[rank-1];
23994
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23996
if (alloc_size == 0)
23998
@@ -482,7 +479,7 @@
24002
- retarray->base_addr = xmalloc (alloc_size);
24003
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24007
Index: libgfortran/generated/eoshift3_16.c
24008
===================================================================
24009
--- a/src/libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release)
24010
+++ b/src/libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch)
24015
- ret->base_addr = xmalloc (size * arraysize);
24016
+ ret->base_addr = xmallocarray (arraysize, size);
24018
ret->dtype = array->dtype;
24019
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
24020
@@ -107,8 +107,8 @@
24021
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
24024
- /* xmalloc allocates a single byte for zero size. */
24025
- ret->base_addr = xmalloc (size * arraysize);
24026
+ /* xmallocarray allocates a single byte for zero size. */
24027
+ ret->base_addr = xmallocarray (arraysize, size);
24030
else if (unlikely (compile_options.bounds_check))
24031
Index: libgfortran/generated/shape_i8.c
24032
===================================================================
24033
--- a/src/libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release)
24034
+++ b/src/libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch)
24037
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
24039
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24040
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24043
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
24044
Index: libgfortran/generated/maxloc0_4_i16.c
24045
===================================================================
24046
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
24047
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
24049
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24050
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24051
retarray->offset = 0;
24052
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24053
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24057
@@ -199,7 +199,7 @@
24058
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24059
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24060
retarray->offset = 0;
24061
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24062
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24066
@@ -367,7 +367,7 @@
24067
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24068
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24069
retarray->offset = 0;
24070
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24071
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24073
else if (unlikely (compile_options.bounds_check))
24075
Index: libgfortran/generated/maxloc1_4_r10.c
24076
===================================================================
24077
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
24078
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
24080
retarray->offset = 0;
24081
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24083
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24084
- * extent[rank-1];
24085
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24087
- retarray->base_addr = xmalloc (alloc_size);
24088
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24089
if (alloc_size == 0)
24091
/* Make sure we have a zero-sized array. */
24092
@@ -294,8 +293,7 @@
24096
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24097
- * extent[rank-1];
24098
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24100
retarray->offset = 0;
24101
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24102
@@ -307,7 +305,7 @@
24106
- retarray->base_addr = xmalloc (alloc_size);
24107
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24111
@@ -485,8 +483,7 @@
24112
retarray->offset = 0;
24113
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24115
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24116
- * extent[rank-1];
24117
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24119
if (alloc_size == 0)
24121
@@ -495,7 +492,7 @@
24125
- retarray->base_addr = xmalloc (alloc_size);
24126
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24130
Index: libgfortran/generated/maxloc1_8_i16.c
24131
===================================================================
24132
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
24133
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
24135
retarray->offset = 0;
24136
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24138
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24139
- * extent[rank-1];
24140
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24142
- retarray->base_addr = xmalloc (alloc_size);
24143
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24144
if (alloc_size == 0)
24146
/* Make sure we have a zero-sized array. */
24147
@@ -294,8 +293,7 @@
24151
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24152
- * extent[rank-1];
24153
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24155
retarray->offset = 0;
24156
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24157
@@ -307,7 +305,7 @@
24161
- retarray->base_addr = xmalloc (alloc_size);
24162
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24166
@@ -485,8 +483,7 @@
24167
retarray->offset = 0;
24168
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24170
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24171
- * extent[rank-1];
24172
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24174
if (alloc_size == 0)
24176
@@ -495,7 +492,7 @@
24180
- retarray->base_addr = xmalloc (alloc_size);
24181
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24185
Index: libgfortran/generated/minloc0_8_r10.c
24186
===================================================================
24187
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
24188
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
24190
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24191
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24192
retarray->offset = 0;
24193
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24194
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24198
@@ -199,7 +199,7 @@
24199
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24200
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24201
retarray->offset = 0;
24202
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24203
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24207
@@ -367,7 +367,7 @@
24208
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24209
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24210
retarray->offset = 0;
24211
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24212
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24214
else if (unlikely (compile_options.bounds_check))
24216
Index: libgfortran/generated/iparity_i2.c
24217
===================================================================
24218
--- a/src/libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release)
24219
+++ b/src/libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch)
24221
retarray->offset = 0;
24222
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24224
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24225
- * extent[rank-1];
24226
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24228
- retarray->base_addr = xmalloc (alloc_size);
24229
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
24230
if (alloc_size == 0)
24232
/* Make sure we have a zero-sized array. */
24233
@@ -272,8 +271,7 @@
24237
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24238
- * extent[rank-1];
24239
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24241
retarray->offset = 0;
24242
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24243
@@ -285,7 +283,7 @@
24247
- retarray->base_addr = xmalloc (alloc_size);
24248
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
24252
@@ -430,8 +428,7 @@
24253
retarray->offset = 0;
24254
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24256
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24257
- * extent[rank-1];
24258
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24260
if (alloc_size == 0)
24262
@@ -440,7 +437,7 @@
24266
- retarray->base_addr = xmalloc (alloc_size);
24267
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
24271
Index: libgfortran/generated/maxloc1_16_r4.c
24272
===================================================================
24273
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
24274
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
24276
retarray->offset = 0;
24277
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24279
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24280
- * extent[rank-1];
24281
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24283
- retarray->base_addr = xmalloc (alloc_size);
24284
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24285
if (alloc_size == 0)
24287
/* Make sure we have a zero-sized array. */
24288
@@ -294,8 +293,7 @@
24292
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24293
- * extent[rank-1];
24294
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24296
retarray->offset = 0;
24297
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24298
@@ -307,7 +305,7 @@
24302
- retarray->base_addr = xmalloc (alloc_size);
24303
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24307
@@ -485,8 +483,7 @@
24308
retarray->offset = 0;
24309
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24311
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24312
- * extent[rank-1];
24313
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24315
if (alloc_size == 0)
24317
@@ -495,7 +492,7 @@
24321
- retarray->base_addr = xmalloc (alloc_size);
24322
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24326
Index: libgfortran/generated/maxloc0_16_r8.c
24327
===================================================================
24328
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
24329
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
24331
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24332
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24333
retarray->offset = 0;
24334
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24335
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24339
@@ -199,7 +199,7 @@
24340
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24341
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24342
retarray->offset = 0;
24343
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24344
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24348
@@ -367,7 +367,7 @@
24349
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24350
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24351
retarray->offset = 0;
24352
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24353
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24355
else if (unlikely (compile_options.bounds_check))
24357
Index: libgfortran/generated/sum_i16.c
24358
===================================================================
24359
--- a/src/libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release)
24360
+++ b/src/libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch)
24362
retarray->offset = 0;
24363
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24365
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24366
- * extent[rank-1];
24367
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24369
- retarray->base_addr = xmalloc (alloc_size);
24370
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24371
if (alloc_size == 0)
24373
/* Make sure we have a zero-sized array. */
24374
@@ -272,8 +271,7 @@
24378
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24379
- * extent[rank-1];
24380
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24382
retarray->offset = 0;
24383
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24384
@@ -285,7 +283,7 @@
24388
- retarray->base_addr = xmalloc (alloc_size);
24389
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24393
@@ -430,8 +428,7 @@
24394
retarray->offset = 0;
24395
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24397
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24398
- * extent[rank-1];
24399
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24401
if (alloc_size == 0)
24403
@@ -440,7 +437,7 @@
24407
- retarray->base_addr = xmalloc (alloc_size);
24408
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24412
Index: libgfortran/generated/maxloc0_4_i8.c
24413
===================================================================
24414
--- a/src/libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release)
24415
+++ b/src/libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch)
24417
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24418
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24419
retarray->offset = 0;
24420
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24421
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24425
@@ -199,7 +199,7 @@
24426
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24427
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24428
retarray->offset = 0;
24429
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24430
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24434
@@ -367,7 +367,7 @@
24435
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24436
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24437
retarray->offset = 0;
24438
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24439
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24441
else if (unlikely (compile_options.bounds_check))
24443
Index: libgfortran/generated/pack_c16.c
24444
===================================================================
24445
--- a/src/libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release)
24446
+++ b/src/libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch)
24447
@@ -167,8 +167,8 @@
24451
- /* xmalloc allocates a single byte for zero size. */
24452
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
24453
+ /* xmallocarray allocates a single byte for zero size. */
24454
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
24458
Index: libgfortran/generated/maxloc1_16_i16.c
24459
===================================================================
24460
--- a/src/libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release)
24461
+++ b/src/libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch)
24463
retarray->offset = 0;
24464
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24466
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24467
- * extent[rank-1];
24468
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24470
- retarray->base_addr = xmalloc (alloc_size);
24471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24472
if (alloc_size == 0)
24474
/* Make sure we have a zero-sized array. */
24475
@@ -294,8 +293,7 @@
24479
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24480
- * extent[rank-1];
24481
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24483
retarray->offset = 0;
24484
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24485
@@ -307,7 +305,7 @@
24489
- retarray->base_addr = xmalloc (alloc_size);
24490
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24494
@@ -485,8 +483,7 @@
24495
retarray->offset = 0;
24496
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24498
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24499
- * extent[rank-1];
24500
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24502
if (alloc_size == 0)
24504
@@ -495,7 +492,7 @@
24508
- retarray->base_addr = xmalloc (alloc_size);
24509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24513
Index: libgfortran/generated/minloc1_8_r4.c
24514
===================================================================
24515
--- a/src/libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release)
24516
+++ b/src/libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch)
24518
retarray->offset = 0;
24519
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24521
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24522
- * extent[rank-1];
24523
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24525
- retarray->base_addr = xmalloc (alloc_size);
24526
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24527
if (alloc_size == 0)
24529
/* Make sure we have a zero-sized array. */
24530
@@ -294,8 +293,7 @@
24534
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24535
- * extent[rank-1];
24536
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24538
retarray->offset = 0;
24539
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24540
@@ -307,7 +305,7 @@
24544
- retarray->base_addr = xmalloc (alloc_size);
24545
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24549
@@ -485,8 +483,7 @@
24550
retarray->offset = 0;
24551
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24553
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24554
- * extent[rank-1];
24555
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24557
if (alloc_size == 0)
24559
@@ -495,7 +492,7 @@
24563
- retarray->base_addr = xmalloc (alloc_size);
24564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24568
Index: libgfortran/generated/sum_c8.c
24569
===================================================================
24570
--- a/src/libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release)
24571
+++ b/src/libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch)
24573
retarray->offset = 0;
24574
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24576
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24577
- * extent[rank-1];
24578
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24580
- retarray->base_addr = xmalloc (alloc_size);
24581
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24582
if (alloc_size == 0)
24584
/* Make sure we have a zero-sized array. */
24585
@@ -272,8 +271,7 @@
24589
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24590
- * extent[rank-1];
24591
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24593
retarray->offset = 0;
24594
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24595
@@ -285,7 +283,7 @@
24599
- retarray->base_addr = xmalloc (alloc_size);
24600
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24604
@@ -430,8 +428,7 @@
24605
retarray->offset = 0;
24606
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24608
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24609
- * extent[rank-1];
24610
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24612
if (alloc_size == 0)
24614
@@ -440,7 +437,7 @@
24618
- retarray->base_addr = xmalloc (alloc_size);
24619
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24623
Index: libgfortran/generated/maxloc1_16_i2.c
24624
===================================================================
24625
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
24626
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
24628
retarray->offset = 0;
24629
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24631
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24632
- * extent[rank-1];
24633
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24635
- retarray->base_addr = xmalloc (alloc_size);
24636
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24637
if (alloc_size == 0)
24639
/* Make sure we have a zero-sized array. */
24640
@@ -294,8 +293,7 @@
24644
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24645
- * extent[rank-1];
24646
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24648
retarray->offset = 0;
24649
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24650
@@ -307,7 +305,7 @@
24654
- retarray->base_addr = xmalloc (alloc_size);
24655
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24659
@@ -485,8 +483,7 @@
24660
retarray->offset = 0;
24661
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24663
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24664
- * extent[rank-1];
24665
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24667
if (alloc_size == 0)
24669
@@ -495,7 +492,7 @@
24673
- retarray->base_addr = xmalloc (alloc_size);
24674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24678
Index: libgfortran/generated/parity_l1.c
24679
===================================================================
24680
--- a/src/libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release)
24681
+++ b/src/libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch)
24683
retarray->offset = 0;
24684
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24686
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24687
- * extent[rank-1];
24688
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24690
- retarray->base_addr = xmalloc (alloc_size);
24691
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
24692
if (alloc_size == 0)
24694
/* Make sure we have a zero-sized array. */
24695
Index: libgfortran/generated/maxval_i16.c
24696
===================================================================
24697
--- a/src/libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release)
24698
+++ b/src/libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch)
24700
retarray->offset = 0;
24701
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24703
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24704
- * extent[rank-1];
24705
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24707
- retarray->base_addr = xmalloc (alloc_size);
24708
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24709
if (alloc_size == 0)
24711
/* Make sure we have a zero-sized array. */
24712
@@ -286,8 +285,7 @@
24716
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24717
- * extent[rank-1];
24718
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24720
retarray->offset = 0;
24721
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24722
@@ -299,7 +297,7 @@
24726
- retarray->base_addr = xmalloc (alloc_size);
24727
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24731
@@ -472,8 +470,7 @@
24732
retarray->offset = 0;
24733
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24735
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24736
- * extent[rank-1];
24737
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24739
if (alloc_size == 0)
24741
@@ -482,7 +479,7 @@
24745
- retarray->base_addr = xmalloc (alloc_size);
24746
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24750
Index: libgfortran/generated/spread_c8.c
24751
===================================================================
24752
--- a/src/libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release)
24753
+++ b/src/libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch)
24754
@@ -101,8 +101,8 @@
24758
- /* xmalloc allocates a single byte for zero size. */
24759
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
24760
+ /* xmallocarray allocates a single byte for zero size. */
24761
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
24765
@@ -244,7 +244,7 @@
24767
if (ret->base_addr == NULL)
24769
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
24770
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
24772
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
24774
Index: libgfortran/generated/matmul_i16.c
24775
===================================================================
24776
--- a/src/libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release)
24777
+++ b/src/libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch)
24778
@@ -124,7 +124,7 @@
24781
retarray->base_addr
24782
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
24783
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
24784
retarray->offset = 0;
24786
else if (unlikely (compile_options.bounds_check))
24787
Index: libgfortran/generated/pack_i8.c
24788
===================================================================
24789
--- a/src/libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release)
24790
+++ b/src/libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch)
24791
@@ -167,8 +167,8 @@
24795
- /* xmalloc allocates a single byte for zero size. */
24796
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
24797
+ /* xmallocarray allocates a single byte for zero size. */
24798
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
24802
Index: libgfortran/generated/any_l1.c
24803
===================================================================
24804
--- a/src/libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release)
24805
+++ b/src/libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch)
24806
@@ -101,8 +101,7 @@
24807
retarray->offset = 0;
24808
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24810
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24811
- * extent[rank-1];
24812
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24814
if (alloc_size == 0)
24816
@@ -111,7 +110,7 @@
24820
- retarray->base_addr = xmalloc (alloc_size);
24821
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
24825
Index: libgfortran/generated/minloc1_8_i2.c
24826
===================================================================
24827
--- a/src/libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release)
24828
+++ b/src/libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch)
24830
retarray->offset = 0;
24831
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24833
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24834
- * extent[rank-1];
24835
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24837
- retarray->base_addr = xmalloc (alloc_size);
24838
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24839
if (alloc_size == 0)
24841
/* Make sure we have a zero-sized array. */
24842
@@ -294,8 +293,7 @@
24846
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24847
- * extent[rank-1];
24848
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24850
retarray->offset = 0;
24851
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24852
@@ -307,7 +305,7 @@
24856
- retarray->base_addr = xmalloc (alloc_size);
24857
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24861
@@ -485,8 +483,7 @@
24862
retarray->offset = 0;
24863
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24865
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24866
- * extent[rank-1];
24867
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24869
if (alloc_size == 0)
24871
@@ -495,7 +492,7 @@
24875
- retarray->base_addr = xmalloc (alloc_size);
24876
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24880
Index: libgfortran/generated/minloc0_8_r8.c
24881
===================================================================
24882
--- a/src/libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release)
24883
+++ b/src/libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch)
24885
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24886
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24887
retarray->offset = 0;
24888
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24889
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24893
@@ -199,7 +199,7 @@
24894
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24895
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24896
retarray->offset = 0;
24897
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24898
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24902
@@ -367,7 +367,7 @@
24903
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24904
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24905
retarray->offset = 0;
24906
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24907
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24909
else if (unlikely (compile_options.bounds_check))
24911
Index: libgfortran/generated/matmul_l8.c
24912
===================================================================
24913
--- a/src/libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release)
24914
+++ b/src/libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch)
24918
retarray->base_addr
24919
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
24920
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
24921
retarray->offset = 0;
24923
else if (unlikely (compile_options.bounds_check))
24924
Index: libgfortran/generated/product_r10.c
24925
===================================================================
24926
--- a/src/libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release)
24927
+++ b/src/libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch)
24929
retarray->offset = 0;
24930
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24932
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24933
- * extent[rank-1];
24934
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24936
- retarray->base_addr = xmalloc (alloc_size);
24937
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24938
if (alloc_size == 0)
24940
/* Make sure we have a zero-sized array. */
24941
@@ -272,8 +271,7 @@
24945
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24946
- * extent[rank-1];
24947
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24949
retarray->offset = 0;
24950
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24951
@@ -285,7 +283,7 @@
24955
- retarray->base_addr = xmalloc (alloc_size);
24956
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24960
@@ -430,8 +428,7 @@
24961
retarray->offset = 0;
24962
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24964
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24965
- * extent[rank-1];
24966
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24968
if (alloc_size == 0)
24970
@@ -440,7 +437,7 @@
24974
- retarray->base_addr = xmalloc (alloc_size);
24975
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24979
Index: libgfortran/generated/product_i1.c
24980
===================================================================
24981
--- a/src/libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release)
24982
+++ b/src/libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch)
24984
retarray->offset = 0;
24985
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24987
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24988
- * extent[rank-1];
24989
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24991
- retarray->base_addr = xmalloc (alloc_size);
24992
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24993
if (alloc_size == 0)
24995
/* Make sure we have a zero-sized array. */
24996
@@ -272,8 +271,7 @@
25000
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25001
- * extent[rank-1];
25002
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25004
retarray->offset = 0;
25005
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25006
@@ -285,7 +283,7 @@
25010
- retarray->base_addr = xmalloc (alloc_size);
25011
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25015
@@ -430,8 +428,7 @@
25016
retarray->offset = 0;
25017
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25019
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25020
- * extent[rank-1];
25021
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25023
if (alloc_size == 0)
25025
@@ -440,7 +437,7 @@
25029
- retarray->base_addr = xmalloc (alloc_size);
25030
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25034
Index: libgfortran/generated/all_l8.c
25035
===================================================================
25036
--- a/src/libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release)
25037
+++ b/src/libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch)
25038
@@ -101,8 +101,7 @@
25039
retarray->offset = 0;
25040
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25042
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25043
- * extent[rank-1];
25044
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25046
if (alloc_size == 0)
25048
@@ -111,7 +110,7 @@
25052
- retarray->base_addr = xmalloc (alloc_size);
25053
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
25057
Index: libgfortran/generated/in_pack_r16.c
25058
===================================================================
25059
--- a/src/libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release)
25060
+++ b/src/libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch)
25062
return source->base_addr;
25064
/* Allocate storage for the destination. */
25065
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
25066
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
25068
src = source->base_addr;
25069
stride0 = stride[0];
25070
Index: libgfortran/generated/in_pack_i1.c
25071
===================================================================
25072
--- a/src/libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release)
25073
+++ b/src/libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch)
25075
return source->base_addr;
25077
/* Allocate storage for the destination. */
25078
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
25079
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
25081
src = source->base_addr;
25082
stride0 = stride[0];
25083
Index: libgfortran/libgfortran.h
25084
===================================================================
25085
--- a/src/libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release)
25086
+++ b/src/libgfortran/libgfortran.h (.../branches/gcc-4_8-branch)
25087
@@ -751,6 +751,9 @@
25088
extern void *xmalloc (size_t) __attribute__ ((malloc));
25089
internal_proto(xmalloc);
25091
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
25092
+internal_proto(xmallocarray);
25094
extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
25095
internal_proto(xcalloc);
25097
Index: libgfortran/config.h.in
25098
===================================================================
25099
--- a/src/libgfortran/config.h.in (.../tags/gcc_4_8_3_release)
25100
+++ b/src/libgfortran/config.h.in (.../branches/gcc-4_8-branch)
25101
@@ -711,6 +711,9 @@
25102
/* Define to 1 if you have the `strtof' function. */
25105
+/* Define to 1 if you have the `strtok_r' function. */
25106
+#undef HAVE_STRTOK_R
25108
/* Define to 1 if you have the `strtold' function. */
25109
#undef HAVE_STRTOLD
25111
Index: libgfortran/io/list_read.c
25112
===================================================================
25113
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release)
25114
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
25115
@@ -2354,7 +2354,7 @@
25117
index_type len = strlen (nl->var_name) + 1;
25119
- char * ext_name = (char*)xmalloc (len + 1);
25120
+ char * ext_name = xmalloc (len + 1);
25121
memcpy (ext_name, nl->var_name, len-1);
25122
memcpy (ext_name + len - 1, "%", 2);
25123
for (nl = nl->next; nl; nl = nl->next)
25124
Index: libgfortran/io/unit.c
25125
===================================================================
25126
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
25127
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
25128
@@ -455,7 +455,7 @@
25130
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
25131
iunit->ls = (array_loop_spec *)
25132
- xmalloc (iunit->rank * sizeof (array_loop_spec));
25133
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
25134
dtp->internal_unit_len *=
25135
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
25137
Index: libgfortran/io/unix.c
25138
===================================================================
25139
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
25140
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
25141
@@ -407,7 +407,9 @@
25145
- if (s->fd != STDOUT_FILENO
25148
+ else if (s->fd != STDOUT_FILENO
25149
&& s->fd != STDERR_FILENO
25150
&& s->fd != STDIN_FILENO)
25151
retval = close (s->fd);
25152
@@ -983,7 +985,15 @@
25154
/* Get the current length of the file. */
25156
- fstat (fd, &statbuf);
25157
+ if (fstat (fd, &statbuf) == -1)
25159
+ s->st_dev = s->st_ino = -1;
25160
+ s->file_length = 0;
25161
+ if (errno == EBADF)
25164
+ return (stream *) s;
25167
s->st_dev = statbuf.st_dev;
25168
s->st_ino = statbuf.st_ino;
25169
Index: libgfortran/io/transfer.c
25170
===================================================================
25171
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release)
25172
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
25173
@@ -3776,9 +3776,9 @@
25174
if (nml->var_rank > 0)
25176
nml->dim = (descriptor_dimension*)
25177
- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
25178
+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
25179
nml->ls = (array_loop_spec*)
25180
- xmalloc (nml->var_rank * sizeof (array_loop_spec));
25181
+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
25185
Index: libgfortran/io/write.c
25186
===================================================================
25187
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_3_release)
25188
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
25189
@@ -1863,7 +1863,7 @@
25190
base_var_name_len = base ? strlen (base->var_name) : 0;
25191
ext_name_len = base_name_len + base_var_name_len
25192
+ strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
25193
- ext_name = (char*)xmalloc (ext_name_len);
25194
+ ext_name = xmalloc (ext_name_len);
25196
memcpy (ext_name, base_name, base_name_len);
25197
clen = strlen (obj->var_name + base_var_name_len);
25198
@@ -1892,7 +1892,7 @@
25199
/* Now obj_name. */
25201
obj_name_len = strlen (obj->var_name) + 1;
25202
- obj_name = xmalloc (obj_name_len+1);
25203
+ obj_name = xmalloc (obj_name_len + 1);
25204
memcpy (obj_name, obj->var_name, obj_name_len-1);
25205
memcpy (obj_name + obj_name_len-1, "%", 2);
25207
Index: libada/Makefile.in
25208
===================================================================
25209
--- a/src/libada/Makefile.in (.../tags/gcc_4_8_3_release)
25210
+++ b/src/libada/Makefile.in (.../branches/gcc-4_8-branch)
25212
PICFLAG = @PICFLAG@
25213
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
25214
GNATLIBCFLAGS= -g -O2
25215
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
25216
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
25217
-fexceptions -DIN_RTS @have_getipinfo@
25219
host_subdir = @host_subdir@
25220
Index: libada/ChangeLog
25221
===================================================================
25222
--- a/src/libada/ChangeLog (.../tags/gcc_4_8_3_release)
25223
+++ b/src/libada/ChangeLog (.../branches/gcc-4_8-branch)
25225
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
25227
+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
25229
2014-05-22 Release Manager
25231
* GCC 4.8.3 released.
25232
Index: libffi/src/powerpc/linux64_closure.S
25233
===================================================================
25234
--- a/src/libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release)
25235
+++ b/src/libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch)
25236
@@ -381,7 +381,8 @@
25240
-# if defined __ELF__ && defined __linux__
25243
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
25244
.section .note.GNU-stack,"",@progbits
25247
Index: libffi/src/powerpc/linux64.S
25248
===================================================================
25249
--- a/src/libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release)
25250
+++ b/src/libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch)
25251
@@ -254,7 +254,8 @@
25255
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
25258
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
25259
.section .note.GNU-stack,"",@progbits
25262
Index: libffi/ChangeLog
25263
===================================================================
25264
--- a/src/libffi/ChangeLog (.../tags/gcc_4_8_3_release)
25265
+++ b/src/libffi/ChangeLog (.../branches/gcc-4_8-branch)
25267
+2014-09-11 Jakub Jelinek <jakub@redhat.com>
25269
+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
25270
+ POWERPC64 is not defined.
25271
+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
25273
2014-05-22 Release Manager
25275
* GCC 4.8.3 released.
25276
Index: libcpp/line-map.c
25277
===================================================================
25278
--- a/src/libcpp/line-map.c (.../tags/gcc_4_8_3_release)
25279
+++ b/src/libcpp/line-map.c (.../branches/gcc-4_8-branch)
25280
@@ -527,10 +527,10 @@
25281
&& line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
25282
|| (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
25283
|| (max_column_hint <= 80
25284
- && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
25288
+ && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
25289
+ || (highest > 0x60000000
25290
+ && (set->max_column_hint || highest > 0x70000000)))
25293
max_column_hint = set->max_column_hint;
25295
@@ -541,7 +541,7 @@
25296
/* If the column number is ridiculous or we've allocated a huge
25297
number of source_locations, give up on column numbers. */
25298
max_column_hint = 0;
25299
- if (highest >0x70000000)
25300
+ if (highest > 0x70000000)
25304
Index: libcpp/ChangeLog
25305
===================================================================
25306
--- a/src/libcpp/ChangeLog (.../tags/gcc_4_8_3_release)
25307
+++ b/src/libcpp/ChangeLog (.../branches/gcc-4_8-branch)
25309
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
25311
+ Backported from mainline
25312
+ 2014-11-25 Jakub Jelinek <jakub@redhat.com>
25314
+ PR preprocessor/60436
25315
+ * line-map.c (linemap_line_start): If highest is above 0x60000000
25316
+ and we are still tracking columns or highest is above 0x70000000,
25319
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25321
+ Backport from mainline r215873
25322
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25324
+ * lex.c (search_line_fast): Add new version to be used for Power8
25325
+ and later targets when Altivec is enabled. Restrict the existing
25326
+ Altivec version to big-endian systems so that lvsr is not used on
25327
+ little endian, where it is deprecated. Remove LE-specific code
25328
+ from the now-BE-only version.
25330
2014-05-22 Release Manager
25332
* GCC 4.8.3 released.
25333
Index: libcpp/lex.c
25334
===================================================================
25335
--- a/src/libcpp/lex.c (.../tags/gcc_4_8_3_release)
25336
+++ b/src/libcpp/lex.c (.../branches/gcc-4_8-branch)
25337
@@ -515,9 +515,111 @@
25338
search_line_fast = impl;
25341
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
25342
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
25344
-/* A vection of the fast scanner using AltiVec vectorized byte compares. */
25345
+/* A vection of the fast scanner using AltiVec vectorized byte compares
25346
+ and VSX unaligned loads (when VSX is available). This is otherwise
25347
+ the same as the pre-GCC 5 version. */
25349
+static const uchar *
25350
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
25352
+ typedef __attribute__((altivec(vector))) unsigned char vc;
25354
+ const vc repl_nl = {
25355
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
25356
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
25358
+ const vc repl_cr = {
25359
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
25360
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
25362
+ const vc repl_bs = {
25363
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
25364
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
25366
+ const vc repl_qm = {
25367
+ '?', '?', '?', '?', '?', '?', '?', '?',
25368
+ '?', '?', '?', '?', '?', '?', '?', '?',
25370
+ const vc zero = { 0 };
25374
+ /* Main loop processing 16 bytes at a time. */
25377
+ vc m_nl, m_cr, m_bs, m_qm;
25379
+ data = *((const vc *)s);
25382
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
25383
+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
25384
+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
25385
+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
25386
+ t = (m_nl | m_cr) | (m_bs | m_qm);
25388
+ /* T now contains 0xff in bytes for which we matched one of the relevant
25389
+ characters. We want to exit the loop if any byte in T is non-zero.
25390
+ Below is the expansion of vec_any_ne(t, zero). */
25392
+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
25394
+ /* Restore s to to point to the 16 bytes we just processed. */
25398
+#define N (sizeof(vc) / sizeof(long))
25402
+ /* Statically assert that N is 2 or 4. */
25403
+ unsigned long l[(N == 2 || N == 4) ? N : -1];
25405
+ unsigned long l, i = 0;
25409
+ /* Find the first word of T that is non-zero. */
25416
+ s += sizeof(unsigned long);
25420
+ s += sizeof(unsigned long);
25425
+ s += sizeof(unsigned long);
25429
+ /* L now contains 0xff in bytes for which we matched one of the
25430
+ relevant characters. We can find the byte index by finding
25431
+ its bit index and dividing by 8. */
25432
+#ifdef __BIG_ENDIAN__
25433
+ l = __builtin_clzl(l) >> 3;
25435
+ l = __builtin_ctzl(l) >> 3;
25443
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
25445
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
25446
+ This cannot be used for little endian because vec_lvsl/lvsr are
25447
+ deprecated for little endian and the code won't work properly. */
25448
/* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
25449
so we can't compile this function without -maltivec on the command line
25450
(or implied by some other switch). */
25451
@@ -559,13 +661,8 @@
25452
beginning with all ones and shifting in zeros according to the
25453
mis-alignment. The LVSR instruction pulls the exact shift we
25454
want from the address. */
25455
-#ifdef __BIG_ENDIAN__
25456
mask = __builtin_vec_lvsr(0, s);
25457
mask = __builtin_vec_perm(zero, ones, mask);
25459
- mask = __builtin_vec_lvsl(0, s);
25460
- mask = __builtin_vec_perm(ones, zero, mask);
25464
/* While altivec loads mask addresses, we still need to align S so
25465
@@ -629,11 +726,7 @@
25466
/* L now contains 0xff in bytes for which we matched one of the
25467
relevant characters. We can find the byte index by finding
25468
its bit index and dividing by 8. */
25469
-#ifdef __BIG_ENDIAN__
25470
l = __builtin_clzl(l) >> 3;
25472
- l = __builtin_ctzl(l) >> 3;
25478
===================================================================
25479
--- a/src/. (.../tags/gcc_4_8_3_release)
25480
+++ b/src/. (.../branches/gcc-4_8-branch)
25482
Property changes on: .
25483
___________________________________________________________________
25484
Modified: svn:mergeinfo
25485
Merged /trunk:r211733,215049